 follows. First, we know from the above description that there exists a finite fraction expansion of the rational number X, as defined by the convergents Xn = Pn/qn (n = 0, 1, N). We shall assume, without loss of generality, that n is even. We then define the error 0<8<1 corresponding to the convergent Xn according to (R12) We introduce Pnqn-1 (R13) for which (according to Eq. (R13)) we have (R14) The result in Eq. (R14) shows that A=an+1 in the continued fraction expansion [ao, a1 an, 2] that exactly defines X. Applying Property 2 in Eq. (R13), with n being even, we obtain (R15) Since by definition qn-1/qn is a rational number and also qn -1/9n < 1, the result in Eq. (R15) implies that 2 > 1, and also that a is a rational number. Consequently, a can be exactly expressed through a finite, continued fraction expansion [bo, b1,...,bm], Properties of continued fraction expansion thus, the fraction expansion [a0,a],...,An,l bo, b1,...,bM] exactly defines X. The conclusion is that the condition in Eq. (R9) is necessary and sufficient for any rational number p/q to be convergent on X. I shall now illustrate Property 3 through a numerical example, which links to the problem to be solved in the main text. As described in the text, the phase measurement circuit yields the value X = , which is a fair approximation of the exact phase Q = p/q, where p, q are integers. The problem is that given X, we must find the exact integer q. Assume, for instance, that the exact phase Q = p/q is = 1.72154963680387, of which we obtain the following measurement value, and which we know (by choice of the register size) to be accurate to 10-6:1 = 1.721549(...). Our task is now to obtain the exact value q=413 by implementing the continuous fraction expansion algorithm for the measurement . For reference purposes, let us expand Q first. It is straightforward to obtain: which shows that the suite [1, 1, 2, 1, 1, 2, 4, 5] is the expansion of Q. We shall now expand 9 step by step, being careful to effect no truncation in the successive results. F