docstr: Test that applying a ParametrizedEvolution operating on less
  than half of the wires in the state uses the default function to evolve
  the matrix
docstr_tok: ["Test","that","applying","a","ParametrizedEvolution","operating","on","less","than","half","of","the","wires","in","the","state","uses","the","default","function","to","evolve","the","matrix"]
code: def test_large_state_small_matrix_evolves_matrix(self, mocker):
      """Test that applying a ParametrizedEvolution operating on less
      than half of the wires in the state uses the default function to evolve
      the matrix"""
  
      import jax.numpy as jnp
  
      spy = mocker.spy(qml.math, "einsum")
  
      initial_state = np.array(
          [
              [0.04624539 + 0.3895457j, 0.22399401 + 0.53870339j],
              [-0.483054 + 0.2468498j, -0.02772249 - 0.45901669j],
          ]
      )
  
      H = time_independent_hamiltonian()
      params = jnp.array([1.0, 2.0])
      t = 0.4
  
      op = qml.pulse.ParametrizedEvolution(H=H, params=params, t=t)
  
      true_mat = qml.math.expm(-1j * qml.matrix(H(params, t=t)) * t)
      U = qml.QubitUnitary(U=true_mat, wires=[0, 1])
  
      new_state = apply_operation(op, initial_state)
      new_state_expected = apply_operation(U, initial_state)
  
      assert np.allclose(new_state, new_state_expected, atol=0.002)
  
      # seems like _evolve_state_vector_under_parametrized_evolution calls
      # einsum twice, and the default apply_operation only once
      assert spy.call_count == 1
  
imports: from functools import reduce
  import pytest
  import numpy
  from scipy.stats import unitary_group
  import pennylane
  from pennylane.operation import _UNSET_BATCH_SIZE, Operation
  from pennylane.devices.qubit.apply_operation import apply_operation, apply_operation_einsum, apply_operation_tensordot
label_desc: Use image node_id 3 for calling the TestApplyParametrizedEvolution obj's underlying member method code with example usage: obj.test_large_state_small_matrix_evolves_matrix(mocker) without return types