Skip to main content
QUICK REVIEW

[论文解读] QOC: Quantum On-Chip Training with Parameter Shift and Gradient Pruning

Hanrui Wang, Zirui Li|arXiv (Cornell University)|Feb 26, 2022
Quantum Computing Algorithms and Architecture被引用 5
一句话总结

QOC 首次在真实 NISQ 设备上实现了基于参数偏移梯度的可扩展片上参数化量子线路(PQC)训练的实验演示。通过引入概率梯度剪枝以过滤掉噪声大、幅值小的梯度,QOC 在二分类图像分类任务中实现了超过 90% 的准确率,在四分类任务中实现了 60% 的准确率,其性能与无噪声仿真相当,同时提升了鲁棒性,并将线路运行次数最多减少 2 倍。

ABSTRACT

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.

研究动机与目标

  • 在真实量子硬件上实现参数化量子线路(PQC)的实用化、可扩展训练,避免指数级成本的经典模拟。
  • 解决 NISQ 设备中量子噪声导致的梯度保真度下降问题,该问题会损害训练收敛性。
  • 通过仅计算可靠梯度来提升训练鲁棒性与效率,从而减少所需的量子线路运行次数。
  • 证明片上训练结合梯度剪枝可实现与无噪声仿真相当的准确率,适用于真实量子机器。

提出的方法

  • 使用参数偏移规则在真实 NISQ 硬件上直接计算精确的量子梯度,实现无需经典模拟的片上反向传播。
  • 提出概率梯度剪枝方法,识别并排除相对误差较高的梯度,特别是易受噪声影响的小幅值梯度。
  • 采用基于累积梯度幅值的随机采样策略,优先选择高可靠性梯度用于优化。
  • 引入基于窗口的梯度幅值累积机制,以在时间上稳定剪枝决策。
  • 应用 Adam 优化器并结合余弦学习率调度器,以提升片上训练过程中的收敛性。
  • 在 5 台真实量子设备(如 ibmq_jakarta、ibmq_santiago)上部署该框架,对 QNN 基准进行端到端评估。

实验结果

研究问题

  • RQ1能否在真实 NISQ 量子硬件上高效、有效地计算参数偏移梯度,以支持可扩展的 PQC 训练?
  • RQ2量子噪声与门误差如何影响梯度保真度,特别是对小幅值梯度的影响?
  • RQ3概率梯度剪枝能否降低噪声梯度的影响,同时不增加线路运行次数而提升训练准确率?
  • RQ4结合剪枝的片上 PQC 训练在多大程度上可达到无噪声经典仿真性能?
  • RQ5随着量子比特数量的增加,片上训练在运行时间和内存成本方面的可扩展性如何?

主要发现

  • 使用真实量子硬件的片上训练中,QOC 在二分类图像分类任务中准确率超过 90%,在四分类任务中准确率超过 60%。
  • 与无剪枝训练相比,概率梯度剪枝可将 PQC 准确率提升高达 7%,显著增强对量子噪声的鲁棒性。
  • 该方法在保持或提升准确率的同时,将所需量子线路运行次数最多减少 2 倍,显著提升训练效率。
  • 片上训练的运行时间和内存成本随量子比特数近似线性增长,表明在超过 27 个量子比特后,相较于经典模拟具有明确的量子优势。
  • 经典模拟的成本随量子比特数呈指数增长,对于超过 24 个量子比特的电路,成本可达数千 GB 的不可行水平,而片上执行仍具可行性。
  • 概率剪枝在准确率上比确定性剪枝高出 1–7%,因其减少了梯度采样偏差并保留了优化多样性。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。