class_docstr: Tests that the template defines the correct decomposition.
class_docstr_tok: ["Tests","that","the","template","defines","the","correct","decomposition","."]
docstr: Test that the correct gates are applied on a single wire.
docstr_tok: ["Test","that","the","correct","gates","are","applied","on","a","single","wire","."]
code: def test_correct_gates_single_wire(self, batch_dim):
      """Test that the correct gates are applied on a single wire."""
      shape = (3,) if batch_dim is None else (batch_dim, 3)
      weights = np.arange(np.prod(shape), dtype=float).reshape(shape)
  
      op = qml.ArbitraryUnitary(weights, wires=[0])
      queue = op.decomposition()
  
      for gate in queue:
          assert gate.name == "PauliRot"
          assert gate.wires.tolist() == [0]
  
      pauli_words = ["X", "Y", "Z"]
  
      for i, op in enumerate(queue):
          assert np.allclose(op.data[0], weights[..., i])
          assert op.hyperparameters["pauli_word"] == pauli_words[i]
  
imports: import pytest
  import numpy
  from pennylane import numpy
  import pennylane
  from pennylane.templates.subroutines.arbitrary_unitary import _all_pauli_words_but_identity, _tuple_to_word, _n_k_gray_code
label_desc: Use image node_id 1 for calling the TestDecomposition obj's underlying member method code with example usage: obj.test_correct_gates_single_wire(batch_dim) without return types