论文标题

有效计算变异量子算法的经典模拟中的梯度

Efficient calculation of gradients in classical simulations of variational quantum algorithms

论文作者

Jones, Tyson, Gacon, Julien

论文摘要

计算参数空间中的能量梯度已成为变异近期量子算法的几乎普遍存在的亚例子。该子例程模仿其量子评估的“忠实”经典仿真,并以p变量参数为o(p^2)门操作。这通常是适度尺寸模拟的瓶颈,并且吸引了HPC策略等HPC策略等评估。在这里,我们提出了一种仿真策略的新型推导,以精确计算O(p)时间和使用O(1)状态向量的梯度,该梯度与“全州”状态矢量模拟器兼容。该规定的算法类似于优化的技术,用于自动差异化可逆成本功能,通常用于经典的机器学习,并首先在yao.jl等量子模拟器中使用。相比之下,我们的计划直接源自量子运算符的复发形式,并且可能对量子计算社区更熟悉。我们的策略非常简单,仅使用“应用门”,“克隆状态”和“内部产品”原语,因此直接与现有模拟器进行实现和集成。它与门并行化方案以及硬件加速和分布的模拟器兼容。我们以启发性的方式描述该方案,包括有关如何执行通用门导数的详细信息,以清楚地指导现有量子模拟器中的实现。此外,我们通过在Qiskit中实施该计划,并通过忠实的模拟执行一些比较基准测试。最后,我们注意到将方案扩展到嘈杂通道的密度静音模拟的困难。

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.

扫码加入交流群

加入微信交流群

微信交流群二维码

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