DiaQ: Efficient State-Vector Quantum Simulation (2405.01250v1)
Abstract: In the current era of Noisy Intermediate Scale Quantum (NISQ) computing, efficient digital simulation of quantum systems holds significant importance for quantum algorithm development, verification and validation. However, analysis of sparsity within these simulations remains largely unexplored. In this paper, we present a novel observation regarding the prevalent sparsity patterns inherent in quantum circuits. We introduce DiaQ, a new sparse matrix format tailored to exploit this quantum-specific sparsity, thereby enhancing simulation performance. Our contribution extends to the development of libdiaq, a numerical library implemented in C++ with OpenMP for multi-core acceleration and SIMD vectorization, featuring essential mathematical kernels for digital quantum simulations. Furthermore, we integrate DiaQ with SV-Sim, a state vector simulator, yielding substantial performance improvements across various quantum circuits (e.g., ~26.67% for GHZ-28 and ~32.72% for QFT-29 with multi-core parallelization and SIMD vectorization on Frontier). Evaluations conducted on benchmarks from SupermarQ and QASMBench demonstrate that DiaQ represents a significant step towards achieving highly efficient quantum simulations.
- P. W. Shor, “Polynomial-time algorithms for prime factorization and discrete logarithms on a quantum computer,” SIAM Journal on Computing, vol. 26, no. 5, pp. 1484–1509, oct 1997. [Online]. Available: https://doi.org/10.1137%2Fs0097539795293172
- E. R. Anschuetz, J. P. Olson, A. Aspuru-Guzik, and Y. Cao, “Variational quantum factoring,” 2018.
- E. Farhi, J. Goldstone, and S. Gutmann, “A quantum approximate optimization algorithm,” 2014.
- A. Peruzzo, J. McClean, P. Shadbolt, M.-H. Yung, X.-Q. Zhou, P. J. Love, A. Aspuru-Guzik, and J. L. O’Brien, “A variational eigenvalue solver on a photonic quantum processor,” Nature Communications, vol. 5, no. 1, jul 2014. [Online]. Available: https://doi.org/10.1038%2Fncomms5213
- G. H. Low and I. L. Chuang, “Hamiltonian simulation by qubitization,” Quantum, vol. 3, p. 163, jul 2019. [Online]. Available: https://doi.org/10.22331%2Fq-2019-07-12-163
- A. V. Uvarov, A. S. Kardashin, and J. D. Biamonte, “Machine learning phase transitions with a quantum processor,” Physical Review A, vol. 102, no. 1, jul 2020. [Online]. Available: https://doi.org/10.1103%2Fphysreva.102.012415
- J. Biamonte, P. Wittek, N. Pancotti, P. Rebentrost, N. Wiebe, and S. Lloyd, “Quantum machine learning,” Nature, vol. 549, no. 7671, pp. 195–202, sep 2017. [Online]. Available: https://doi.org/10.1038%2Fnature23474
- A. W. Harrow, A. Hassidim, and S. Lloyd, “Quantum algorithm for linear systems of equations,” Physical Review Letters, vol. 103, no. 15, oct 2009. [Online]. Available: https://doi.org/10.1103%2Fphysrevlett.103.150502
- S. Woerner and D. J. Egger, “Quantum risk analysis,” npj Quantum Information, vol. 5, no. 1, feb 2019. [Online]. Available: https://doi.org/10.1038%2Fs41534-019-0130-6
- L. Braine, D. J. Egger, J. Glick, and S. Woerner, “Quantum algorithms for mixed binary optimization applied to transaction settlement,” IEEE Transactions on Quantum Engineering, vol. 2, pp. 1–8, 2021. [Online]. Available: https://doi.org/10.1109%2Ftqe.2021.3063635
- J. Tangpanitanon, S. Thanasilp, M.-A. Lemonde, and D. Angelakis, “Quantum supremacy with analog quantum processors for material science and machine learning,” 06 2019.
- R. Feynman, “Simulating physics with computers,” International Journal of Theoretical Physics, vol. 21, no. 6-7, pp. 467–488, Jun. 1982. [Online]. Available: http://dx.doi.org/10.1007/bf02650179
- A. Li, B. Fang, C. Granade, G. Prawiroatmodjo, B. Hein, M. Rotteler, and S. Krishnamoorthy, “Sv-sim: Scalable pgas-based state vector simulation of quantum circuits,” in Proceedings of the International Conference for High Performance Computing, Networking, Storage and Analysis, 2021.
- T. Häner and D. S. Steiger, “0.5 petabyte simulation of a 45-qubit quantum circuit,” in Proceedings of the International Conference for High Performance Computing, Networking, Storage and Analysis, ser. SC ’17. ACM, Nov. 2017. [Online]. Available: http://dx.doi.org/10.1145/3126908.3126947
- T. Tomesh, P. Gokhale, V. Omole, G. S. Ravi, K. N. Smith, J. Viszlai, X.-C. Wu, N. Hardavellas, M. R. Martonosi, and F. T. Chong, “Supermarq: A scalable quantum benchmark suite,” 2022. [Online]. Available: https://arxiv.org/abs/2202.11045
- A. Li, S. Stein, S. Krishnamoorthy, and J. Ang, “Qasmbench: A low-level quantum benchmark suite for nisq evaluation and simulation,” ACM Transactions on Quantum Computing, 2022.
- Virtanen, Pauli and Gommers, Ralf and Oliphant, Travis E. and Haberland, Matt and Reddy, Tyler and Cournapeau, David and Burovski, Evgeni and Peterson, Pearu and Weckesser, Warren and Bright, Jonathan and van der Walt, Stéfan J. and Brett, Matthew and Wilson, Joshua and Millman, K. Jarrod and Mayorov, Nikolay and Nelson, Andrew R. J. and Jones, Eric and Kern, Robert and Larson, Eric and Carey, CJ and Polat, İlhan and Feng, Yu and Moore, Eric W. and VanderPlas, Jake and Laxalde, Denis and Perktold, Josef and Cimrman, Robert and Henriksen, Ian and Quintero, E. A. and Harris, Charles R. and Archibald, Anne M. and Ribeiro, Antônio H. and Pedregosa, Fabian and van Mulbregt, Paul and SciPy 1.0 Contributors, “SciPy: Open source scientific tools for python,” 2020. [Online]. Available: https://www.scipy.org/
- Y. Saad, “Sparskit: A basic tool kit for sparse matrix computations,” Tech. Rep., 1990.
- J. Li, G. Tan, M. Chen, and N. Sun, “Smat: An input adaptive auto-tuner for sparse matrix-vector multiplication,” in Proceedings of the 34th ACM SIGPLAN conference on Programming language design and implementation, 2013, pp. 117–126.
- L. S. Blackford, A. Petitet, R. Pozo, K. Remington, R. C. Whaley, J. Demmel, J. Dongarra, I. Duff, S. Hammarling, G. Henry et al., “An updated set of basic linear algebra subprograms (blas),” ACM Transactions on Mathematical Software, vol. 28, no. 2, pp. 135–151, 2002.
- S. Atchley, C. Zimmer, J. Lange, D. Bernholdt, V. Melesse Vergara, T. Beck, M. Brim, R. Budiardja, S. Chandrasekaran, M. Eisenbach, T. Evans, M. Ezell, N. Frontiere, A. Georgiadou, J. Glenski, P. Grete, S. Hamilton, J. Holmen, A. Huebl, D. Jacobson, W. Joubert, K. Mcmahon, E. Merzari, S. Moore, A. Myers, S. Nichols, S. Oral, T. Papatheodore, D. Perez, D. M. Rogers, E. Schneider, J.-L. Vay, and P. K. Yeung, “Frontier: Exploring exascale,” in Proceedings of the International Conference for High Performance Computing, Networking, Storage and Analysis, ser. SC ’23. New York, NY, USA: Association for Computing Machinery, 2023. [Online]. Available: https://doi.org/10.1145/3581784.3607089
- T. C. Q. development team, “CUDA Quantum,” https://github.com/NVIDIA/cuda-quantum, 2023, software.
- C. Developers, “Cirq,” https://doi.org/10.5281/zenodo.10247207, Dec. 2023, software.
- I.-S. Suh and A. Li, “Simulating quantum systems with nwq-sim on hpc,” in SC’23: Proceedings of the International Conference for High Performance Computing, Networking, Storage and Analysis. IEEE, 2023, p. rpost195.
- Q. A. team and collaborators, “qsim,” Sep. 2020. [Online]. Available: https://doi.org/10.5281/zenodo.4023103
- J. Gray, “quimb: A python package for quantum information and many-body calculations,” Journal of Open Source Software, vol. 3, no. 29, p. 819, 2018. [Online]. Available: https://doi.org/10.21105/joss.00819
- 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, “Qulacs: a fast and versatile quantum circuit simulator for research purpose,” Quantum, vol. 5, p. 559, Oct. 2021. [Online]. Available: http://dx.doi.org/10.22331/q-2021-10-06-559
- C. Gidney, “Stim: a fast stabilizer circuit simulator,” Quantum, vol. 5, p. 497, Jul. 2021. [Online]. Available: http://dx.doi.org/10.22331/q-2021-07-06-497
- H. Bayraktar, A. Charara, D. Clark, S. Cohen, T. Costa, Y.-L. L. Fang, Y. Gao, J. Guan, J. Gunnels, A. Haidar, A. Hehn, M. Hohnerbach, M. Jones, T. Lubowe, D. Lyakh, S. Morino, P. Springer, S. Stanwyck, I. Terentyev, S. Varadhan, J. Wong, and T. Yamaguchi, “cuquantum sdk: A high-performance library for accelerating quantum science,” 2023.
- “Quantuloop,” https://simulator.quantuloop.com, Quantuloop, software. [Online]. Available: https://simulator.quantuloop.com
- S. Jaques and T. Häner, “Leveraging state sparsity for more efficient quantum simulations,” 2021.
- T. Dao, N. Sohoni, A. Gu, M. Eichhorn, A. Blonder, M. Leszczynski, A. Rudra, and C. Ré, “Kaleidoscope: An efficient, learnable representation for all structured linear maps,” 12 2020.