First complete quantum algorithm
Use an oracle, phase kickback and interference to answer a precisely defined question.
- State Deutsch’s input, promise and output.
- Derive its one-query result and connect it to Deutsch–Jozsa.
- Separate an ideal query result from a practical performance claim.
The problem contract
Section titled “The problem contract”Given oracle access to , decide whether f is constant () or balanced (). There are four possible functions. A deterministic classical solution requires two evaluations in the worst case.
Prepare and query
Section titled “Prepare and query”Start with and apply H to both qubits. The state becomes . Apply once. Phase kickback produces
Apply H to the first qubit. If f is constant, the input becomes 0 up to global phase. If f is balanced, it becomes 1 up to global phase. Measuring the input therefore answers the question with one ideal query.
Extend to more input bits
Section titled “Extend to more input bits”Deutsch–Jozsa uses an n-bit input under the promise that f is constant or balanced over all inputs. Its all-zero output has probability one for a constant function and zero for a balanced function in the ideal model.
Deutsch–Jozsa explorer
Under the promise that f is constant or balanced, phase kickback followed by interference distinguishes the two cases with one oracle query.
Make a prediction first
For a balanced oracle, should the all-zero input-register outcome ever occur in the ideal model?
Exact ideal-model predictions · run a measurement experiment to compare.
Take it further
Compare constant-zero and constant-one. Why does their global phase difference not change the measured result?
Prediction: For a balanced oracle, should the all-zero input-register outcome ever occur in the ideal model? Challenge: Compare constant-zero and constant-one. Why does their global phase difference not change the measured result?
The lab shows two- or three-bit input registers after phase kickback and factors out the unchanged ancilla. The balanced preset uses the last input bit. It is one valid balanced example, not an enumeration of every possible function.
State the conclusion carefully
Section titled “State the conclusion carefully”This is a query-model separation for a promised problem. It is not proof that a physical implementation outperforms a classical computer after oracle synthesis, noise, readout and total runtime are counted. Randomised classical comparisons also differ from the deterministic worst-case comparison above.
What is essential to the Deutsch–Jozsa conclusion?
Your next investigation
Section titled “Your next investigation”Complete P7 and P8 in the practice studio, then compare this phase-kickback pattern with Grover amplification. Keep the input/output contract, assumptions and excluded costs in your report.
Reference: IBM Quantum — Fundamentals of quantum algorithms.
Ready for the next step?
Your progress stays in this browser.