Skip to main content
QUICK REVIEW

[论文解读] Efficient calculation of gradients in classical simulations of variational quantum algorithms

Tyson Jones, Julien Gacon|arXiv (Cornell University)|Sep 6, 2020
Quantum Computing Algorithms and Architecture参考文献 24被引用 22
一句话总结

本文提出了一种新颖的算法,用于在变分量子算法的经典模拟中高效计算梯度,通过利用量子算符中的递归结构,实现 O(P) 的运行时间和 O(1) 的内存使用。该方法仅使用标准模拟器原语——应用门、克隆态和内积——即可实现精确的梯度计算,无需缓存或有限差分近似,显著优于传统的 O(P²) 方法。

ABSTRACT

Calculating the energy gradient in parameter space has become an almost ubiquitous subroutine of variational near-term quantum algorithms. "Faithful" classical emulation of this subroutine mimics its quantum evaluation, and scales as O(P^2) gate operations for P variational parameters. This is often the bottleneck for the moderately-sized simulations, and has attracted HPC strategies like "batch-circuit" evaluation. We here present a novel derivation of an emulation strategy to precisely calculate the gradient in O(P) time and using O(1) state-vectors, compatible with "full-state" state-vector simulators. The prescribed algorithm resembles the optimised technique for automatic differentiation of reversible cost functions, often used in classical machine learning, and first employed in quantum simulators like Yao.jl. In contrast, our scheme derives directly from a recurrent form of quantum operators, and may be more familiar to a quantum computing community. Our strategy is very simple, uses only 'apply gate', 'clone state' and 'inner product' primitives and is hence straightforward to implement and integrate with existing simulators. It is compatible with gate parallelisation schemes, and hardware accelerated and distributed simulators. We describe the scheme in an instructive way, including details of how common gate derivatives can be performed, to clearly guide implementation in existing quantum simulators. We furthermore demonstrate the scheme by implementing it in Qiskit, and perform some comparative benchmarking with faithful simulation. Finally, we remark upon the difficulty of extending the scheme to density-matrix simulation of noisy channels.

研究动机与目标

  • 解决由于 O(P²) 梯度计算导致的经典模拟中变分量子算法的性能瓶颈。
  • 开发一种在 O(P) 时间和 O(1) 内存下计算梯度的方法,避免昂贵的缓存或有限差分近似。
  • 提供一种简单且可集成的算法,仅使用基本模拟器操作:应用门、克隆态和内积。
  • 将该方法扩展至支持多参数门、非唯一参数以及非厄米成本算符。
  • 通过集成到 Qiskit 并与忠实模拟进行基准测试,证明其可行性和性能提升。

提出的方法

  • 该方法源于梯度的递归解析形式,可实现迭代计算而无需重新模拟门操作。
  • 采用反向顺序应用门的导数,类似于经典机器学习中的反向模式自动微分。
  • 该算法按反向顺序应用门,仅维护一个态矢量,并通过计算内积累积梯度贡献。
  • 每个梯度分量通过一系列态克隆、门应用和内积操作计算,避免显式缓存态。
  • 该方法兼容门并行化、硬件加速以及分布式模拟器。
  • 通过附录 B 中详述的形式化扩展,该方法被推广至处理非幺正电路和非厄米成本算符。

实验结果

研究问题

  • RQ1能否在经典模拟中通过超越标准 O(P²) 扩展的手段,加速变分量子算法中的梯度计算?
  • RQ2是否可能仅使用标准量子模拟器原语,在 O(P) 时间和 O(1) 内存下计算完整梯度?
  • RQ3如何将反向模式自动微分技术适配到幺正量子电路中,使其对量子计算研究人员而言直观且可实现?
  • RQ4将该方法扩展至噪声非幺正量子通道时存在哪些局限性?
  • RQ5所提出的算法能否高效集成到现有量子模拟器(如 Qiskit)中?

主要发现

  • 所提算法在 O(P) 时间和 O(1) 内存下计算完整梯度,相较于标准的 O(P²) 扩展有显著改进。
  • 该方法兼容全态模拟器,并可利用现有硬件加速和分布式计算框架实现高效并行化。
  • 在 Qiskit 中的基准测试显示,相较于忠实模拟,性能有显著提升,O(P) 扩展使得中等规模变分电路的模拟速度更快。
  • 该算法避免了有限差分近似,且无需缓存中间态,降低了内存开销并提高了数值稳定性。
  • 将该方法扩展至噪声通道的密度矩阵模拟在相同效率下不可行,因为 KRAUS 算子项数量呈指数增长。
  • 考虑使用 Choi-Jamiolkowski 同构作为替代方案,但其代价高达 O(P·2⁴ᴺ),低于朴素的 O(P²·2²ᴺ) 评估,因此效率更低。

更好的研究,从现在开始

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

无需绑定信用卡

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