pproach: it cannot be implemented classically. Basically, phase estimation allows one to find the periodicity r of a modular function by means of a multi-qubit quantum-gate circuit (Hadamard, controlled-U gates, inverse-Fourier transform), followed by a probabilistic, quantum-mechanical measurement of the resulting qubit state, which yields a phase esti- mate Q. Order finding, from which the period r is determined with high probability and (the measurement being successful) without ambiguity, represents a particular case of quantum phase estimation. Such a determination eventually rests on the implementation of continued fraction expansion, a classical algorithm that is straightforward to run with a computer. The requirement for r to be the period is that the phase estimation Q = s/r, with S an integer, is such that S, r are co-prime. Since this does not happen systematically, there is a finite chance that the endeavor may fail. Any such event is not a failure of Shor's algorithm, but rather a call for another try in this specific implementation step. Such con- ditions of trial and error leading to factorizing success may sound strange to engineers - but they are really embedded in the algorithm game! The key feature to grasp is that the Shor's factorization algorithm probability of such intermediate failures remains comparatively small, or innocuous for computing logistics, and that the chances of success, after only a few trials in the worst all cases, are relatively high. As we shall see, all of the above steps are of polynomial-time complexity. A comparison is made with nonpolynomial algorithms, such as the general number field sieve (GNFS) approach, which is shown to require decades of CPU comput- ing time to factorize numbers of 100-bits long! We then establish the connection between order finding and factorization of composite (or nonprime) numbers by using two basic theorems. The first theorem yields the two factors N', N" of any given composite N such that N = N' X N", given the knowledge of the period. 