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):
      """Test that the correct gates are applied on a single wire."""
      weights = np.array([0, 1], dtype=float)
  
      op = qml.ArbitraryStatePreparation(weights, wires=[0])
      queue = op.expand().operations
  
      assert queue[0].name == "PauliRot"
  
      assert queue[0].data[0] == weights[0]
      assert queue[0].hyperparameters["pauli_word"] == "X"
      assert queue[0].wires.labels == (0,)
  
      assert queue[1].name == "PauliRot"
      assert queue[1].data[0] == weights[1]
      assert queue[1].hyperparameters["pauli_word"] == "Y"
      assert queue[1].wires.labels == (0,)
  
imports: import pytest
  import numpy
  import pennylane
  from pennylane import numpy
  from pennylane.templates.state_preparations.arbitrary_state_preparation import _state_preparation_pauli_words
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() without return types