Abstract
The integer factorization problem is a major challenge in the field of computer science, and Shor’s algorithm provides a promising solution for this problem. However, Shor’s algorithm involves complex modular exponentiation computation, which leads to the construction of complicated quantum circuits. Moreover, the precision of continued fraction computations in Shor’s algorithm is influenced by the number of qubits, making it difficult to implement the algorithm on Noisy Intermediate-Scale Quantum (NISQ) computers. To address these issues, this paper proposes variational quantum computation integer factorization (VQCIF) algorithm based on variational quantum algorithm (VQA). Inspired by classical computing, this algorithm utilizes the parallelism of quantum computing to calculate the product of parameterized quantum states. Subsequently, the quantum multi-control gate is used to map the product satisfying \(pq=N\) onto an auxiliary qubit. Then the variational quantum circuit is adjusted by the optimizer, and it is possible to obtain a prime factor of the integer N with a high probability. While maintaining generality, VQCIF has a simple quantum circuit structure and requires only \(2n+1\) qubits. Furthermore, the time complexity is exponentially accelerated. VQCIF algorithm is implemented using the Qiskit framework, and tests are conducted on factorization instances to demonstrate its feasibility.
Similar content being viewed by others
Availability of data and materials
The datasets used or analyzed during the current study are available from the corresponding author upon reasonable request.
References
Bhatia, V., Ramkumar, K.R.: An efficient quantum computing technique for cracking rsa using shor’s algorithm. In: 2020 IEEE 5th international conference on computing communication and automation (ICCCA), pp. 89–94 (2020). https://doi.org/10.1109/ICCCA49541.2020.9250806
Maslov, D., Nam, Y., Kim, J.: An outlook for quantum computing [point of view]. Proc. IEEE. 107(1), 5–10 (2019). https://doi.org/10.1109/JPROC.2018.2884353
Shor, P.W.: Algorithms for quantum computation: discrete logarithms and factoring. In: Proceedings 35th annual symposium on foundations of computer science, pp. 124–134 (1994). https://doi.org/10.1109/SFCS.1994.365700
Grover, L.K.: A fast quantum mechanical algorithm for database search. In: Proceedings of the twenty-eighth annual acm symposium on theory of computing. STOC ’96, pp. 212–219. Association for Computing Machinery, New York, NY, USA (1996). https://doi.org/10.1145/237814.237866
Harrow, A.W., Hassidim, A., Lloyd, S.: Quantum algorithm for linear systems of equations. Phys. Rev. Lett. 103, 150502 (2009). https://doi.org/10.1103/PhysRevLett.103.150502
Li, Z., Liu, X., Xu, N., Du, J.: Experimental realization of a quantum support vector machine. Phys. Rev. Lett. 114, 140504 (2015). https://doi.org/10.1103/PhysRevLett.114.140504
Li, H., Jiang, N., Zhang, R., Wang, Z., Wang, H.: Quantum support vector machine based on gradient descent. Int. J. Theor. Phys. 61(3), 92 (2022). https://doi.org/10.1007/s10773-022-05040-x
Lloyd, S., Mohseni, M., Rebentrost, P.: Quantum principal component analysis. Nat. Phys. 10(9), 631–633 (2014). https://doi.org/10.1038/nphys3029
Kerenidis, I., Landman, J.: Quantum spectral clustering. Phys. Rev. A. 103, 042415 (2021). https://doi.org/10.1103/PhysRevA.103.042415
Li, Q., Huang, Y., Jin, S., Hou, X., Wang, X.: Quantum spectral clustering algorithm for unsupervised learning. Sci. China Inf. Sci. 65(10), 200504 (2022). https://doi.org/10.1007/s11432-022-3492-x
Rivest, R.L., Shamir, A., Adleman, L.: A method for obtaining digital signatures and public-key cryptosystems. Commun. ACM. 21(2), 120–126 (1978). https://doi.org/10.1145/359340.359342
Benenti, G., Casati, G., Rossini, D., Strini, G.: Principles of Quantum Computation and Information. World Scientific, Singapore (2019). https://doi.org/10.1142/9789813237230_0001
Beauregard, S.: Circuit for shor’s algorithm using 2n+3 qubits. Quantum Info. Comput. 3(2), 175–185 (2003). https://doi.org/10.5555/2011517.2011525
Nielsen, M.A., Chuang, I.L.: Quantum Computation and Quantum Information. Cambridge University press, Cambridge (2010). https://doi.org/10.1017/CBO9780511976667
Häner, T., Roetteler, M., Svore, K.M.: Factoring using \(2n + 2\) qubits with toffoli based modular multiplication. Quantum Info. Comput. 17(7–8), 673–684 (2017). https://doi.org/10.5555/3179553.3179560
Gamel, O., James, D.F.V.: Simplified Factoring Algorithms for Validating Small-Scale Quantum Information Processing Technologies (2013). https://doi.org/10.48550/arXiv.1310.6446
Geller, M.R., Zhou, Z.: Factoring 51 and 85 with 8 qubits. Sci Rep. 3(1), 3023 (2013). https://doi.org/10.1038/srep03023
Xiao, L., Qiu, D., Luo, L., Mateus, P.: Distributed shor’s algorithm. Quantum Inform. Comput. 23(1-2), 27–44 (2023). https://doi.org/10.26421/QIC23.1-2-3
Xiao, L., Qiu, D., Luo, L., Mateus, P.: Distributed Quantum-classical Hybrid Shor’s Algorithm (2023). https://doi.org/10.48550/arXiv.2304.12100
Bennett, C.H., Brassard, G., Crépeau, C., Jozsa, R., Peres, A., Wootters, W.K.: Teleporting an unknown quantum state via dual classical and einstein-podolsky-rosen channels. Phys Rev Lett. 70(13), 1895 (1993). https://doi.org/10.1103/PhysRevLett.70.1895
Wang, B., Hu, F., Yao, H., Wang, C.: Prime factorization algorithm based on parameter optimization of ising model. Sci. Rep. 10(1), 7106 (2020). https://doi.org/10.1038/s41598-020-62802-5
Anschuetz, E., Olson, J., Aspuru-Guzik, A., Cao, Y.: Variational quantum factoring. In: Feld, S., Linnhoff-Popien, C. (eds.) Quantum Technology and Optimization Problems, pp. 74–85. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-14082-3_7
Choi, J., Kim, J.: A tutorial on quantum approximate optimization algorithm (qaoa): Fundamentals and applications. In: 2019 international conference on information and communication technology convergence (ICTC), pp. 138–142 (2019). https://doi.org/10.1109/ICTC46691.2019.8939749
Preskill, J.: Quantum Computing in the NISQ era and beyond. Quantum. 2, 79 (2018). https://doi.org/10.22331/q-2018-08-06-79
Cerezo, M., Arrasmith, A., Babbush, R., Benjamin, S.C., Endo, S., Fujii, K., McClean, J.R., Mitarai, K., Yuan, X., Cincio, L., et al.: Variational quantum algorithms. Nat. Rev. Phys. 3(9), 625–644 (2021). https://doi.org/10.1038/s42254-021-00348-9
Treinish, M., Gambetta, J., Thomas, S., qiskit-bot, Nation, P., Kassebaum, P., Arellano, E., Rodríguez, D.M., Puente González, S., Bello, L., Lishman, J., Hu, S., Garrison, J., Huang, J., Krsulich, K., Yu, J., Gacon, J., Marques, M., McKay, D., Gomez, J., Capelluto, L., Wood, S., Travis-S-IBM, Mitchell, A., Panigrahi, A., Hartman, K., lerongil, Rahman, R.I., Itoko, T., Pozas-Kerstjens, A.: Qiskit/qiskit-metapackage: Qiskit 0.43.2. https://doi.org/10.5281/zenodo.8090426
Schuld, M., Petruccione, F.: Supervised Learning with Quantum Computers vol. 17. Springer, Switzerland (2018). https://doi.org/10.1007/978-3-319-96424-9
Schuld, M.: Supervised quantum machine learning models are kernel methods. arXiv preprint arXiv:2101.11020. (2021) https://doi.org/10.48550/arXiv.2101.11020
Araujo, I.F., Park, D.K., Ludermir, T.B., Oliveira, W.R., Petruccione, F., Silva, A.J.: Configurable sublinear circuits for quantum state preparation. Quantum Inf. Process. 22(2), 123 (2023). https://doi.org/10.1007/s11128-023-03869-7
Ghosh, K.: Encoding classical data into a quantum computer (2021). https://doi.org/10.48550/arXiv.2107.09155
Havlíček, V., Córcoles, A.D., Temme, K., Harrow, A.W., Kandala, A., Chow, J.M., Gambetta, J.M.: Supervised learning with quantum-enhanced feature spaces. Nature. 567(7747), 209–212 (2019). https://doi.org/10.1038/s41586-019-0980-2
LaRose, R., Coyle, B.: Robust data encodings for quantum classifiers. Phys. Rev. A. 102, 032420 (2020). https://doi.org/10.1103/PhysRevA.102.032420
Sim, S., Johnson, P.D., Aspuru-Guzik, A.: Expressibility and entangling capability of parameterized quantum circuits for hybrid quantum-classical algorithms. Adv. Quantum Technol. 2(12), 1900070 (2019). https://doi.org/10.1002/qute.201900070
Kandala, A., Mezzacapo, A., Temme, K., Takita, M., Brink, M., Chow, J.M., Gambetta, J.M.: Hardware-efficient variational quantum eigensolver for small molecules and quantum magnets. nature. 549(7671), 242–246 (2017). https://doi.org/10.1038/nature23879
Schuld, M., Bergholm, V., Gogolin, C., Izaac, J., Killoran, N.: Evaluating analytic gradients on quantum hardware. Phys. Rev. A. 99, 032331 (2019). https://doi.org/10.1103/PhysRevA.99.032331
Stokes, J., Izaac, J., Killoran, N., Carleo, G.: Quantum Natural Gradient. Quantum. 4, 269 (2020). https://doi.org/10.22331/q-2020-05-25-269
Gacon, J., Zoufal, C., Carleo, G., Woerner, S.: Simultaneous Perturbation Stochastic Approximation of the Quantum Fisher Information. Quantum. 5, 567 (2021). https://doi.org/10.22331/q-2021-10-20-567
Powell, M.J.: A Direct Search Optimization Method that Models the Objective and Constraint Functions by Linear Interpolation. Springer, Dordrecht (1994). https://doi.org/10.1007/978-94-015-8330-5_4
Ruiz-Perez, L., Garcia-Escartin, J.C.: Quantum arithmetic with the quantum fourier transform. Quantum Inf. Process. 16, 1–14 (2017). https://doi.org/10.1007/s11128-017-1603-1
Weinstein, Y.S., Pravia, M.A., Fortunato, E.M., Lloyd, S., Cory, D.G.: Implementation of the quantum fourier transform. Phys. Rev. Lett. 86, 1889–1891 (2001). https://doi.org/10.1103/PhysRevLett.86.1889
Silva, A.J., Park, D.K.: Linear-depth quantum circuits for multiqubit controlled gates. Phys. Rev. A. 106, 042602 (2022). https://doi.org/10.1103/PhysRevA.106.042602
Barenco, A., Bennett, C.H., Cleve, R., DiVincenzo, D.P., Margolus, N., Shor, P., Sleator, T., Smolin, J.A., Weinfurter, H.: Elementary gates for quantum computation. Phys Rev A. 52(5), 3457 (1995). https://doi.org/10.1103/PhysRevA.52.3457
Funding
This work is supported by the Beijing Natural Science Foundation No.4212015.
Author information
Authors and Affiliations
Contributions
All authors contributed to the study conception and design. Dr. Xinglan Zhang provided guidance for the experimental work and manuscript writing, as well as offered assistance in securing funding. Experimental preparation and analysis were performed by Feng Zhang. Xinglan Zhang and Feng Zhang wrote the main manuscript text. All authors read and approved the final manuscript.
Corresponding author
Ethics declarations
Conflicts of interest
On behalf of all authors, the corresponding author states that there is no conflict of interest.
Competing Interests
The authors have no relevant financial or non-financial interests to disclose.
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Supplementary Information
Below is the link to the electronic supplementary material.
Rights and permissions
Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.
About this article
Cite this article
Zhang, X., Zhang, F. Variational Quantum Computation Integer Factorization Algorithm. Int J Theor Phys 62, 245 (2023). https://doi.org/10.1007/s10773-023-05473-y
Received:
Accepted:
Published:
DOI: https://doi.org/10.1007/s10773-023-05473-y