class_docstr: pennylane.Identity(wires)
  The identity observable :math:`\I`.
  
  The expectation of this observable
  
  .. math::
      E[\I] = \text{Tr}(\I \rho)
  
  Args:
      wires (Iterable[Any] or Any): Wire label(s) that the identity acts on.
      id (str): custom label given to an operator instance,
          can be useful for some applications where the instance has to be identified.
  
  Corresponds to the trace of the quantum state, which in exact
  simulators should always be equal to 1.
class_docstr_tok: ["pennylane.Identity","(","wires",")","The","identity","observable",":","math",":","`","\\I","`",".","The","expectation","of","this","observable","..","math",":",":","E","[","\\I","]","=","\\text","{","Tr","}","(","\\I","\\rho",")","Args",":","wires","(","Iterable","[","Any","]","or","Any",")",":","Wire","label","(","s",")","that","the","identity","acts","on",".","id","(","str",")",":","custom","label","given","to","an","operator","instance",",","can","be","useful","for","some","applications","where","the","instance","has","to","be","identified",".","Corresponds","to","the","trace","of","the","quantum","state",",","which","in","exact","simulators","should","always","be","equal","to","1","."]
docstr: Sequence of gates that diagonalize the operator in the computational basis (static method).
  
  Given the eigendecomposition :math:`O = U \Sigma U^{\dagger}` where
  :math:`\Sigma` is a diagonal matrix containing the eigenvalues,
  the sequence of diagonalizing gates implements the unitary :math:`U^{\dagger}`.
  
  The diagonalizing gates rotate the state into the eigenbasis
  of the operator.
  
  .. seealso:: :meth:`~.Identity.diagonalizing_gates`.
  
  Args:
      wires (Iterable[Any], Wires): wires that the operator acts on
  
  Returns:
      list[.Operator]: list of diagonalizing gates
  
  **Example**
  
  >>> qml.Identity.compute_diagonalizing_gates(wires=[0])
  []
docstr_tok: ["Sequence","of","gates","that","diagonalize","the","operator","in","the","computational","basis","(","static","method",")",".","Given","the","eigendecomposition",":","math",":","`","O","=","U","\\Sigma","U^","{","\\dagger","}","`","where",":","math",":","`","\\Sigma","`","is","a","diagonal","matrix","containing","the","eigenvalues",",","the","sequence","of","diagonalizing","gates","implements","the","unitary",":","math",":","`","U^","{","\\dagger","}","`",".","The","diagonalizing","gates","rotate","the","state","into","the","eigenbasis","of","the","operator",".","..","seealso",":",":",":","meth",":","`","~.Identity.diagonalizing_gates","`",".","Args",":","wires","(","Iterable","[","Any","]",",","Wires",")",":","wires","that","the","operator","acts","on","Returns",":","list","[",".Operator","]",":","list","of","diagonalizing","gates","*","*","Example","*","*",">",">",">","qml.Identity.compute_diagonalizing_gates","(","wires=","[","0","]",")","[","]"]
code: def compute_diagonalizing_gates(
      wires, n_wires=1
  ):  # pylint: disable=arguments-differ,unused-argument
      r"""Sequence of gates that diagonalize the operator in the computational basis (static method).
  
      Given the eigendecomposition :math:`O = U \Sigma U^{\dagger}` where
      :math:`\Sigma` is a diagonal matrix containing the eigenvalues,
      the sequence of diagonalizing gates implements the unitary :math:`U^{\dagger}`.
  
      The diagonalizing gates rotate the state into the eigenbasis
      of the operator.
  
      .. seealso:: :meth:`~.Identity.diagonalizing_gates`.
  
      Args:
          wires (Iterable[Any], Wires): wires that the operator acts on
  
      Returns:
          list[.Operator]: list of diagonalizing gates
  
      **Example**
  
      >>> qml.Identity.compute_diagonalizing_gates(wires=[0])
      []
      """
      return []
  
imports: from functools import lru_cache
  from scipy import sparse
  import pennylane
  from pennylane.operation import AnyWires, AllWires, CVObservable, Operation
label_desc: Use image node_id 8 for calling the Identity obj's underlying member method code with example usage: obj.compute_diagonalizing_gates(wires, n_wires) and returns: list