  Quantum computing can become scalable through error correction, but logical
error rates only decrease with system size when physical errors are
sufficiently uncorrelated. During computation, unused high energy levels of the
qubits can become excited, creating leakage states that are long-lived and
mobile. Particularly for superconducting transmon qubits, this leakage opens a
path to errors that are correlated in space and time. Here, we report a reset
protocol that returns a qubit to the ground state from all relevant higher
level states. We test its performance with the bit-flip stabilizer code, a
simplified version of the surface code for quantum error correction. We
investigate the accumulation and dynamics of leakage during error correction.
Using this protocol, we find lower rates of logical errors and an improved
scaling and stability of error suppression with increasing qubit number. This
demonstration provides a key step on the path towards scalable quantum
computing.
