Skip to main content
Log in

Deterministic algorithms for compiling quantum circuits with recurrent patterns

  • Published:
Quantum Information Processing Aims and scope Submit manuscript

Abstract

Current quantum processors are noisy and have limited coherence and imperfect gate implementations. On such hardware, only algorithms that are shorter than the overall coherence time can be implemented and executed successfully. A good quantum compiler must translate an input program into the most efficient equivalent of itself, getting the most out of the available hardware. In this work, we present novel deterministic algorithms for compiling recurrent quantum circuit patterns in polynomial time. In particular, such patterns appear in quantum circuits that are used to compute the ground-state properties of molecular systems using the variational quantum eigensolver method together with the RyRz heuristic wavefunction Ansätz. We show that our pattern-oriented compiling algorithms, combined with an efficient swapping strategy, produces—in general—output programs that are comparable to those obtained with state-of-the-art compilers, in terms of CNOT count and CNOT depth. In particular, our solution produces unmatched results on RyRz circuits.

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.

Institutional subscriptions

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

Similar content being viewed by others

Notes

  1. Source code: https://github.com/qis-unipr/padqc.

  2. Benchmark circuits QASM files: https://github.com/qis-unipr/padqc/tree/master/benchmarks_qasm.

References

  1. Feynman, R.P.: Simulating physics with computers. Int. J. Theor. Phys. 21(6–7), 467 (1982). https://doi.org/10.1007/BF02650179

    Article  MathSciNet  Google Scholar 

  2. Shor, P.W.: Algorithms for quantum computation: discrete logarithms and factoring. In: Proceedings of 35th Annual Symposium on Foundations of Computer Science, pp. 124–134 (1994). https://doi.org/10.1109/SFCS.1994.365700

  3. Chiesa, A., Tacchino, F., Grossi, M., Santini, P., Tavernelli, I., Gerace, D., Carretta, S.: Quantum hardware simulating four-dimensional inelastic neutron scattering. Nat. Phys. 15, 455 (2019). https://doi.org/10.1038/s41567-019-0437-4

    Article  Google Scholar 

  4. Lloyd, S., Mohseni, M., Rebentrost, P.: Quantum principal component analysis. Nat. Phys. 10(9), 631 (2014). https://doi.org/10.1038/nphys3029

    Article  Google Scholar 

  5. Biamonte, J., Wittek, P., Pancotti, N., Rebentrost, P., Wiebe, N., Lloyd, S.: Quantum machine learning. Nature (2017). https://doi.org/10.1038/nature23474

    Article  Google Scholar 

  6. 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 (2019). https://doi.org/10.1038/s41586-019-0980-2

    Article  ADS  Google Scholar 

  7. Zoufal, C., Lucchi, A., Woerner, S.: Quantum generative adversarial networks for learning and loading random distributions. NPJ Quantum Inf. 5(1), 1 (2019). https://doi.org/10.1038/s41534-019-0223-2

    Article  Google Scholar 

  8. Cong, I., Choi, S., Lukin, M.D.: Quantum convolutional neural networks. Nat. Phys. (2019). https://doi.org/10.1038/s41567-019-0648-8

    Article  Google Scholar 

  9. Tacchino, F., Macchiavello, C., Gerace, D., Bajoni, D.: An artificial neuron implemented on an actual quantum processor. NPJ Quantum Inf. 5, 26:1 (2019). https://doi.org/10.1038/s41534-019-0140-4

    Article  Google Scholar 

  10. Ekert, A.K.: Quantum cryptography based on Bell’s theorem. Phys. Rev. Lett. 67, 661 (1991). https://doi.org/10.1103/PhysRevLett.67.661

    Article  ADS  MathSciNet  MATH  Google Scholar 

  11. Portmann, C., Renner, R.: Cryptographic security of quantum key distribution, cryptographic security of quantum key distribution. arXiv:1409.3525 (2014)

  12. Fitzsimons, J.F.: Private quantum computation: an introduction to blind quantum computing and related protocols. NPJ Quantum Inf. (2017). https://doi.org/10.1038/s41534-017-0025-3

    Article  Google Scholar 

  13. Córcoles, A.D., Kandala, A., Javadi-Abhari, A., McClure, D.T., Cross, A.W., Temme, K., Nation, P.D., Steffen, M., Gambetta, J.M.: Challenges and opportunities of near-term quantum computing systems. Proc. IEEE 108(8), 1338 (2020). https://doi.org/10.1109/JPROC.2019.2954005

    Article  Google Scholar 

  14. Botea, A., Kishimoto, A., Marinescu, R.: On the complexity of quantum circuit compilation. In: The Eleventh International Symposium on Combinatorial Search (SOCS 2018) (2018)

  15. Soeken, M., Meuli, G., Schmitt, B., Mozafari, F., Riener, H., De Micheli, G.: Boolean satisfiability in quantum compilation. Philos. Trans. R. Soc. A 378(2164), 1 (2019). https://doi.org/10.1098/rsta.2019.0161

    Article  MathSciNet  MATH  Google Scholar 

  16. Kliuchnikov, V., Maslov, D., Mosca, M.: Practical approximation of single-qubit unitaries by single-qubit quantum Clifford and T circuits. IEEE Trans. Comput. 65(1), 161 (2016). https://doi.org/10.1109/TC.2015.2409842

    Article  MathSciNet  MATH  Google Scholar 

  17. Munoz-Coreas, E., Thapliyal, H.: Quantum circuit design of a T-count optimized integer multiplier. IEEE Trans. Comput. 68(5), 729 (2019). https://doi.org/10.1109/TC.2018.2882774

    Article  MathSciNet  MATH  Google Scholar 

  18. 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 (2017). https://doi.org/10.1038/nature23879

    Article  ADS  Google Scholar 

  19. Li, G., Ding, Y., Xie, Y.: Tackling the qubit mapping problem for NISQ-era quantum devices. In: Proceedings of the Twenty-Fourth International Conference on Architectural Support for Programming Languages and Operating Systems (2019), ASPLOS 19, pp. 1001–1014. https://doi.org/10.1145/3297858.3304023

  20. Abraham, H., et al.: Qiskit: an open-source framework for quantum computing (2019). https://doi.org/10.5281/zenodo.2562110

  21. Sivarajah, S., Dilkes, S., Cowtan, A., Simmons, W., Edgington, A., Duncan, R.: t\(|\)ket\(\rangle \): a retargetable compiler for NISQ devices. Quantum Sci. Technol. 6(1), 014003 (2020). https://doi.org/10.1088/2058-9565/ab8e92

    Article  ADS  Google Scholar 

  22. Zulehner, A., Paler, A., Wille, R.: An efficient methodology for mapping quantum circuits to the IBM QX architectures. IEEE Trans. CAD Integr. Circuits Syst. 38(7), 1226 (2019). https://doi.org/10.1109/TCAD.2018.2846658

    Article  Google Scholar 

  23. Russell, S., Norvig, P.: Artificial Intelligence: A Modern Approach, 4th edn. Pearson, London (2020)

    MATH  Google Scholar 

  24. 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(4213), 1 (2014). https://doi.org/10.1038/ncomms5213

    Article  Google Scholar 

  25. Barkoutsos, P.K., Gonthier, J.F., Sokolov, I., Moll, N., Salis, G., Fuhrer, A., Ganzhorn, M., Egger, D.J., Troyer, M., Mezzacapo, A., Filipp, S., Tavernelli, I.: Quantum algorithms for electronic structure calculations: particle–hole Hamiltonian and optimized wave-function expansions. Phys. Rev. A 98, 022322 (2018). https://doi.org/10.1103/PhysRevA.98.022322

    Article  ADS  Google Scholar 

  26. IBM: Quantum computation center opens. https://www.ibm.com/blogs/research/2019/09/quantum-computation-center/

  27. Greenberger, D.M., Horne, M.A., Zeilinger, A.: Going beyond Bell’s theorem. In: Kafatos, M. (ed.) Bell’s Theorem, Quantum Theory, and Conceptions of the Universe, pp. 69–72. Kluwer Academic Publishers, Amsterdam (1989). https://doi.org/10.1007/978-94-017-0849-4_10

    Chapter  Google Scholar 

  28. Deffner, S.: Demonstration of entanglement assisted invariance on IBM’s quantum experience. Heliyon 3(11) (2017). https://doi.org/10.1016/j.heliyon.2017.e00444

  29. Ferrari, D., Amoretti, M.: Efficient and effective quantum compiling for entanglement-based machine learning on IBM Q devices. Int. J. Quantum Inf. 16(08) (2018). https://doi.org/10.1142/S0219749918400063

  30. Tucci, R.R.: QC Paulinesia. arXiv:quant-ph/0407215 (2004)

  31. Papadimitriou, C.H., Steiglitz, K.: Combinatorial Optimization: Algorithms and Complexity. Dover Books on Computer Science. Dover Publications, New York (1998)

    MATH  Google Scholar 

  32. Cross, A.W., Bishop, L.S., Smolin, J.A., Gambetta, J.M.: Open quantum assembly language. arXiv:1707.03429 (2017)

  33. Arute, F., Arya, K., Babbush, R., Bacon, D., et al.: Quantum supremacy using a programmable superconducting processor. Nature 574(7779), 505 (2019). https://doi.org/10.1038/s41586-019-1666-5

    Article  ADS  Google Scholar 

  34. Wille, R., Große, D., Teuber, L., Dueck, G.W., Drechsler, R.: RevLib: an online resource for reversible functions and reversible circuits. In: 38th International Symposium on Multiple Valued Logic (ISMVL 2008), pp. 220–225 (2008). https://doi.org/10.1109/ISMVL.2008.43

  35. Green, A.S., Lumsdaine, P.F., Ross, N.J., Selinger, P., Valiron, B.: Quipper: a scalable quantum programming language. SIGPLAN Not. 48(6), 333–342 (2013). https://doi.org/10.1145/2499370.2462177

    Article  MATH  Google Scholar 

  36. JavadiAbhari, A., Patil, S., Kudrow, D., Heckey, J., Lvov, A., Chong, F.T., Martonosi, M.: ScaffCC: Scalable compilation and analysis of quantum programs. Parallel Comput. 45, 2 (2015). https://doi.org/10.1016/j.parco.2014.12.001. (Computing Frontiers 2014: Best Papers)

    Article  Google Scholar 

Download references

Acknowledgements

This research benefited from the HPC (High Performance Computing) facility of the University of Parma, Italy.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Michele Amoretti.

Additional information

Publisher's Note

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

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Ferrari, D., Tavernelli, I. & Amoretti, M. Deterministic algorithms for compiling quantum circuits with recurrent patterns. Quantum Inf Process 20, 213 (2021). https://doi.org/10.1007/s11128-021-03150-9

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1007/s11128-021-03150-9

Keywords

Navigation