Chapter 06 · Quantum Fourier transform
Finding hidden periods
Fourier taught us to break any signal into frequencies. Its quantum version acts on amplitudes with only about gates, exponentially fewer than the fast classical algorithm. Coupled with interference, it turns hidden periodicity into peaks that can be measured.
In this chapter
In 1807 Joseph Fourier claimed, studying the propagation of heat, that any function can be written as a sum of sines and cosines. Two centuries later the discrete version of his idea is everywhere: compressing images, filtering audio, multiplying large numbers. In 1965 James Cooley and John Tukey rediscovered the fast Fourier transform (FFT), which computes the transform of numbers in operations. The quantum version is exponentially faster still, with a catch that we will have to learn to get around.
The discrete and the quantum transform
Let and , a primitive -th root of unity. The quantum Fourier transform is the linear map defined on the computational basis by
Applied to a state , it produces the discrete Fourier transform of the amplitudes, with .
The columns of the QFT matrix are orthonormal, so it is a valid quantum gate.
Proof
The inner product of columns and is . If it is 1. Otherwise is an -th root of unity and the geometric sum .
For , the QFT is exactly the Hadamard gate. And applying to each of qubits is the Fourier transform over the group : the Deutsch–Jozsa algorithm was already a Fourier transform in disguise.
An exponentially small circuit
The key to its efficiency is that the QFT of a basis state does not create entanglement: it factorizes into separate qubits. Write in binary as and for the binary fraction .
Proof sketch
Write . Then , and the sum over factors into a product of sums over each bit . In only the last bits of matter, because the others contribute integer multiples of .
Each factor is prepared with a Hadamard gate and a few controlled phase rotations, . In total gates, plus a reversal of the order of the qubits: operations to transform amplitudes, against the FFT's . Coppersmith (1994) also showed that the smallest rotations can be dropped without significant loss, leaving gates.
Periodicity becomes peaks
That is exactly what happens with periodic states, the situation that matters for Shor's algorithm.
Let divide and . The state that is uniform over an arithmetic progression of step ,
is transformed into a uniform superposition over the multiples of : measuring after the QFT gives with uniform in , whatever the offset .
Proof
The amplitude of is . Now is an -th root of unity. If divides it equals 1 and the sum is , which gives probability . Otherwise the geometric sum is 0. The offset only contributes the phase , which does not change the probabilities.
Hidden structure in a single query
The same idea gave the first separations between quantum and classical computation, in the model where a function can only be consulted as a black box.
Bernstein–Vazirani (1993). Let for a secret string . Classically, each query reveals at most one bit of information about , so queries are needed. Quantumly, a single one is enough: prepare , apply the oracle as a phase , and apply again. Since , measuring yields with certainty.
Simon (1994). If exactly when or , finding requires queries for any classical algorithm, even a randomized one, and for a quantum one: the first exponential separation against randomized algorithms. Daniel Simon's paper is what inspired Peter Shor.
Phase estimation
Alexei Kitaev (1995) reformulated these ideas into a general tool. Suppose a unitary and one of its eigenvectors with . Using auxiliary qubits, the gates controlled- write the phase into the amplitudes as , and an inverse QFT turns it into a binary number.
With qubits, the measurement returns the closest -bit approximation to with probability at least ; with qubits, an approximation to bits with probability at least . If has an exact -bit expansion, the result is certain.
Phase estimation is at the heart of Shor's algorithm, of quantum chemistry (estimating energies, the eigenvalues of a Hamiltonian) and of the algorithms for linear systems. The next chapter puts it to work on the problem that made quantum computing famous.
References
- J. W. Cooley and J. W. Tukey (1965). “An Algorithm for the Machine Calculation of Complex Fourier Series”. Mathematics of Computation, 19(90).
- E. Bernstein and U. Vazirani (1993). “Quantum complexity theory”. STOC.
- D. R. Simon (1994). “On the power of quantum computation”. FOCS (journal version: SIAM J. Computing, 1997).
- D. Coppersmith (1994). “An approximate Fourier transform useful in quantum factoring”. IBM Research Report RC19642.
- A. Y. Kitaev (1995). “Quantum measurements and the Abelian Stabilizer Problem”. arXiv:quant-ph/9511026.
- R. Cleve, A. Ekert, C. Macchiavello and M. Mosca (1998). “Quantum algorithms revisited”. Proceedings of the Royal Society A, 454.