nLab ZX-calculus




Quantum systems

quantum logic

quantum physics

quantum probability theoryobservables and states

quantum information

quantum computation


quantum algorithms:

quantum sensing

quantum communication



The “ZX-calculus” is an elaboration for the purpose of qbit-based quantum computation of the string diagram-calculus used in quantum information theory via dagger-compact categories.

The basic idea is to formalize the co-existence of the ubiquitous pair of measurement bases of qbits QBit 2QBit \simeq \mathbb{C}^2, namely

  1. the “computational basis”

    {|0,|1} \big\{ \left\vert 0 \right\rangle ,\, \left\vert 1 \right\rangle \big\}

    which consists (by common convention) of the eigenstates of the Pauli-Z gate;

  2. the Hadamard basis

    {12(|0±|1)} \Big\{ \tfrac{1}{\sqrt{2}} \big( \left\vert 0 \right\rangle \pm \left\vert 1 \right\rangle \big) \Big\}

    which consists of the eigenstates of the Pauli-X gate;

by observing [Coecke & Duncan, p. 1] that:

  1. either equips QBit= 2QBit = \mathbb{C}^2 with a Frobenius algebra-structure (associated to the Frobenius monad-structure of the corresponding quantum reader monad as originally observed by [Coecke & Pavlović (2008)]);

  2. jointly these make a certain bialgebra-structure, algebraically reflecting the fact that they are mutually unbiased bases.

It is this bi-algebraic formalizaton of the interaction between the “Pauli-Z basis” and the “Pauli-X basis” for qbits which gives the ZX-calculus its name.

Graphically, the ZX-calculus proceeds to declare that:

  1. the (co-)multiplication and (co)-unit string diagrams of these two Frobenius algebra-structures are to be denoted

    1. in green for the Z-basis

    2. in red for the X-basis

  2. connected sub-string diagrams formed from (co-)multiplications and (co-)units all of the same color are shown as a single box/circle with the given number of in/outputs – then called spiders

    (since the Frobenius algebra-property ensures — recalled as Coecke & Duncan (2011), Theorem 1 — that any connected diagrams are equal iff they have the same number of in/outputs).



Landing page:

The ZX-calculus has its origin as a tool for organizing measurement-based quantum computation-protocols, following Danos, Kahsefi & Panangaden (2007):

The official introduction of the ZX-calculus:

Textbook account:

Introduction and review:

Further developments:

  • Hector Bombin, Daniel Litinski, Naomi Nickerson, Fernando Pastawski, Sam Roberts, Unifying flavors of fault tolerance with the ZX calculus [arXiv:2303.08829]

Relation to braided fusion categories for anyon braiding:

See also:

  • Razin A. Shaikh, Quanlong Wang, Richie Yeung, How to sum and exponentiate Hamiltonians in ZXW calculus [arXiv:2212.04462]


Last revised on August 15, 2023 at 08:36:45. See the history of this page for a list of all contributions to it.