Table of Contents
Deutsch
Deutsch's algorithm is the simplest quantum algorithm that demonstrates a quantum speedup over any classical algorithm. It determines whether a binary function is constant (same output for both inputs) or balanced (different outputs for the two inputs) using only a single quantum query, whereas any classical algorithm requires two.
The function is accessed via a quantum oracle which implements . Classically, determining the type of requires evaluating both and . Deutsch's algorithm determines it with one query to .
Circuit
The circuit uses two qubits, initialized to . Hadamard gates are applied to both, then the oracle is queried, then a Hadamard is applied to the first qubit, and finally the first qubit is measured.
If the first qubit measures , then and is constant. If it measures , then and is balanced. The answer is determined with certainty from a single measurement.
Phase kickback
The key mechanism is phase kickback: the ancilla qubit in state causes the oracle to write the output as a phase on the first register, rather than flipping any bit. After the second Hadamard gate, this phase difference constructively or destructively interferes to reveal whether is constant or balanced. Phase kickback is a central subroutine in many more powerful quantum algorithms including Deutsch-Jozsa, Bernstein-Vazirani, and Grover's algorithm.
