class_docstr: Tests that the template defines the correct decomposition.
class_docstr_tok: ["Tests","that","the","template","defines","the","correct","decomposition","."]
docstr: Test the correctness of the Select template output.
docstr_tok: ["Test","the","correctness","of","the","Select","template","output","."]
code: def test_operation_result(
      self, ops, control, expected_gates, n_wires
  ):
      """Test the correctness of the Select template output."""
      dev = qml.device("default.qubit", wires=n_wires)
  
      @qml.qnode(dev)
      def circuit1():
          for wire in control:
              qml.Hadamard(wires=wire)
  
          qml.Select(ops, control)
          return qml.state()
  
      @qml.qnode(dev)
      def circuit2():
          for wire in control:
              qml.Hadamard(wires=wire)
          for op in expected_gates:
              qml.apply(op)
          return qml.state()
  
      assert np.allclose(circuit1(), circuit2())
  
imports: import copy
  import pytest
  import numpy
  from pennylane import numpy
  import pennylane
label_desc: Use image node_id 1 for calling the TestSelect obj's underlying member method code with example usage: obj.test_operation_result(ops, control, expected_gates, n_wires) and returns: qml, qml