class_docstr: Unit tests for the ParametrizedEvolution class.
class_docstr_tok: ["Unit","tests","for","the","ParametrizedEvolution","class","."]
docstr: Test that a warning is raised if the keyword argument complementary is activated
  without return_intermediate being activated.
docstr_tok: ["Test","that","a","warning","is","raised","if","the","keyword","argument","complementary","is","activated","without","return_intermediate","being","activated","."]
code: def test_warns_with_complementary_without_ret_intermediate(self):
      """Test that a warning is raised if the keyword argument complementary is activated
      without return_intermediate being activated."""
      ops = [qml.PauliX(0), qml.PauliY(1)]
      coeffs = [1, 2]
      H = ParametrizedHamiltonian(coeffs, ops)
      with pytest.warns(
          UserWarning, match="The keyword argument complementary"
      ):
          ev = ParametrizedEvolution(
              H=H,
              params=[],
              t=2,
              return_intermediate=False,
              complementary=True,
          )
  
      assert ev.hyperparameters["return_intermediate"] is False
      assert ev.hyperparameters["complementary"] 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 6 for calling the TestInitialization obj's underlying member method code with example usage: obj.test_warns_with_complementary_without_ret_intermediate() without return types