@inproceedings{
charton2023teaching,
title={Teaching small transformers to rewrite {ZX} diagrams},
author={Francois Charton and Alexandre Krajenbrink and Konstantinos Meichanetzidis and Richie Yeung},
booktitle={The 3rd Workshop on Mathematical Reasoning and AI at NeurIPS'23},
year={2023},
url={https://openreview.net/forum?id=btQ7Bt1NLF}
}
ZX calculus is a graphical language for reasoning about linear maps. Maps are represented as graphs, and reasoning amounts to graph rewrites. The main applications of ZX calculus are in quantum computation. We train small transformers to simplify ZX graphs, i.e. perform resource optimisation of quantum circuits. 

Preliminary experiments show that transformers can be trained to simplify CNOT and Clifford circuits with high accuracy. These are the simplest kinds of ZX graphs, in the sense that there exists an efficient rewrite strategy. We also show evidence that transformers learn to simplify the more complex Clifford+T graphs, for which in general there does not exist an efficient simplification algorithm.
Teaching small transformers to rewrite ZX diagrams
Francois Charton Alexandre Krajenbrink Konstantinos Meichanetzidis Richie Yeung