docstr: Test that when executing a ParametrizedEvolution with ``num_wires >= device.num_wires/2``
  and ``return_intermediate=True``, the ``_evolve_state_vector_under_parametrized_evolution``
  method is used.
docstr_tok: ["Test","that","when","executing","a","ParametrizedEvolution","with","``","num_wires",">","=","device.num_wires\/2","``","and","``","return_intermediate=True","``",",","the","``","_evolve_state_vector_under_parametrized_evolution","``","method","is","used","."]
code: def test_parametrized_evolution_state_vector_return_intermediate(
      self, mocker
  ):
      """Test that when executing a ParametrizedEvolution with ``num_wires >= device.num_wires/2``
      and ``return_intermediate=True``, the ``_evolve_state_vector_under_parametrized_evolution``
      method is used."""
      import jax.numpy as jnp
  
      H = qml.pulse.ParametrizedHamiltonian([1], [qml.PauliX(0)])
      spy = mocker.spy(qml.math, "einsum")
  
      phi = jnp.linspace(0.3, 0.7, 7)
      phi_for_RX = phi - phi[0]
      state = jnp.array(
          [[[1.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]]],
          dtype=complex,
      )
      ev = qml.evolve(H, return_intermediate=True)(params=[], t=phi / 2)
      state_ev = apply_operation(ev, state)
      state_rx = apply_operation(qml.RX(phi_for_RX, 0), state)
  
      assert spy.call_count == 2
      assert qml.math.allclose(state_ev, state_rx, atol=1e-6)
  
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 6 for calling the TestApplyParametrizedEvolution obj's underlying member method code with example usage: obj.test_parametrized_evolution_state_vector_return_intermediate(mocker) without return types