class_docstr: Test that GroverOperator is applied correctly.
class_docstr_tok: ["Test","that","GroverOperator","is","applied","correctly","."]
docstr: Test that apply_operation is correct for GroverOperator for all dispatch branches
  when applying it to all wires of a state.
docstr_tok: ["Test","that","apply_operation","is","correct","for","GroverOperator","for","all","dispatch","branches","when","applying","it","to","all","wires","of","a","state","."]
code: def test_correctness_full_wires(
      self, op_wires, state_wires, batch_dim
  ):
      """Test that apply_operation is correct for GroverOperator for all dispatch branches
      when applying it to all wires of a state."""
      np.random.seed(752)
      batched = batch_dim is not None
      shape = (
          [batch_dim] + [2] * state_wires
          if batched
          else [2] * state_wires
      )
      flat_shape = (
          (batch_dim, 2**state_wires)
          if batched
          else (2**state_wires,)
      )
      state = np.random.random(shape) + 1j * np.random.random(shape)
  
      op = qml.GroverOperator(list(range(op_wires)))
      out = apply_operation(
          op, state, is_state_batched=batched, debugger=None
      )
      # Double transpose to accomodate for batching
      expected_via_mat = (
          op.matrix() @ state.reshape(flat_shape).T
      ).T.reshape(shape)
      expected_via_kernel = self.grover_kernel_full_wires(
          state, op.wires, batched
      )
      assert np.allclose(out, expected_via_mat)
      assert np.allclose(out, expected_via_kernel)
  
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 4 for calling the TestApplyGroverOperator obj's underlying member method code with example usage: obj.test_correctness_full_wires(op_wires, state_wires, batch_dim) without return types