Research Explained · Algorithms
Rapid Solution of Problems by Quantum Computation
David Deutsch and Richard Jozsa
University of Oxford; University of Plymouth (Jozsa, at the time of writing) · 1992 · Difficulty ★★★☆☆
Reference
Deutsch, D., & Jozsa, R. (1992). Rapid solution of problems by quantum computation. Proceedings of the Royal Society of London A, 439(1907), 553-558.
This page is an independent explanation. For exact wording, figures, and data, read the original paper.
The short version
Deutsch and Jozsa describe a problem that a quantum computer solves with one query, while a deterministic classical computer needs exponentially many. It is the first example of an exponential quantum speedup, though only against deterministic algorithms.
Key findings
- For a function on n bits that is promised to be either constant or balanced, a quantum computer decides which with one evaluation.
- A deterministic classical algorithm needs 2 to the n minus 1, plus 1, evaluations in the worst case.
- The quantum algorithm evaluates the function on a superposition of all inputs and uses interference to extract a global property.
- The original version succeeds with some probability less than one, and the exact version was found later.
Background: why this paper was written
Deutsch's 1985 paper had given the first quantum algorithm, for functions of one bit, and it succeeded with probability one half and saved one function evaluation. It showed the principle of quantum parallelism but not a large advantage. The 1992 paper with Jozsa generalized the idea to n bits and obtained an exponential gap.
The setting is the oracle, or query, model. The function is a black box that can be evaluated but not inspected, and the cost of an algorithm is the number of evaluations. This model makes it possible to prove separations rigorously even though no one can prove that quantum computers beat classical ones in the standard setting.
What the researchers did
The function takes n bits and returns one bit, with the promise that it is either constant, the same for all inputs, or balanced, equal to 0 for exactly half of the inputs and 1 for the other half. A deterministic classical algorithm must evaluate the function on more than half of the inputs in the worst case to be certain, which is 2 to the n minus 1, plus 1 evaluations.
The quantum algorithm uses n input qubits and a helper qubit. It puts the input qubits in an equal superposition of all strings, applies the oracle, which marks each string according to the function value through a sign, and then applies Hadamard transforms and measures. If the function is constant, interference returns the input register to the all-zeros string, and if it is balanced, the all-zeros outcome has probability zero. A single measurement therefore decides.
The original paper's algorithm is probabilistic, and it succeeds with a probability that can be made close to one but not exactly one. In 1998, Cleve, Ekert, Macchiavello, and Mosca gave the version used in textbooks today, which is exact and uses the helper qubit in the minus state to turn the oracle into a phase, a technique now called phase kickback.
Results
The result is a proven exponential separation between quantum and deterministic classical query complexity.
The speedup disappears against randomized classical algorithms, which solve the problem with a constant number of queries and a small chance of error, a limitation stressed in later literature.
The paper and its follow-ups established the toolkit of superposition, oracles, phase kickback, and Hadamard transforms that quantum algorithms use.
Key facts and numbers
| Item | Detail |
|---|---|
| Year | 1992 |
| Quantum queries | 1 |
| Deterministic classical queries | 2^(n-1) + 1 in the worst case |
| Randomized classical queries | A constant number for small error |
| Exact quantum version | Cleve, Ekert, Macchiavello, and Mosca (1998) |
Limitations and caveats
The promise that the function is constant or balanced is artificial, and the problem has no practical use.
The comparison is with deterministic algorithms only. Against randomized ones the advantage is minimal.
The oracle cost is not counted, so the result does not directly translate into a computational speedup for a concrete function.
Why it matters
The algorithm is the standard first example of a quantum speedup. Its structure, Hadamard gates before and after an oracle, appears in the Bernstein-Vazirani, Simon, and Shor algorithms, and it is a common first test program for new quantum hardware.
What happened next
The Bernstein-Vazirani algorithm of 1993 and Simon's algorithm of 1994 refined the idea, and Simon's gave an exponential advantage over randomized algorithms, leading to Shor's algorithm. All of them use the same Hadamard-oracle-Hadamard structure.
Small versions of the Deutsch-Jozsa algorithm were among the first quantum algorithms run on hardware, using nuclear magnetic resonance in 1998 and later trapped ions and superconducting qubits, and it remains a standard test circuit.
How to read the original paper
The paper is six pages and moderately technical. For a modern treatment of the same algorithm, read the Deutsch-Jozsa page on this site and a textbook such as Nielsen and Chuang.
Compare it with Deutsch's 1985 paper to see how the idea was generalized.
Original abstract (paraphrased)
The paper shows that a quantum computer can solve a particular problem, determining whether a function is constant or balanced, in a time that is exponentially shorter than the time needed by any deterministic classical computer, extending the single-bit example of Deutsch's 1985 paper to functions of many bits.
Frequently asked questions
What does the Deutsch-Jozsa algorithm do?
It decides whether a function on n bits is constant or balanced with a single quantum query.
Is the speedup real?
Yes against deterministic classical algorithms. Randomized algorithms solve the problem with few queries, so the practical advantage is small.
Why is it still taught?
It introduces superposition, oracles, phase kickback, and interference in the simplest setting.
Keep exploring
- Algorithm: Deutsch-Jozsa Algorithm
- Algorithm: Bernstein-Vazirani Algorithm
- Algorithm: Simon's Algorithm
- Hardware: IBM Heron (r1, r2, and r3)
- Dictionary: Quantum Oracle
- Dictionary: Hadamard Gate
- Dictionary: Quantum Interference
- Dictionary: Superposition
- Industry: Quantum Computing for Cybersecurity
Explanations on this page summarize published work for education (last reviewed September 30, 2026). Numbers are taken from the cited paper or from widely reported follow-up work, and later results may have updated or challenged them. Check the reference above before citing.