class_docstr: Measurement process that computes the probability of each computational basis state.
  
  Please refer to :func:`probs` 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
class_docstr_tok: ["Measurement","process","that","computes","the","probability","of","each","computational","basis","state",".","Please","refer","to",":","func",":","`","probs","`","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"]
code: def process_counts(
      self, counts: dict, wire_order: Wires
  ) -> np.ndarray:
      wire_map = dict(zip(wire_order, range(len(wire_order))))
      mapped_wires = [wire_map[w] for w in self.wires]
  
      # when reducing wires, two keys may become equal
      # the following structure was chosen to maintain compatibility with 'process_samples'
      if mapped_wires:
          mapped_counts = {}
          for outcome, occurrence in counts.items():
              mapped_outcome = "".join(outcome[i] for i in mapped_wires)
              mapped_counts[mapped_outcome] = (
                  mapped_counts.get(mapped_outcome, 0) + occurrence
              )
          counts = mapped_counts
  
      num_shots = sum(counts.values())
      num_wires = len(next(iter(counts)))
      dim = 2**num_wires
  
      # constructs the probability vector
      # converts outcomes from binary strings to integers (base 10 representation)
      prob_vector = qml.math.zeros((dim), dtype="float64")
      for outcome, occurrence in counts.items():
          prob_vector[int(outcome, base=2)] = occurrence / num_shots
  
      return prob_vector
  
file_path: pennylane/pennylane/measurements/probs.py
imports: from typing import Sequence, Tuple
  import numpy
  import pennylane
  from pennylane.wires import Wires
  from .measurements import Probability, SampleMeasurement, StateMeasurement
  from .mid_measure import MeasurementValue
label_desc: Use image node_id 6 for calling the ProbabilityMP obj's underlying member method code with example usage: obj.process_counts(counts, wire_order) and returns: prob_vector