Skip to main content
estimate_total_errors combines a routed program (from routing) with the logical_noise fits (from initializing the logical noise model) to estimate the program’s total error (1 - fidelity) at each requested code distance. Larger code distances suppress errors further, at the cost of more physical qubits.
estimate_total_errors returns a dict mapping each code distance to its estimated total error. For the Bell-state program from the routing guide and the public/depolarize_1e-3 noise model, the loop above prints:
Reading it: each step up in code distance suppresses the total error by about a factor of five here, so you can pick the smallest distance that meets your target fidelity, trading physical-qubit overhead against logical accuracy. estimate_total_errors reports only the error side of that trade-off. To see the physical-qubit cost at each distance, follow the end-to-end tutorial, which computes the footprint from the routed program’s layout.
The output above is from an actual run of this example. Your numbers depend on the program and the noise model you use.