class_docstr: Unit tests for the ParametrizedEvolution class.
class_docstr_tok: ["Unit","tests","for","the","ParametrizedEvolution","class","."]
docstr: Test that an error is raised when an ``ParametrizedEvolution`` operator is initialized with a
  ``ParametrizedHamiltonian`` that contains an operator without a matrix defined.
docstr_tok: ["Test","that","an","error","is","raised","when","an","``","ParametrizedEvolution","``","operator","is","initialized","with","a","``","ParametrizedHamiltonian","``","that","contains","an","operator","without","a","matrix","defined","."]
code: def test_evolve_with_operator_without_matrix_raises_error(self):
      """Test that an error is raised when an ``ParametrizedEvolution`` operator is initialized with a
      ``ParametrizedHamiltonian`` that contains an operator without a matrix defined.
      """
      ops = [qml.PauliX(0), MyOp(phi=0, wires=0)]
      coeffs = [1, 2]
      H = ParametrizedHamiltonian(coeffs, ops)
      with pytest.raises(
          ValueError,
          match="All operators inside the parametrized hamiltonian must have a matrix defined",
      ):
          _ = ParametrizedEvolution(H=H, params=[], t=2)
  
imports: from functools import reduce
  import numpy
  import pytest
  import pennylane
  from pennylane.operation import AnyWires
  from pennylane.ops import QubitUnitary
  from pennylane.pulse import ParametrizedEvolution, ParametrizedHamiltonian
  from pennylane.tape import QuantumTape
  from pennylane.devices import DefaultQubit, DefaultQubitLegacy
label_desc: Use image node_id 12 for calling the TestInitialization obj's underlying member method code with example usage: obj.test_evolve_with_operator_without_matrix_raises_error() without return types