class_docstr: AQFT(order, wires)
  Apply an approximate quantum Fourier transform (AQFT).
  
  The `AQFT <https://arxiv.org/abs/1803.04933>`_ method helps to reduce the number of ``ControlledPhaseShift`` operations required
  for QFT by only using a maximum of ``order`` number of ``ControlledPhaseShift`` gates per qubit.
  
  .. seealso:: :class:`~.QFT`
  
  Args:
      order (int): the order of approximation
      wires (int or Iterable[Number, str]]): the wire(s) the operation acts on
  
  **Example**
  
  The approximate quantum Fourier transform is applied by specifying the corresponding wires and
  the order of approximation:
  
  .. code-block::
  
      wires = 3
      dev = qml.device('default.qubit', wires=wires)
  
      @qml.qnode(dev)
      def circuit_aqft():
          qml.PauliX(0)
          qml.Hadamard(1)
          qml.AQFT(order=1,wires=range(wires))
          return qml.state()
  
  
  .. code-block:: pycon
  
      >>> circuit_aqft()
      [ 0.5 +0.j   -0.25-0.25j  0.  +0.j   -0.25+0.25j  0.5 +0.j   -0.25-0.25j   0.  +0.j   -0.25+0.25j]
  
  
  .. details::
      :title: Usage Details
  
      **Order**
  
      The order of approximation must be a whole number less than :math:`n-1`
      where :math:`n` is the number of wires the operation is being applied on.
      This creates four cases for different ``order`` values:
  
      * ``order`` :math:`< 0`
          This will raise a ``ValueError``
  
      * ``order`` :math:`= 0`
          This will warn the user that only a Hadamard transform is being applied.
  
          .. code-block::
  
              @qml.qnode(dev)
              def circ():
                  qml.AQFT(order=0, wires=range(6))
                  return qml.probs()
  
          The resulting circuit is:
  
          >>> print(qml.draw(circ, expansion_strategy='device')())
          UserWarning: order=0, applying Hadamard transform warnings.warn("order=0, applying Hadamard transform")
          0: ──H─╭SWAP─────────────┤ ╭Probs
          1: ──H─│─────╭SWAP───────┤ ├Probs
          2: ──H─│─────│─────╭SWAP─┤ ├Probs
          3: ──H─│─────│─────╰SWAP─┤ ├Probs
          4: ──H─│─────╰SWAP───────┤ ├Probs
          5: ──H─╰SWAP─────────────┤ ╰Probs
  
      * :math:`0 <` ``order`` :math:`< n-1`
          This is the intended AQFT use case.
  
          .. code-block::
  
              @qml.qnode(dev)
              def circ():
                  qml.AQFT(order=2, wires=range(4))
                  return qml.probs()
  
          The resulting circuit is:
  
          >>> print(qml.draw(circ, expansion_strategy='device')())
          0: ──H─╭Rϕ(1.57)─╭Rϕ(0.79)────────────────────────────────────────╭SWAP───────┤ ╭Probs
          1: ────╰●────────│──────────H─╭Rϕ(1.57)─╭Rϕ(0.79)─────────────────│─────╭SWAP─┤ ├Probs
          2: ──────────────╰●───────────╰●────────│──────────H─╭Rϕ(1.57)────│─────╰SWAP─┤ ├Probs
          3: ─────────────────────────────────────╰●───────────╰●─────────H─╰SWAP───────┤ ╰Probs
  
      * ``order`` :math:`\geq n-1`
          Using the QFT class is recommended in this case. The AQFT operation here is
          equivalent to QFT.
code: def num_params(self):
      return 0
  
file_path: pennylane/pennylane/templates/subroutines/aqft.py
imports: import warnings
  import numpy
  import pennylane
  from pennylane.operation import Operation
label_desc: Use image node_id 2 for calling the AQFT obj's underlying member method code with example usage: obj.num_params() and returns: int