Quantum simulation with just-in-time compilation

Stavros Efthymiou1, Marco Lazzarin1, Andrea Pasquale1,2, and Stefano Carrazza1,2,3

1Quantum Research Centre, Technology Innovation Institute, Abu Dhabi, UAE.
2TIF Lab, Dipartimento di Fisica, Università degli Studi di Milano and INFN Sezione di Milano, Milan, Italy.
3CERN, Theoretical Physics Department, CH-1211 Geneva 23, Switzerland.

Find this paper interesting or want to discuss? Scite or leave a comment on SciRate.

Abstract

Quantum technologies are moving towards the development of novel hardware devices based on quantum bits (qubits). In parallel to the development of quantum devices, efficient simulation tools are needed in order to design and benchmark quantum algorithms and applications before deployment on quantum hardware. In this context, we present a first attempt to perform circuit-based quantum simulation using the just-in-time (JIT) compilation technique on multiple hardware architectures and configurations based on single-node central processing units (CPUs) and graphics processing units (GPUs). One of the major challenges in scientific code development is to balance the level of complexity between algorithms and programming techniques without losing performance or degrading code readability. In this context, we have developed $\texttt{qibojit}$: a new module for the Qibo quantum computing framework, which uses a just-in-time compilation approach through Python. We perform systematic performance benchmarks between our JIT approach and a subset of relevant publicly available libraries for quantum computing. We show that our novel approach simplifies the complex aspects of the implementation without deteriorating performance.

Quantum technologies are moving towards the development of novel hardware devices based on quantum bits (qubits). In parallel to the development of quantum devices, efficient simulation tools are needed in order to design and benchmark quantum algorithms and applications before deployment on quantum hardware. In this context, we present a first attempt to perform circuit-based quantum simulation using the just-in-time (JIT) compilation technique on multiple hardware architectures and configurations based on single-node central processing units (CPUs) and graphics processing units (GPUs).

► BibTeX data

► References

[1] J. Preskill, Quantum 2, 79 (2018).
https:/​/​doi.org/​10.22331/​q-2018-08-06-79

[2] F. Arute et al., Nature 574, 505 (2019).
https:/​/​doi.org/​10.1038/​s41586-019-1666-5

[3] H.-S. Zhong, H. Wang, Y.-H. Deng, M.-C. Chen, L.-C. Peng, Y.-H. Luo, J. Qin, D. Wu, X. Ding, Y. Hu, et al., Science 370, 1460 (2020).
https:/​/​doi.org/​10.1126/​science.abe8770

[4] Google Research, Google AI Quantum (2017).
https:/​/​research.google/​teams/​applied-science/​quantum/​

[5] IBM Research, IBM Quantum Experience (2016).
https:/​/​www.ibm.com/​quantum-computing/​

[6] Rigetti, Rigetti Computing (2017).
https:/​/​www.rigetti.com/​

[7] Intel Corporation, Intel Quantum Computing (2017).
https:/​/​www.intel.com/​content/​www/​us/​en/​research/​quantum-computing.html

[8] D-Wave Systems, The Quantum Computing Company (2011).
https:/​/​www.dwavesys.com/​

[9] D-Wave Systems, D-Wave Neal.
https:/​/​github.com/​dwavesystems/​dwave-neal

[10] I. L. Markov, A. Fatima, S. V. Isakov, and S. Boixo, arXiv preprint arXiv:1807.10749 (2018a).
arXiv:1807.10749

[11] J. Chen and et al., Classical simulation of intermediate-size quantum circuits (2018), arXiv:1805.01450 [quant-ph].
arXiv:1805.01450

[12] S. Efthymiou, S. Ramos-Calderer, C. Bravo-Prieto, A. Pérez-Salinas, D. García-Martín, A. Garcia-Saez, J. I. Latorre, and S. Carrazza, Quantum Science and Technology 7, 015018 (2021).
https:/​/​doi.org/​10.1088/​2058-9565/​ac39f5

[13] The Qibo team, qiboteam/​qibo: Qibo.
https:/​/​doi.org/​10.5281/​zenodo.3997194

[14] S. Carrazza, S. Efthymiou, M. Lazzarin, and A. Pasquale, in 20th International Workshop on Advanced Computing and Analysis Techniques in Physics Research: AI Decoded - Towards Sustainable, Diverse, Performant and Effective Scientific Computing (2022) arXiv:2202.07017 [quant-ph].
arXiv:2202.07017

[15] The Qibo team (2022).

[16] S. Carrazza, S. Efthymiou, M. Lazzarin, and A. Pasquale, qiboteam/​qibojit: qibojit.
https:/​/​doi.org/​10.5281/​zenodo.5071354

[17] S. K. Lam, A. Pitrou, and S. Seibert, in Proceedings of the Second Workshop on the LLVM Compiler Infrastructure in HPC (2015) pp. 1–6.

[18] R. Okuta, Y. Unno, D. Nishino, S. Hido, and C. Loomis, in Proceedings of Workshop on Machine Learning Systems (LearningSys) in The Thirty-first Annual Conference on Neural Information Processing Systems (NIPS) (2017).
http:/​/​learningsys.org/​nips17/​assets/​papers/​paper_16.pdf

[19] G. Aleksandrowicz et al., Qiskit: An open-source framework for quantum computing (2019).
https:/​/​doi.org/​10.5281/​ZENODO.2562110

[20] Cirq Developers, Cirq (2021), See full list of authors on Github: https:/​/​github .com/​quantumlib/​Cirq/​graphs/​contributors.
https:/​/​doi.org/​10.5281/​zenodo.5182845

[21] Quantum AI team and collaborators, qsim (2020).
https:/​/​doi.org/​10.5281/​zenodo.4023103

[22] D. S. Steiger, T. Häner, and M. Troyer, Quantum 2, 49 (2018).
https:/​/​doi.org/​10.22331/​q-2018-01-31-49

[23] T. Häner, D. S. Steiger, K. Svore, and M. Troyer, Quantum Science and Technology 3, 020501 (2018).
https:/​/​doi.org/​10.1088/​2058-9565/​aaa5cc

[24] S. Mandrà, J. Marshall, E. G. Rieffel, and R. Biswas, in 2021 IEEE/​ACM Second International Workshop on Quantum Computing Software (QCS) (2021) pp. 99–109.
https:/​/​doi.org/​10.1109/​QCS54837.2021.00015

[25] Y. Suzuki, Y. Kawase, Y. Masumura, Y. Hiraga, M. Nakadai, J. Chen, K. M. Nakanishi, K. Mitarai, R. Imai, S. Tamiya, T. Yamamoto, T. Yan, T. Kawakubo, Y. O. Nakagawa, Y. Ibe, Y. Zhang, H. Yamashita, H. Yoshimura, A. Hayashi, and K. Fujii, Quantum 5, 559 (2021).
https:/​/​doi.org/​10.22331/​q-2021-10-06-559

[26] A. Kelly, arXiv preprint arXiv:1805.00988 (2018).
arXiv:1805.00988

[27] T. Oliphant, Guide to NumPy (2006).

[28] https:/​/​pypi.org/​project/​qibo.
https:/​/​pypi.org/​project/​qibo

[29] https:/​/​anaconda.org/​conda-forge/​qibo.
https:/​/​anaconda.org/​conda-forge/​qibo

[30] M. Abadi, A. Agarwal, P. Barham, E. Brevdo, Z. Chen, C. Citro, G. S. Corrado, A. Davis, J. Dean, M. Devin, S. Ghemawat, I. Goodfellow, A. Harp, G. Irving, M. Isard, Y. Jia, R. Jozefowicz, L. Kaiser, M. Kudlur, J. Levenberg, D. Mané, R. Monga, S. Moore, D. Murray, C. Olah, M. Schuster, J. Shlens, B. Steiner, I. Sutskever, K. Talwar, P. Tucker, V. Vanhoucke, V. Vasudevan, F. Viégas, O. Vinyals, P. Warden, M. Wattenberg, M. Wicke, Y. Yu, and X. Zheng, TensorFlow: Large-scale machine learning on heterogeneous systems (2015), software available from tensorflow.org.
https:/​/​www.tensorflow.org/​

[31] https:/​/​github.com/​qiboteam/​qibotf.
https:/​/​github.com/​qiboteam/​qibotf

[32] https:/​/​github.com/​qiboteam/​qibojit.
https:/​/​github.com/​qiboteam/​qibojit

[33] N. Metropolis, A. W. Rosenbluth, M. N. Rosenbluth, A. H. Teller, and E. Teller, J. Chem. Phys. 21, 1087 (1953).
https:/​/​doi.org/​10.1063/​1.1699114

[34] J. Bradbury, R. Frostig, P. Hawkins, M. J. Johnson, C. Leary, D. Maclaurin, G. Necula, A. Paszke, J. VanderPlas, S. Wanderman-Milne, and Q. Zhang, JAX: composable transformations of Python+NumPy programs (2018).
http:/​/​github.com/​google/​jax

[35] G. Guennebaud, B. Jacob, et al., Eigen v3, http:/​/​eigen.tuxfamily.org (2010).
http:/​/​eigen.tuxfamily.org

[36] K. Rupp, P. Tillet, F. Rudolf, J. Weinbub, A. Morhammer, T. Grasser, A. Jüngel, and S. Selberherr, SIAM Journal on Scientific Computing 38, S412 (2016), https:/​/​doi.org/​10.1137/​15M1026419.
https:/​/​doi.org/​10.1137/​15M1026419
arXiv:https://doi.org/10.1137/15M1026419

[37] NVIDIA, Thrust (2020).
https:/​/​developer.nvidia.com/​thrust

[38] NVIDIA, nvcc (2022).
https:/​/​docs.nvidia.com/​cuda/​cuda-compiler-driver-nvcc/​index.html

[39] NVIDIA, cuQuantum SDK (2021).
https:/​/​developer.nvidia.com/​cuquantum-sdk

[40] S. Efthymiou, M. Lazzarin, S. Carrazza, and A. Pasquale, qiboteam/​qibojit-benchmarks: benchmarks v0.0.1 (2022).
https:/​/​doi.org/​10.5281/​zenodo.6363155

[41] A. W. Cross, L. S. Bishop, J. A. Smolin, and J. M. Gambetta, arXiv e-prints , arXiv:1707.03429 (2017), arXiv:1707.03429 [quant-ph].
arXiv:1707.03429

[42] A. W. Cross, A. Javadi-Abhari, T. Alexander, N. de Beaudrap, L. S. Bishop, S. Heidel, C. A. Ryan, J. Smolin, J. M. Gambetta, and B. R. Johnson, arXiv preprint arXiv:2104.14722 (2021).
https:/​/​doi.org/​10.1145/​3505636
arXiv:2104.14722

[43] https:/​/​github.com/​quantumlib/​Cirq/​blob/​master/​cirq-core/​cirq/​experiments/​random_quantum_circuit_generation.py.
https:/​/​github.com/​quantumlib/​Cirq/​blob/​master/​cirq-core/​cirq/​experiments/​random_quantum_circuit_generation.py

[44] https:/​/​qiskit.org/​documentation/​stubs/​qiskit.circuit.library.QuantumVolume.html.
https:/​/​qiskit.org/​documentation/​stubs/​qiskit.circuit.library.QuantumVolume.html

[45] D. Coppersmith, An approximate Fourier transform useful in quantum factoring (2002), arXiv:quant-ph/​0201067 [quant-ph].
arXiv:quant-ph/0201067

[46] Circuit consisting of alternating layers of parametrized RY rotations and entangling CZ gates.

[47] I. L. Markov, A. Fatima, S. V. Isakov, and S. Boixo, arXiv preprint arXiv:1807.10749 10.48550/​arXiv.1807.10749 (2018b).
https:/​/​doi.org/​10.48550/​arXiv.1807.10749
arXiv:1807.10749

[48] A. W. Cross, L. S. Bishop, S. Sheldon, P. D. Nation, and J. M. Gambetta, Physical Review A 100, 10.1103/​physreva.100.032328 (2019).
https:/​/​doi.org/​10.1103/​physreva.100.032328

[49] E. Bernstein and U. Vazirani, SIAM Journal on Computing 26, 1411 (1997), https:/​/​doi.org/​10.1137/​S0097539796300921.
https:/​/​doi.org/​10.1137/​S0097539796300921
arXiv:https://doi.org/10.1137/S0097539796300921

[50] ATOS, Quantum Learning Machine.
https:/​/​atos.net/​en/​solutions/​quantum-learning-machine

[51] NVIDIA team, NVIDIA DGX Station.
https:/​/​www.nvidia.com/​en-us/​data-center/​dgx-station/​

[52] Qiskit-aer 0.10.3, qiskit-aer-gpu 0.10.2.

[53] M. Smelyanskiy, N. P. D. Sawaya, and A. Aspuru-Guzik, qHiPSTER: The quantum high performance software testing environment (2016), arXiv:arXiv:1601.07195 [quant-ph].
arXiv:arXiv:1601.07195

[54] M. B. et al., TensorFlow Quantum: A software framework for quantum machine learning (2020), arXiv:arXiv:2003.02989 [quant-ph].
arXiv:arXiv:2003.02989

[55] S. V. I. et al., Simulations of quantum circuits with approximate noise using qsim and Cirq (2021), arXiv:arXiv:2111.02396 [quant-ph].
arXiv:arXiv:2111.02396

[56] T. Kadowaki and H. Nishimori, Physical Review E 58, pp. 5355–5363 (1998).
https:/​/​doi.org/​10.1103/​physreve.58.5355

[57] E. Crosson and A. W. Harrow, 2016 IEEE 57th Annual Symposium on Foundations of Computer Science (FOCS) 10.1109/​focs.2016.81 (2016).
https:/​/​doi.org/​10.1109/​focs.2016.81

[58] S. Paeckel and et al., Annals of Physics 411, pp. 167998 (2019).
https:/​/​doi.org/​10.1016/​j.aop.2019.167998

Cited by

[1] Stefano Carrazza, Stavros Efthymiou, Marco Lazzarin, and Andrea Pasquale, "An open-source modular framework for quantum computing", arXiv:2202.07017.

The above citations are from SAO/NASA ADS (last updated successfully 2022-10-01 15:38:05). The list may be incomplete as not all publishers provide suitable and complete citation data.

On Crossref's cited-by service no data on citing works was found (last attempt 2022-10-01 15:38:03).