On the Principles of Differentiable Quantum Programming Languages
arXiv:2004.01122 · doi:10.1145/3385412.3386011
Abstract
Variational Quantum Circuits (VQCs), or the so-called quantum neural-networks, are predicted to be one of the most important near-term quantum applications, not only because of their similar promises as classical neural-networks, but also because of their feasibility on near-term noisy intermediate-size quantum (NISQ) machines. The need for gradient information in the training procedure of VQC applications has stimulated the development of auto-differentiation techniques for quantum circuits. We propose the first formalization of this technique, not only in the context of quantum circuits but also for imperative quantum programs (e.g., with controls), inspired by the success of differentiable programming languages in classical machine learning. In particular, we overcome a few unique difficulties caused by exotic quantum features (such as quantum no-cloning) and provide a rigorous formulation of differentiation applied to bounded-loop imperative quantum programs, its code-transformation rules, as well as a sound logic to reason about their correctness. Moreover, we have implemented our code transformation in OCaml and demonstrated the resource-efficiency of our scheme both analytically and empirically. We also conduct a case study of training a VQC instance with controls, which shows the advantage of our scheme over existing auto-differentiation for quantum circuits without controls.
Codes are available at https://github.com/LibertasSpZ/adcompile
References in corpus (19)
- Quantum Computing in the NISQ era and beyond
- Supplementary information for "Quantum supremacy using a programmable superconducting processor"
- A variational eigenvalue solver on a quantum processor
- A Quantum Approximate Optimization Algorithm
- Evaluating analytic gradients on quantum hardware
- Circuit-centric quantum classifiers
- Quantum optimization using variational algorithms on near-term quantum devices
- Differentiable Learning of Quantum Circuit Born Machine
- PennyLane: Automatic differentiation of hybrid quantum-classical computations
- Q#: Enabling scalable quantum computing and development with a high-level domain-specific language
- Training of Quantum Circuits on a Hybrid Quantum Computer
- LIQUi|>: A Software Design Architecture and Domain-Specific Language for Quantum Computing
- Learning to Transduce with Unbounded Memory
- A functional quantum programming language
- Practical optimization for hybrid quantum-classical algorithms
- Introduction to Quantum Computation
- A Simple Differentiable Programming Language
- Quantitative Robustness Analysis of Quantum Programs (Extended Version)
- Pycobra: A Python Toolbox for Ensemble Learning and Visualisation