Teaching Small Transformers to Rewrite ZX Diagrams

Abstract

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.

Cite

Text

Charton et al. "Teaching Small Transformers to Rewrite ZX Diagrams." NeurIPS 2023 Workshops: MATH-AI, 2023.

Markdown

[Charton et al. "Teaching Small Transformers to Rewrite ZX Diagrams." NeurIPS 2023 Workshops: MATH-AI, 2023.](https://mlanthology.org/neuripsw/2023/charton2023neuripsw-teaching/)

BibTeX

@inproceedings{charton2023neuripsw-teaching,
  title     = {{Teaching Small Transformers to Rewrite ZX Diagrams}},
  author    = {Charton, Francois and Krajenbrink, Alexandre and Meichanetzidis, Konstantinos and Yeung, Richie},
  booktitle = {NeurIPS 2023 Workshops: MATH-AI},
  year      = {2023},
  url       = {https://mlanthology.org/neuripsw/2023/charton2023neuripsw-teaching/}
}