class_docstr: Observable corresponding to the state projector :math:`P=\ket{\phi}\bra{\phi}`, where
  :math:`\phi` denotes a state.
class_docstr_tok: ["Observable","corresponding","to","the","state","projector",":","math",":","`","P=\\ket","{","\\phi","}","\\bra","{","\\phi","}","`",",","where",":","math",":","`","\\phi","`","denotes","a","state","."]
docstr: Eigenvalues of the operator in the computational basis (static method).
  
  If :attr:`diagonalizing_gates` are specified and implement a unitary :math:`U^{\dagger}`,
  the operator can be reconstructed as
  
  .. math:: O = U \Sigma U^{\dagger},
  
  where :math:`\Sigma` is the diagonal matrix containing the eigenvalues.
  
  Otherwise, no particular order for the eigenvalues is guaranteed.
  
  .. seealso:: :meth:`~.StateVectorProjector.eigvals`
  
  Args:
      state_vector (Iterable): state vector to project on
  
  Returns:
      array: eigenvalues
  
  **Example**
  
  >>> StateVectorProjector.compute_eigvals([0, 0, 1, 0])
  array([1, 0, 0, 0])
docstr_tok: ["Eigenvalues","of","the","operator","in","the","computational","basis","(","static","method",")",".","If",":","attr",":","`","diagonalizing_gates","`","are","specified","and","implement","a","unitary",":","math",":","`","U^","{","\\dagger","}","`",",","the","operator","can","be","reconstructed","as","..","math",":",":","O","=","U","\\Sigma","U^","{","\\dagger","}",",","where",":","math",":","`","\\Sigma","`","is","the","diagonal","matrix","containing","the","eigenvalues",".","Otherwise",",","no","particular","order","for","the","eigenvalues","is","guaranteed",".","..","seealso",":",":",":","meth",":","`","~.StateVectorProjector.eigvals","`","Args",":","state_vector","(","Iterable",")",":","state","vector","to","project","on","Returns",":","array",":","eigenvalues","*","*","Example","*","*",">",">",">","StateVectorProjector.compute_eigvals","(","[","0",",","0",",","1",",","0","]",")","array","(","[","1",",","0",",","0",",","0","]",")"]
code: def compute_eigvals(
      state_vector,
  ):  # pylint: disable=arguments-differ,arguments-renamed
      r"""Eigenvalues of the operator in the computational basis (static method).
  
      If :attr:`diagonalizing_gates` are specified and implement a unitary :math:`U^{\dagger}`,
      the operator can be reconstructed as
  
      .. math:: O = U \Sigma U^{\dagger},
  
      where :math:`\Sigma` is the diagonal matrix containing the eigenvalues.
  
      Otherwise, no particular order for the eigenvalues is guaranteed.
  
      .. seealso:: :meth:`~.StateVectorProjector.eigvals`
  
      Args:
          state_vector (Iterable): state vector to project on
  
      Returns:
          array: eigenvalues
  
      **Example**
  
      >>> StateVectorProjector.compute_eigvals([0, 0, 1, 0])
      array([1, 0, 0, 0])
      """
      w = qml.math.zeros_like(state_vector)
      w[0] = 1
      return w
  
imports: from copy import copy
  from collections.abc import Sequence
  import numpy
  from scipy.sparse import csr_matrix
  import pennylane
  from pennylane.operation import AnyWires, Observable, Operation
  from pennylane.wires import Wires
  from .matrix_ops import QubitUnitary
label_desc: Use image node_id 5 for calling the StateVectorProjector obj's underlying member method code with example usage: obj.compute_eigvals(state_vector) and returns: w