Abstract
Shor’s factoring algorithm (SFA) finds the prime factors of a number, \(N=p_1 p_2\), exponentially faster than the best known classical algorithm. Responsible for the speedup is a subroutine called the quantum order finding algorithm (QOFA) which calculates the order—the smallest integer, \(r\), satisfying \(a^r \mod N =1\), where \(a\) is a randomly chosen integer coprime to \(N\) (meaning their greatest common divisor is one, \(\gcd (a, N) =1\)). Given \(r\), and with probability not \(<\)1/2, the factors are given by \(p_1 = \gcd (a^{\frac{r}{2}} - 1, N)\) and \(p_2 = \gcd (a^{\frac{r}{2}} + 1, N)\). For odd \(r\), it is assumed that the factors cannot be found (since \(a^{\frac{r}{2}}\) is not generally integer) and the QOFA is relaunched with a different value of \(a\). But a recent paper (Martin-Lopez et al. Nat. Photonics 6:773, 2012) noted that the factors can sometimes be found from odd orders if the coprime is square. This raises the question of improving SFA’s success probability by considering odd orders. We show that an improvement is possible, though it is small. We present two techniques for retrieving the order from apparently useless runs of the QOFA: not discarding odd orders; and looking out for new order finding relations in the case of failure. In terms of efficiency, using our techniques is equivalent to avoiding square coprimes and disregarding odd orders, which is simpler in practice. Even still, our techniques may be useful in the near future, while demonstrations are restricted to factoring small numbers. The most convincing demonstrations of the QOFA are those that return a non-power-of-two order, making odd orders that lead to the factors attractive to experimentalists.
References
Martin-Lopez, E., Laing, A., Lawson, T., Alvarez, R., Zhou, X., O’Brien, J.L.: Experimental realization of Shor’s quantum factoring algorithm using qubit recycling. Nat. Photonics 6, 773 (2012)
Vandersypen, L.M.K., Steffen, M., Breyta, G., Yannoni, C.S., Sherwood, M.H., Chuang, I.L.: Experimental realization of Shor’s quantum factoring algorithm using nuclear magnetic resonance. Nature 414, 883 (2001)
Lu, C., Browne, D.E., Yang, T., Pan, J.: Demonstration of a compiled version of Shor’s quantum factoring algorithm using photonic qubits. Phys. Rev. Lett. 99, 250504 (2007)
Lanyon, B.P., Weinhold, T.J., Langford, N.K., Barbieri, M., James, D.F.V., Gilchrist, A., White, A.G.: Experimental demonstration of a compiled version of Shor’s algorithm with quantum entanglement. Phys. Rev. Lett. 99, 250505 (2007)
Politi, A., Matthews, J.C.F., O’Brien, J.L.: Shor’s quantum factoring algorithm on a photonic chip. Science 325, 1221 (2009)
Lucero, E., Barends, R., Chen, Y., Kelly, J., Mariantoni, M., Megrant, A., O’Malley, P., Sank, D., Vainsencher, A., Wenner, J., White, T., Yin, Y., Cleland, A.N., Martinis, J.M.: Computing prime factors with a Josephson phase qubit quantum processor. Nat. Phys. 8, 719 (2012)
Nielsen, M.A., Chuang, I.L.: Quantum Computation and Quantum Information. Cambridge University Press, Cambridge (2000)
Leander, G.: Leander2002 (2002). arXiv:quant-ph/0208183
Markov, I.L., Saeedi, M.: Constant-optimized quantum circuits for modular multiplication and exponentiation. Quantum Inf. Comput. 12, 361 (2012)
Shor, P.W.: Polynomial time algorithms for prime factorization and discrete logarithms on a quantum computer. SIAM J. Sci. Stat. Comput. 26, 1484 (1997)
Knill, E.: On Shor’s Quantum Factor Finding Algorithm: Increasing the Probability of Success and Tradeoffs Involving the Fourier Transform Modulus. Tech. Report LAUR-95-3350, Los Alamos Natl. Lab (1995)
Smolin, J.A., Smith, G., Vargo, A.: Oversimplifying quantum factoring. Nature 499, 163 (2013)
Pollard, J.M.: Theorems on factorization and primality testing. Math. Proc. Camb. Philos. Soc. 76, 3049 (1974)
Acknowledgments
Thanks to Frederic Grosshans, Marc Kaplan, Anthony Laing, Marc-Andre Lajoie, Enrique Martin-Lopez and Benjamin Smith for valuable discussions. The author acknowledges support from Digiteo and the City of Paris project CiQWii.
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Lawson, T. Odd orders in Shor’s factoring algorithm. Quantum Inf Process 14, 831–838 (2015). https://doi.org/10.1007/s11128-014-0910-z
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11128-014-0910-z