class_docstr: Tests that the template defines the correct decomposition.
class_docstr_tok: ["Tests","that","the","template","defines","the","correct","decomposition","."]
docstr: Unit test checking that compute_decomposition and decomposition work as expected.
docstr_tok: ["Unit","test","checking","that","compute_decomposition","and","decomposition","work","as","expected","."]
code: def test_decomposition(self, ops, control, expected_gates):
      """Unit test checking that compute_decomposition and decomposition work as expected."""
      op = qml.Select(ops, control=control)
      select_decomposition = op.decomposition()
      select_compute_decomposition = op.compute_decomposition(
          ops, control
      )
  
      assert all(
          qml.equal(op1, op2)
          for op1, op2 in zip(select_decomposition, expected_gates)
      )
      assert all(
          qml.equal(op1, op2)
          for op1, op2 in zip(
              select_compute_decomposition, expected_gates
          )
      )
  
imports: import copy
  import pytest
  import numpy
  from pennylane import numpy
  import pennylane
label_desc: Use image node_id 3 for calling the TestSelect obj's underlying member method code with example usage: obj.test_decomposition(ops, control, expected_gates) without return types