Deutsch-Jozsa & Bernstein-Vazirani
The Deutsch-Jozsa algorithm was the first algorithm to demonstrate an exponential quantum speedup β albeit for a contrived problem. It determines in one query whether a hidden Boolean function is constant or balanced, whereas classical deterministic algorithms may need exponentially many. Bernstein-Vazirani finds a hidden bit string in one query versus n classical queries, giving a concrete polynomial speedup.
Key Concepts
Key Equations
Deutsch's Algorithm (n=1)
For , Deutsch's algorithm determines if is constant or balanced with one query. Trace through it for a balanced function with .
Start with (input qubit 0, ancilla qubit 1). Apply :
Apply oracle . Phase kickback gives on each term:
Apply to input: .
Measuring (not ) indicates the function is balanced.
Exercises
5 problemsDeutsch-Jozsa uses 1 quantum query. Classical deterministic worst case for input bits requires queries. How many?
Quantum Deutsch-Jozsa speedup ratio (classical/quantum queries) for any : quantum=1, classical=. For , how many classical queries are needed?
A balanced has exactly half of inputs mapping to 1. How many inputs map to 1?
Unlock Exercise 3
Subscribe to PhysWeb Pro to access all exercises and track your progress.
Upgrade to Pro βBernstein-Vazirani recovers a bit string with 1 quantum query. Classical needs queries. Quantum savings?
Unlock Exercise 4
Subscribe to PhysWeb Pro to access all exercises and track your progress.
Upgrade to Pro βFor a constant function in Deutsch-Jozsa, the probability of measuring all-zeros is:
Unlock Exercise 5
Subscribe to PhysWeb Pro to access all exercises and track your progress.
Upgrade to Pro βKey Takeaways
- The oracle enables superposition queries β evaluating on all inputs at once.
- Phase kickback: using ancilla converts oracle action to phase on .
- Deutsch-Jozsa distinguishes constant from balanced in 1 query; classical deterministic needs .
- Bernstein-Vazirani recovers the full -bit hidden string in 1 query; classical needs .
- Both algorithms use the same circuit template: measure.