class_docstr: Represents a measurement process occurring at the end of a
  quantum variational circuit.
  
  Args:
      obs (Union[.Operator, .MeasurementValue, Sequence[.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: ["Represents","a","measurement","process","occurring","at","the","end","of","a","quantum","variational","circuit",".","Args",":","obs","(","Union","[",".Operator",",",".MeasurementValue",",","Sequence","[",".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"]
docstr: Eigenvalues associated with the measurement process.
  
  If the measurement process has an associated observable,
  the eigenvalues will correspond to this observable. Otherwise,
  they will be the eigenvalues provided when the measurement
  process was instantiated.
  
  Note that the eigenvalues are not guaranteed to be in any
  particular order.
  
  **Example:**
  
  >>> m = MeasurementProcess(Expectation, obs=qml.PauliX(wires=1))
  >>> m.eigvals()
  array([1, -1])
  
  Returns:
      array: eigvals representation
code: def eigvals(self):
      r"""Eigenvalues associated with the measurement process.
  
      If the measurement process has an associated observable,
      the eigenvalues will correspond to this observable. Otherwise,
      they will be the eigenvalues provided when the measurement
      process was instantiated.
  
      Note that the eigenvalues are not guaranteed to be in any
      particular order.
  
      **Example:**
  
      >>> m = MeasurementProcess(Expectation, obs=qml.PauliX(wires=1))
      >>> m.eigvals()
      array([1, -1])
  
      Returns:
          array: eigvals representation
      """
      if self.mv is not None:
          if getattr(self.mv, "name", None) == "MeasurementValue":
              # Indexing a MeasurementValue gives the output of the processing function
              # for the binary number corresponding to the index.
              return qml.math.asarray(
                  [self.mv[i] for i in range(2 ** len(self.wires))]
              )
          return qml.math.arange(0, 2 ** len(self.wires), 1)
  
      if self.obs is not None:
          try:
              return qml.eigvals(self.obs)
          except DecompositionUndefinedError as e:
              raise EigvalsUndefinedError from e
      return self._eigvals
  
imports: import copy
  import functools
  from warnings import warn
  from abc import ABC, abstractmethod
  from enum import Enum
  from typing import Sequence, Tuple, Optional, Union
  import pennylane
  from pennylane.operation import Operator, DecompositionUndefinedError, EigvalsUndefinedError
  from pennylane.pytrees import register_pytree
  from pennylane.typing import TensorLike
  from pennylane.wires import Wires
  from .shots import Shots
label_desc: Use image node_id 18 for calling the MeasurementProcess obj's underlying member method code with example usage: obj.eigvals() and returns: self, qml, qml, qml