```html Authors: Neereja Sundaresan Theodore J. Yoder Youngseok Kim Muyuan Li Edward H. Chen Grace Harper Ted Thorbeck Andrew W. Cross Antonio D. Córcoles Maika Takita Abstract Quantum error correction offers a promising path for performing high fidelity quantum computations. Although fully fault-tolerant executions of algorithms remain unrealized, recent improvements in control electronics and quantum hardware enable increasingly advanced demonstrations of the necessary operations for error correction. Here, we perform quantum error correction on superconducting qubits connected in a heavy-hexagon lattice. We encode a logical qubit with distance three and perform several rounds of fault-tolerant syndrome measurements that allow for the correction of any single fault in the circuitry. Using real-time feedback, we reset syndrome and flag qubits conditionally after each syndrome extraction cycle. We report decoder dependent logical error, with average logical error per syndrome measurement in Z(X)-basis of ~0.040 (~0.088) and ~0.037 (~0.087) for matching and maximum likelihood decoders, respectively, on leakage post-selected data. Introduction The outcomes of quantum computations can be faulty, in practice, due to noise in the hardware. To eliminate the resulting faults, quantum error correction (QEC) codes can be used to encode the quantum information into protected, logical degrees of freedom, and then by correcting the faults faster than they accumulate enable fault-tolerant (FT) computations. A complete execution of QEC will likely require: preparation of logical states; realization of a universal set of logical gates, which may require the preparation of magic states; repeated measurements of syndromes; and the decoding of the syndromes for correcting errors. If successful, the resulting logical error rates should be less than the underlying physical error rates, and decrease with increasing code distances down to negligible values. Choosing a QEC code requires consideration of the underlying hardware and its noise properties. For a heavy-hexagon lattice , of qubits, subsystem QEC codes are attractive because they are well-suited for qubits with reduced connectivities. Other codes have shown promise due to their relatively high threshold for FT or large number of transversal logical gates . Although their space and time overhead may pose a significant hurdle for scalability, there exist encouraging approaches to reduce the most expensive resources by exploiting some form of error mitigation . 1 2 3 4 5 6 In the decoding process, successful correction depends not only on the performance of the quantum hardware, but also on the implementation of the control electronics used for acquiring and processing the classical information obtained from syndrome measurements. In our case, initializing both syndrome and flag qubits via real-time feedback between measurement cycles can help mitigate errors. At the decoding level, whereas some protocols exist to perform QEC asynchronously within a FT formalism , , the rate at which the error syndromes are received should be commensurate with their classical processing time to avoid an increasing backlog of syndrome data. Also, some protocols, like using a magic state for a logical -gate , require the application of real-time feed-forward. 7 8 T 9 Thus, the long term vision of QEC does not gravitate around a single ultimate goal but should be seen as a continuum of deeply interrelated tasks. The experimental path in the development of this technology will comprise the demonstration of these tasks in isolation first and their progressive combination later, always while continuously improving their associated metrics. Some of this progress is reflected in numerous recent advances on quantum systems across different physical platforms, which have demonstrated or approximated several aspects of the desiderata for FT quantum computing. In particular, FT logical state preparation has been demonstrated on ions , nuclear spins in diamond and superconducting qubits . Repeated cycles of syndrome extraction have been shown in superconducting qubits in small error detecting codes , , including partial error correction as well as a universal (albeit not FT) set of single-qubit gates . A FT demonstration of a universal gate set on two logical qubits has recently been reported in ions . In the realm of error correction, there have been recent realizations of the distance-3 surface code on superconducting qubits with decoding and post-selection , as well as a FT implementation of a dynamically protected quantum memory using the color code and the FT state preparation, operation, and measurement, including its stabilizers, of a logical state in the Bacon-Shor code in ions , . 10 11 12 13 14 15 16 17 18 19 20 20 21 Here we combine the capability of real-time feedback on a superconducting qubit system with a maximum likelihood decoding protocol hitherto unexplored experimentally in order to improve the survivability of logical states. We demonstrate these tools as part of the FT operation of a subsystem code , the heavy-hexagon code , on a superconducting quantum processor. Essential to making our implementation of this code fault-tolerant are flag qubits that, when found to be non-zero, alert the decoder to circuit errors. By conditionally resetting flag and syndrome qubits after each syndrome measurement cycle, we protect our system against errors arising from the noise asymmetry inherent to energy relaxation. We further exploit recently described decoding strategies and extend the decoding ideas to include maximum likelihood concepts , , . 22 1 15 4 23 24 Results The heavy-hexagon code and multi-round circuits The heavy-hexagon code we consider is an = 9 qubit code encoding = 1 logical qubit with distance = 3 . The and gauge (see Fig. a) and stabilizer groups are generated by n k d 1 Z X 1 The stabilizer groups are the centers of the respective gauge groups . This means the stabilizers, as products of gauge operators, can be deduced from measurements of only the gauge operators. Logical operators can be chosen to be = 1 2 3 and = 1 3 7. XL X X X ZL Z Z Z (blue) and (red) gauge operators (eqs. ( ) and ( )) mapped onto the 23 qubits required with the distance-3 heavy-hexagon code. Code qubits ( 1 − 9) are shown in yellow, syndrome qubits ( 17, 19, 20, 22) used for stabilizers in blue, and flag qubits and syndromes used in stabilizers in white. The order and direction that CX gates are applied within each sub-section (0 to 4) are denoted by the numbered arrows. Circuit diagram of one syndrome measurement round, including both and stabilizers. The circuit diagram illustrates permitted parallelization of gate operations: those within the bounds set by scheduling barriers (vertical dashed gray lines). As each two-qubit gate duration differs, the final gate scheduling is determined with a standard as-late-as-possible circuit transpilation pass; after which dynamical decoupling is added to data qubits where time permits. Measurement and reset operations are isolated from other gate operations by barriers to allow for uniform dynamical decoupling to be added to idling data qubits. Decoding graphs for three rounds of ( ) and ( ) stabilizer measurements with circuit-level noise allow correction of and errors, respectively. The blue and red nodes in the graphs correspond to difference syndromes, while the black nodes are the boundary. Edges encode various ways errors can occur in the circuit as described in the text. Nodes are labeled by the type of stabilizer measurement ( or ), along with a subscripts indexing the stabilizer, and superscripts denoting the round. Black edges, arising from Pauli errors on code qubits (and so are just size-2), connect the two graphs in and , but are not used in the matching decoder. The size-4 hyperedges, which are not used by matching, but are used in the maximum likelihood decoder. Colors are just for clarity. Translating each in time by one round also gives a valid hyperedge (with some variation at the time boundaries). Also not shown are any of the size-3 hyperedges. a Z X 1 2 Q Q Q Q Q Q Z X b X Z c Z d X X Z Z X e Y c d f Here we focus on a particular FT circuit, many of our techniques can be used more generally with different codes and circuits. Two sub-circuits, shown in Fig. b, are constructed to measure the - and -gauge operators. The -gauge measurement circuit also acquires useful information by measuring flag qubits. 1 X Z Z We prepare code states in the logical () state by first preparing nine qubits in the () state and measuring the -gauge ( -gauge). We then perform rounds of syndrome measurement, where a round consists of a -gauge measurement followed by an -gauge measurement (respectively, -gauge followed by -gauge). Finally, we read out all nine code qubits in the ( ) basis. We perform the same experiments for initial logical states and as well, by simply initializing the nine qubits in and instead. X Z r Z X X Z Z X Decoding algorithms In the setting of FT quantum computing, a decoder is an algorithm that takes as input syndrome measurements from an error correcting code and outputs a correction to the qubits or measurement data. In this section we describe two decoding algorithms: perfect matching decoding and maximum likelihood decoding. The decoding hypergraph is a concise description of the information gathered by a FT circuit and made available to a decoding algorithm. It consists of a set of vertices, or error-sensitive events, , and a set of hyperedges , which encode the correlations between events caused by errors in the circuit. Figure c–f depicts parts of the decoding hypergraph for our experiment. 15 V E 1 Constructing a decoding hypergraph for stabilizer circuits with Pauli noise can be done using standard Gottesman-Knill simulations or similar Pauli tracing techniques . First, an error-sensitive event is created for each measurement that is deterministic in the error-free circuit. A deterministic measurement is any measurement whose outcome ∈ {0, 1} can be predicted by adding modulo two the measurement outcomes from a set of earlier measurements. That is, for an error-free circuit, , where the set can be found by simulation of the circuit. Set the value of the error-sensitive event to − (mod2), which is zero (also called trivial) in the absence of errors. Thus, observing a non-zero (also called non-trivial) error-sensitive event implies the circuit suffered at least one error. In our circuits, error-sensitive events are either flag qubit measurements or the difference of subsequent measurements of the same stabilizer (also sometimes called difference syndromes). 25 26 M m m FM Next, hyperedges are added by considering circuit faults. Our model contains a fault probability for each of several circuit components pC Here we distinguish the identity operation id on qubits during a time when other qubits are undergoing unitary gates, from the identity operation idm on qubits when others are undergoing measurement and reset. We reset qubits after they are measured, while we initialize qubits that have not been used in the experiment yet. Finally cx is the controlled-not gate, h is the Hadamard gate, and x, y, z are Pauli gates. (see Methods “IBM_Peekskill and experimental details” for more detail). Numerical values for are listed in Methods “IBM_Peekskill and experimental details”. pC Our error model is circuit depolarizing noise. For initialization and reset errors, a Pauli is applied with the respective probabilities init and reset after the ideal state preparation. For measurement errors, Pauli is applied with probability before the ideal measurement. A one-qubit unitary gate (two-qubit gate) suffers with probability one of the three (fifteen) non-identity one-qubit (two-qubit) Pauli errors following the ideal gate. There is an equal chance of any of the three (fifteen) Pauli errors occurring. X p p X C pC When a single fault occurs in the circuit, it causes some subset of error-sensitive events to be non-trivial. This set of error-sensitive events becomes a hyperedge. The set of all hyperedges is . Two different faults may lead to the same hyperedge, so each hyperedge may be viewed as representing a set of faults, each of which individually causes the events in the hyperedge to be non-trivial. Associated with each hyperedge is a probability, which, at first order, is the sum of the probabilities of faults in the set. E A fault may also lead to an error which, propagated to the end of the circuit, anti-commutes with one or more of the code’s logical operators, necessitating a logical correction. We assume for generality that the code has logical qubits and a basis of 2 logical operators, but note = 1 for the heavy-hexagon code used in the experiment. We can keep track of which logical operators anti-commute with the error using a vector from . Thus, each hyperedge is also labeled by one of these vectors , called a logical label. Note that if the code has distance at least three, each hyperedge has a unique logical label. k k k h Lastly, we note that a decoding algorithm can choose to simplify the decoding hypergraph in various ways. One way that we always employ here is the process of deflagging. Flag measurements from qubits 16, 18, 21, 23 are simply ignored with no corrections applied. If flag 11 is non-trivial and 12 trivial, apply to 2. If 12 is non-trivial and 11 trivial, apply to qubit 6. If flag 13 is non-trivial and 14 trivial, apply to qubit 4. If 14 is non-trivial and 13 trivial, apply to qubit 8. See ref. for details on why this is sufficient for fault-tolerance. This means that instead of including error-sensitive events from the flag qubit measurements directly, we preprocess the data by using the flag information to apply virtual Pauli corrections and adjust subsequent error-sensitive events accordingly. Hyperedges for the deflagged hypergraph can be found through stabilizer simulation incorporating the corrections. Let indicate the number of rounds. After deflagging, the size of the set for (resp. basis) experiments are ∣ ∣ = 6 + 2 (resp. 6 + 4), due to measuring six stabilizers per round and having two (resp. four) initial error-sensitive stabilizers after state preparation. The size of is similarly ∣ ∣ = 60 − 13 (resp. 60 − 1) for > 0. Z Z Z Z 15 Z Z r V Z X V r r E E r r r Considering and errors separately, the problem of finding a minimum weight error correction for the surface code can be reduced to finding a minimum weight perfect matching in a graph . Matching decoders continue to be studied because of their practicality and broad applicability , . In this section, we describe the matching decoder for our distance-3 heavy-hexagon code. X Z 4 27 28 29 The decoding graphs, one for the -errors (Fig. c) and one for the -errors (Fig. d), for minimum weight perfect matching are in fact subgraphs of the decoding hypergraph in the previous section. Let us focus here on the graph for correcting -errors, since the -error graph is analogous. In this case, from the decoding hypergraph we keep nodes corresponding to (the difference of subsequent) -stabilizer measurements and edges (i.e. hyperedges with size two) between them. Additionally, a boundary vertex is created, and size-one hyperedges of the form { } with ∈ , are represented by including edges { , }. All edges in the -error graph inherit probabilities and logical labels from their corresponding hyperedges (see Table for and -error edge data for 2-round experiment). X 1 Z 1 X Z VZ Z b v v VZ v b X 1 X Z A perfect matching algorithm takes a graph with weighted edges and an even-sized set of highlighted nodes, and returns a set of edges in the graph that connects all highlighted nodes in pairs and has minimum total weight among all such edge sets. In our case, highlighted nodes are the non-trivial error-sensitive events (if there are an odd number, the boundary node is also highlighted), and edge weights are either chosen to all be one (uniform method) or set as , where is the edge probability (analytic method). The latter choice means that the total weight of an edge set is equal to the log-likelihood of that set, and minimum weight perfect matching tries to maximize this likelihood over the edges in the graph. pe Given a minimum weight perfect matching, one can use the logical labels of the edges in the matching to decide on a correction to the logical state. Alternatively, the -error ( -error) graph for the matching decoder is such that each edge can be associated to a code qubit (or a meausurement error), such that including an edge in the matching implies an ( ) correction should be applied to the corresponding qubit. X Z X Z Maximum likelihood decoding (MLD) is an optimal, albeit non-scalable, method for decoding quantum error-correcting codes. In its original conception, MLD was applied to phenomenological noise models where errors occur only just before syndromes are measured , . This of course ignores the more realistic case where errors can propagate through the syndrome measurement circuitry. More recently, MLD has been extended to include circuit noise , . Here, we describe how MLD corrects circuit noise using the decoding hypergraph. 24 30 23 31 MLD deduces the most likely logical correction given an observation of the error-sensitive events. This is done by calculating the probability distribution Pr[ , ], where represents error-sensitive events and represents a logical correction. β γ We can calculate Pr[ , ] by including every hyperedge from the decoding hypergraph, Fig. c–f, starting from the zero-error distribution, i.e. Pr[0∣ ∣, 02 ] = 1. If hyperedge has probability of occurring, independent of any other hyperedge, we include by performing the update β γ 1 V k h ph h where is just a binary vector representation of the hyperedge. This update should be applied once for every hyperedge in . E Once Pr[ , ] is calculated, we can use it to deduce the best logical correction. If is observed in a run of the experiment, β γ indicates how measurements of the logical operators should be corrected. For more details on specific implementations of MLD, refer to Methods “Maximum likelihood implementations”. Experimental realization For this demonstration we use ibm_peekskill v2.0. 0, a 27 qubit IBM Quantum Falcon processor whose coupling map enables a distance-3 heavy-hexagon code, see Fig. . The total time for qubit measurement and subsequent real-time conditional reset, for each round, takes 768ns and is the same for all qubits. All syndrome measurements and resets occur simultaneously for improved performance. A simple - dynamical decoupling sequence is added to all code qubits during their respective idling periods. 32 1 Xπ Xπ Qubit leakage is a significant reason why the Pauli depolarizing error-model assumed by the decoder design might be inaccurate. In some cases, we can detect whether a qubit has leaked out of the computation subspace at the time it is measured (see Methods “Post-selection method” for more information on the post-selection method and limitations). Using this, we can post-select on runs of the experiment when leakage has not been detected, similar to ref. . 18 In Fig. a, we initialize the logical state (), and apply syndrome measurement rounds, where one round includes both and stabilizers (total time of approximately 5.3 s per round, Fig. b). Using analytical perfect matching decoding on the full data set (500,000 shots per run), we extract the logical errors in Fig. a, red (blue) triangles. Details of optimized parameters used in analytical perfect matching decoding can be found in Methods “IBM_Peekskill and experimental details”. Fitting the full decay curves (eq. ( )) up to 10 rounds, we extract logical error per round without post-selection in Fig. b of 0.059(2) (0.058(3)) for () and 0.113(5) (0.107(4)) for (). 2 r X Z μ 1 2 14 2