Skip to main content
KetQat

Appearance

Topic · intermediate

Quantum Fourier Transform

The discrete Fourier transform applied to the amplitudes of a quantum register - its definition over the integers modulo N, the product form that gives an O(n^2)-gate circuit on n qubits, the approximate version with O(n log n) gates, and what it can and cannot be used for.

ExpositionMachine-checkedUpdated 2026-12-01 · last verified 2026-12-01

AI-assisted text, machine-checked, not yet reviewed by a person. Citations resolve and an automated pass compared the statements with the cited sources. That is not peer review; check the sources for anything you depend on.

Overview

The quantum Fourier transform (QFT) is the discrete Fourier transform applied to the amplitude vector of a quantum register. On nn qubits it acts on a vector of 2n2^n amplitudes, yet it can be carried out with about n2/2n^2/2 two-qubit gates, against the roughly n2nn 2^n arithmetic operations of the classical fast Fourier transform on the same vector. It is the step that turns a hidden period into a measurable number in Shor's algorithm, and it is the read-out stage of phase estimation.

The comparison with the classical FFT is not a speed-up by itself: the QFT produces a state whose amplitudes are the Fourier coefficients, and a measurement returns one index sampled from their squared magnitudes, not the coefficients. The QFT is useful when the input state has structure, typically periodicity, that makes this one sample informative. The efficient circuit goes back to Coppersmith and Shor; Kitaev gave the general phase-measurement view.

Intuition

A periodic sequence has a Fourier transform concentrated on multiples of the fundamental frequency. Suppose a register holds an equal superposition of ∣x0⟩,∣x0+r⟩,∣x0+2r⟩,…\ket{x_0}, \ket{x_0 + r}, \ket{x_0 + 2r}, \dots. Applying the QFT makes the contributions to most output indices cancel, and leaves large amplitude only near multiples of N/rN/r. One measurement therefore reveals something about rr, whatever the unknown offset x0x_0, because the offset only changes phases, not magnitudes.

The reason the transform is cheap is the product representation: the Fourier transform of a basis state is not entangled. Each output qubit is ∣0⟩+eiθ∣1⟩\ket{0} + e^{i\theta}\ket{1} for an angle determined by a few input bits, so each qubit can be prepared by a Hadamard and a ladder of controlled phase rotations. The lesson The quantum Fourier transform builds the circuit step by step and checks it numerically.

Prerequisites

Tensor products and the computational basis of nn qubits, the circuit model with controlled gates, and binary expansions of integers and fractions. Qubit 0 is the most significant bit throughout.

Mathematical Definitions

DefinitionQuantum Fourier transformEstablished definition

Let N≥1N \ge 1 be an integer and let {∣j⟩:j∈ZN}\{\ket{j} : j \in \Z_N\} be an orthonormal basis of CN\C^N labelled by the integers modulo NN. Write ωN=e2πi/N\omega_N = e^{2\pi i/N}. The quantum Fourier transform over ZN\Z_N is the linear map FNF_N defined on the basis by

FN∣j⟩  =  1N∑k=0N−1ωN jk ∣k⟩,j∈ZN.F_N \ket{j} \;=\; \frac{1}{\sqrt{N}} \sum_{k=0}^{N-1} \omega_N^{\,jk}\, \ket{k}, \qquad j \in \Z_N .

Its matrix entries are ⟨k∣FN∣j⟩=ωNjk/N\bra{k} F_N \ket{j} = \omega_N^{jk}/\sqrt{N}. It is unitary: for all j,j′∈ZNj, j' \in \Z_N, ⟨j′∣FN†FN∣j⟩=1N∑kωN(j−j′)k=δjj′\bra{j'} F_N\dagg F_N \ket{j} = \frac{1}{N}\sum_{k} \omega_N^{(j-j')k} = \delta_{jj'}, because a sum of all NN-th powers of an NN-th root of unity other than 1 vanishes. The inverse is FN†∣k⟩=N−1/2∑jωN−jk∣j⟩F_N\dagg \ket{k} = N^{-1/2} \sum_j \omega_N^{-jk} \ket{j}.

On amplitudes, FN∑jxj∣j⟩=∑kyk∣k⟩F_N \sum_j x_j \ket{j} = \sum_k y_k \ket{k} with yk=N−1/2∑jωNjkxjy_k = N^{-1/2}\sum_j \omega_N^{jk} x_j: the classical discrete Fourier transform of the vector xx, with the sign convention e+2πijk/Ne^{+2\pi i jk/N} and unitary normalisation (many numerical libraries use e−2πijk/Ne^{-2\pi i jk/N} and no normalisation in the forward direction).

For N=2N = 2, F2=HF_2 = H, the Hadamard gate. More generally the Fourier transform over a finite abelian group G=ZN1×⋯×ZNrG = \Z_{N_1} \times \dots \times \Z_{N_r} is FN1⊗⋯⊗FNrF_{N_1} \otimes \dots \otimes F_{N_r}; over Z2 n\Z_2^{\,n} it is H⊗nH^{\otimes n}, which is not the same map as F2nF_{2^n} over the cyclic group Z2n\Z_{2^n}.

When N=2nN = 2^n the space is that of nn qubits and jj is read in binary with qubit 0 as the most significant bit. Efficient circuits exist for N=2nN = 2^n (see the product representation); for arbitrary NN there are polynomial-size circuits approximating FNF_N to any accuracy (Kitaev) and exact ones (Mosca and Zalka). The transform over ZN\Z_N with NN a power of 2 is the one used in Shor's algorithm and in Coppersmith's analysis; a textbook treatment is Chapter 5 of Nielsen and Chuang.

EquationProduct representation of the quantum Fourier transformEstablished result
F2n∣j1j2⋯jn⟩=⨂ℓ=1n∣0⟩+e2πi 0.jn−ℓ+1⋯jn∣1⟩2F_{2^n}\ket{j_1 j_2 \cdots j_n} = \bigotimes_{\ell=1}^{n} \frac{\ket{0} + e^{2\pi i\, 0.j_{n-\ell+1} \cdots j_n}\ket{1}}{\sqrt{2}}

For every n≥1n \ge 1 and every j∈{0,…,2n−1}j \in \{0, \dots, 2^n - 1\},

F2n∣j⟩  =  ⨂ℓ=1n∣0⟩+e2πi j/2ℓ∣1⟩2  =  ⨂ℓ=1n∣0⟩+e2πi 0.jn−ℓ+1⋯jn∣1⟩2.F_{2^n}\ket{j} \;=\; \bigotimes_{\ell=1}^{n} \frac{\ket{0} + e^{2\pi i\, j/2^{\ell}}\ket{1}}{\sqrt{2}} \;=\; \bigotimes_{\ell=1}^{n} \frac{\ket{0} + e^{2\pi i\, 0.j_{n-\ell+1} \cdots j_n}\ket{1}}{\sqrt{2}} .

The most significant output qubit (ℓ=1\ell = 1) depends only on the last input bit (e2πi 0.jn=(−1)jne^{2\pi i\, 0.j_n} = (-1)^{j_n}), and the least significant one (ℓ=n\ell = n) on all of them. Read from right to left, the formula is a recipe: the factor for output qubit ℓ\ell is a Hadamard on bit jn−ℓ+1j_{n-\ell+1} followed by phase rotations conditioned on the less significant bits jn−ℓ+2,…,jnj_{n-\ell+2}, \dots, j_n. It is used to build the QFT circuit and to see why phase estimation works. The form is standard; it appears in Cleve, Ekert, Macchiavello and Mosca and in Section 5.1 of Nielsen and Chuang.

Holds when
  • N=2nN = 2^n; j=∑m=1njm2n−mj = \sum_{m=1}^{n} j_m 2^{n-m} with j1j_1 the most significant bit, held by qubit 0 in the big-endian convention.
  • The tensor factor with index ℓ\ell sits on the ℓ\ell-th output qubit counted from the most significant one.
  • Binary fraction notation 0.jaja+1⋯jn=∑m=anjm 2−(m−a+1)0.j_a j_{a+1} \cdots j_n = \sum_{m=a}^{n} j_m\, 2^{-(m-a+1)}.
Proof · Proof of the product representation of the QFT

Write the output index as k=∑ℓ=1nkℓ 2n−ℓk = \sum_{\ell=1}^{n} k_\ell\, 2^{n-\ell} with kℓ∈{0,1}k_\ell \in \{0,1\}, so that ∣k⟩=∣k1⟩⊗⋯⊗∣kn⟩\ket{k} = \ket{k_1}\otimes\cdots\otimes\ket{k_n}. Then jk/2n=∑ℓjkℓ/2ℓjk/2^n = \sum_{\ell} j k_\ell / 2^{\ell} and the phase factorises:

F2n∣j⟩=12n/2∑k1,…,kn∈{0,1}  ∏ℓ=1ne2πi jkℓ/2ℓ ∣k1⟩⊗⋯⊗∣kn⟩=⨂ℓ=1n12∑kℓ∈{0,1}e2πi jkℓ/2ℓ∣kℓ⟩.F_{2^n}\ket{j} = \frac{1}{2^{n/2}} \sum_{k_1, \dots, k_n \in \{0,1\}} \;\prod_{\ell=1}^{n} e^{2\pi i\, j k_\ell / 2^{\ell}} \, \ket{k_1}\otimes\cdots\otimes\ket{k_n} = \bigotimes_{\ell=1}^{n} \frac{1}{\sqrt 2}\sum_{k_\ell \in\{0,1\}} e^{2\pi i\, j k_\ell/2^{\ell}} \ket{k_\ell} .

The last step is the distributive law: a sum over all bit strings of a product of terms each depending on one bit is the product of the single-bit sums. Each factor is (∣0⟩+e2πi j/2ℓ∣1⟩)/2(\ket{0} + e^{2\pi i\, j/2^{\ell}}\ket{1})/\sqrt{2}, which is the first form.

For the second form, only j/2ℓj/2^{\ell} modulo 1 matters. With j=∑m=1njm2n−mj = \sum_{m=1}^{n} j_m 2^{n-m},

j2ℓ=∑m=1njm 2 n−m−ℓ=∑m≤n−ℓjm 2 n−m−ℓ⏟∈ Z  +  ∑m=n−ℓ+1njm 2−(m−n+ℓ).\frac{j}{2^{\ell}} = \sum_{m=1}^{n} j_m\, 2^{\,n-m-\ell} = \underbrace{\sum_{m \le n-\ell} j_m\, 2^{\,n-m-\ell}}_{\in\ \Z} \;+\; \sum_{m = n-\ell+1}^{n} j_m\, 2^{-(m-n+\ell)} .

The first sum is an integer and contributes e2πi⋅integer=1e^{2\pi i \cdot \text{integer}} = 1; the second is 0.jn−ℓ+1jn−ℓ+2⋯jn0.j_{n-\ell+1} j_{n-\ell+2}\cdots j_n by the definition of the binary fraction (its first digit jn−ℓ+1j_{n-\ell+1} has weight 2−12^{-1}). This proves the formula. The argument follows section 5.1 of Nielsen and Chuang.

Theorems

TheoremError bound for the approximate quantum Fourier transformEstablished result

For an integer bb with 1≤b≤n1 \le b \le n, let F~(b)\tilde F^{(b)} be the unitary implemented by the QFT circuit on nn qubits after every controlled-RkR_k with k>bk > b is deleted. Then

∥F2n−F~(b)∥  ≤  ∑k=b+1n(n−k+1) 2sin⁡ ⁣π2k  <  2πn2b.\big\lVert F_{2^n} - \tilde F^{(b)} \big\rVert \;\le\; \sum_{k=b+1}^{n} (n-k+1)\, 2\sin\!\frac{\pi}{2^{k}} \;<\; \frac{2\pi n}{2^{b}} .

Consequently, for every input state the outcome distributions of a computational-basis measurement after F2nF_{2^n} and after F~(b)\tilde F^{(b)} differ by less than 2πn/2b2\pi n / 2^{b} in total variation distance. Choosing b=⌈log⁡2(2πn/ε)⌉b = \lceil \log_2 (2\pi n/\varepsilon) \rceil (if this exceeds nn, nothing is deleted) gives error at most ε\varepsilon with at most n(b−1)n(b-1) controlled rotations, that is O(nlog⁡(n/ε))O(n \log(n/\varepsilon)) gates.

Truncating the small rotations was proposed by Coppersmith and analysed, including under decoherence, by Barenco, Ekert, Suominen and Törmä; the bound above is the elementary one obtained from the triangle inequality, and those papers give sharper estimates. Cleve and Watrous give circuits of size O(nlog⁡(n/ε))O(n \log(n/\varepsilon)) and depth O(log⁡n+log⁡log⁡(1/ε))O(\log n + \log\log(1/\varepsilon)) for the same accuracy, and an Ω(log⁡n)\Omega(\log n) depth lower bound at constant error.

Holds when
  • N=2nN = 2^n and the exact circuit is the standard QFT circuit with controlled gates Rk=diag⁡(1,e2πi/2k)R_k = \operatorname{diag}(1, e^{2\pi i/2^k}), 2≤k≤n2 \le k \le n.
  • Error is measured in the operator norm; all remaining gates are exact.
Proof · Proof of the approximate QFT error bound

Step 1: errors add. Let U=UT⋯U1U = U_T \cdots U_1 and V=VT⋯V1V = V_T \cdots V_1 be products of unitaries. Then

U−V=∑t=1TUT⋯Ut+1 (Ut−Vt) Vt−1⋯V1,U - V = \sum_{t=1}^{T} U_T \cdots U_{t+1}\, (U_t - V_t)\, V_{t-1} \cdots V_1 ,

because the sum telescopes. Unitaries have norm 1 and the operator norm is submultiplicative, so ∥U−V∥≤∑t∥Ut−Vt∥\lVert U - V \rVert \le \sum_t \lVert U_t - V_t \rVert.

Step 2: one deleted gate. Deleting a gate is the same as replacing it by the identity. The controlled-RkR_k gate is diag⁡(1,1,1,e2πi/2k)\operatorname{diag}(1, 1, 1, e^{2\pi i/2^k}), so

∥controlled-Rk−I∥=∣e2πi/2k−1∣=2sin⁡π2k≤2π2k.\lVert \text{controlled-}R_k - I \rVert = \lvert e^{2\pi i/2^k} - 1 \rvert = 2 \sin\frac{\pi}{2^{k}} \le \frac{2\pi}{2^{k}} .

Step 3: count. In the QFT circuit, stage mm uses RkR_k for 2≤k≤n−m+12 \le k \le n-m+1, so RkR_k occurs in the n−k+1n - k + 1 stages m=1,…,n−k+1m = 1, \dots, n-k+1. Applying Step 1 with Ut=VtU_t = V_t for every kept gate and Step 2 for every deleted one,

∥F2n−F~(b)∥≤∑k=b+1n(n−k+1) 2sin⁡π2k<2πn∑k=b+1∞2−k=2πn2b.\big\lVert F_{2^n} - \tilde F^{(b)} \big\rVert \le \sum_{k=b+1}^{n} (n-k+1)\, 2 \sin\frac{\pi}{2^{k}} < 2\pi n \sum_{k=b+1}^{\infty} 2^{-k} = \frac{2\pi n}{2^{b}} .

The kept rotations number ∑k=2b(n−k+1)≤n(b−1)\sum_{k=2}^{b} (n-k+1) \le n(b-1).

Step 4: measurement statistics. Let ∣ψ⟩\ket{\psi} be any unit vector, ∣u⟩=F2n∣ψ⟩\ket{u} = F_{2^n}\ket{\psi}, ∣v⟩=F~(b)∣ψ⟩\ket{v} = \tilde F^{(b)}\ket{\psi}, and δ=∥∣u⟩−∣v⟩∥≤∥F2n−F~(b)∥\delta = \lVert \ket{u} - \ket{v} \rVert \le \lVert F_{2^n} - \tilde F^{(b)} \rVert. The trace distance of two pure states is 1−∣⟨u∣v⟩∣2\sqrt{1 - \lvert\braket{u}{v}\rvert^2}, and

1−∣⟨u∣v⟩∣2=(1−∣⟨u∣v⟩∣)(1+∣⟨u∣v⟩∣)≤2 (1−Re⁡⟨u∣v⟩)=δ2,1 - \lvert\braket{u}{v}\rvert^2 = (1 - \lvert\braket{u}{v}\rvert)(1 + \lvert\braket{u}{v}\rvert) \le 2\,(1 - \operatorname{Re}\braket{u}{v}) = \delta^2 ,

so the trace distance is at most δ\delta. The total variation distance between the outcome distributions of any measurement is at most the trace distance (it is the trace distance of the post-measurement classical states, and trace distance does not increase under channels). For a mixed input the same bound follows by convexity. Step 1 and Step 4 are the standard error-accumulation arguments of section 4.5.3 of Nielsen and Chuang.

Worked Examples

Two qubits by matrix and by product form

For n=2n = 2, ω4=i\omega_4 = i and

F4=12(11111i−1−i1−11−11−i−1i).F_4 = \frac12 \begin{pmatrix} 1 & 1 & 1 & 1 \\ 1 & i & -1 & -i \\ 1 & -1 & 1 & -1 \\ 1 & -i & -1 & i \end{pmatrix} .

The input ∣1⟩=∣01⟩\ket{1} = \ket{01} has j1=0j_1 = 0, j2=1j_2 = 1. The second column gives F4∣1⟩=12(∣0⟩+i∣1⟩−∣2⟩−i∣3⟩)F_4\ket{1} = \tfrac12(\ket{0} + i\ket{1} - \ket{2} - i\ket{3}). The product form gives, for ℓ=1\ell = 1, the phase e2πi 0.j2=eiπ=−1e^{2\pi i\, 0.j_2} = e^{i\pi} = -1 and, for ℓ=2\ell = 2, the phase e2πi 0.j1j2=e2πi/4=ie^{2\pi i\, 0.j_1 j_2} = e^{2\pi i/4} = i:

∣0⟩−∣1⟩2⊗∣0⟩+i∣1⟩2=12(∣00⟩+i∣01⟩−∣10⟩−i∣11⟩),\frac{\ket{0} - \ket{1}}{\sqrt 2} \otimes \frac{\ket{0} + i\ket{1}}{\sqrt 2} = \tfrac12\left(\ket{00} + i\ket{01} - \ket{10} - i\ket{11}\right),

the same vector. Note that F4≠H⊗HF_4 \ne H \otimes H: the Hadamard transform would give 12(∣00⟩−∣01⟩+∣10⟩−∣11⟩)\tfrac12(\ket{00} - \ket{01} + \ket{10} - \ket{11}).

How much truncation does Shor-scale factoring allow?

Take an n=4096n = 4096-qubit register (the size of the phase register for a 2048-bit modulus with the textbook choice 2×20482 \times 2048) and a target error ε=10−3\varepsilon = 10^{-3}. The error bound asks for b=⌈log⁡2(2π⋅4096/10−3)⌉=⌈24.62⌉=25b = \lceil \log_2(2\pi \cdot 4096 / 10^{-3}) \rceil = \lceil 24.62 \rceil = 25, which guarantees error below 2π⋅4096/225≈7.7×10−42\pi \cdot 4096 / 2^{25} \approx 7.7 \times 10^{-4}. The kept controlled rotations are R2,…,R25R_2, \dots, R_{25}, numbering ∑k=225(4097−k)=98,004\sum_{k=2}^{25} (4097 - k) = 98{,}004, compared with 4096⋅4095/2=8,386,5604096 \cdot 4095/2 = 8{,}386{,}560 in the exact circuit: about 1.2 % of them. The deleted gates are rotations by angles below 2π/225≈1.9×10−72\pi/2^{25} \approx 1.9 \times 10^{-7} radians, which no physical device could implement meaningfully anyway.

Algorithms and Implementations

AlgorithmQuantum Fourier transform circuitEstablished result

Gates. HH, and for k≥2k \ge 2 the phase gate Rk=diag⁡(1,e2πi/2k)=P(2π/2k)R_k = \operatorname{diag}(1, e^{2\pi i/2^{k}}) = P(2\pi/2^k) controlled by another qubit. The controlled-RkR_k gate is symmetric in its two qubits: it multiplies ∣11⟩\ket{11} by e2πi/2ke^{2\pi i/2^k} and fixes the other basis states.

Input. nn qubits in a basis state ∣j1j2⋯jn⟩\ket{j_1 j_2 \cdots j_n} (or any superposition, by linearity), qubit mm holding bit jmj_m (qubit mm is the wire labelled qm−1q_{m-1} in the diagram, so q0q_0 holds the most significant bit).

Procedure. For m=1,2,…,nm = 1, 2, \dots, n:

  1. apply HH to qubit mm;
  2. for k=2,…,n−m+1k = 2, \dots, n - m + 1, apply controlled-RkR_k with control qubit m+k−1m + k - 1 and target qubit mm.

Finally reverse the order of the qubits with ⌊n/2⌋\lfloor n/2 \rfloor SWAP gates (qubit mm with qubit n+1−mn + 1 - m).

Quantum circuit on 4 wires (q0, q1, q2, q3). step 1: H on q0. step 2: controlled phase π/2, control q1, target q0. step 3: controlled phase π/4, control q2, target q0. step 4: controlled phase π/8, control q3, target q0. step 5: H on q1. step 6: controlled phase π/2, control q2, target q1. step 7: controlled phase π/4, control q3, target q1. step 8: H on q2. step 9: controlled phase π/2, control q3, target q2. step 10: H on q3. step 11: SWAP q0 and q3. step 12: SWAP q1 and q2.q0q1q2q3HP(π/2)P(π/4)P(π/8)HP(π/2)P(π/4)HP(π/2)H
The four-qubit QFT. Qubit q0 holds the most significant input bit. Each wire receives a Hadamard and then controlled phase rotations from the wires below it; the angle halves with each step down. The two SWAP gates reverse the order of the wires.

Correctness. Consider stage mm. Qubits m+1,…,nm+1, \dots, n have not been touched yet and still hold jm+1,…,jnj_{m+1}, \dots, j_n. The Hadamard maps ∣jm⟩\ket{j_m} to (∣0⟩+e2πi 0.jm∣1⟩)/2(\ket{0} + e^{2\pi i\, 0.j_m}\ket{1})/\sqrt2, since (−1)jm=e2πi jm/2(-1)^{j_m} = e^{2\pi i\, j_m/2}. Controlled-RkR_k with control jm+k−1j_{m+k-1} multiplies the ∣1⟩\ket{1} component by e2πi jm+k−1/2ke^{2\pi i\, j_{m+k-1}/2^{k}}, which appends the digit jm+k−1j_{m+k-1} at position kk of the binary fraction. After the stage, qubit mm is in (∣0⟩+e2πi 0.jmjm+1⋯jn∣1⟩)/2(\ket{0} + e^{2\pi i\, 0.j_m j_{m+1}\cdots j_n}\ket{1})/\sqrt2 and is not touched again. By the product representation this is the factor that belongs on output qubit ℓ=n−m+1\ell = n - m + 1, so after the reversal the register is in F2n∣j⟩F_{2^n}\ket{j}.

Cost. nn Hadamards, ∑m=1n(n−m)=n(n−1)/2\sum_{m=1}^{n} (n - m) = n(n-1)/2 controlled rotations and ⌊n/2⌋\lfloor n/2 \rfloor SWAPs: Θ(n2)\Theta(n^2) gates on nn qubits with no ancillas. The reversal is often omitted and the output wires relabelled instead. The inverse F2n†F_{2^n}\dagg is the same circuit run backwards with every angle negated.

A circuit of this form, together with its truncated version, appears in Coppersmith's 1994 report; the derivation from the product form is that of Cleve, Ekert, Macchiavello and Mosca and section 5.1 of Nielsen and Chuang.

Holds when
  • N=2nN = 2^n; wire q0q_0 (qubit 1 in the procedure) holds the most significant bit of the input index.
  • Exact gates Rk=diag⁡(1,e2πi/2k)R_k = \operatorname{diag}(1, e^{2\pi i/2^k}) and their controlled versions are available.

Semiclassical QFT. When the QFT is followed immediately by a measurement in the computational basis, as in phase estimation and order finding, the controlled rotations can be replaced by measuring one qubit, then applying single-qubit rotations to the remaining qubits conditioned on the classical outcome (Griffiths and Niu). The output distribution is unchanged, and no two-qubit gates are needed for the transform itself. In phase estimation this means each control qubit can be measured as soon as its controlled power has been applied.

Other moduli. For NN not a power of 2, Kitaev gave polynomial-size approximate circuits for the Fourier transform over any finite abelian group, and Mosca and Zalka showed how to make them exact. Order finding does not need them: the transform over Z2t\Z_{2^t} with 2t2^t large enough suffices.

Applications

Computational Complexity

Version Gates Depth Source
Exact, N=2nN = 2^n Θ(n2)\Theta(n^2) O(n)O(n) Coppersmith, Cleve et al.
Approximate, error ε\varepsilon O(nlog⁡(n/ε))O(n\log(n/\varepsilon)) O(n)O(n) Coppersmith, Barenco et al.
Approximate, parallel O(nlog⁡(n/ε))O(n\log(n/\varepsilon)) O(log⁡n+log⁡log⁡(1/ε))O(\log n + \log\log(1/\varepsilon)) Cleve and Watrous
Exact, N=2nN = 2^n, sub-quadratic O(n(log⁡n)2log⁡log⁡n)O(n (\log n)^2 \log\log n) Cleve and Watrous

Cleve and Watrous also prove that constant-error approximations need depth Ω(log⁡n)\Omega(\log n).

Limitations and Common Pitfalls

  • The amplitudes are not output. A QFT followed by measurement yields one sample. Claims that the QFT "computes the Fourier transform exponentially faster" ignore state preparation and read-out.
  • F2nF_{2^n} is not H⊗nH^{\otimes n}. The Hadamard transform is the Fourier transform over the group Z2 n\Z_2^{\,n}, used in Deutsch–Jozsa, Bernstein–Vazirani and Simon; the cyclic transform F2nF_{2^n} is the one used for periods of integer functions.
  • Bit order. The textbook circuit ends with a reversal of the qubits. Omitting the SWAPs is fine only if later code reads the output in reversed order. Libraries that order qubits little-endian also reverse the meaning of the input bits.
  • Sign convention. The QFT uses e+2πijk/Ne^{+2\pi i jk/N}; common numerical FFT routines use e−2πijk/Ne^{-2\pi i jk/N}, so a numerical check compares FNF_N with the inverse FFT scaled by N\sqrt N.
  • Small rotations are not free on a fault-tolerant machine. Each kept rotation by an angle that is not a multiple of π/4\pi/4 must be approximated by a sequence of Clifford and TT gates (Clifford+T synthesis); the truncation reduces both their number and the needed precision.
  • The QFT is rarely the bottleneck. In order finding the controlled modular exponentiation costs far more than the transform; see Shor's algorithm.

Quantum phase estimation, Shor's algorithm, the overview of quantum algorithms, and quantum complexity theory for the role of log-depth Fourier circuits in placing factoring in small-depth classes.

Builds on
Part of

Open in the knowledge graph

Contributions about this record

Nobody has published a contribution about it yet.

Publish a result, reproduction or commentPropose a correction to this page

References

  1. Don Coppersmith (1994). An approximate Fourier transform useful in quantum factoring. IBM Research Report RC 19642 (posted to arXiv in 2002). arXiv:quant-ph/0201067
  2. Peter W. Shor (1997). Polynomial-time algorithms for prime factorization and discrete logarithms on a quantum computer. SIAM Journal on Computing 26(5), 1484-1509. doi:10.1137/S0097539795293172arXiv:quant-ph/9508027
  3. A. Yu. Kitaev (1995). Quantum measurements and the Abelian stabilizer problem. arXiv:quant-ph/9511026
  4. Richard Cleve, Artur Ekert, Chiara Macchiavello, Michele Mosca (1998). Quantum algorithms revisited. Proceedings of the Royal Society A 454, 339-354. doi:10.1098/rspa.1998.0164arXiv:quant-ph/9708016
  5. Adriano Barenco, Artur Ekert, Kalle-Antti Suominen, Päivi Törmä (1996). Approximate quantum Fourier transform and decoherence. Physical Review A 54, 139-146. doi:10.1103/PhysRevA.54.139arXiv:quant-ph/9601018
  6. Richard Cleve, John Watrous (2000). Fast parallel circuits for the quantum Fourier transform. Proceedings of the 41st Annual Symposium on Foundations of Computer Science (FOCS 2000), 526-536. doi:10.1109/SFCS.2000.892140arXiv:quant-ph/0006004
  7. Michele Mosca, Christof Zalka (2004). Exact quantum Fourier transforms and discrete logarithm algorithms. International Journal of Quantum Information 2(1), 91-100. doi:10.1142/S0219749904000109arXiv:quant-ph/0301093
  8. Robert B. Griffiths, Chi-Sheng Niu (1996). Semiclassical Fourier transform for quantum computation. Physical Review Letters 76, 3228-3231. doi:10.1103/PhysRevLett.76.3228
  9. Michael A. Nielsen, Isaac L. Chuang (2010). Quantum Computation and Quantum Information (10th Anniversary Edition). Cambridge University Press. doi:10.1017/CBO9780511976667

Contributors

  • KetQat maintainers · @ketqatConceptualization; Supervision (CRediT roles)
  • Claude (AI drafting assistant)Writing, original draft (CRediT roles)

Review history

  1. Automated source check · Pass · 2026-12-01 · Independent automated verification pass (AI, not the drafting session)

    Topic body only (embedded records carry their own review states). Two-qubit worked example (matrix column, product form, H x H contrast) recomputed; truncation example recomputed (log2(2 pi 4096/1e-3) = 24.62, error 7.67e-4, 98,004 versus 8,386,560 rotations = 1.17 %, angle 1.87e-7). Semiclassical QFT compared with the Griffiths-Niu abstract (arXiv:quant-ph/9511007); complexity table and the Omega(log n) depth bound with the Cleve-Watrous abstract (arXiv:quant-ph/0006004); Kitaev and Mosca-Zalka statements with their abstracts; Coppersmith's circuit with arXiv:quant-ph/0201067. Sign-convention and H^n versus F_(2^n) remarks checked directly.

Revision history

  1. 2026-12-01Content release 2.1.0: 35 more topics, an independent source check of every record, intake hardening (#17)80537b7e
  2. 2026-11-30KetQat Commons: free learning paths, knowledge records, research problems, literature intake (#14)571c9b10

Current revision a7e1e5129cc17e73. Source file knowledge/records/topic/quantum-fourier-transform.md in the content repository (readable there once it is public).