class_docstr: Tests for single-qubit gates being pushed through controlled gates.
class_docstr_tok: ["Tests","for","single-qubit","gates","being","pushed","through","controlled","gates","."]
docstr: Test that gates with no basis specified are ignored.
docstr_tok: ["Test","that","gates","with","no","basis","specified","are","ignored","."]
code: def test_gate_with_no_basis(self, direction):
      """Test that gates with no basis specified are ignored."""
  
      def qfunc():
          qml.PauliX(wires=2)
          qml.ControlledQubitUnitary(
              np.array([[0, 1], [1, 0]]), control_wires=0, wires=2
          )
          qml.PauliX(wires=2)
  
      transformed_qfunc = commute_controlled(qfunc, direction=direction)
  
      ops = qml.tape.make_qscript(transformed_qfunc)().operations
  
      names_expected = ["PauliX", "ControlledQubitUnitary", "PauliX"]
      wires_expected = [Wires(2), Wires([0, 2]), Wires(2)]
      compare_operation_lists(ops, names_expected, wires_expected)
  
imports: import pytest
  from utils import compare_operation_lists, check_matrix_equivalence
  import pennylane
  from pennylane import numpy
  from pennylane.wires import Wires
  from pennylane.transforms.optimization import commute_controlled
label_desc: Use image node_id 2 for calling the TestCommuteControlled obj's underlying member method code with example usage: obj.test_gate_with_no_basis(direction) without return types