Use the coordinates of the code record. It is
convenient to index every check, bulk or boundary, by a plaquette position
(a,b) with −1≤a,b≤d−1, whose qubits are those of
(a,b),(a,b+1),(a+1,b),(a+1,b+1) that lie in the grid. The X-type checks are
the positions with a+b even and 0≤b≤d−2; the Z-type checks are the
positions with a+b odd and 0≤a≤d−2. For odd d this reproduces the
lists in the record.
Commutation. Two plaquette positions that share an edge have a+b of
opposite parity and share two qubits or none inside the grid; positions that share
only a corner have the same parity, hence the same type. So checks of different
type overlap on an even number of qubits.
Independence. Every qubit lies in at most two X-type checks, namely those
at diagonally opposite plaquette positions around it. A product of a set S of
X-type checks is the identity exactly when every qubit lies in an even number of
members of S. So if two X-type checks share a qubit, both are in S or neither
is, and a check containing a qubit that lies in no other X-type check is not in
S.
The X-type positions are connected under diagonal steps: from (a,b) with
a+b even one reaches (0,0) by steps (±1,±1) that stay among the
X-type positions, since the bulk positions of one colour of a square board of
side d−1≥2 are connected by such steps, and each boundary position (−1,b)
or (d−1,b) is diagonally adjacent to a bulk position. Diagonally adjacent
positions share exactly one qubit. Hence S contains all X-type checks or none.
The corner qubit (0,0) lies in the plaquette (0,0) and in no other X-type
check, because the positions (−1,−1) and (−1,0), (0,−1) are not X-type
checks. So the plaquette (0,0) is not in S and S is empty: the
(d2−1)/2 checks of X type are independent. The Z-type checks are
independent by the same argument with the corner qubit (0,d−1), which lies only
in the plaquette (0,d−2). An X-type product equals a Z-type product only if
both are the identity, so the stabilizer group has rank d2−1 and k=1.
Logical operators. Let Ri=∏jZ(i,j) and
Cj=∏iX(i,j). An X-type check at position (a,b) meets row i in
the two qubits (i,b),(i,b+1) if i∈{a,a+1} and in none otherwise, so
Ri commutes with all checks; similarly a Z-type check meets a column in two
qubits or none, so Cj commutes with all checks. Ri and Cj share the single
qubit (i,j) and anticommute. Two operators that commute with the stabilizer group
and anticommute with each other cannot lie in it, so Zˉ=Ri and
Xˉ=Cj are a pair of logical operators of the single encoded qubit.
All columns are equivalent. Fix 0≤j≤d−2 and multiply the X-type
checks at positions (a,j), a≡j(mod2), −1≤a≤d−1. Each acts
with X on columns j and j+1 in rows a and a+1 (those inside the grid).
For even j the rows covered are {0,1},{2,3},…,{d−3,d−2},{d−1};
for odd j they are {0},{1,2},…,{d−2,d−1}. In both cases every row
is covered once, so the product is CjCj+1. Hence all Cj differ by
stabilizers. The same argument with the Z-type checks at positions (i,b),
b≡i(mod2), shows that all Ri differ by stabilizers.
Distance. Since k=1, every Pauli operator commuting with all checks
equals, up to a phase, sXˉaZˉb with s in the stabilizer group.
Let Q be a product of Z operators on a set c of qubits that commutes with all
checks and is not a product of checks. Q commutes with Zˉ, so a=0, and
then b=1. Thus Q anticommutes with Xˉ=C0 and with every Cj, since
these differ from C0 by stabilizers. Anticommuting with Cj means that c
contains an odd number of qubits of column j. The d columns are disjoint, so
∣c∣≥d. Exchanging the roles of rows and columns, every non-trivial
X-type logical operator has weight at least d.
A general Pauli operator is, up to a phase, a product X(u)Z(w). In a CSS code it
commutes with all checks exactly when both factors do, and if it is not in the
stabilizer group at least one factor is not; that factor has weight at least d.
Since R0 has weight d, the distance is exactly d.