
\section{Overview of error correction experiments}

\begin{table*}[hb]
\caption{\label{table:experiments}Summary of various error correction and error detection experiments.
    Experiments using ``classical" codes (i.e. codes that only detect one type of error e.g. only phase flips or only bit flips) use $[n,k,d]$ code notation instead of quantum $[[n,k,d]]$ code notation.
    Entries with an N/A are experiments related to embedding error correction into the physical qubits as opposed to layering the error correction on top of the physical qubits.}
\resizebox{\linewidth}{!}{

\begin{tabular}{cccccccccc}
\hline\hline
Paper & Year & Code name & [[\#data,\#logical,distance]] & Physical qubits & Rounds & Physical qubit type \\
\hline
\cite{cory1998experimental} & 1998 & Repetition Code & [3,1,3] & 3 & single shot & NMR \\
\cite{knill2001benchmarking} & 2001 & Perfect Code & [[5,1,3]] & 5 & single shot & NMR \\
\cite{schindler2011experimental} & 2011 & Repetition Code & [3,1,3] & 3 & 3 & Ion trap \\
\cite{moussa2011demonstration} & 2011 & Repetition Code & [3,1,3] & 3 & 2 & NMR \\
\cite{zhang2011experimental} & 2011 & Repetition Code & [3,1,3] & 3 & single shot & NMR \\
\cite{reed2012realization} & 2012 & Repetition Code & [3,1,3] & 3 & single shot & Superconducting \\
\cite{zhang2012experimental} & 2012 & Perfect Code & [[5,1,3]] & 5 & single shot & NMR \\
\cite{bell2014experimental} & 2014 & Surface Code & [[4,1,2]] & 4 & single shot & Photons \\
\cite{kelly2015state} & 2014 & Repetition Code & [3,1,3]-[5,1,5] & 9 & 8 & Superconducting \\
\cite{nigg2014quantum} & 2014 & Color Code & [[7,1,3]] & 7 & single shot & Ion trap \\
\cite{waldherr2014quantum} & 2014 & Repetition Code & [[3,1,3]] & 4 & single shot & NV center \\
\cite{riste2015detecting} & 2015 & Repetition Code & [3,1,3] & 5 & single shot & Superconducting \\
\cite{corcoles2015demonstration} & 2015 & Bell State & [[2,0,2]] & 4 & single shot & Superconducting \\
\cite{cramer2016repeated} & 2016 & Repetition Code & [3,1,3] & 4 & 1-3 & Superconducting \\
\cite{ofek2016extending} & 2016 & Cat States & N/A & 1 & 1-6 & 3D cavity \\
\cite{takita2017experimental} & 2017 & Color Code & [[4,2,2]] & 5 & single shot & Superconducting \\
\cite{linke2017fault} & 2017 & Color Code & [[4,2,2]] & 5 & single shot & Ion trap \\
\cite{wootton2018repetition} & 2018 & Repetition Code & [3,1,3]-[8,1,8] & 15 & single shot & Superconducting \\
\cite{andersen2019entanglement} & 2019 & Bell State & [[2,0,2]] & 3 & 1-12 & Superconducting \\
\cite{gong2019experimental} & 2019 & Perfect Code & [[5,1,3]] & 5 & single shot & Superconducting \\
\cite{hu2019quantum} & 2019 & Binomial Bosonic States & N/A & 1 & 1-19 & 3D cavity \\
\cite{wootton2020benchmarking} & 2020 & Repetition Code & [3,1,3]-[22,1,22] & 5-43 & single shot & Superconducting \\
\cite{andersen2020} & 2020 & Surface Code & [[4,1,2]] & 7 & 1-11 & Superconducting \\
\cite{bultink2020protecting} & 2020 & Bell State & [[2,0,2]] & 3 & 1-26 & Superconducting \\
\cite{egan2021fault} & 2020 & Bacon-Shor Code & [[9,1,3]] & 15 & single shot & Ion trap \\
\cite{luo2020quantum} & 2020 & Bacon-Shor Code & [[9,1,3]] & 11 & single shot & Photons \\
\cite{campagne2020quantum}& 2020 & GKP States & N/A & 1 & 1-200 & 3D cavity \\
\cite{chen2021exponential} & 2020 & Repetition Code & [3,1,3]-[11,1,11], [[4,1,2]] & 5-21 & 1-50 & Superconducting \\
\cite{ryan2021realization} & 2021 & Color Code & [[7,1,3]] & 10 & 2-12 & Ion trap \\
\cite{zhao2021realizing} & 2021 & Surface Code & [[9,1,3]] & 17 & 1-11 & Superconducting \\
\cite{abobeih2022fault} & 2022 & Perfect Code & [[5,1,3]] & 7 & 1-11 & NV center \\
\cite{krinner2022realizing} & 2022 & Surface Code & [[9,1,3]] & 17 & 1-16 & Superconducting \\
\cite{marques2022logical} & 2022 & Surface Code & [[4,1,2]] & 7 & 1-15 & Superconducting \\
\cite{sundaresan2022matching} & 2022 & Subsystem Code & [[9,1,3]] & 23 & 1-10 & Superconducting \\
\cite{bluvstein2022quantum} & 2022 & Surface Code & [[13, 1, 3]] & 19 & 1 & Rydberg \\
\cite{bluvstein2022quantum} & 2022 & Toric Code & [[16, 2, 2]] & 24 & 1 & Rydberg \\
This work & 2022 & Repetition Code & [3,1,3]-[25,1,25] & 5-49 & 50 & Superconducting \\
This work & 2022 & Surface Code & [[9,1,3]]-[[25,1,5]] & 17-49 & 1-25 & Superconducting \\
\hline\hline
\end{tabular}

}
\end{table*}

\section{Introduction}

Since Feynman's proposal to compute using quantum mechanics \cite{feynman1982simulating}, many potential applications have emerged, including factoring \cite{shor1999polynomial}, optimization \cite{farhi2001quantum}, machine learning \cite{biamonte2017quantum}, quantum simulation \cite{lloyd1996universal}, and quantum chemistry \cite{aspuru2005simulated}. These applications often require billions of quantum operations \cite{reiher2017elucidating, gidney2019factor, kivlichan2020improved} while state-of-the-art quantum processors typically have error rates around $10^{-3}$ per gate \cite{ballance2016high, huang2019fidelity, rol2019fast, jurcevic2020demonstration, foxen2020demonstrating, wu2021strong}, far too high to execute such large circuits. Fortunately, quantum error correction can exponentially suppress the operational error rates in a quantum processor, at the expense of physical qubit overhead \cite{knill1998resilient, aharonov2008fault}.

Several works have reported quantum error correction on small codes able to correct a single error \cite{ryan2021realization, egan2021fault, krinner2022realizing, sundaresan2022matching, zhao2021realizing, abobeih2022fault, satzinger2021realizing} and in continuous variable codes \cite{ofek2016extending, fluhmann2019encoding, campagne2020quantum, grimm2020stabilization}. However, a crucial question remains: will scaling up the error-correcting code size reduce logical error rates in a real device? In theory, logical errors should be reduced if physical errors are sufficiently sparse in the quantum processor. In practice, demonstrating reduced logical error requires scaling up a device to support a code which can correct at least two errors, without sacrificing state-of-the-art performance. In this work, we report a 72-qubit superconducting device supporting a 49-qubit distance-5 ($d=5$) surface code that narrowly outperforms its average subset 17-qubit distance-3 surface code, demonstrating a critical step towards scalable quantum error correction. 

\vspace{6ex}
\tocless\section{Surface codes with superconducting qubits}

\begin{figure}[t]
    \centering
    \includegraphics[width=89mm]{figures/fig1_20220712_1000.pdf}
    \caption{
    \textbf{Implementing surface code logical qubits.} 
    \textbf{a,} Schematic of a 72-qubit Sycamore device with a distance-5 surface code embedded, consisting of 25 data qubits (gold) and 24 measure qubits (blue). Each measure qubit is associated with a stabiliser (blue colored tile, dark: $X$, light: $Z$). Representative logical operators $Z_L$ (black) and $X_L$ (green) traverse the array, intersecting at the lower-left data qubit. The upper-right quadrant (red outline) is one of four subset distance-3 codes (the four quadrants) we compare to distance-5.
    \textbf{b,} Illustration of a stabiliser measurement, focusing on one data qubit (gold) and one measure qubit (blue), in perspective view with time progressing to the right. Each qubit participates in four controlled-Z (CZ) gates with its four nearest neighbours, interspersed with Hadamard gates (H), and finally, the measure qubit is measured and reset to $|0\rangle$. Data qubits perform dynamical decoupling (DD) while waiting for the measurement and reset. All stabilisers are measured in this manner concurrently. 
    Cycle duration is 921~ns, including 500~ns measurement and 160~ns reset.
    \textbf{c,} Cumulative distributions of errors for single-qubit gates, CZ gates, measurement, and data qubit DD (idle during measurement and reset). Benchmarked in simultaneous operation using random circuit techniques, on the 49 qubits used in distance-5 and the four CZ layers from the stabiliser circuit \cite{emerson2005scalable, arute2019quantum}. Vertical lines are means.
    }
\end{figure}

Surface codes \cite{kitaev2003, dennis2002topological, raussendorf2007fault, fowler2012surface, satzinger2021realizing} are a family of quantum error-correcting codes which encode a logical qubit into the joint entangled state of a $d\times d$ square of physical qubits, referred to as \emph{data qubit}s. The logical qubit states are defined by a pair of anti-commuting logical observables $X_L$ and $Z_L$. For the example shown in Fig.~1a, a $Z_L$ observable is encoded in the joint $Z$-basis parity of a line of qubits which traverse the lattice from top-to-bottom, and likewise an $X_L$ observable is encoded in the joint $X$-basis parity traversing left-to-right. 
This non-local encoding of information protects the logical qubit from local physical errors, provided we can detect and correct them.

To detect errors, we periodically measure $X$ and $Z$ parities of adjacent clusters of data qubits with the aid of $d^2 - 1$ \emph{measure qubits} interspersed throughout the lattice. As shown in Fig.~1b, each measure qubit interacts with its neighbouring data qubits in order to map the joint data qubit parity onto the measure qubit state, which is then measured. These parity measurements, or \emph{stabilisers}, are laid out so that each one commutes with the logical observables of the encoded qubit as well as every other stabiliser. Consequently, we can detect errors when parity measurements change unexpectedly, without disturbing the logical qubit state.

A \emph{decoder} uses the history of stabiliser measurement outcomes to infer likely configurations of physical errors on the device. We can then determine the overall effect of these inferred errors on the logical qubit, thus preserving the logical state.  Most surface code logical gates can be implemented by maintaining logical memory and executing different sequences of measurements on the code boundary \cite{horsman2012, fowler2019}. Thus, we focus on preserving logical memory, the core technical challenge in operating the surface code.

We implement the surface code on an expanded Sycamore device \cite{arute2019quantum} with 72 transmon qubits \cite{koch2007charge} and 121 tunable couplers \cite{neill2017path, yan2018tunable}. Each qubit is coupled to four nearest neighbours except on the boundaries, with mean qubit coherence times $T_1$ = 20~$\mu$s and $T_{2,\textrm{CPMG}}$ = 30~$\mu$s. As in Ref.\,\cite{chen2021exponential}, we implement single-qubit rotations, controlled-Z (CZ) gates, reset, and measurement, demonstrating similar or improved simultaneous performance as shown in Fig.~1c.

The distance-5 surface code logical qubit is encoded on a 49-qubit subset of the device, with 25 data qubits and 24 measure qubits. Each measure qubit corresponds to one stabiliser, classified by its basis ($X$ or $Z$) and the number of data qubits involved (weight, 2 or 4). Ideally, to assess how logical performance scales with code size, we would compare distance-5 and distance-3 logical qubits under identical noise.  Although device inhomogeneity makes this comparison difficult, we can compare the distance-5 logical qubit to the average of four distance-3 logical qubit subgrids, each containing 9 data qubits and 8 measure qubits. These distance-3 logical qubits cover the four quadrants of the distance-5 code with minimal qubit overlap, capturing the average performance of the full distance-5 grid.

In a single instance of the experiment, we initialise the logical qubit state, run several cycles of error correction, then measure the final logical state. We show an example in Fig.~2a. 
To prepare a $Z_L$ eigenstate, we first prepare the data qubits in $|0\rangle$’s and $|1\rangle$’s, an eigenstate of the $Z$ stabilisers. The first cycle of stabiliser measurements then projects the data qubits into an entangled state that is also an eigenstate of the $X$ stabilisers. 
Each cycle contains CZ and Hadamard gates sequenced to extract $X$ and $Z$ stabilisers simultaneously, and ends with the measurement and reset of the measure qubits. In the final cycle, we also measure the data qubits in the $Z$ basis, yielding both parity information and a measurement of the logical state. 
Preparing and measuring $X_L$ eigenstates proceeds analogously.
The instance succeeds if the corrected logical measurement agrees with the known initial state; otherwise, a logical error has occurred.

Our stabiliser circuits contain a few modifications \cite{supplement} to the standard gate sequence described above, including phase corrections to correct for unintended qubit frequency shifts \cite{kelly2016scalable} and dynamical decoupling gates during qubit idles. We also remove certain Hadamard gates to implement the \emph{ZXXZ} variant of the surface code \cite{wen2003quantum,bonilla2021xzzx}, helping to symmetrise the $X$- and $Z$-basis logical error rates. Finally, during initialization, the data qubits are prepared into randomly selected bitstrings. This ensures that we do not preferentially measure even parities in the first few rounds of the code, which could artificially lower logical error rates due to bias in measurement error.

\vspace{6ex}
\tocless\section{Error detectors}

\begin{figure*} [t]
    \centering
    \includegraphics[width=183mm]{figures/fig2_20220704_1000.pdf}
    \caption{
    \textbf{Error detection in the surface code.}
    \textbf{a,} Illustration of a surface code experiment, in perspective view with time progressing to the right. We begin with an initial data qubit state which has known parities in one stabiliser basis (here, $Z$). We show example errors that manifest in detection pairs: a $Z$ error (red) on a data qubit (spacelike pair), a measurement error (purple) on a measure qubit (timelike pair), an $X$ error (blue) during the CZ gates (diagonal pair), and a measurement error (green) on a data qubit (detected in the final inferred $Z$ parities).
    \textbf{b,} Detection probability for each stabiliser over a 25-cycle distance-5 experiment (50,000 repetitions). Darker lines: average over all stabilisers with the same weight. 
    There are fewer detections at $t=0$ because there is no preceding data idling, and at $t=25$ because the final parities are calculated from data qubit measurements.
    \textbf{c,} Detection probability heatmap, averaging over $t=1$ to 24.
    \textbf{d-e,} Similar to \textbf{b-c} for four separate distance-3 experiments covering the four quadrants of the distance-5 code.
    \textbf{f-g,} Similar to \textbf{b-c} using a simulation with Pauli errors plus leakage, crosstalk, and stray interactions (\emph{Pauli+}).
    \textbf{h,} Bar chart summarising the detection correlation matrix $p_{ij}$, comparing the distance-5 experiment from \textbf{b} to the simulation in \textbf{f} (\emph{Pauli+}) and a simpler simulation with only Pauli errors. We aggregate four groups of correlations: timelike pairs; spacelike pairs; diagonal pairs expected for Pauli noise; and diagonal pairs unexpected for Pauli noise (``Unexp.''), including correlations over two timesteps. Each bar shows a mean and standard deviation of correlations from a 25-cycle, 50,000-repetition dataset.
    }
\end{figure*}

After initialisation, parity measurements should produce the same value in each cycle, up to known flips applied by the circuit. If we compare a parity measurement to the corresponding measurement in the preceding cycle and their values are inconsistent, a \emph{detection event} has occurred, indicating an error. We refer to these comparisons as \emph{detectors}.

The detection event probabilities for each detector indicate the distribution of physical errors in space and time while running the surface code.  In Fig.~2, we show the detection event probabilities in the distance-5 code (b, c) and the distance-3 codes (d, e) running for 25 rounds, as measured over 50,000 experimental instances. For the weight-4 stabilisers, the average detection probability is $0.185\pm 0.018$ ($1\sigma$) in the distance-5 code and $0.175 \pm 0.017$ averaged over the distance-3 codes. The weight-2 stabilisers interact with fewer qubits and hence detect fewer errors.  Correspondingly, they yield a lower average detection probability of $0.119 \pm 0.012$ in the distance-5 code and $0.115 \pm 0.008$ averaged over the distance-3 codes. The relative consistency between code distances suggests that growing the lattice does not substantially increase the component error rates during error correction.

The average detection probabilities exhibit a relative rise of 12\% for distance-5 and 8\% for distance-3 over 25 cycles, with a typical characteristic risetime of roughly 5 cycles \cite{supplement}.
We attribute this rise to data qubits leaking into non-computational excited states and anticipate that the inclusion of leakage-removal techniques on data qubits would help to mitigate this rise \cite{aliferis2005fault, suchara2015leakage, mcewen_removing_2021, chen2021exponential}. We hypothesise that the greater increase in detection probability in the distance-5 code is due to increased stray interactions or leakage from simultaneously operating more gates and measurements.

We test our understanding of the physical noise in our system by comparing the experimental data to a simulation. We begin with a Pauli simulation based on the component error information in Fig.~1c in a probabilistic Clifford simulator, then incorporate coherence information, transitions to leaked states, and crosstalk errors from unwanted coupling (\emph{Pauli+}). Fig.~2f shows that this second simulator accurately predicts the average detection probabilities, finding $0.180 \pm 0.013$ for the weight-4 stabilisers and $0.116 \pm 0.011$ for the weight-2 stabilisers, with average detection probabilities increasing 7\% over 25 rounds (distance-5).
\vspace{6ex}
\tocless\section{Understanding errors through correlations}

We next examine pairwise correlations between detection events, which give us fine-grained information about which types of errors are occurring during error correction.  Fig.~2a illustrates a few examples of pairwise detections which are generated by $X$ or $Z$ errors in the surface code. Measurement and reset errors are detected by the same stabiliser in two consecutive rounds, which we classify as a \emph{timelike} pair.  Data qubits may experience an $X$ ($Z$) error while idling during measurement which is detected by its neighbouring $Z$ ($X$) stabilisers in the same round, forming a \emph{spacelike} pair. Errors during CZ gates may cause a variety of pairwise detections to occur, including \emph{diagonal} pairs which are separated in both space and time. More complex clusters of detection events arise when a $Y$ error occurs, which generates detection events for both $X$ and $Z$ errors.

To estimate probabilities of detection event pairs from our data, we compute an appropriately normalised correlation $p_{ij}$ between detection events occurring on any two detectors $i$ and $j$ \cite{chen2021exponential}. In Fig.~2h, we show the estimated probabilities for experimental and simulated distance-5 data, aggregated and averaged according to the different classes of pairs.  In addition to the expected pairs, we also quantify how often detection pairs occur which are unexpected from component Pauli errors. 
Overall, the Pauli simulation systematically underpredicts these probabilities compared to experimental data, while the \emph{Pauli+} simulation is closer and predicts the presence of unexpected pairs, 
which we surmise are related to leakage and stray interactions.  
These errors can be especially harmful to the surface code because they can generate multiple detection events distantly separated in space or time, which a decoder might wrongly interpret as multiple independent component errors. We expect that mitigating leakage and stray interactions will become increasingly important as error rates decrease.
\vspace{6ex}
\tocless\section{Decoding and logical error probabilities}

\begin{figure}[t]
    \includegraphics[width=89mm]{figures/fig3_20220712_1100.pdf}
    \caption{
    \textbf{Logical error reduction.} 
    \textbf{a,} Logical error probability $p_L$ vs. cycle comparing distance-5 (blue) to distance-3 (pink: four separate quadrants, red: average), all averaged over $Z_L$ and $X_L$. 
    Each individual datapoint represents 100,000 repetitions.
    Solid line: fit to experimental average, $t=3$ to 25 (see main text).
    Dotted line: comparison to \emph{Pauli+} simulation.
    \textbf{b,} Logical fidelity $F=1-2p_L$ vs. cycle, semilog plot. Same experimental averages and fits from \textbf{a}. 
    \textbf{c,} Summary of experimental progression comparing logical error per round $\varepsilon_d$ (specifically plotting $1-\varepsilon_d$) between distance-3 and $5$, where system improvements lead to faster improvement for distance-5 (see main text). Each open circle is a comparison to a specific distance-3 code, and filled circles average over multiple distance-3 codes measured in the same session. Markers are colored chronologically from light to dark. Typical $1\sigma$ statistical and fit uncertainty is $0.02\%$, smaller than the points.
    }
\end{figure}

We next examine the logical performance of our surface code qubits.  To infer the error-corrected logical measurement, the decoder requires a probability model for physical error events.  This information may be expressed as an \emph{error hypergraph}: detectors are vertices, physical error mechanisms are hyperedges connecting the detectors they trigger, and each hyperedge is assigned its corresponding error mechanism probability.  We use a generalisation of $p_{ij}$ to determine these probabilities \cite{chen2021exponential, chen2022calibrated}.

Given the error hypergraph, we implement two different decoders: belief-matching, an efficient combination of belief propagation and minimum-weight perfect matching \cite{higgott2022fragile}; and tensor network decoding, a slow but accurate approximate maximum-likelihood decoder.  
The belief-matching decoder first runs belief propagation on the error hypergraph to update hyperedge error probabilities based on nearby detection events \cite{criger2018multi, higgott2022fragile}.  The updated error hypergraph is then decomposed into a pair of disjoint error graphs, one each for $X$ and $Z$ errors \cite{dennis2002topological}. These graphs are decoded efficiently using minimum-weight perfect matching \cite{fowler2012towards} to select a single probable set of errors.

By contrast, a maximum-likelihood decoder considers all possible sets of errors consistent with the detection events, splits them into two groups based on whether they flip the logical measurement, and chooses the group with the greater total likelihood.
The two likelihoods are each expressed as a tensor network contraction \cite{BSV2014,chubb2021statistical, higgott2022fragile} that exhaustively sums the probabilities of all sets of errors within each group.  We can contract the network approximately, and verify that the approximation converges.  This yields a decoder which is nearly optimal given the hypergraph error priors, but is considerably slower. 
Further improvements could come from a more accurate prior, or incorporating more fine-grained measurement information \cite{suchara2015leakage, pattison2021improved}.

Figure~3 compares the logical error performance of the distance-3 and distance-5 codes using the approximate maximum-likelihood decoder. Because the \emph{ZXXZ} variant of the surface code symmetrises the $X$ and $Z$ bases, differences between the two bases’ logical error per round are small and attributable to spatial variations in physical error rates. Thus, for visual clarity, we report logical error probabilities averaged between the $X$ and $Z$ basis; the full data set may be found in the supplement. Note that we do not post-select on leakage or high-energy events in order to capture the effects of realistic non-idealities on logical performance. Over all 25 cycles of error correction, the distance-5 code realises lower logical error probabilities $p_L$ than the average of the subset distance-3 codes.   

We fit the logical fidelity $F=1-2p_L$ to an exponential decay, starting at $t=3$ to avoid
time-boundary effects that are advantageous to the distance-5 code.
We obtain a logical error per cycle $\varepsilon_5 = (2.914 \pm 0.016)$\% ($1\sigma$ statistical and fit uncertainty) for the distance-5 code, compared to an average of $\varepsilon_3 = (3.028 \pm 0.023)$\% for the subset distance-3 codes, a relative error reduction of about 4\%.  When decoding with the faster belief-matching decoder, we fit a logical error per cycle of $(3.056 \pm 0.015)$\% for the distance-5 code, compared to an average of $(3.118 \pm 0.025)$\% for the distance-3 codes, a relative error reduction of about 2\%. 
We note that the distance-5 logical error per cycle is slightly higher than two of the distance-3 codes individually, and that leakage accumulation may cause distance-5 performance to degrade faster than distance-3 as logical error probability approaches 50\%. 

In principle, the logical performance of a distance-5 code should improve faster than a distance-3 code as physical error rates decrease \cite{fowler2012surface}.
Over time, we improved our physical error rates, for example by optimising single and two qubit gates, measurement, and data qubit idling \cite{supplement}.
In Fig.~3c, we show the corresponding performance progression of distance-5 and distance-3 codes.
The larger code improved about twice as fast until finally overtaking the smaller code, validating the benefit of increased-distance protection in practice.

To understand the contributions of individual components to our logical error performance, we follow Ref.\,~\cite{chen2021exponential} and simulate the distance-5 and distance-3 codes while varying the physical error rates of the various circuit components. Because the logical error-suppression factor $\Lambda_{d/(d+2)} = \varepsilon_d / \varepsilon_{d+2}$ is approximately inversely proportional to the physical error rate, we can budget how much each physical error mechanism contributes to $1/\Lambda$ as shown in Fig.~4a to assess scaling. This error budget shows that CZ error and data qubit decoherence during measurement and reset are dominant contributors. 
\vspace{6ex}
\tocless\section{Algorithmically-relevant error rates with repetition codes}

\begin{figure} [t]
    \centering
    \includegraphics[width=89mm]{figures/fig4_20220712_1300.pdf}
    \caption{
    \textbf{Towards algorithmically-relevant error rates.}
    \textbf{a,} Estimated error budgets for the surface code, based on operation errors (see Fig.~1c) and \emph{Pauli+} simulations.
    $\Lambda_{3/5} = \varepsilon_3/\varepsilon_5$.
    CZ: contributions from CZ error (excluding leakage and stray interactions).
    CZ stray int: CZ error from unwanted interactions.
    DD: dynamical decoupling, data qubit idle error during measurement and reset.
    Measure: measurement and reset error.
    Leakage: leakage during CZs and due to heating.
    1Q: single-qubit gate error.
    \textbf{b,} Logical error for repetition codes. 
    Inset: schematic of the distance-25 repetition code, using the same data and measure qubits as the distance-5 surface code. Smaller codes are subsampled from the same distance-25 data~\cite{chen2021exponential}. 
    A high-energy event resulted in an apparent error floor around $10^{-6}$. After removing the instances nearby (light blue), error decreases more rapidly with code distance.
    50 cycles, $5\times 10^5$ repetitions.
    We also plot the surface code error per cycle from Fig.~3b in black.
    \textbf{c,} Contour plot of simulated surface code logical error per round $\varepsilon_d$ as a function of code distance $d$ and a scale factor $s$ on the error model in Fig.~1c (Pauli simulation, $s=1.0$ corresponds to the current device error model).
    \textbf{d,} Horizontal slices from c, each for a value of error model scale factor $s$. $s=1.3$ is above threshold (larger codes are worse), while $s=1.2$ to $1.0$ represent the crossover regime, where progressively larger codes get better until a turnaround. $s=0.9$ is below threshold (larger codes are better).
}
\end{figure}

Even as known error sources are suppressed in future devices, new dominant error mechanisms may arise as lower logical error rates are realised.  To test the behaviour of codes with substantially lower error rates, we employ the bit-flip repetition code, a 1D version of the surface code.  The bit-flip repetition code does not correct for phase flip errors and is thus unsuitable for quantum algorithms. However, correcting only bit-flip errors allows it to achieve much lower logical error probabilities.

Without post-selection, we achieve a logical error per cycle of $(1.7 \pm 0.3) \times 10^{-6}$ using a distance-25 repetition code decoded with minimum-weight perfect matching.  We attribute many of these high-distance logical errors to a high-energy impact, which can temporarily impart widespread correlated errors to the system \cite{mcewen2022resolving}.  These events may be identified by spikes in detection-event counts \cite{chen2021exponential}, and such error mechanisms must be mitigated for scalable quantum error correction to succeed.  In this case, there was one such event; after removing it (0.15\% of trials), we observe a logical error per cycle of $(1.6 \pm 0.8) \times 10^{-7}$ \cite{supplement}. The repetition code results demonstrate that low logical error rates are possible in a superconducting system, but finding and mitigating highly correlated errors such as cosmic ray impacts will be an important area of research moving forward.
\vspace{6ex}
\tocless\section{Towards large-scale quantum error correction}

To understand how our surface code results project forward to future devices, we simulate the logical error performance of surface codes ranging from distance-3 to 25, while also scaling the physical error rates shown in Fig.~1c. For efficiency, the simulation considers only Pauli errors. Figures 4c-d illustrate the contours of this parameter space, which has three distinct regions. When the physical error rate is high (for example, the initial runs of our surface code in the inset of Fig.~3), logical error probability increases with increasing system size ($\varepsilon_{d+2} > \varepsilon_d$). On the other hand, low physical error rates show the desired exponential suppression of logical error ($\varepsilon_{d+2} < \varepsilon_d$). Our experiment lies in a crossover regime where, due to finite-size effects, increasing system size initially suppresses the logical error rate before later increasing it.

While our device is close to threshold, reaching algorithmically-relevant logical error rates with manageable resources will require an error-suppression factor $\Lambda \gg 1$. Based on the error budget and simulations in Fig.~4, we estimate that component performance must improve by at least 20\% to move below threshold, and significantly improve beyond that to achieve practical scaling. However, these projections rely on simplified models and must be validated experimentally, testing larger code sizes with longer durations to eventually realise the desired logical performance. This work demonstrates the first step in that process, suppressing logical errors by scaling a quantum error-correcting code -- the foundation of a fault-tolerant quantum computer.
\vspace{6ex}
\tocless\section{Author Contributions}
The Google Quantum AI team conceived and designed the experiment. The theory and experimental teams at Google Quantum AI developed data analysis, modeling and metrological tools that enabled the experiment, built the system, performed the calibrations, and collected the data. The modeling was done jointly with collaborators outside Google Quantum AI. All authors wrote and revised the manuscript and the Supplementary Information.
\vspace{6ex}
\tocless\section{Acknowledgements}
We are grateful to S. Brin, S. Pichai, R. Porat, J. Dean, E. Collins, and J. Yagnik for their executive sponsorship of the Google Quantum AI team, and for their continued engagement and support. A portion of this work was performed in the UCSB Nanofabrication Facility, an open access laboratory. J. Marshall  acknowledges support from NASA Ames Research Center (NASA-Google SAA 403512), NASA Advanced Supercomputing Division for access to NASA HPC systems, and NASA Academic Mission Services (NNA16BD14C). D. Bacon is a CIFAR Associate Fellow in the Quantum Information Science Program.
\vspace{6ex}
\tocless\section{Data availability}
The data that support the plots within this paper and other findings of this study are available 
upon reasonable request, or at \href{https://doi.org/10.5281/zenodo.6804040}{10.5281/zenodo.6804040}.

\newpage
\onecolumngrid

\vspace{1em}
\begin{flushleft}
{\small Google Quantum AI: }


\bigskip
{\small
\renewcommand{\author}[2]{#1$^\textrm{\scriptsize #2}$}
\renewcommand{\affiliation}[2]{$^\textrm{\scriptsize #1}$ #2 \\}

\newcommand{\affiliation{1}{Google Research}}{\affiliation{1}{Google Research}}

\newcommand{\affiliation{2}{Department of Physics, Columbia University, New York, NY}}{\affiliation{2}{Department of Physics, Columbia University, New York, NY}}

\newcommand{\affiliation{3}{Department of Electrical and Computer Engineering, University of Massachusetts, Amherst, MA}}{\affiliation{3}{Department of Electrical and Computer Engineering, University of Massachusetts, Amherst, MA}}

\newcommand{\affiliation{4}{Department of Electrical and Computer Engineering, Auburn University, Auburn, AL}}{\affiliation{4}{Department of Electrical and Computer Engineering, Auburn University, Auburn, AL}}

\newcommand{\affiliation{5}{Centre for Quantum Computation and Communication Technology, Centre for Quantum Software and Information, Faculty of Engineering and Information Technology, University of Technology Sydney, NSW 2007, Australia}}{\affiliation{5}{Centre for Quantum Computation and Communication Technology, Centre for Quantum Software and Information, Faculty of Engineering and Information Technology, University of Technology Sydney, NSW 2007, Australia}}

\newcommand{\affiliation{6}{Department of Physics, Institute for Quantum Information and Matter, and Walter Burke Institute for Theoretical Physics, California Institute of Technology, Pasadena, CA}}{\affiliation{6}{Department of Physics, Institute for Quantum Information and Matter, and Walter Burke Institute for Theoretical Physics, California Institute of Technology, Pasadena, CA}}

\newcommand{\affiliation{7}{Department of Electrical and Computer Engineering, University of California, Riverside, CA}}{\affiliation{7}{Department of Electrical and Computer Engineering, University of California, Riverside, CA}}

\newcommand{\affiliation{8}{USRA Research Institute for Advanced Computer Science, Mountain View, CA}}{\affiliation{8}{USRA Research Institute for Advanced Computer Science, Mountain View, CA}}

\newcommand{\affiliation{9}{QuAIL, NASA Ames Research Center, Moffett Field, CA}}{\affiliation{9}{QuAIL, NASA Ames Research Center, Moffett Field, CA}}

\newcommand{\affiliation{10}{Department of Physics, University of California, Santa Barbara, CA}}{\affiliation{10}{Department of Physics, University of California, Santa Barbara, CA}}

\newcommand{\affiliation{11}{Department of Physics and Astronomy, University of California, Riverside, CA}}{\affiliation{11}{Department of Physics and Astronomy, University of California, Riverside, CA}}


\newcommand{1}{1}
\newcommand{2}{2}
\newcommand{3}{3}
\newcommand{4}{4}
\newcommand{5}{5}
\newcommand{6}{6}
\newcommand{7}{7}
\newcommand{8}{8}
\newcommand{9}{9}
\newcommand{10}{10}
\newcommand{11}{11}




\author{Rajeev Acharya}{1},
\author{Igor Aleiner}{1,2},
\author{Richard Allen}{1},
\author{Trond I. Andersen}{1},
\author{Markus Ansmann}{1},
\author{Frank Arute}{1},
\author{Kunal Arya}{1},
\author{Abraham Asfaw}{1},
\author{Juan Atalaya}{1},
\author{Ryan Babbush}{1},
\author{Dave Bacon}{1},
\author{Joseph C. Bardin}{1,3},
\author{Joao Basso}{1},
\author{Andreas Bengtsson}{1},
\author{Sergio Boixo}{1},
\author{Gina Bortoli}{1},
\author{Alexandre Bourassa}{1},
\author{Jenna Bovaird}{1},
\author{Leon Brill}{1},
\author{Michael Broughton}{1},
\author{Bob B. Buckley}{1},
\author{David A. Buell}{1},
\author{Tim Burger}{1},
\author{Brian Burkett}{1},
\author{Nicholas Bushnell}{1},
\author{Yu Chen}{1},
\author{Zijun Chen}{1},
\author{Ben Chiaro}{1},
\author{Josh Cogan}{1},
\author{Roberto Collins}{1},
\author{Paul Conner}{1},
\author{William Courtney}{1},
\author{Alexander L. Crook}{1},
\author{Ben Curtin}{1},
\author{Dripto M. Debroy}{1},
\author{Alexander Del~Toro~Barba}{1},
\author{Sean Demura}{1},
\author{Andrew Dunsworth}{1},
\author{Daniel Eppens}{1},
\author{Catherine Erickson}{1},
\author{Lara Faoro}{1},
\author{Edward Farhi}{1},
\author{Reza Fatemi}{1},
\author{Leslie Flores~Burgos}{1},
\author{Ebrahim Forati}{1},
\author{Austin G. Fowler}{1},
\author{Brooks Foxen}{1},
\author{William Giang}{1},
\author{Craig Gidney}{1},
\author{Dar Gilboa}{1},
\author{Marissa Giustina}{1},
\author{Alejandro Grajales~Dau}{1},
\author{Jonathan A. Gross}{1},
\author{Steve Habegger}{1},
\author{Michael C. Hamilton}{1,4},
\author{Matthew P. Harrigan}{1},
\author{Sean D. Harrington}{1},
\author{Oscar Higgott}{1},
\author{Jeremy Hilton}{1},
\author{Markus Hoffmann}{1},
\author{Sabrina Hong}{1},
\author{Trent Huang}{1},
\author{Ashley Huff}{1},
\author{William J. Huggins}{1},
\author{Lev B. Ioffe}{1},
\author{Sergei V. Isakov}{1},
\author{Justin Iveland}{1},
\author{Evan Jeffrey}{1},
\author{Zhang Jiang}{1},
\author{Cody Jones}{1},
\author{Pavol Juhas}{1},
\author{Dvir Kafri}{1},
\author{Kostyantyn Kechedzhi}{1},
\author{Julian Kelly}{1},
\author{Tanuj Khattar}{1},
\author{Mostafa Khezri}{1},
\author{M\'aria Kieferov\'a}{1,5},
\author{Seon Kim}{1},
\author{Alexei Kitaev}{1,6},
\author{Paul V. Klimov}{1},
\author{Andrey R. Klots}{1},
\author{Alexander N. Korotkov}{1,7},
\author{Fedor Kostritsa}{1},
\author{John Mark Kreikebaum}{1},
\author{David Landhuis}{1},
\author{Pavel Laptev}{1},
\author{Kim-Ming Lau}{1},
\author{Lily Laws}{1},
\author{Joonho Lee}{1},
\author{Kenny Lee}{1},
\author{Brian J. Lester}{1},
\author{Alexander Lill}{1},
\author{Wayne Liu}{1},
\author{Aditya Locharla}{1},
\author{Erik Lucero}{1},
\author{Fionn D. Malone}{1},
\author{Jeffrey Marshall}{8,9},
\author{Orion Martin}{1},
\author{Jarrod R. McClean}{1},
\author{Trevor McCourt}{1},
\author{Matt McEwen}{1,10},
\author{Anthony Megrant}{1},
\author{Bernardo Meurer~Costa}{1},
\author{Xiao Mi}{1},
\author{Kevin C. Miao}{1},
\author{Masoud Mohseni}{1},
\author{Shirin Montazeri}{1},
\author{Alexis Morvan}{1},
\author{Emily Mount}{1},
\author{Wojciech Mruczkiewicz}{1},
\author{Ofer Naaman}{1},
\author{Matthew Neeley}{1},
\author{Charles Neill}{1},
\author{Ani Nersisyan}{1},
\author{Hartmut Neven}{1},
\author{Michael Newman}{1},
\author{Jiun How Ng}{1},
\author{Anthony Nguyen}{1},
\author{Murray Nguyen}{1},
\author{Murphy Yuezhen Niu}{1},
\author{Thomas E. O'Brien}{1},
\author{Alex Opremcak}{1},
\author{John Platt}{1},
\author{Andre Petukhov}{1},
\author{Rebecca Potter}{1},
\author{Leonid P. Pryadko}{11,1},
\author{Chris Quintana}{1},
\author{Pedram Roushan}{1},
\author{Nicholas C. Rubin}{1},
\author{Negar Saei}{1},
\author{Daniel Sank}{1},
\author{Kannan Sankaragomathi}{1},
\author{Kevin J. Satzinger}{1},
\author{Henry F. Schurkus}{1},
\author{Christopher Schuster}{1},
\author{Michael J. Shearn}{1},
\author{Aaron Shorter}{1},
\author{Vladimir Shvarts}{1},
\author{Jindra Skruzny}{1},
\author{Vadim Smelyanskiy}{1},
\author{W. Clarke Smith}{1},
\author{George Sterling}{1},
\author{Doug Strain}{1},
\author{Marco Szalay}{1},
\author{Alfredo Torres}{1},
\author{Guifre Vidal}{1},
\author{Benjamin Villalonga}{1},
\author{Catherine Vollgraff~Heidweiller}{1},
\author{Theodore White}{1},
\author{Cheng Xing}{1},
\author{Z. Jamie Yao}{1},
\author{Ping Yeh}{1},
\author{Juhwan Yoo}{1},
\author{Grayson Young}{1},
\author{Adam Zalcman}{1},
\author{Yaxing Zhang}{1},
\author{Ningfeng Zhu}{1}

\bigskip

\affiliation{1}{Google Research}
\affiliation{2}{Department of Physics, Columbia University, New York, NY}
\affiliation{3}{Department of Electrical and Computer Engineering, University of Massachusetts, Amherst, MA}
\affiliation{4}{Department of Electrical and Computer Engineering, Auburn University, Auburn, AL}
\affiliation{5}{Centre for Quantum Computation and Communication Technology, Centre for Quantum Software and Information, Faculty of Engineering and Information Technology, University of Technology Sydney, NSW 2007, Australia}
\affiliation{6}{Department of Physics, Institute for Quantum Information and Matter, and Walter Burke Institute for Theoretical Physics, California Institute of Technology, Pasadena, CA}
\affiliation{7}{Department of Electrical and Computer Engineering, University of California, Riverside, CA}
\affiliation{8}{USRA Research Institute for Advanced Computer Science, Mountain View, CA}
\affiliation{9}{QuAIL, NASA Ames Research Center, Moffett Field, CA}
\affiliation{10}{Department of Physics, University of California, Santa Barbara, CA}
\affiliation{11}{Department of Physics and Astronomy, University of California, Riverside, CA}
}

\end{flushleft}

\twocolumngrid

\clearpage
\bibliographystyle{naturemag}
\vspace{6ex}
\let\oldaddcontentsline\addcontentslin
\renewcommand{\addcontentsline}[3]{
