A basis for the affine Lagrangian subspace corresponds to the stabilizer tableau for a pure stabilizer state (ie a stabilizer tableau on $n$ qudits with dimension $n$).  Denote the symplectic version of a Weyl operator as follows:

W(\vec z, \vec x)
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=X] (0) at (17, 4.5) {$\vec z$};
\node [style=X] (2) at (18, 4.5) {$\vec x$};
\node [style=none] (3) at (17, 5.25) {};
\node [style=none] (4) at (18, 5.25) {};
\node [style=none] (5) at (17, 3.75) {};
\node [style=none] (6) at (18, 3.75) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (6.center) to (2.center);
\draw (2.center) to (4.center);
\draw (3.center) to (0.center);
\draw (0.center) to (5.center);
\end{pgfonlayer}
\end{tikzpicture}

The novelty in interpreting stabilizer states in this categorical framework is that it reveals that the relational composition of tableaux is the composition of stabilizer circuits.

For odd prime $p$, $\Lag\Rel_{\F_p}$ is a presentation for stabilizer circuits without affine phases.

The following set of generators for $\Aff\Lag\Rel_{k}$, reveals the connection to the ZX-calculus:

$\Aff\Lag\Rel_{k}$ is generated by two spiders both decorated by the additive group of $k^2$ as well as scaling gates when $k$ is not a prime field:

\left\llbracket\
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (0) at (21, 5) {};
\node [style=none] (1) at (22, 5) {};
\node [style=none] (2) at (21, 2.5) {};
\node [style=none] (3) at (22, 2.5) {};
\node [style=Z] (4) at (21.5, 3.75) {$a,b$};
\node [style=none] (5) at (21.5, 4.5) {$\cdots$};
\node [style=none] (6) at (21.5, 3) {$\cdots$};
\node [style=none] (7) at (21.5, 4.75) {};
\node [style=none] (8) at (21.5, 2.75) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw [in=150, out=-90, looseness=0.75] (0.center) to (4);
\draw [in=90, out=-150, looseness=0.75] (4) to (2.center);
\draw [in=-30, out=90, looseness=0.75] (3.center) to (4);
\draw [in=-90, out=30, looseness=0.75] (4) to (1.center);
\end{pgfonlayer}
\end{tikzpicture}
\ \right\rrbracket
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (78) at (402.5, 0.75) {};
\node [style=none] (79) at (402.5, -2.75) {};
\node [style=Z] (80) at (402.1, -1.75) {};
\node [style=none] (81) at (402.145, 0.65) {$\cdots$};
\node [style=none] (82) at (402.125, -2.65) {$\cdots$};
\node [style=none] (83) at (400.75, 0.75) {};
\node [style=none] (84) at (400, -2.75) {};
\node [style=X] (85) at (400.425, -0.25) {$a$};
\node [style=none] (86) at (400.375, 0.65) {$\cdots$};
\node [style=none] (87) at (400.395, -2.625) {$\cdots$};
\node [style=none] (88) at (400.75, -2.75) {};
\node [style=none] (89) at (401.75, -2.75) {};
\node [style=none] (90) at (400, 0.75) {};
\node [style=none] (91) at (401.75, 0.75) {};
\node [style=scalar] (92) at (401.25, -1) {$b$};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw [in=-45, out=90] (79.center) to (80);
\draw [in=-90, out=60, looseness=0.75] (80) to (78.center);
\draw [in=90, out=-120, looseness=0.75] (85) to (84.center);
\draw [in=-90, out=45] (85) to (83.center);
\draw [in=-60, out=90, looseness=0.75] (88.center) to (85);
\draw [in=-135, out=90] (89.center) to (80);
\draw [in=-90, out=150] (85) to (90.center);
\draw [in=270, out=120, looseness=0.75] (80) to (91.center);
\draw [in=-75, out=150] (80) to (92);
\draw [in=330, out=90] (92) to (85);
\end{pgfonlayer}
\end{tikzpicture},
\hspace*{.2cm}
\left\llbracket \
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (0) at (21, 5) {};
\node [style=none] (1) at (22, 5) {};
\node [style=none] (2) at (21, 2.5) {};
\node [style=none] (3) at (22, 2.5) {};
\node [style=X] (4) at (21.5, 3.75) {$a,b$};
\node [style=none] (5) at (21.5, 4.5) {$\cdots$};
\node [style=none] (6) at (21.5, 3) {$\cdots$};
\node [style=none] (7) at (21.5, 4.75) {};
\node [style=none] (8) at (21.5, 2.75) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw [in=150, out=-90, looseness=0.75] (0.center) to (4);
\draw [in=90, out=-150, looseness=0.75] (4) to (2.center);
\draw [in=-30, out=90, looseness=0.75] (3.center) to (4);
\draw [in=-90, out=30, looseness=0.75] (4) to (1.center);
\end{pgfonlayer}
\end{tikzpicture}
\ \right\rrbracket
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (93) at (403.5, 0.75) {};
\node [style=none] (94) at (403.5, -2.75) {};
\node [style=Z] (95) at (403.9, -1.75) {};
\node [style=none] (96) at (403.88, 0.65) {$\cdots$};
\node [style=none] (97) at (403.85, -2.65) {$\cdots$};
\node [style=none] (98) at (405.25, 0.75) {};
\node [style=none] (99) at (406, -2.75) {};
\node [style=X] (100) at (405.575, -0.25) {$a$};
\node [style=none] (101) at (405.625, 0.65) {$\cdots$};
\node [style=none] (102) at (405.605, -2.625) {$\cdots$};
\node [style=none] (103) at (405.25, -2.75) {};
\node [style=none] (104) at (404.25, -2.75) {};
\node [style=none] (105) at (406, 0.75) {};
\node [style=none] (106) at (404.25, 0.75) {};
\node [style=scalar] (107) at (404.75, -1) {$b$};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw [in=-135, out=90] (94.center) to (95);
\draw [in=-90, out=120, looseness=0.75] (95) to (93.center);
\draw [in=90, out=-60, looseness=0.75] (100) to (99.center);
\draw [in=-90, out=135] (100) to (98.center);
\draw [in=-120, out=90, looseness=0.75] (103.center) to (100);
\draw [in=-45, out=90] (104.center) to (95);
\draw [in=-90, out=30] (100) to (105.center);
\draw [in=-90, out=60, looseness=0.75] (95) to (106.center);
\draw [in=-105, out=30] (95) to (107);
\draw [in=-150, out=90] (107) to (100);
\end{pgfonlayer}
\end{tikzpicture}
\hspace*{.2cm}
\left\llbracket \
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (0) at (23, 4.5) {};
\node [style=none] (1) at (23, 3) {};
\node [style=scalar] (2) at (23, 3.75) {$a$};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (1.center) to (2);
\draw (2) to (0.center);
\end{pgfonlayer}
\end{tikzpicture}
\ \right\rrbracket
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (3) at (24.25, 4.5) {};
\node [style=none] (4) at (24.25, 3) {};
\node [style=scalarop] (5) at (24.25, 3.75) {$a$};
\node [style=none] (6) at (25, 4.5) {};
\node [style=none] (7) at (25, 3) {};
\node [style=scalar] (8) at (25, 3.75) {$a$};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (4.center) to (5);
\draw (5) to (3.center);
\draw (7.center) to (8);
\draw (8) to (6.center);
\end{pgfonlayer}
\end{tikzpicture}

The spider fusion is pointwise:

\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (178) at (378.25, -0.425) {};
\node [style=none] (179) at (377.25, -0.425) {};
\node [style=none] (180) at (377.75, -0.425) {$\cdots$};
\node [style=none] (181) at (377.25, -2.825) {};
\node [style=Z] (182) at (377.75, -1.175) {$n,m$};
\node [style=none] (183) at (378.75, -0.425) {};
\node [style=none] (184) at (378.25, -2.825) {$\cdots$};
\node [style=none] (185) at (377.75, -2.825) {};
\node [style=Z] (186) at (378.25, -2.075) {$k,\ell$};
\node [style=none] (187) at (378.75, -2.825) {};
\node [style=none] (188) at (378, -1.5) {\reflectbox{$\ddots$}};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw [in=-124, out=90] (181.center) to (182);
\draw [in=-90, out=56] (182) to (178.center);
\draw [in=124, out=-90] (179.center) to (182);
\draw [in=-124, out=90] (185.center) to (186);
\draw [in=90, out=-56] (186) to (187.center);
\draw [in=-90, out=56] (186) to (183.center);
\draw [bend left=45, looseness=1.25] (186) to (182);
\draw [bend left=45, looseness=1.25] (182) to (186);
\end{pgfonlayer}
\end{tikzpicture}
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (11) at (4, -0.5) {};
\node [style=none] (12) at (3, -0.5) {};
\node [style=none] (13) at (3.5, -0.5) {$\cdots$};
\node [style=none] (14) at (2.5, -2) {};
\node [style=none] (15) at (3.5, -1.25) {};
\node [style=none] (16) at (4.5, -0.5) {};
\node [style=none] (17) at (3.5, -2) {$\cdots$};
\node [style=none] (18) at (3, -2) {};
\node [style=Z] (19) at (3.5, -1.25) {$n+k,m+\ell$};
\node [style=none] (20) at (4, -2) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw [in=-150, out=90] (14.center) to (15);
\draw [in=-90, out=56] (15) to (11.center);
\draw [in=124, out=-90] (12.center) to (15);
\draw [in=-124, out=90] (18.center) to (19);
\draw [in=90, out=-56] (19) to (20.center);
\draw [in=-90, out=30] (19) to (16.center);
\end{pgfonlayer}
\end{tikzpicture}\ ,
\hspace*{1cm}
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (167) at (375.75, -0.425) {};
\node [style=none] (168) at (374.75, -0.425) {};
\node [style=none] (169) at (375.25, -0.425) {$\cdots$};
\node [style=none] (170) at (374.75, -2.825) {};
\node [style=X] (171) at (375.25, -1.175) {$n,m$};
\node [style=none] (172) at (376.25, -0.425) {};
\node [style=none] (173) at (375.75, -2.825) {$\cdots$};
\node [style=none] (174) at (375.25, -2.825) {};
\node [style=X] (175) at (375.75, -2.075) {$k,\ell$};
\node [style=none] (176) at (376.25, -2.825) {};
\node [style=none] (177) at (375.5, -1.5) {\reflectbox{$\ddots$}};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw [in=-124, out=90] (170.center) to (171);
\draw [in=-90, out=56] (171) to (167.center);
\draw [in=124, out=-90] (168.center) to (171);
\draw [in=-124, out=90] (174.center) to (175);
\draw [in=90, out=-56] (175) to (176.center);
\draw [in=-90, out=56] (175) to (172.center);
\draw [bend left=45, looseness=1.25] (175) to (171);
\draw [bend left=45, looseness=1.25] (171) to (175);
\end{pgfonlayer}
\end{tikzpicture}
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (11) at (4, -0.5) {};
\node [style=none] (12) at (3, -0.5) {};
\node [style=none] (13) at (3.5, -0.5) {$\cdots$};
\node [style=none] (14) at (2.5, -2) {};
\node [style=none] (15) at (3.5, -1.25) {};
\node [style=none] (16) at (4.5, -0.5) {};
\node [style=none] (17) at (3.5, -2) {$\cdots$};
\node [style=none] (18) at (3, -2) {};
\node [style=X] (19) at (3.5, -1.25) {$n+k,m+\ell$};
\node [style=none] (20) at (4, -2) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw [in=-150, out=90] (14.center) to (15);
\draw [in=-90, out=56] (15) to (11.center);
\draw [in=124, out=-90] (12.center) to (15);
\draw [in=-124, out=90] (18.center) to (19);
\draw [in=90, out=-56] (19) to (20.center);
\draw [in=-90, out=30] (19) to (16.center);
\end{pgfonlayer}
\end{tikzpicture}

Call the first component of the phase group the affine phase and the second component the linear phase.  The white spider corresponds to the $Z$-basis and the grey spider corresponds to the $X$-basis.

In Hilbert spaces, the spiders $\ell \to k$ are interpreted as follows:

\begin{align*}
\left\llbracket\
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (0) at (21, 4.5) {};
\node [style=none] (1) at (22, 4.5) {};
\node [style=none] (2) at (21, 3) {};
\node [style=none] (3) at (22, 3) {};
\node [style=none] (4) at (21.5, 3.75) {};
\node [style=Z] (5) at (21.5, 3.75) {$n,m$};
\node [style=none] (6) at (21.525, 4.425) {$\cdots$};
\node [style=none] (7) at (21.525, 3.075) {$\cdots$};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw [in=150, out=-90, looseness=0.75] (0.center) to (4.center);
\draw [in=90, out=-150, looseness=0.75] (4.center) to (2.center);
\draw [in=-30, out=90, looseness=0.75] (3.center) to (4.center);
\draw [in=-90, out=30, looseness=0.75] (4.center) to (1.center);
\end{pgfonlayer}
\end{tikzpicture}\
\right\rrbracket
= &
\sum_{a=0}^{p-1}  e^{\pi\cdot i /p (n\cdot a+m\cdot a^2)} |a, \ldots, a \rangle \langle a, \ldots, a|\\
\left\llbracket\
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (0) at (21, 4.5) {};
\node [style=none] (1) at (22, 4.5) {};
\node [style=none] (2) at (21, 3) {};
\node [style=none] (3) at (22, 3) {};
\node [style=none] (4) at (21.5, 3.75) {};
\node [style=X] (5) at (21.5, 3.75) {$n,m$};
\node [style=none] (6) at (21.525, 4.425) {$\cdots$};
\node [style=none] (7) at (21.525, 3.075) {$\cdots$};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw [in=150, out=-90, looseness=0.75] (0.center) to (4.center);
\draw [in=90, out=-150, looseness=0.75] (4.center) to (2.center);
\draw [in=-30, out=90, looseness=0.75] (3.center) to (4.center);
\draw [in=-90, out=30, looseness=0.75] (4.center) to (1.center);
\end{pgfonlayer}
\end{tikzpicture}\
\right\rrbracket
= &
\sum_{a=0}^{p-1}  e^{\pi\cdot i /p (n\cdot a+m\cdot a^2)} \mathcal{F}^{\otimes k}|a, \ldots, a \rangle \langle a, \ldots, a|(\mathcal{F}^\dag)^{\otimes \ell} \\
\end{align*}

The scaling gate, which is a derived generator in this setting is interpreted as:

\left\llbracket \
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (0) at (23, 4.5) {};
\node [style=none] (1) at (23, 3) {};
\node [style=scalar] (2) at (23, 3.75) {$b$};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (1.center) to (2);
\draw (2) to (0.center);
\end{pgfonlayer}
\end{tikzpicture}
\ \right\rrbracket
\sum_{a=0}^{p-1} |a\cdot b \rangle \langle a |

The Fourier transform is derived:

\left\llbracket\
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (0) at (1.25, -1) {};
\node [style=map] (1) at (1.25, -1.5) {$\mathcal F$};
\node [style=none] (2) at (1.25, -2) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (2.center) to (1);
\draw (1) to (0.center);
\end{pgfonlayer}
\end{tikzpicture}\
\right\rrbracket
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (0) at (0.5, 1) {};
\node [style=none] (1) at (0.5, -0.25) {};
\node [style=none] (2) at (1, -0.25) {};
\node [style=none] (3) at (1, 1) {};
\node [style=s] (4) at (1, 0.5) {};
\node [style=none] (5) at (0.5, 0.5) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (4) to (3.center);
\draw [in=90, out=-90] (4) to (1.center);
\draw [in=-90, out=90] (2.center) to (5.center);
\draw (5.center) to (0.center);
\end{pgfonlayer}
\end{tikzpicture}
\begin{tikzpicture}[xscale=-1]
\begin{pgfonlayer}{nodelayer}
\node [style=X] (0) at (19.5, 1.25) {};
\node [style=Z] (1) at (18, 4.25) {};
\node [style=none] (2) at (18, 4.75) {};
\node [style=none] (3) at (19.5, 4.75) {};
\node [style=none] (4) at (18, 0.75) {};
\node [style=none] (5) at (19.5, 0.75) {};
\node [style=X] (6) at (19.5, 1.25) {};
\node [style=Z] (7) at (19.5, 4.25) {};
\node [style=X] (8) at (18, 1.25) {};
\node [style=Z] (9) at (18, 4.25) {};
\node [style=X] (10) at (19.5, 1.25) {};
\node [style=X] (11) at (18, 1.25) {};
\node [style=X] (12) at (19.5, 1.25) {};
\node [style=Z] (13) at (19.5, 4.25) {};
\node [style=s] (14) at (17.75, 3) {};
\node [style=s] (15) at (18.75, 3) {};
\node [style=s] (16) at (19.75, 3) {};
\node [style=s] (17) at (18.25, 3) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (2.center) to (1);
\draw (5.center) to (0);
\draw [bend right=45] (6) to (7);
\draw [in=135, out=-135, looseness=1.25] (9) to (8);
\draw (3.center) to (7);
\draw (4.center) to (8);
\draw [in=-120, out=15, looseness=0.75] (11) to (13);
\draw [in=90, out=-105] (9) to (14);
\draw [in=90, out=-45, looseness=0.75] (9) to (15);
\draw [in=90, out=-90] (14) to (11);
\draw [in=-90, out=120, looseness=0.75] (6) to (15);
\draw [in=-15, out=90] (12) to (9);
\draw [in=-90, out=150, looseness=0.75] (12) to (17);
\draw [in=285, out=90] (17) to (9);
\draw [in=-90, out=75, looseness=0.75] (12) to (16);
\draw [in=-75, out=90] (16) to (13);
\end{pgfonlayer}
\end{tikzpicture}
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (0) at (0, 0.75) {};
\node [style=none] (1) at (0.75, 0.75) {};
\node [style=none] (2) at (0, 3.25) {};
\node [style=none] (3) at (0.75, 3.25) {};
\node [style=Z] (4) at (0.75, 1.25) {};
\node [style=X] (5) at (0, 1.75) {};
\node [style=Z] (6) at (0.75, 2.25) {};
\node [style=X] (7) at (0, 2.75) {};
\node [style=Z] (8) at (0, 2.25) {};
\node [style=X] (9) at (0.75, 1.75) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (4) to (5);
\draw (6) to (7);
\draw (8) to (9);
\draw (1.center) to (4);
\draw (4) to (9);
\draw (9) to (6);
\draw (6) to (3.center);
\draw (2.center) to (7);
\draw (7) to (8);
\draw (8) to (5);
\draw (5) to (0.center);
\end{pgfonlayer}
\end{tikzpicture}
\left\llbracket
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (0) at (1.25, 0) {};
\node [style=none] (1) at (1.25, -3.5) {};
\node [style=Z] (2) at (1.25, -2.75) {$0,1$};
\node [style=Z] (3) at (1.25, -0.75) {$0,1$};
\node [style=X] (4) at (1.25, -1.75) {$0,-1$};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (1.center) to (2);
\draw (2) to (4);
\draw (4) to (3);
\draw (3) to (0.center);
\end{pgfonlayer}
\end{tikzpicture}
\right\rrbracket

In the ZX-calculus literature, this decomposition of the Fourier transform is known as Euler decomposition [17].

This view of odd prime dimensional stabilizer circuits in terms of the ZX-calculus means that the phase groups for the $Z$ and $X$-spiders are the torus $(\Z/p\Z)^2$  as noted <cit.>.  This is in contrast to the qubit case where the phase groups are $\Z/4\Z$; which [13] point out as a crucial difference between Spekkens' toy model and qubit stabilizer theory.
However over $\F_2$ when the phases are restricted to the subgroup

$$\Z/2\Z\subseteq \Z/4\Z; \ a\mapsto 2a$$

and for odd prime $p$, over $\F_p$ when the phases are restricted to the subgroup

$$\Z/p\Z \subseteq (\Z/p\Z)^2; \ a\mapsto (a,0)$$

then both intepretations coincide. Therefore, we can faithfully interpret qubit stabilizer circuits generated by controlled-not gates, Z gates,  X gates as well as the states $|+\rangle$ and postselections $|0\rangle$, $\langle + |$ and $\langle 0|$ in affine Lagrangian relations.

Up until now, we have also neglected to relate the symplectic picture to the †-structure of $\FHilb$.  This will be instrumental in the following section:

There is a monoidal conjugation functor $\bar{(-)}:\Aff\Lag\Rel_k\to \Aff\Lag\Rel_k$ given by:

\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (0) at (21, 5) {};
\node [style=none] (1) at (22, 5) {};
\node [style=none] (2) at (21, 2.5) {};
\node [style=none] (3) at (22, 2.5) {};
\node [style=none] (4) at (21.5, 3.75) {};
\node [style=Z] (40) at (21.5, 3.75) {$n,m$};
\node [style=none] (5) at (21.5, 4.5) {$\cdots$};
\node [style=none] (6) at (21.5, 3) {$\cdots$};
\node [style=none] (7) at (21.5, 4.75) {};
\node [style=none] (8) at (21.5, 2.75) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw [in=150, out=-90, looseness=0.75] (0.center) to (4);
\draw [in=90, out=-150, looseness=0.75] (4) to (2.center);
\draw [in=-30, out=90, looseness=0.75] (3.center) to (4);
\draw [in=-90, out=30, looseness=0.75] (4) to (1.center);
\end{pgfonlayer}
\end{tikzpicture}
\mapsto
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (0) at (20.75, 5) {};
\node [style=none] (1) at (22.25, 5) {};
\node [style=none] (2) at (20.75, 2.5) {};
\node [style=none] (3) at (22.25, 2.5) {};
\node [style=none] (4) at (21.5, 3.75) {};
\node [style=none] (5) at (21.5, 4.75) {$\cdots$};
\node [style=none] (6) at (21.5, 2.75) {$\cdots$};
\node [style=Z] (9) at (21.5, 3.75) {$-n,-m$};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw [in=150, out=-90, looseness=0.75] (0.center) to (4);
\draw [in=90, out=-150, looseness=0.75] (4) to (2.center);
\draw [in=-30, out=90, looseness=0.75] (3.center) to (4);
\draw [in=-90, out=30, looseness=0.75] (4) to (1.center);
\end{pgfonlayer}
\end{tikzpicture}\ ,
\hspace*{1cm}
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (0) at (21, 5) {};
\node [style=none] (1) at (22, 5) {};
\node [style=none] (2) at (21, 2.5) {};
\node [style=none] (3) at (22, 2.5) {};
\node [style=none] (4) at (21.5, 3.75) {};
\node [style=X] (40) at (21.5, 3.75) {$n,m$};
\node [style=none] (5) at (21.5, 4.5) {$\cdots$};
\node [style=none] (6) at (21.5, 3) {$\cdots$};
\node [style=none] (7) at (21.5, 4.75) {};
\node [style=none] (8) at (21.5, 2.75) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw [in=150, out=-90, looseness=0.75] (0.center) to (4);
\draw [in=90, out=-150, looseness=0.75] (4) to (2.center);
\draw [in=-30, out=90, looseness=0.75] (3.center) to (4);
\draw [in=-90, out=30, looseness=0.75] (4) to (1.center);
\end{pgfonlayer}
\end{tikzpicture}
\mapsto
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (0) at (20.75, 5) {};
\node [style=none] (1) at (22.25, 5) {};
\node [style=none] (2) at (20.75, 2.5) {};
\node [style=none] (3) at (22.25, 2.5) {};
\node [style=none] (4) at (21.5, 3.75) {};
\node [style=none] (5) at (21.5, 4.75) {$\cdots$};
\node [style=none] (6) at (21.5, 2.75) {$\cdots$};
\node [style=none] (9) at (21.5, 3.75) {};
\node [style=X] (90) at (21.5, 3.75) {$n,-m$};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw [in=150, out=-90, looseness=0.75] (0.center) to (4);
\draw [in=90, out=-150, looseness=0.75] (4) to (2.center);
\draw [in=-30, out=90, looseness=0.75] (3.center) to (4);
\draw [in=-90, out=30, looseness=0.75] (4) to (1.center);
\end{pgfonlayer}
\end{tikzpicture}\ ,
\hspace*{1cm}
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (0) at (23, 4.5) {};
\node [style=none] (1) at (23, 3) {};
\node [style=scalar] (2) at (23, 3.75) {$a$};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (1.center) to (2);
\draw (2) to (0.center);
\end{pgfonlayer}
\end{tikzpicture}
\mapsto
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (0) at (23, 4.5) {};
\node [style=none] (1) at (23, 3) {};
\node [style=scalar] (2) at (23, 3.75) {$a$};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (1.center) to (2);
\draw (2) to (0.center);
\end{pgfonlayer}
\end{tikzpicture}

Define the  dagger functor to be the conjugate converse
$$(-)^\dag:=(\ \bar{(-)}\ )^*:\Aff\Lag\Rel_k^\op\to\Aff\Lag\Rel_k$$

Concretely, the conjugation functor negates the elements in the $Z$-grading of the vector space.

In the case of $k=\F_p$ for $p$ an odd prime, the conjugation is transported to the complex conjugation along $\Aff\Lag\Rel_{\F_p} \cong \Stab_p$; and the dagger to the Hermitian adjoint:

For odd prime $p$, $\Aff\Lag\Rel_{\F_p}$ and  $\Stab_p$ are isomorphic as †-compact closed categories.

We know that all stabilizer states are of the form $C|0\rangle^{\otimes n}$ for $C$ Clifford operator.
The affine symplectomorphisms corresponding to the generators of the Clifford group can be easily verified to be unitaries with respect to the dagger.  Moreover, $|0\rangle$ is an isometry in $\Stab_p$ with the Hermitian adjoint just as
\begin{pgfonlayer}{nodelayer}
\node [style=X] (389) at (205, -2) {};
\node [style=none] (390) at (205, -1.75) {};
\node [style=Z] (391) at (204.5, -2) {};
\node [style=none] (392) at (204.5, -1.75) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (389) to (390.center);
\draw (391) to (392.center);
\end{pgfonlayer}
\end{tikzpicture}$ is an isometry with respect to the dagger.

In [3] and [2], they show that certain idealized  electrical circuits can be interpreted in terms of affine Lagrangian relations over  the field of real rational functions $\R(s)$.  This is the smallest field in which the polynomial ring $\R[s]$ embeds.

We restate the interpretations of electrical circuits in terms of phased spiders for affine Lagrangian relations. An idealized junction, a resistor with resistance $r$, a capacitor with capacitance $c$ and an inductor with inductance $\ell$ are interpreted as:

\left\llbracket\
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (0) at (21, 4.75) {};
\node [style=none] (1) at (22, 4.75) {};
\node [style=none] (2) at (21, 2.75) {};
\node [style=none] (3) at (22, 2.75) {};
\node [style=dot] (4) at (21.5, 3.75) {};
\node [style=none] (5) at (21.5, 4.5) {$\cdots$};
\node [style=none] (6) at (21.5, 3) {$\cdots$};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw [in=150, out=-90, looseness=0.75] (0.center) to (4);
\draw [in=90, out=-150, looseness=0.75] (4) to (2.center);
\draw [in=-30, out=90, looseness=0.75] (3.center) to (4);
\draw [in=-90, out=30, looseness=0.75] (4) to (1.center);
\end{pgfonlayer}
\end{tikzpicture}
\ \right\rrbracket
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (0) at (21, 4.75) {};
\node [style=none] (1) at (22, 4.75) {};
\node [style=none] (2) at (21, 2.75) {};
\node [style=none] (3) at (22, 2.75) {};
\node [style=Z] (4) at (21.5, 3.75) {};
\node [style=none] (5) at (21.5, 4.5) {$\cdots$};
\node [style=none] (6) at (21.5, 3) {$\cdots$};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw [in=150, out=-90, looseness=0.75] (0.center) to (4);
\draw [in=90, out=-150, looseness=0.75] (4) to (2.center);
\draw [in=-30, out=90, looseness=0.75] (3.center) to (4);
\draw [in=-90, out=30, looseness=0.75] (4) to (1.center);
\end{pgfonlayer}
\end{tikzpicture}
\ ,\hspace*{.2cm}
\left\llbracket
\tikz \draw (0,0) to[R=$r$] (0,2);
\ \right\rrbracket
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (0) at (21, 4.75) {};
\node [style=none] (2) at (21, 2.75) {};
\node [style=X] (4) at (21, 3.75) {$0,r$};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (0.center) to (4);
\draw (4) to (2.center);
\end{pgfonlayer}
\end{tikzpicture}
\ ,\hspace*{.2cm}
\left\llbracket
\tikz \draw (0,0) to[C=$c$] (0,2);
\ \right\rrbracket
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (0) at (21, 4.75) {};
\node [style=none] (2) at (21, 2.75) {};
\node [style=X] (4) at (21, 3.75) {$0,cs$};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (0.center) to (4);
\draw (4) to (2.center);
\end{pgfonlayer}
\end{tikzpicture}
\ ,\hspace*{.2cm}
\left\llbracket
\tikz \draw (0,0) to[L=$\ell$] (0,2);
\ \right\rrbracket
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (0) at (21, 4.75) {};
\node [style=none] (2) at (21, 2.75) {};
\node [style=Z] (4) at (21, 3.75) {$0,-1/(\ell s)$};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (0.center) to (4);
\draw (4) to (2.center);
\end{pgfonlayer}
\end{tikzpicture}

A voltage source with a fixed voltage $v$ and current sources with fixed current $I$ are interpreted as:

\left\llbracket
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (0) at (0, 2) {};
\node [style=vsourceAMshape,rotate=-90,fill=white] (10) at (0, 1) {};
\node [style=none] (1) at (0, 1) {};
\node [style=none] (2) at (0, 0) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (2.center) to (1);
\draw (1) to (0.center);
\node [style=none] (3) at (-.7, 1) {$v$};
\end{pgfonlayer}
\end{tikzpicture}
\hspace*{.3cm}
\right\rrbracket
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (0) at (21, 4.75) {};
\node [style=none] (2) at (21, 2.75) {};
\node [style=X] (4) at (21, 3.75) {$v, 0$};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (0.center) to (4);
\draw (4) to (2.center);
\end{pgfonlayer}
\end{tikzpicture}
\ ,\hspace*{.5cm}
\left\llbracket
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (0) at (0, 2) {};
\node [style=isourceAMshape,rotate=-90,fill=white] (10) at (0, 1) {};
\node [style=none] (1) at (0, 1) {};
\node [style=none] (2) at (0, 0) {};
\node [style=none] (3) at (-.7, 1) {$I$};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (2.center) to (1);
\draw (1) to (0.center);
\end{pgfonlayer}
\end{tikzpicture}
\hspace*{.3cm}
\right\rrbracket
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=Z] (13) at (26.5, 4.25) {$1/I,0$};
\node [style=Z] (14) at (26.5, 2.75) {$I,0$};
\node [style=none] (15) at (26.5, 5.2) {};
\node [style=none] (16) at (26.5, 1.8) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (16.center) to (14);
\draw (13) to (15.center);
\end{pgfonlayer}
\end{tikzpicture}

§ STRING DIAGRAMS FOR MEASUREMENT AND COISOTROPIC RELATIONS

In this section we show that by only requiring that the morphisms are affine coisotropic subspaces   (subspaces $V$ so that $V^\omega \subseteq V$) instead of affine Lagrangian subspaces (where $V^\omega= V$), we can capture the maximally mixed state/discarding; with which we can recover state preparation and measurement compositionally.

The cozero linear relation $2n\to 0$ is an  isotropic subspace since:

\left(
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=X] (0) at (0.5, 0.5) {};
\node [style=X] (1) at (1, 0.5) {};
\node [style=none] (2) at (0.5, 0) {};
\node [style=none] (3) at (1, 0) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (1) to (3.center);
\draw (0) to (2.center);
\end{pgfonlayer}
\end{tikzpicture}
\right)^\omega
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=Z] (0) at (0.5, 0.5) {};
\node [style=Z] (1) at (1, 0.5) {};
\node [style=none] (2) at (0.5, 0) {};
\node [style=none] (3) at (1, 0) {};
\node [style=s] (4) at (1, 0) {};
\node [style=none] (5) at (1, -0.75) {};
\node [style=none] (7) at (0.5, -0.75) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (1) to (3.center);
\draw (0) to (2.center);
\draw [in=270, out=90] (7.center) to (4.center);
\draw [in=90, out=-90] (2.center) to (5.center);
\end{pgfonlayer}
\end{tikzpicture}
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=Z] (0) at (0.5, 0.5) {};
\node [style=Z] (1) at (1, 0.5) {};
\node [style=none] (2) at (0.5, 0) {};
\node [style=none] (3) at (1, 0) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (1) to (3.center);
\draw (0) to (2.center);
\end{pgfonlayer}
\end{tikzpicture}
\supset
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=X] (0) at (0.5, 0.5) {};
\node [style=X] (1) at (1, 0.5) {};
\node [style=none] (2) at (0.5, 0) {};
\node [style=none] (3) at (1, 0) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (1) to (3.center);
\draw (0) to (2.center);
\end{pgfonlayer}
\end{tikzpicture}

And dually the codiscard linear relation $0\to 2n$ is coisotropic  since:

\left(
\begin{tikzpicture}[yscale=-1]
\begin{pgfonlayer}{nodelayer}
\node [style=Z] (0) at (0.5, 0.5) {};
\node [style=Z] (1) at (1, 0.5) {};
\node [style=none] (2) at (0.5, 0) {};
\node [style=none] (3) at (1, 0) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (1) to (3.center);
\draw (0) to (2.center);
\end{pgfonlayer}
\end{tikzpicture}
\right)^\omega
\begin{tikzpicture}[yscale=-1]
\begin{pgfonlayer}{nodelayer}
\node [style=X] (0) at (0.5, 0.5) {};
\node [style=X] (1) at (1, 0.5) {};
\node [style=none] (2) at (0.5, 0) {};
\node [style=none] (3) at (1, 0) {};
\node [style=s] (4) at (1, 0) {};
\node [style=none] (5) at (1, -0.75) {};
\node [style=none] (7) at (0.5, -0.75) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (1) to (3.center);
\draw (0) to (2.center);
\draw [in=270, out=90] (7.center) to (4.center);
\draw [in=90, out=-90] (2.center) to (5.center);
\end{pgfonlayer}
\end{tikzpicture}
\begin{tikzpicture}[yscale=-1]
\begin{pgfonlayer}{nodelayer}
\node [style=X] (0) at (0.5, 0.5) {};
\node [style=X] (1) at (1, 0.5) {};
\node [style=none] (2) at (0.5, 0) {};
\node [style=none] (3) at (1, 0) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (1) to (3.center);
\draw (0) to (2.center);
\end{pgfonlayer}
\end{tikzpicture}
\supset
\begin{tikzpicture}[yscale=-1]
\begin{pgfonlayer}{nodelayer}
\node [style=Z] (0) at (0.5, 0.5) {};
\node [style=Z] (1) at (1, 0.5) {};
\node [style=none] (2) at (0.5, 0) {};
\node [style=none] (3) at (1, 0) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (1) to (3.center);
\draw (0) to (2.center);
\end{pgfonlayer}
\end{tikzpicture}

Given a matrix $A:n\to m$ in $\cb_k$, we can recover the image and kernel of $A$ diagrammatically:

\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=map] (3) at (21, 6) {$\im A$};
\node [style=none] (5) at (21, 7) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (3) to (5.center);
\end{pgfonlayer}
\end{tikzpicture}
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=map] (0) at (20, 6) {$A$};
\node [style=Z] (1) at (20, 5) {};
\node [style=none] (2) at (20, 7) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (1) to (0);
\draw (0) to (2.center);
\end{pgfonlayer}
\end{tikzpicture}
\ , \hspace*{1cm}
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=map] (3) at (21, 6) {$\ker A $};
\node [style=none] (5) at (21, 7) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (3) to (5.center);
\end{pgfonlayer}
\end{tikzpicture}
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=map] (0) at (20, 6) {$A^*$};
\node [style=X] (1) at (20, 5) {};
\node [style=none] (2) at (20, 7) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (1) to (0);
\draw (0) to (2.center);
\end{pgfonlayer}
\end{tikzpicture}

Therefore, if we ask that $A$ is a Lagrangian relation rather than matrix, we find that  kernels of Lagrangian relations are isotropic subspaces and the images are coisotropic subspaces.

All (co)isotropic subspaces are generated in this way:

Every coisotropic subspace of $k^{2n}$ of dimension $n+m$ is the image of a Lagrangian isometry $m\to n$.

Suppose that we have a coisotropic subspace $V^\omega$ of $k^{2n}$ with dimension $n+m$.
Then $V$ is an isotropic subspace of $k^{2n}$ with dimension $n-m$.
Applying Fourier transforms, we obtain a  subspace symplectomorphic to $V$ generated by a matrix whose pivots are all in the $Z$ block.  Therefore, we can row reduce this matrix to obtain one of the following form:

\left[\begin{array}{cc|cc}
I_{n-m} & Z_B & X_A & X_B
\end{array}\right]

By applying $C_a$ gates from the first $n-m$ wires to the last $m$ wires, we obtain an isotropic subspace $V'$ generated by a matrix of the following form:

\left[\begin{array}{cc|cc}
I_{n-m} & 0 & X_A' & X_B'
\end{array}\right]

Therefore we have $V' = U V$ for a symplectomorphism $U$.
Since all of the rows of the basis for $V'$  are orthogonal with respect to the symplectic form, we have:

\begin{align*}
0 &=
\left[\begin{array}{cc|cc}
I_{n-m} & 0 & X_A' & X_B'
\end{array}\right]
\omega
\left[\begin{array}{cc|cc}
I_{n-m} & 0 & X_A' & X_B'
\end{array}\right]^T\\
\left[\begin{array}{cc|cc}
I_{n-m} & 0 & X_A' & X_B'
\end{array}\right]
\left[\begin{array}{cc|cc}
-X_A' & -X_B'  & I_{n-m} & 0
\end{array}\right]^T\\
I_{n-m}(-X_A')^T +  0( -X_B' )^T +X_A'I_{n-m} + X_B' 0 \\
(-X_A')^T +X_A'
\end{align*}

So that  $X_A'=(X_A')^T$ is a symmetric matrix.
Therefore, the following matrix generates a graph state, and thus a Lagrangian subspace of $k^{2(n+m)}$:

\left[\begin{array}{ccc|ccc}
I_{n-m} & 0    & 0 & X_A'       & X_B' & 0\\
0           & I_m & 0 & (X_B')^T & 0     &  I_m \\
0           & 0    & I_m  & 0            & I_m & 0
\end{array}\right]

Let $W\subseteq k^{2(n+m)}$ be the Lagrangian subspace generated by this matrix.  Then

\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=X] (0) at (0.5, 0.5) {};
\node [style=X] (1) at (1.5, 0.5) {};
\node [style=map] (8) at (0.75, -0.5) {$W$};
\node [style=none] (9) at (1, 0.5) {};
\node [style=none] (10) at (0, 0.5) {};
\node [style=none] (11) at (0, 1) {};
\node [style=none] (12) at (1, 1) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw [bend left, looseness=0.75] (8) to (10.center);
\draw [bend left=15] (8) to (0);
\draw [bend right=15] (8) to (9.center);
\draw [bend right, looseness=0.75] (8) to (1);
\draw (11.center) to (10.center);
\draw (9.center) to (12.center);
\end{pgfonlayer}
\end{tikzpicture}
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=map] (15) at (3.25, -0.5) {$V'$};
\node [style=none] (16) at (3.5, 0.25) {};
\node [style=none] (17) at (3, 0.25) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw [bend left=15, looseness=0.75] (15) to (17.center);
\draw [bend right=15, looseness=0.75] (15) to (16.center);
\end{pgfonlayer}
\end{tikzpicture}

And thus

\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=X] (96) at (242.05, 0.5) {};
\node [style=X] (97) at (242.775, 0.5) {};
\node [style=map] (98) at (242.275, -0.5) {$W$};
\node [style=none] (101) at (241.8, 2.25) {};
\node [style=none] (102) at (242.425, 2.25) {};
\node [style=map] (103) at (242.125, 1.25) {$U^\dag$};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw [bend left=15] (98) to (96);
\draw [bend right, looseness=0.75] (98) to (97);
\draw [in=-90, out=135, looseness=0.75] (103) to (101.center);
\draw [in=-90, out=45, looseness=0.75] (103) to (102.center);
\draw [in=-60, out=75] (98) to (103);
\draw [in=135, out=-135, looseness=1.25] (103) to (98);
\end{pgfonlayer}
\end{tikzpicture}
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=map] (15) at (3.25, -0.5) {$V$};
\node [style=none] (16) at (3.5, 0.25) {};
\node [style=none] (17) at (3, 0.25) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw [bend left=15, looseness=0.75] (15) to (17.center);
\draw [bend right=15, looseness=0.75] (15) to (16.center);
\end{pgfonlayer}
\end{tikzpicture}

Therefore, $V^\omega$ is the image of the Lagrangian relation:

\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=map] (62) at (233, -0.5) {$W'$};
\node [style=none] (1) at (233, -0.5) {};
\node [style=none] (63) at (233.25, 0.25) {};
\node [style=none] (64) at (232.75, 0.25) {};
\node [style=none] (73) at (233.25, -1.25) {};
\node [style=none] (74) at (232.75, -1.25) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw [in=270, out=135] (1) to (64.center);
\draw [in=270, out=45] (1) to (63.center);
\draw [in=-45, out=90] (73.center) to (1);
\draw [in=-135, out=90] (74.center) to (1);
\end{pgfonlayer}
\end{tikzpicture}
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=map] (86) at (239, 1.75) {$W$};
\node [style=Z] (87) at (239.5, 3.25) {};
\node [style=X] (88) at (240.25, 3.25) {};
\node [style=none] (89) at (238.5, 3.25) {};
\node [style=none] (90) at (238.5, 3.25) {};
\node [style=none] (91) at (240, 1.25) {};
\node [style=none] (92) at (240.75, 1.25) {};
\node [style=map] (93) at (238.5, 3.25) {$U^\dag$};
\node [style=none] (94) at (238.075, 3.925) {};
\node [style=none] (95) at (238.825, 3.925) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw [in=225, out=120, looseness=1.25] (86) to (87);
\draw [in=30, out=-135] (88) to (86);
\draw [in=90, out=-45] (87) to (91.center);
\draw [in=-30, out=90, looseness=0.75] (92.center) to (88);
\draw [in=-45, out=75, looseness=0.75] (86) to (90.center);
\draw [in=150, out=-120] (89.center) to (86);
\draw (93) to (95.center);
\draw (93) to (94.center);
\end{pgfonlayer}
\end{tikzpicture}

Which is an isometry.

Every affine coisotropic subspace of $k^{2n}$ of dimension $n+m$ is the image of a an affine Lagrangian isometry $m\to n$.

More concretely the prop is $\Co\Isot\Rel_k$ is generated by adding
\begin{pgfonlayer}{nodelayer}
\node [style=Z] (0) at (0, 0) {};
\node [style=Z] (1) at (0.5, 0) {};
\node [style=none] (2) at (0, 0.5) {};
\node [style=none] (3) at (0.5, 0.5) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (1.center) to (3.center);
\draw (0.center) to (2.center);
\end{pgfonlayer}
\end{tikzpicture}$
to the image of the embedding $\Lag\Rel_k\hookrightarrow \LinRel_k$; and dually, $\Isot\Rel_k$  is generated by adding
\begin{pgfonlayer}{nodelayer}
\node [style=X] (0) at (0, 0) {};
\node [style=X] (1) at (0.5, 0) {};
\node [style=none] (2) at (0, 0.5) {};
\node [style=none] (3) at (0.5, 0.5) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (1.center) to (3.center);
\draw (0.center) to (2.center);
\end{pgfonlayer}
\end{tikzpicture}$ to $\Lag\Rel_k\hookrightarrow \LinRel_k$. So that the symplectic complement extends to an isomorphism of props $(-)^\omega:\Co\Isot\Rel_k\cong \Isot\Rel_k$.

The props $\Aff\Co\Isot\Rel_k$ and $\Aff\Isot\Rel_k$ are generated by respectively adding
\begin{pgfonlayer}{nodelayer}
\node [style=Z] (0) at (0, 0) {};
\node [style=Z] (1) at (0.5, 0) {};
\node [style=none] (2) at (0, 0.5) {};
\node [style=none] (3) at (0.5, 0.5) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (1.center) to (3.center);
\draw (0.center) to (2.center);
\end{pgfonlayer}
\end{tikzpicture}$
\begin{pgfonlayer}{nodelayer}
\node [style=X] (0) at (0, 0) {};
\node [style=X] (1) at (0.5, 0) {};
\node [style=none] (2) at (0, 0.5) {};
\node [style=none] (3) at (0.5, 0.5) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (1.center) to (3.center);
\draw (0.center) to (2.center);
\end{pgfonlayer}
\end{tikzpicture}$
to the images of the embeddings $\Aff\Co\Isot\Rel_k,\Aff\Isot\Rel_k\hookrightarrow \Aff\Rel_k$.  However, in this case, they are not isomorphic as:

\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=X] (0) at (1.75, -0.75) {$1$};
\node [style=Z] (3) at (1.75, 0) {};
\node [style=Z] (4) at (0.75, 0) {};
\node [style=none] (9) at (1.75, -1.5) {};
\node [style=none] (10) at (0.75, -1.5) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (0) to (9.center);
\draw (0) to (3);
\draw (10.center) to (4);
\end{pgfonlayer}
\end{tikzpicture}
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=Z] (3) at (1.75, 0) {};
\node [style=Z] (4) at (0.75, 0) {};
\node [style=none] (9) at (1.75, -1.5) {};
\node [style=none] (10) at (0.75, -1.5) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (10.center) to (4);
\draw (9.center) to (3);
\end{pgfonlayer}
\end{tikzpicture}
\hspace*{.5cm}
\text{but}
\hspace*{.5cm}
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=X] (0) at (1.75, -0.75) {$1$};
\node [style=X] (3) at (1.75, 0) {};
\node [style=X] (4) at (0.75, 0) {};
\node [style=none] (9) at (1.75, -1.5) {};
\node [style=none] (10) at (0.75, -1.5) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (0) to (9.center);
\draw (0) to (3);
\draw (10.center) to (4);
\end{pgfonlayer}
\end{tikzpicture}
\neq
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=X] (3) at (1.75, 0) {};
\node [style=X] (4) at (0.75, 0) {};
\node [style=none] (9) at (1.75, -1.5) {};
\node [style=none] (10) at (0.75, -1.5) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (10.center) to (4);
\draw (9.center) to (3);
\end{pgfonlayer}
\end{tikzpicture}

$\CPM(\Aff\Lag\Rel_{k},\bar{(-)})\cong \Aff\Co\Isot\Rel_k$

Consider the identity on objects map $\CPM(\Aff\Lag\Rel_k, \bar{(-)}) \to \Aff\Co\Isot\Rel_k$, sending:

\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=map] (0) at (3.75, 2.25) {$f$};
\node [style=none] (1) at (4.75, 4.25) {};
\node [style=none] (2) at (4, 4.25) {};
\node [style=map] (3) at (2, 2.25) {$\bar f$};
\node [style=Z] (4) at (3.5, 3.75) {};
\node [style=X] (5) at (1.75, 3.75) {};
\node [style=none] (6) at (4.75, 4.25) {};
\node [style=none] (7) at (4, 4.25) {};
\node [style=none] (8) at (3, 4.25) {};
\node [style=none] (9) at (2.25, 4.25) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw [in=45, out=-90] (1.center) to (0);
\draw [in=-90, out=120] (0) to (2.center);
\draw [in=-15, out=75, looseness=1.25] (0) to (4);
\draw [in=-135, out=150, looseness=1.50] (3) to (5);
\draw [in=-90, out=105] (3) to (9.center);
\draw [in=-90, out=30, looseness=0.75] (3) to (8.center);
\draw [in=-165, out=75] (3) to (4);
\draw [in=-15, out=150, looseness=1.25] (0) to (5);
\end{pgfonlayer}
\end{tikzpicture}
\mapsto
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=map] (122) at (69.25, 2.25) {$f$};
\node [style=none] (123) at (70, 4.25) {};
\node [style=none] (124) at (69, 4.25) {};
\node [style=Z] (125) at (69.5, 3.5) {};
\node [style=Z] (126) at (68.5, 3.5) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw [in=45, out=-90] (123.center) to (122);
\draw [in=-90, out=120] (122) to (124.center);
\draw [in=-90, out=75] (122) to (125);
\draw [in=-90, out=135] (122) to (126);
\end{pgfonlayer}
\end{tikzpicture}

This is clearly bijective on objects.  This is full by Corollary <ref>.
So we just have to show that it is faithful and well defined.
Take some $\hat f \in \CPM(\Aff\Lag\Rel_k, \bar{(-)})(0,n)$ with purification $f$.
Then for $\vec z_0, \vec x_0, \vec z_1, \vec x_1 \in k^n$:

\begin{align*}
(\vec z_0, \vec x_0,\vec z_1,\vec x_1) \in \hat f &\iff
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=map] (0) at (3.75, 2.25) {$f$};
\node [style=none] (1) at (5, 4.5) {};
\node [style=none] (2) at (4, 4.5) {};
\node [style=map] (3) at (2, 2.25) {$\bar f$};
\node [style=Z] (4) at (3.5, 3.75) {};
\node [style=X] (5) at (1.5, 3.75) {};
\node [style=none] (6) at (5, 4.5) {};
\node [style=none] (7) at (4, 4.5) {};
\node [style=none] (8) at (3, 4.5) {};
\node [style=none] (9) at (2, 4.5) {};
\node [style=none] (10) at (5, 5.25) {};
\node [style=none] (11) at (4, 5.25) {};
\node [style=none] (12) at (5, 5.25) {};
\node [style=none] (13) at (4, 5.25) {};
\node [style=none] (14) at (3, 5.25) {};
\node [style=none] (15) at (2, 5.25) {};
\node [style=X] (16) at (2, 4.5) {$\vec z_0$};
\node [style=X] (17) at (3, 4.5) {$\vec x_0$};
\node [style=none] (18) at (5, 4.5) {};
\node [style=none] (19) at (4, 4.5) {};
\node [style=X] (20) at (4, 4.5) {$\vec z_1$};
\node [style=X] (21) at (5, 4.5) {$\vec x_1$};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw [in=45, out=-90] (1.center) to (0);
\draw [in=-90, out=120] (0) to (2.center);
\draw [in=-15, out=75, looseness=1.25] (0) to (4);
\draw [in=-135, out=150, looseness=1.50] (3) to (5);
\draw [in=-90, out=105] (3) to (9.center);
\draw [in=-90, out=30, looseness=0.75] (3) to (8.center);
\draw [in=-165, out=75] (3) to (4);
\draw [in=-15, out=150, looseness=1.25] (0) to (5);
\draw (9.center) to (15.center);
\draw (8.center) to (14.center);
\draw (7.center) to (13.center);
\draw (6.center) to (12.center);
\end{pgfonlayer}
\end{tikzpicture}
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=map] (22) at (7.75, 2.25) {$f$};
\node [style=none] (23) at (8.75, 4.25) {};
\node [style=none] (24) at (8, 4.25) {};
\node [style=map] (25) at (6, 2.25) {$\bar f$};
\node [style=Z] (26) at (7.5, 3.75) {};
\node [style=X] (27) at (5.75, 3.75) {};
\node [style=none] (28) at (8.75, 4.25) {};
\node [style=none] (29) at (8, 4.25) {};
\node [style=none] (30) at (7, 4.25) {};
\node [style=none] (31) at (6.25, 4.25) {};
\node [style=none] (40) at (8.75, 4.25) {};
\node [style=none] (41) at (8, 4.25) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw [in=45, out=-90] (23.center) to (22);
\draw [in=-90, out=120] (22) to (24.center);
\draw [in=-15, out=75, looseness=1.25] (22) to (26);
\draw [in=-135, out=150, looseness=1.50] (25) to (27);
\draw [in=-90, out=105] (25) to (31.center);
\draw [in=-90, out=30, looseness=0.75] (25) to (30.center);
\draw [in=-165, out=75] (25) to (26);
\draw [in=-15, out=150, looseness=1.25] (22) to (27);
\end{pgfonlayer}
\end{tikzpicture}\\
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=map] (42) at (3.25, -1.5) {$f$};
\node [style=none] (43) at (4.5, 0.75) {};
\node [style=none] (44) at (3.5, 0.75) {};
\node [style=map] (45) at (1.5, -1.5) {$\bar f$};
\node [style=Z] (46) at (3, 0) {};
\node [style=X] (47) at (1, 0) {};
\node [style=none] (48) at (4.5, 0.75) {};
\node [style=none] (49) at (3.5, 0.75) {};
\node [style=none] (50) at (2.5, 0.75) {};
\node [style=none] (51) at (1.5, 0.75) {};
\node [style=none] (52) at (4.5, 1.5) {};
\node [style=none] (53) at (3.5, 1.5) {};
\node [style=none] (54) at (4.5, 1.5) {};
\node [style=none] (55) at (3.5, 1.5) {};
\node [style=none] (56) at (2.5, 1.5) {};
\node [style=none] (57) at (1.5, 1.5) {};
\node [style=X] (58) at (1.5, 0.75) {$-\vec z_1$};
\node [style=X] (59) at (2.5, 0.75) {$\vec x_1$};
\node [style=none] (60) at (4.5, 0.75) {};
\node [style=none] (61) at (3.5, 0.75) {};
\node [style=X] (62) at (3.5, 0.75) {$-\vec z_0$};
\node [style=X] (63) at (4.5, 0.75) {$\vec x_0$};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw [in=45, out=-90] (43.center) to (42);
\draw [in=-90, out=120] (42) to (44.center);
\draw [in=-15, out=75, looseness=1.25] (42) to (46);
\draw [in=-135, out=150, looseness=1.50] (45) to (47);
\draw [in=-90, out=105] (45) to (51.center);
\draw [in=-90, out=30, looseness=0.75] (45) to (50.center);
\draw [in=-165, out=75] (45) to (46);
\draw [in=-15, out=150, looseness=1.25] (42) to (47);
\draw (51.center) to (57.center);
\draw (50.center) to (56.center);
\draw (49.center) to (55.center);
\draw (48.center) to (54.center);
\end{pgfonlayer}
\end{tikzpicture}
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=map] (64) at (7.25, -1) {$f$};
\node [style=none] (65) at (8.25, 1) {};
\node [style=none] (66) at (7.5, 1) {};
\node [style=map] (67) at (5.5, -1) {$\bar f$};
\node [style=Z] (68) at (7, 0.5) {};
\node [style=X] (69) at (5.25, 0.5) {};
\node [style=none] (70) at (8.25, 1) {};
\node [style=none] (71) at (7.5, 1) {};
\node [style=none] (72) at (6.5, 1) {};
\node [style=none] (73) at (5.75, 1) {};
\node [style=none] (74) at (8.25, 1) {};
\node [style=none] (75) at (7.5, 1) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw [in=45, out=-90] (65.center) to (64);
\draw [in=-90, out=120] (64) to (66.center);
\draw [in=-15, out=75, looseness=1.25] (64) to (68);
\draw [in=-135, out=150, looseness=1.50] (67) to (69);
\draw [in=-90, out=105] (67) to (73.center);
\draw [in=-90, out=30, looseness=0.75] (67) to (72.center);
\draw [in=-165, out=75] (67) to (68);
\draw [in=-15, out=150, looseness=1.25] (64) to (69);
\end{pgfonlayer}
\end{tikzpicture}\\
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=map] (76) at (2.25, -5.75) {$f$};
\node [style=none] (77) at (3.5, -3.75) {};
\node [style=none] (78) at (2.5, -3) {};
\node [style=map] (79) at (0.25, -5.75) {$\bar f$};
\node [style=Z] (80) at (1.75, -4.5) {};
\node [style=X] (81) at (-0.3, -4.5) {};
\node [style=none] (82) at (3.5, -3.75) {};
\node [style=none] (83) at (2.5, -3) {};
\node [style=none] (84) at (1.25, -3.75) {};
\node [style=none] (85) at (0.25, -3) {};
\node [style=none] (86) at (3.5, -2.25) {};
\node [style=none] (87) at (2.5, -2.25) {};
\node [style=none] (88) at (3.5, -2.25) {};
\node [style=none] (89) at (2.5, -2.25) {};
\node [style=none] (90) at (1.25, -2.25) {};
\node [style=none] (91) at (0.25, -2.25) {};
\node [style=X] (92) at (0.25, -3) {$\vec z_0-\vec z_1$};
\node [style=X] (93) at (1.25, -3.75) {$\vec x_0+\vec x_1$};
\node [style=none] (94) at (3.5, -3.75) {};
\node [style=none] (95) at (2.5, -3) {};
\node [style=X] (96) at (2.5, -3) {$\vec z_1-\vec z_0$};
\node [style=X] (97) at (3.5, -3.75) {$\vec x_0+\vec x_1$};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw [in=45, out=-90] (77.center) to (76);
\draw [in=-90, out=120] (76) to (78.center);
\draw [in=-15, out=75, looseness=1.25] (76) to (80);
\draw [in=-135, out=150, looseness=1.50] (79) to (81);
\draw [in=-90, out=105] (79) to (85.center);
\draw [in=-90, out=30, looseness=0.75] (79) to (84.center);
\draw [in=-165, out=75] (79) to (80);
\draw [in=-15, out=150, looseness=1.25] (76) to (81);
\draw (85.center) to (91.center);
\draw (84.center) to (90.center);
\draw (83.center) to (89.center);
\draw (82.center) to (88.center);
\end{pgfonlayer}
\end{tikzpicture}
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=map] (98) at (6.5, -4.75) {$f$};
\node [style=none] (99) at (7.5, -2.75) {};
\node [style=none] (100) at (6.75, -2.75) {};
\node [style=map] (101) at (4.75, -4.75) {$\bar f$};
\node [style=Z] (102) at (6.25, -3.25) {};
\node [style=X] (103) at (4.5, -3.25) {};
\node [style=none] (104) at (7.5, -2.75) {};
\node [style=none] (105) at (6.75, -2.75) {};
\node [style=none] (106) at (5.75, -2.75) {};
\node [style=none] (107) at (5, -2.75) {};
\node [style=none] (108) at (7.5, -2.75) {};
\node [style=none] (109) at (6.75, -2.75) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw [in=45, out=-90] (99.center) to (98);
\draw [in=-90, out=120] (98) to (100.center);
\draw [in=-15, out=75, looseness=1.25] (98) to (102);
\draw [in=-135, out=150, looseness=1.50] (101) to (103);
\draw [in=-90, out=105] (101) to (107.center);
\draw [in=-90, out=30, looseness=0.75] (101) to (106.center);
\draw [in=-165, out=75] (101) to (102);
\draw [in=-15, out=150, looseness=1.25] (98) to (103);
\end{pgfonlayer}
\end{tikzpicture}\\
&\iff (\vec z_0-\vec z_1, \vec x_0+\vec x_1,z_1-\vec z_0,\vec x_0+\vec x_1) \in \hat f
\end{align*}

Therefore, maps in  $\CPM(\Aff\Lag\Rel_k, \bar{(-)})(0,n)$ are determined by their diagonal elements $(-\vec z,\vec x,\vec z,\vec x)$.

\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=map] (18) at (8.75, -4) {$g$};
\node [style=none] (19) at (8.25, -2.75) {};
\node [style=none] (20) at (9.25, -2.75) {};
\node [style=none] (21) at (8.25, -5.25) {};
\node [style=none] (22) at (9.25, -5.25) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw [in=300, out=90] (22.center) to (18);
\draw [in=60, out=-90, looseness=0.75] (20.center) to (18);
\draw [in=90, out=-120] (18) to (21.center);
\draw [in=-90, out=120] (18) to (19.center);
\end{pgfonlayer}
\end{tikzpicture}
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=map] (0) at (6.5, -4.75) {$f$};
\node [style=none] (1) at (7.5, -2.75) {};
\node [style=none] (2) at (6.75, -2.75) {};
\node [style=Z] (4) at (6.25, -3.25) {};
\node [style=X] (5) at (5.5, -3.25) {};
\node [style=none] (6) at (7.5, -2.75) {};
\node [style=none] (7) at (6.75, -2.75) {};
\node [style=none] (10) at (7.5, -2.75) {};
\node [style=none] (11) at (6.75, -2.75) {};
\node [style=none] (12) at (5.75, -5.25) {};
\node [style=none] (13) at (5, -5.25) {};
\node [style=none] (14) at (5.75, -5.25) {};
\node [style=none] (15) at (5, -5.25) {};
\node [style=none] (16) at (5.75, -5.25) {};
\node [style=none] (17) at (5, -5.25) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw [in=45, out=-90] (1.center) to (0);
\draw [in=-90, out=120] (0) to (2.center);
\draw [in=-15, out=75, looseness=1.25] (0) to (4);
\draw [in=-30, out=150] (0) to (5);
\draw [in=-135, out=90, looseness=0.75] (16.center) to (4);
\draw [in=-120, out=90] (17.center) to (5);
\end{pgfonlayer}
\end{tikzpicture}

Therefore the following biconditional:

\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=map] (110) at (2.25, -10.5) {$f$};
\node [style=none] (111) at (3.25, -8.5) {};
\node [style=none] (112) at (2.5, -8) {};
\node [style=map] (113) at (0.5, -10.5) {$\bar f$};
\node [style=Z] (114) at (1.75, -9.25) {};
\node [style=X] (115) at (0, -9.25) {};
\node [style=none] (116) at (3.25, -8.5) {};
\node [style=none] (117) at (2.5, -8) {};
\node [style=none] (118) at (1.5, -8.5) {};
\node [style=none] (119) at (0.75, -8) {};
\node [style=none] (121) at (2.5, -7.25) {};
\node [style=none] (122) at (3.25, -7.25) {};
\node [style=none] (123) at (2.5, -7.25) {};
\node [style=none] (124) at (1.5, -7.25) {};
\node [style=none] (125) at (0.75, -7.25) {};
\node [style=X] (126) at (0.75, -8) {$-\vec z$};
\node [style=X] (127) at (1.5, -8.5) {$\vec x$};
\node [style=none] (128) at (3.25, -8.5) {};
\node [style=none] (129) at (2.5, -8) {};
\node [style=X] (130) at (2.5, -8) {$\vec z$};
\node [style=X] (131) at (3.25, -8.5) {$\vec x$};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw [in=45, out=-90] (111.center) to (110);
\draw [in=-90, out=120] (110) to (112.center);
\draw [in=-15, out=75, looseness=1.25] (110) to (114);
\draw [in=-135, out=150, looseness=1.50] (113) to (115);
\draw [in=-90, out=105] (113) to (119.center);
\draw [in=-90, out=30, looseness=0.75] (113) to (118.center);
\draw [in=-165, out=75] (113) to (114);
\draw [in=-15, out=150, looseness=1.25] (110) to (115);
\draw (119.center) to (125.center);
\draw (118.center) to (124.center);
\draw (117.center) to (123.center);
\draw (116.center) to (122.center);
\end{pgfonlayer}
\end{tikzpicture}
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=map] (132) at (6.25, -10.25) {$f$};
\node [style=none] (133) at (6.5, -8.25) {};
\node [style=map] (134) at (4.5, -10.25) {$\bar f$};
\node [style=Z] (135) at (6, -8.75) {};
\node [style=X] (136) at (4.25, -8.75) {};
\node [style=none] (137) at (6.5, -8.25) {};
\node [style=none] (138) at (5.5, -8.25) {};
\node [style=none] (139) at (4.75, -8.25) {};
\node [style=none] (140) at (6.5, -8.25) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw [in=-90, out=120] (132) to (133.center);
\draw [in=-15, out=75, looseness=1.25] (132) to (135);
\draw [in=-135, out=150, looseness=1.50] (134) to (136);
\draw [in=-90, out=105] (134) to (139.center);
\draw [in=-90, out=30, looseness=0.75] (134) to (138.center);
\draw [in=-165, out=75] (134) to (135);
\draw [in=-15, out=150, looseness=1.25] (132) to (136);
\end{pgfonlayer}
\end{tikzpicture}
\iff
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=map] (141) at (11, -14.5) {$f$};
\node [style=none] (142) at (11.75, -12.5) {};
\node [style=none] (143) at (10.75, -12.5) {};
\node [style=Z] (144) at (11.25, -13.25) {};
\node [style=Z] (145) at (10.25, -13.25) {};
\node [style=X] (146) at (10.75, -12.5) {$\vec z$};
\node [style=X] (147) at (11.75, -12.5) {$\vec x$};
\node [style=none] (148) at (11.75, -11.75) {};
\node [style=none] (149) at (10.75, -11.75) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw [in=45, out=-90] (142.center) to (141);
\draw [in=-90, out=120] (141) to (143.center);
\draw [in=-90, out=75] (141) to (144);
\draw [in=-90, out=135] (141) to (145);
\draw (147) to (148.center);
\draw (146) to (149.center);
\end{pgfonlayer}
\end{tikzpicture}
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=map] (141) at (11, -14.5) {$f$};
\node [style=none] (142) at (11.75, -12.5) {};
\node [style=none] (143) at (10.75, -12.5) {};
\node [style=Z] (144) at (11.25, -13.25) {};
\node [style=Z] (145) at (10.25, -13.25) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw [in=45, out=-90] (142.center) to (141);
\draw [in=-90, out=120] (141) to (143.center);
\draw [in=-90, out=75] (141) to (144);
\draw [in=-90, out=135] (141) to (145);
\end{pgfonlayer}
\end{tikzpicture}

is equivalent to the following biconditional:

\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=map] (30) at (12.5, -4) {$g$};
\node [style=none] (31) at (12, -2.75) {};
\node [style=none] (32) at (13, -2.75) {};
\node [style=map] (33) at (10.75, -4) {$\bar g$};
\node [style=none] (34) at (10.25, -2.75) {};
\node [style=none] (35) at (11.25, -2.75) {};
\node [style=X] (36) at (10.85, -5) {};
\node [style=Z] (37) at (12.4, -5) {};
\node [style=none] (38) at (12, -2) {};
\node [style=none] (39) at (13, -2) {};
\node [style=none] (40) at (10.25, -2) {};
\node [style=none] (41) at (11.25, -2) {};
\node [style=X] (42) at (10.25, -2.75) {$-\vec z$};
\node [style=X] (43) at (11.25, -2.75) {$\vec x$};
\node [style=X] (44) at (12, -2.75) {$\vec z$};
\node [style=X] (45) at (13, -2.75) {$\vec x$};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw [in=60, out=-90, looseness=0.75] (32.center) to (30);
\draw [in=-90, out=120] (30) to (31.center);
\draw [in=60, out=-90, looseness=0.75] (35.center) to (33);
\draw [in=-90, out=120] (33) to (34.center);
\draw [in=-45, out=150, looseness=0.75] (37) to (33);
\draw [in=45, out=-60] (30) to (37);
\draw [in=-120, out=30, looseness=0.75] (36) to (30);
\draw [in=-105, out=135] (36) to (33);
\draw (34.center) to (40.center);
\draw (35.center) to (41.center);
\draw (31.center) to (38.center);
\draw (32.center) to (39.center);
\end{pgfonlayer}
\end{tikzpicture}
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=map] (18) at (8.75, -4) {$g$};
\node [style=none] (19) at (8.25, -2.75) {};
\node [style=none] (20) at (9.25, -2.75) {};
\node [style=map] (23) at (7, -4) {$\bar g$};
\node [style=none] (24) at (6.5, -2.75) {};
\node [style=none] (25) at (7.5, -2.75) {};
\node [style=X] (28) at (7.1, -5) {};
\node [style=Z] (29) at (8.65, -5) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw [in=60, out=-90, looseness=0.75] (20.center) to (18);
\draw [in=-90, out=120] (18) to (19.center);
\draw [in=60, out=-90, looseness=0.75] (25.center) to (23);
\draw [in=-90, out=120] (23) to (24.center);
\draw [in=-45, out=150, looseness=0.75] (29) to (23);
\draw [in=45, out=-60] (18) to (29);
\draw [in=-120, out=30, looseness=0.75] (28) to (18);
\draw [in=-105, out=135] (28) to (23);
\end{pgfonlayer}
\end{tikzpicture}
\iff
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=map] (18) at (8.75, -4) {$g$};
\node [style=none] (19) at (8.25, -2.75) {};
\node [style=none] (20) at (9.25, -2.75) {};
\node [style=none] (21) at (8.25, -5.25) {};
\node [style=none] (22) at (9.25, -5.25) {};
\node [style=Z] (23) at (8.25, -5.25) {};
\node [style=Z] (24) at (9.25, -5.25) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw [in=300, out=90] (22.center) to (18);
\draw [in=60, out=-90, looseness=0.75] (20.center) to (18);
\draw [in=90, out=-120] (18) to (21.center);
\draw [in=-90, out=120] (18) to (19.center);
\end{pgfonlayer}
\end{tikzpicture}
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=map] (46) at (14.5, -4) {$g$};
\node [style=none] (47) at (14, -2.75) {};
\node [style=none] (48) at (15, -2.75) {};
\node [style=none] (49) at (14, -5.25) {};
\node [style=none] (50) at (15, -5.25) {};
\node [style=Z] (51) at (14, -5.25) {};
\node [style=Z] (52) at (15, -5.25) {};
\node [style=none] (53) at (14, -2) {};
\node [style=none] (54) at (15, -2) {};
\node [style=X] (55) at (14, -2.75) {$\vec z$};
\node [style=X] (56) at (15, -2.75) {$\vec x$};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw [in=300, out=90] (50.center) to (46);
\draw [in=60, out=-90, looseness=0.75] (48.center) to (46);
\draw [in=90, out=-120] (46) to (49.center);
\draw [in=-90, out=120] (46) to (47.center);
\draw (47.center) to (53.center);
\draw (48.center) to (54.center);
\end{pgfonlayer}
\end{tikzpicture}

We prove the latter biconditional. If $g$ is the identity, then for  all $(\vec z,\vec x)\in k^{2n}$:

\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (31) at (12, -2.75) {};
\node [style=none] (32) at (12.75, -2.75) {};
\node [style=none] (34) at (10.5, -2.75) {};
\node [style=none] (35) at (11.25, -2.75) {};
\node [style=X] (36) at (11.1, -3.75) {};
\node [style=Z] (37) at (12.15, -3.75) {};
\node [style=none] (38) at (12, -2) {};
\node [style=none] (39) at (12.75, -2) {};
\node [style=none] (40) at (10.5, -2) {};
\node [style=none] (41) at (11.25, -2) {};
\node [style=X] (42) at (10.5, -2.75) {$-\vec z$};
\node [style=X] (43) at (11.25, -2.75) {$\vec x$};
\node [style=X] (44) at (12, -2.75) {$\vec z$};
\node [style=X] (45) at (12.75, -2.75) {$\vec x$};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (34.center) to (40.center);
\draw (35.center) to (41.center);
\draw (31.center) to (38.center);
\draw (32.center) to (39.center);
\draw [in=-90, out=150, looseness=0.75] (37) to (43);
\draw [in=135, out=-90] (42) to (36);
\draw [in=-90, out=30, looseness=0.75] (36) to (44);
\draw [in=-90, out=45] (37) to (45);
\end{pgfonlayer}
\end{tikzpicture}
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (31) at (12.25, -3) {};
\node [style=none] (32) at (13, -3) {};
\node [style=none] (34) at (10.75, -3) {};
\node [style=none] (35) at (11.5, -3) {};
\node [style=X] (36) at (11.35, -4) {};
\node [style=Z] (37) at (12.4, -4) {};
\node [style=none] (42) at (10.75, -3) {};
\node [style=none] (43) at (11.5, -3) {};
\node [style=none] (44) at (12.25, -3) {};
\node [style=none] (45) at (13, -3) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw [in=-90, out=150, looseness=0.75] (37) to (43);
\draw [in=135, out=-90] (42) to (36);
\draw [in=-90, out=30, looseness=0.75] (36) to (44);
\draw [in=-90, out=45] (37) to (45);
\end{pgfonlayer}
\end{tikzpicture}
\text{ and }
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (47) at (14, -2.75) {};
\node [style=none] (48) at (15, -2.75) {};
\node [style=none] (49) at (14, -3.5) {};
\node [style=none] (50) at (15, -3.5) {};
\node [style=Z] (51) at (14, -3.5) {};
\node [style=Z] (52) at (15, -3.5) {};
\node [style=none] (53) at (14, -2) {};
\node [style=none] (54) at (15, -2) {};
\node [style=X] (55) at (14, -2.75) {$\vec z$};
\node [style=X] (56) at (15, -2.75) {$\vec x$};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (47.center) to (53.center);
\draw (48.center) to (54.center);
\draw (52) to (56);
\draw (51) to (55);
\end{pgfonlayer}
\end{tikzpicture}
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (49) at (14, -3.5) {};
\node [style=none] (50) at (15, -3.5) {};
\node [style=Z] (51) at (14, -3.5) {};
\node [style=Z] (52) at (15, -3.5) {};
\node [style=none] (53) at (14, -2) {};
\node [style=none] (54) at (15, -2) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (52) to (54.center);
\draw (51) to (53.center);
\end{pgfonlayer}
\end{tikzpicture}

Given any map $g:m\to n$ in  $\Aff\Lag\Rel_k$, regarded as a state, we know that $(\vec z,\vec x)$ is a stabilizer for $g$ precisely when $(-\vec z,\vec x)$ is a stabilizer for $\bar g$.  However, we know that the cup discards these diagonal stabilizers on the bottom of $\bar g$ and the codiscard map discards all Weyl operators.

For odd prime $p$:

$$\Aff\Co\Isot\Rel_{\F_p}\cong \CPM(\Aff\Lag\Rel_{\F_p})\cong \CPM(\Stab_p)$$

That is, adding the discard relation to $\Aff\Lag\Rel_{\F_p}$ gives a semantics for odd prime dimensional  mixed stabilizer circuits and  mixed circuits in Spekkens' qubit toy model.  Graphically:

\left\llbracket \
\begin{tikzpicture}[yscale=-1]
\begin{pgfonlayer}{nodelayer}
\node [style=none] (0) at (0.25, 0) {};
\node [ground] (1) at (0.25, -0.5) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (1) to (0.center);
\end{pgfonlayer}
\end{tikzpicture}
\ \right\rrbracket
\left\{
\left(
\begin{pmatrix}
\end{pmatrix},
\right)
:\forall z,x \in \F_p
\right\}
\left\llbracket \
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=Z] (2) at (4, 0) {};
\node [style=Z] (3) at (4.5, 0) {};
\node [style=none] (4) at (4, -1) {};
\node [style=none] (5) at (4.5, -1) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (4.center) to (2);
\draw (3) to (5.center);
\end{pgfonlayer}
\end{tikzpicture}
\ \right\rrbracket

By mixed stabilizer circuits; we mean stabilizer circuits which can be obtained by discarding part of a pure stabilizer circuit, not an arbitrary convex combination of stabilizer circuits.  I point this out only because the  terms “stabilizer mixed state/circuit” and “mixed stabilizer state/circuit” can interchangeably refer to either notion.
Mixed stabilizer states are also known as stabilizer codes for reasons that will become clear in Section <ref>.

This is conceptually very close to the result of [22] where they show that the affine completion of isometries between finite dimensional Hilbert spaces, which freely adds a discard map, yields completely positive trace-preserving maps.  And even more similar to the more refined result of   [10], where they show that various fragments of the ZX-calculus can be augmented with quantum discarding by freely adding a generator which discards isometries.

Although in our case the quantum discarding is interpreted as the literal discard relation of the corresponding stabilizers, therefore our semantics never departs from affine relations.
The discard relation on $n$ wires is defined to be the morphism $!_n$ such that for all morphisms $f:n\to m$,  $!_m\circ f \leq !_n$.

It was already known that stabilizer codes are in bijection with  affine isotropic subspaces, for example <cit.>.  Indeed affine coisotropic subspaces are in bijection with affine isotropic subspace by  taking the symplectic complement of the linear component of the affine subspace; however, as noted in Remark  <ref>, $\Aff\Isot\Rel_{\F_p} \not \cong \Aff\Co\Isot\Rel_{\F_p}$, so their compositions as affine relations are different. The interpretation of the doubled cozero as the quantum discard map is not sound with respect to relational composition.   This is closely related to the discrete Wigner function of Gross which we will comment further on in Remark <ref>.

This formalizes the relationship between mixed stabilizer circuits and stabilizer tableaux with not-necessarily-full rank in  a compositional way.  It is standard, and indeed very useful to interpret a stabilizer state in terms of its stabilizer tableau:  which is an augmented  basis $L+a$ of an affine isotropic subspace.  In order to compose these tableaux, one must take the symplectic complement of the linear component of both spaces, and then compute  their relational composition as affine coisotropic relations.  Then the stabilizer tableau for this composite is obtained by taking the symplectic complement on the linear component once again.

Absolutely remarkably, and seemingly out of nowhere, the Weyl-free mixed odd prime dimensional stabilizer circuits modulo invertible scalars can be expressed in terms of an iterated $\CPM$ construction with respect to the orthogonal complement at the inner level, and the complex conjugation at the outer level:

Given a prime $p$ and $k=\F_p$ or $k=\mathbb{Q}$:

$$\Isot\Rel_{k}\cong\Co\Isot\Rel_{k}\cong \CPM(\CPM(\LinRel_{k},(-)^\perp),\bar{(-)})$$

The astounding symmetry involved here begs the question if iterating the $\CPM$ construction more times yields anything physically interesting. Perhaps the work of [18] can shed some light on this question.

In order to add measurement and state preparation in the symplectic setting we inspect the structure of the $Z$ and $X$ projectors in the symplectic setting:

The $Z$ and $X$ projectors are defined as follows in $\Aff\Co\Isot\Rel_{k}$:

\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=X] (0) at (0.5, -0.75) {};
\node [style=none] (2) at (0.25, 0) {};
\node [style=none] (4) at (1.25, 0.5) {};
\node [style=Z] (5) at (0.75, 0) {};
\node [style=Z] (6) at (1.75, 0) {};
\node [style=Z] (7) at (1.5, -0.75) {};
\node [style=none] (8) at (0.75, 0) {};
\node [style=none] (9) at (1.25, 0) {};
\node [style=none] (10) at (1.75, 0) {};
\node [style=none] (11) at (0.5, -1.5) {};
\node [style=none] (13) at (1.5, -1.5) {};
\node [style=none] (14) at (0.25, 0.5) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw [in=-90, out=120] (7) to (9.center);
\draw (7) to (13.center);
\draw [in=60, out=-90] (10.center) to (7);
\draw [in=60, out=-90] (8.center) to (0);
\draw [in=-90, out=120] (0) to (2.center);
\draw (0) to (11.center);
\draw (9.center) to (4.center);
\draw (2.center) to (14.center);
\end{pgfonlayer}
\end{tikzpicture}
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (4) at (1, 0.5) {};
\node [style=Z] (5) at (0.25, 0) {};
\node [style=none] (9) at (1, -1.25) {};
\node [style=none] (11) at (0.25, -1.25) {};
\node [style=none] (14) at (0.25, 0.5) {};
\node [style=Z] (15) at (0.25, -0.75) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (9.center) to (4.center);
\draw (14.center) to (5);
\draw (11.center) to (15);
\end{pgfonlayer}
\end{tikzpicture}
\hspace*{.5cm}
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=Z] (0) at (0.5, -0.75) {};
\node [style=none] (2) at (0.25, 0) {};
\node [style=none] (4) at (1.25, 0.5) {};
\node [style=Z] (5) at (0.75, 0) {};
\node [style=Z] (6) at (1.75, 0) {};
\node [style=X] (7) at (1.5, -0.75) {};
\node [style=none] (8) at (0.75, 0) {};
\node [style=none] (9) at (1.25, 0) {};
\node [style=none] (10) at (1.75, 0) {};
\node [style=none] (11) at (0.5, -1.5) {};
\node [style=none] (13) at (1.5, -1.5) {};
\node [style=none] (14) at (0.25, 0.5) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw [in=-90, out=120] (7) to (9.center);
\draw (7) to (13.center);
\draw [in=60, out=-90] (10.center) to (7);
\draw [in=60, out=-90] (8.center) to (0);
\draw [in=-90, out=120] (0) to (2.center);
\draw (0) to (11.center);
\draw (9.center) to (4.center);
\draw (2.center) to (14.center);
\end{pgfonlayer}
\end{tikzpicture}
\begin{tikzpicture}[scale=-1]
\begin{pgfonlayer}{nodelayer}
\node [style=none] (4) at (1, 0.5) {};
\node [style=Z] (5) at (0.25, 0) {};
\node [style=none] (9) at (1, -1.25) {};
\node [style=none] (11) at (0.25, -1.25) {};
\node [style=none] (14) at (0.25, 0.5) {};
\node [style=Z] (15) at (0.25, -0.75) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (9.center) to (4.center);
\draw (14.center) to (5);
\draw (11.center) to (15);
\end{pgfonlayer}
\end{tikzpicture}

The $Z$ projector discards and then codiscards the $Z$-gradient: cutting the $Z$ gradient in two so that no information is preserved, while acting trivially on the $X$ gradient.  Dually for the $X$ projector.  Concretely, these are interpreted as the following relations:

\left\llbracket\
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (4) at (1, 0.5) {};
\node [style=Z] (5) at (0.25, 0) {};
\node [style=none] (9) at (1, -1.25) {};
\node [style=none] (11) at (0.25, -1.25) {};
\node [style=none] (14) at (0.25, 0.5) {};
\node [style=Z] (15) at (0.25, -0.75) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (9.center) to (4.center);
\draw (14.center) to (5);
\draw (11.center) to (15);
\end{pgfonlayer}
\end{tikzpicture}
\ \right\rrbracket
\left\{
\left(
\begin{bmatrix}
\end{bmatrix},
\begin{bmatrix}
\end{bmatrix}\right)
\in k^{2+2} \ | \
\forall z,z',x \in k
\right\}

\left\llbracket\
\begin{tikzpicture}[xscale=-1]
\begin{pgfonlayer}{nodelayer}
\node [style=none] (4) at (1, 0.5) {};
\node [style=Z] (5) at (0.25, 0) {};
\node [style=none] (9) at (1, -1.25) {};
\node [style=none] (11) at (0.25, -1.25) {};
\node [style=none] (14) at (0.25, 0.5) {};
\node [style=Z] (15) at (0.25, -0.75) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (9.center) to (4.center);
\draw (14.center) to (5);
\draw (11.center) to (15);
\end{pgfonlayer}
\end{tikzpicture}
\ \right\rrbracket
\left\{
\left(
\begin{bmatrix}
\end{bmatrix},
\begin{bmatrix}
\end{bmatrix}\right)
\in k^{2+2} \ | \
\forall z,x,z' \in k
\right\}

We split either of these projectors, following [29] to add classical types:

Let $\Aff\Co\Isot\Rel_k^M$ denote the two-coloured prop generated by splitting  $p_Z$ in $\Aff\Co\Isot\Rel_k$.

Concretely $\Aff\Co\Isot\Rel_k^M$  has:

Objects:  pairs $(n, e)$ where $n \in \N$ and $e:n\to n$ is a finite tensor product of $1$ and $p_Z$.

Maps: $(n,e) \to (m, g)$ are maps $f:n\to m$  in  $\Aff\Co\Isot\Rel_k$ such that $gfe=f$.

The object $Q=(1,1_1)$ is interpreted as a quantum channel and the object $C=(1,p_Z)$ as a classical channel.

We could have instead split $p_X$, or split both $p_X$ and $p_Z$; however, all three of these multicoloured props are equivalent.  This equivalence is witnessed via the Fourier transform. Indeed this suffices to split all nonzero projectors up to isomorphism because all projectors of the same dimension are affine symplectomorphic.
It is important to remark that the choice of projectors which are split effects the code-distance, because code-distance is basis dependent, and not invariant under equivalence.

This category has a succinct presentation;  adding the affine relations to  $\Aff\Co\Isot\Rel_k$ obtained by cutting/splitting the $Z$ projector in two:

The full subcategory of $\Aff\Co\Isot\Rel_k^M$ generated by tensor powers of $C$ is isomorphic to $\Aff\Rel_k$.
Therefore $\Aff\Co\Isot\Rel_k^M$ is isomorphic to adding the following linear relations to the image of $\Aff\Co\Isot\Rel_k^M\to \Aff\Co\Isot\Rel_k$ in the way which makes this into a two-coloured prop:

\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (0) at (24.75, 0.5) {};
\node [style=Z] (1) at (24, 0) {};
\node [style=none] (2) at (24.75, 0) {};
\node [style=none] (3) at (24, 0.5) {};
\node [style=none] (4) at (24.75, -1) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (2.center) to (0.center);
\draw (3.center) to (1);
\draw [style=classicalwire] (4.center) to (2.center);
\end{pgfonlayer}
\end{tikzpicture}
\hspace*{.5cm}\text{and}\hspace*{.5cm}
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (0) at (24.75, -1) {};
\node [style=Z] (1) at (24, -0.5) {};
\node [style=none] (2) at (24.75, -0.5) {};
\node [style=none] (3) at (24, -1) {};
\node [style=none] (4) at (24.75, 0.5) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (2.center) to (0.center);
\draw (3.center) to (1);
\draw [style=classicalwire] (4.center) to (2.center);
\end{pgfonlayer}
\end{tikzpicture}

These correspond to the state preparation and measurement processes in the $Z$ basis.
We draw the wire associated to $C$ as a coil to indicate the type (although this is just syntactic sugar).
In the quantum setting, the classical state “lives” on a single wire and the stabilizer state “lives” on the doubled wires.  The two coloured notation is more evident when we use the following:

There is a graphical calculus for two-sorted prop of classical and quantum types following [12].  Although, here it works for arbitrary field $k$.
The classical wires are drawn thin and the quantum wires are drawn thick.  The thin bordered string diagrams are generated by affine relations.  Moreover, the pure affine Lagrangian relations are drawn with a thick border, so that:

\left\llbracket\
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (0) at (21, 5) {};
\node [style=none] (1) at (22, 5) {};
\node [style=none] (2) at (21, 2.5) {};
\node [style=none] (3) at (22, 2.5) {};
\node [style=Zthick] (4) at (21.5, 3.75) {$a,b$};
\node [style=none] (5) at (21.5, 4.5) {$\cdots$};
\node [style=none] (6) at (21.5, 3) {$\cdots$};
\node [style=none] (7) at (21.5, 4.75) {};
\node [style=none] (8) at (21.5, 2.75) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw [thick, in=150, out=-90, looseness=0.75] (0.center) to (4);
\draw [thick, in=90, out=-150, looseness=0.75] (4) to (2.center);
\draw [thick, in=-30, out=90, looseness=0.75] (3.center) to (4);
\draw [thick, in=-90, out=30, looseness=0.75] (4) to (1.center);
\end{pgfonlayer}
\end{tikzpicture}
\ \right\rrbracket
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (78) at (402.5, 0.75) {};
\node [style=none] (79) at (402.5, -2.75) {};
\node [style=Z] (80) at (402.1, -1.75) {};
\node [style=none] (81) at (402.145, 0.65) {$\cdots$};
\node [style=none] (82) at (402.125, -2.65) {$\cdots$};
\node [style=none] (83) at (400.75, 0.75) {};
\node [style=none] (84) at (400, -2.75) {};
\node [style=X] (85) at (400.425, -0.25) {$a$};
\node [style=none] (86) at (400.375, 0.65) {$\cdots$};
\node [style=none] (87) at (400.395, -2.625) {$\cdots$};
\node [style=none] (88) at (400.75, -2.75) {};
\node [style=none] (89) at (401.75, -2.75) {};
\node [style=none] (90) at (400, 0.75) {};
\node [style=none] (91) at (401.75, 0.75) {};
\node [style=scalar] (92) at (401.25, -1) {$b$};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw [in=-45, out=90] (79.center) to (80);
\draw [in=-90, out=60, looseness=0.75] (80) to (78.center);
\draw [in=90, out=-120, looseness=0.75] (85) to (84.center);
\draw [in=-90, out=45] (85) to (83.center);
\draw [in=-60, out=90, looseness=0.75] (88.center) to (85);
\draw [in=-135, out=90] (89.center) to (80);
\draw [in=-90, out=150] (85) to (90.center);
\draw [in=270, out=120, looseness=0.75] (80) to (91.center);
\draw [in=-75, out=150] (80) to (92);
\draw [in=330, out=90] (92) to (85);
\end{pgfonlayer}
\end{tikzpicture},
\hspace*{.2cm}
\left\llbracket \
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (0) at (21, 5) {};
\node [style=none] (1) at (22, 5) {};
\node [style=none] (2) at (21, 2.5) {};
\node [style=none] (3) at (22, 2.5) {};
\node [style=Xthick] (4) at (21.5, 3.75) {$a,b$};
\node [style=none] (5) at (21.5, 4.5) {$\cdots$};
\node [style=none] (6) at (21.5, 3) {$\cdots$};
\node [style=none] (7) at (21.5, 4.75) {};
\node [style=none] (8) at (21.5, 2.75) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw [thick,in=150, out=-90, looseness=0.75] (0.center) to (4);
\draw [thick,in=90, out=-150, looseness=0.75] (4) to (2.center);
\draw [thick, in=-30, out=90, looseness=0.75] (3.center) to (4);
\draw [thick, in=-90, out=30, looseness=0.75] (4) to (1.center);
\end{pgfonlayer}
\end{tikzpicture}
\ \right\rrbracket
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (93) at (403.5, 0.75) {};
\node [style=none] (94) at (403.5, -2.75) {};
\node [style=Z] (95) at (403.9, -1.75) {};
\node [style=none] (96) at (403.88, 0.65) {$\cdots$};
\node [style=none] (97) at (403.85, -2.65) {$\cdots$};
\node [style=none] (98) at (405.25, 0.75) {};
\node [style=none] (99) at (406, -2.75) {};
\node [style=X] (100) at (405.575, -0.25) {$a$};
\node [style=none] (101) at (405.625, 0.65) {$\cdots$};
\node [style=none] (102) at (405.605, -2.625) {$\cdots$};
\node [style=none] (103) at (405.25, -2.75) {};
\node [style=none] (104) at (404.25, -2.75) {};
\node [style=none] (105) at (406, 0.75) {};
\node [style=none] (106) at (404.25, 0.75) {};
\node [style=scalar] (107) at (404.75, -1) {$b$};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw [in=-135, out=90] (94.center) to (95);
\draw [in=-90, out=120, looseness=0.75] (95) to (93.center);
\draw [in=90, out=-60, looseness=0.75] (100) to (99.center);
\draw [in=-90, out=135] (100) to (98.center);
\draw [in=-120, out=90, looseness=0.75] (103.center) to (100);
\draw [in=-45, out=90] (104.center) to (95);
\draw [in=-90, out=30] (100) to (105.center);
\draw [in=-90, out=60, looseness=0.75] (95) to (106.center);
\draw [in=-105, out=30] (95) to (107);
\draw [in=-150, out=90] (107) to (100);
\end{pgfonlayer}
\end{tikzpicture}
\hspace*{.2cm}
\left\llbracket \
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (0) at (23, 4.5) {};
\node [style=none] (1) at (23, 3) {};
\node [style=scalar, thick] (2) at (23, 3.75) {$a$};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw [thick] (1.center) to (2);
\draw [thick] (2) to (0.center);
\end{pgfonlayer}
\end{tikzpicture}
\ \right\rrbracket
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (3) at (24.25, 4.5) {};
\node [style=none] (4) at (24.25, 3) {};
\node [style=scalarop] (5) at (24.25, 3.75) {$a$};
\node [style=none] (6) at (25, 4.5) {};
\node [style=none] (7) at (25, 3) {};
\node [style=scalar] (8) at (25, 3.75) {$a$};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (4.center) to (5);
\draw (5) to (3.center);
\draw (7.center) to (8);
\draw (8) to (6.center);
\end{pgfonlayer}
\end{tikzpicture}

The state preparation and measurement are drawn as thin spiders interfacing between the quantum and classical systems:

\left\llbracket \
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=Z] (0) at (28, -4) {};
\node [style=none] (1) at (28, -5) {};
\node [style=none] (2) at (28, -3) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (1.center) to (0);
\draw[thick]  (0) to (2.center);
\end{pgfonlayer}
\end{tikzpicture}
\
\right\rrbracket
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (0) at (24.75, 0.5) {};
\node [style=Z] (1) at (24, 0) {};
\node [style=none] (2) at (24.75, 0) {};
\node [style=none] (3) at (24, 0.5) {};
\node [style=none] (4) at (24.75, -1) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (2.center) to (0.center);
\draw (3.center) to (1);
\draw [style=classicalwire] (4.center) to (2.center);
\end{pgfonlayer}
\end{tikzpicture}\ , \hspace*{.5cm}
\left\llbracket \
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=Z] (0) at (28, -4) {};
\node [style=none] (1) at (28, -5) {};
\node [style=none] (2) at (28, -3) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw[thick]  (1.center) to (0);
\draw (0) to (2.center);
\end{pgfonlayer}
\end{tikzpicture}
\
\right\rrbracket
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (0) at (24.75, -1) {};
\node [style=Z] (1) at (24, -0.5) {};
\node [style=none] (2) at (24.75, -0.5) {};
\node [style=none] (3) at (24, -1) {};
\node [style=none] (4) at (24.75, 0.5) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (2.center) to (0.center);
\draw (3.center) to (1);
\draw [style=classicalwire] (4.center) to (2.center);
\end{pgfonlayer}
\end{tikzpicture}
\ , \hspace*{.5cm}
\left\llbracket \
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=X] (0) at (28, -4) {};
\node [style=none] (1) at (28, -5) {};
\node [style=none] (2) at (28, -3) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (1.center) to (0);
\draw[thick]  (0) to (2.center);
\end{pgfonlayer}
\end{tikzpicture}
\
\right\rrbracket
\begin{tikzpicture}[xscale=-1]
\begin{pgfonlayer}{nodelayer}
\node [style=none] (0) at (24.75, 0.5) {};
\node [style=Z] (1) at (24, 0) {};
\node [style=none] (2) at (24.75, 0) {};
\node [style=none] (3) at (24, 0.5) {};
\node [style=none] (4) at (24.75, -1) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (2.center) to (0.center);
\draw (3.center) to (1);
\draw [style=classicalwire] (4.center) to (2.center);
\end{pgfonlayer}
\end{tikzpicture}\ , \hspace*{.5cm}
\left\llbracket \
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=X] (0) at (28, -4) {};
\node [style=none] (1) at (28, -5) {};
\node [style=none] (2) at (28, -3) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw[thick]  (1.center) to (0);
\draw (0) to (2.center);
\end{pgfonlayer}
\end{tikzpicture}
\
\right\rrbracket
\begin{tikzpicture}[xscale=-1]
\begin{pgfonlayer}{nodelayer}
\node [style=none] (0) at (24.75, -1) {};
\node [style=Z] (1) at (24, -0.5) {};
\node [style=none] (2) at (24.75, -0.5) {};
\node [style=none] (3) at (24, -1) {};
\node [style=none] (4) at (24.75, 0.5) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (2.center) to (0.center);
\draw (3.center) to (1);
\draw [style=classicalwire] (4.center) to (2.center);
\end{pgfonlayer}
\end{tikzpicture}

For example, preparing the state $|x\rangle$ corresponds to the following manipulation:

\left\llbracket \
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=Z] (0) at (28, -4) {};
\node [style=none] (1) at (28, -5) {};
\node [style=none] (2) at (28, -3) {};
\node [style=X] (3) at (28, -5) {$x$};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (1.center) to (0);
\draw [thick] (0) to (2.center);
\end{pgfonlayer}
\end{tikzpicture}
\
\right\rrbracket
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (0) at (1.25, 0.75) {};
\node [style=Z] (1) at (0.5, 0) {};
\node [style=none] (2) at (0.5, 0.75) {};
\node [style=X] (3) at (1.25, -1.25) {$x$};
\node [style=none] (4) at (1.25, 0) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (2.center) to (1);
\draw [style=classicalwire] (3) to (4.center);
\draw (4.center) to (0.center);
\end{pgfonlayer}
\end{tikzpicture}
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (0) at (1.25, 0.5) {};
\node [style=Z] (1) at (0.5, 0) {};
\node [style=none] (2) at (1.25, 0) {};
\node [style=none] (3) at (0.5, 0.5) {};
\node [style=X] (4) at (1.25, 0) {$x$};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (2.center) to (0.center);
\draw (3.center) to (1);
\end{pgfonlayer}
\end{tikzpicture}
\left\llbracket \
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (6) at (29, -3) {};
\node [style=Xthick] (7) at (29, -4) {$x,0$};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw[thick] (7) to (6.center);
\end{pgfonlayer}
\end{tikzpicture}\
\right\rrbracket

The state preparation and discarding in the $X$-basis are obtained by composition of these morphisms with the Fourier transform; yielding morphisms which discard the $X$ wire instead of the $Z$ wire:

\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=Z] (12) at (31, -5) {};
\node [style=none] (13) at (31, -6) {};
\node [style=none] (14) at (31, -3) {};
\node [style=map,thick] (15) at (31, -4) {$\mathcal{F}$};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (13.center) to (12);
\draw [thick] (12) to (14.center);
\end{pgfonlayer}
\end{tikzpicture}
\begin{tikzpicture}[yscale=-1]
\begin{pgfonlayer}{nodelayer}
\node [style=X] (8) at (30, -4) {};
\node [style=none] (9) at (30, -3) {};
\node [style=none] (10) at (30, -5) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (9.center) to (8);
\draw [thick] (8) to (10.center);
\end{pgfonlayer}
\end{tikzpicture}
\ ,
\hspace*{.8cm}
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=Z] (8) at (30, -4) {};
\node [style=none] (9) at (30, -3) {};
\node [style=none] (10) at (30, -6) {};
\node [style=map, thick] (11) at (30, -5) {$\mathcal{F}^\dag$};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (9.center) to (8);
\draw [thick] (8) to (10.center);
\end{pgfonlayer}
\end{tikzpicture}
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=X] (8) at (30, -4) {};
\node [style=none] (9) at (30, -3) {};
\node [style=none] (10) at (30, -5) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (9.center) to (8);
\draw [thick] (8) to (10.center);
\end{pgfonlayer}
\end{tikzpicture}

The conjugation of pure spiders by state preparation and measurement maps creates bastard spiders following [12].  Bastard spiders are drawn with a thin border; for example:

\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (0) at (3.75, -0.5) {};
\node [style=none] (1) at (2.75, -0.5) {};
\node [style=none] (3) at (2.75, -2) {};
\node [style=none] (4) at (3.5, -1.25) {};
\node [style=none] (5) at (4.25, -0.5) {};
\node [style=none] (7) at (3.25, -2) {};
\node [style=Z] (8) at (3.5, -1.25) {};
\node [style=none] (9) at (4.25, -2) {};
\node [style=none] (10) at (3.25, -0.5) {};
\node [style=none] (11) at (3.75, -2) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw [thick,in=-150, out=90] (3.center) to (4.center);
\draw [thick,in=-90, out=56] (4.center) to (0.center);
\draw [thick,in=150, out=-90] (1.center) to (4.center);
\draw [thick,in=-124, out=90] (7.center) to (8);
\draw [thick,in=90, out=-30] (8) to (9.center);
\draw [thick,in=-90, out=30] (8) to (5.center);
\draw [in=-90, out=120] (8) to (10.center);
\draw [in=-60, out=90] (11.center) to (8);
\end{pgfonlayer}
\end{tikzpicture}
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (0) at (3.75, -0.5) {};
\node [style=none] (1) at (2.75, -0.5) {};
\node [style=none] (3) at (2.75, -2) {};
\node [style=none] (4) at (3.5, -1.25) {};
\node [style=none] (5) at (4.25, -0.5) {};
\node [style=none] (7) at (3.25, -2) {};
\node [style=Zthick] (8) at (3.5, -1.25) {};
\node [style=none] (9) at (4.25, -2) {};
\node [style=Z] (10) at (3.75, -2) {};
\node [style=Z] (11) at (3.25, -0.5) {};
\node [style=none] (12) at (3.25, 0) {};
\node [style=none] (13) at (2.75, 0) {};
\node [style=none] (14) at (3.75, 0) {};
\node [style=none] (15) at (4.25, 0) {};
\node [style=none] (16) at (2.75, -2.5) {};
\node [style=none] (17) at (3.25, -2.5) {};
\node [style=none] (18) at (3.75, -2.5) {};
\node [style=none] (19) at (4.25, -2.5) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw [thick,in=-150, out=90] (3.center) to (4.center);
\draw [thick,in=-90, out=56] (4.center) to (0.center);
\draw [thick,in=150, out=-90] (1.center) to (4.center);
\draw [thick] (17.center) to (7.center);
\draw [thick,in=-124, out=90] (7.center) to (8);
\draw [thick,in=90, out=-30] (8) to (9.center);
\draw [thick,in=-90, out=30] (8) to (5.center);
\draw [thick] (1.center) to (13.center);
\draw [thick] (0.center) to (14.center);
\draw [thick] [in=120, out=-90] (11) to (8);
\draw [thick] [in=300, out=90] (10) to (8);
\draw [thick] (16.center) to (3.center);
\draw [thick] (19.center) to (9.center);
\draw [thick] (5.center) to (15.center);
\draw  (18.center) to (10);
\draw  (11) to (12.center);
\end{pgfonlayer}
\end{tikzpicture}
\ , \hspace*{.5cm}
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (0) at (3.75, -0.5) {};
\node [style=none] (1) at (2.75, -0.5) {};
\node [style=none] (3) at (2.75, -2) {};
\node [style=none] (4) at (3.5, -1.25) {};
\node [style=none] (5) at (4.25, -0.5) {};
\node [style=none] (7) at (3.25, -2) {};
\node [style=X] (8) at (3.5, -1.25) {};
\node [style=none] (9) at (4.25, -2) {};
\node [style=none] (10) at (3.25, -0.5) {};
\node [style=none] (11) at (3.75, -2) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw [thick,in=-150, out=90] (3.center) to (4.center);
\draw [thick,in=-90, out=56] (4.center) to (0.center);
\draw [thick,in=150, out=-90] (1.center) to (4.center);
\draw [thick,in=-124, out=90] (7.center) to (8);
\draw [thick,in=90, out=-30] (8) to (9.center);
\draw [thick,in=-90, out=30] (8) to (5.center);
\draw [in=-90, out=120] (8) to (10.center);
\draw [in=-60, out=90] (11.center) to (8);
\end{pgfonlayer}
\end{tikzpicture}
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (0) at (3.75, -0.5) {};
\node [style=none] (1) at (2.75, -0.5) {};
\node [style=none] (3) at (2.75, -2) {};
\node [style=none] (4) at (3.5, -1.25) {};
\node [style=none] (5) at (4.25, -0.5) {};
\node [style=none] (7) at (3.25, -2) {};
\node [style=Xthick] (8) at (3.5, -1.25) {};
\node [style=none] (9) at (4.25, -2) {};
\node [style=X] (10) at (3.75, -2) {};
\node [style=X] (11) at (3.25, -0.5) {};
\node [style=none] (12) at (3.25, 0) {};
\node [style=none] (13) at (2.75, 0) {};
\node [style=none] (14) at (3.75, 0) {};
\node [style=none] (15) at (4.25, 0) {};
\node [style=none] (16) at (2.75, -2.5) {};
\node [style=none] (17) at (3.25, -2.5) {};
\node [style=none] (18) at (3.75, -2.5) {};
\node [style=none] (19) at (4.25, -2.5) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw [thick,in=-150, out=90] (3.center) to (4.center);
\draw [thick,in=-90, out=56] (4.center) to (0.center);
\draw [thick,in=150, out=-90] (1.center) to (4.center);
\draw [thick] (17.center) to (7.center);
\draw [thick,in=-124, out=90] (7.center) to (8);
\draw [thick,in=90, out=-30] (8) to (9.center);
\draw [thick,in=-90, out=30] (8) to (5.center);
\draw [thick] (1.center) to (13.center);
\draw [thick] (0.center) to (14.center);
\draw [thick] [in=120, out=-90] (11) to (8);
\draw [thick] [in=300, out=90] (10) to (8);
\draw [thick] (16.center) to (3.center);
\draw [thick] (19.center) to (9.center);
\draw [thick] (5.center) to (15.center);
\draw  (18.center) to (10);
\draw  (11) to (12.center);
\end{pgfonlayer}
\end{tikzpicture}

For example, the thin border on the white spider indicates that the state has been measured in the $Z$-basis and is a stochastic mixture of the $Z$-basis elements.
When a pure spider is connected to a bastard spider they both fuse into a bastard spider where the linear phase is discarded:

\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (0) at (20.25, -0.5) {};
\node [style=none] (1) at (19.25, -0.5) {};
\node [style=none] (2) at (19.75, -0.5) {$\cdots$};
\node [style=none] (3) at (19.25, -2.75) {};
\node [style=Z] (4) at (19.75, -1.25) {};
\node [style=none] (5) at (20.75, -0.5) {};
\node [style=none] (6) at (20.25, -2.75) {$\cdots$};
\node [style=none] (7) at (19.75, -2.75) {};
\node [style=Zthick] (8) at (20.25, -2) {$b,c$};
\node [style=none] (9) at (20.75, -2.75) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw [thick,in=-135, out=90] (3.center) to (4);
\draw [thick,in=-90, out=56] (4) to (0.center);
\draw [thick,in=124, out=-90] (1.center) to (4);
\draw [thick,in=-124, out=90] (7.center) to (8);
\draw [thick,in=90, out=-56] (8) to (9.center);
\draw [thick, in=-90, out=45] (8) to (5.center);
\draw [thick] (8) to (4);
\end{pgfonlayer}
\end{tikzpicture}
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (11) at (4, -0.5) {};
\node [style=none] (12) at (3, -0.5) {};
\node [style=none] (13) at (3.5, -0.5) {$\cdots$};
\node [style=none] (14) at (2.5, -2) {};
\node [style=none] (16) at (4.5, -0.5) {};
\node [style=none] (17) at (3.5, -2) {$\cdots$};
\node [style=none] (18) at (3, -2) {};
\node [style=Z] (19) at (3.5, -1.25) {};
\node [style=none] (20) at (4, -2) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw [thick,in=-150, out=90] (14.center) to (19.center);
\draw [thick,in=-90, out=56] (19.center) to (11.center);
\draw [thick,in=124, out=-90] (12.center) to (19.center);
\draw [thick,in=-124, out=90] (18.center) to (19.center);
\draw [thick,in=90, out=-56] (19.center) to (20.center);
\draw [thick, in=-90, out=30] (19.center) to (16.center);
\end{pgfonlayer}
\end{tikzpicture}

The discarding map is given by a bastard spider with one input and no outputs:

\left\llbracket\
\begin{tikzpicture}[yscale=-1]
\begin{pgfonlayer}{nodelayer}
\node [style=none] (0) at (0.25, 0) {};
\node [style=Z] (1) at (0.25, -1) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw[thick] (1) to (0.center);
\end{pgfonlayer}
\end{tikzpicture}
\ \right\rrbracket
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=Z] (2) at (4, 0) {};
\node [style=Z] (3) at (4.5, 0) {};
\node [style=none] (4) at (4, -1) {};
\node [style=none] (5) at (4.5, -1) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (4.center) to (2);
\draw (3) to (5.center);
\end{pgfonlayer}
\end{tikzpicture}
\left\llbracket\
\begin{tikzpicture}[yscale=-1]
\begin{pgfonlayer}{nodelayer}
\node [style=none] (0) at (0.25, 0) {};
\node [ground] (1) at (0.25, -0.5) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (1) to (0.center);
\end{pgfonlayer}
\end{tikzpicture}
\ \right\rrbracket

Notice that this way of describing the discard map is independent of the choice of orthonormal basis, so that:

\left\llbracket\
\begin{tikzpicture}[yscale=-1]
\begin{pgfonlayer}{nodelayer}
\node [style=none] (0) at (0.25, 0) {};
\node [style=Z] (1) at (0.25, -1) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw[thick] (1) to (0.center);
\end{pgfonlayer}
\end{tikzpicture}
\ \right\rrbracket
\left\llbracket\
\begin{tikzpicture}[yscale=-1]
\begin{pgfonlayer}{nodelayer}
\node [style=none] (0) at (0.25, 0) {};
\node [ground] (1) at (0.25, -0.5) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (1) to (0.center);
\end{pgfonlayer}
\end{tikzpicture}
\ \right\rrbracket
\left\llbracket\
\begin{tikzpicture}[yscale=-1]
\begin{pgfonlayer}{nodelayer}
\node [style=none] (0) at (0.25, 0) {};
\node [style=X] (1) at (0.25, -1) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw[thick] (1) to (0.center);
\end{pgfonlayer}
\end{tikzpicture}
\ \right\rrbracket

Compare this relational semantics of measurement to the discrete Wigner function of Gross [21]; which is the  discrete version of the Wigner's quasi-probabilty distribution [36].  Gross shows that on odd prime dimensional stabilizer states, this is a probability distribution given by the indicator function of an affine Lagrangian subspace  <cit.> (actually it works just as well for stabilizer codes/affine coistropic subspaces):

P_{G(L+a)}:\F_p^{2n}\to [0,1);\ (z,x)\mapsto
1/|L| \cdot \delta_{L+a}(z,x)
\begin{cases}
1/|L| & \text{ if } (z,x) \in L+a\\
0 & \text{ otherwise}
\end{cases}

This probability distribution is uniform so that every outcome is equally likely.  For example, the measurement of a stabilizer state $G(L+a)$ in the $Z$ basis produces outcome $|x\rangle$ with probability:

\sum_{z\in \F_p} P_{G(L+a)}(z,x)

Moreover, this marginalization over $z$ acts backwards on the state; so that in accordance with Spekkens toy model, the observer gains at most one pit of information by sampling $x$, but injects at most one pit of uncertainty back into the ontic state.

In the conventional, functional approaches to measurement of stabilizer states/states in Spekkens' toy model, for example [11], they construct “measurement update rules” to compute this back action on the state.  This is essentially the same kind of procedure performed to compute the effect of  measuring a qubit stabilizer states [1].  However, in the relational paradigm, the measurement outcome, the measurement update, the state preparation and the unitary evolution of the quantum state are all computed in the same way: by taking the relational composition.

We have a simple topological proof of the following well-known result:

Preparing a state in the $Z$ basis and measureing in the $X$ basis preserves no information:

\left\llbracket\
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=Z] (12) at (31, -5) {};
\node [style=none] (13) at (31, -6) {};
\node [style=none] (14) at (31, -3) {};
\node [style=X] (15) at (31, -4) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (13.center) to (12);
\draw (15) to (14.center);
\draw [thick] (12) to (15);
\end{pgfonlayer}
\end{tikzpicture}
\
\right\rrbracket
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=Z] (4) at (60, 5.5) {};
\node [style=none] (5) at (60, 6.25) {};
\node [style=Z] (6) at (60.5, 6.25) {};
\node [style=none] (7) at (60.5, 5.5) {};
\node [style=none] (8) at (60, 7.5) {};
\node [style=none] (9) at (60.5, 4.5) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (5.center) to (4);
\draw (7.center) to (6);
\draw [style=classicalwire] (5.center) to (8.center);
\draw [style=classicalwire] (9.center) to (7.center);
\end{pgfonlayer}
\end{tikzpicture}
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=Z] (0) at (59, 6.25) {};
\node [style=none] (1) at (59, 7.5) {};
\node [style=Z] (2) at (59, 5.75) {};
\node [style=none] (3) at (59, 4.5) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw [style=classicalwire] (1.center) to (0);
\draw [style=classicalwire] (3.center) to (2);
\end{pgfonlayer}
\end{tikzpicture}
\left\llbracket\
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=Z] (0) at (31, -5) {};
\node [style=none] (1) at (31, -6) {};
\node [style=none] (2) at (31, -3) {};
\node [style=X] (3) at (31, -4) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (1.center) to (0);
\draw (3) to (2.center);
\end{pgfonlayer}
\end{tikzpicture}
\
\right\rrbracket

For this reason, we can prove the correctness of the prime dimensional quantum teleportation algorithm discussed previously using only spider fusion:

Given any prime $p$, the following equations of string diagrams in $\Aff\Co\Isot\Rel_{\F_p}^M$ proves the correctness of the quantum teleportation protocol where Alice on the left teleports a qudit to Bob, on the right. They share a Bell state  (on the bottom of the diagram)  and two classical dits (drawn as coiled wires).

\begin{align*}
\left\llbracket\
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (20) at (380.75, 9.5) {};
\node [style=none] (21) at (382.25, 3.5) {};
\node [style=none] (22) at (380, 9.5) {Alice};
\node [style=none] (23) at (381.75, 9.5) {Bob};
\node [style=none] (24) at (379.5, 5.75) {};
\node [style=none] (25) at (383.75, 5.75) {};
\node [style=none] (26) at (379.5, 7.5) {};
\node [style=none] (27) at (383.75, 7.5) {};
\node [style=none] (28) at (378.25, 7.5) {Phase correction};
\node [style=none] (29) at (378.25, 5.75) {Measurement};
\node [style=Xthick] (30) at (380.5, 4.5) {};
\node [style=Zthick] (31) at (381.25, 5) {};
\node [style=X] (32) at (381.25, 5.75) {};
\node [style=Z] (33) at (380.5, 5.75) {};
\node [style=none] (34) at (380.5, 3.5) {};
\node [style=Zthick] (35) at (382.25, 4.25) {};
\node [style=none] (36) at (383, 5) {};
\node [style=none] (37) at (383, 9.5) {};
\node [style=Zthick] (38) at (383, 8.25) {};
\node [style=Xthick] (39) at (383, 9) {};
\node [style=X] (40) at (382.25, 7.5) {};
\node [style=Z] (41) at (381.5, 7.5) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw [style=dotted, in=-90, out=90, looseness=1.25] (21.center) to (20.center);
\draw [style=dotted] (25.center) to (24.center);
\draw [style=dotted] (27.center) to (26.center);
\draw [style=thick] (34.center) to (30);
\draw [style=thick] (30) to (31);
\draw [style=thick] (30) to (33);
\draw [style=thick] (31) to (32);
\draw [style=thick, in=-45, out=165] (35) to (31);
\draw [style=thick] (37.center) to (39);
\draw [style=thick] (39) to (38);
\draw [style=thick] (38) to (36.center);
\draw [style=thick, in=15, out=-90, looseness=0.75] (36.center) to (35);
\draw [style=thick, in=-165, out=90, looseness=0.75] (40) to (38);
\draw [style=thick, in=90, out=-165, looseness=0.75] (39) to (41);
\draw [in=-105, out=90] (32) to (40);
\draw [in=90, out=-105] (41) to (33);
\end{pgfonlayer}
\end{tikzpicture}
\ \right\rrbracket
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (0) at (366.75, 1.75) {};
\node [style=none] (1) at (367.25, 3.25) {};
\node [style=none] (2) at (366.25, 3.25) {};
\node [style=none] (3) at (365.75, 1.75) {};
\node [style=Z] (4) at (367.25, 4.75) {};
\node [style=Z] (5) at (365.75, 4.75) {};
\node [style=none] (6) at (369.5, 3.75) {};
\node [style=none] (7) at (370.25, 3.75) {};
\node [style=none] (8) at (369.5, 9) {};
\node [style=none] (9) at (370.25, 9) {};
\node [style=Z] (10) at (365.75, 3.25) {};
\node [style=X] (11) at (366.25, 3.75) {};
\node [style=Z] (12) at (367.25, 3.75) {};
\node [style=X] (13) at (366.75, 3.25) {};
\node [style=none] (14) at (366.25, 4.75) {};
\node [style=none] (15) at (366.75, 4.75) {};
\node [style=X] (16) at (367.5, 2.25) {};
\node [style=Z] (17) at (369.25, 2.25) {};
\node [style=Z] (18) at (369.5, 7.75) {};
\node [style=X] (19) at (370.25, 7.75) {};
\node [style=X] (20) at (369.5, 8.5) {};
\node [style=Z] (21) at (370.25, 8.5) {};
\node [style=Z] (22) at (368.25, 6.75) {};
\node [style=Z] (23) at (368.75, 6.75) {};
\node [style=none] (24) at (369.25, 6.75) {};
\node [style=none] (25) at (367.75, 6.75) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (11) to (10);
\draw (13) to (12);
\draw (1.center) to (12);
\draw (12) to (4);
\draw (3.center) to (10);
\draw (10) to (5);
\draw (2.center) to (11);
\draw (0.center) to (13);
\draw (13) to (15.center);
\draw (11) to (14.center);
\draw [in=0, out=-90, looseness=0.75] (6.center) to (16);
\draw [in=-90, out=165, looseness=0.50] (16) to (2.center);
\draw [in=165, out=-90, looseness=0.50] (1.center) to (17);
\draw [in=-90, out=30] (17) to (7.center);
\draw (21) to (19);
\draw (20) to (18);
\draw (6.center) to (18);
\draw (20) to (8.center);
\draw (9.center) to (21);
\draw (19) to (7.center);
\draw [in=-150, out=90, looseness=0.75] (22) to (21);
\draw [in=-150, out=90] (23) to (18);
\draw [style=classicalwire, in=-90, out=90, looseness=0.50] (15.center) to (24.center);
\draw [style=classicalwire, in=-90, out=90] (14.center) to (25.center);
\draw [in=210, out=90, looseness=0.75] (25.center) to (20);
\draw [in=-150, out=90] (24.center) to (19);
\end{pgfonlayer}
\end{tikzpicture}
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (0) at (82, 2.25) {};
\node [style=none] (2) at (81.25, 2.25) {};
\node [style=none] (3) at (83.75, 4.25) {};
\node [style=none] (4) at (84.25, 4.25) {};
\node [style=none] (5) at (83.75, 8.25) {};
\node [style=none] (6) at (84.25, 8.25) {};
\node [style=X] (7) at (81.25, 4.5) {};
\node [style=X] (8) at (82.75, 3.5) {};
\node [style=Z] (9) at (83.75, 3.5) {};
\node [style=X] (10) at (84.25, 7) {};
\node [style=X] (11) at (83.75, 7) {};
\node [style=Z] (12) at (83, 5) {};
\node [style=X] (13) at (82, 4.5) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw [in=15, out=-90, looseness=0.75] (3.center) to (8);
\draw [in=-90, out=15, looseness=0.75] (9) to (4.center);
\draw (11) to (5.center);
\draw (10) to (4.center);
\draw (10) to (6.center);
\draw (3.center) to (11);
\draw (7) to (2.center);
\draw [in=-150, out=90, looseness=0.75] (7) to (11);
\draw [in=225, out=120, looseness=0.50] (13) to (10);
\draw [in=15, out=-165] (12) to (13);
\draw [in=270, out=90] (0.center) to (13);
\draw [in=-60, out=135, looseness=0.75] (9) to (12);
\draw [in=-45, out=150, looseness=0.75] (8) to (7);
\end{pgfonlayer}
\end{tikzpicture}\\
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (15) at (86.75, 5) {};
\node [style=none] (16) at (86.75, 8) {};
\node [style=X] (18) at (86.75, 6) {};
\node [style=X] (21) at (86.75, 7) {};
\node [style=none] (22) at (87.75, 5) {};
\node [style=none] (23) at (87.75, 8) {};
\node [style=X] (24) at (87.75, 6) {};
\node [style=X] (25) at (87.75, 7) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (21) to (16.center);
\draw (18) to (15.center);
\draw [bend left] (21) to (18);
\draw [bend left] (18) to (21);
\draw (25) to (23.center);
\draw (24) to (22.center);
\draw [bend left] (25) to (24);
\draw [bend left] (24) to (25);
\end{pgfonlayer}
\end{tikzpicture}
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (26) at (88.75, 5) {};
\node [style=none] (27) at (88.75, 8) {};
\node [style=none] (30) at (89.75, 5) {};
\node [style=none] (31) at (89.75, 8) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (26.center) to (27.center);
\draw (30.center) to (31.center);
\end{pgfonlayer}
\end{tikzpicture}
\left\llbracket\
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (30) at (89.75, 5) {};
\node [style=none] (31) at (89.75, 8) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw [thick] (30.center) to (31.center);
\end{pgfonlayer}
\end{tikzpicture}
\ \right\rrbracket
\end{align*}

Compare this with the graphical proof contained in <cit.> which uses the Hopf-algebra structure.

Because $\Aff\Co\Isot\Rel_{\F_p}^M$ is a subcategory of relations, composable maps are ordered by subspace inclusion (ie, it is poset-enriched). Moreover, since all possible outcomes are equally likely we can identify when the measurement statistics of one process arise from the marginalization of the measurement statistics of another process:

Take two odd prime dimensional stabilizer circuits with state preparations and measurement $f,g$ interpreted as parallel maps in  $\Aff\Co\Isot\Rel_{\F_p}^M$.
Then $f$ is a coarse-graining of $g$ when $f \subset g$ is a (strict)  affine subspace.

For an extreme example, the circuit obtained by preparing in the $Z$-basis and measuring in the $X$-basis  is a coarse-graining of the identity circuit on a classical wire:

\left\llbracket\
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (13) at (31, -6) {};
\node [style=none] (14) at (31, -3) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (13.center) to (14.center);
\end{pgfonlayer}
\end{tikzpicture}
\
\right\rrbracket
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (0) at (59, 8.25) {};
\node [style=none] (1) at (59, 5) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw [style=classicalwire] (0.center) to (1.center);
\end{pgfonlayer}
\end{tikzpicture}
\subset
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=Z] (2) at (60, 7) {};
\node [style=none] (3) at (60, 8.25) {};
\node [style=Z] (4) at (60, 6.25) {};
\node [style=none] (5) at (60, 5) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw [style=classicalwire] (3.center) to (2);
\draw [style=classicalwire] (5.center) to (4);
\end{pgfonlayer}
\end{tikzpicture}
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=Z] (6) at (61, 6.25) {};
\node [style=none] (7) at (61, 7) {};
\node [style=Z] (8) at (61.5, 7) {};
\node [style=none] (9) at (61.5, 6.25) {};
\node [style=none] (10) at (61, 8.25) {};
\node [style=none] (11) at (61.5, 5) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (7.center) to (6);
\draw (9.center) to (8);
\draw [style=classicalwire] (11.center) to (9.center);
\draw [style=classicalwire] (7.center) to (10.center);
\end{pgfonlayer}
\end{tikzpicture}
\left\llbracket\
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=Z] (12) at (31, -5) {};
\node [style=none] (13) at (31, -6) {};
\node [style=none] (14) at (31, -3) {};
\node [style=X] (15) at (31, -4) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (13.center) to (12);
\draw (15) to (14.center);
\draw [thick] (12) to (15);
\end{pgfonlayer}
\end{tikzpicture}
\
\right\rrbracket

This is because, given any input state, the circuit on the right hand side can produce any output state; however, the identity circuit forces the inputs to be the same as the outputs.

Similarly,  the decoherence map is a coarse-graining of  the identity on a quantum wire :

\left\llbracket\
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (13) at (31, -6) {};
\node [style=none] (14) at (31, -3) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw [thick] (13.center) to (14.center);
\end{pgfonlayer}
\end{tikzpicture}
\
\right\rrbracket
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (0) at (69.25, 7.25) {};
\node [style=none] (1) at (69.25, 4.75) {};
\node [style=none] (2) at (69.75, 7.25) {};
\node [style=none] (3) at (69.75, 4.75) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (3.center) to (2.center);
\draw (1.center) to (0.center);
\end{pgfonlayer}
\end{tikzpicture}
\subset
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=Z] (4) at (70.75, 6.75) {};
\node [style=none] (5) at (70.75, 7.25) {};
\node [style=Z] (6) at (70.75, 5.25) {};
\node [style=none] (7) at (70.75, 4.75) {};
\node [style=none] (8) at (71.25, 7.25) {};
\node [style=none] (9) at (71.25, 4.75) {};
\node [style=none] (10) at (71.25, 6.75) {};
\node [style=none] (11) at (71.25, 5.25) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (5.center) to (4);
\draw (7.center) to (6);
\draw [style=classicalwire] (11.center) to (10.center);
\draw (9.center) to (11.center);
\draw (10.center) to (8.center);
\end{pgfonlayer}
\end{tikzpicture}
\left\llbracket\
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=Z] (12) at (31, -5) {};
\node [style=none] (13) at (31, -6) {};
\node [style=none] (14) at (31, -3) {};
\node [style=X] (15) at (31, -4) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw [thick] (13.center) to (12);
\draw [thick] (15) to (14.center);
\draw  (12) to (15);
\end{pgfonlayer}
\end{tikzpicture}
\
\right\rrbracket

§.§ Electrical circuits with control and measurement

This multicoloured view of things recaptures the  semantics for controlled voltage and current sources as well as ammeters and voltmenters given in [4]; however the situation is more nuanced than for quantum circuits.

$\Aff\Co\Isot\Rel_{\R(x)}^M$ gives a semantics for all of the electrical circuit components we have discussed so far in addition to the controlled voltage and current sources:

\left\llbracket\
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (0) at (0.5, 2) {};
\node [style=vsourceAMshape, rotate=-90,fill=white] (10) at (0.5, 1) {};
\node [style=none] (1) at (0.5, 1) {};
\node [style=none] (2) at (0.5, 0) {};
\node [style=none] (3) at (1.2, 0) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (2.center) to (1);
\draw (1) to (0.center);
\draw [style=electricalcontrol, in=-15, out=90] (3.center) to (1);
\end{pgfonlayer}
\end{tikzpicture}
\ \right\rrbracket
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (0) at (6, 0.5) {};
\node [style=none] (1) at (6, -1.25) {};
\node [style=none] (2) at (6.75, -1.25) {};
\node [style=none] (3) at (6.75, 0.5) {};
\node [style=none] (4) at (7.75, -1.25) {};
\node [style=X] (5) at (6.75, -0.25) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw [style=classicalwire, in=-15, out=90, looseness=1.25] (4.center) to (5);
\draw (5) to (3.center);
\draw (0.center) to (1.center);
\draw (2.center) to (5);
\end{pgfonlayer}
\end{tikzpicture}
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (6) at (2.5, 0.75) {};
\node [style=none] (7) at (2, -0.75) {};
\node [style=none] (8) at (3.5, -0.75) {};
\node [style=none] (9) at (4, 0.75) {};
\node [style=none] (10) at (4.5, -1.5) {};
\node [style=X] (11) at (4, 0) {};
\node [style=Z] (12) at (2.5, 0) {};
\node [style=Z] (13) at (3, -0.75) {};
\node [style=none] (14) at (4.5, -0.75) {};
\node [style=none] (15) at (2, -1.5) {};
\node [style=none] (17) at (3.5, -1.5) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (11) to (9.center);
\draw [in=-150, out=90] (8.center) to (11);
\draw [in=-150, out=90] (7.center) to (12);
\draw (12) to (6.center);
\draw (15.center) to (7.center);
\draw [in=-30, out=90] (13) to (12);
\draw (8.center) to (17.center);
\draw [in=-30, out=90] (14.center) to (11);
\draw [style=classicalwire] (10.center) to (14.center);
\end{pgfonlayer}
\end{tikzpicture}
\ ,
\hspace*{.5cm}
\left\llbracket\
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (4) at (2.9, 2) {};
\node [style=isourceAMshape, rotate=-90,fill=white] (50) at (2.9, 1) {};
\node [style=none] (5) at (2.9, 1) {};
\node [style=none] (6) at (2.9, 0) {};
\node [style=none] (7) at (2.25, 0) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (6.center) to (5);
\draw (5) to (4.center);
\draw [style=electricalcontrol, in=-165, out=90] (7.center) to (5);
\end{pgfonlayer}
\end{tikzpicture}
\ \right\rrbracket
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (0) at (7, -2.75) {};
\node [style=none] (2) at (7.75, -2.75) {};
\node [style=Z] (3) at (7, -3.5) {};
\node [style=none] (4) at (7, -5) {};
\node [style=none] (5) at (7.75, -5) {};
\node [style=Z] (6) at (7.75, -4.25) {};
\node [style=none] (7) at (6.25, -4.25) {};
\node [style=none] (8) at (6.25, -5) {};
\node [style=Z] (9) at (7.75, -3.5) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (3) to (0.center);
\draw [in=-150, out=90] (7.center) to (3);
\draw [style=classicalwire] (8.center) to (7.center);
\draw (9) to (2.center);
\draw (5.center) to (6);
\draw (3) to (4.center);
\end{pgfonlayer}
\end{tikzpicture}
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (19) at (2.75, -2.75) {};
\node [style=none] (20) at (3.25, -4.25) {};
\node [style=none] (21) at (4.75, -4.25) {};
\node [style=none] (22) at (4.25, -2.75) {};
\node [style=X] (24) at (4.25, -3.5) {};
\node [style=Z] (25) at (2.75, -3.5) {};
\node [style=none] (27) at (3.75, -4.25) {};
\node [style=none] (28) at (3.25, -5) {};
\node [style=none] (29) at (4.75, -5) {};
\node [style=Z] (30) at (3.75, -4.25) {};
\node [style=none] (31) at (2.25, -4.25) {};
\node [style=none] (32) at (2.25, -5) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (24) to (22.center);
\draw [in=-30, out=90] (21.center) to (24);
\draw [in=-30, out=90] (20.center) to (25);
\draw (25) to (19.center);
\draw (28.center) to (20.center);
\draw (21.center) to (29.center);
\draw [in=-150, out=90] (27.center) to (24);
\draw [in=-150, out=90] (31.center) to (25);
\draw [style=classicalwire] (32.center) to (31.center);
\end{pgfonlayer}
\end{tikzpicture}

Or in bastard spider notation, the controlled voltage and current sources have the following form:

\left\llbracket\
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (0) at (0.5, 2) {};
\node [style=vsourceAMshape, rotate=-90,fill=white] (10) at (0.5, 1) {};
\node [style=none] (1) at (0.5, 1) {};
\node [style=none] (2) at (0.5, 0) {};
\node [style=none] (3) at (1.2, 0) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (2.center) to (1);
\draw (1) to (0.center);
\draw [style=electricalcontrol, in=-15, out=90] (3.center) to (1);
\end{pgfonlayer}
\end{tikzpicture}
\ \right\rrbracket
\left\llbracket\
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=Xthick] (47) at (3, 3) {};
\node [style=none] (48) at (3, 1.25) {};
\node [style=none] (49) at (3, 4) {};
\node [style=none] (50) at (3.75, 1.25) {};
\node [style=none] (51) at (3, 4) {};
\node [style=Z] (52) at (3.75, 2) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw [thick] (47) to (51.center);
\draw [thick] (47) to (48.center);
\draw [thick, in=345, out=90] (52) to (47);
\draw (50.center) to (52);
\end{pgfonlayer}
\end{tikzpicture}
\ \right\rrbracket\ ,
\hspace*{.5cm}
\left\llbracket\
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (4) at (2.9, 2) {};
\node [style=isourceAMshape, rotate=-90,fill=white] (50) at (2.9, 1) {};
\node [style=none] (5) at (2.9, 1) {};
\node [style=none] (6) at (2.9, 0) {};
\node [style=none] (7) at (2.25, 0) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (6.center) to (5);
\draw (5) to (4.center);
\draw [style=electricalcontrol, in=-165, out=90] (7.center) to (5);
\end{pgfonlayer}
\end{tikzpicture}
\ \right\rrbracket
\left\llbracket\
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=X] (53) at (6, 3) {};
\node [style=none] (54) at (6, 1.25) {};
\node [style=none] (55) at (6, 4) {};
\node [style=none] (56) at (5.25, 1.25) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw [thick] (54.center) to (53);
\draw [thick] (53) to (55.center);
\draw [in=-135, out=90] (56.center) to (53);
\end{pgfonlayer}
\end{tikzpicture}
\ \right\rrbracket

On the other hand the dual multicoloured prop $\Aff\Isot\Rel_{\R(x)}^M$ gives a semantics for all of the uncontrolled components we have discussed so far as well as voltmeters and ammeters:

\left\llbracket\
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (58) at (9.25, 1) {};
\node [style=none] (59) at (9.25, -1) {};
\node [style=none] (60) at (10, 1) {};
\node [style=map] (61) at (9.25, 0) {$V$};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw [style=electricalcontrol, in=-90, out=45, looseness=0.75] (61) to (60.center);
\draw (59.center) to (61);
\draw (61) to (58.center);
\end{pgfonlayer}
\end{tikzpicture}
\ \right\rrbracket
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=X] (62) at (12.25, 0) {};
\node [style=X] (63) at (11.5, -0.5) {};
\node [style=X] (64) at (11.5, 0.5) {};
\node [style=s] (65) at (13, 1) {};
\node [style=none] (66) at (13, 1.75) {};
\node [style=none] (67) at (11.5, 1.75) {};
\node [style=none] (68) at (11.5, -1.5) {};
\node [style=none] (69) at (12.25, -1.5) {};
\node [style=none] (70) at (12.25, 1.75) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (67.center) to (64);
\draw (68.center) to (63);
\draw (69.center) to (62);
\draw (70.center) to (62);
\draw [style=classicalwire, in=-90, out=30] (62) to (65);
\draw [style=classicalwire] (65) to (66.center);
\end{pgfonlayer}
\end{tikzpicture}
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=s] (107) at (27, 1.75) {};
\node [style=none] (108) at (27, 2.5) {};
\node [style=none] (109) at (24.5, 1) {};
\node [style=none] (110) at (25, -0.75) {};
\node [style=none] (111) at (26.5, -0.75) {};
\node [style=none] (112) at (26, 1) {};
\node [style=Z] (113) at (25, 0) {};
\node [style=X] (114) at (26.5, 0) {};
\node [style=X] (115) at (25.5, 1) {};
\node [style=none] (116) at (27, 1) {};
\node [style=none] (117) at (26, 2.5) {};
\node [style=none] (118) at (24.5, 2.5) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw [style=classicalwire] (107) to (108.center);
\draw [style=classicalwire] (116.center) to (107);
\draw [in=-90, out=30] (114) to (116.center);
\draw [in=-90, out=30] (113) to (115);
\draw (114) to (111.center);
\draw (113) to (110.center);
\draw [in=-90, out=150] (114) to (112.center);
\draw [in=-90, out=150] (113) to (109.center);
\draw (112.center) to (117.center);
\draw (109.center) to (118.center);
\end{pgfonlayer}
\end{tikzpicture}
\ ,
\hspace*{.5cm}
\left\llbracket\
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (84) at (17.5, 1) {};
\node [style=none] (85) at (17.5, -1) {};
\node [style=none] (86) at (16.75, 1) {};
\node [style=map] (87) at (17.5, 0) {$A$};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw [style=electricalcontrol, in=-90, out=135, looseness=0.75] (87) to (86.center);
\draw (85.center) to (87);
\draw (87) to (84.center);
\end{pgfonlayer}
\end{tikzpicture}
\ \right\rrbracket
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=Z] (13) at (26.75, -0.25) {};
\node [style=none] (15) at (26, 0.75) {};
\node [style=none] (16) at (26.75, 0.75) {};
\node [style=none] (18) at (27.5, 0.75) {};
\node [style=none] (19) at (26.75, -1.25) {};
\node [style=none] (20) at (27.5, -1.25) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (19.center) to (13);
\draw (13) to (16.center);
\draw [style=classicalwire, in=-90, out=150] (13) to (15.center);
\draw (18.center) to (20.center);
\end{pgfonlayer}
\end{tikzpicture}
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=Z] (0) at (22.5, -0.25) {};
\node [style=X] (1) at (24.5, -0.25) {};
\node [style=none] (2) at (22, 0.75) {};
\node [style=none] (3) at (23, 0.75) {};
\node [style=none] (4) at (24, 0.75) {};
\node [style=none] (5) at (25, 0.75) {};
\node [style=none] (6) at (22.5, -1.25) {};
\node [style=none] (7) at (24.5, -1.25) {};
\node [style=X] (8) at (24, 0.75) {};
\node [style=none] (9) at (22, 1.5) {};
\node [style=none] (10) at (22, 1.5) {};
\node [style=none] (11) at (23, 1.5) {};
\node [style=none] (12) at (25, 1.5) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (6.center) to (0);
\draw [in=-90, out=30] (0) to (3.center);
\draw (7.center) to (1);
\draw [in=-90, out=30] (1) to (5.center);
\draw [in=-90, out=150] (1) to (4.center);
\draw [in=-90, out=150] (0) to (2.center);
\draw [style=classicalwire] (2.center) to (10.center);
\draw (3.center) to (11.center);
\draw (5.center) to (12.center);
\end{pgfonlayer}
\end{tikzpicture}

These are respectively the orthogonal complements of the interepretations of  following bastard spider diagrams in linear relations:

\left\llbracket\
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (58) at (9.25, 1) {};
\node [style=none] (59) at (9.25, -1) {};
\node [style=none] (60) at (10, 1) {};
\node [style=map] (61) at (9.25, 0) {$V$};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw [style=electricalcontrol, in=-90, out=45, looseness=0.75] (61) to (60.center);
\draw (59.center) to (61);
\draw (61) to (58.center);
\end{pgfonlayer}
\end{tikzpicture}
\ \right\rrbracket
\left\llbracket\
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=Z] (21) at (28.5, 2.25) {};
\node [style=none] (22) at (28.5, 4) {};
\node [style=none] (23) at (28.5, 1.25) {};
\node [style=none] (24) at (29.25, 4) {};
\node [style=s] (25) at (29.25, 3) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw [thick] (22.center) to (21);
\draw [thick] (21) to (23.center);
\draw [in=-90, out=30] (21) to (25);
\draw (25) to (24.center);
\end{pgfonlayer}
\end{tikzpicture}
\ \right\rrbracket^\perp
\ ,
\hspace*{.5cm}
\left\llbracket\
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=none] (84) at (17.5, 1) {};
\node [style=none] (85) at (17.5, -1) {};
\node [style=none] (86) at (16.75, 1) {};
\node [style=map] (87) at (17.5, 0) {$A$};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw [style=electricalcontrol, in=-90, out=135, looseness=0.75] (87) to (86.center);
\draw (85.center) to (87);
\draw (87) to (84.center);
\end{pgfonlayer}
\end{tikzpicture}
\ \right\rrbracket
\left\llbracket\
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=Zthick] (26) at (31, 2.25) {};
\node [style=none] (27) at (31, 4) {};
\node [style=none] (28) at (31, 1.25) {};
\node [style=none] (29) at (30.25, 4) {};
\node [style=none] (30) at (31, 1.25) {};
\node [style=X] (31) at (30.25, 3.25) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw [thick] (26) to (30.center);
\draw [thick] (26) to (27.center);
\draw [thick, in=165, out=-90] (31) to (26);
\draw (29.center) to (31);
\end{pgfonlayer}
\end{tikzpicture}
\ \right\rrbracket^\perp

The controlled voltage source is the electrical circuit analogue of a $X$-phase correction in quantum circuits.  Similarly, the controlled current source is the transpose of a measurement in the $X$-basis. However the voltmeters and ammeters have no quantum analogue. This is because, the ground is the zero-relation:

\left\llbracket \
\begin{tikzpicture}[yscale=-1]
\begin{pgfonlayer}{nodelayer}
\node [style=none] (0) at (0.25, 0) {};
\node [ground] (1) at (0.25, -0.5) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (1) to (0.center);
\end{pgfonlayer}
\end{tikzpicture}\
\right\rrbracket
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=X] (2) at (4, 0) {};
\node [style=X] (3) at (4.5, 0) {};
\node [style=none] (4) at (4, -1) {};
\node [style=none] (5) at (4.5, -1) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (4.center) to (2);
\draw (3) to (5.center);
\end{pgfonlayer}
\end{tikzpicture}
\left\llbracket\
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [style=Z] (0) at (31, 2.25) {};