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 two wires.
docstr_tok: ["Test","that","the","correct","gates","are","applied","on","two","wires","."]
code: def test_correct_gates_two_wires(self, batch_dim):
      """Test that the correct gates are applied on two wires."""
      shape = (15,) if batch_dim is None else (batch_dim, 15)
      weights = np.arange(np.prod(shape), dtype=float).reshape(shape)
  
      op = qml.ArbitraryUnitary(weights, wires=[0, 1])
      queue = op.decomposition()
  
      for gate in queue:
          assert gate.name == "PauliRot"
          assert gate.wires.tolist() == [0, 1]
  
      pauli_words = [
          "XI",
          "YI",
          "ZI",
          "ZX",
          "IX",
          "XX",
          "YX",
          "YY",
          "ZY",
          "IY",
          "XY",
          "XZ",
          "YZ",
          "ZZ",
          "IZ",
      ]
  
      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 2 for calling the TestDecomposition obj's underlying member method code with example usage: obj.test_correct_gates_two_wires(batch_dim) without return types