ZKSF logo, a neon quantum brainZKSF
← All articles

Logical Qubits vs Physical Qubits

Last updated · 11 min read · ZKSF team

When a company announces a quantum computer with 100 qubits, they mean 100 physical qubits. When a paper says an algorithm needs 100 qubits, it usually means 100 logical ones. Those two sentences differ by a factor of somewhere between twenty and three thousand, and almost every confused argument about quantum timelines comes from sliding between them.

This post measures the factor rather than citing it. Everything below is the output of a script: Stim generates rotated surface code memory experiments, a minimum-weight matching decoder corrects them, and the logical error rate is counted over 40,000 shots per point.

What a logical qubit is

A physical qubit is a thing on a chip. It decoheres, its gates misfire, and its measurement occasionally lies.

A logical qubit is a pattern of many physical qubits, arranged so that the information is stored in correlations no single physical error can reach. The surface code is the leading arrangement: data qubits on a grid, measurement qubits between them repeatedly checking parities. A single error flips some parities, the pattern of flips says where it was, and a decoder undoes it.

The code distance d is the number of physical errors needed to change the logical state without being detected. A rotated surface code of distance d uses d^2 data qubits and d^2 - 1 measurement qubits.

distance   data   measure   physical qubits per logical
   3         9       8            17
   5        25      24            49
   7        49      48            97
   9        81      80           161
  11       121     120           241

Those counts are exact, not estimates: 2d^2 - 1. We verified them against the circuits Stim generates by counting the qubit indices each one actually touches, which is worth doing, because Stim's own num_qubits reports 26, 64 and 118 for these three. That figure counts coordinate slots rather than qubits in use, and quoting it would have overstated the overhead by about 20%.

The measurement

A memory experiment is the simplest useful test of a code. Prepare a logical zero, run d rounds of syndrome extraction while noise acts, measure, decode, and ask whether the logical value survived. Every operation carries depolarizing noise at rate p, every reset can flip, and every measurement can lie.

import stim, pymatching, numpy as np

circuit = stim.Circuit.generated(
    "surface_code:rotated_memory_z",
    distance=d, rounds=d,
    after_clifford_depolarization=p,
    after_reset_flip_probability=p,
    before_measure_flip_probability=p,
    before_round_data_depolarization=p,
)
sampler = circuit.compile_detector_sampler()
detections, observables = sampler.sample(40_000, separate_observables=True)
matcher = pymatching.Matching.from_detector_error_model(
    circuit.detector_error_model(decompose_errors=True))
predictions = matcher.decode_batch(detections)
errors = np.sum(predictions[:, 0] != observables[:, 0])

That is the whole experiment. Here is what it returns, as a logical error rate per shot, 40,000 shots per cell.

physical error p    d=3        d=5        d=7
     0.001        0.00072    0.00017    0.00003
     0.002        0.00282    0.00095    0.00022
     0.003        0.00675    0.00313    0.00168
     0.005        0.01835    0.01280    0.01055
     0.008        0.04030    0.04855    0.05205
     0.012        0.08040    0.12662    0.16812
     0.020        0.17112    0.30400    0.40623

The crossing is the whole subject

Read down the first three rows. At a physical error rate of 0.1%, going from distance 3 to distance 7 takes the logical error rate from 7.2 in ten thousand to 3 in a hundred thousand: a factor of 24, bought with 80 extra physical qubits.

Now read the last three rows. At 2%, the same change makes the logical error rate worse, from 17% to 41%. More physical qubits, more places for an error to begin, and a decoder that can no longer tell which errors happened.

Between those regimes is the threshold, and our data puts it between 0.5% and 0.8%: at 0.5% the larger codes are still winning, at 0.8% they have started losing. That is the number that matters in hardware announcements, because below it error correction is an engineering problem and above it error correction does not work at all, however many qubits you buy.

What it costs to get to a useful error rate

A serious algorithm might run 10^15 logical operations, so it needs a logical error rate somewhere near 10^-15. Our measured column at p = 0.001 gives the suppression per two steps of distance: 0.00072 to 0.00017 is a factor of 4.2, and 0.00017 to 0.00003 is a factor of 5.7.

Extrapolating at that rate from distance 7:

target logical error rate    1e-15
starting point               3e-05 at distance 7
suppression per +2 distance  ~5x
distance required            39
physical qubits per logical  3,041

The extrapolation assumes the suppression factor stays constant as distance grows, which is the standard assumption and is optimistic in at least one respect. It ignores the classical decoding load, which grows with the code and has to keep up in real time.

How many physical qubits is one logical qubit? Measure it at your own error rate. Everything above used 0.1 percent because that is where good superconducting hardware sits today, but the answer moves with the device, and every published estimate takes that rate as a number you supply rather than one it measures. The same experiment runs here against whatever rate you give it: three distances, a fitted suppression factor, and a qubit count that says which half of it was measured and which was extrapolated. It costs a fraction of a cent.

What today's machines actually have

Every processor you can rent today, including all eight on this service, exposes physical qubits with no error correction between you and the hardware. When you run a circuit on a 108-qubit superconducting processor, you are using 108 physical qubits and receiving their raw error rates.

That is why we attach a measured fidelity to hardware runs rather than a qubit count. A hardware certificate compares the counts a device returned against the exact distribution the circuit should have produced, which is a statement about that run on that machine. Three qubits at 95% fidelity and three qubits at 99.9% are not the same purchase, and only one of those numbers tells you which you got.

Here is that gap on one two-qubit problem, the H2 molecule at equilibrium. The classical engines return the ideal value because they are computing it; the hardware rows are physical qubits answering the same question with nothing correcting them.

Run on our engines

The H2 molecule at its equilibrium bond length, whose exact electronic ground state is -1.857275 Ha. Two qubits, so it fits every device we offer. Submitted to each kind of compute we offer, on 16 September 2026. Every figure below is a real job on the service, priced as any customer would be priced.

DeviceEngineKindQubitsResultCost
CPUexact.cpuCPU2ZZ = -1.0000, the ideal value certificate$0.0001
NVIDIAexact.gpuGPU2ZZ = -1.0000, the ideal value certificate$0.0001
IQMqpu.iqm.garnetQPU2ZZ = -0.9326, superconducting, 4,096 shots certificate$6.239
Rigettiqpu.rigettiQPU2ZZ = -0.5420, superconducting, 4,096 shots * certificate$2.041
Rigettiqpu.rigettiQPU2ZZ = -0.5107, the same circuit re-run * certificate$2.041
AQTqpu.aqt.ibexQPU2ZZ = -0.9200, trapped ion, 100 shots certificate$2.650
CPUneural.cpuCPU2-1.116981 Ha total, 0.0203 Ha above exact certificate$0.0001
Google Cloud TPUneural.tpuTPU2-1.116981 Ha total, 0.0203 Ha above exact certificate$0.074

* The two Rigetti rows are one circuit run twice, an internal reproduction of the published benchmark notebook. A depolarizing noise model puts both versions at about -0.99, so the shortfall is not the circuit shape, but the identical program has not yet run on both devices. The steps are in the docs.

A note on the hardware certificates: they state Hellinger fidelity against the exact distribution. For an optimisation circuit that distribution is spread across many outcomes rather than concentrated on one, so the figure is low by construction and is not a measure of whether the device found a good answer. The result column above is.

The same problem is yours to run: every instance here is seeded, so it rebuilds exactly. Open the console and a cost estimate is free before anything executes.

The quantity measured is a ZZ expectation whose exact value is -1.0000, so every digit of the shortfall on a hardware row is physical error plus sampling noise. That is the honest picture of a physical qubit today, and it is the distance error correction exists to close. The full benchmark is on chemicals and pharma.

Simulating error correction is cheap, which is the useful part

The circuits above are made entirely of Clifford gates, which the Gottesman-Knill theorem says are classically simulable in polynomial time. That is why a distance-7 surface code with 40,000 shots decodes in a fraction of a second on a laptop, while simulating 97 arbitrary qubits is impossible.

It is also why error-correction research runs ahead of error-correction hardware. You can test a code, a decoder and a noise model long before anyone can build the thing. On this service the same class of circuit runs on the clifford engine, which handled a 1001-qubit error-correcting code for a hundredth of a cent, with a certificate reporting an error bound of exactly zero because the method is exact.

Clifford circuits and Stim covers why that works, and simulating quantum error correction walks through building the codes.

The short version

  • A logical qubit costs 2d^2 - 1 physical qubits in the surface code: 17 at distance 3, 97 at distance 7
  • Adding physical qubits helps only below the threshold, which we measure between 0.5% and 0.8% physical error rate. Above it, larger codes are worse
  • Reaching a 10^-15 logical error rate from today's best figures needs distance 39, about 3,041 physical qubits per logical qubit
  • Nothing you can rent today has any of this. Announced qubit counts are physical, and the useful question is the fidelity of the run you actually did

Everything here is runnable on your own circuit. Try it in the console

Reproducing the table needs pip install stim pymatching and the loop above. It takes a couple of minutes on a laptop, and it is a better guide to quantum timelines than any roadmap slide.

Run your own 100-qubit circuit, with an error bar.

Share this articleLink copied