293 From \(\mathbb {F}_2^*\) to the ZX-Calculus

Thesis. The concatenation monoid on \(\mathbb {F}_2^*\) carries a copy map, and the pair (concatenate, copy) satisfies the special commutative Frobenius algebra axioms. Two such Frobenius structures related by a self-inverse map \(H\) are exactly the \(Z\) and \(X\) spiders of the ZX-calculus. The whole diagrammatic language descends from \(\frown \).

Step 1: The concatenation monoid

From \(A=A\Rightarrow \mathbb {F}_2=\{0,1\}\), form the free monoid of finite words:

\begin{equation} \mathbb {F}_2^* = \bigcup _{n\geq 0}\{0,1\}^n, \tag{19140}\end{equation}
\begin{equation} 0:=(),\qquad S(w):=w\frown 1, \tag{19141}\end{equation}
\begin{equation} + \;=\; \frown , \qquad \cdot \;=\; \operatorname {Iter}(\frown ). \tag{19142}\end{equation}
The concatenation category is
\begin{equation} \mathcal {C}_\frown = (\mathbb {F}_2^*,\frown ,()). \tag{19143}\end{equation}
Step 2: Comultiplication and counit

Adjoin a copy map (comultiplication) and its counit:

\begin{equation} \delta (w) = w\otimes w, \qquad \varepsilon (w) = (), \tag{19144}\end{equation}
alongside multiplication and unit:
\begin{equation} \mu (u,v) = u\frown v, \qquad \eta = (). \tag{19145}\end{equation}
Step 3: The Frobenius axioms

The quadruple \((\mu ,\eta ,\delta ,\varepsilon )\) satisfies:

\begin{equation} \mu \circ (\mu \otimes I) = \mu \circ (I\otimes \mu ) \qquad \text {(associativity)}, \tag{19146}\end{equation}
\begin{equation} \mu \circ (\eta \otimes I) = I = \mu \circ (I\otimes \eta ) \qquad \text {(unit)}, \tag{19147}\end{equation}
\begin{equation} (\delta \otimes I)\circ \delta = (I\otimes \delta )\circ \delta \qquad \text {(coassociativity)}, \tag{19148}\end{equation}
\begin{equation} (\varepsilon \otimes I)\circ \delta = I = (I\otimes \varepsilon )\circ \delta \qquad \text {(counit)}. \tag{19149}\end{equation}
The Frobenius law couples the two:
\begin{equation} \delta \circ \mu = (\mu \otimes \mu )\circ (I\otimes \sigma \otimes I)\circ (\delta \otimes \delta ), \tag{19150}\end{equation}
and the special condition:
\begin{equation} \mu \circ \delta = I. \tag{19151}\end{equation}
Hence:
\begin{equation} \boxed {(\mu ,\eta ,\delta ,\varepsilon ) \;\Longrightarrow \; \text {special commutative Frobenius algebra.}} \tag{19152}\end{equation}
Step 4: Two colours

A special commutative Frobenius algebra is a spider. Take two of them:

\begin{equation} Z = (\mu _Z,\delta _Z), \qquad X = (\mu _X,\delta _X). \tag{19153}\end{equation}
Step 5: The colour-change map \(H\)

Relate them by a self-inverse map:

\begin{equation} H:Z\longleftrightarrow X, \qquad H^2 = I, \tag{19154}\end{equation}
\begin{equation} \mu _X = H\circ \mu _Z\circ (H\otimes H), \qquad \delta _X = (H\otimes H)\circ \delta _Z\circ H, \tag{19155}\end{equation}
\begin{equation} Z \xleftrightarrow {\ H\ } X. \tag{19156}\end{equation}
The two Frobenius structures, complementary under \(H\), are the green (\(Z\)) and red (\(X\)) spiders of the ZX-calculus.
Result
\begin{equation} \boxed { (\mathbb {F}_2^*,\frown ) \;\Longrightarrow \; (\mu ,\delta ) \;\Longrightarrow \; \text {Frobenius} \;\Longrightarrow \; (Z,X) \;\Longrightarrow \; \text {ZX-calculus.} } \tag{19157}\end{equation}

The generation chain, step by step:

\begin{equation} \frown \;\Longrightarrow \; \mu , \qquad \operatorname {Copy} \;\Longrightarrow \; \delta , \tag{19158}\end{equation}
\begin{equation} (\mu ,\delta ) \;\Longrightarrow \; \text {Spider}, \qquad \text {Spider} \;\Longrightarrow \; \text {ZX}. \tag{19159}\end{equation}
\begin{equation} \boxed { \frown \;\Rightarrow \; \operatorname {Iter}(\frown ) \;\Rightarrow \; (\mu ,\delta ) \;\Rightarrow \; \text {Frobenius} \;\Rightarrow \; \text {ZX-calculus.} } \tag{19160}\end{equation}
figure
Figure 268: Green \(Z\)-spider: multiplication \(\mu =\frown \) and comultiplication \(\delta =\operatorname {Copy}\).
figure
Figure 269: General \(Z\)-spider with phase \(\alpha \): \(n\) inputs, \(m\) outputs.
figure
Figure 270: Frobenius law: \(\delta \circ \mu = (\mu \otimes \mu )\circ (I\otimes \sigma \otimes I)\circ (\delta \otimes \delta )\).
figure
Figure 271: Special condition \(\mu \circ \delta =I\) — the diagrammatic form of idempotency \(\Pi _O^2=\Pi _O\).
figure
Figure 272: Colour change: \(X\)-spider \(= H\circ Z\circ H\) on every leg, with \(H^2=I\). The two colours are the two partition sides \(O,U\), exchanged by \(H\) as \(J\) exchanges \(\Pi _O\leftrightarrow \Pi _U\).

293.1 From \(\mathbb {F}_2\) to Universal Quantum Circuits

The three operations of \(\mathbb {F}_2\) — concatenation, XOR, and the sign map \((-1)^x\) — lift directly to the tensor product, CNOT, and the \(Z\) gate. The Hadamard gate is the bridge from the classical bit \(\mathbb {F}_2\) to the qubit \(\mathbb {C}^2\), and the sequence closes at universal quantum circuits.

Step 0: \(\mathbb {F}_2^\ast \Rightarrow \) Hilbert space

Lift the finite \(\mathbb {F}_2\)-sequences to a basis:

\begin{equation} \mathcal {H}_n = (\mathbb {C}^2)^{\otimes n}, \qquad |w\rangle ,\ w\in \{0,1\}^n. \tag{19161}\end{equation}
The successor is sequence extension, and the tensor product is concatenation:
\begin{equation} S:|w\rangle \longmapsto |w\frown 1\rangle , \qquad |u\rangle \otimes |v\rangle \iff |u\frown v\rangle . \tag{19162}\end{equation}
Step 1: Single-qubit gates

Identity:

\begin{equation} I = \begin {pmatrix} 1 & 0 \\ 0 & 1 \end {pmatrix}. \tag{19163}\end{equation}
Bit flip (the \(\mathbb {F}_2\) negation, exchanging \(O\leftrightarrow U\)):
\begin{equation} X = \begin {pmatrix} 0 & 1 \\ 1 & 0 \end {pmatrix}, \qquad X|0\rangle = |1\rangle ,\quad X|1\rangle = |0\rangle . \tag{19164}\end{equation}
Phase flip (the sign map \((-1)^x\)):
\begin{equation} Z = \begin {pmatrix} 1 & 0 \\ 0 & -1 \end {pmatrix}, \qquad Z|x\rangle = (-1)^x|x\rangle . \tag{19165}\end{equation}
Hadamard (superposition; the \(\mathbb {R}\to \mathbb {C}\) bridge):
\begin{equation} H = \frac {1}{\sqrt {2}}\begin {pmatrix} 1 & 1 \\ 1 & -1 \end {pmatrix}, \qquad H^2 = I. \tag{19166}\end{equation}
The \(Y\) gate as the composite of \(X\) and \(Z\):
\begin{equation} Y = iXZ = \begin {pmatrix} 0 & -i \\ i & 0 \end {pmatrix}. \tag{19167}\end{equation}
Step 2: Rotation gates (continuous lift)
\begin{equation} P(\theta ) = \begin {pmatrix} 1 & 0 \\ 0 & e^{i\theta } \end {pmatrix}, \tag{19168}\end{equation}
\begin{equation} R_x(\theta ) = e^{-i\theta X/2}, \qquad R_y(\theta ) = e^{-i\theta Y/2}, \qquad R_z(\theta ) = e^{-i\theta Z/2}. \tag{19169}\end{equation}
Step 3: Two-qubit gates

CNOT (controlled XOR — the quantisation of \(\mathbb {F}_2\) addition):

\begin{equation} \text {CNOT}:|x,y\rangle \longmapsto |x,\,x\oplus y\rangle , \qquad \text {CNOT} = \begin {pmatrix} 1&0&0&0 \\ 0&1&0&0 \\ 0&0&0&1 \\ 0&0&1&0 \end {pmatrix}. \tag{19170}\end{equation}
CZ (controlled phase):
\begin{equation} \text {CZ}:|x,y\rangle \longmapsto (-1)^{xy}|x,y\rangle . \tag{19171}\end{equation}
SWAP:
\begin{equation} \text {SWAP}:|u\rangle \otimes |v\rangle \longmapsto |v\rangle \otimes |u\rangle . \tag{19172}\end{equation}
Step 4: Three-qubit gates (universal reversible)

Toffoli (controlled-controlled XOR — the reversible \(\mathbb {F}_2\) AND):

\begin{equation} \text {Toffoli}:|x,y,z\rangle \longmapsto |x,y,\,z\oplus (xy)\rangle . \tag{19173}\end{equation}
Fredkin (controlled SWAP):
\begin{equation} \text {Fredkin}:|c,a,b\rangle \longmapsto \begin {cases} |c,a,b\rangle & (c=0),\\ |c,b,a\rangle & (c=1). \end {cases} \tag{19174}\end{equation}
Step 5: \(\mathbb {F}_2\) operations to gates




\(\mathbb {F}_2\) operation \(\longrightarrow \) gate



\(\frown \) (concatenation) \(\longrightarrow \) \(\otimes \)
\(\oplus \) (XOR) \(\longrightarrow \) CNOT
\((-1)^x\) (sign) \(\longrightarrow \) \(Z\)
\(\neg \) (negation) \(\longrightarrow \) \(X\)
\(xy\) (AND) \(\longrightarrow \) Toffoli



Step 6: Universal gate sets
\begin{equation} \{H,T,\text {CNOT}\} \Longrightarrow \text {universal}, \tag{19175}\end{equation}
\begin{equation} \boxed {\{H,S,\text {CNOT}\}} \Longrightarrow \text {Clifford}, \tag{19176}\end{equation}
\begin{equation} \boxed {\text {Clifford} + T} \Longrightarrow \text {universal quantum circuits}. \tag{19177}\end{equation}
\begin{equation} \boxed { \mathbb {F}_2^\ast \Longrightarrow \{|w\rangle \} \Longrightarrow \otimes \Longrightarrow \text {CNOT} \Longrightarrow \text {Clifford} \Longrightarrow \text {Clifford}+T. } \tag{19178}\end{equation}
The three \(\mathbb {F}_2\) operations become the three structural gates: concatenation is the tensor product, XOR is CNOT, and the sign map is \(Z\). The Hadamard gate lifts the classical bit to the qubit — the same \(\mathbb {R}\to \mathbb {C}\) passage as elsewhere — and adjoining \(T\) to the Clifford group completes the set to universal quantum circuits.

293.2 The Diagonal Map: \(A=A\) as a Universal Morphism

I. The copy map

The identity \(A=A\) has a categorical form: the diagonal (copy) map

\begin{equation} \Delta :A\to A\times A, \qquad \Delta (x)=(x,x). \tag{19179}\end{equation}
It exists in every category with finite products, and in each one it is the same construction:



Category Copy map


\(\mathbf {Set}\) \(\Delta (x)=(x,x)\)
\(\mathbf {Top}\) \(\Delta :X\to X\times X\)
\(\mathbf {Grp}\) \(\Delta (g)=(g,g)\)
\(\mathbf {Ring}\) \(\Delta (r)=(r,r)\)
\(\mathbf {Vect}\) \(\Delta (v)=(v,v)\)
\(\mathbf {Bool}\) \(\Delta (a)=(a,a)\)


II. Universal property

The diagonal is the pairing of the identity with itself. With the projections \(\pi _1,\pi _2:A\times A\to A\),

\begin{equation} \pi _1\circ \Delta =\mathrm {id}, \qquad \pi _2\circ \Delta =\mathrm {id}, \tag{19180}\end{equation}
\begin{equation} (\pi _1,\pi _2)\circ \Delta =(\mathrm {id},\mathrm {id}), \qquad \Delta =\langle \mathrm {id},\mathrm {id}\rangle . \tag{19181}\end{equation}
So \(\Delta \) is precisely the map whose two components are both the identity: the arrow-theoretic expression of \(A=A\).
III. Naturality

The diagonal is natural in \(A\): for any morphism \(f:A\to B\),

\begin{equation} \boxed {(f\times f)\circ \Delta =\Delta \circ f,} \tag{19182}\end{equation}
i.e. the square
\begin{equation} \begin {CD} A @>{\Delta }>> A\times A\\ @V{f}VV @VV{f\times f}V\\ B @>>{\Delta }> B\times B \end {CD} \tag{19183}\end{equation}
commutes. Copying then mapping equals mapping then copying — \(A=A\) is preserved by every morphism.
IV. Image, diagonal subobject, and kernel

The image of \(\Delta \) is the diagonal subobject:

\begin{equation} \operatorname {im}(\Delta ) = \{(x,x):x\in A\} = \Delta _A, \qquad \Delta _A=\{(x,y):x=y\}, \tag{19184}\end{equation}
\begin{equation} \boxed {\operatorname {im}(\Delta )=\Delta _A.} \tag{19185}\end{equation}
In an additive setting, the diagonal is the kernel of the difference map \(\oplus :(x,y)\mapsto x-y\):
\begin{equation} \boxed {\Delta _A=\ker (\oplus ).} \tag{19186}\end{equation}
The equality relation \(x=y\) is thus realised as a subobject \(\Delta _A\hookrightarrow A\times A\) — the locus where the two copies coincide.
\begin{equation} \boxed { A=A \;\xrightarrow {\ \text {categorify}\ }\; \Delta =\langle \mathrm {id},\mathrm {id}\rangle \;\xrightarrow {\ \operatorname {im}\ }\; \Delta _A=\ker (\oplus ). } \tag{19187}\end{equation}
The identity \(A=A\) is not a passive assertion but a morphism: the diagonal \(\Delta =\langle \mathrm {id},\mathrm {id}\rangle \), defined in every category with products, natural in \(A\) via \((f\times f)\circ \Delta =\Delta \circ f\), whose image \(\Delta _A\) is the equality subobject and, additively, the kernel of the difference map. Equality is the diagonal; the diagonal is \(A=A\) made into an arrow.

293.3 No-cloning as the failure of the copy map to be linear

Classical copying is the diagonal map. On a set \(X\),

\begin{equation} \Delta :X\to X\times X, \qquad \Delta (x)=(x,x). \tag{19188}\end{equation}
Its would-be linear analogue on a vector space \(V\) is
\begin{equation} \delta :V\to V\otimes V, \qquad \delta (v)=v\otimes v, \tag{19189}\end{equation}
which on basis states behaves exactly like the classical copy:
\begin{equation} |0\rangle \mapsto |00\rangle , \qquad |1\rangle \mapsto |11\rangle , \qquad \delta (|0\rangle )=|00\rangle ,\quad \delta (|1\rangle )=|11\rangle . \tag{19190}\end{equation}

Linearity forces the wrong output. Take a superposition \(|\psi \rangle =\alpha |0\rangle +\beta |1\rangle \). If \(\delta \) were linear, it would act term by term:

\begin{equation} \delta (\alpha |0\rangle +\beta |1\rangle ) = \alpha |00\rangle +\beta |11\rangle . \tag{19191}\end{equation}
But genuine copying should produce
\begin{equation} |\psi \rangle \otimes |\psi \rangle = \alpha ^2|00\rangle +\alpha \beta |01\rangle +\alpha \beta |10\rangle +\beta ^2|11\rangle . \tag{19192}\end{equation}
These disagree whenever \(\alpha \beta \neq 0\):
\begin{equation} \underbrace {\alpha |00\rangle +\beta |11\rangle }_{\text {linear }\delta } \;\neq \; \underbrace {\alpha ^2|00\rangle +\alpha \beta |01\rangle +\alpha \beta |10\rangle +\beta ^2|11\rangle }_{|\psi \rangle \otimes |\psi \rangle }. \tag{19193}\end{equation}
So the condition \(\delta (v)=v\otimes v\) cannot hold for all \(v\) while \(\delta \) is linear — the diagonal map is not linear.

The unitary version fails identically. Ask instead for a unitary \(U\) with a blank ancilla, \(U(|\psi \rangle \otimes |0\rangle )=|\psi \rangle \otimes |\psi \rangle \). On the basis this is consistent:

\begin{equation} U(|0\rangle |0\rangle )=|0\rangle |0\rangle , \qquad U(|1\rangle |0\rangle )=|1\rangle |1\rangle . \tag{19194}\end{equation}
By linearity of \(U\),
\begin{equation} U\bigl ((\alpha |0\rangle +\beta |1\rangle )|0\rangle \bigr ) = \alpha |00\rangle +\beta |11\rangle , \tag{19195}\end{equation}
whereas cloning demands
\begin{equation} (\alpha |0\rangle +\beta |1\rangle )(\alpha |0\rangle +\beta |1\rangle ) = \alpha ^2|00\rangle +\alpha \beta |01\rangle +\alpha \beta |10\rangle +\beta ^2|11\rangle . \tag{19196}\end{equation}
The two are equal only when \(\alpha \beta =0\), i.e. on basis states.

Interpretation. No-cloning is not an extra physical postulate; it is the statement that the classical diagonal \(\Delta (x)=(x,x)\) has no linear extension. Copying is available exactly on the “classical” basis \(\{|0\rangle ,|1\rangle \}\) — the boundary points where \(\alpha \beta =0\) — and fails precisely on the interior superpositions where \(\alpha \beta \neq 0\). This is the same boundary/interior split as the partition structure: the pointer basis \(\{0,1\}\) admits copying (it is already decided), while genuine superpositions (\(\Pi ^2\neq \Pi \), interior state) cannot be duplicated. The copy map is linear only on the diagonal-classical sector; linearity and copying are compatible nowhere else.

293.4 The Discrete–Continuous Dictionary

Thesis. Discretisation \(C\to D\) and continuum limit \(D\to C\) form an approximate duality \(D\overset {\sim }{\longleftrightarrow }C\), matching each discrete object to its continuum counterpart. The maps are not exact inverses, but term by term they translate sums into integrals, differences into derivatives, and lattices into continua.

I. The correspondence table



Discrete \(\to \) Continuous Continuous \(\to \) Discrete


\(n \mapsto x=na\) \(x\mapsto \lfloor x/a\rfloor \)
\(\displaystyle \sum _i\) \(\displaystyle \int \)
Difference \(\Delta \) Derivative \(\partial \)
Graph Manifold
Lattice Continuum
Finite automaton Flow
Random walk Diffusion
Markov chain Fokker–Planck
Simplicial complex Topological space
Cellular complex Differential complex


II. The continuum limit \(a\to 0\)

Sums converge to integrals:

\begin{equation} \sum _i f(x_i)\,\Delta x \;\xrightarrow {\ a\to 0\ }\; \int f(x)\,dx. \tag{19197}\end{equation}
Finite differences converge to derivatives:
\begin{equation} \frac {f(x+a)-f(x)}{a} \;\xrightarrow {\ a\to 0\ }\; \frac {df}{dx}, \tag{19198}\end{equation}
and the lattice Laplacian to the continuum Laplacian:
\begin{equation} \Delta _a \;\xrightarrow {\ a\to 0\ }\; \nabla ^2. \tag{19199}\end{equation}
In Fourier space the lattice dispersion relation flattens to the continuum one:
\begin{equation} \frac {\sin \!\left (\tfrac {ka}{2}\right )}{\tfrac {a}{2}} \;\xrightarrow {\ a\to 0\ }\; k, \qquad \widehat {\Delta _a}(k) \;\xrightarrow {\ a\to 0\ }\; -|k|^2. \tag{19200}\end{equation}
III. Discretisation \(C\to D\)

Going the other way, points are binned, spaces are triangulated, and differential complexes are replaced by cellular ones:

\begin{equation} x \longmapsto \lfloor x/a\rfloor , \qquad X \longmapsto \pi _0(X), \qquad M \longmapsto \operatorname {Tri}(M), \tag{19201}\end{equation}
\begin{equation} \Omega ^\bullet (M) \longmapsto C^\bullet (K), \tag{19202}\end{equation}
where \(\operatorname {Tri}(M)\) is a triangulation and \(C^\bullet (K)\) the cochain complex of the resulting simplicial complex \(K\).
IV. The operator dualities

The core dualities pair each continuum operator with its discrete shadow:

\begin{equation} \int \longleftrightarrow \sum , \qquad \partial \longleftrightarrow \Delta , \qquad e^{t\Delta } \longleftrightarrow P^n, \tag{19203}\end{equation}
where \(e^{t\Delta }\) is the heat semigroup and \(P^n\) the \(n\)-step transition operator of the corresponding random walk.
\begin{equation} \boxed { D \;\underset {\text {discretisation}}{\overset {\text {limit}}{\rightleftarrows }}\; C, \qquad \sum \leftrightarrow \int , \quad \Delta \leftrightarrow \partial , \quad \text {lattice}\leftrightarrow \text {continuum}. } \tag{19204}\end{equation}
Each row of the table is one instance of a single duality: the continuum limit \(a\to 0\) sends \(\sum \to \int \), \(\Delta \to \partial \), \(\Delta _a\to \nabla ^2\), and random walk \(\to \) diffusion, while discretisation bins points, triangulates manifolds, and replaces the de Rham complex \(\Omega ^\bullet (M)\) by the cochain complex \(C^\bullet (K)\). The two directions are not inverse: the limit forgets the lattice spacing, and discretisation must choose one — so the dictionary is a correspondence, not an isomorphism.