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.


翻译:尽管近年来真实量子设备越来越多地被用于研究旨在实现量子优势或量子实用性的工作,但在当前含噪中等规模量子设备上执行深量子电路或利用大规模数据进行量子机器学习仍然具有挑战性,这使得经典模拟成为量子机器学习研究中不可或缺的手段。然而,此类经典模拟常因梯度计算成本而面临巨大内存或计算时间的消耗。为解决这些问题,我们提出了一种方法,在前向和后向路径中分别融合多个连续的门,通过最小化全局内存访问来提高吞吐量。实验结果表明,对于具有12个或更多量子比特的硬件高效拟设,我们的方法实现了约20倍的吞吐量提升,在内存带宽有限的中端消费级GPU上甚至达到30倍以上。通过将所提方法与梯度检查点技术结合,我们大幅减少了内存使用,使得能够训练大规模量子机器学习模型——一个包含20个量子比特、1000层、60,000个参数、使用1000个样本的模型,每个训练周期仅需约20分钟。这意味着我们可以在合理的时间框架内(例如每个训练周期20小时)对包含数万个样本的大型数据集(如MNIST或CIFAR-10)进行模型训练。因此,我们的方法显著加速了此类经典模拟,为推进量子机器学习和变分量子算法的研究(例如在大型数据集上验证算法或探索深量子电路的学习理论如贫瘠高原问题)做出了重要贡献。

0
下载
关闭预览

相关内容

量子机器学习综述
专知会员服务
55+阅读 · 2024年2月18日
《量子机器学习》最新综述
专知会员服务
40+阅读 · 2023年8月24日
【MIT博士论文】量子计算中的人工智能前景, 253页pdf
专知会员服务
44+阅读 · 2023年8月23日
《量子技术中的人工智能和机器学习》
专知会员服务
41+阅读 · 2023年3月14日
量子机器学习的基础和应用:一个简明文献综述
专知会员服务
39+阅读 · 2022年6月28日
清华大学《高级机器学习》课程
专知
40+阅读 · 2020年7月21日
深度学习时代的图模型,清华发文综述图网络
GAN生成式对抗网络
13+阅读 · 2018年12月23日
<好书推荐> -《Pro Deep Learning with TensorFlow》分享
深度学习与NLP
12+阅读 · 2018年9月13日
国家自然科学基金
16+阅读 · 2017年12月31日
国家自然科学基金
6+阅读 · 2017年12月31日
国家自然科学基金
21+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Arxiv
0+阅读 · 4月28日
VIP会员
最新内容
学习数据的几何:形状空间分析数学综述
专知会员服务
8+阅读 · 6月17日
定向能反无人机系统最新发展动态
专知会员服务
10+阅读 · 6月17日
从燃煤战舰到算法战争:水面指挥的永恒要求
专知会员服务
6+阅读 · 6月17日
相关基金
国家自然科学基金
16+阅读 · 2017年12月31日
国家自然科学基金
6+阅读 · 2017年12月31日
国家自然科学基金
21+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员