class_docstr: Tests for the IntegerComparator
docstr: Test operator's ``compute_decomposition()`` method.
docstr_tok: ["Test","operator","'s","``","compute_decomposition","(",")","``","method","."]
code: def test_decomposition(self):
      """Test operator's ``compute_decomposition()`` method."""
      with qml.queuing.AnnotatedQueue() as q1:
          qml.IntegerComparator.compute_decomposition(
              2, wires=[0, 1, 2]
          )
      tape1 = qml.tape.QuantumScript.from_queue(q1)
      assert all(
          isinstance(op, qml.MultiControlledX)
          for op in tape1.operations
      )
  
      with qml.queuing.AnnotatedQueue() as q2:
          qml.IntegerComparator.compute_decomposition(
              2, wires=[0, 1, 2], geq=False
          )
      tape2 = qml.tape.QuantumScript.from_queue(q2)
      assert all(
          isinstance(op, qml.MultiControlledX)
          for op in tape2.operations
      )
  
      num_wires = 3
      num_workers = 1
      dev = qml.device("default.qubit", wires=num_wires + num_workers)
  
      @qml.qnode(dev)
      def f(bitstring, tape, geq):
          qml.BasisState(
              bitstring, wires=range(num_wires + num_workers)
          )
          qml.adjoint(
              qml.IntegerComparator(2, wires=(0, 1, 2), geq=geq),
              lazy=False,
          )
          for op in tape.operations:
              op.queue()
          return qml.probs(wires=range(num_wires + num_workers))
  
      for tape, geq in zip([tape1, tape2], [True, False]):
          u = np.array(
              [
                  f(np.array(b), tape, geq)
                  for b in itertools.product(
                      range(2), repeat=num_wires + num_workers
                  )
              ]
          ).T
          assert np.allclose(u, np.eye(2 ** (num_wires + num_workers)))
  
imports: import copy
  import itertools
  import pytest
  import numpy
  import pennylane
  from pennylane.wires import Wires
label_desc: Use image node_id 12 for calling the TestIntegerComparator obj's underlying member method code with example usage: obj.test_decomposition() and returns: qml