Skip to main content
Log in

Practical circuit optimization algorithm for quantum simulation based on template matching

  • Published:
Quantum Information Processing Aims and scope Submit manuscript

Abstract

We propose a circuit optimization algorithm that facilitates the implementation of various applications on noise intermediate-scale quantum (NISQ) devices. The algorithm is hardware-independent and reduces the overall circuit cost of Hamiltonian simulation, particularly by minimizing the number of CNOT gates. Our approach employs a sub-circuit synthesis scheme for intermediate representation and proposes the practical template matching algorithm (TM) for gate elimination to minimize CNOT counts. This algorithm demonstrates low complexity and enhances the circuit performance of Hamiltonian simulations. In our simulations, we benchmarked different algorithms across various Hamiltonian models to quantify and compare the benefits of our approach. Compared with advanced generic compilers and specific quantum compilers, the results obtained from simulating our algorithm show an average reduction of 1.5\(\times \) (up to 2.56\(\times \)) in CNOT counts, and 1.4\(\times \) (up to 3.1\(\times \)) in circuit depth. This improvement further advances the practical application of Hamiltonian simulation in the NISQ era.

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.

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
Algorithm 1
Fig. 19

Similar content being viewed by others

Data availability

The data and code that support the findings of this study are openly available at the following URL/:https://github.com/QUANTUM-AND-ML/QUANTUM-QuantumSimulation.git.

References

  1. Davis, M.G., Smith, E., Tudor, A., Sen, K., Siddiqi, I., Iancu, C.: Towards optimal topology aware quantum circuit synthesis. In: 2020 IEEE International Conference on Quantum Computing and Engineering (QCE), pp. 223–234 (2020). IEEE

  2. Preskill, J.: Quantum computing in the NISQ era and beyond. Quantum 2, 79 (2018)

    Article  Google Scholar 

  3. Bharti, K., Cervera-Lierta, A., Kyaw, T.H., Haug, T., Alperin-Lea, S., Anand, A., Degroote, M., Heimonen, H., Kottmann, J.S., Menke, T., et al.: Noisy intermediate-scale quantum (nisq) algorithms. arXiv preprint arXiv:2101.08448 (2021)

  4. Deutsch, I.H.: Harnessing the power of the second quantum revolution. PRX Quantum 1(2), 020101 (2020)

    Article  Google Scholar 

  5. Cerezo, M., Arrasmith, A., Babbush, R., Benjamin, S.C., Endo, S., Fujii, K., McClean, J.R., Mitarai, K., Yuan, X., Cincio, L.: Variational quantum algorithms. Nat. Rev. Phys. 3(9), 625–644 (2021)

    Article  Google Scholar 

  6. Peruzzo, A., McClean, J., Shadbolt, P., Yung, M.-H., Zhou, X.-Q., Love, P.J., Aspuru-Guzik, A., O’brien, J.L.: A variational eigenvalue solver on a photonic quantum processor. Nat. Commun. 5(1), 1–7 (2014)

    Article  Google Scholar 

  7. McClean, J.R., Romero, J., Babbush, R., Aspuru-Guzik, A.: The theory of variational hybrid quantum-classical algorithms. New J. Phys. 18(2), 023023 (2016)

    Article  ADS  Google Scholar 

  8. Bharti, K.: Quantum assisted eigensolver. arXiv preprint arXiv:2009.11001 (2020)

  9. Bharti, K., Haug, T.: Iterative quantum-assisted eigensolver. Phys. Rev. A 104(5), 050401 (2021)

    Article  ADS  MathSciNet  Google Scholar 

  10. Raeisi, S., Wiebe, N., Sanders, B.C.: Quantum-circuit design for efficient simulations of many-body quantum dynamics. New J. Phys. 14(10), 103017 (2012)

    Article  ADS  Google Scholar 

  11. Tranter, A., Love, P.J., Mintert, F., Coveney, P.V.: A comparison of the bravyi-kitaev and jordan-wigner transformations for the quantum simulation of quantum chemistry. J. Chem. Theory Comput. 14(11), 5617–5630 (2018)

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  12. Babbush, R., McClean, J., Wecker, D., Aspuru-Guzik, A., Wiebe, N.: Chemical basis of trotter-suzuki errors in quantum chemistry simulation. Phys. Rev. A 91(2), 022311 (2015)

    Article  ADS  Google Scholar 

  13. Suzuki, M.: General theory of fractal path integrals with applications to many-body theories and statistical physics. J. Math. Phys. 32(2), 400–407 (1991)

    Article  ADS  MathSciNet  Google Scholar 

  14. Trotter, H.F.: On the product of semi-groups of operators. Proc. Am. Math. Soc. 10(4), 545–551 (1959)

    Article  MathSciNet  Google Scholar 

  15. Berry, D.W., Childs, A.M.: Black-box hamiltonian simulation and unitary implementation. arXiv preprint arXiv:0910.4157 (2009)

  16. Childs, A.M., Wiebe, N.: Hamiltonian simulation using linear combinations of unitary operations. arXiv preprint arXiv:1202.5822 (2012)

  17. Low, G.H., Chuang, I.L.: Hamiltonian simulation by qubitization. Quantum 3, 163 (2019)

    Article  Google Scholar 

  18. Berry, D.W., Childs, A.M., Cleve, R., Kothari, R., Somma, R.D.: Simulating Hamiltonian dynamics with a truncated Taylor series. Phys. Rev. Lett. 114(9), 090502 (2015)

    Article  ADS  PubMed  Google Scholar 

  19. Low, G.H., Chuang, I.L.: Simulación hamiltoniana óptima mediante procesamiento cuántico de señales. Phys. Rev. Lett 118(010501), 10–1103 (2017)

    Google Scholar 

  20. Hu, Y., Meng, F., Wang, X., Luan, T., Fu, Y., Zhang, Z., Zhang, X., Yu, X.: Greedy algorithm based circuit optimization for near-term quantum simulation. Quantum Sci. Technol. 7(4), 045001 (2022)

    Article  ADS  Google Scholar 

  21. Mukhopadhyay, P., Wiebe, N., Zhang, H.T.: Synthesizing efficient circuits for Hamiltonian simulation. npj Quantum Inf. 9(1), 31 (2023)

    Article  ADS  Google Scholar 

  22. Davis, M.G., Smith, E., Tudor, A., Sen, K., Siddiqi, I., Iancu, C.: Heuristics for quantum compiling with a continuous gate set. arXiv preprint arXiv:1912.02727 (2019)

  23. Nielsen, M.A., Chuang, I.: Quantum computation and quantum information. American Association of Physics Teachers (2002)

  24. Davis, M.G., Smith, E., Tudor, A., Sen, K., Siddiqi, I., Iancu, C.: Towards optimal topology aware quantum circuit synthesis. In: 2020 IEEE International Conference on Quantum Computing and Engineering (QCE), pp. 223–234 (2020). IEEE

  25. Cowtan, A., Dilkes, S., Duncan, R., Simmons, W., Sivarajah, S.: Phase gadget synthesis for shallow circuits. arXiv preprint arXiv:1906.01734 (2019)

  26. Li, G., Wu, A., Shi, Y., Javadi-Abhari, A., Ding, Y., Xie, Y.: Paulihedral: a generalized block-wise compiler optimization framework for quantum simulation kernels. In: Proceedings of the 27th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, pp. 554–569 (2022)

  27. van de Wetering, J.: Zx-calculus for the working quantum computer scientist. arXiv preprint arXiv:2012.13966 (2020)

  28. Duncan, R., Kissinger, A., Perdrix, S., Van De Wetering, J.: Graph-theoretic simplification of quantum circuits with the zx-calculus. Quantum 4, 279 (2020)

    Article  Google Scholar 

  29. Kissinger, A., van de Wetering, J.: Reducing the number of non-clifford gates in quantum circuits. Phys. Rev. A 102(2), 022406 (2020)

    Article  ADS  MathSciNet  CAS  Google Scholar 

  30. de Beaudrap, N., Horsman, D.: The zx calculus is a language for surface code lattice surgery. Quantum 4, 218 (2020)

    Article  Google Scholar 

  31. de Beaudrap, N., Duncan, R., Horsman, D., Perdrix, S.: Pauli fusion: a computational model to realise quantum transformations from zx terms. arXiv preprint arXiv:1904.12817 (2019)

  32. Hanks, M., Estarellas, M.P., Munro, W.J., Nemoto, K.: Effective compression of quantum braided circuits aided by zx-calculus. Phys. Rev. X 10(4), 041030 (2020)

    CAS  Google Scholar 

  33. Chancellor, N., Kissinger, A., Roffe, J., Zohren, S., Horsman, D.: Graphical structures for design and verification of quantum error correction. arXiv preprint arXiv:1611.08012 (2016)

  34. Duncan, R., Lucas, M.: Verifying the steane code with quantomatic. arXiv preprint arXiv:1306.4532 (2013)

  35. Garvie, L., Duncan, R.: Verifying the smallest interesting colour code with quantomatic. arXiv preprint arXiv:1706.02717 (2017)

  36. Lao, L., Browne, D.E.: 2qan: A quantum compiler for 2-local qubit hamiltonian simulation algorithms. In: Proceedings of the 49th Annual International Symposium on Computer Architecture, pp. 351–365 (2022)

  37. Bilkis, M., Cerezo, M., Verdon, G., Coles, P.J., Cincio, L.: A semi-agnostic ansatz with variable structure for quantum machine learning. arXiv preprint arXiv:2103.06712 (2021)

  38. Anis, M.S., Abraham, H., AduOffei, R.A., Agliardi, G., Aharoni, M., Akhalwaya, I.Y., Aleksandrowicz, G., Alexander, T., et al.: Qiskit: An open-source framework for quantum computing. 2021. SUPPLEMENTARY INFORMATION I. ALGORITHMS II. A RELAXATION BOUND (| E| 2+ 1 9 \(\alpha \)| E| 2+ \(\alpha \)) Remark 4

  39. Sivarajah, S., Dilkes, S., Cowtan, A., Simmons, W., Edgington, A., Duncan, R.: t\(\vert ket\rangle \): a retargetable compiler for NISQ devices. Quantum Sci. Technol. 6(1), 014003 (2020)

    Article  ADS  Google Scholar 

Download references

Acknowledgements

This work was supported by the National Science Foundation of China (Nos. 61871111 and 61960206005), Jiangsu Key R &D Program Project (No. BE2023011-2), Jiangsu Funding Program for Excellent Postdoctoral Talent (No.2022ZB139), the Fundamental Research Funds for the Central Universities (2242022k60001), and the research fund of National Mobile Communications Research Lab. (2024A04), and the Opening Project of Key Laboratory of Medical Electronics and Digital Health of Zhejiang Province (No. MEDH202202).

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Zaichen Zhang.

Ethics declarations

Conflict of interest

The authors declare that they have no conflict of interest.

Additional information

Publisher's Note

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

Appendix A

Appendix A

Figure 20, 21, 22, 23, 24, 25, 26, 27 and 28 shows the proof of the equivalent circuits of Pauli intermediate representation (IR) using ZX-calculus, where \(\delta =2\theta \).

Fig. 20
figure 20

Equivalent circuit proof procedure for the two-local \(X\otimes X\) operator

Fig. 21
figure 21

Equivalent circuit proof procedure for the two-local \(X\otimes Y\) operator

Fig. 22
figure 22

Equivalent circuit proof procedure for the two-local \(X\otimes Z\) operator

Fig. 23
figure 23

Equivalent circuit proof procedure for the two-local \(Y\otimes X\) operator

Fig. 24
figure 24

Equivalent circuit proof procedure for the two-local \(Y\otimes Y\) operator

Fig. 25
figure 25

Equivalent circuit proof procedure for the two-local \(Y\otimes Z\) operator

Fig. 26
figure 26

Equivalent circuit proof procedure for the two-local \(Z\otimes X\) operator

Fig. 27
figure 27

Equivalent circuit proof procedure for the two-local \(Z\otimes Y\) operator

Fig. 28
figure 28

Equivalent circuit proof procedure for the two-local \(Z\otimes Z\) operator

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

Liu, Y., Zhang, Z., Hu, Y. et al. Practical circuit optimization algorithm for quantum simulation based on template matching. Quantum Inf Process 23, 45 (2024). https://doi.org/10.1007/s11128-023-04252-2

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1007/s11128-023-04252-2

Keywords

Navigation