- Open Access
Variational quantum eigensolver approach to prime factorization on IBM's noisy intermediate scale quantum computer
Phys. Rev. A 111, 042413 – Published 8 April, 2025
DOI: https://doi.org/10.1103/PhysRevA.111.042413
Abstract
This paper presents a hybrid quantum-classical approach to prime factorization. The proposed algorithm is based on the variational quantum eigensolver (VQE), which employs a classical optimizer to find the ground state of a given Hamiltonian. A numerical study is presented, evaluating the performance of the proposed method across various instances on both IBM's real quantum computer and its classical simulator. The results demonstrate that the method is capable of successfully factorizing numbers up to 253 on a real quantum computer and up to 1 048 561 on a classical simulator. These findings show the potential of the approach for practical applications on near-term quantum computers.
Physics Subject Headings (PhySH)
Article Text
References (48)
- P. W. Shor, Algorithms for quantum computation: discrete logarithms and factoring, in Proceedings 35th Annual Symposium on Foundations of Computer Science (IEEE, Santa Fe, NM, USA, 1994), pp. 124–134.
- U. Skosana and M. Tame, Demonstration of Shor's factoring algorithm for N = 21 on IBM quantum processors, Sci. Rep. 11, 16599 (2021).
- J. Preskill, Quantum computing in the NISQ era and beyond, Quantum 2, 79 (2018).
- G. Nannicini, Performance of hybrid quantum-classical variational heuristics for combinatorial optimization, Phys. Rev. E 99, 013304 (2019).
- Y. Chai, L. Funcke, T. Hartung, K. Jansen, S. Kuehn, P. Stornati, and T. Stollenwerk, Optimal flight-gate assignment on a digital quantum computer, Phys. Rev. Appl. 20, 064025 (2023).
- D. Amaro, M. Rosenkranz, N. Fitzpatrick, K. Hirano, and M. Fiorentini, A case study of variational quantum algorithms for a job shop scheduling problem, EPJ Quant. Technol. 9, 5 (2022).
- A. Peruzzo, J. McClean, P. Shadbolt, M.-H. Yung, X.-Q. Zhou, P. J. Love, A. Aspuru-Guzik, and J. L. O'Brien, A variational eigenvalue solver on a photonic quantum processor, Nat. Commun. 5, 4213 (2014).
- C. J. C. Burges, Factoring as optimization. microsoft research Technical Report TR-2002-83, 2002.
- R. T. Rockafellar and S. Uryasev, Conditional value-at-risk for general loss distributions, J. Banking Finance 26, 1443 (2002).
- P. K. Barkoutsos, G. Nannicini, A. Robert, I. Tavernelli, and S. Woerner, Improving variational quantum optimization using CVaR, Quantum 4, 256 (2020).
- B. Wang, F. Hu, H. Yao, and C. Wang, Prime factorization algorithm based on parameter optimization of Ising model, Sci. Rep. 10, 7106 (2020).
- E. Farhi, J. Goldstone, S. Gutmann, J. Lapan, A. Lundgren, and D. Preda, A quantum adiabatic evolution algorithm applied to random instances of an NP-complete problem, Science 292, 472 (2001).
- M. Born and V. Fock, Proof of the adiabatic theorem, Z. Phys. 51, 165 (1928).
- X. Peng, Z. Liao, N. Xu, G. Qin, X. Zhou, D. Suter, and J. Du, Quantum adiabatic algorithm for factorization and its experimental implementation, Phys. Rev. Lett. 101, 220405 (2008).
- Z. Li, N. S. Dattani, X. Chen, X. Liu, H. Wang, R. Tanburn, H. Chen, X. Peng, and J. Du, High-fidelity adiabatic quantum computation using the intrinsic Hamiltonian of a spin system: Application to the experimental factorization of 291311, arXiv:1706.08061.
- A. Saxena, A. Shukla, and A. Pathak, A hybrid scheme for prime factorization and its experimental implementation using IBM quantum processor, Quantum Info. Proc. 20, 112 (2021).
- D-Wave Systems, What is Quantum Annealing (D-Wave Systems Inc., 2024).
- S. Jiang, K. A. Britt, A. J. McCaskey, T. S. Humble, and S. Kais, Quantum annealing for prime factorization, Sci. Rep. 8, 17667 (2018).
- K. Jun and H. Lee, Hubo and QUBO models for prime factorization, Sci. Rep. 13, 10080 (2023).
- E. R. Anschuetz, J. P. Olson, A. Aspuru-Guzik, and Y. Cao, Variational quantum factoring, arXiv:1808.08927.
- E. Farhi, J. Goldstone, and S. Gutmann, A quantum approximate optimization algorithm, arXiv:1411.4028.
- A. H. Karamlou, W. A. Simon, A. Katabarwa, T. L. Scholten, B. Peropadre, and Y. Cao, Analyzing the performance of variational quantum factoring on a superconducting quantum processor, npj Quantum Inf. 7, 156 (2021).
- V. Phan, A. Pönni, M. Raasakka, and I. Tittonen, On quantum factoring using noisy intermediate scale quantum computers, arXiv:2208.07085.
- M. Motta, C. Sun, A. T. K. Tan, M. J. O'Rourke, E. Ye, A. J. Minnich, F. G. S. L. Brandão, and G. K.-L. Chan, Determining eigenstates and thermal states on a quantum computer using quantum imaginary time evolution, Nat. Phys. 16, 205 (2020).
- S. McArdle, T. Jones, S. Endo, Y. Li, S. C. Benjamin, and X. Yuan, Variational ansatz-based quantum simulation of imaginary time evolution, npj Quantum Inf. 5, 75 (2019).
- R. Selvarajan, V. Dixit, X. Cui, T. S. Humble, and S. Kais, Prime factorization using quantum variational imaginary time evolution, Sci. Rep. 11, 20835 (2021).
- R. Dhaulakhandi, B. K. Behera, and F. J. Seo, Factorization of large tetra and penta prime numbers on IBM quantum processor, APL Quantum 1, 026113 (2024).
- B. Yan, Z. Tan, S. Wei, H. Jiang, W. Wang, H. Wang, L. Luo, Q. Duan, Y. Liu, W. Shi, Y. Fei, X. Meng, Y. Han, Z. Shan, J. Chen, X. Zhu, C. Zhang, F. Jin, H. Li, C. Song, Z. Wang, Z. Ma, H. Wang, and G.-L. Long, Factoring integers with sublinear resources on a superconducting quantum processor, arXiv:2212.12372.
- N. N. Hegade and E. Solano, Digitized-counterdiabatic quantum factorization, Phys. Rev. Res. 4, L042030 (2022).
- M. J. D. Powell, A Direct Search Optimization Method that Models the Objective and Constraint Functions By Linear Interpolation, (Springer, Dordrecht, 1994), pp. 51–67.
- T. M. Ragonneau and Z. Zhang, PDFO: A cross-platform package for Powell's derivative-free optimization solvers, arXiv:2302.13246.
- P. Diez-Valle and J. J. Garcia-Ripoll, Quantum variational optimization: The role of entanglement and problem hardness, Phys. Rev. A 104, 062426 (2021).
- T. M. Ragonneau, Model-based derivative-free optimization sethods and software, arXiv:2210.12018.
- A. Javadi-Abhari, M. Treinish, K. Krsulich, C. J. Wood, J. Lishman, J. Gacon, S. Martiel, P. D. Nation, L. S. Bishop, A. W. Cross, B. R. Johnson, J. M. Gambetta, Quantum computing with Qiskit, arXiv:2405.08810.
- S. Seabold and J. Perktold, Statsmodels: Econometric and statistical modeling with Python, Proceedings of the 9th Python in Science Conference (SciPy, Austin, Texas, USA, 2010).
- K. M. Nakanishi, K. Fujii, and S. Todo, Sequential minimal optimization for quantum-classical hybrid algorithms, Phys. Rev. Res. 2, 043158 (2020).
- M. Cerezo, A. Sone, T. Volkoff, L. Cincio, and P. J. Coles, Cost function dependent barren plateaus in shallow parametrized quantum circuits, Nat. Commun. 12, 1791 (2021).
- Y. Chai, K. Jansen, S. Kühn, T. Schwägerl, and T. Stollenwerk, Structure-inspired ansatz and warm start of variational quantum algorithms for quadratic unconstrained binary optimization problems, arXiv:2407.02569.
- L. M. K. Vandersypen, M. Steffen, G. Breyta, C. S. Yannoni, M. H. Sherwood, and I. L. Chuang, Experimental realization of Shor's quantum factoring algorithm using nuclear magnetic resonance, Nature (London) 414, 883 (2001).
- B. P. Lanyon, T. J. Weinhold, N. K. Langford, M. Barbieri, D. F. V. James, A. Gilchrist, and A. G. White, Experimental demonstration of a compiled version of shor's algorithm with quantum entanglement, Phys. Rev. Lett. 99, 250505 (2007).
- C. Y. Lu, D. E. Browne, T. Yang, and J. W. Pan, Demonstration of a compiled version of Shor's quantum factoring algorithm using photonic qubits, Phys. Rev. Lett. 99, 250504 (2007).
- A. Politi, C. F. J. Matthews, and J. L. O'Brien, Shor's quantum factoring algorithm on a photonic chip, Science 325, 1221 (2009).
- N. Xu, J. Zhu, D. Lu, X. Zhou, X. Peng, and J. Du, Quantum factorization of 143 on a dipolar-coupling nuclear magnetic resonance system, Phys. Rev. Lett. 109, 269902 (2012).
- E. Lucero, R. Barends, Y. Chen, J. Kelly, M. Mariantoni, A. Megrant, P. O'Malley, D. Sank, A. Vainsencher, J. Wenner, T. White, Y. Yin, A. N. Cleland, and J. M. Martinis, Computing prime factors with a Josephson phase qubit quantum processor, Nat. Phys. 8, 719 (2012).
- E. Martín-López, A. Laing, T. Lawson, R. Alvarez, X.-Q. Zhou, and J. L. O'Brien, Experimental realization of Shor's quantum factoring algorithm using qubit recycling, Nat. Photon. 6, 773 (2012).
- N. S. Dattani and N. Bryans, Quantum factorization of 56153 with only 4 qubits, arXiv:1411.6758.
- A. Dash, D. Sarmah, B. K. Behera, and P. K. Panigrahi, Exact search algorithm to factorize large biprimes and a triprime on IBM quantum computer, arXiv:1805.10478.
- W. Peng, B. Wang, F. Hu, Y. Wang, X. Fang, X. Chen, and C. Wang, Factoring larger integers with fewer qubits via quantum annealing with optimized parameters, Sci. China Phys. Mech. Astron. 62, 60311 (2019).