/ quantum course Back to lab
PATHWAY PROGRESS0/27 passed

05 / Algorithms · LESSON 13 / 27 · 20 MIN

The quantum Fourier transform.

Link phase patterns, Fourier transforms and phase estimation.

A change of basis

For N=2ⁿ, the QFT sends a basis state |x⟩ to a state with equal magnitudes and a structured phase pattern. It is unitary: QFT|0⟩ is the uniform superposition, and the inverse QFT takes that state back to |0⟩.

The structure lives in the phases

For N=4 and x=1 the amplitudes are [1,i,−1,−i]/2, and every outcome has probability 1/4 even though the phases differ. The transform is built from Hadamards and controlled phase rotations, and the reversal of wire order has to be accounted for.

Phase estimation, and its limits

If U|ψ⟩=e^(2πiφ)|ψ⟩, controlled powers of U write φ onto a counting register, and an inverse QFT concentrates the outcomes near its binary estimate. A finite register gives finite precision. Shor's algorithm relies on related period-finding ideas; it is not an instant attack on every cipher.

LIVE EXPERIMENT / 1 OF 4

q0|0⟩HHM

Initialize the register

Every qubit starts in zero.

BasisAmplitudeProbability
|0⟩1.000100.0%

TEST YOURSELF

Lesson quiz

Get all 2 questions right to pass. Retry as often as you like.

0/2 answered

1. What are the QFT|0⟩ probabilities for N=4?
2. Phase estimation estimates…

Sign in with email or a wallet to check your answers and keep your lesson progress in sync.

Your account

Sign in to pick up your progress on any device.

or

Wallet sign-in uses a free signature (EIP-4361) on whatever EVM network your wallet is on. No gas, no transaction.