class_docstr: Test that sequences of any single-qubit rotations are fully fused.
class_docstr_tok: ["Test","that","sequences","of","any","single-qubit","rotations","are","fully","fused","."]
docstr: Test that a sequence of single-qubit gates all fuse.
docstr_tok: ["Test","that","a","sequence","of","single-qubit","gates","all","fuse","."]
code: def test_single_qubit_full_fusion(self):
      """Test that a sequence of single-qubit gates all fuse."""
  
      def qfunc():
          qml.RZ(0.3, wires=0)
          qml.Hadamard(wires=0)
          qml.Rot(0.1, 0.2, 0.3, wires=0)
          qml.RX(0.1, wires=0)
          qml.SX(wires=0)
          qml.T(wires=0)
          qml.PauliX(wires=0)
  
      transformed_qfunc = single_qubit_fusion(qfunc)
  
      # Compare matrices
      matrix_expected = qml.matrix(qfunc, [0])()
  
      matrix_obtained = qml.matrix(transformed_qfunc, [0])()
      assert check_matrix_equivalence(matrix_expected, matrix_obtained)
  
imports: import pytest
  from utils import compare_operation_lists, check_matrix_equivalence
  from pennylane import numpy
  import pennylane
  from pennylane.wires import Wires
  from pennylane.transforms.optimization import single_qubit_fusion
label_desc: Use image node_id 1 for calling the TestSingleQubitFusion obj's underlying member method code with example usage: obj.test_single_qubit_full_fusion() without return types