arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2603.02804quant-phcs.DCcs.ET
收藏

快速且内存高效的量子机器学习经典模拟方法:通过前向和后向门融合

Fast and memory-efficient classical simulation of quantum machine learning via forward and backward gate fusion

Graduate School of Information Science and Technology, The University of Tokyo(东京大学大学院信息理工学系研究科)

Yoshiaki Kawase

AI总结:

本文提出通过前向和后向门融合提升量子机器学习经典模拟效率,减少内存访问,实现内存和计算时间的显著优化,适用于大规模量子模型训练。

摘要:

尽管近年来真实量子设备被越来越多用于研究量子优势或量子实用性,但执行深度量子电路或在当前噪声中间尺度量子设备上进行大规模数据的量子机器学习仍具挑战性,使经典模拟成为量子机器学习研究的关键。然而,此类经典模拟常面临梯度计算的成本问题,需要大量内存或计算时间。为解决这些问题,我们提出了一种方法,在前向和后向路径中融合多个连续的门,以通过最小化全局内存访问来提高吞吐量。结果,我们实现了在12个或更多量子比特的Hardware-Efficient Ansatz上的约20倍吞吐量提升,在中等范围的消费级GPU上达到超过30倍的提升。通过将所提方法与梯度检查点结合,我们大幅减少了内存使用,使在1000个样本上训练一个20个量子比特、1000层、60000参数的量子机器学习模型成为可能,约20分钟每epoch。这表明我们可以在包含数万样本的数据集上训练模型,如MNIST或CIFAR-10,在现实时间内(如每epoch 20小时)完成。因此,我们提出的方法显著加速了此类经典模拟,对推进量子机器学习和变分量子算法的研究,如在大规模数据集上验证算法或研究深度量子电路的学习理论如 barren plateaus,做出了重要贡献。

英文摘要:

While real quantum devices have been increasingly used to conduct research focused on achieving quantum advantage or quantum utility in recent years, executing deep quantum circuits or performing quantum machine learning with large-scale data on current noisy intermediate-scale quantum devices remains challenging, making classical simulation essential for quantum machine learning research. However, such classical simulation often suffers from the cost of gradient calculations, requiring enormous memory or computational time. To address these problems, we propose a method to fuse multiple consecutive gates in each of the forward and backward paths to improve throughput by minimizing global memory accesses. As a result, we achieved approximately $20$ times throughput improvement for a Hardware-Efficient Ansatz with $12$ or more qubits, reaching over $30$ times improvement on a mid-range consumer GPU with limited memory bandwidth. By combining our proposed method with gradient checkpointing, we drastically reduced memory usage, making it possible to train a large-scale quantum machine learning model, a $20$-qubit, $1{,}000$-layer model with $60{,}000$ parameters, using $1{,}000$ samples in approximately $20$ minutes per epoch. This implies that we can train the model on large datasets, comprising tens of thousands of samples, like MNIST or CIFAR-10, within a realistic time frame (e.g., $20$ hours per epoch). Thus, our proposed method significantly accelerates such classical simulations, making a significant contribution to advancing research in quantum machine learning and variational quantum algorithms, such as verifying algorithms on large datasets or investigating learning theories of deep quantum circuits like barren plateaus.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑