Resource Estimation for Fault-Tolerant Computation
A quantum resource estimate connects a specified computation to the hardware and time needed to perform it at a chosen accuracy. Its main outputs are peak physical qubits, runtime, spacetime volume and a modeled error. These quantities depend on the compiled circuit, error-correcting code, factory design, layout and noise assumptions. An algorithm name alone does not determine them.
The central difficulty is that the choices interact. More factories can shorten the run and reduce memory errors; that can permit a smaller code distance and even reduce the total qubit count. This page develops the conversions and a small scheduling example in which that feedback can be calculated exactly.
Required background. The threshold theorem explains scalable suppression; fault-tolerant gates supplies protected operations; the surface code supplies the patch-and-round language used in the example. Other codes require different physical models.
Logical work, protected operations and physical cost
Section titled “Logical work, protected operations and physical cost”Start with the task: its input size, output accuracy, confidence and repetitions. Then specify a compiled logical circuit. An oracle query count does not include the implementation of the oracle; a Hamiltonian-simulation cost does not automatically include preparation of a useful input state. Those operations belong in the workload when they are required to obtain the answer.
A layered resource model makes the conversions explicit. Beverland and collaborators develop one such framework connecting algorithms, protected instructions and hardware. The resulting numbers are conditional calculations, not predictions of when a machine will exist.
Several quantities that sound like “size” answer different questions:
| Quantity | Meaning |
|---|---|
| Gate or state count | Total work or total resource-state demand |
| Dependency depth | Work that must happen sequentially |
| Peak qubits | Largest simultaneous occupancy |
| Throughput | Supply completed per unit time |
| Latency | Time until a particular result is usable |
| Spacetime volume | Occupancy integrated over the run |
For logical qubits, the relevant width is
Ancillas cease to occupy resources only when the schedule releases or resets them. If data, work and routing populations vary, take the maximum of their sum. The sum of their separate maxima is a possible upper bound, not generally an equality.
Counts also require a gate alphabet. A Toffoli implemented from states and a Toffoli consuming a state draw on different factories. Synthesizing a rotation to a tighter tolerance changes its gate count. Keep the primitive actually supplied by the architecture; compare alternatives after accounting for their conversions.
For a directed acyclic graph of operations with durations , the weighted critical path gives a lower bound
Routing conflicts, shared ancillas and factory shortages may make the feasible schedule longer. A critical-path calculation is useful precisely because it identifies dependencies; it does not eliminate capacity constraints.
Accuracy determines how much protection is needed
Section titled “Accuracy determines how much protection is needed”Separate numerical approximation from stochastic failure. An energy error in joules cannot be added to a failure probability. A channel approximation error, a bias in an estimator and a probability of returning a wrong answer likewise need an operational conversion before combination.
For example, suppose the ideal approximate algorithm’s output distribution is within total-variation distance of the target. Suppose a noisy implementation agrees with that algorithm except on an event of probability at most . Then its output distance is at most . This supplies a common metric. It does not imply that every reported “error” can be added in this way.
For physical failure events, the union bound gives
where counts the relevant opportunities and bounds the probability per opportunity. The union bound needs no independence. The model used to obtain each may depend on independence, stationarity, decoder accuracy or other noise assumptions.
The denominator is crucial. A failure probability per patch-round must be multiplied by patch-round exposure. A probability per logical parity measurement must be multiplied by the number of those measurements. Multiplying both by an abstract gate count changes the event being estimated. Logical benchmarking explains how the probabilities are measured.
A conditional distance formula
Section titled “A conditional distance formula”For illustration, a fitted subthreshold law may take the form
Here is a specified noise ratio, often written . The fit must describe the same circuit, decoder and failure event used in the estimate. Neither nor the fitted threshold is universal. Fowler and collaborators discuss surface-code models and their architectural assumptions.
For a fixed number of opportunities and an allocated budget , requiring gives
Round upward to a supported distance, respecting its minimum, and substitute back into the original inequality. If the code operates only at odd distances, rounding to the nearest integer is insufficient.
Often itself depends on distance. A surgery operation can take a number of rounds proportional to , and a slow factory extends the period during which all data patches need protection. Then solve
for each proposed factory count and schedule. Treating the previously estimated as fixed after changing the runtime can select the wrong distance.
Uniform protection is only one option. Data, factories, links and temporary states can use different codes or distances. Optimize a declared objective, such as peak qubits or runtime, subject to the combined error budget. Equal error per operation is convenient but need not minimize that objective.
Factories supply states at particular times
Section titled “Factories supply states at particular times”A magic-state factory has output quality, batch size, acceptance probability, duration and footprint. Let a batch take , produce usable states when accepted, and be accepted with probability . For repeated stationary attempts, its long-run mean supply is
The output error is conditional on acceptance. Storing, transporting and injecting that output can add errors. If batches contain correlated faulty states, marginal error bounds still support a union bound, but they do not determine the distribution of failures or justify independent-state distillation formulas.
The quotient is a mean-rate production estimate for factories. When supply is random, it is not a deterministic lower bound on every realized runtime: a lucky sequence of accepted batches can finish earlier. An actual schedule needs a specified output process, initial inventory and acceptable probability of delay. Litinski’s factory analysis illustrates why protocol quality and physical implementation must be considered together.
Buffers distinguish average demand from bursts
Section titled “Buffers distinguish average demand from bursts”Let be the stored states before interval , the supply arriving before its consumption, and the requested consumption. If storage can accommodate the arrivals and the interval does not stall,
with . A finite capacity requires an explicit rule for storing or discarding arrivals. Storage itself occupies protected qubits and has an error cost.
Suppose supply is 120 states per interval and demand alternates 1,199. Starting empty with the low-demand interval, the first consumption leaves 119 states. The second interval then has 239 available and leaves 40. Thus that pair does not stall if the intermediate inventory can be stored. Starting with the 199-state interval does stall. The same average demand and the same total count can therefore give different schedules.
For random acceptance, even a mean surplus is not a guarantee. Four independent factories that each produce two states with probability have mean output 7.2 per interval. A demand of six states still fails whenever at most two factories succeed, with probability . Buffering or additional capacity can reduce the delay probability; replacing this calculation by the mean loses the relevant tail.
A complete toy schedule with distance feedback
Section titled “A complete toy schedule with distance feedback”Consider an illustrative model, not a projected device. All assumptions below are part of the example:
- There are 100 sequential layers. Each consumes two resource states when it starts and then takes rounds.
- The computation, routing and a two-state buffer occupy 30 patches in total. Each factory occupies another four patches, including its staging storage. All allocated patches remain protected for the entire run.
- Each factory supplies one accepted state deterministically every rounds, first delivering at time . Up to four factories may run. Surplus outputs are discarded if not needed; two states are enough to hold the next layer’s inputs.
- Every patch uses physical qubits. The assumed probability bound per allocated patch-round is , for odd .
- The budget for these faults is . Resource states also have an intrinsic conditional error bound per consumed state, adding at most . The round-based model is assumed to cover the remaining circuit faults.
With one factory, the first layer starts at and ends at . Subsequent layers start every , so layer 100 ends at . With two factories, the first pair arrives at . Every layer can then follow the previous one, finishing at . Four factories cannot shorten the sequential processing time.
Consequently,
The allocated patch count is . For each choice, select the smallest allowed distance satisfying
| Factories | Distance | Round-fault bound |
|---|---|---|
| 1 | 19 | |
| 2 | 17 | |
| 4 | 17 |
With one factory, distance 17 would give and narrowly fail the budget. Two factories shorten exposure enough to use distance 17. This changes the qubits per patch from 722 to 578.
The schedule includes initial production time. One factory leaves gaps between layers; two remove those gaps. After the error budget is imposed, the two-factory design uses both fewer qubits and fewer rounds than the one-factory design. Four factories add qubits without improving this workload’s sequential limit. Numbers follow only from the example’s stated production and error rules.
The physical allocation and runtime are
| Factories | Physical qubits | Rounds |
|---|---|---|
| 1 | 24,548 | 38,190 |
| 2 | 21,964 | 17,170 |
| 4 | 26,588 | 17,170 |
At , these times are about 38.2 ms, 17.2 ms and 17.2 ms. The exact integer counts are useful for checking the example; they do not make a real fitted noise law exact. If acceptance becomes random or communication delays are introduced, recompute the schedule and exposure.
Physical occupancy, clock time and restarts
Section titled “Physical occupancy, clock time and restarts”A real layout must include work qubits, factories, routing, buffers, input and output regions, and any reserve capacity that is provisioned. The common leading estimate per surface-code patch is a chosen geometric convention, not a conversion valid for every code. Lattice-surgery layouts make the relation between logical operations and occupied area explicit. For quantum LDPC codes, connectivity, check ancillas and decoding replace the simple planar-patch model.
For time-dependent allocated hardware, distinguish
from spacetime volume
Constant occupancy gives . If “active” qubits exclude idle but still protected data, that definition undercounts the error exposure. State which occupancy is being integrated.
A code cycle includes the entire syndrome-extraction schedule. Four successive 20 ns gates, a 100 ns measurement, an 80 ns reset and 40 ns synchronization take 300 ns when sequential. The 20 ns gate time is not the cycle time. Overlap can shorten the sum only if dependencies and hardware permit it.
Classical throughput and latency are separate. The decoder must process incoming syndromes fast enough to avoid an accumulating queue. A later conditional operation may also wait for a particular decoded result. A Pauli frame can postpone some physical corrections, but it does not remove every dependency of a non-Clifford operation. Gidney and Ekerå’s factoring estimate explicitly includes reaction time, repeated attempts and a spacetime layout, illustrating why a gate count alone is insufficient.
Expected time is not a high-confidence completion time
Section titled “Expected time is not a high-confidence completion time”If attempts have fixed duration , independent success probability , and success can be recognized, the number of attempts until success is geometric:
The number of attempts giving at least one success with probability is
for . Undetected wrong answers cannot simply be retried “until correct.” They require a verification procedure, repeated statistical inference, or an acceptable residual-error budget. If unsuccessful attempts stop early, use their actual duration distribution.
Acceptance and correctness must also be combined conditionally. If an attempt is accepted with probability and correct with probability given acceptance, its accepted-and-correct probability is . Multiplying two unrelated marginal probabilities would assume independence. Applying an acceptance factor again to a rate already defined per accepted output double-counts the loss.
Sensitivity and useful comparisons
Section titled “Sensitivity and useful comparisons”Distance, factory count and module count are discrete. A small parameter change can leave the selected design unchanged, then force a jump. A derivative within one plateau can therefore miss the cost of the next distance. Enumerate supported designs around the boundary and compare feasible alternatives.
Uncertain inputs should be varied in the complete model. Changing cycle time can affect memory exposure in seconds, decoder demand and communication delays; changing physical error may alter both distance and distillation choices. Preserve physical relationships between varied inputs. Independent optimistic choices can describe no realizable machine.
Compare estimates at the same task accuracy, success convention and gate semantics. A smaller qubit count with much longer runtime may be a useful tradeoff, while a smaller count obtained by excluding factories answers a different question. Resource-estimation tools describes reproducible implementations and parameter sweeps; the equations here explain what those tools need to calculate.
Exercises
Section titled “Exercises”1. Round a distance correctly
Section titled “1. Round a distance correctly”For , budget and , find the smallest odd distance at least three.
Solution
The required exponent is at least
Thus . Direct substitution gives about , while gives about and fails. Both checks matter near an integer boundary.
2. Follow the buffer in the correct order
Section titled “2. Follow the buffer in the correct order”Supply 120 states at the start of each interval. Compare demands and from an empty buffer. Assume newly arrived states can be immediately consumed; capacity limits apply to the leftovers retained for the next interval. What leftover capacity lets the first ordering finish both intervals without a stall?
Solution
The first ordering leaves 119 after interval 1, then has and leaves 40. Retaining at least 79 after interval 1 is sufficient to meet the second demand, so a capacity of 79 suffices if the extra 40 are discarded. With capacity 78, the second interval has only 198. Reversing the order causes an immediate shortage of 79. If storage must accommodate every arrival before consumption, its required capacity is different; that is why event order was specified.
3. Optimize an error allocation by enumeration
Section titled “3. Optimize an error allocation by enumeration”Two classes have , , and . Their combined cost is , with odd distances at least three. Minimize cost subject to .
Solution
The least feasible surgery distance is 19: distance 17 already spends the entire budget on surgery alone. At , its contribution is , requiring ; distance 21 would contribute . Thus is feasible, with total error and cost .
Larger surgery distances only raise cost and cannot reduce memory below 23, because memory at distance 21 alone consumes the full budget. Equal distances require 23 and cost . Equal protection wastes resources for this declared objective.
4. Separate peak allocation from integrated occupancy
Section titled “4. Separate peak allocation from integrated occupancy”Twenty patches are occupied for the first 4 ms and fifty patches for the next 6 ms. Each uses 578 physical qubits. Find peak qubits and qubit-seconds. Compare with peak qubits multiplied by the full runtime.
Solution
Peak allocation is qubits. The integrated occupancy is
Peak times duration is 289 qubit-seconds, an upper bound here. It includes hardware that is not occupied during the first interval.
5. Recompute the toy design
Section titled “5. Recompute the toy design”Verify the selected distances for one and two factories. Does moving from two factories to four reduce runtime, and how does it affect the round-fault bound?
Solution
For one factory and distance 17,
Distance 19 instead gives . With two factories, distance 17 gives ; distance 15 fails. Four factories still take rounds because the layers are sequential, while protecting more allocated patches raises the bound to . Extra production capacity is not useful for this schedule.
6. Mean supply does not prevent a delay
Section titled “6. Mean supply does not prevent a delay”Four factories independently accept with probability , each delivering two states if accepted. Compute the chance of a shortage when six states are needed in an interval with no stored states.
Solution
Let . A shortage occurs for , so
Mean supply exceeds demand, but the shortage probability is still 5.23%. Its effect on total runtime depends on buffering and what happens after a shortage.
7. Price a recognizable restart
Section titled “7. Price a recognizable restart”Each attempt lasts 6 hours and succeeds recognizably with probability , independently. Find expected completion time and a reservation sufficient for 99% probability of success.
Solution
The expectation is hours. Failure of all attempts has probability . Two attempts give only 96% chance of at least one success; three give 99.2%. An 18-hour reservation therefore suffices in this model. This reasoning would not identify a correct answer if failures were undetectable.
8. Include all stages of a code cycle
Section titled “8. Include all stages of a code cycle”Four two-qubit layers each take 20 ns, followed sequentially by 100 ns measurement, 80 ns reset and 40 ns synchronization. Compute the cycle time. How would doubling this time affect the toy example if all error probabilities per round and all round counts stayed fixed?
Solution
The cycle takes ns. Under the stated fixed-per-round assumptions, doubling it doubles wall-clock runtime and qubit-seconds, leaving selected distance, physical qubits and round-fault bound unchanged. If noise instead accumulates at a fixed rate per second, the per-round error changes too; then the entire protection calculation must be repeated.
References
Section titled “References”- M. E. Beverland, P. Murali, M. Troyer, K. M. Svore, T. Hoefler, V. Kliuchnikov, G. H. Low, M. Soeken, A. Sundaram and A. Vaschillo, “Assessing requirements to scale to practical quantum advantage,” arXiv:2211.07629 (2022), arXiv.
- A. G. Fowler, M. Mariantoni, J. M. Martinis and A. N. Cleland, “Surface codes: Towards practical large-scale quantum computation,” Physical Review A 86, 032324 (2012), doi:10.1103/PhysRevA.86.032324, arXiv:1208.0928.
- C. Gidney and M. Ekerå, “How to factor 2048 bit RSA integers in 8 hours using 20 million noisy qubits,” Quantum 5, 433 (2021), doi:10.22331/q-2021-04-15-433, arXiv:1905.09749.
- D. Litinski, “A game of surface codes: Large-scale quantum computing with lattice surgery,” Quantum 3, 128 (2019), doi:10.22331/q-2019-03-05-128, arXiv:1808.02892.
- D. Litinski, “Magic state distillation: Not as costly as you think,” Quantum 3, 205 (2019), doi:10.22331/q-2019-12-02-205, arXiv:1905.06903.