class_docstr: Measurement process that samples from the supplied observable and returns the number of
  counts for each sample.
  
  Please refer to :func:`counts` for detailed documentation.
  
  Args:
      obs (Union[.Operator, .MeasurementValue]): The observable that is to be measured
          as part of the measurement process. Not all measurement processes require observables
          (for example ``Probability``); this argument is optional.
      wires (.Wires): The wires the measurement process applies to.
          This can only be specified if an observable was not provided.
      eigvals (array): A flat array representing the eigenvalues of the measurement.
          This can only be specified if an observable was not provided.
      id (str): custom label given to a measurement instance, can be useful for some applications
          where the instance has to be identified
      all_outcomes(bool): determines whether the returned dict will contain only the observed
          outcomes (default), or whether it will display all possible outcomes for the system
class_docstr_tok: ["Measurement","process","that","samples","from","the","supplied","observable","and","returns","the","number","of","counts","for","each","sample",".","Please","refer","to",":","func",":","`","counts","`","for","detailed","documentation",".","Args",":","obs","(","Union","[",".Operator",",",".MeasurementValue","]",")",":","The","observable","that","is","to","be","measured","as","part","of","the","measurement","process",".","Not","all","measurement","processes","require","observables","(","for","example","``","Probability","``",")",";","this","argument","is","optional",".","wires","(",".Wires",")",":","The","wires","the","measurement","process","applies","to",".","This","can","only","be","specified","if","an","observable","was","not","provided",".","eigvals","(","array",")",":","A","flat","array","representing","the","eigenvalues","of","the","measurement",".","This","can","only","be","specified","if","an","observable","was","not","provided",".","id","(","str",")",":","custom","label","given","to","a","measurement","instance",",","can","be","useful","for","some","applications","where","the","instance","has","to","be","identified","all_outcomes","(","bool",")",":","determines","whether","the","returned","dict","will","contain","only","the","observed","outcomes","(","default",")",",","or","whether","it","will","display","all","possible","outcomes","for","the","system"]
code: def return_type(self):
      return AllCounts if self.all_outcomes else Counts
  
file_path: pennylane/pennylane/measurements/counts.py
imports: import warnings
  from typing import Sequence, Tuple, Optional
  import pennylane
  from pennylane.operation import Operator
  from pennylane.wires import Wires
  from .measurements import AllCounts, Counts, SampleMeasurement
  from .mid_measure import MeasurementValue
label_desc: Use image node_id 5 for calling the CountsMP obj's underlying member method code with example usage: obj.return_type() and returns: unknown