Past exam of the mathematics course of the University of Cambridge 2016 iii Paper 324 2 b Solution Created 2026-10-03 Updated 2026-10-06
Prepare an ancillary qubit inIt can be prepared from by an operation followed by a Hadamard gate, independently of . One call to the Boolean quantum oracle then gives quantum phase kickback:The data state receives a minus sign precisely on the basis vectors spanning , while the ancilla remains unchanged and unentangled. One oracle call realizes the reflection. By linearity it is the marked-state phase oraclewith one oracle call. The ancillary preparation and its optional inverse use only fixed operations, so no additional knowledge of is needed.
Past exam of the mathematics course of the University of Cambridge 2017 iii Paper 324 2 a Solution Created 2026-10-03 Updated 2026-10-06
Assume first . Define the orthonormal quantum statesand by . The relevant invariant subspace is the two-dimensional span of these quantum states, not the entire Hilbert space. The uniform quantum superposition is .
In the ordered orthonormal basis , the marked-state phase oracle is the reflection operator . Since , conjugation by the Walsh-Hadamard transform gives the Grover diffusion operatorIt is the reflection in the line through . The product of these two reflection operators is a rotation matrix by toward the marked quantum state:Thus the Born rule gives . Choose a nonnegative integer nearest to . Rounding changes the angle from by at most , soEach Grover search algorithm iteration uses one marked-state phase oracle query; all other gates are known. A final quantum measurement in the computational basis therefore produces a uniformly chosen marked item, conditional on success, with probability better than one half when . This uses the supplied marked count to select the stopping time; an unknown needs an additional search schedule or counting procedure. If , no oracle query is needed; if , no marked item exists, so a successful search is impossible.
Past exam of the mathematics course of the University of Cambridge 2017 iii Paper 324 2 b Solution Created 2026-10-03 Updated 2026-10-06
Interpret a function collision as two distinct inputs with equal outputs. Without distinctness the request is vacuous, since an input paired with itself always qualifies. Set (handling small by direct queries), choose a known set of size , and query all its inputs. Store a classical table of their outputs and corresponding inputs. If this table contains a function collision, return it immediately.
Otherwise the table contains distinct outputs. Because is exactly two-to-one, each has exactly one partner in , the known complement of . None lies in , and different table outputs have different partners. Thus exactly inputs in , of size , satisfy the known-table membership predicateBuild a marked-state phase oracle for this predicate by a compute-phase-uncompute construction: use on a clean answer quantum register, reversibly compare its output against the classical table, apply the conditional minus sign, undo the comparison, and apply again. Since the answer operation is bitwise exclusive or, . All workspace returns to zero, and each phase query costs two calls to .
Perform known-subset Grover search in the span of the computational basis states labelled by , starting in their uniform superposition state. Reflection about this known state uses no queries; choosing as an initial interval makes a known interval that can also be encoded by its own labels. Its marked fraction is , so the previous Grover rotation angle analysis uses phase queries. On measuring , one further query checks the output and retrieves its partner from the table. The inputs are distinct because the two sets are disjoint.
Consequently the quantum query complexity isFor large , rounding the optimal Grover search algorithm iteration count gives success at least . An internal table function collision already gives certain success. The balance explains the cube-root choice. This is the Brassard–Høyer–Tapp collision algorithm: its table uses classical bits. The bound counts calls to , as requested; it does not charge table lookup and its reversible implementation as constant-time gates, or claim an overall polynomial time in .
Past exam of the mathematics course of the University of Cambridge 2018 ii Paper 4 10D b Solution Created 2026-09-24 Updated 2026-10-03
The marked-state phase oracle changes only the amplitude of . Since that amplitude in is ,Also,It follows that and , soThe global minus sign has no observable effect. Prepare , query once, apply the fixed operator , and perform a quantum measurement in the computational basis. The outcome is with probability one. This is exact Grover search on four entries.
Past exam of the mathematics course of the University of Cambridge 2020 ii Paper 3 10C iv Solution Created 2026-09-24 Updated 2026-09-29
Choose to prepare the uniform superposition, so the marked-state probability is . Apply the marked-state phase oracle , followed by the reflection about the prepared state. Part (iii) shows that this single Grover iteration produces . A projective measurement in the four-item basis therefore returns the marked element with probability one. This is exact Grover search on four entries.
Permutation-preimage quantum search 2026-10-06
To find an input of a permutation whose output lies in a known -element subset, compute the output, apply its marked-state phase oracle, and use uncomputation. A modular-addition quantum oracle costs two forward queries per marked reflection, because modular-oracle inversion by negation supplies its inverse. Amplitude amplification then uses queries for fixed success probability. Positive-square outputs have and hence query cost .