Skip to main content
KetQat

Appearance

Theorem · intermediate

Universality of ZX diagrams

Every linear map from m qubits to n qubits is the interpretation of some ZX diagram. Diagrams with phases restricted to multiples of pi/2 give exactly the stabilizer maps, up to scalars, and multiples of pi/4 give the Clifford+T maps.

Established resultMachine-checkedUpdated 2026-12-01 · last verified 2026-12-01

AI-assisted text, machine-checked, not yet reviewed by a person. Citations resolve and an automated pass compared the statements with the cited sources. That is not peer review; check the sources for anything you depend on.

For all m,n≥0m, n \ge 0 and every linear map M:(C2)⊗m→(C2)⊗nM : (\C^2)^{\otimes m} \to (\C^2)^{\otimes n} there is a ZX diagram DD with [ ⁣[D] ⁣]=M[\![D]\!] = M (Coecke and Duncan; Coecke and Kissinger).

Restricting phases gives the familiar fragments: diagrams with all phases in π2Z\tfrac{\pi}{2}\Z denote, up to nonzero scalars, exactly the stabilizer maps (the setting of Backens), and phases in π4Z\tfrac{\pi}{4}\Z give the Clifford+T fragment (Jeandel, Perdrix and Vilmart). The proof below covers the universality statement only.

Holds when

  • Arbitrary real phases are allowed for the universality statement; the fragment statements restrict phases and are taken up to nonzero scalars.

Proof

Proof of universality of ZX diagramsMachine-checked

Composition and tensor product of diagrams correspond to composition and tensor product of maps, so it suffices to build a generating set.

Pieces. (a) By the basic rules, 2 (I⊗X02,1)(Z01,2⊗I)\sqrt{2}\,(I \otimes X^{2,1}_0)(Z^{1,2}_0 \otimes I) is CNOT. (b) Single-qubit unitaries: every U∈U(2)U \in U(2) is eiφRz(β)Ry(γ)Rz(δ)e^{i\varphi} R_z(\beta) R_y(\gamma) R_z(\delta) by the ZYZ decomposition. Since Ry(γ)=SRx(γ)S†R_y(\gamma) = S R_x(\gamma) S\dagg with S=diag⁡(1,i)S = \operatorname{diag}(1, i), and Rz(θ)=e−iθ/2Zθ1,1R_z(\theta) = e^{-i\theta/2} Z^{1,1}_\theta, Rx(θ)=e−iθ/2Xθ1,1R_x(\theta) = e^{-i\theta/2} X^{1,1}_\theta, S=Zπ/21,1S = Z^{1,1}_{\pi/2}, every UU is a scalar times a product of one-input, one-output spiders. (c) States and effects: X00,1=2∣0⟩X^{0,1}_0 = \sqrt{2}\ket{0} and X01,0=2⟨0∣X^{1,0}_0 = \sqrt{2}\bra{0}. (d) Scalars: the spider with no wires is the number Zα0,0=1+eiα=2cos⁡(α/2) eiα/2Z^{0,0}_\alpha = 1 + e^{i\alpha} = 2\cos(\alpha/2)\, e^{i\alpha/2}. For ∣θ∣<π\abs{\theta} < \pi, the product Zθ+2δ0,0Zθ−2δ0,0=2(cos⁡θ+cos⁡2δ) eiθZ^{0,0}_{\theta + 2\delta} Z^{0,0}_{\theta - 2\delta} = 2(\cos\theta + \cos 2\delta)\, e^{i\theta} takes every modulus in (0,2+2cos⁡θ](0, 2 + 2\cos\theta] as δ\delta varies over [0,π/2)[0, \pi/2); multiplying by copies of Z00,0=2Z^{0,0}_0 = 2 reaches every positive modulus with phase θ\theta. Phase π\pi is the square of phase π/2\pi/2, and 0=Zπ0,00 = Z^{0,0}_\pi. So any scalar multiple of a diagram is a diagram.

Square, contractive case. Let AA act on NN qubits with operator norm ∥A∥≤1\norm{A} \le 1. The block matrix

U=(A(I−AA†)1/2(I−A†A)1/2−A†)U = \begin{pmatrix} A & (I - A A\dagg)^{1/2} \\ (I - A\dagg A)^{1/2} & -A\dagg \end{pmatrix}

on N+1N+1 qubits (first qubit selecting the block) is unitary (a standard unitary dilation of a contraction), as one checks by multiplying out U†UU\dagg U and using A†(I−AA†)1/2=(I−A†A)1/2A†A\dagg (I - A A\dagg)^{1/2} = (I - A\dagg A)^{1/2} A\dagg, which holds because A†f(AA†)=f(A†A)A†A\dagg f(A A\dagg) = f(A\dagg A) A\dagg for every polynomial ff and hence for the square root. Then A=(⟨0∣⊗I) U (∣0⟩⊗I)A = (\bra{0} \otimes I)\, U\, (\ket{0} \otimes I). By exact universality of CNOT and single-qubit gates (Nielsen and Chuang, section 4.5), UU is a finite circuit of pieces (a) and (b), and the state and effect are pieces (c), so AA is a scalar times a diagram, hence a diagram by (d).

General case. Let M:2m→2nM : 2^m \to 2^n be nonzero (the zero map is 00 times any diagram) and N=max⁡(m,n)N = \max(m, n). Put s=1/∥M∥s = 1/\norm{M} and A=(∣0⟩⊗(N−n)⊗sM)(⟨0∣⊗(N−m)⊗I2m)A = (\ket{0}^{\otimes (N - n)} \otimes sM)(\bra{0}^{\otimes (N-m)} \otimes I_{2^m}), a contraction on NN qubits. Then sM=(⟨0∣⊗(N−n)⊗I) A (∣0⟩⊗(N−m)⊗I)sM = (\bra{0}^{\otimes(N-n)} \otimes I)\, A\, (\ket{0}^{\otimes(N-m)} \otimes I), and MM is the scalar ∥M∥\norm{M} times a diagram built from AA and pieces (c).

Part of
Stated in

Open in the knowledge graph

Contributions about this record

Nobody has published a contribution about it yet.

Publish a result, reproduction or commentPropose a correction to this page

References

  1. Bob Coecke, Ross Duncan (2011). Interacting quantum observables: categorical algebra and diagrammatics. New Journal of Physics 13, 043016. doi:10.1088/1367-2630/13/4/043016arXiv:0906.4725
  2. Bob Coecke, Aleks Kissinger (2017). Picturing Quantum Processes. Cambridge University Press. doi:10.1017/9781316219317
  3. Miriam Backens (2014). The ZX-calculus is complete for stabilizer quantum mechanics. New Journal of Physics 16, 093021. doi:10.1088/1367-2630/16/9/093021arXiv:1307.7025
  4. Emmanuel Jeandel, Simon Perdrix, Renaud Vilmart (2018). A complete axiomatisation of the ZX-calculus for Clifford+T quantum mechanics. Proceedings of the 33rd Annual ACM/IEEE Symposium on Logic in Computer Science (LICS 2018), 559-568. doi:10.1145/3209108.3209131arXiv:1705.11151

Contributors

  • KetQat maintainers · @ketqatConceptualization; Supervision (CRediT roles)
  • Claude (AI drafting assistant)Writing, original draft (CRediT roles)

Review history

  1. Automated source check · Pass · 2026-12-01 · Independent automated verification pass (AI, not the drafting session)

    Universality statement compared with Coecke and Duncan, arXiv 0906.4725, Section 2.4 (Euler-angle single-qubit unitaries, CNOT, map-state duality via the cup); stabilizer fragment compared with Backens, arXiv 1307.7025, Sections 1-3 (universality and completeness for stabilizer diagrams, phases multiples of pi/2); Clifford+T fragment attribution checked against the title and abstract of Jeandel, Perdrix and Vilmart, arXiv 1705.11151. Crossref metadata for all four references matched.

Revision history

  1. 2026-12-01Content release 2.1.0: 35 more topics, an independent source check of every record, intake hardening (#17)80537b7e

Current revision 6fc1abb72e6921d0. Source file knowledge/records/theorem/zx-universality.md in the content repository (readable there once it is public).