Representing Matrices Using Algebraic ZX-calculus

Wang, Quanlong

arXiv.org Artificial Intelligence 

Matrices are used everywhere in modern science, like machine learning [11] or quantum computing [12], to name a few. Meanwhile, there is a graphical language called ZX-calculus that could also deal with matrix calculations such as matrix multiplication and tensor product [2, 3]. Then there naturally arises a question: why are people bothering with using diagrams for matrix calculations given that matrix technology has been applied with great successes? There are a few reasons for doing so. First, there is a lot of redundancy in matrix calculations which could be avoided in graphical calculus. For example, to prove the cyclic property of matrices tr(AB) tr(BA), all the elements of the two matrices will be involved, while in graphical language like ZXcalculus, the proof of the cyclic property is almost a tautology [4]. Second, matrix calculations always have all the elements of matrices involved, thus a "global" operation, while in ZX-calculus, the operations are just diagram rewriting where only a part of a diagram is replaced by another sub-diagram according to certain rewriting rule, thus essentially a "local" operation which makes things much easier. Finally, graphical calculus is much more intuitive than matrix calculation, therefore a pattern/structure is more probably to be recognised in a graphical formalism. In fact, as a graphical calculus for matrix calculation, ZX-calculus has achieved plenty of successes in the field of quantum computing and information [1, 5, 7, 13] For research realm beyond quantum, traditional ZX-calculus [2] is inconvenient as "it lacks a way to directly encode the complex numbers" [18].