The emergence of variational quantum applications has led to the development of automatic differentiation techniques in quantum computing. Recently, Zhu et al. (PLDI 2020) have formulated differentiable quantum programming with bounded loops, providing a framework for scalable gradient calculation by quantum means for training quantum variational applications. However, promising parameterized quantum applications, e.g., quantum walk and unitary implementation, cannot be trained in the existing framework due to the natural involvement of unbounded loops. To fill in the gap, we provide the first differentiable quantum programming framework with unbounded loops, including a newly designed differentiation rule, code transformation, and their correctness proof. Technically, we introduce a randomized estimator for derivatives to deal with the infinite sum in the differentiation of unbounded loops, whose applicability in classical and probabilistic programming is also discussed. We implement our framework with Python and Q#, and demonstrate a reasonable sample efficiency. Through extensive case studies, we showcase an exciting application of our framework in automatically identifying close-to-optimal parameters for several parameterized quantum applications.
翻译:差异量子应用的出现导致在量子计算中开发了自动差异化技术。最近,朱等人(2020年,朱等人)制定了有闭合环的可区别量子编程,为以量子变换应用培训量子应用的量子计算提供了一个框架,但是,由于无限制环的自然参与,有希望的参数化量子应用,例如量子行走和统一实施等,无法在现有框架内接受培训。为了填补空白,我们提供了第一个具有无约束环的可区别量子编程框架,包括新设计的区分规则、代码转换及其正确性证明。在技术上,我们为衍生物引入一个随机化估算器,处理无限制环的无限总量,也讨论了这些参数在传统和概率性编程中的可适用性。我们与Python和 ⁇ 一起执行我们的框架,并展示了合理的样本效率。通过广泛的案例研究,我们展示了我们框架在自动确定若干参数化的参数的近至最佳参数方面的令人兴奋的应用。