integer r from a given rational number s/r < 1. The principle of the expansion is to express a rational number a = p/q, with p, q having no common factor, into a unique and finite suite, or expansion of positive integers a0,a1,...,An] and satisfying = ao + (20.23) To provide an example, take a = 57/21. We obtain (20.24) 20.3 Continued fraction expansion which yields the expansion [2, 1, 2, 2]. We note that the iteration of this "split and invert" expansion always stops at some point, since the numerator in the last fraction at the bottom at each step decreases, eventually reducing to one. The lesson learnt is that any rational number =p/q lends itself to a continued fraction expansion having a unique signature suite[a0,a1,...,An]. Given the measurement = X, with x being some approximation of = s/r, our task is now to identify a rational number s/r, called convergent of X, which may closely approach X. To do this, we must use some key properties of the continued fraction expansion, which are described in Appendix R. Here, we shall only need the final property. This property states that given a rational number X, and two co-prime integer numbers S, r satisfying (20.25) the ratio s/r is convergent on X. This is where the choice of register size and phase accuracy we made in the previous section comes into the picture and becomes justified. With such a choice, indeed, we know that the phase estimation X is accurate up to 1/22L+1. Since we inherently have r < N, and also N < 2L by definition, we have r <N<24, thus, 1/(2r2) < 1/22L+1 and, therefore, the condition in Eq. (20.25) applies. The continued fraction expansion of = X, can be computed classically through the algorithm described in Appendix R, as also illustrated with a practical numerical example. The algorithm yields a finite series of rational numbers s'/r', which from the above condition, are known to be convergent on s/r. The convergent s'/r' that most closely approaches the upper bound defined in Eq. (20.25) is the one for which r' = r, concluding the sear