code: def test_decomposition_matrix(n_wires):
      """Test that the decomposition and the matrix match."""
      wires = list(range(n_wires))
      op = qml.GroverOperator(wires)
      mat1 = op.matrix()
      mat2 = qml.matrix(qml.tape.QuantumScript(op.decomposition()))
      assert np.allclose(mat1, mat2)
  
file_path: pennylane/tests/templates/test_subroutines/test_grover.py
imports: import functools
  import itertools
  import pytest
  import numpy
  import pennylane
  from pennylane.ops import Hadamard, PauliZ, MultiControlledX
label_desc: Use image node_id 13 for calling a global function with example usage: test_decomposition_matrix(n_wires) without return types