class_docstr: Measures the expectation value of an operator using the classical shadow measurement process.
  
  Please refer to :func:`shadow_expval` for detailed documentation.
  
  Args:
      H (Operator, Sequence[Operator]): Operator or list of Operators to compute the expectation value over.
      seed (Union[int, None]): The seed used to generate the random measurements
      k (int): Number of equal parts to split the shadow's measurements to compute the median of means.
          ``k=1`` corresponds to simply taking the mean over all measurements.
      id (str): custom label given to a measurement instance, can be useful for some applications
          where the instance has to be identified
docstr: Process the given quantum state with the given number of shots
  
  Args:
      state (Sequence[complex]): quantum state
      wire_order (Wires): wires determining the subspace that ``state`` acts on; a matrix of
          dimension :math:`2^n` acts on a subspace of :math:`n` wires
      shots (int): The number of shots
      rng (Union[None, int, array_like[int], SeedSequence, BitGenerator, Generator]): A
          seed-like parameter matching that of ``seed`` for ``numpy.random.default_rng``.
          If no value is provided, a default RNG will be used.
  
  Returns:
      float: The estimate of the expectation value.
docstr_tok: ["Process","the","given","quantum","state","with","the","given","number","of","shots","Args",":","state","(","Sequence","[","complex","]",")",":","quantum","state","wire_order","(","Wires",")",":","wires","determining","the","subspace","that","``","state","``","acts","on",";","a","matrix","of","dimension",":","math",":","`","2^n","`","acts","on","a","subspace","of",":","math",":","`","n","`","wires","shots","(","int",")",":","The","number","of","shots","rng","(","Union","[","None",",","int",",","array_like","[","int","]",",","SeedSequence",",","BitGenerator",",","Generator","]",")",":","A","seed-like","parameter","matching","that","of","``","seed","``","for","``","numpy.random.default_rng","``",".","If","no","value","is","provided",",","a","default","RNG","will","be","used",".","Returns",":","float",":","The","estimate","of","the","expectation","value","."]
code: def process_state_with_shots(
      self,
      state: Sequence[complex],
      wire_order: Wires,
      shots: int,
      rng=None,
  ):
      """Process the given quantum state with the given number of shots
  
      Args:
          state (Sequence[complex]): quantum state
          wire_order (Wires): wires determining the subspace that ``state`` acts on; a matrix of
              dimension :math:`2^n` acts on a subspace of :math:`n` wires
          shots (int): The number of shots
          rng (Union[None, int, array_like[int], SeedSequence, BitGenerator, Generator]): A
              seed-like parameter matching that of ``seed`` for ``numpy.random.default_rng``.
              If no value is provided, a default RNG will be used.
  
      Returns:
          float: The estimate of the expectation value.
      """
      bits, recipes = qml.classical_shadow(
          wires=self.wires, seed=self.seed
      ).process_state_with_shots(state, wire_order, shots, rng=rng)
      shadow = qml.shadows.ClassicalShadow(
          bits, recipes, wire_map=self.wires.tolist()
      )
      return shadow.expval(self.H, self.k)
  
imports: import copy
  from collections.abc import Iterable
  from typing import Optional, Union, Sequence
  from string import ascii_letters
  import numpy
  import pennylane
  from pennylane.operation import Operator
  from pennylane.wires import Wires
  from .measurements import MeasurementShapeError, MeasurementTransform, Shadow, ShadowExpval
label_desc: Use image node_id 5 for calling the ShadowExpvalMP obj's underlying member method code with example usage: obj.process_state_with_shots(state, wire_order, shots, rng) and returns: shadow