Past exam of the quantum information course of the University of Cambridge 2014 Paper 1 2 Solution 2026-10-20
The input size of an integer factorization problem is its number of bits . Trial division up to is exponential in ; advanced classical algorithms do substantially better, but no general polynomial-time classical factoring algorithm is known. The heuristic general-purpose general number field sieve has subexponential rather than polynomial scaling, roughly . This describes known algorithmic performance, not a proof that efficient classical factoring is impossible or that every large integer is difficult.
Choose with . A nontrivial greatest common divisor already supplies a factor; otherwise find the multiplicative order of modulo . If is even and , thenMinimality of the order also excludes , so factor extraction from an even modular order gives nontrivial factors through . Unhelpful choices of or odd orders require another trial. For , has successive residues and order four, givingComputing the powers is easy by repeated squaring; discovering a large order is the step accelerated by Shor's algorithm.[ref]
Polynomial-Time Algorithms for Prime Factorization and Discrete Logarithms on a Quantum Computer by Peter W. Shor. Quantum reduction to order finding and classical factor extraction
Put and suppose . For each residue class , letThese are normalized uniform superpositions of the arguments with the same modular-exponentiation value. Their amplitudes repeat at separation within the finite register window. Exact cyclic periodicity requires . The correctly normalized entangled register state isThe equal prefactor in the displayed algorithm is exact when , for then every . It is not generally exact for an arbitrary unknown order. A physical implementation uses quantum modular exponentiation as a reversible map; its specified action on second-register input zero is extended to a unitary operator on the whole register space.
For the illustrative , and , the four first-register states areApplying the positive-sign quantum Fourier transform to the general state givesThe bracket is a finite geometric Fourier amplitude. If , it vanishes unless for , when it equals . HenceThe second-register states are orthogonal, so their different phases do not change the marginal first-register probabilities. Measurement givesIn the example the possible outcomes are . A nonzero observed ratio estimates , not a prime factor directly. Reducing it gives denominator ; repeating avoids uninformative outcomes or recovers missing order factors. For example, or gives denominator four, whereas alone gives only two.
When , the Fourier probabilities have narrow peaks near instead of support only on an exact reciprocal grid. The general marginal distribution isChoosing supplies the usual precision for continued-fraction recovery in quantum order finding: a nearest grid sample differs from the target rational by at most . Candidate denominators and extracted divisors are checked classically, and repetitions provide useful samples. The small example works exactly because its order divides the register size; it is not a general precision guarantee for factoring every four-bit integer.
Exact reciprocal-period sampling for order four and broadened peaks when the order does not divide the register
. Details. A sufficiently large reliable quantum computer would undermine RSA by efficient factorization. The related discrete-logarithm algorithm also threatens Diffie-Hellman key exchange and elliptic-curve public-key schemes. This does not imply that every communication scheme or symmetric cipher is broken by the same algorithm; post-quantum cryptography studies alternatives based on other problems. The mathematical speedup assumes a scalable quantum computation with enough precision and error control, not merely a small demonstration of factoring fifteen.
Quantum cryptography 2026-10-20
Cryptographic tasks and protocols using quantum systems. Quantum key distribution is one application; it should not be confused with post-quantum cryptography, which studies classical schemes intended to resist quantum computation.
