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, and the loop above prints it like this:
Reading it: each step up in code distance suppresses the total error by roughly two orders of magnitude here, so you can pick the smallest distance that meets your target fidelity — trading physical-qubit overhead against logical accuracy.