Skip to content
Current section
The Quantum Computing Enthusiast’s Hub
Saved
All sections

All sections

Saved
Skip Learn navigation
Encyclopedia
Topic

Quantum Fourier transform

A unitary transform that maps computational-basis labels to complex phase patterns over a finite cyclic group.

Also called QFT

Edition released Coverage: Overview · Technical

One input, four phases

Prepare two qubits in |01⟩. The four-point quantum Fourier transform gives all four output amplitudes the same magnitude and a different phase.

Four-point QFT of |01⟩, with a positive exponent and the most significant bit on the left
Output|00⟩|01⟩|10⟩|11⟩
Phase0°90°180°270°
Amplitude½i/2−½−i/2
Probability¼¼¼¼
A computational-basis measurement samples one bit string. If further gates act before readout, these relative phases can change the outcome probabilities through interference.

IBM Quantum · transform definition

On this page

Definition and significance

The quantum Fourier transform on N states maps a basis state |x> to N^(-1/2) sum_y exp(2pi i xy/N)|y>. Its role is to convert periodic structure or eigenvalue phases into measurable information. It acts on amplitudes of a quantum state; it does not output an entire classical Fourier spectrum in one measurement.

For N=2^n, the transform has a structured circuit made from Hadamards and controlled phase rotations, with a final bit-order reversal depending on the chosen decomposition. Exact gate count and depth depend on connectivity and conventions.

Mechanism and mathematical treatment

The positive-exponent convention defines F_N. Its inverse F_N dagger uses the negative exponent. Orthogonality follows because sum_y exp(2pi i (x-x')y/N) equals N when x=x' modulo N and zero otherwise. This identity establishes unitarity.

For N=4, F_4=(1/2)[[1,1,1,1],[1,i,-1,-i],[1,-1,1,-1],[1,-i,-1,i]]. The transform is dense even though its circuit has structure. Discarding small controlled rotations gives an approximate QFT; a specified approximation norm is required before its effect on a complete algorithm can be assessed.

Fully worked reference example

Apply F_4 to |1>. The output is (|0>+i|1>-|2>-i|3>)/2. Every computational outcome has probability 1/4, so measuring this register does not reveal four classical Fourier coefficients.

Now consider the periodic input (|0>+|2>)/sqrt(2). Multiplying by F_4 gives (|0>+|2>)/sqrt(2): the y=1 and y=3 amplitudes cancel because 1+(-1)^y=0, while the even y components reinforce. The useful signature is the support on reciprocal-period values. For (|1>+|3>)/sqrt(2), the support is still y=0,2 but the y=2 component has a minus sign, reflecting the shifted origin.

Limitations and common misconceptions

The QFT's polynomial circuit size is not an exponential speedup for every Fourier-transform task. Classical FFT input and output are explicit arrays; quantum amplitude input and sampled output are different interfaces. An algorithm must show how its data is prepared and which limited output statistic solves the intended problem.

Scientific relationships

An inverse transform decodes a finite phase pattern.

Hadamards supply binary Fourier basis changes.

A finite periodic comb with a shifted origin

Work with F_12 using the positive-exponent convention. Consider |psi>=(|1>+|4>+|7>+|10>)/2, a period-three comb shifted by one. The amplitude at y after the transform is exp(2pi i y/12)/sqrt(48) times sum_(k=0)^3 exp(2pi i 3ky/12). The inner geometric sum is four when y is a multiple of four and zero otherwise. The final state is (|0>+exp(2pi i/3)|4>+exp(4pi i/3)|8>)/sqrt(3).

The measurement distribution is uniform over 0,4,8. The input period three produces reciprocal spacing four because the register dimension is twelve. Shifting the comb changes output phases while leaving these probabilities unchanged. This is an exact finite-group statement. It differs from a continuous Fourier transform and from a finite sampled signal whose boundaries do not fit an integer number of periods.

The example also shows why register dimension matters. A twelve-state transform is a mathematical unitary on a twelve-dimensional space. Encoding those labels in four qubits leaves four unused computational states, and a physical implementation must define a unitary action on the entire sixteen-dimensional space or use a suitable subspace construction. One should not silently substitute F_16 and expect the same exact support.

A truncated comb and leakage across Fourier bins

Now use F_8 on (|0>+|3>+|6>)/sqrt(3). The amplitude at y is [1+exp(2pi i 3y/8)+exp(2pi i 6y/8)]/sqrt(24). At y=0 the probability is 9/24=3/8. At y=4 the sum is 1-1+1=1, giving probability 1/24. At y=2 the sum is 1-i-1=-i, again giving 1/24. At y=6 it is i, also giving 1/24.

For y=1 and y=7, the squared magnitude of the sum is 3-2sqrt(2), yielding probability (3-2sqrt(2))/24 each. For y=3 and y=5, it is 3+2sqrt(2), yielding (3+2sqrt(2))/24 each. Adding all eight values gives one. The dominant bins near 8/3 and 16/3 are three and five, but the distribution is not supported only there because the finite register does not contain a complete cyclic period-three subgroup.

This explicit leakage pattern is useful in order-finding explanations: approximate peaks do not mean the transform malfunctioned. They can be the exact consequence of truncating a periodic sequence to a register length not divisible by the period. Rational reconstruction then uses a sufficiently accurate sampled peak, with its own success conditions.

Removing small rotations with a conservative error bound

Suppose an n-qubit QFT circuit contains controlled phase gates CP(phi_j), and a chosen approximation omits a subset of them. For one omitted gate, the operator-norm difference from identity is |exp(i phi_j)-1|, at most |phi_j|. Insert and subtract intermediate circuit products, one omitted gate at a time. Since multiplication by a unitary preserves operator norm, the total unitary difference is at most the sum of these individual differences, and hence at most the sum of the omitted absolute angles.

This telescoping bound is conservative but easy to audit. It requires the exact list of omitted rotations and a declared angle convention. If the sum is delta, every normalized input state changes by Euclidean norm at most delta. Measurement-distribution differences can then be bounded through the corresponding state distance. A more refined circuit analysis may improve the bound, but cannot be replaced by an unexplained statement that small gates are irrelevant.

For an illustrative list of omitted angles pi/64, pi/128 and pi/128, the angle-sum bound is pi/32, approximately 0.098175. This is a unitary-error upper bound, not a measured failure probability and not a statement that every input attains that error. Whether it is sufficient depends on the full algorithm's required output accuracy and other error contributions.

A classical FFT returns a complete transformed array and is the natural reference when that array is the desired output. A quantum Fourier circuit is valuable when a state can be prepared economically and a small number of samples or subsequent coherent operations answer the intended question. These two solved combs require only small direct sums, so their numerical verification is entirely classical.

Sources