Skip to main content
Log in

Odd orders in Shor’s factoring algorithm

  • Published:
Quantum Information Processing Aims and scope Submit manuscript

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.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

References

  1. 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)

    Article  ADS  Google Scholar 

  2. 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)

    Article  ADS  Google Scholar 

  3. 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)

    Article  ADS  Google Scholar 

  4. 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)

    Article  ADS  Google Scholar 

  5. Politi, A., Matthews, J.C.F., O’Brien, J.L.: Shor’s quantum factoring algorithm on a photonic chip. Science 325, 1221 (2009)

    Article  ADS  MATH  MathSciNet  Google Scholar 

  6. 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)

    Article  Google Scholar 

  7. Nielsen, M.A., Chuang, I.L.: Quantum Computation and Quantum Information. Cambridge University Press, Cambridge (2000)

    MATH  Google Scholar 

  8. Leander, G.: Leander2002 (2002). arXiv:quant-ph/0208183

  9. Markov, I.L., Saeedi, M.: Constant-optimized quantum circuits for modular multiplication and exponentiation. Quantum Inf. Comput. 12, 361 (2012)

    MATH  MathSciNet  Google Scholar 

  10. Shor, P.W.: Polynomial time algorithms for prime factorization and discrete logarithms on a quantum computer. SIAM J. Sci. Stat. Comput. 26, 1484 (1997)

    Article  MATH  MathSciNet  Google Scholar 

  11. 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)

  12. Smolin, J.A., Smith, G., Vargo, A.: Oversimplifying quantum factoring. Nature 499, 163 (2013)

    Article  ADS  Google Scholar 

  13. Pollard, J.M.: Theorems on factorization and primality testing. Math. Proc. Camb. Philos. Soc. 76, 3049 (1974)

    Article  MathSciNet  Google Scholar 

Download references

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

Authors

Corresponding author

Correspondence to Thomas Lawson.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

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

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11128-014-0910-z

Keywords

Navigation