= Solution
The <graph-state stabilizer generators> of the path are
$$
S_1^A=X_1Z_2,
\qquad
S_2^A=Z_1X_2Z_3,
\qquad
S_3^A=Z_2X_3,
$$
and those of the triangle are
$$
S_1^B=X_1Z_2Z_3,
\qquad
S_2^B=Z_1X_2Z_3,
\qquad
S_3^B=Z_1Z_2X_3.
$$
Any pair of distinct generators has Pauli factors $X$ and $Z$ in exactly two common positions. Each such position contributes one minus sign on exchange, so the two signs cancel. Thus
$$
\boxed{[S_r^A,S_s^A]=[S_r^B,S_s^B]=0
\quad\text{for all }r,s}.
$$
This is the general commutativity mechanism for graph-state stabilizers associated with an undirected graph.
Back to article page