Controlled Rotations in the QFT
The -qubit QFT maps a computational basis state to
The single-qubit case (previous lesson) reduces to a Hadamard. For more qubits the circuit needs controlled phase gates to encode the finer frequency components.
The controlled phase gate
The controlled- gate (written ) acts on a control qubit and a target qubit :
in the basis. It does nothing unless both qubits are , in which case it multiplies the amplitude by . No control, no rotation — this conditional action is what makes the QFT constructive.
The QFT uses a family of these gates with angles . In traditional notation these are called gates:
So (a controlled-), , , and so on.
The 3-qubit QFT circuit
For qubits (labeled from most to least significant) the QFT circuit reads:
- , then with control , target , then with control , target .
- , then with control , target .
- .
The pattern is systematic: each qubit first gets a Hadamard, then acts as the control for successively finer phase kicks to the less-significant qubits. The angle halves with each step because the target qubit sits one position further down the binary fraction.
Gate count
The -qubit QFT uses exactly Hadamards and controlled-phase gates — a total of gates. This is exponentially fewer than the operations needed by the classical FFT on the same -point input.
For : 3 Hadamards and controlled-phase gates, for 6 gates total.
Try it
The starter code gives you the first qubit's block and the Hadamard for qubit 1. Add the missing controlled-phase rotation for qubit 1. The grader checks the full unitary matrix, so leaving the circuit incomplete will fail.
Sign in on the full site to ask questions and join the discussion.