Skip to main content
KetQat

Appearance

Proof · intermediate

Proof of spider fusion and the basic ZX rules

Direct computation in the computational basis. Spiders are sums of two terms indexed by a bit, contraction along a wire forces the bits to agree, and the remaining rules reduce to small matrix identities.

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.

Write Zαa,b=∑x∈{0,1}eiαx ∣x⟩⊗b⟨x∣⊗aZ^{a,b}_\alpha = \sum_{x \in \{0,1\}} e^{i\alpha x}\, \ket{x}^{\otimes b}\bra{x}^{\otimes a}.

1. Fusion. Contracting kk wires between the two spiders gives

∑x,yeiαxeiβy ⟨y∣x⟩k  ∣x⟩⊗b1∣y⟩⊗b2 ⟨x∣⊗a1⟨y∣⊗a2=∑xei(α+β)x ∣x⟩⊗(b1+b2)⟨x∣⊗(a1+a2),\sum_{x, y} e^{i\alpha x} e^{i\beta y}\, \braket{y}{x}^{k}\; \ket{x}^{\otimes b_1}\ket{y}^{\otimes b_2}\, \bra{x}^{\otimes a_1}\bra{y}^{\otimes a_2} = \sum_x e^{i(\alpha+\beta)x}\, \ket{x}^{\otimes (b_1+b_2)} \bra{x}^{\otimes (a_1+a_2)},

since ⟨y∣x⟩k=δxy\braket{y}{x}^k = \delta_{xy} for k≥1k \ge 1. A self-loop contracts an output with an input of the same term, contributing ⟨x∣x⟩=1\braket{x}{x} = 1, so it can be removed. For X spiders conjugate by Hadamards (rule 3), which commute with contraction because HH is real and symmetric, so ∑jHijHjk=δik\sum_j H_{ij} H_{jk} = \delta_{ik} along each internal wire.

2. Identity. Z01,1=∣0⟩⟨0∣+∣1⟩⟨1∣=IZ^{1,1}_0 = \ketbra{0}{0} + \ketbra{1}{1} = I, and X01,1=∣+⟩⟨+∣+∣−⟩⟨−∣=IX^{1,1}_0 = \ketbra{+}{+} + \ketbra{-}{-} = I.

3. Colour change. H∣x⟩=∣±⟩H\ket{x} = \ket{\pm} for x=0,1x = 0, 1, so H⊗bZαa,bH⊗a=∣+⟩⊗b⟨+∣⊗a+eiα∣−⟩⊗b⟨−∣⊗aH^{\otimes b} Z^{a,b}_\alpha H^{\otimes a} = \ket{+}^{\otimes b}\bra{+}^{\otimes a} + e^{i\alpha}\ket{-}^{\otimes b}\bra{-}^{\otimes a}, using H†=HH\dagg = H. And H2=IH^2 = I by multiplying the matrices.

4. π\pi-copy. Xπ1,1=∣+⟩⟨+∣−∣−⟩⟨−∣X^{1,1}_\pi = \ketbra{+}{+} - \ketbra{-}{-} is the Pauli XX, which maps ∣x⟩↦∣1−x⟩\ket{x} \mapsto \ket{1-x}. Hence Zα1,bX=∑xeiαx∣x⟩⊗b⟨1−x∣=∑yeiα(1−y)∣1−y⟩⊗b⟨y∣=eiα X⊗b∑ye−iαy∣y⟩⊗b⟨y∣=eiαX⊗bZ−α1,bZ^{1,b}_\alpha X = \sum_x e^{i\alpha x} \ket{x}^{\otimes b} \bra{1-x} = \sum_y e^{i\alpha(1-y)} \ket{1-y}^{\otimes b}\bra{y} = e^{i\alpha}\, X^{\otimes b} \sum_y e^{-i\alpha y} \ket{y}^{\otimes b}\bra{y} = e^{i\alpha} X^{\otimes b} Z^{1,b}_{-\alpha}.

5. Copy. The first two identities are immediate from the definition. For the last, X00,1=∣+⟩+∣−⟩=2∣0⟩X^{0,1}_0 = \ket{+} + \ket{-} = \sqrt{2}\ket{0}.

6. Bialgebra. Both sides are maps from two qubits to two qubits; compare them on basis states. First, X02,1=∣+⟩(⟨+∣⟨+∣)+∣−⟩(⟨−∣⟨−∣)X^{2,1}_0 = \ket{+}(\bra{+}\bra{+}) + \ket{-}(\bra{-}\bra{-}) sends ∣x1x2⟩↦12[(∣+⟩+(−1)x1+x2∣−⟩)]=12∣x1⊕x2⟩\ket{x_1 x_2} \mapsto \tfrac{1}{2}\big[(\ket{+} + (-1)^{x_1+x_2}\ket{-})\big] = \tfrac{1}{\sqrt{2}}\ket{x_1 \oplus x_2}, since ⟨−∣x⟩=(−1)x/2\braket{-}{x} = (-1)^x/\sqrt{2}. So the left side sends ∣x1x2⟩↦12∣x1⊕x2⟩∣x1⊕x2⟩\ket{x_1 x_2} \mapsto \tfrac{1}{\sqrt{2}}\ket{x_1 \oplus x_2}\ket{x_1 \oplus x_2}. On the right side, Z01,2⊗Z01,2Z^{1,2}_0 \otimes Z^{1,2}_0 sends ∣x1x2⟩↦∣x1x1x2x2⟩\ket{x_1 x_2} \mapsto \ket{x_1 x_1 x_2 x_2}, the middle swap reorders this to ∣x1x2x1x2⟩\ket{x_1 x_2 x_1 x_2}, and X02,1⊗X02,1X^{2,1}_0 \otimes X^{2,1}_0 gives 12∣x1⊕x2⟩∣x1⊕x2⟩\tfrac{1}{2}\ket{x_1 \oplus x_2}\ket{x_1 \oplus x_2}. Multiplying by 2\sqrt{2} matches the left side.

The same calculation shows 2 (Z01,2⊗I)\sqrt{2}\,(Z^{1,2}_0 \otimes I) followed by (I⊗X02,1)(I \otimes X^{2,1}_0) is the CNOT gate with the Z spider on the control, ∣x1x2⟩↦∣x1⟩∣x1⊕x2⟩\ket{x_1 x_2} \mapsto \ket{x_1}\ket{x_1 \oplus x_2}. These computations are the standard ones of Coecke and Kissinger.

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, Aleks Kissinger (2017). Picturing Quantum Processes. Cambridge University Press. doi:10.1017/9781316219317

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)

    All six rules verified by direct computation and numerically with numpy using the unnormalised spiders: fusion (a1=1,b1=1,k=1,a2=1,b2=2), identity, colour change on a 2->3 spider, X_pi = Pauli X and the pi-copy rule with phase e^{i alpha}, copy rules and X^{0,1}_0 = sqrt2 |0>, the bialgebra rule with its sqrt2 factor, and the CNOT from sqrt2 (I x X^{2,1})(Z^{1,2} x I). Coecke and Kissinger (Picturing Quantum Processes, 2017) is a book not openly readable; independent derivation used.

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 9fbd594d113cdeac. Source file knowledge/records/proof/zx-spider-fusion.md in the content repository (readable there once it is public).