= Solution
Label the physical qubits by $(i,j)$, with outer block $1\leq i\leq n$ and inner position $1\leq j\leq m$. The inner <bit-flip repetition code> has stabilizers
$$
S^Z_{i,j}=Z_{i,j}Z_{i,j+1},
\qquad 1\leq j<m,
$$
and logical operators $\overline X_i=\prod_{j=1}^mX_{i,j}$ and $\overline Z_i=Z_{i,1}$. Replacing each outer $X_i$ by $\overline X_i$ gives the outer stabilizers
$$
S^X_i=\prod_{j=1}^mX_{i,j}X_{i+1,j},
\qquad 1\leq i<n.
$$
This is the <surface code on a chain of spheres>. The $n+1$ pole-touching points are vertices, and the $m$ longitudes on sphere $i$ are its qubit-carrying links. At an interior touching point, the star operator is exactly $S_i^X$. Each face between adjacent longitudes has the two-edge plaquette operator $Z_{i,j}Z_{i,j+1}$; only $m-1$ of the $m$ face operators on each sphere are independent.
Using the conventions of part a, logical operators are
$$
\boxed{
\overline Z=\prod_{j=1}^mX_{i,j},
\qquad
\overline X=\prod_{i=1}^nZ_{i,j}.}
$$
The first may be placed on any one sphere and is a dual equatorial cut crossing all $m$ longitude links. The second may use any fixed longitude and is a pole-to-pole path through all $n$ spheres. Multiplication by stabilizers deforms either representative without changing its logical action. Their minimum weights are $m$ and $n$, respectively, so the <distance of a stabilizer code> is
$$
\boxed{d=\min(m,n).}
$$
Back to article page