变分量子算法经典模拟中梯度的有效计算
Efficient calculation of gradients in classical simulations of variational quantum algorithms
摘要:
计算参数空间中的能量梯度已经成为变分近期量子算法中几乎无处不在的子程序。这个子程序的“忠实”经典仿真模拟了它的量子计算,并缩放为P变分参数的O(P^2)门运算。这往往是中等规模的仿真的瓶颈,并吸引了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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。