A majority tolerance boundary checks how many bit flips a repetition code can absorb before the majority vote changes, with the boundary at exactly half the code length. The three rows give flip counts 0, 2, and 3 against tolerances 1, 2, and 2, yielding margins 1, 0, and -1 (pass, pass, fail) exactly for the stated toy code ledger; real stabilizer codes have readout errors, repeated rounds, calibration drift, and finite-shot statistics.

Repetition-code majority has a counted flip boundary. Exact arithmetic here means exact results for the stated model inputs; measured inputs still carry uncertainty and significant-figure limits.

highlighted = computed this step

Majority tolerance is counted before correction

A three-carrier code has one unit of flip tolerance before majority changes.

m=fmax⁡−fm=f_{\max}-f
Three-carrier codeThe encoded word has one unit of tolerance.repetition code

Flip counts bracket the majority boundary

The five-carrier row with two flips is the boundary. Three flips would cross it.

nffmax⁡m30115220532−1\begin{array}{c|c|c|c}n&f&f_{\max}&m\\3&0&1&1\\5&2&2&0\\5&3&2&-1\\\end{array}
Boundary majorityTwo flips in five carriers still keep majority.majority contrast

The three-flip row is outside this helper contract

The checked majority helper is not called on the failing row because it intentionally accepts only preserved-majority rows.

m=−1failm=-1\quad \text{fail}
Majority source onlyThe failing row stays a lesson-layer boundary.repetition code