ó
    Óz	iå	  ã            	       óL   • S r SSKJr  SSKJr  SSKJr   SS\S\	S\S	\4S
 jjrg)z&
Circuit synthesis for a QFT circuit.
é    )ÚQuantumCircuit)Úsynth_qft_lineé   )Ú_warn_if_precision_lossÚ
num_qubitsÚdo_swapsÚapproximation_degreeÚreturnc                 ó`   • [        X-
  S-
  5        [        R                  " [        XU5      SS9$ )u_  Construct a circuit for the Quantum Fourier Transform using linear
neighbor connectivity.

The construction is based on Fig 2.b in Fowler et al. [1].

.. note::

    With the default value of ``do_swaps = True``, this synthesis algorithm creates a
    circuit that faithfully implements the QFT operation. When ``do_swaps = False``,
    this synthesis algorithm creates a circuit that corresponds to "QFT-with-reversal":
    applying the QFT and reversing the order of its output qubits.

Args:
    num_qubits: The number of qubits on which the Quantum Fourier Transform acts.
    approximation_degree: The degree of approximation (0 for no approximation).
        It is possible to implement the QFT approximately by ignoring
        controlled-phase rotations with the angle beneath a threshold. This is discussed
        in more detail in https://arxiv.org/abs/quant-ph/9601018 or
        https://arxiv.org/abs/quant-ph/0403071.
    do_swaps: Whether to synthesize the "QFT" or the "QFT-with-reversal" operation.

Returns:
    A circuit implementing the QFT operation.

References:
    1. A. G. Fowler, S. J. Devitt, and L. C. L. Hollenberg,
       *Implementation of Shor's algorithm on a linear nearest neighbour qubit array*,
       Quantum Info. Comput. 4, 4 (July 2004), 237â€“251.
       `arXiv:quant-ph/0402196 [quant-ph] <https://arxiv.org/abs/quant-ph/0402196>`_
r   T)Úlegacy_qubits)r   r   Ú_from_circuit_dataÚ_synth_qft_line)r   r   r	   s      Ú`/home/james-whalen/.local/lib/python3.13/site-packages/qiskit/synthesis/qft/qft_decompose_lnn.pyr   r      s6   € ôB ˜JÑ=ÀÑAÔBä×,Ò,ä˜
Ð.BÓCØñð ó    N)Tr   )
Ú__doc__Úqiskit.circuitr   Ú qiskit._accelerate.synthesis.qftr   r   Úqft_decompose_fullr   ÚintÚbool© r   r   Ú<module>r      sA   ðñõ *Ý Nå 7ð IJñ'Øð'Ø#ð'ØBEð'àö'r   