Past exam of the mathematics course of the University of Cambridge 2013 iii Paper 58 1 a Solution Created 2026-10-03 Updated 2026-10-07
The PDF's small superscript is essential: . Interpret as the least positive period, the multiplicative order of modulo . If one permitted an unspecified nonminimal period, the answer would not be identifiable; for example, gives the same constant function with period one or period eight. Under the promised periodic modular-exponential interpretation, , so is a unit. ThusIn particular, different residue classes modulo have different function values, which is necessary for the usual quantum period finding coset argument.
Prepare by applying the quantum Fourier transform to the first register. Use repeated squaring to precompute , then multiply the value register by that known number controlled on bit of . These controlled modular multiplications are reversible because is a unit; their inverses use the modular inverses of the same constants. This produces with a polynomial number of the assumed arithmetic operations. Known work registers can be uncomputed.
Measure the value register. Since , its fiber is exactly one coset, and the first register becomesThe quantum Fourier transform of a periodic coset state is supported uniformly on the outcomes , . Indeed the inner geometric series is zero unless , and each allowed amplitude has modulus .
Take two independent Fourier samples and returnThis is two-sample exact period recovery. The Chinese remainder theorem makes divisibility of independent uniform residues independent across the different prime divisors of . For each such prime , both and are divisible by with probability . ThereforeThe number-theoretic facts used here are the Chinese remainder theorem, the Euler product for the Riemann zeta function at two, and . The candidate can also be certified by : it divides the least period, so this equality holds exactly when it is the full period. Each preparation, reversible evaluation, QFT, measurement and greatest common divisor calculation has the assumed or standard polynomial time cost in . Two runs suffice for the desired constant success probability. Quantum period finding recovers the least period with probability at least in polynomial time.
Past exam of the mathematics course of the University of Cambridge 2014 iii Paper 61 1 a Solution Created 2026-10-03 Updated 2026-10-06
Use the positive-sign quantum Fourier transformOrthogonality of the finite-group characters makes a unitary operator. Here is the least positive period. The injectivity within one period implies : write , . Periodicity gives , and injectivity forces . Put .
Start with two available computational basis states . Apply to the first register and query the modular-addition quantum oracle:Measure the second register. For some , the first register becomes the normalized coset stateThe quantum Fourier transform of a periodic coset state isIndeed, the inner geometric sum vanishes unless the Fourier label is a multiple of . Measuring that label gives for a uniformly random . Compute, by the Euclidean algorithm,Thus exact period recovery from a Fourier sample succeeds whenever is coprime to , andHere is the Euler totient function. The classical number-theory input is the totient lower bound from the Mertens product: for sufficiently large , for an absolute , with the finitely many small cases handled separately. For recovery is certain; for its probability is . The useful asymptotic probability statement is a lower bound, hence notation; it can be much larger for particular periods, for example a prime period.
There is one oracle query, two Fourier transforms and two measurements. The final greatest common divisor and division use polynomial time in . This meets the specified primitive-operation model without assuming that an arbitrary- Fourier gate is free in another gate model. If a constant success probability is wanted, repeat independently times and return the least common multiple of the candidates: each candidate divides , and one successful sample makes that least common multiple exactly .
Past exam of the mathematics course of the University of Cambridge 2018 ii Paper 3 15D b iv Solution Created 2026-09-24 Updated 2026-10-03
Here , , , and . The supplied quantum Fourier transform of a periodic coset state gives, with ,Consequently,
Past exam of the mathematics course of the University of Cambridge 2022 ii Paper 3 15D a Solution Created 2026-09-24 Updated 2026-09-25
Start two registers in . Apply to the first and then reversibly evaluate into the second, obtainingThe evaluation can be implemented by repeated squaring and reversible modular multiplication using a number of elementary arithmetic operations polynomial in .
Measure the second register. Because is injective within one period and , the first register becomes a uniformly weighted periodic cosetThe quantum Fourier transform of a periodic coset state followed by measurement returnsReduce the rational number to lowest terms. Sinceits denominator is . Test whether by repeated squaring. The promised injectivity means that is the least positive period, and , so this congruence holds exactly when . The test therefore certifies whether the run succeeded; this is heralded exact quantum period finding when the period divides the register size.
One run succeeds with probabilitybecause success is equivalent to being coprime to . A standard estimate for the Euler totient function gives for all sufficiently large , with the finitely many smaller cases absorbed by changing the positive constant . Repeating independently times therefore makes the probability that every run fails at most . Every step, including the repetitions and the classical verification, takes time polynomial in .
Past exam of the mathematics course of the University of Cambridge 2023 ii Paper 2 15D c Solution Created 2026-09-24 Updated 2026-09-25
The two registers start in . A quantum Fourier transform on the first and evaluation of giveThe first measurement, on the function register, returns . The compatible inputs are , so the normalized state becomes
Apply to the first register and put . Its state isThe geometric sum vanishes unless . Thus this isup to the unchanged second register. The outcomes each have probability , in accordance with the quantum Fourier transform of a periodic coset state.
For the stated second outcome,The continued-fraction algorithm therefore returns denominator . Since the numerator is coprime to the true period, exact period recovery from a Fourier sample succeeds, and direct evaluation confirms that the least period is
Past exam of the mathematics course of the University of Cambridge 2024 ii Paper 2 10E e Solution Created 2026-09-24 Updated 2026-09-25