How much protection is needed when every logical operation exposes the machine for several rounds?
A code distance belongs to a workload, not a headline
Source research checked . Teaching calculations are ideal models.
A small logical error probability is meaningful only beside the number of opportunities for failure. A memory experiment, a short logical operation and a large algorithm can tolerate very different per-round rates. Choosing a code distance therefore starts with a workload and an explicit accounting convention, rather than a desired number of decimal places.
The model assigns a simple distance-dependent logical error and makes each logical operation consume a number of correction rounds proportional to distance. Increasing distance improves one factor while increasing the exposure count, footprint and serial duration. The calculation then selects the smallest tested odd distance meeting a stated union-bound target. A union bound adds event probabilities and does not require the events to be independent, although the assumed per-location probabilities remain a strong physical modeling choice.
This is an accounting exercise, not a surface-code resource estimate for a named algorithm. A real implementation must also count factories, routing, boundaries, correlated faults, logical gate constructions and recovery behavior. Moving from per-location protection to complete-workload protection requires an explicit exposure count. The footprint must also state which resources it excludes.
Start with the assumptions
- The error law and coefficients are invented.
- A serial sequence of logical operations lasts d correction rounds per operation; all stored registers, including idle ones, remain exposed.
- All counted locations share the stipulated per-location bound.
p_L(d) = A × ratio^((d+1)/2)
Counted locations = logical_registers × base_operations × d
Workload union bound = min(1, counted_locations × p_L)
Toy patch footprint = logical_registers × (2d²-1)
Compare the input regimes
Each case uses invented inputs. The results follow from this model and do not describe measured hardware.
Baseline regime
Complete inputs
- Physical error / model threshold
- 0.12
- Scaling prefactor
- 0.04
- Base logical operations
- 10000
- Logical registers
- 8
- Workload failure bound
- 0.001
- Cycle time, microseconds
- 1
- Tested odd distances
- 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41
- The error model gives p_L(d) = A × ratio^((d + 1)/2). Multiply by logical registers × base operations × distance to count the declared fault opportunities.
- At d = 17, the resulting union bound is min(1, 1,360,000 × 2.06391e-10) = 0.000281.
- The illustrative rotated-patch allocation is 8 × (2 × 17² - 1) = 4,616 physical qubits. The serial duration is 0.17 seconds. Routing space, factories and extra control patches are excluded.
| Calculated quantity | Synthetic result |
|---|---|
| Smallest passing tested distance | 17 |
| Chosen-distance logical error per location | 2.0639121408e-10 |
| Counted fault locations | 1360000 |
| Union-bound workload failure | 0.000280692051149 |
| Illustrative physical-qubit footprint | 4616 |
| Serial operation time, seconds | 0.17 |
| Distance | Per-location error | Counted locations | Workload failure bound | Physical qubits | Seconds |
|---|---|---|---|---|---|
| 3 | 0.000576 | 240000 | 1 | 136 | 0.03 |
| 5 | 0.00006912 | 400000 | 1 | 392 | 0.05 |
| 7 | 0.0000082944 | 560000 | 1 | 776 | 0.07 |
| 9 | 9.95328e-7 | 720000 | 0.71663616 | 1288 | 0.09 |
| 11 | 1.1943936e-7 | 880000 | 0.1051066368 | 1928 | 0.11 |
| 13 | 1.43327232e-8 | 1040000 | 0.014906032128 | 2696 | 0.13 |
| 15 | 1.719926784e-9 | 1200000 | 0.0020639121408 | 3592 | 0.15 |
| 17 | 2.0639121408e-10 | 1360000 | 0.000280692051149 | 4616 | 0.17 |
| 19 | 2.47669456896e-11 | 1520000 | 0.0000376457574482 | 5768 | 0.19 |
| 21 | 2.97203348275e-12 | 1680000 | 0.00000499301625102 | 7048 | 0.21 |
| 23 | 3.5664401793e-13 | 1840000 | 6.56224992992e-7 | 8456 | 0.23 |
| 25 | 4.27972821516e-14 | 2000000 | 8.55945643033e-8 | 9992 | 0.25 |
| 27 | 5.1356738582e-15 | 2160000 | 1.10930555337e-8 | 11656 | 0.27 |
| 29 | 6.16280862983e-16 | 2320000 | 1.42977160212e-9 | 13448 | 0.29 |
| 31 | 7.3953703558e-17 | 2480000 | 1.83405184824e-10 | 15368 | 0.31 |
| 33 | 8.87444442696e-18 | 2640000 | 2.34285332872e-11 | 17416 | 0.33 |
| 35 | 1.06493333124e-18 | 2800000 | 2.98181332746e-12 | 19592 | 0.35 |
| 37 | 1.27791999748e-19 | 2960000 | 3.78264319255e-13 | 21896 | 0.37 |
| 39 | 1.53350399698e-20 | 3120000 | 4.78453247057e-14 | 24328 | 0.39 |
| 41 | 1.84020479637e-21 | 3280000 | 6.03587173211e-15 | 26888 | 0.41 |
Distance 17 is the smallest tested odd distance meeting the stated target. The gate count alone is not the exposure count: this model makes each logical operation last d rounds. Its scaling prefactor and threshold ratio are invented. No threshold theorem or device forecast is inferred from the scan.
Comparison regime
Complete inputs
- Physical error / model threshold
- 0.245
- Scaling prefactor
- 0.04
- Base logical operations
- 60000
- Logical registers
- 18
- Workload failure bound
- 0.001
- Cycle time, microseconds
- 1.5
- Tested odd distances
- 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41
- The error model gives p_L(d) = A × ratio^((d + 1)/2). Multiply by logical registers × base operations × distance to count the declared fault opportunities.
- At d = 29, the resulting union bound is min(1, 31,320,000 × 2.75138e-11) = 0.000862.
- The illustrative rotated-patch allocation is 18 × (2 × 29² - 1) = 30,258 physical qubits. The serial duration is 2.61 seconds. Routing space, factories and extra control patches are excluded.
| Calculated quantity | Synthetic result |
|---|---|
| Smallest passing tested distance | 29 |
| Chosen-distance logical error per location | 2.75138431283e-11 |
| Counted fault locations | 31320000 |
| Union-bound workload failure | 0.000861733566778 |
| Illustrative physical-qubit footprint | 30258 |
| Serial operation time, seconds | 2.61 |
| Distance | Per-location error | Counted locations | Workload failure bound | Physical qubits | Seconds |
|---|---|---|---|---|---|
| 3 | 0.002401 | 3240000 | 1 | 306 | 0.27 |
| 5 | 0.000588245 | 5400000 | 1 | 882 | 0.45 |
| 7 | 0.000144120025 | 7560000 | 1 | 1746 | 0.63 |
| 9 | 0.000035309406125 | 9720000 | 1 | 2898 | 0.81 |
| 11 | 0.00000865080450062 | 11880000 | 1 | 4338 | 0.99 |
| 13 | 0.00000211944710265 | 14040000 | 1 | 6066 | 1.17 |
| 15 | 5.1926454015e-7 | 16200000 | 1 | 8082 | 1.35 |
| 17 | 1.27219812337e-7 | 18360000 | 1 | 10386 | 1.53 |
| 19 | 3.11688540225e-8 | 20520000 | 0.639584884542 | 12978 | 1.71 |
| 21 | 7.63636923551e-9 | 22680000 | 0.173192854261 | 15858 | 1.89 |
| 23 | 1.8709104627e-9 | 24840000 | 0.0464734158935 | 19026 | 2.07 |
| 25 | 4.58373063362e-10 | 27000000 | 0.0123760727108 | 22482 | 2.25 |
| 27 | 1.12301400524e-10 | 29160000 | 0.00327470883927 | 26226 | 2.43 |
| 29 | 2.75138431283e-11 | 31320000 | 0.000861733566778 | 30258 | 2.61 |
| 31 | 6.74089156643e-12 | 33480000 | 0.000225685049644 | 34578 | 2.79 |
| 33 | 1.65151843378e-12 | 35640000 | 0.0000588601169798 | 39186 | 2.97 |
| 35 | 4.04622016275e-13 | 37800000 | 0.0000152947122152 | 44082 | 3.15 |
| 37 | 9.91323939874e-14 | 39960000 | 0.00000396133046374 | 49266 | 3.33 |
| 39 | 2.42874365269e-14 | 42120000 | 0.00000102298682651 | 54738 | 3.51 |
| 41 | 5.95042194909e-15 | 44280000 | 2.63484683906e-7 | 60498 | 3.69 |
Distance 29 is the smallest tested odd distance meeting the stated target. The gate count alone is not the exposure count: this model makes each logical operation last d rounds. Its scaling prefactor and threshold ratio are invented. No threshold theorem or device forecast is inferred from the scan.
Extended regime
Complete inputs
- Physical error / model threshold
- 0.395
- Scaling prefactor
- 0.04
- Base logical operations
- 120000
- Logical registers
- 30
- Workload failure bound
- 0.001
- Cycle time, microseconds
- 2.1
- Tested odd distances
- 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41
- The error model gives p_L(d) = A × ratio^((d + 1)/2). Multiply by logical registers × base operations × distance to count the declared fault opportunities.
- At d = 41, the resulting union bound is min(1, 147,600,000 × 1.35082e-10) = 0.019938.
- The illustrative rotated-patch allocation is 30 × (2 × 41² - 1) = 100,830 physical qubits. The serial duration is 10.332 seconds. Routing space, factories and extra control patches are excluded.
| Calculated quantity | Synthetic result |
|---|---|
| Smallest passing tested distance | No tested distance passes |
| Chosen-distance logical error per location | 1.35082471965e-10 |
| Counted fault locations | 147600000 |
| Union-bound workload failure | 0.0199381728621 |
| Illustrative physical-qubit footprint | 100830 |
| Serial operation time, seconds | 10.332 |
| Distance | Per-location error | Counted locations | Workload failure bound | Physical qubits | Seconds |
|---|---|---|---|---|---|
| 3 | 0.006241 | 10800000 | 1 | 510 | 0.756 |
| 5 | 0.002465195 | 18000000 | 1 | 1470 | 1.26 |
| 7 | 0.000973752025 | 25200000 | 1 | 2910 | 1.764 |
| 9 | 0.000384632049875 | 32400000 | 1 | 4830 | 2.268 |
| 11 | 0.000151929659701 | 39600000 | 1 | 7230 | 2.772 |
| 13 | 0.0000600122155817 | 46800000 | 1 | 10110 | 3.276 |
| 15 | 0.0000237048251548 | 54000000 | 1 | 13470 | 3.78 |
| 17 | 0.00000936340593614 | 61200000 | 1 | 17310 | 4.284 |
| 19 | 0.00000369854534478 | 68400000 | 1 | 21630 | 4.788 |
| 21 | 0.00000146092541119 | 75600000 | 1 | 26430 | 5.292 |
| 23 | 5.77065537419e-7 | 82800000 | 1 | 31710 | 5.796 |
| 25 | 2.2794088728e-7 | 90000000 | 1 | 37470 | 6.3 |
| 27 | 9.00366504758e-8 | 97200000 | 1 | 43710 | 6.804 |
| 29 | 3.55644769379e-8 | 104400000 | 1 | 50430 | 7.308 |
| 31 | 1.40479683905e-8 | 111600000 | 1 | 57630 | 7.812 |
| 33 | 5.54894751424e-9 | 118800000 | 0.659214964692 | 65310 | 8.316 |
| 35 | 2.19183426812e-9 | 126000000 | 0.276171117784 | 73470 | 8.82 |
| 37 | 8.65774535909e-10 | 133200000 | 0.115321168183 | 82110 | 9.324 |
| 39 | 3.41980941684e-10 | 140400000 | 0.0480141242125 | 91230 | 9.828 |
| 41 | 1.35082471965e-10 | 147600000 | 0.0199381728621 | 100830 | 10.332 |
The tested distance range does not meet the target. The gate count alone is not the exposure count: this model makes each logical operation last d rounds. Its scaling prefactor and threshold ratio are invented. No threshold theorem or device forecast is inferred from the scan.
Try the reasoning: Double the number of stored logical registers. Which costs and failure opportunities increase even if the serial operation count stays fixed?
Sources and model boundaries
- Surface codes: Towards practical large-scale quantum computation ↗
Surface-code computation requires physical layouts, repeated stabilizer information and logical operation constructions with resource costs. Only architectural context is used. All scaling coefficients and workload values in the lab are invented, and the toy footprint excludes substantial resources.