Let be the two output counts. Choose a known preparation unitary F with . The Deutsch-Jozsa algorithm applies the supplied phase oracle and then , declaring constant exactly for outcome 0. Its amplitude on that outcome isThis is the Deutsch-Jozsa test with an arbitrary uniform-state unitary. For , the usual preparation is ; the argument itself needs only a uniform preparation on the stated N-dimensional space.
For an actually constant-up-to-k function, the two counts are and , so the outcome-0 probability is . The error is returning the other label. ThereforeHere the possible count k is nonnegative, and the supplied bound implies . The error is consequently at most ; at it vanishes. This is the error conditional on the stated constant-up-to-k case, not an average over unspecified prior probabilities. For comparison, the printed balanced-up-to-k definition has count difference , so its outcome-0 probability would be , not the expression for the constant-up-to-k case. No change to that promise definition is made.
Past exam of the mathematics course of the University of Cambridge 2013 iii Paper 58 3 a Solution Created 2026-10-03 Updated 2026-10-07
This is the Deutsch-Jozsa test with an arbitrary uniform-state unitary, and does not require to be a power of two. Choose a known unitary operator such that . Prepare the target qubit in . One Boolean-oracle call gives quantum phase kickback:Apply to the index register. The amplitude on isIt equals or for the two constant strings, and equals zero for a balanced string. Consequently a single query decides the promised problem exactly: measure the index register and report constant for outcome zero, balanced for any other outcome. This is the Deutsch-Jozsa algorithm with the available exact state-preparation operation.
Past exam of the mathematics course of the University of Cambridge 2022 ii Paper 3 10D a Solution Created 2026-09-24 Updated 2026-09-25
Use the available unitaries to preparein the first register andin the answer qubit. The quantum phase kickback identity givesChoose a unitary with , apply to the first register, and measure it. Its amplitude at isThis equals or for a constant string and zero for a balanced string. Thus outcome means constant, while every other outcome means balanced, with certainty after one oracle query. This is the Deutsch-Jozsa test with an arbitrary uniform-state unitary.