class_docstr: Integration tests to verify outputs of compilation pipelines.
class_docstr_tok: ["Integration","tests","to","verify","outputs","of","compilation","pipelines","."]
docstr: Test that running multiple passes produces the correct results.
docstr_tok: ["Test","that","running","multiple","passes","produces","the","correct","results","."]
code: def test_compile_decompose_into_basis_gates(self, wires):
      """Test that running multiple passes produces the correct results."""
  
      qfunc = build_qfunc(wires)
      dev = qml.device("default.qubit", wires=Wires(wires))
  
      qnode = qml.QNode(qfunc, dev)
  
      pipeline = [
          partial(commute_controlled, direction="left"),
          cancel_inverses,
          merge_rotations,
      ]
  
      basis_set = ["CNOT", "RX", "RY", "RZ", "GlobalPhase"]
  
      transformed_qfunc = compile(
          qfunc, pipeline=pipeline, basis_set=basis_set
      )
      transformed_qnode = qml.QNode(transformed_qfunc, dev)
  
      original_result = qnode(0.3, 0.4, 0.5)
      transformed_result = transformed_qnode(0.3, 0.4, 0.5)
      assert np.allclose(original_result, transformed_result)
  
      names_expected = [
          "RZ",
          "RX",
          "RZ",
          "RZ",
          "CNOT",
          "RX",
          "RZ",
          "RY",
          "RZ",
          "RY",
          "CNOT",
          "RY",
          "CNOT",
          "GlobalPhase",
      ]
  
      wires_expected = [
          Wires(wires[0]),
          Wires(wires[0]),
          Wires(wires[0]),
          Wires(wires[2]),
          Wires([wires[2], wires[1]]),
          Wires(wires[0]),
          Wires(wires[1]),
          Wires(wires[2]),
          Wires(wires[2]),
          Wires(wires[2]),
          Wires([wires[1], wires[2]]),
          Wires(wires[2]),
          Wires([wires[1], wires[2]]),
          Wires([]),
      ]
  
      tansformed_ops = _fuse_global_phases(
          transformed_qnode.qtape.operations
      )
      compare_operation_lists(
          tansformed_ops, names_expected, wires_expected
      )
  
imports: from functools import partial
  import pytest
  from test_optimization.utils import compare_operation_lists
  import pennylane
  from pennylane import numpy
  from pennylane.wires import Wires
  from pennylane.transforms.compile import compile
  from pennylane.transforms import unitary_to_rot
  from pennylane.transforms.optimization import cancel_inverses, commute_controlled, merge_rotations, single_qubit_fusion
  from pennylane.transforms.optimization.optimization_utils import _fuse_global_phases
label_desc: Use image node_id 7 for calling the TestCompileIntegration obj's underlying member method code with example usage: obj.test_compile_decompose_into_basis_gates(wires) without return types