Paper 4, Section I,
(a) Define the order of for coprime integers and with . Explain briefly how knowledge of this order can be used to provide a factor of , stating conditions on and its order that must be satisfied.
(b) Shor's algorithm for factoring starts by choosing coprime. Describe the subsequent steps of a single run of Shor's algorithm that computes the order of mod with probability .
[Any significant theorems that you invoke to justify the algorithm should be clearly stated (but proofs are not required). In addition you may use without proof the following two technical results.
Theorem : For positive integers and with , and any , let be the largest integer such that Let QFT denote the quantum Fourier transform . Suppose we measure to obtain an integer with Then with probability will be an integer closest to a multiple of for which the value of (between 0 and ) is coprime to .
Theorem CF: For any rational number with and with integers a and having at most digits each, let with and coprime, be any rational number satisfying
Then is one of the convergents of the continued fraction of and all the convergents can be classically computed from in time .]