Diagrammatic Differentiation for Quantum Machine Learning

03/14/2021
by   Alexis Toumi, et al.
0

We introduce diagrammatic differentiation for tensor calculus by generalising the dual number construction from rigs to monoidal categories. Applying this to ZX diagrams, we show how to calculate diagrammatically the gradient of a linear map with respect to a phase parameter. For diagrams of parametrised quantum circuits, we get the well-known parameter-shift rule at the basis of many variational quantum algorithms. We then extend our method to the automatic differentation of hybrid classical-quantum circuits, using diagrams with bubbles to encode arbitrary non-linear operators. Moreover, diagrammatic differentiation comes with an open-source implementation in DisCoPy, the Python library for monoidal categories. Diagrammatic gradients of classical-quantum circuits can then be simplified using the PyZX library and executed on quantum hardware via the tket compiler. This opens the door to many practical applications harnessing both the structure of string diagrams and the computational power of quantum machine learning.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
11/12/2018

PennyLane: Automatic differentiation of hybrid quantum-classical computations

PennyLane is a Python 3 software framework for optimization and machine ...
research
02/08/2023

Symbolic Quantum Simulation with Quasimodo

The simulation of quantum circuits on classical computers is an importan...
research
01/31/2022

Differentiating and Integrating ZX Diagrams

ZX-calculus has proved to be a useful tool for quantum technology with a...
research
05/14/2021

Decision Diagrams for Quantum Measurements with Shallow Circuits

We consider the problem of estimating quantum observables on a collectio...
research
10/08/2021

lambeq: An Efficient High-Level Python Library for Quantum NLP

We present lambeq, the first high-level Python library for Quantum Natur...
research
03/10/2021

Evaluating Linear Functions to Symmetric Monoidal Categories

A number of domain specific languages, such as circuits or data-science ...
research
07/28/2021

Functorial String Diagrams for Reverse-Mode Automatic Differentiation

We enhance the calculus of string diagrams for monoidal categories with ...

Please sign up or login with your details

Forgot password? Click here to reset