05 / Algorithms · LESSON 11 / 27 · 18 MIN
Deutsch's algorithm and phase kickback.
See how an oracle can store a property in the phase.
|0⟩ ─ H ─ U_f ─ H ─ M |1⟩ ─ H ─ U_f ─────────
Defining the oracle
A reversible Boolean oracle acts as U_f|x,y⟩ = |x,y⊕f(x)⟩. When the target is |−⟩, flipping it just contributes a minus sign: U_f|x,−⟩ = (−1)ᶠ⁽ˣ⁾|x,−⟩. This is phase kickback; it does not read out f for free.
Asking a global question
With one input bit, f is constant when f(0)=f(1) and balanced otherwise. Prepare |+⟩|−⟩, apply the oracle once, then H on the input. The input ends up as |0⟩ if f is constant and |1⟩ if it is balanced.
Counting queries fairly
In the ideal case the algorithm makes one quantum query, against two for a deterministic classical method. Building and running the oracle costs resources as well. The gain is about queries under one particular oracle model, not about every practical task.
LIVE EXPERIMENT / 1 OF 4
Initialize the register
Every qubit starts in zero.
TEST YOURSELF
Lesson quiz
Get all 2 questions right to pass. Retry as often as you like.
0/2 answered
Sign in with email or a wallet to check your answers and keep your lesson progress in sync.