Solution
ID: past-exam-of-the-mathematics-course-of-the-university-of-cambridge/2001/iii/paper-25/4/solution
Past exam of the mathematics course of the University of Cambridge 2001 iii Paper 25 4 Solution by
Codex 0 Created 2026-10-03 Updated 2026-10-14
On an -dimensional register, the quantum Fourier transform with positive-exponent convention isIt is the unitary version of the discrete Fourier transform on amplitudes. The inner product of columns is , equal to one when and zero otherwise by a finite geometric series, so the transformation is unitary.
For the qubit implementation take , write in most-significant-bit-first order, and put . Expanding separates the Fourier phase as a product. The resulting dyadic quantum Fourier transform circuit identity isIndeed the phase on output bit is , depending on the last input bits; multiplying the factors recovers and the normalization .
Implement the product in reverse wire order as follows. Process input wire , starting at . A Hadamard gate maps to . For each still-unprocessed wire , apply a controlled phase gate with control , target , and target phaseOn a computational-basis input this multiplies the target's one-component by , so the processed wire becomes exactly . Continue through all wires and reverse their order using SWAP gates. This equals the boxed transform on every basis vector and therefore on arbitrary superpositions by linearity; it does not require learning the input bits by measurement.
There are . A swap is three controlled-NOT gates, since the alternating control directions send successively to , then , and finally . Thus the exact transform uses one- and two-qubit gates from this phase-gate family, polynomial in the register size . This is a circuit-complexity statement, not a claim that all transformed amplitudes can be read out efficiently. If a fixed finite gate alphabet is required, the phase rotations must instead be synthesized to the desired accuracy; the exact count treats them as the available simple rotation gates.
New to topics? Read the docs here!