class_docstr: ``DatasetAttribute`` for ``pennylane.operation.Operator`` classes.
  
  Supports all operator types that meet the following conditions:
      - The ``__init__()`` method matches the signature of ``Operator.__init__``,
          or any additional arguments are optional and do not affect the value of
          the operator
      - The ``data`` and ``wires`` attributes will produce an identical copy of
          operator if passed into the classes' ``__init__()`` method. Generally,
          this means ``__init__()`` do not mutate the ``identifiers`` and ``wires``
          arguments.
      - Hyperparameters are not used or are automatically derived by ``__init__()``.
  
  Almost all operators meet these conditions. This type also supports serializing the
  ``Hamiltonian`` and ``Tensor`` operators.
class_docstr_tok: ["``","DatasetAttribute","``","for","``","pennylane.operation.Operator","``","classes",".","Supports","all","operator","types","that","meet","the","following","conditions",":","-","The","``","__init__","(",")","``","method","matches","the","signature","of","``","Operator.__init__","``",",","or","any","additional","arguments","are","optional","and","do","not","affect","the","value","of","the","operator","-","The","``","data","``","and","``","wires","``","attributes","will","produce","an","identical","copy","of","operator","if","passed","into","the","classes","'","``","__init__","(",")","``","method",".","Generally",",","this","means","``","__init__","(",")","``","do","not","mutate","the","``","identifiers","``","and","``","wires","``","arguments",".","-","Hyperparameters","are","not","used","or","are","automatically","derived","by","``","__init__","(",")","``",".","Almost","all","operators","meet","these","conditions",".","This","type","also","supports","serializing","the","``","Hamiltonian","``","and","``","Tensor","``","operators","."]
code: def consumes_types(cls) -> FrozenSet[Type[Operator]]:
      return frozenset(
          (
              # pennylane/operation/Tensor
              Tensor,
              # pennylane/ops/qubit/arithmetic_qml.py
              qml.QubitCarry,
              qml.QubitSum,
              # pennylane/ops/qubit/hamiltonian.py
              qml.Hamiltonian,
              # pennylane/ops/qubit/matrix_qml.py
              qml.QubitUnitary,
              qml.DiagonalQubitUnitary,
              # pennylane/ops/qubit/non_parametric_qml.py
              qml.Hadamard,
              qml.PauliX,
              qml.PauliY,
              qml.PauliZ,
              qml.T,
              qml.S,
              qml.SX,
              qml.CNOT,
              qml.CZ,
              qml.CY,
              qml.CH,
              qml.SWAP,
              qml.ECR,
              qml.SISWAP,
              qml.CSWAP,
              qml.CCZ,
              qml.Toffoli,
              qml.WireCut,
              # pennylane/ops/qubit/observables.py
              qml.Hermitian,
              qml.Projector,
              # pennylane/ops/qubit/parametric_ops_controlled.py
              qml.ControlledPhaseShift,
              qml.CPhaseShift00,
              qml.CPhaseShift01,
              qml.CPhaseShift10,
              qml.CRX,
              qml.CRY,
              qml.CRZ,
              qml.CRot,
              # pennylane/ops/qubit/parametric_ops_multi_qubit.py
              qml.MultiRZ,
              qml.IsingXX,
              qml.IsingYY,
              qml.IsingZZ,
              qml.IsingXY,
              qml.PSWAP,
              # pennylane/ops/qubit/parametric_ops_single_qubit.py
              qml.RX,
              qml.RY,
              qml.RZ,
              qml.PhaseShift,
              qml.Rot,
              qml.U1,
              qml.U2,
              qml.U3,
              # pennylane/ops/qubit/qchem_ops.py
              qml.SingleExcitation,
              qml.SingleExcitationMinus,
              qml.SingleExcitationPlus,
              qml.DoubleExcitation,
              qml.DoubleExcitationMinus,
              qml.DoubleExcitationPlus,
              qml.OrbitalRotation,
              qml.FermionicSWAP,
              # pennylane/ops/special_unitary.py
              qml.SpecialUnitary,
              # pennylane/ops/state_preparation.py
              qml.BasisState,
              qml.QubitStateVector,
              qml.StatePrep,
              qml.QubitDensityMatrix,
              # pennylane/ops/qutrit/matrix_obs.py
              qml.QutritUnitary,
              # pennylane/ops/qutrit/non_parametric_qml.py
              qml.TShift,
              qml.TClock,
              qml.TAdd,
              qml.TSWAP,
              # pennylane/ops/qutrit/observables.py
              qml.THermitian,
              # pennylane/ops/channel.py
              qml.AmplitudeDamping,
              qml.GeneralizedAmplitudeDamping,
              qml.PhaseDamping,
              qml.DepolarizingChannel,
              qml.BitFlip,
              qml.ResetError,
              qml.PauliError,
              qml.PhaseFlip,
              qml.ThermalRelaxationError,
              # pennylane/ops/cv.py
              qml.Rotation,
              qml.Squeezing,
              qml.Displacement,
              qml.Beamsplitter,
              qml.TwoModeSqueezing,
              qml.QuadraticPhase,
              qml.ControlledAddition,
              qml.ControlledPhase,
              qml.Kerr,
              qml.CrossKerr,
              qml.InterferometerUnitary,
              qml.CoherentState,
              qml.SqueezedState,
              qml.DisplacedSqueezedState,
              qml.ThermalState,
              qml.GaussianState,
              qml.FockState,
              qml.FockStateVector,
              qml.FockDensityMatrix,
              qml.CatState,
              qml.NumberOperator,
              qml.TensorN,
              qml.QuadX,
              qml.QuadP,
              qml.QuadOperator,
              qml.PolyXP,
              qml.FockStateProjector,
              # pennylane/ops/identity.py
              qml.Identity,
          )
      )
  
file_path: pennylane/pennylane/data/attributes/operator/operator.py
imports: import json
  import typing
  from functools import lru_cache
  from typing import Dict, FrozenSet, Generic, List, Type, TypeVar
  import numpy
  import pennylane
  from pennylane.data.base.attribute import DatasetAttribute
  from pennylane.data.base.hdf5 import HDF5Group, h5py
  from pennylane.operation import Operator, Tensor
  from ._wires import wires_to_json
label_desc: Use image node_id 1 for calling the DatasetOperator obj's underlying member method code with example usage: obj.consumes_types(cls) and returns: frozenset