Skip to main content

Advertisement

Log in

Quantum modular multiplier via binary-exponent-based recombination

  • Published:
Quantum Information Processing Aims and scope Submit manuscript

Abstract

Shor’s factoring algorithm contains controlled modular exponentiation which can be further reduced as a series of controlled modular multipliers with constant. For the controlled modular multiplier with constant, this paper proposes a binary-exponent-based recombination (BER) protocol which could substantially reduce the number of addends. Based on the BER protocol, BER algorithms are constructed by the topdown hierarchy of controlled modular exponentiation, controlled modular multiplier with constant, controlled modular adder and plain adders. A complexity analysis reveals that BER algorithm reduces the number of plain adders in the controlled modular exponentiation by an average of about 42% compared with Vedral–Barenco–Ekert algorithm, thus significantly decreasing the depth and total Toffoli gates of the quantum circuits. The BER protocol can be widely used in various controlled modular multipliers as a promising ingredient of quantum factoring algorithm.

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

Access this article

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

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

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13
Fig. 14
Fig. 15
Fig. 16
Fig. 17
Fig. 18
Fig. 19
Fig. 20
Fig. 21

Similar content being viewed by others

Explore related subjects

Discover the latest articles, news and stories from top researchers in related subjects.

Availability of data and materials

The data that support the findings of this study are available from the corresponding author QA upon reasonable request.

References

  1. Castelvecchi, D.: Preparing for qday. Nature 602, 198–201 (2022)

    Article  ADS  Google Scholar 

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

  3. Nam, Y., Ross, N.J., Su, Y., Childs, A.M., Maslov, D.: Automated optimization of large quantum circuits with continuous parameters. npj Quantum Inf. 4(1), 1– 12 (2018)

  4. Dumitrescu, E.: Tree tensor network approach to simulating Shor’s algorithm. Phys. Rev. A 96(6), 062322 (2017)

  5. Markov, I.L., Saeedi, M.: Faster quantum number factoring via circuit synthesis. Phys. Rev. A 87(1), 012310 (2013)

    Article  ADS  Google Scholar 

  6. Gouzien, E., Sangouard, N.: Factoring 2048-bit rsa integers in 177 days with 13,436 qubits and a multimode memory. Phys. Rev. Lett. 127, 140503 (2021). https://doi.org/10.1103/PhysRevLett.127.140503

    Article  ADS  Google Scholar 

  7. Gidney, C., Ekerå, M.: How to factor 2048 bit rsa integers in 8 hours using 20 million noisy qubits. Quantum 5, 433 (2021)

    Article  Google Scholar 

  8. Lucero, E., Barends, R., Chen, Y., Kelly, J., Mariantoni, M., Megrant, A., O’Malley, P., Sank, D., Vainsencher, A., Wenner, J., et al.: Computing prime factors with a Josephson phase qubit quantum processor. Nat. Phys. 8(10), 719–723 (2012)

  9. Martin-Lopez, 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)

  10. Monz, T., Nigg, D., Martinez, E.A., Brandl, M.F., Schindler, P., Rines, R., Wang, S.X., Chuang, I.L., Blatt, R.: Realization of a scalable Shor algorithm. Science 351(6277), 1068–1070 (2016)

    Article  MathSciNet  MATH  ADS  Google Scholar 

  11. Rines, R., Chuang, I.: High performance quantum modular multipliers. arXiv preprint arXiv:1801.01081 (2018)

  12. Peng, X., Liao, Z., Xu, N., Qin, G., Zhou, X., Suter, D., Du, J.: Quantum adiabatic algorithm for factorization and its experimental implementation. Phys. Rev. Lett. 101(22), 220405 (2008)

    Article  ADS  Google Scholar 

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

  14. Ekerå, M., Håstad, J.: Quantum algorithms for computing short discrete logarithms and factoring rsa integers. In: International Workshop on Post-Quantum Cryptography, pp. 347– 363 (2017). Springer

  15. Vedral, V., Barenco, A., Ekert, A.: Quantum networks for elementary arithmetic operations. Phys. Rev. A 54(1), 147 (1996)

    Article  MathSciNet  ADS  Google Scholar 

  16. Zalka, C.: Fast versions of Shor’s quantum factoring algorithm. arXiv preprint arXiv:quant-ph/9806084 (1998)

  17. Van Meter, R., Itoh, K.M.: Fast quantum modular exponentiation. Phys. Rev. A 71(5), 052320 (2005)

    Article  MathSciNet  MATH  ADS  Google Scholar 

  18. Pavlidis, A., Gizopoulos, D.: Fast quantum modular exponentiation architecture for Shor’s factorization algorithm. Quantum Inf. Comput. 14(7 and 8), 649– 682 (2014)

  19. Pham, P., Svore, K.M.: A 2D nearest-neighbor quantum architecture for factoring in polylogarithmic depth. Quantum Inf Comput 13(11 and 12), 0937– 0962 (2013)

  20. Draper, T.G., Kutin, S.A., Rains, E.M., Svore, K.M.: A logarithmic-depth quantum carry-lookahead adder. Quantum Inf. Comput. 6(4), 351–369 (2006)

    MathSciNet  MATH  Google Scholar 

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

  22. Gidney, C.: Factoring with \(n+ 2\) clean qubits and \(n-1\) dirty qubits. arXiv preprint arXiv:1706.07884 (2017)

  23. Davies, J., Rickerd, C.J., Grimes, M.A., Guney, D.O.: An n-bit general implementation of Shor’s quantum period-finding algorithm. arXiv preprint arXiv:1612.07424 (2016)

  24. Beckman, D., Chari, A.N., Devabhaktuni, S., Preskill, J.: Efficient networks for quantum factoring. Phys. Rev. A 54(2), 1034 (1996)

    Article  MathSciNet  ADS  Google Scholar 

  25. Cuccaro, S.A., Draper, T.G., Kutin, S.A., Moulton, D.P.: A new quantum ripple-carry addition circuit. arXiv preprint arXiv:quant-ph/0410184 (2004)

  26. Takahashi, Y., Kunihiro, N.: A linear-size quantum circuit for addition with no ancillary qubits. Quantum Inf. Comput. 5(6), 440–448 (2005)

    MathSciNet  MATH  Google Scholar 

  27. Gossett, P.: Quantum carry-save arithmetic. arXiv preprint arXiv: quant-ph/9808061 (1998)

  28. Oonishi, K., Tanaka, T., Uno, S., Satoh, T., Van Meter, R., Kunihiro, N.: Efficient construction of a control modular adder on a carry-lookahead adder using relative-phase Toffoli gates. IEEE Trans. Quantum Eng. 3, 1–18 (2021)

    Article  Google Scholar 

  29. Draper, T.G.: Addition on a quantum computer. arXiv preprint arXiv:quant-ph/0008033 (2000)

  30. Fowler, A.G., Devitt, S.J., Hollenberg, L.C.: Implementation of Shor’s algorithm on a linear nearest neighbour qubit array. Quantum Inf. Comput. 4(4), 237–251 (2004)

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

  32. Gidney, C.: Approximate encoded permutations and piecewise quantum adders. arXiv preprint arXiv:1905.08488 (2019)

  33. Pavlidis, A., Floratos, E.: Quantum-Fourier-transform-based quantum arithmetic with qudits. Phys. Rev. A 103, 032417 (2021)

    Article  MathSciNet  ADS  Google Scholar 

  34. Kutin, S.A.: Shor’s algorithm on a nearest-neighbor machine. arXiv preprint arXiv:quant-ph/0609001 (2006)

  35. Gidney, C.: Windowed quantum arithmetic. arXiv preprint arXiv:1905.07682 (2019)

  36. Nam, Y.S., Blümel, R.: Scaling laws for Shor’s algorithm with a banded quantum Fourier transform. Phys. Rev. A 87(3), 032333 (2013)

  37. IBM: https://www.qiskit.org/

  38. Pham, P., Svore, K.M.: A 2D nearest-neighbor quantum architecture for factoring in polylogarithmic depth. Quantum Inf. Comput. 13(11–12), 937–962 (2013)

    MathSciNet  Google Scholar 

  39. Parker, S., Plenio, M.B.: Efficient factorization with a single pure qubit and log \(n\) mixed qubits. Phys. Rev. Lett. 85(14), 3049 (2000)

    Article  ADS  Google Scholar 

Download references

Acknowledgements

We thank Rutian Huang, Qing Yu, Xinyu Wu, Mingjun Cheng and Liangliang Yang for fruitful comments and discussions. This work is partially supported by the National Natural Science Foundation of China (Grant No. 60836001) and key R &D program of Guangdong province (Grant No. 2019B010143002).

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Wei Chen.

Ethics declarations

Code availability

The codes that implement the truth table of BER algorithm when the constant \(c=4\) and the modulo \(N=21\) using Qiskit are available from the authors on reasonable request.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Appendices

Appendix A: BER procedures for mod 21

Figure 16 illustrates the procedures of BER protocol for \((-c^{-1})_{21}B\mathrm mod\) 21 where \(c=4\), and the result is presented in Eq. (19) of Sect. 3.3. Figure 17 displays the procedures of BER protocol for \(c^{-1}B\mathrm mod\) 21 where \(c=4\), and the result is presented in Eq. (20) of Sect. 3.3.

Appendix B: Quantum circuits of subtractor

The operation of subtracting yN is equivalent to adding the product of y and N’s complement \(y(2^{n+1}-N)\) in Eq. (24). Figure 18 depicts the two types of subtractors.

Appendix C: BER-addends for 303

Two typical cases of addends generated by BER protocol when factoring 303 are displayed in Fig. 19. All the addends in Fig. 19a are less than 303 and thus the augmentation is not needed when the constant multiplicand \(c=19\). However, Fig. 19b illustrates the result of BER protocol when the constant multiplicand \(c=280\). It can be seen that, if \(a_{i}=1\) \((i=0,\ldots , 8)\), then \(A_{3}=511>303\) and \(A_{4}=319>303\). Therefore, the augmentation of addends is required and the result is shown in Fig. 19c.

Appendix D: Parallelization in QFT plain adder

In the QFT plain adders, the controlled rotation gates corresponding to different \(a'_{j}\) could be parallelized. In Fig. 20a, a QFT plain adder using BER protocol for the case of \(n=5\) before parallelization is displayed. In Fig. 20b, the controlled rotation gates are rearranged into 9 time slices denoted as \(\mathrm TS~1-9\) in the parallelized QFT plain adder. The controlled rotation gates in each time slice could be carried out concurrently.

Appendix E: Truth table for BER-ModMULT-C

Figure 21 lists the truth table of controlled modular multiplier with constant \(c=4\) which is verified for each input \(A (0\le A<21)\) by using IBM Qiskit [37].

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.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

He, Y., Zhao, C., Dai, G. et al. Quantum modular multiplier via binary-exponent-based recombination. Quantum Inf Process 21, 391 (2022). https://doi.org/10.1007/s11128-022-03736-x

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1007/s11128-022-03736-x

Keywords

Navigation