|q⟩ Bad Qubits

advanced · Physics · Surface Codes & Topological Codes

Star and Plaquette Operators

The toric code's stabilizers come in two geometric flavours: star operators AvA_v at vertices and plaquette operators BpB_p at faces. For these to define a valid stabilizer code they must all mutually commute. This lesson examines the operators closely and proves their commutation comes for free from a simple counting fact: any star and any plaquette overlap on an even number of qubits.

The two operators

With one qubit per edge of the square lattice, define for each vertex vv and face pp:

Av=evXe  =  Xe1Xe2Xe3Xe4,Bp=epZe  =  Zf1Zf2Zf3Zf4.A_v = \prod_{e \,\ni\, v} X_e \;=\; X_{e_1} X_{e_2} X_{e_3} X_{e_4}, \qquad B_p = \prod_{e \,\in\, \partial p} Z_e \;=\; Z_{f_1} Z_{f_2} Z_{f_3} Z_{f_4} .

On the bulk of the lattice each vertex has four incident edges and each face has four bounding edges, so both operators are weight-4. They are Hermitian and square to the identity, Av2=Bp2=IA_v^2 = B_p^2 = I, hence their eigenvalues are ±1\pm 1.

Commutation from even overlap

Two Pauli strings either commute or anticommute. For tensor products built only from XX's and ZZ's, the rule is local and clean. On any single qubit:

So AvA_v and BpB_p pick up a factor of 1-1 for each qubit on which one acts with XX and the other with ZZ — i.e. for each edge in the overlap of the star's support and the plaquette's support. Across the whole string,

AvBp=(1)supp(Av)supp(Bp)BpAv.A_v B_p = (-1)^{\,|\,\mathrm{supp}(A_v)\,\cap\,\mathrm{supp}(B_p)\,|}\, B_p A_v .

They commute precisely when the overlap is even.

The overlap is always 0 or 2

Now the geometry. A vertex vv and a face pp on the square lattice can be positioned in only two relevant ways:

In both cases the overlap is even, so (1)overlap=+1(-1)^{\text{overlap}} = +1 and

[Av,Bp]=0for all v,p.[A_v, B_p] = 0 \quad \text{for all } v, p .

Stars commute with stars (all-XX) and plaquettes with plaquettes (all-ZZ) trivially. Therefore the full set {Av,Bp}\{A_v, B_p\} generates an abelian group — a legitimate stabilizer group.

Try it

Confirm the commutation numerically. For an adjacent star/plaquette pair, count the shared edges and return the commutation sign (1)overlap(-1)^{\text{overlap}} in AvBp=sBpAvA_v B_p = s\, B_p A_v. A value of +1+1 certifies that the stabilizers commute.

Run your code to see the quantum state.

Sign in on the full site to ask questions and join the discussion.