The Quantum Fourier Transform is the beating heart of phase estimation and Shor’s algorithm. Underneath the name it does something simple: it turns a stored number into a winding rate — a pattern of phases spinning across the register — using nothing but Hadamards and controlled phase turns.
Hand the QFT a plain number j and it hands back a register where every slot has the same loudness but a different phase, and those phases march around the circle at a speed set by j. Small j: a lazy, slow wind. Big j: a fast spin. The information has moved from the bit pattern into the rhythm — which is exactly what the period-finding algorithms want to read.
A musical chord and its frequency spectrum hold the same information two ways: one as a wiggling waveform in time, the other as a few bars showing which pitches are present. A Fourier transform converts between them. The QFT is that conversion done on amplitudes — it trades a state labelled by position for one labelled by frequency. Periodic things look messy in position and crisp and peaked in frequency.
Three qubits, so N = 8 output slots. Each clock below is one output amplitude — all the same size 1/√8, differing only in phase. Slide the input number j and watch the hands wind faster: slot k carries phase 2π·jk/8.
The definition is one line — the same Fourier sum you’d write classically, now acting on amplitudes:
The magic is that this sum factors across the qubits, and each factor is just a Hadamard followed by a few controlled phase turns. So the circuit, qubit by qubit, is:
Count them: about n²/2 gates for n qubits. The classical FFT needs n·2ⁿ — exponentially more. (The catch, in the misconceptions below, is that you can’t read all 2ⁿ outputs.)
“The QFT is exponentially fast, so it instantly Fourier-transforms huge data.” It transforms the amplitudes, which you can’t read out one by one — measurement gives a single sample. The QFT is only useful when a clever circuit makes the answer show up as a peak you’re likely to measure.
“QFT and the classical DFT are different transforms.” Same transform, same matrix — only the way it’s applied differs. The QFT runs it on a superposition with a tiny circuit.
“You can skip the bit-reversal swaps.” The circuit naturally produces the output qubits in reversed order. Either swap them at the end, or just relabel — but don’t forget it’s there.