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
| Study | Target | Published result | This tool (defaults) |
|---|---|---|---|
| Gidney & Ekerå 2019 (arXiv:1905.09749) | RSA-2048 | 20M physical qubits, 8 hours (parallel) | 12-23M qubits, ~21 hours (serial depth) |
| Gidney 2025 (arXiv:2505.15917) | RSA-2048 | <1M physical qubits, <1 week | Lower 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
- Order-of-magnitude planning tool. Real compilers (Microsoft Azure Quantum Resource Estimator, Qualtran/Qualibrate, BenchQ) trace actual circuits and gate synthesis; use them for engineering decisions.
- Single surface-code model, no alternative codes (qLDPC, color codes) that can cut overhead 10x or more.
- Factory model is a throughput approximation, not a layout; routing and wiring costs are ignored.
- Presets mix publication years; algorithmic improvements since each paper are not back-propagated.
Primary sources
- Fowler, Mariantoni, Martinis, Cleland - "Surface codes: Towards practical large-scale quantum computation," Phys. Rev. A 86, 032324 (2012). arXiv:1208.0928
- Gidney & Ekerå - "How to factor 2048 bit RSA integers in 8 hours using 20 million noisy qubits," Quantum 5, 433 (2021). arXiv:1905.09749
- Gidney - "How to factor 2048 bit RSA integers with less than a million noisy qubits" (2025). arXiv:2505.15917
- Litinski - "Magic State Distillation: Not as Costly as You Think," Quantum 3, 205 (2019). arXiv:1905.06903
- Reiher, Wiebe, Svore, Steiger, Troyer - "Elucidating reaction mechanisms on quantum computers," PNAS 114 (2017). arXiv:1605.03590
- Lee et al. - "Even More Efficient Quantum Computations of Chemistry Through Tensor Hypercontraction," PRX Quantum 2, 030305 (2021). arXiv:2011.03494
- Roetteler, Naehrig, Svore, Lauter - "Quantum resource estimates for computing elliptic curve discrete logarithms," ASIACRYPT 2017. arXiv:1706.06752
- Grassl, Langenberg, Roetteler, Steinwandt - "Applying Grover's algorithm to AES," PQCrypto 2016. arXiv:1512.04965
- Microsoft Azure Quantum Resource Estimator (documentation) - learn.microsoft.com/azure/quantum