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, classical simulation often suffers from the cost of gradient calculations, requiring enormous memory or computational time. In this paper, 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 reduce 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. This implies that we can train the model on large datasets, consisting of tens of thousands of samples, such as MNIST or CIFAR-10, within a realistic time frame (e.g., $20$ hours per epoch). In this way, our proposed method drastically accelerates classical simulation of quantum machine learning, making a significant contribution to quantum machine learning research and variational quantum algorithms, such as verifying algorithms on large datasets or investigating learning theories of deep quantum circuits like barren plateau.


翻译:尽管近年来真实量子设备被越来越多地用于开展以实现量子优势或量子效用为目标的研究,但在当前含噪声中等规模量子设备上执行深度量子电路或进行大规模数据的量子机器学习仍然具有挑战性,这使得经典模拟对于量子机器学习研究至关重要。然而,经典模拟常常受限于梯度计算的开销,需要巨大的内存或计算时间。在本文中,为解决这些问题,我们提出了一种方法,通过在前向和反向路径中分别融合多个连续的门,以最小化全局内存访问来提高吞吐量。结果表明,对于具有12个或更多量子比特的硬件高效拟设,我们实现了约20倍的吞吐量提升,在内存带宽有限的中端消费级GPU上甚至达到了超过30倍的提升。通过将我们提出的方法与梯度检查点技术相结合,我们大幅降低了内存使用量,使得训练一个大规模量子机器学习模型——一个具有20个量子比特、1,000层和60,000个参数的模型,使用1,000个样本,仅需约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日
【边缘智能】边缘计算驱动的深度学习加速技术
产业智能官
20+阅读 · 2019年2月8日
深度学习时代的图模型,清华发文综述图网络
GAN生成式对抗网络
13+阅读 · 2018年12月23日
国家自然科学基金
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日
VIP会员
相关基金
国家自然科学基金
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会员