Diagrammatic Differentiation for Quantum Machine Learning
Alexis Toumi (University of Oxford), Richie Yeung (Cambridge Quantum, Computing Ltd.), Giovanni de Felice (University of Oxford)

TL;DR
This paper introduces a diagrammatic approach to differentiation in quantum machine learning, enabling gradient calculations for quantum circuits using monoidal categories and providing practical tools for implementation.
Contribution
It generalizes diagrammatic differentiation to quantum circuits, extending existing methods to hybrid classical-quantum systems with open-source software support.
Findings
Diagrammatic differentiation computes quantum circuit gradients.
Extension of the parameter-shift rule to hybrid circuits.
Open-source tools facilitate practical quantum machine learning applications.
Abstract
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…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
