class_docstr: A symbolic operator representing the exponential of a operator.
  
  Args:
      base (~.operation.Operator): The Operator to be exponentiated
      coeff=1 (Number): A scalar coefficient of the operator.
      num_steps (int): The number of steps used in the decomposition of the exponential operator,
          also known as the Trotter number. If this value is `None` and the Suzuki-Trotter
          decomposition is needed, an error will be raised.
      id (str): id for the Exp operator. Default is None.
  
  **Example**
  
  This symbolic operator can be used to make general rotation operators:
  
  >>> x = np.array(1.23)
  >>> op = Exp( qml.PauliX(0), -0.5j * x)
  >>> qml.math.allclose(op.matrix(), qml.RX(x, wires=0).matrix())
  True
  
  This can even be used for more complicated generators:
  
  >>> t = qml.PauliX(0) @ qml.PauliX(1) + qml.PauliY(0) @ qml.PauliY(1)
  >>> isingxy = Exp(t, 0.25j * x)
  >>> qml.math.allclose(isingxy.matrix(), qml.IsingXY(x, wires=(0,1)).matrix())
  True
  
  If the coefficient is purely imaginary and the base operator is Hermitian, then
  the gate can be used in a circuit, though it may not be supported by the device and
  may not be differentiable.
  
  >>> @qml.qnode(qml.device('default.qubit', wires=1))
  ... def circuit(x):
  ...     Exp(qml.PauliX(0), -0.5j * x)
  ...     return qml.expval(qml.PauliZ(0))
  >>> print(qml.draw(circuit)(1.23))
  0: ──Exp─┤  <Z>
  
  If the base operator is Hermitian and the coefficient is real, then the ``Exp`` operator
  can be measured as an observable:
  
  >>> obs = Exp(qml.PauliZ(0), 3)
  >>> @qml.qnode(qml.device('default.qubit', wires=1))
  ... def circuit():
  ...     return qml.expval(obs)
  >>> circuit()
  tensor(20.08553692, requires_grad=True)
docstr: Generator of an operator that is in single-parameter-form.
  
  For example, for operator
  
  .. math::
  
      U(\phi) = e^{i\phi (0.5 Y + Z\otimes X)}
  
  we get the generator
  
  >>> U.generator()
    (0.5) [Y0]
  + (1.0) [Z0 X1]
docstr_tok: ["Generator","of","an","operator","that","is","in","single-parameter-form",".","For","example",",","for","operator","..","math",":",":","U","(","\\phi",")","=","e^","{","i\\phi","(","0.5","Y","+","Z\\otimes","X",")","}","we","get","the","generator",">",">",">","U.generator","(",")","(","0.5",")","[","Y0","]","+","(","1.0",")","[","Z0","X1","]"]
code: def generator(self):
      r"""Generator of an operator that is in single-parameter-form.
  
      For example, for operator
  
      .. math::
  
          U(\phi) = e^{i\phi (0.5 Y + Z\otimes X)}
  
      we get the generator
  
      >>> U.generator()
        (0.5) [Y0]
      + (1.0) [Z0 X1]
  
      """
      if self.base.is_hermitian and not np.real(self.coeff):
          return self.base
  
      raise GeneratorUndefinedError(
          f"Exponential with coefficient {self.coeff} and base operator {self.base} does not appear to have a "
          f"generator. Consider using op.simplify() to simplify before finding the generator, or define the operator "
          f"in the form exp(-ixG) through the Evolution class."
      )
  
imports: from typing import List
  from warnings import warn
  import numpy
  from scipy.sparse.linalg import expm
  import pennylane
  from pennylane import math
  from pennylane.math import expand_matrix
  from pennylane.operation import AnyWires, DecompositionUndefinedError, GeneratorUndefinedError, Operation, Operator, OperatorPropertyUndefined, Tensor
  from pennylane.ops.qubit import Hamiltonian
  from pennylane.wires import Wires
  from .sprod import SProd
  from .sum import Sum
  from .symbolicop import ScalarSymbolicOp
label_desc: Use image node_id 25 for calling the Exp obj's underlying member method code with example usage: obj.generator() and returns: self