class_docstr: Unit tests for the ParametrizedEvolution class.
class_docstr_tok: ["Unit","tests","for","the","ParametrizedEvolution","class","."]
docstr: Test that a parametrized evolution has ``has_matrix=True`` only when `t` and `params` are
  defined.
docstr_tok: ["Test","that","a","parametrized","evolution","has","``","has_matrix=True","``","only","when","`","t","`","and","`","params","`","are","defined","."]
code: def test_has_matrix(self):
      """Test that a parametrized evolution has ``has_matrix=True`` only when `t` and `params` are
      defined."""
      ops = [qml.PauliX(0), qml.PauliY(1)]
      coeffs = [1, 2]
      H = ParametrizedHamiltonian(coeffs, ops)
      ev = ParametrizedEvolution(H=H)
      assert ev.has_matrix is False
      new_ev = ev(params=[], t=3)
      assert new_ev.has_matrix is True
  
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 11 for calling the TestInitialization obj's underlying member method code with example usage: obj.test_has_matrix() without return types