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 if a sequence of single-qubit gates that all cancel yields no operations.
docstr_tok: ["Test","if","a","sequence","of","single-qubit","gates","that","all","cancel","yields","no","operations","."]
code: def test_single_qubit_cancelled_fusion(self):
      """Test if a sequence of single-qubit gates that all cancel yields no operations."""
  
      def qfunc():
          qml.RZ(0.1, wires=0)
          qml.RX(0.2, wires=0)
          qml.RX(-0.2, wires=0)
          qml.RZ(-0.1, wires=0)
  
      transformed_qfunc = single_qubit_fusion(qfunc, atol=1e-7)
      transformed_ops = qml.tape.make_qscript(
          transformed_qfunc
      )().operations
      assert len(transformed_ops) == 0
  
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 4 for calling the TestSingleQubitFusion obj's underlying member method code with example usage: obj.test_single_qubit_cancelled_fusion() without return types