04 · Oracles
Kickback
Put the target in an eigenstate of X and a CNOT writes a phase onto the control. That phase is how an oracle answers a superposition without naming a bit.
In English
An oracle is a black-box function you are allowed to run, not to open. A clever trick (phase kickback) writes the answer as a minus sign on the question register — so you can ask many questions at once without reading a bit out yet.
- Try this
- Flip the target state. Watch a minus appear on the control. That minus is the oracle speaking in phase.
- Keep this
- Oracles answer in phases. That is how superposition asks many questions.
Lab · phase onto the control
Control starts in |+⟩. Pick a target, then fire CNOT. Kickback happens when the target is an X-eigenstate — |−⟩ picks up a minus and writes it onto the control.
Target
0.5|00⟩ + 0.5|10⟩ − 0.5|01⟩ − 0.5|11⟩
Control is |+⟩. Fire CNOT to see whether a phase lands on it.
|00⟩0.525%|10⟩0.525%|01⟩-0.525%|11⟩-0.525%
An oracle is a unitary that implements f without letting you read f(x) as a classical bit in the middle of the circuit. Phase kickback is how it reports. The |−⟩ ancilla is the battery.
If the target is |+⟩, X does nothing and the control stays |+⟩. If it is |−⟩, X contributes a minus. That is the entire mechanism behind Deutsch in Volume II, and Grover next.