You are reading without signing in. Sign in or continue as guest to take quizzes and climb the ranks.
Phase Kickback: The Algorithm Secret
How a CNOT can change its own control: a target in |−⟩ sends a phase back, the trick inside every oracle and phase estimation.
- 01Show that X leaves |−⟩ unchanged except for a sign.
- 02Follow a CNOT with the control in |+⟩ and the target in |−⟩, and find the control in |−⟩ afterwards.
- 03Name where phase kickback is used: Deutsch–Jozsa, Grover's oracle and phase estimation.
In a classical circuit information flows one way: the control is read, the target is written. On basis states a CNOT looks exactly like that, |c t⟩ → |c, t⊕c⟩. Prepare the target in the right superposition, though, and the effect lands on the control instead, while the target stays as it was.
01The key fact: X only flips the sign of |−⟩
02Kickback, step by step
Measuring the control right away still gives 50/50, because |+⟩ and |−⟩ have the same probabilities. A final H turns the hidden sign into a bit: H|−⟩ = |1⟩, so the control reads 1 in every shot. With the target in |0⟩ instead, the same CNOT makes a Bell pair and the final H gives 50/50.
Read the kicked phase
q[1] is prepared in |−⟩ (x then h), q[0] in |+⟩. Simulate: the control reads 1 in every shot. Delete the x q[1] line so the target starts in |+⟩ (eigenvalue +1): nothing is kicked back and the control reads 0 every time.
OPENQASM 3.0;
include "stdgates.inc";
qubit[2] q;
bit[1] c;
x q[1];
h q[1];
h q[0];
cx q[0], q[1];
h q[0];
c[0] = measure q[0];
Watch the control move
The Debug tab opens with the circuit. Press Debug, then the Step over button (the arrow) one gate at a time. Before the CX the control's Bloch arrow points along +X; after it, along −X. The target's arrow does not move, and both arrows keep full length: no entanglement, just a phase.
OPENQASM 3.0;
include "stdgates.inc";
qubit[2] q;
x q[1];
h q[1];
h q[0];
cx q[0], q[1];
03Why algorithms need it
- Deutsch–Jozsa and Bernstein–Vazirani: the oracle flips a helper qubit in |−⟩ whenever f(x) = 1, so f(x) becomes a sign (−1)^f(x) on the input register. Hadamards then turn those signs into the answer.
- Grover: the oracle marks the solution with a minus sign in the same way; the diffusion step turns that sign into a larger amplitude.
- Phase estimation, and with it Shor: a controlled-U acting on an eigenstate of U kicks the eigenvalue's phase back onto the control qubits, where the inverse QFT reads it out.
2 questions · one try each counts
Control in |+⟩, target in |−⟩, then a CNOT. What is the control's state afterwards?
Sign in to answer and climb the ranks; you will come back to this lesson.
Same circuit, but the target starts in |0⟩: H on the control, CNOT, H on the control, measure the control. What do you see?
Sign in to answer and climb the ranks; you will come back to this lesson.