Document Open Access Logo

SZX-Calculus: Scalable Graphical Quantum Reasoning

Authors Titouan Carette , Dominic Horsman, Simon Perdrix

Thumbnail PDF


  • Filesize: 0.65 MB
  • 15 pages

Document Identifiers

Author Details

Titouan Carette
  • CNRS, LORIA, Inria Mocqua, Université de Lorraine, F 54000 Nancy, France
Dominic Horsman
  • LIG, Université Grenoble Alpes, France
Simon Perdrix
  • CNRS, LORIA, Inria Mocqua, Université de Lorraine, F 54000 Nancy, France

Cite AsGet BibTex

Titouan Carette, Dominic Horsman, and Simon Perdrix. SZX-Calculus: Scalable Graphical Quantum Reasoning. In 44th International Symposium on Mathematical Foundations of Computer Science (MFCS 2019). Leibniz International Proceedings in Informatics (LIPIcs), Volume 138, pp. 55:1-55:15, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2019)


We introduce the Scalable ZX-calculus (SZX-calculus for short), a formal and compact graphical language for the design and verification of quantum computations. The SZX-calculus is an extension of the ZX-calculus, a powerful framework that captures graphically the fundamental properties of quantum mechanics through its complete set of rewrite rules. The ZX-calculus is, however, a low level language, with each wire representing a single qubit. This limits its ability to handle large and elaborate quantum evolutions. We extend the ZX-calculus to registers of qubits and allow compact representation of sub-diagrams via binary matrices. We show soundness and completeness of the SZX-calculus and provide two examples of applications, for graph states and error correcting codes.

Subject Classification

ACM Subject Classification
  • Theory of computation → Quantum computation theory
  • Quantum computing
  • categorical quantum mechanics
  • completeness
  • scalability


  • Access Statistics
  • Total Accesses (updated on a weekly basis)
    PDF Downloads


  1. Miriam Backens. The ZX-Calculus is Complete for Stabilizer Quantum Mechanics. New Journal of Physics, 16(9):093021, September 2014. URL:
  2. Miriam Backens and Aleks Kissinger. ZH: A complete graphical calculus for quantum computations involving classical non-linearity. In Peter Selinger and Giulio Chiribella, editors, Proceedings of the 15th International Conference on Quantum Physics and Logic, Halifax, Canada, 3-7th June 2018, volume 287 of Electronic Proceedings in Theoretical Computer Science, pages 23-42. Open Publishing Association, 2019. URL:
  3. John C Baez, Brandon Coya, and Franciscus Rebro. Props in network theory. arXiv preprint arXiv:1707.08321, 2017. URL:
  4. BA Bell, DA Herrera-Martí, MS Tame, D Markham, WJ Wadsworth, and JG Rarity. Experimental demonstration of a graph state quantum error-correction code. Nature communications, 5:3658, 2014. Google Scholar
  5. Filippo Bonchi, Paweł Sobociński, and Fabio Zanasi. Interacting Hopf algebras. Journal of Pure and Applied Algebra, 221(1):144-184, 2017. Google Scholar
  6. Daniel E Browne, Elham Kashefi, Mehdi Mhalla, and Simon Perdrix. Generalized flow and determinism in measurement-based quantum computation. New Journal of Physics, 9(8):250, 2007. URL:
  7. Titouan Carette, Dominic Horsman, and Simon Perdrix. SZX-calculus: Scalable graphical quantum reasoning, 2019. URL:
  8. Titouan Carette, Emmanuel Jeandel, Simon Perdrix, and Renaud Vilmart. Completeness of Graphical Languages for Mixed States Quantum Mechanics. In International Colloquium on Automata, Languages, and Programming (ICALP'19), 2019. Google Scholar
  9. Nicholas Chancellor, Aleks Kissinger, Joschka Roffe, Stefan Zohren, and Dominic Horsman. Graphical structures for design and verification of quantum error correction. arXiv preprint arXiv:1611.08012, 2016. URL:
  10. Apiwat Chantawibul and Paweł Sobociński. Monoidal Multiplexing. In International Colloquium on Theoretical Aspects of Computing, pages 116-131. Springer, 2018. Google Scholar
  11. Bob Coecke and Ross Duncan. Interacting quantum observables: categorical algebra and diagrammatics. New Journal of Physics, 13(4):043016, 2011. Google Scholar
  12. Alexander Cowtan, Silas Dilkes, Ross Duncan, Alexandre Krajenbrink, Will Simmons, and Seyon Sivarajah. On the qubit routing problem. arXiv preprint arXiv:1902.08091, 2019. URL:
  13. Vincent Danos, Elham Kashefi, Prakash Panangaden, and Simon Perdrix. Extended Measurement Calculus. Semantic Techniques in Quantum Computation, 2010. Google Scholar
  14. Niel de Beaudrap and Dominic Horsman. The ZX calculus is a language for surface code lattice surgery, 2017. URL:
  15. Ross Duncan. A graphical approach to measurement-based quantum computing. arXiv preprint arXiv:1203.6242, 2012. URL:
  16. Ross Duncan, Aleks Kissinger, Simon Pedrix, and John van de Wetering. Graph-theoretic Simplification of Quantum Circuits with the ZX-calculus. arXiv preprint arXiv:1902.03178, 2019. URL:
  17. Ross Duncan and Maxime Lucas. Verifying the Steane code with Quantomatic. Electronic Proceedings in Theoretical Computer Science, 171:33-49, 2014. arXiv preprint arXiv:1902.03178. URL:
  18. Ross Duncan and Simon Perdrix. Graph states and the necessity of Euler decomposition. In Conference on Computability in Europe (CiE), pages 167-177. Springer, 2009. Google Scholar
  19. Ross Duncan and Simon Perdrix. Rewriting Measurement-Based Quantum Computations with Generalised Flow. In Samson Abramsky, Cyril Gavoille, Claude Kirchner, Friedhelm Meyer auf der Heide, and Paul G. Spirakis, editors, Automata, Languages and Programming, pages 285-296, Berlin, Heidelberg, 2010. Springer Berlin Heidelberg. Google Scholar
  20. Ross Duncan and Simon Perdrix. Pivoting Makes the ZX-Calculus Complete for Real Stabilizers. In QPL 2013, Electronic Proceedings in Theoretical Computer Science, pages 50-62, 2013. URL:
  21. Craig Gidney and Austin G Fowler. Efficient magic state factories with a catalyzed |CCZ> to 2|T> transformation. arXiv preprint arXiv:1812.01238, 2018. URL:
  22. Amar Hadzihasanovic. The algebra of entanglement and the geometry of composition. arXiv preprint arXiv:1709.08086, 2017. URL:
  23. Amar Hadzihasanovic, Kang Feng Ng, and Quanlong Wang. Two Complete Axiomatisations of Pure-state Qubit Quantum Computing. In Proceedings of the 33rd Annual ACM/IEEE Symposium on Logic in Computer Science, LICS '18, pages 502-511, New York, NY, USA, 2018. ACM. URL:
  24. Marc Hein, Wolfgang Dür, Jens Eisert, Robert Raussendorf, M Nest, and H-J Briegel. Entanglement in graph states and its applications. Proceedings of the International School of Physics "Enrico Fermi" on "Quantum Computers, Algorithms and Chaos", 2006. URL:
  25. Jérôme Javelle, Mehdi Mhalla, and Simon Perdrix. New Protocols and Lower Bounds for Quantum Secret Sharing with Graph States. In Kazuo Iwama, Yasuhito Kawano, and Mio Murao, editors, Theory of Quantum Computation, Communication, and Cryptography, volume 7582 of Lecture Notes in Computer Science, pages 1-12. Springer Berlin Heidelberg, 2013. URL:
  26. Emmanuel Jeandel, Simon Perdrix, and Renaud Vilmart. A complete axiomatisation of the ZX-calculus for Clifford+ T quantum mechanics. In Proceedings of the 33rd Annual ACM/IEEE Symposium on Logic in Computer Science (LICS), pages 559-568. ACM, 2018. Google Scholar
  27. Emmanuel Jeandel, Simon Perdrix, and Renaud Vilmart. A Generic Normal Form for ZX-Diagrams and Application to the Rational Angle Completeness. In Proceedings of the 34th Annual ACM/IEEE Symposium on Logic in Computer Science (LICS), 2019. URL:
  28. Emmanuel Jeandel, Simon Perdrix, and Renaud Vilmart. Completeness of the ZX-Calculus. arXiv preprint arXiv:1903.06035, 2019. URL:
  29. Elham Kashefi, Damian Markham, Mehdi Mhalla, and Simon Perdrix. Information flow in secret sharing protocols. In Proc. 5th Workshop on Developments in Computational Models (DCM)., volume 9, pages 87-97. EPTCS, 2009. Google Scholar
  30. Aleks Kissinger and Arianne Meijer-van de Griend. CNOT circuit extraction for topologically-constrained quantum memories. arXiv preprint arXiv:1904.00633, 2019. URL:
  31. Aleks Kissinger and David Quick. A first-order logic for string diagrams. arXiv preprint arXiv:1505.00343, 2015. URL:
  32. Aleks Kissinger and John van de Wetering. Universal MBQC with generalised parity-phase interactions and Pauli measurements. arXiv:1704.06504, 2017. URL:
  33. Aleks Kissinger and John van de Wetering. PyZX, 2018. URL:
  34. Aleks Kissinger and John van de Wetering. Reducing T-count with the ZX-calculus. arXiv preprint arXiv:1903.10477, 2019. URL:
  35. Aleks Kissinger and Vladimir Zamdzhiev. Quantomatic: A proof assistant for diagrammatic reasoning. In International Conference on Automated Deduction, pages 326-336. Springer, 2015. Google Scholar
  36. Stephen Lack. Composing props. Theory and Applications of Categories, 13(9):147-163, 2004. Google Scholar
  37. Damian Markham and Barry C. Sanders. Graph States for Quantum Secret Sharing. Physical Review A, 78:042309, 2008. URL: doi:10.1103/PhysRevA.78.042309.
  38. Mehdi Mhalla and Simon Perdrix. Graph states, pivot minor, and universality of (X, Z)-measurements. arXiv preprint arXiv:1202.6551, 2012. URL:
  39. Filippo M Miatto. Graphical Calculus for products and convolutions. arXiv preprint arXiv:1903.01366, 2019. URL:
  40. Robert Raussendorf, Daniel E. Browne, and Hans J. Briegel. Measurement-based quantum computation on cluster states. Physical Review A, 68(2), August 2003. URL:
  41. D. Schlingemann and R. F. Werner. Quantum error-correcting codes associated with graphs. Physical Review A, 65, 2001. URL:
  42. Maarten Van den Nest. Local equivalence of stabilizer states and codes. PhD thesis, Faculty of Engineering, K. U. Leuven, Belgium, May 2005. Google Scholar
  43. Renaud Vilmart. A Near-Optimal Axiomatisation of ZX-Calculus for Pure Qubit Quantum Mechanics. In Proceedings of the 34th Annual ACM/IEEE Symposium on Logic in Computer Science (LICS), 2019. URL:
  44. Fabio Zanasi. Interacting Hopf Algebras: the theory of linear systems. arXiv preprint arXiv:1805.03032, 2018. URL:
Questions / Remarks / Feedback

Feedback for Dagstuhl Publishing

Thanks for your feedback!

Feedback submitted

Could not send message

Please try again later or send an E-mail