class_docstr: Unit tests for the ParametrizedEvolution class.
class_docstr_tok: ["Unit","tests","for","the","ParametrizedEvolution","class","."]
docstr: Test that the label displays correctly with and without decimal and base_label
docstr_tok: ["Test","that","the","label","displays","correctly","with","and","without","decimal","and","base_label"]
code: def test_label(self, params):
      """Test that the label displays correctly with and without decimal and base_label"""
      H = (
          qml.PauliX(1)
          + qml.pulse.constant * qml.PauliY(0)
          + np.polyval * qml.PauliY(1)
          + np.polyval * qml.PauliY(1)
      )
      op = qml.evolve(H)(params, 2)
      cache = {"matrices": []}
  
      assert op.label() == "Parametrized\nEvolution"
      assert op.label(decimals=2) == "Parametrized\nEvolution"
      assert (
          op.label(decimals=2, cache=cache)
          == "Parametrized\nEvolution\n(p=[0.20,M0,M1], t=[0. 2.])"
      )
      assert op.label(base_label="my_label") == "my_label"
      assert (
          op.label(base_label="my_label", decimals=2, cache=cache)
          == "my_label\n(p=[0.20,M0,M1], t=[0. 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 14 for calling the TestInitialization obj's underlying member method code with example usage: obj.test_label(params) without return types