Face incidence, commutation, and parameter count

This page derives the exact finite object exported by constructor.py. It is not a derivation for every lattice called a 6.6.6 color code.

The integer-grid convention

Write the requested odd distance as d=2t+1, so the constructor bound is B=3t. Start with

T_B = {(r,c): 0<=c<=r<=B}.

The point (r,c) is a face center when

c mod 3 = 2-(r mod 3).

Every unmarked point is a data vertex. Face and qubit labels are both row-major. Around a face center the ordered offsets are

(-1,-1), (-1,0), (0,1), (1,1), (1,0), (0,-1).

All six neighbors survive in the bulk. At a side of T_B, exactly two are clipped from a retained boundary face, giving a weight-four support. This explains why the bulk name 6.6.6 coexists with four-body boundary checks. The explicit triangular-family source is Chamberland et al.; the Atlas convention then fixes the remaining ordering choices for replay.

Count the face centers

Group rows by their residue modulo three.

rowallowed face-center columnscount
r=3a2,5,...,3a-1a
r=3a+11,4,...,3a+1a+1
r=3a+20,3,...,3aa+1

The final row is 3t. The 3a rows run through a=0,...,t; the other two classes run through a=0,...,t-1. Hence

m = sum_(a=0)^t a + 2 sum_(a=0)^(t-1) (a+1)

= 3t(t+1)/2 = 3(d^2-1)/8.

The integer triangle contains

|T_B|=(3t+1)(3t+2)/2

points, so deleting the m face centers leaves

n=|T_B|-m=3t^2+3t+1=(3d^2+1)/4

data qubits.

shipped dtfaces mdata qubits n
3137
52919
731837

The reproduction transcript obtains every entry in this table from the constructor and checks the formulas independently.

Why one incidence matrix commutes with itself

Let H be the m × n binary matrix with H[f,q]=1 when qubit q lies on face f. A CSS presentation with H_X=H_Z=H is valid exactly when H H^T=0 over F_2.

Thus the X check and Z check on the same face commute—their overlap is even— and checks on different faces commute for the same parity reason. This is the local algebra behind the self-dual CSS statement introduced by Bombín and Martín-Delgado.

Why the face rows are independent

Suppose a nonempty set of face rows summed to zero. Choose an outermost face in that set. Along the current exterior of the selected region, at least one of its boundary vertices is incident to no other selected face. That qubit would occur once in the sum, contradicting zero. Removing the outer layer repeats the argument until no face remains. This boundary-peeling argument is specific to the open triangle; a closed surface can instead have global face relations.

The constructor enforces the same statement with gf2.rank(H)=m for every built distance. Since X and Z generators occupy separate symplectic halves, the full stabilizer rank is 2m. Therefore

k=n-2m=(3d^2+1)/4-2·3(d^2-1)/8=1.

The three face colors do not appear in this rank subtraction. They organize the topology of strings and boundaries; they do not contribute three independent stabilizer copies or three logical qubits.

What this calculation does and does not certify

It certifies the exact finite incidence presentation, commutation, and logical dimension. It also gives bounded check weight: four at the boundary, six in the bulk. It does not prove the family distance, the performance of a decoder, a circuit threshold, or a logical gate under faults. Those require the separate ledgers linked from the Level-2 map.