Skip to main content

Variational Quantum Factoring

  • Conference paper
  • First Online:
Quantum Technology and Optimization Problems (QTOP 2019)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 11413))

Included in the following conference series:

Abstract

Integer factorization has been one of the cornerstone applications of the field of quantum computing since the discovery of an efficient algorithm for factoring by Peter Shor. Unfortunately, factoring via Shor’s algorithm is well beyond the capabilities of today’s noisy intermediate-scale quantum (NISQ) devices. In this work, we revisit the problem of factoring, developing an alternative to Shor’s algorithm, which employs established techniques to map the factoring problem to the ground state of an Ising Hamiltonian. The proposed variational quantum factoring (VQF) algorithm starts by simplifying equations over Boolean variables in a preprocessing step to reduce the number of qubits needed for the Hamiltonian. Then, it seeks an approximate ground state of the resulting Ising Hamiltonian by training variational circuits using the quantum approximate optimization algorithm (QAOA). We benchmark the VQF algorithm on various instances of factoring and present numerical results on its performance.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 64.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 84.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    The term ansatz means a trial solution of a specific form with some parameter(s) that need to be specified for the particular problem at hand.

  2. 2.

    To lower the needed qubits for our numerical simulations, we assumed prior knowledge of \(n_p\) and \(n_q\).

  3. 3.

    We note that other simple relations exist that can be used for preprocessing—the simplified clauses for \(m=56153,291311\) as used in our numerical simulations were given by [3] who utilized a different preprocessing scheme.

  4. 4.

    The simulation of noisy quantum circuits was performed using QuTiP [13]. To access the data generated for all instances considered in this study, including those which produced Figs. 2, 3, 4, 5, and 6, please refer to our Github repository at https://github.com/zapatacomputing/VQFData.

References

  1. Beauregard, S.: Circuit for Shor’s algorithm using 2n+3 qubits. Quant. Inf. Comput. 3(2), 175–185 (2003)

    MathSciNet  MATH  Google Scholar 

  2. Burges, C.J.C.: Factoring as Optimization. Microsoft Research, MSR-TR-200 (2002)

    Google Scholar 

  3. Dattani, N.S., Bryans, N.: Quantum factorization of 56153 with only 4 qubits, arXiv:1411.6758 [quant-ph] (2014)

  4. Dridi, R., Alghassi, H.: Prime factorization using quantum annealing and computational algebraic geometry. Sci. Rep. 7(1), 43048 (2017)

    Article  Google Scholar 

  5. Ekerå, M.: Modifying Shor’s algorithm to compute short discrete logarithms. IACR Cryptology ePrint Archive (2016)

    Google Scholar 

  6. Farhi, E., Goldstone, J., Gutmann, S.: A quantum approximate optimization algorithm, arXiv:1411.4028 [quant-ph] (2014)

  7. Farhi, E., Harrow, A.W.: Quantum supremacy through the quantum approximate optimization algorithm, arXiv:1602.07674 [quant-ph] (2016)

  8. Fletcher, R.: Practical Methods of Optimization, 2nd edn. Wiley, New York (2000)

    Book  Google Scholar 

  9. Fowler, A.G., Devitt, S.J., Hollenberg, L.C.L.: Implementation of Shor’s Algorithm on a Linear Nearest Neighbour Qubit Array. Quantum Information & Computation 4, 237–251 (2004)

    MathSciNet  MATH  Google Scholar 

  10. Fried, E.S., Sawaya, N.P.D., Cao, Y., Kivlichan, I.D., Romero, J., Aspuru-Guzik, A.: qTorch: The quantum tensor contraction handler, arXiv:1709.03636 [quant-ph] (2017)

  11. Geller, M.R., Zhou, Z.: Factoring 51 and 85 with 8 qubits. Sci. Rep. 3(3), 1–5 (2013)

    Google Scholar 

  12. Gidney, C.: Factoring with n+2 clean qubits and n\(-\)1 dirty qubits, arXiv:1706.07884 [quant-ph] (2017)

  13. Johansson, J., Nation, P., Nori, F.: QuTiP: an open-source Python framework for the dynamics of open quantum systems. Comput. Phys. Commun. 183(8), 1760–1772 (2012)

    Article  Google Scholar 

  14. Jones, N.C., et al.: Layered architecture for quantum computing. Phys. Rev. X 2(3), 1–27 (2012)

    Google Scholar 

  15. Kitaev, A.Y.: Quantum measurements and the Abelian stabilizer problem, arXiv:quant-ph/9511026 (1995)

  16. Lin, C.Y.-Y., Zhu, Y.: Performance of QAOA on typical instances of constraint satisfaction problems with bounded degree, arXiv:1601.01744 [quant-ph] (2016)

  17. Martín-López, E., Laing, A., Lawson, T., Alvarez, R., Zhou, X.Q., O’brien, J.L.: Experimental realization of Shor’s quantum factoring algorithm using qubit recycling. Nat. Photonics 6(11), 773–776 (2012)

    Google Scholar 

  18. Nannicini, G.: Performance of hybrid quantum/classical variational heuristics for combinatorial optimization, arXiv:1805.12037 [quant-ph] (2018)

  19. Nielsen, M.A., Chuang, I.: Quantum Computation and Quantum Information, 10th Anniversary edn. Cambridge University Press, Cambridge (2010)

    Google Scholar 

  20. Peruzzo, A., et al.: A variational eigenvalue solver on a photonic quantum processor. Nat. Commun. 5(May), 4213 (2014)

    Article  Google Scholar 

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

    Article  MathSciNet  Google Scholar 

  22. Romero, J., Olson, J., Aspuru-Guzik, A.: Quantum autoencoders for efficient compression of quantum data. Quant. Sci. Technol. 2(4), 045001 (2017)

    Article  Google Scholar 

  23. Shor, P.W.: Polynomial-time algorithms for prime factorization and discrete logarithms on a quantum computer. SIAM Rev. 41(2), 303–332 (1999)

    Article  MathSciNet  Google Scholar 

  24. Zalka, C.: Shor’s algorithm with fewer (pure) qubits, arXiv:quant-ph/0601097 (2006)

Download references

Acknowledgments

We would like to acknowledge the Zapata Computing scientific team, including Peter Johnson, Jhonathan Romero, Borja Peropadre, and Hannah Sim for their insightful and inspiring comments.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Yudong Cao .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2019 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Anschuetz, E., Olson, J., Aspuru-Guzik, A., Cao, Y. (2019). Variational Quantum Factoring. In: Feld, S., Linnhoff-Popien, C. (eds) Quantum Technology and Optimization Problems. QTOP 2019. Lecture Notes in Computer Science(), vol 11413. Springer, Cham. https://doi.org/10.1007/978-3-030-14082-3_7

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-14082-3_7

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-14081-6

  • Online ISBN: 978-3-030-14082-3

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics