PennyLane: Automatic differentiation of hybrid quantum-classical computations

PennyLane is a Python 3 software framework for optimization and machine learning of quantum and hybrid quantum-classical computations. The library provides a unified architecture for near-term quantum computing devices, supporting both qubit and continuous-variable paradigms. PennyLane's core feature is the ability to compute gradients of variational quantum circuits in a way that is compatible with classical techniques such as backpropagation. PennyLane thus extends the automatic differentiation algorithms common in optimization and machine learning to include quantum and hybrid computations. A plugin system makes the framework compatible with any gate-based quantum simulator or hardware. We provide plugins for Strawberry Fields, Rigetti Forest, Qiskit, Cirq, and ProjectQ, allowing PennyLane optimizations to be run on publicly accessible quantum devices provided by Rigetti and IBM Q. On the classical front, PennyLane interfaces with accelerated machine learning libraries such as TensorFlow, PyTorch, and autograd. PennyLane can be used for the optimization of variational quantum eigensolvers, quantum approximate optimization, quantum machine learning models, and many other applications.

[1]  Ryan Babbush,et al.  The theory of variational hybrid quantum-classical algorithms , 2015, 1509.04279.

[2]  Keisuke Fujii,et al.  Quantum circuit learning , 2018, Physical Review A.

[3]  Nathan Killoran,et al.  Quantum Natural Gradient , 2019, Quantum.

[4]  Matthias Troyer,et al.  ProjectQ: An Open Source Software Framework for Quantum Computing , 2016, ArXiv.

[5]  N. Killoran,et al.  Strawberry Fields: A Software Platform for Photonic Quantum Computing , 2018, Quantum.

[6]  Alán Aspuru-Guzik,et al.  qHiPSTER: The Quantum High Performance Software Testing Environment , 2016, ArXiv.

[7]  William J. Zeng,et al.  A Practical Quantum Instruction Set Architecture , 2016, ArXiv.

[8]  Yudong Cao,et al.  OpenFermion: the electronic structure package for quantum computers , 2017, Quantum Science and Technology.

[9]  Sandeep Sharma,et al.  PySCF: the Python‐based simulations of chemistry framework , 2018 .

[10]  M. Schuld,et al.  Circuit-centric quantum classifiers , 2018, Physical Review A.

[11]  Seth Lloyd,et al.  Continuous-variable quantum neural networks , 2018, Physical Review Research.

[12]  Matthew L. Leininger,et al.  Psi4: an open‐source ab initio electronic structure program , 2012 .

[13]  Mikhail Smelyanskiy,et al.  Practical optimization for hybrid quantum-classical algorithms , 2017, 1701.01450.

[14]  Dacheng Tao,et al.  The Expressive Power of Parameterized Quantum Circuits , 2018, ArXiv.

[15]  Peter D. Johnson,et al.  QVECTOR: an algorithm for device-tailored quantum error correction , 2017, 1711.02249.

[16]  Lei Wang,et al.  Differentiable Learning of Quantum Circuit Born Machine , 2018, Physical Review A.

[17]  E. Farhi,et al.  A Quantum Approximate Optimization Algorithm , 2014, 1411.4028.

[18]  Thomas Alexander,et al.  Qiskit Backend Specifications for OpenQASM and OpenPulse Experiments , 2018, ArXiv.

[19]  Kristan Temme,et al.  Supervised learning with quantum-enhanced feature spaces , 2018, Nature.

[20]  Simone Severini,et al.  Universal discriminative quantum neural networks , 2018, Quantum Machine Intelligence.

[21]  Dougal Maclaurin,et al.  Modeling, Inference and Optimization With Composable Differentiable Procedures , 2016 .

[22]  Patrick J. Coles,et al.  Variational quantum state diagonalization , 2018, npj Quantum Information.

[23]  Krysta Marie Svore,et al.  LIQUi|>: A Software Design Architecture and Domain-Specific Language for Quantum Computing , 2014, ArXiv.

[24]  Seth Lloyd,et al.  Quantum Generative Adversarial Learning. , 2018, Physical review letters.

[25]  Alán Aspuru-Guzik,et al.  Quantum autoencoders for efficient compression of quantum data , 2016, 1612.02806.

[26]  Barak A. Pearlmutter,et al.  Automatic differentiation in machine learning: a survey , 2015, J. Mach. Learn. Res..

[27]  C. Gogolin,et al.  Evaluating analytic gradients on quantum hardware , 2018, Physical Review A.

[28]  Simone Severini,et al.  Hierarchical quantum classifiers , 2018, npj Quantum Information.

[29]  Maria Schuld,et al.  Quantum Machine Learning in Feature Hilbert Spaces. , 2018, Physical review letters.

[30]  Dirk Englund,et al.  Quantum optical neural networks , 2018, npj Quantum Information.

[31]  Yudong Cao,et al.  A framework for algorithm deployment on cloud-based quantum computers , 2018, 1810.10576.

[32]  Nathan Killoran,et al.  Quantum generative adversarial networks , 2018, Physical Review A.

[33]  Hartmut Neven,et al.  Classification with Quantum Neural Networks on Near Term Processors , 2018, 1802.06002.

[34]  K. Birgitta Whaley,et al.  Towards quantum machine learning with tensor networks , 2018, Quantum Science and Technology.

[35]  Luca Antiga,et al.  Automatic differentiation in PyTorch , 2017 .

[36]  Alán Aspuru-Guzik,et al.  Variational Quantum Factoring , 2018, QTOP@NetSys.

[37]  Xiao Wang,et al.  Psi4 1.1: An Open-Source Electronic Structure Program Emphasizing Automation, Advanced Libraries, and Interoperability. , 2017, Journal of chemical theory and computation.

[38]  Adam Zalcman,et al.  TensorNetwork: A Library for Physics and Machine Learning , 2019, ArXiv.

[39]  Razvan Pascanu,et al.  Theano: A CPU and GPU Math Compiler in Python , 2010, SciPy.

[40]  Yuan Yu,et al.  TensorFlow: A system for large-scale machine learning , 2016, OSDI.

[41]  Michael Broughton,et al.  A quantum algorithm to train neural networks using low-depth circuits , 2017, 1712.05304.

[42]  Alán Aspuru-Guzik,et al.  A variational eigenvalue solver on a photonic quantum processor , 2013, Nature Communications.