论文标题

QOC:参数移位和梯度修剪的量子芯片训练

QOC: Quantum On-Chip Training with Parameter Shift and Gradient Pruning

论文作者

Wang, Hanrui, Li, Zirui, Gu, Jiaqi, Ding, Yongshan, Pan, David Z., Han, Song

论文摘要

参数化的量子电路(PQC)由于其在近期噪声中间尺度量子(NISQ)硬件上实现量子优势的潜力,使研究兴趣增加了。为了实现可扩展的PQC学习,需要将训练过程卸载到真实的量子机上,而不是使用指数成本的经典模拟器。获得PQC梯度的一种常见方法是参数移位,其成本量表与量子数的数量线性尺度。我们提出QOC,这是参数转移实用片上PQC训练的第一个实验证明。然而,我们发现,由于真实机器上的明显量子误差(噪声),从幼稚的参数转移获得的梯度具有较低的保真度,从而降低了训练精度。为此,我们进一步提出了概率梯度修剪,以首先识别具有潜在误差的梯度,然后将其删除。具体而言,小梯度的相对误差比大梯度更大,因此修剪的可能性更高。我们使用5个实际量子机对5个分类任务进行量子神经网络(QNN)基准进行了广泛的实验。结果表明,我们的芯片训练可实现2级和4级图像分类任务的90%和60%的精度。概率梯度修剪可在没有修剪的情况下提高7%的PQC准确性。总体而言,与无噪声模拟相比,我们成功获得了类似的片上训练精度,但具有更好的训练性可伸缩性。 QOC代码可在Torchquantum库中找到。

Parameterized Quantum Circuits (PQC) are drawing increasing research interest thanks to its potential to achieve quantum advantages on near-term Noisy Intermediate Scale Quantum (NISQ) hardware. In order to achieve scalable PQC learning, the training process needs to be offloaded to real quantum machines instead of using exponential-cost classical simulators. One common approach to obtain PQC gradients is parameter shift whose cost scales linearly with the number of qubits. We present QOC, the first experimental demonstration of practical on-chip PQC training with parameter shift. Nevertheless, we find that due to the significant quantum errors (noises) on real machines, gradients obtained from naive parameter shift have low fidelity and thus degrading the training accuracy. To this end, we further propose probabilistic gradient pruning to firstly identify gradients with potentially large errors and then remove them. Specifically, small gradients have larger relative errors than large ones, thus having a higher probability to be pruned. We perform extensive experiments with the Quantum Neural Network (QNN) benchmarks on 5 classification tasks using 5 real quantum machines. The results demonstrate that our on-chip training achieves over 90% and 60% accuracy for 2-class and 4-class image classification tasks. The probabilistic gradient pruning brings up to 7% PQC accuracy improvements over no pruning. Overall, we successfully obtain similar on-chip training accuracy compared with noise-free simulation but have much better training scalability. The QOC code is available in the TorchQuantum library.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源