Quantum Fourier transform
Fourier analysis of discrete amplitudes.
1. Core idea
The QFT changes basis so periodic phase structure becomes concentrated in measurable frequency labels. Standard circuit constructions use Hadamard and controlled-phase rotations, plus optional final swaps to reverse bit order. QFT alone does not expose an entire spectrum in one shot.
2. Mathematical foundation
The notation describes a precise relationship among states, transformations or probabilities. Identify each symbol, check the dimensions of the objects, and distinguish amplitudes from the probabilities produced by a measurement.
3. Worked example
4. Reasoning flow
- Define the initial register and its basis states.
- Apply the transformations in their intended order.
- Track amplitude magnitudes and relative phases.
- Measure in the basis that reveals the desired property.
- Interpret the result and check the resource assumptions.
Qiskit implementation
Run this standalone Python script with Qiskit installed. It uses exact statevector simulation rather than noisy hardware shots.
from qiskit import QuantumCircuit from qiskit.quantum_info import Statevector from qiskit.circuit.library import QFTGate qc = QuantumCircuit(2) qc.x(0) # prepare basis state |01> (Qiskit bit order) qc.append(QFTGate(2), [0, 1]) # discrete Fourier transform print(qc.draw()) print(Statevector.from_instruction(qc)) # Four amplitudes of magnitude 1/2, with differing phases.Download runnable Python
5. Check your understanding
Practice question
Compute the four complex amplitudes of QFT₄|1⟩.
6. What to watch out for
Ideal-state calculations assume perfect gates and measurements. When assessing an algorithm, separate its mathematical guarantee from the cost of building oracles, preparing inputs, repeating experiments and correcting physical noise.