Research2008ICALP

ZX Calculus

Represents quantum states and operations as connected diagrams, with graphical rewrite rules for reasoning about gates, entanglement, and equivalent computations.

1 publication

Visualization labels

03 / Visualization

Visual representations

A closer look

1 figure
Figure 1. Example 1, unnumbered diagram in Section 6.1 (ICALP 2008). Three controlled-X gates with alternating control and target are rewritten into a swap. Green and red nodes denote Z and X observable structures; scalar factors are suppressed in the source example.Bob Coecke and Ross Duncan (2008), Interacting Quantum Observables. Courtesy of the authors. Source

Figure 1

A sequence of six equal graphical expressions rewrites alternating red and green controlled-X structures into crossed swap wires.

Example 1, unnumbered diagram in Section 6.1 (ICALP 2008). Three controlled-X gates with alternating control and target are rewritten into a swap. Green and red nodes denote Z and X observable structures; scalar factors are suppressed in the source example.

Bob Coecke and Ross Duncan (2008), Interacting Quantum Observables. Courtesy of the authors.

Open full-size image
01Publication · 2008

Interacting Quantum Observables

Bob Coecke, Ross Duncan

We formalise the constructive content of an essential feature of quantum mechanics: the interaction of complementary quantum observables, and information flow mediated by them. Using a general categorical formulation, we show that pairs of mutually unbiased quantum observables form bialgebra-like structures. We also provide an abstract account on the quantum data encoded in complex phases, and prove a normal form theorem for it. Together these enable us to describe all observables of finite dimensional Hilbert space quantum mechanics. The resulting equations suffice to perform computations with elementary quantum gates, translate between distinct quantum computational models, establish the equivalence of entangled quantum states, and simulate quantum algorithms such as the quantum Fourier transform. All these computations moreover happen within an intuitive diagrammatic calculus.

From the survey collection
Background and motivation

Complementary observables express a familiar quantum constraint: a state with a definite value for one observable has no definite value for a complementary one. For finite-dimensional systems, the paper studies this through mutually unbiased observables, whose normalized eigenvectors satisfy ∣⟨ψi∣ϕj⟩∣2=1/d|\langle\psi_i|\phi_j\rangle|^2=1/d in dimension dd. The problem is established, but Coecke and Duncan seek a constructive account that supports calculations about quantum information rather than only characterizing incompatibility. They argue that descriptions based on noncommuting operators or nondistributive propositional lattices do not directly expose the computational operations enabled by complementary observables. Their target applications include reasoning about gates, entanglement, algorithms, and equivalence between computational models.

The work builds on categorical quantum mechanics, particularly dagger symmetric monoidal categories, classical structures introduced by Coecke and Pavlovic, and graphical reasoning for tensor composition. Earlier classical structures capture the copying and erasing of distinguishable classical data and correspond to orthonormal bases in finite-dimensional Hilbert spaces. The paper's central step is to study two such structures together with their phase information. This turns complementarity into equations that can be used to transform diagrams and prove that differently presented processes have the same meaning. The contribution is a mathematical graphical calculus, illustrated with derivations, rather than an interactive visualization system or a software implementation.

States, observables, and classical structures

The categorical setting separates physical states from the arbitrary choice of vector used to represent them. The category FdHilbp\mathrm{FdHilb}_p identifies linear maps that differ by a nonzero complex scalar, while FdHilbwp\mathrm{FdHilb}_{wp} identifies maps that differ only by a global phase. The latter retains magnitude information needed for probabilistic reasoning while discarding physically irrelevant global phase. This distinction matters because the algebraic laws contain scalar factors even when some later examples suppress them.

A classical structure consists of a copying map δ:A→A⊗A\delta:A\to A\otimes A and an erasing map ϵ:A→I\epsilon:A\to I, subject to comonoid, isometry, and Frobenius equations. For an orthonormal basis, these maps act as δ(∣ψi⟩)=∣ψi⟩⊗∣ψi⟩\delta(|\psi_i\rangle)=|\psi_i\rangle\otimes|\psi_i\rangle and ϵ(∣ψi⟩)=1\epsilon(|\psi_i\rangle)=1. The copying claim applies to the distinguished basis states, not to arbitrary quantum states. In the weighted projective setting, a classical structure is specified by an observable together with an additional state unbiased to that observable. For a qubit, the unnumbered Bloch-sphere diagram on PDF page 3 shows the two eigenstates as antipodal points and the additional state as a point on the equator, producing a T-shaped configuration. The equatorial point supplies a choice of erasing operation that is not determined by the observable alone.

Graphical encoding and the generalized spider theorem

Diagrams represent morphisms by nodes joined by wires, with sequential connection and side-by-side placement expressing composition and tensor product. A branching node represents copying, its reversed form represents the adjoint operation, and one-legged nodes represent erasing or state preparation according to orientation. The original spider theorem says that a connected diagram built from one classical structure is determined solely by its numbers of inputs and outputs. Its internal arrangement can therefore be replaced by a single node with the same external legs. The unnumbered spider diagram on PDF page 4 makes this simplification explicit.

The paper extends this result by allowing states to decorate the diagram. It defines a commutative product of points and a corresponding operation on the system:

ψ⊙ϕ=δ†∘(ψ⊗ϕ),Λ(ψ)=δ†∘(ψ⊗1A).\psi\odot\phi=\delta^\dagger\circ(\psi\otimes\phi), \qquad \Lambda(\psi)=\delta^\dagger\circ(\psi\otimes 1_A).

The generalized spider theorem reduces a connected diagram to one decorated spider whose label is the product of all its point labels. PDF page 5 shows a network of same-colored nodes collapsing into a single node while preserving its external wires and collecting its decorations. This is a normal-form result for connected diagrams associated with one classical structure; it does not establish a unique normal form for every diagram involving multiple observables.

In Hilbert space, Λ(ψ)\Lambda(\psi) is diagonal in the selected basis, with the components of ψ\psi on its diagonal. Unbiased points yield unitary operations with the appropriate normalization and form a group under ⊙\odot. For the qubit computational basis, the relevant states have representatives ∣0⟩+eiθ∣1⟩|0\rangle+e^{i\theta}|1\rangle, and combining their labels adds phases modulo 2π2\pi. The Bloch-sphere diagram on PDF page 6 depicts the changing choice of unbiased state around the equator. Thus phase information is encoded by algebraic node labels, while the graph records how processes connect.

Complementarity and scaled bialgebra laws

The two observable structures are distinguished by green and red nodes, with light and dark gray suggested as equivalents. In the qubit examples, green denotes the computational, or ZZ, structure and red denotes the complementary XX structure. A point classical for one structure is unbiased for the other, which allows it to participate in the other structure's phase calculus. Hadamard operations appear as labeled yellow boxes and implement the change between the two colors. The visual operations are formal rewrites of these colored networks, not interface gestures or displays of measured data.

The main interaction result is that complementary classical structures with suitable closed bases obey scaled bialgebra equations. Closedness means that the selected unbiased basis contains the unit and remains within that basis under the point product. Together with the assumption that bases compose appropriately under tensor product, this permits algebraic statements about their elements to determine equalities of whole processes. The mixed-color equations on PDF pages 8 and 9 explain how copying, merging, and labeled points interact across the two structures. For example, a network distributing two inputs through one color and combining them through the other can be rewritten as a smaller mixed-color network, with the required dimension-dependent scalar. The paper also derives a scaled Hopf law and simplifies the scalar equations in the weighted projective setting.

The qualification about closed bases is substantive. Section 5.3 states that the authors have not proved that every pair of complementary observables admits the required underlying closed structures in full generality. They report closedness for the two- and three-dimensional cases, its availability for all constructions of mutually unbiased bases known to them, and constructions of closed complementary structures in every dimension. The universal statement remains a conjecture in this paper, despite the broader wording of its abstract.

Worked applications and evidence

The paper validates the calculus through mathematical results and worked quantum-information examples. Phase operations associated with the two qubit observables represent single-qubit unitaries, and mixed-color diagrams represent controlled gates. Example 1 on PDF page 10 constructs controlled-XX and rewrites three controlled-XX gates with alternating control and target into a wire swap. Example 2 on PDF page 11 obtains controlled-ZZ through Hadamard changes of basis and shows that two consecutive controlled-ZZ gates cancel. These examples demonstrate how structural identities replace explicit matrix multiplication.

Example 3 represents a two-qubit quantum Fourier transform and carries out a graphical calculation using labeled phases and both observable structures. The sequence on PDF page 11 propagates encoded classical inputs through the circuit and combines phase labels to obtain the resulting state diagram. Here, simulation means an explicit symbolic derivation within the calculus. The paper does not present a simulation program, runtime measurements, or an evaluation of large Fourier-transform circuits.

For multipartite states, diagrams have no input wires, and each output wire denotes a component qubit. Example 4 on PDF pages 11 and 12 compares two preparations of a one-dimensional cluster state: controlled-ZZ interactions between qubits prepared in ∣+⟩|+\rangle, and fusion of smaller entangled states. Dashed boxes identify the preparation and gate components before rewriting. Spider fusion reduces the constructions to equivalent graphical forms, providing a proof that the preparations describe the same state.

Example 5 on PDF page 12 verifies post-selected one-way computations by rewriting them into circuit operations. One derivation reduces a measurement-based pattern to controlled-XX, and another reduces a pattern to the phase-operation sequence in an Euler decomposition of a single-qubit unitary. The examples use post-selected measurements; a footnote states that the classical-control machinery can extend them with the required unitary corrections. They demonstrate particular translations and equivalences, not an implemented general-purpose compiler. The paper includes no user study, empirical visualization evaluation, or hardware experiment.

Contributions, limitations, and future work

The principal contributions are an abstract treatment of phase data, a generalized spider normal form, and equations governing the interaction of complementary structures under the stated algebraic assumptions. Their combination supplies a shared graphical language for processes normally expressed as gates, state preparations, or measurement-based programs. The diagrams are the objects manipulated in proofs, so their topology, colors, and labels carry mathematical meaning rather than merely illustrating a calculation performed elsewhere.

The main unresolved theoretical issue is the general closedness conjecture described above. The applications concentrate on qubits, and their worked derivations suppress scalar factors to emphasize the structural reasoning. Consequently, those displayed examples should not be read as complete probability-accounting procedures without reinstating the relevant scalars. The paper also does not establish a complexity advantage for diagrammatic rewriting or a complete decision procedure for arbitrary diagram equivalence. Its explicitly identified ongoing work concerns classifying multipartite entangled states through their graphical representatives and formalizing general matrix product states.

Download .bib
@inproceedings{Coecke2008zxcalculus,
  author = {Coecke, Bob and Duncan, Ross},
  editor = {Aceto, Luca and others},
  publisher = {Springer Berlin Heidelberg},
  address = {Berlin, Heidelberg},
  booktitle = {Automata, Languages and Programming},
  isbn = {978-3-540-70583-3},
  pages = {298--310},
  title = {Interacting Quantum Observables},
  year = {2008},
}