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: The expected output shape of the MeasurementProcess.
  
  Note that the output shape is dependent on the shots or device when:
  
  * The measurement type is either ``_Probability``, ``_State`` (from :func:`.state`) or
    ``_Sample``;
  * The shot vector was defined.
  
  For example, assuming a device with ``shots=None``, expectation values
  and variances define ``shape=(,)``, whereas probabilities in the qubit
  model define ``shape=(2**num_wires)`` where ``num_wires`` is the
  number of wires the measurement acts on.
  
  Args:
      device (pennylane.Device): a PennyLane device to use for determining the shape
      shots (~.Shots): object defining the number and batches of shots
  
  Returns:
      tuple: the output shape
  
  Raises:
      QuantumFunctionError: the return type of the measurement process is
          unrecognized and cannot deduce the numeric type
code: def shape(self, device, shots: Shots) -> Tuple:
      """The expected output shape of the MeasurementProcess.
  
      Note that the output shape is dependent on the shots or device when:
  
      * The measurement type is either ``_Probability``, ``_State`` (from :func:`.state`) or
        ``_Sample``;
      * The shot vector was defined.
  
      For example, assuming a device with ``shots=None``, expectation values
      and variances define ``shape=(,)``, whereas probabilities in the qubit
      model define ``shape=(2**num_wires)`` where ``num_wires`` is the
      number of wires the measurement acts on.
  
      Args:
          device (pennylane.Device): a PennyLane device to use for determining the shape
          shots (~.Shots): object defining the number and batches of shots
  
      Returns:
          tuple: the output shape
  
      Raises:
          QuantumFunctionError: the return type of the measurement process is
              unrecognized and cannot deduce the numeric type
      """
      raise qml.QuantumFunctionError(
          f"The shape of the measurement {self.__class__.__name__} is not defined"
      )
  
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 9 for calling the MeasurementProcess obj's underlying member method code with example usage: obj.shape(device, shots) without return types