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 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.
Two-sample exact period recovery 2026-10-07
Suppose a function has least period and distinct values on distinct period cosets. Two independent Fourier samples have the form with uniform . The displayed candidate is , so exact recovery occurs when no prime divisor of divides both residues. The Chinese remainder theorem gives probability , using the Euler product. Unlike a single-sample coprimality probability, this bound is uniformly greater than one half. A candidate-period test makes successful recovery heralded when such a test is available.