Past exam of the mathematics course of the University of Cambridge 2016 iii Paper 324 2 c Solution Created 2026-10-03 Updated 2026-10-06
Follow the printed examples by counting positive squares, so zero is not marked. For , the marked output set isA one-to-one map from the finite set to itself is a permutation, so exactly inputs have outputs in . In the uniform quantum superposition , the initial good probability is therefore . For permutation-preimage quantum search, this known marked density under a permutation is .
Define the efficiently computable predicate to be one if and only if is a positive square. The assumed Boolean quantum oracle for , acting on and a ancilla, implements its diagonal sign operation . Compute the modular-addition quantum oracle into a zero output register, apply this sign operation, and uncompute:This implements for , with the work registers clean. Only forward calls to were promised, but its inverse costs one such call: if on the second register, thenIndeed the output addition is changed into subtraction. Thus each marked reflection costs exactly two queries to ; all other operations used here are independent of the unknown .
Use the amplitude amplification theorem with , whose reflection is allowed by the assumptions. With , choose nearest to . Here for every , so a trial succeeds with probability at least . AlsoMeasure and use one additional query to evaluate and check . On failure, restart with fresh registers. Four independent trials have failure probability at most , so the required confidence and query bound areThis is an upper bound on quantum query complexity, not a claim that arbitrary reflections or every classical gate have constant cost. Including zero as a square would change to without changing the asymptotic bound. With the printed positive-square interpretation, has no valid output and no algorithm can satisfy the success requirement; the intended asymptotic task necessarily has .
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 2019 iii Paper 324 2 b iv Solution Created 2026-10-03 Updated 2026-10-05
An injective self-map of the finite set is a bijection. For sufficiently large , exactlyoutputs satisfy the integer comparison, so there are exactly good inputs. Prepare the uniform superposition state , whose good probability isUse the phase oracle from the previous part and the reflection . The amplitude amplification theorem requires iterations; each uses two queries, while the state preparation and its reflection are independent of . With the nearest-integer iteration count from that theorem, the failure probability is at most , tending to zero. Therefore the success probability eventually exceeds , withThis is a bound on quantum query complexity; implementation costs of the known gates are not counted as oracle queries.
Quantum collision finding 2026-10-06
Given a function with an -bit output, accessed through the unitary operator , quantum collision finding asks for distinct inputs with equal outputs. Here is bitwise exclusive or on the -bit answer quantum register. The distinctness requirement excludes the uninformative pair . For a two-to-one function on inputs, Grover search algorithm methods yield a cube-root quantum query complexity, despite a square-root cost for finding a partner of just one preselected input.
Quantum complexity theory Created 2026-10-05 Updated 2026-10-06
Quantum complexity theory studies resources needed by quantum circuits and quantum algorithms, including time, workspace, and quantum query complexity. Its models specify which input oracles and gate implementations are available; counting oracle calls is different from counting all elementary gates.