Teaching small transformers to rewrite ZX diagrams

Published: 28 Oct 2023, Last Modified: 16 Nov 2023MATH-AI 23 PosterEveryoneRevisionsBibTeX
Keywords: quantum, computing, transformers, optimization, ZX calculus
TL;DR: Using Transformers to optimize quantum compilers - casting the problem as a (hard) graph rewriting task
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.
Submission Number: 34
Loading