Quantum Resource Estimator

Methodology & sources

Every number this site produces comes from the model below. It is deliberately simple, fully exposed, and cited to primary literature.

The model

1. Algorithm resources (input)

You provide three numbers: logical qubits n, Toffoli count, and T-depth (the number of sequential T/Toffoli layers). Presets take these from published costings; custom mode accepts any values.

2. Error correction

Below the surface-code threshold (~1%), the logical error rate per logical-qubit code cycle follows the standard scaling (Fowler et al. 2012):

p_L(d) = 0.1 × (100 × p_phys)^((d+1)/2)

Each logical layer takes d code cycles, so the total logical qubit-cycles are n × d × T-depth. We pick the smallest odd code distance d keeping the total error within your budget (default 33%). Data-block physical qubits = 2 × n × d² (data + measurement ancillas).

3. Magic-state factories

Non-Clifford gates consume distilled |T⟩ states. We assume 4 T gates per Toffoli, 15-to-1-style factories outputting one T per 11 code cycles at a footprint of ~190×d² physical qubits each (order-of-magnitude from Litinski 2019), and a consumption rate of one T per d cycles per layer → 11 factories per layer. That gives the lean bound. The conservative bound assumes a factory-dominated layout with factory footprint = 1.2× the data block, matching studies like Gidney-Ekerå where factories are the bulk of the machine. The truth for any given design lies between - which is why we report a range.

4. Runtime

Wall-clock time = T-depth × d × cycle time. Presets use serial depth, which is pessimistic; parallel factory layouts (Gidney-Ekerå, Gidney 2025) trade more factories for much shorter depth. The factory parallelism control models this: at k× parallelism, k T layers run at once, so effective T-depth = T-depth / k and both factory bounds grow k× (the code distance is re-solved for the shorter run). For RSA-2048 at 2× the defaults give 12-31M qubits and ~10 hours, bracketing Gidney-Ekerå's 20M qubits / 8 hours.

How our defaults compare to published estimates

StudyTargetPublished resultThis tool (defaults)
Gidney & Ekerå 2019 (arXiv:1905.09749)RSA-204820M physical qubits, 8 hours (parallel)12-23M qubits, ~21 hours (serial depth)
Gidney 2025 (arXiv:2505.15917)RSA-2048<1M physical qubits, <1 weekLower error rates / better factories close this gap - try p=0.01%
Reiher et al. 2017 (arXiv:1605.03590)FeMoCo chemistry~108-109 physical qubits, weeks (conservative)1-2M qubits, ~3 days with modern logical counts (Lee et al. 2021 improvements)

Space-time volume

Physical qubit-hours = physical qubits × runtime, shown for the lean and conservative factory bounds, plus logical qubit-cycles (logical qubits × code distance × T-depth). Parallel layouts buy speed with factories, so qubits rise while runtime falls; the product shows whether the trade costs more total machine-time. It is a comparison number, not a hardware cost.

Scripted estimates

The same model runs from the command line with Node 18+ and no dependencies, for sweeps and notebooks. Save estimator.js and bin/qre.js with the same layout, then run node bin/qre.js --preset shor-2048 --p 0.001 --cycle 1 --json. Use --logical, --toffoli and --tdepth for your own algorithm, --hardware ion for a hardware profile, and --list to see presets. It exits 0 on success, 1 when no estimate is feasible (above threshold or error budget unmet) and 2 on a usage error.

Known limitations

Primary sources