Clean subset superposition preparation 2026-10-14
Suppose a known list of distinct -bit strings is available and computational basis transpositions on qubits have polynomial-size implementations. Start with the uniform superposition state of index labels , leaving the data zero. First swap with for each nonzero . Next, for each , swap with . Distinct index labels separate the first-stage pairs, and distinct data strings separate the second-stage pairs. Thus no later transposition disturbs an earlier term. At most transpositions prepare the uniform data state and return the quantum ancilla to zero. For the quantum circuit has polynomial size. This assumes the list is available; a membership predicate alone does not supply it.
Known-subset Grover search Created 2026-10-06 Updated 2026-10-14
For a known finite set , prepare the uniform superposition state and implement its reflection operator . If exactly basis states in are marked, the same two-dimensional Grover rotation angle argument uses phase queries. Preparation and reflection are known operations with no calls to the unknown predicate. Their gate cost must be accounted for separately. The success guarantee requires , and choosing the optimal iteration number uses a known .
Use three-way qutrit sign-flip discrimination. Prepare the qutrit in the uniform superposition stateFor an unknown label , the supplied unitary operator is . Apply it once and then apply the known inversion about the meanSince and , this is an allowed unitary transformation. Using givesPerform a computational-basis measurement and guess that its outcome is the unknown label. The Born rule givesEach incorrect outcome has probability , verifying normalization. The success probability is separately for every label, so no assumption about their prior probabilities is needed.
Past exam of the mathematics course of the University of Cambridge 2009 iii Paper 51 2 a Solution Created 2026-10-03 Updated 2026-10-14
Write . For , the unmarked computational basis vectors in give the normalized vectorIts norm is one and , so these two vectors form an orthonormal basis for . Splitting the uniform superposition state into its marked and unmarked terms givesThe nonnegative coefficients select the specified angle in .
There is one degenerate boundary case: if , then and is one-dimensional. No vector in can complete to a two-element orthonormal basis. Thus the printed two-dimensional description needs . For the search itself is already solved, with and no query.
Past exam of the mathematics course of the University of Cambridge 2009 iii Paper 51 2 d Solution Created 2026-10-03 Updated 2026-10-14
List the known distinct strings in as , where , and use an -qubit index quantum ancilla. Apply Hadamard gates to that register to prepareFirst, for each with , apply the available unitary operator that transposes and . The pairs are disjoint because they have distinct index labels. Skip a transposition when the two vectors coincide. This producesSecond, for each , transpose and . These pairs are disjoint because the data strings are distinct. No pair contains the term with , and no later transposition moves an earlier output. The final state is exactlyThis clean subset superposition preparation uses at most of the given transpositions and Hadamard gates. Since , is polynomial in ; multiplying this count by the assumed polynomial size of each transposition gives a polynomial-size quantum circuit. The index quantum ancilla returns to zero, so the data register is a pure uniform superposition state, rather than a mixture obtained by discarding its index. The construction uses an available enumeration of the known subset; a membership oracle alone would not justify that enumeration.
Past exam of the mathematics course of the University of Cambridge 2010 iii Paper 49 1 b Solution Created 2026-10-03 Updated 2026-10-14
If there is no marked entry, the Boolean quantum oracle is the identity. The uniform superposition state is a positive eigenstate of the Grover diffusion operator:Thus every iteration leaves the full state unchanged. The measured search bits have the uniform distributionOnly the first qubits are measured in the printed circuit. If the untouched ancilla were also measured in the computational basis, its bit would be an independent fair bit, giving probability for each joint outcome.
Past exam of the mathematics course of the University of Cambridge 2012 iii Paper 67 1 a Solution Created 2026-10-03 Updated 2026-10-07
Cyclic periodicity on implies that the least positive period divides : the shifts preserving the function form a subgroup of the cyclic group. Injectivity within one period says that distinct residue classes modulo have distinct function values. Write .
Prepare the uniform superposition state by applying the quantum Fourier transform to , and evaluate reversibly into a second quantum register. This is efficient because the given classical Boolean circuit can be converted into a reversible circuit, with its workspace cleaned by uncomputation. The resulting quantum state isMeasuring the function quantum register leaves a uniform coset state for some . The amplitude at after a quantum Fourier transform isThe finite geometric series is zero unless is a multiple of , and then equals . Thus a computational-basis measurement produces a uniform Fourier sampleThe exact period recovery from a Fourier sample computesA greatest common divisor is computable in time polynomial in . The candidate is always a divisor of the true period, and equals it precisely when is coprime to .
For the success flag, compute and compare with . If , injectivity within the first period makes these unequal. If , periodicity makes them equal, including . Hence accept and output exactly when this comparison succeeds; otherwise report failure. This is heralded exact quantum period finding when the period divides the register size, with no false acceptance. The case succeeds even on the sample .
The exact success probability iswhere is the Euler totient function. For , the prime-product formula gives . A Rosser–Schoenfeld totient bound supplies the needed lower bound for large . Every single attempt, including verification, has the assumed polynomial-in- gate cost. Repeating times gives constant success probability with a certified result whenever one is found.
The printed in the totient hint should be a lower-bound statement, . Literally, is false: at primes , . Likewise the exact single-sample success probability need not be ; for prime period it tends to one. The useful intended guarantee is the displayed inverse-log-log lower bound, not a universal upper bound. If an algorithm satisfying the literal success upper bound is desired, one can additionally accept an otherwise certified run only when independent fair bits are all zero. This retains a detectable failure flag and polynomial runtime, and has success at most , but deliberately weakens the useful guarantee. The standard unsuppressed algorithm above gives the stronger intended performance. Small can be handled directly. Primary evidence for the totient lower bound is Theorem 15, equations (3.41)–(3.42), in denisevellachemla.eu/Rosser-Schoenfeld-1962.pdf .
Past exam of the mathematics course of the University of Cambridge 2013 iii Paper 58 2 i Solution Created 2026-10-03 Updated 2026-10-07
A good item must exist, so assume ; if , the requested search is impossible, while makes every output good. Put and . Normalize the good and bad components of the uniform superposition state asThe Boolean phase oracle negates and fixes . The Grover diffusion operator is . Its implementation is independent of : conjugate the reflection about by Hadamard gates. One Grover search algorithm iteration isHence, by the Grover rotation angle formula,Choose the nonnegative integer nearest to . Its final angle differs from by at most , so a computational-basis measurement succeeds with probability at least . The allowed small-density regime includes , giving the requested bound. Each iteration uses one Boolean phase oracle query, and .
Past exam of the mathematics course of the University of Cambridge 2017 iii Paper 324 1 a Solution Created 2026-10-03 Updated 2026-10-06
Use the positive-exponent quantum Fourier transform convention . The period of a function here is the least positive translation leaving the function unchanged on the cyclic group . The injective promise means exactly when . In particular : the subgroup of period translations is generated by , and wrapping the argument by preserves its value. This is exact quantum period finding on a finite cyclic group, rather than the truncated, nondividing-period version requiring continued fractions.
Prepare a uniform superposition state in the first quantum register using , and perform a reversible computation of the function into a second quantum register, cleaning its workspace by uncomputation:A quantum measurement in the computational basis of the second quantum register leaves a periodic coset state in the first:For the quantum Fourier transform of this periodic coset state, the finite geometric series vanishes unless the measured label is . On those labels its normalized amplitude is . Thus has the uniform distribution on a finite set on , irrespective of .
Compute the greatest common divisor by the Euclidean algorithm, and set , with . Since ,The exact period recovery from a Fourier sample is therefore certified by testing . Every candidate divides and lies between and , so the injective promise makes that equality equivalent to . This includes , where the test uses input , and , which always succeeds. The test does not assert that an arbitrary equality of function values certifies an arbitrary period; the Fourier-derived divisor restriction is essential.
The concise result isHere is the Euler totient function, with . The totient lower bound from the Mertens product gives for . Each trial uses polynomial time quantum Fourier transforms, function evaluations and Euclidean algorithm arithmetic in . Repeating independent trials gives constant success probability; the herald accepts only correct answers.
The printed asymptotic bound has the wrong direction for this argument. In Big O notation, the stated upper bound on the number of coprime integers supplies no success lower bound and is itself false uniformly: for prime , , not . Likewise the single-trial success need not be , since it tends to one for prime. The meaningful corrected guarantee is the lower bound above. If an upper-bounded success rate is literally required, one may deliberately retain an accepted result with an independent probability proportional to ; this discards useful successes and is unnecessary for efficient recovery.
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.