class_docstr: Unit tests for the ParametrizedEvolution class.
class_docstr_tok: ["Unit","tests","for","the","ParametrizedEvolution","class","."]
docstr: Test that the flag dense updated correctly if set when calling ParametrizedEvolution
docstr_tok: ["Test","that","the","flag","dense","updated","correctly","if","set","when","calling","ParametrizedEvolution"]
code: def test_updating_dense_in_call(self, dense_bool):
      """Test that the flag dense updated correctly if set when calling ParametrizedEvolution"""
      ops = [qml.PauliX(0), qml.PauliY(1), qml.PauliZ(2)]
      coeffs = [1, 2, 3]
      H = ParametrizedHamiltonian(coeffs, ops)
      ev = ParametrizedEvolution(H=H, params=None, t=2)
      assert ev.dense is False
      assert ev(params=[], t=2, dense=dense_bool).dense is dense_bool
  
      ev2 = ParametrizedEvolution(H=H, params=None, t=2, dense=True)
      assert ev2.dense is True
      assert ev2(params=[], t=2, dense=dense_bool).dense is dense_bool
  
      ev3 = ParametrizedEvolution(H=H, params=None, t=2, dense=False)
      assert ev3.dense is False
      assert ev3(params=[], t=2, dense=dense_bool).dense is dense_bool
  
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 3 for calling the TestInitialization obj's underlying member method code with example usage: obj.test_updating_dense_in_call(dense_bool) without return types