Introduces the approximate QFT that drops small-angle controlled rotations, giving O(n log n) gates.
arxiv.org/abs/quant-ph/0201067 ↗Quantum Fourier Transform
The unitary that maps computational basis states to Fourier-basis phase patterns, and the phase-estimation primitive behind Shor's and HHL's speedups.
Atlas stars stay in the public catalog. Saving this entry to your workspace starts an unstarred private copy.
The QFT is the quantum analogue of the discrete Fourier transform, acting on amplitudes rather than a classical vector. It underlies period finding, phase estimation, and several Hamiltonian-simulation techniques.
Circuit & simulation
What this takes and returns
TakesNothingWhat joins here
No input port at this edge: the record publishes no gate sequence and no register, so there is nothing here to read one off — and unlike a declared hole, nothing has been recorded about what belongs here.
Nothing in the Atlas meets this end.
ReturnsNothingWhat joins here
No output port at this edge: the record publishes no gate sequence and no register, so there is nothing here to read one off — and unlike a declared hole, nothing has been recorded about what belongs here.
Nothing in the Atlas meets this end.
This record publishes no gate sequence and no register, so there is nothing here to read an interface off. Absent rather than empty. See all 152 →
Where this sits
This record is named by the layer graph at:
- Phase estimation into an ancilla register Method
Takes A circuit for U that can be applied as controlled U^(2^j), a preparation routine for a state whose overlap with the target eigenvector is not negligible, the number of bits of the phase wanted, and the failure probability that may be tolerated. Returns An estimate of the eigenphase to the requested number of bits, with the failure probability it was obtained at, plus the two costs that actually differ between routes: how many ancillas were held at once, and how many sequential rounds were run.
How it works
The Quantum Fourier Transform on qubits ( basis states) is the unitary
Unlike the classical discrete Fourier transform, which returns a full length- output vector, the QFT acts on the amplitudes of an -qubit register and its output can only be sampled through measurement — it is a resource for building algorithms, not a way to read out a classical spectrum for free.
Circuit structure. The standard decomposition applies, for each qubit (most significant first), a Hadamard followed by controlled phase gates controlled by the less significant qubits, and finishes with a reversal of qubit order (implemented as SWAPs, or by relabeling wires in software). This gives exactly Hadamards and controlled-phase gates: gates total. Coppersmith's approximate QFT drops controlled rotations with angle smaller than for a cutoff , reducing the gate count to while introducing only exponentially small error for many downstream uses (period finding, phase estimation).
Small worked instance. Take () and the input . Every phase factor , so
exactly the state produced by applying to each of the three qubits independently — a directly checkable identity, since no controlled phase can fire when every control qubit is . For , , i.e. the amplitudes trace out the eight 8th roots of unity in order — exactly the classical DFT of a Kronecker delta at index 1.
Where it is used. The QFT (or its inverse) is the last step of quantum phase estimation, the core of Shor's period-finding routine, and a building block for quantum arithmetic and some Hamiltonian-simulation schemes.
Implementation
from qiskit import QuantumCircuit
import numpy as np
def qft(n):
qc = QuantumCircuit(n, name="QFT")
for j in range(n):
qc.h(j)
for k in range(j + 1, n):
qc.cp(np.pi / 2 ** (k - j), k, j)
for i in range(n // 2):
qc.swap(i, n - i - 1)
return qc
qc = QuantumCircuit(3, 3)
qc.append(qft(3), [0, 1, 2])
qc.measure(range(3), range(3))
FINAL_CIRCUIT = qcQuantum vs classical
| Metric | Classical | Quantum |
|---|---|---|
| Operation count | O(N log N) — FFT | O(n²) = O(log²N) |
| Register size | N complex values | n = log₂N qubits |
| Output access | full vector | sampled amplitudes only |
Classical baseline
The classical fast Fourier transform (FFT) computes a full length-N output vector explicitly in O(N log N) arithmetic operations.
Quantum claim
The QFT transforms the amplitudes of an n = log N qubit register with O(n²) gates, but the output is only accessible through sampling, not as a free classical vector.
How to compare
Compare circuit depth, approximation cutoff, state preparation cost, and the actual downstream measurement objective against the classical FFT cost for the same task.
Declared gaps
Nobody has reviewed this record for gaps yet.
Literature & references
Standard textbook derivation of the QFT circuit and its role in phase estimation (Ch. 5).
doi.org/10.1017/cbo9780511976667 ↗