## Abstract

The exploration of topologically-ordered states of matter is a long-standing goal at the interface of several subfields of the physical sciences. Such states feature intriguing physical properties such as long-range entanglement, emergent gauge fields and non-local correlations, and can aid in realization of scalable fault-tolerant quantum computation. However, these same features also make creation, detection, and characterization of topologically-ordered states particularly challenging. Motivated by recent experimental demonstrations, we introduce a paradigm for quantifying topological states—locally error-corrected decoration (LED)—by combining methods of error correction with ideas of renormalization-group flow. Our approach allows for efficient and robust identification of topological order, and is applicable in the presence of incoherent noise sources, making it particularly suitable for realistic experiments. We demonstrate the power of LED using numerical simulations of the toric code under a variety of perturbations. We subsequently apply it to an experimental realization, providing new insights into a quantum spin liquid created on a Rydberg-atom simulator. Finally, we extend LED to generic topological phases, including those with non-abelian order.

### Similar content being viewed by others

## Introduction

Topological ordering is an exotic phenomenon that can occur when quantum fluctuations and local constraints stabilize a state with long-range entanglement^{1}. With their non-local correlations, topologically ordered states feature many remarkable properties and can be used for protecting quantum information non-locally^{1,2,3}. Yet, because these states appear to be liquid-like at short length-scales^{4}, they cannot be identified or characterized using any local order parameters. Instead, the canonical approach to discern topological order is to measure operators supported on large closed loops, the Wilson loops^{1,5,6,7}. However, such operators are challenging to identify or measure: while they have simple forms in certain fixed-point models, this is generally not the case for states realized experimentally in the presence of noise or other perturbations. In these cases, the expectation values of the simple or ‘bare’ Wilson loop operators described above decay exponentially with the loop’s perimeter, which hinders the experimental certification of topological order.

To address these challenges, several methods have been developed to construct ‘fattened’ Wilson loops which do not decay with loop size. These include a systematic method utilizing quasi-adiabatic connections to the fixed-point models^{5}, as well as variational and tensor-network-based approaches^{8,9,10,11}. Nevertheless, these methods are challenging to apply in realistic experiments, especially in the presence of incoherent noise (e.g., spontaneous emission). Other signatures, such as topological entanglement entropy^{12,13} are likewise difficult to measure in large systems.

Motivated by these considerations, we introduce a powerful framework, *locally error-corrected decoration (LED)*, for studying and characterizing topologically ordered states. By leveraging the error-correcting properties of topological phases, LED provides a systematic method to construct and efficiently measure ‘decorated’ Wilson loop operators, a variant of the fattened loop operators. This enables the identification and characterization of topological order at large length-scales in the presence of both coherent perturbations and incoherent noise, which are particularly challenging or impossible using conventional methods.

In its most general form, LED corresponds to a class of hierarchically structured quantum circuits that resemble the classification of quantum phases using RG flow^{14,15}. Yet, for a wide range of experiments where the prepared state is known to approximate a fixed-point state with zero correlation length (see Supplementary Information), there is an efficient ‘snapshot-based’ realization of LED using only classical post-processing of experimental measurements in a few fixed bases. In this work, we primarily focus on snapshot-based LED due to current experimental limitations and the hardness of simulating 2D quantum circuits.

## Results

### LED approach

The key idea of LED can be understood by considering Kitaev’s toric code model, a canonical example of topological order. Specifically, we consider qubits localized on the edges of a square lattice. The ideal, fixed-point Hamiltonian is defined as^{16}:

where *A*_{v} = ∏_{i∈adj(v)}*X*_{i}, *B*_{p} = ∏_{i∈adj(p)}*Z*_{i}, and adj(*v*) (resp., adj(*p*)) denote the set of edges touching a given vertex *v* (plaquette *p*) of the lattice. The ground state space, given by the simultaneous + 1 eigenspace of all *stabilizer operators* {*A*_{v}, *B*_{p}}, forms a quantum error-correcting code: all local operators either act trivially on ground states or couple them to excited states^{16}. By measuring stabilizers, one can detect the presence of excitations and apply a recovery procedure to return the system back to this ground state space.

In this model, contractible Wilson loops can be constructed by multiplying stabilizers, so their expectation values in any ground state of *H*_{TC} are +1, independent of loop size. However, in realistic situations, the prepared state differs from the fixed-point state by local fluctuations such as coherent perturbations and incoherent errors (Fig. 1a). This causes bare Wilson loops to decay exponentially with the number of locations where a fluctuation can intersect the loop (i.e., its perimeter).

The snapshot-based LED approach begins with a measurement of all qubits in the same (Pauli-*Z* or Pauli-*X*) basis. For each measurement snapshot, one can calculate the stabilizer and Wilson loop values. Local fluctuations appear as stabilizer violations, which are identified with anyonic excitations^{16} (Fig. 1b). A local decoder partially removes such fluctuations by flipping measured qubits using only nearby stabilizer values. The simplest such local decoder can remove single-qubit errors, by flipping a qubit if and only if both adjacent vertices (resp., plaquettes) are occupied by an *m* (*e*-anyon). However, it cannot remove higher-weight errors, which flip two or more adjacent qubits. Subsequently, the lattice is coarse-grained, which can also be done efficiently on measurement snapshots (see methods). Together, the anyon-pairing and coarse-graining steps are repeated for *n* layers. Crucially, the weight of uncorrected errors is reduced in each layer, so that all local errors eventually become single-qubit errors, which the decoder can correct; this mimics a real-space RG flow towards the fluctuation-free fixed-point state (see Methods). Finally, a bare Wilson loop is measured on the final, corrected and coarse-grained state (Fig. 1b).

This bare operator measured on the final state is equivalent to a decorated Wilson loop operator measured on the original state (Fig. 1). Moreover, it is determined solely by the fixed-point state and is independent of the specific fluctuations in the system; this crucially differentiates LED from prior approaches to construct fattened loop operators^{5,8,9}. Notice that all steps in snapshot-based LED can be performed in post-processing (see Methods), making it uniquely suited for integration into experimental measurement procedures. More general LED operators can be constructed through the quantum circuit formulation; one example is presented in the Supplementary Information.

The hierarchical LED procedure is also inspired by the quantum convolutional neural network (QCNN) approach to phase classification, and the decorated Wilson loop operators resemble the multiscale string order parameters studied in ref. ^{17}. However, in this context, the LED framework is more general: one can construct LED Wilson operators of diameter *L* with any desired correction distance *d* ≪ *L* (Fig. 2a) by choosing any local decoder which pairs anyons up to distance *d* (see Methods). The construction of Fig. 1b with alternating local-decoding and coarse-graining layers is a particularly efficient way to construct local decoders and LED loops with longer-range (e.g., *d*, *L* ∝ 2^{n}).

We emphasize that the locality of our procedure ensures that only topologically ordered states can flow to the fixed-point state. Thus, LED gives rise to a sufficient condition or *witness* for topological order. This distinguishes LED from general decoders, which do not typically respect locality and hence cannot be used to certify topological order.

### Numerical detection of topological order with coherent perturbations

To demonstrate the applicability of LED for coherent local perturbations to *H*_{TC}, we consider a family of states

generated by imaginary-time evolution of a toric code ground state \(\left\vert {\psi }_{{{{{{{{\rm{TC}}}}}}}}}\right\rangle\)^{18,19,20}. As each operator *Z*_{i} (resp., *X*_{i}) creates a pair of *m* anyons (*e* anyons), \(\left\vert \psi ({g}_{X},\, {g}_{Z})\right\rangle\) contains virtual anyon fluctuations on top of \(\left\vert {\psi }_{{{{{{{{\rm{TC}}}}}}}}}\right\rangle\). In the special case where *g*_{X} = 0, topological order is known to survive for perturbations *g*_{Z} ≤ *g*_{c} = 0.220343, beyond which the *m*-anyons condense, driving a second-order phase transition into the *Z*-paramagnet state^{21}. More generally, \(\left\vert \psi ({g}_{X}\ne \, 0,{g}_{Z}\ne \, 0)\right\rangle\) is also topologically ordered for small *g*_{X} and *g*_{Z}, but the transitions to paramagnetic phases can occur at points that differ from *g*_{c}.

In testing LED, we numerically simulate projective measurements of \(\left\vert \psi ({g}_{X},\, {g}_{Z})\right\rangle\) and use them as input “experimental snapshots” in Fig. 1b (see Methods). Figure 2b shows the value of the LED order parameter for a trivial and a topological state with *g*_{Z} = 0.14, when *n* is varied (and *d*, *L* ∝ 2^{n}). Clearly, the order parameter stays at 0 for the trivial state, but increases from a small, finite value to one for the topological state as *n* is increased. Similar behavior is also observed throughout a one-dimensional parameter space in Fig. 2c, d, whenever the correction distance *d* is increased, while keeping *d* ≪ *L* to prevent overcorrection (see Methods). Importantly, amplification occurs only if the input state is topological, and the order parameter approaches 0 for all trivial states.

Another important set of observables for characterizing topological order are *X* and *Z* open string operators, which detect the transition from the topological phase to the trivial, paramagnet phase. Because LED Wilson *Z*-loop operators (resp., *X*-loop operators) are linear combinations of *Z* (*X*) closed loops supported on an annulus, they anti-commute with conjugate *X* (*Z*) open strings connecting the interior and exterior of the annulus. As such, the expectation value of any long, open string must flow to zero in the topological phase, whereas closed-loop LED operators flow to unity with increasing *d*. The topological-to-trivial phase transition occurs when certain long, open *X* or *Z* strings acquire non-zero expectation value, due to the condensation of *m* or *e* anyons, respectively. Indeed, deep in the paramagnetic phase the state \(\mathop{\lim }\limits_{{g}_{x}\to \infty }\left\vert ({g}_{x},{g}_{z})\right\rangle\) is polarized along the *X* direction, and *X* open strings become unity. However, for generic trivial states, open strings also decay exponentially with length, due to local fluctuations of the opposite type; nevertheless, LED can still amplify their expectation values by removing the effect of local fluctuations. This behavior is demonstrated in our simulations: in Fig. 2e, f, open string expectation values stay at 0 in the topological phase, but are amplified and saturate to a non-zero value in the trivial (paramagnetic) phase. Because LED amplifies the contrast between trivial states and a large class of topological states, the topological order can be detected using with lower sample complexity—that is, by using substantially fewer experimental repetitions^{17,22} (see Supplementary Information).

Let us note that the boundary dividing the states whose LED operators approach zero and one does not necessarily correspond to the topological phase boundary: in general, it depends on the choice of decoder and coarse-graining length-scale. For instance, this is observed in Fig. 2g, where closed loops are nearly one after *n* = 3 layers for a large region within, but not fully encompassing, the topological phase. Hence, LED is not always a necessary condition for topological order.

### Effect of incoherent errors

We next demonstrate the application of LED in the presence of incoherent local noise such as spontaneous emission or dephasing, which commonly occur in experiments. Because local decoders can recover topologically encoded information in the presence of small, local error channels^{12,23} it is reasonable to ask whether mixed states prepared in these systems exhibit topological ordering.

To study such examples, we introduce incoherent bit- and phase-flip errors by independently flipping, with probability *p*_{flip}, each measured qubit in a snapshot of \(\left\vert \psi ({g}_{X},{g}_{Z})\right\rangle\). Here, we associate topological order with states that can be transformed into a ground state of *H*_{TC} via local operations. Our analysis then suggests that the resulting mixed-state phase space contains a \({{\mathbb{Z}}}_{2}\)-topological phase, a *Z*-paramagnet, an *X*-paramagnet, and a disordered phase with large incoherent error rates. However, it is especially difficult to distinguish the topological and disordered phases using measurements of bare operators alone: in both phases, open strings remain close to zero, while bare Wilson loops decay exponentially with perimeter as *e*^{−αL}, where the exponent *α* interpolates smoothly between the phases (Fig. 3a, b). This is in contrast to the paramagnet phases, where closed loops exhibit similar behavior, but certain open strings decay with the same exponent *α* as the closed loops^{24}.

Upon studying the behavior of LED operators, one finds that the mixed-state phase space exhibits two qualitatively different regimes (Fig. 3b). LED reduces *α* to 0 with increasing *d* in the ‘correctable’ regime, while *α* grows in the ‘uncorrectable’ regime. Further, correctable states with small *p*_{flip} are connected to topologically ordered pure states, suggesting these mixed states are topologically ordered as well. Indeed, we show that correctability implies the input state cannot be prepared from a product state using only local operations. In particular, if LED Wilson loops are amplified to above 1 − *ϵ* under depth *d* correction, this certifies topological order up to length-scale \(O({{{{{{{\mathscr{L}}}}}}}}-d)\) where \({{{{{{{\mathscr{L}}}}}}}} \sim 1/\sqrt{\epsilon }\). Furthermore, we argue (see Methods) that, under plausible conditions, this implies the *entanglement negativity* of the input state contains a topological term; this connects the LED characterization of mixed state topological order to other studies^{25,26,27}.

The ability of LED to distinguish between the topological and disordered phases can be understood by analogy to quantum error correction. Conceptually, since any given LED loop operator is supported on an annulus, we can consider this operator as being embedded in a surface code on this annulus with open boundary conditions, which supports a logical qubit. Then, an LED *Z*-loop operator corresponds to a logical-*Z* operator for this qubit, while an *X*-string connecting the interior of the annulus to the exterior corresponds to a logical-*X* operator (Fig. 2a). In this framework, the decay rate *α* of Wilson loops corresponds to a local logical error rate per unit length, and in the correctable phase, LED-based decoding succeeds with high probability as long as the code distance *d* is sufficiently large (Fig. 3c). However, in the uncorrectable phase, such as when *p*_{flip} is above the error correction threshold or when long, open strings condense in a paramagnetic phase, decoding cannot correctly pair anyons, resulting in a high rate of logical errors^{23}.

The above results are deeply rooted in the stability of topological order against local perturbations. In contrast, any finite temperature destroys long-range topological order as it leads to freely propagating thermal anyons. In Fig. 3d, we consider the toric code model at finite temperature, with local incoherent errors, and find that the LED loop operators indeed approach zero upon increasing *n*. Interestingly, their expectation values flow non-monotonically, being amplified at small *n* before eventually turning to 0. This occurs because of a competition between two effects: thermal anyons are uncorrectable, so their density accumulates under RG flow; however, local fluctuations are corrected at early layers, which initially amplifies LED loop expectation values. Because loops at different *n* probe correlations at different length-scales, the turning point in these curves can be used to identify the characteristic length-scale of separation between thermal anyons, or equivalently, the system’s temperature.

### Experimental realization in Rydberg atom arrays

We now use LED to characterize and provide new insights into the \({{\mathbb{Z}}}_{2}\)-topologically ordered states recently realized on a 219-qubit programmable quantum simulator^{28}. In the experiment, qubits are encoded in ground states and *n* = 70 Rydberg states of neutral ^{87}Rb atoms and placed in an array on the links of a kagome lattice (Fig. 4). This model maps onto a dimer model, where each Rydberg atom can be viewed as a dimer covering the two adjacent vertices of the kagome lattice^{29}: the Rydberg blockade interaction between nearby atoms enforces a “dimer constraint” by preventing, with high probability, any vertex from being covered by more than one dimer^{30}.

This dimer model is predicted to support a \({{\mathbb{Z}}}_{2}\)-topologically ordered state of the resonating valence bond (RVB) type, involving the equally weighted superposition of all dimer coverings^{29,31,32}. In this model, *Z*-stabilizers are given by (−1) times the product of single-qubit *Z*-operators on the edges touching a vertex, *X*-stabilizers are given by the product of off-diagonal operators supported on the triangles bordering a hexagon (see Methods), and the RVB state forms a fixed-point state. An *e* (resp., *m*) anyon arises when a *Z* (*X*) stabilizer is violated^{33,34,35}. Here, the (−1) factor for *Z*-stabilizers ensures stabilizer expectation values of +1, because each vertex is touched by exactly one dimer.

In the experiment, a topologically ordered state is prepared by quasi-adiabatically adjusting the detuning Δ and Rabi frequency Ω of a global laser drive^{28}. The onset of topological order is observed by studying the expectation values of Wilson loops and open strings^{24,28,29,36,37}. A state consistent with \({{\mathbb{Z}}}_{2}\) topological order emerges when using a quasi-adiabatic sweep from initial Δ/Ω < 0 to a final value of Δ/Ω in the range 3.3 ≲ Δ/Ω ≲ 4.5. In practice, several factors make quantitative characterization of such states difficult, as they cause the prepared state to differ from the ideal fixed-point state for the dimer model. In particular, the finite sweep speed and experimental imperfections (e.g., off-resonant scattering, laser phase noise, spontaneous emission events) can modify the experimentally created state. Moreover, the Rydberg interaction Hamiltonian is only an approximation of the parent Hamiltonian of the fixed-point state: for example, the 1/*r*^{6} interaction between Rydberg atoms gives rise to long-range tails in the interaction Hamiltonian. These long-range tails also destabilize the spin-liquid ground state, which could cause a first-order phase transition between regions (II) and (IV) in Fig. 4. Nonetheless, a spin-liquid state can be prepared by using finite ramp speeds, as was done in the experiments^{29,38,39}. These factors correspond to both coherent and incoherent perturbations, similar to those considered in our toric code simulations. As a result, while topological order can be discerned at modest length-scales, the expectation values of large, bare Wilson loop observables have nearly vanishing signal for almost all final values of Δ/Ω (Fig. 4b, e).

To circumvent these imperfections, we measure LED loops on the experimentally prepared states. Due to the limited experimental system size, it is not possible to consider loops that strictly satisfy the limit where *ξ* ≪ *d* ≪ *L*, resulting in relatively small expectation values for the LED loop operators. Nonetheless, we clearly observe a range of values of Δ/Ω where both *Z*- and *X*-loops are amplified, which corresponds to the spin-liquid interval identified in ref. ^{28} (blue shaded region in Fig. 4). In particular, some of the largest loops within the system acquire non-zero expectation values in this parameter regime. To further confirm our findings in this intermediate system size setting, we also examine the behavior of open *Z*- and *X*-strings under LED, and we find that there are four regimes (I–IV). Regimes I, II, and III correspond to the *Z*-paramagnet, *X*-paramagnet, and spin-liquid regime, in agreement with the prior interpretation of experimental results^{28}. We emphasize that our analysis of Regime III goes beyond that of^{28}, showing non-trivial coherence in closed loops at significantly longer length-scales. Furthermore, LED provides novel insights into the nature of Regime IV: because LED does not amplify open or closed string expectation values, our analysis appears to be consistent with a decoherence-dominated disordered phase (see also Supplementary Information). Such a phase is analogous to the disordered part of the mixed-state phase diagram (Fig. 3c), which has a high density of dephasing (*Z*) errors, in contrast to the valence-bond solid (VBS) phase predicted for the ground state^{29}.

### Circuit-based LED and generic topological phases

While our current LED analysis uses classical post-processing of *Z*- and *X*-basis experimental snapshots, the most generic LED formulation involves a quantum circuit model following the QCNN framework of ref. ^{17}. Here, the entropy associated with both incoherent and coherent fluctuations are systematically removed by introducing ancillary degrees of freedom and applying local unitary transformations, ultimately leaving a purified state supported on fewer degrees of freedom. Notably, this enables the application of LED to a large class of non-abelian topological orders known as string-net models^{16,40}. The anyon content of these models is characterized by a *modular tensor category (MTC)*\({{{{{{{\mathcal{C}}}}}}}}={{{{{{{\mathcal{Z}}}}}}}}({{{{{{{\mathcal{A}}}}}}}})\), where \({{{{{{{\mathcal{Z}}}}}}}}\) denotes the Drinfeld center^{41,42} of a unitary fusion category \({{{{{{{\mathcal{A}}}}}}}}\)^{16}. Here, the possible topological charges (i.e., anyon types) are given by the simple objects *α*_{0}, *α*_{1}, . . . , *α*_{N−1} of \({{{{{{{\mathcal{C}}}}}}}}\). It is conjectured that any MTC is uniquely determined by modular *S* and *T* matrices which capture its anyon braiding statistics:

where *d*_{i} is the quantum dimension of *α*_{i} and \({{{{{{{\mathcal{D}}}}}}}}=\sqrt{{\sum }_{i}{d}_{i}^{2}}\). For example, a key signature of the toric code MTC \({{{{{{{\mathcal{C}}}}}}}}={\mathfrak{D}}({{\mathbb{Z}}}_{2})\) is the − 1 twist product between *e* and *m* anyon loops (*s*_{em} = −1).

Direct measurements of *s*_{ij} and *t*_{ij} involve braiding anyons along large loops, and hence are affected by coherent perturbations and incoherent errors. The inability to extract their precise values prevents accurate identification of the topological phase. To circumvent this, we use a hierarchical LED circuit which systematically detects and identifies errors (anyons) at each site by using ancillary qubits, removes them by inputting the fusion rules of \({{{{{{{\mathcal{C}}}}}}}}\) into a maximum-likelihood decoder, and applies an entanglement renormalization circuit to coarse-grain the system^{43}. After multiple layers, the *S* and *T* matrices can be measured with much higher accuracy and efficiency (Fig. 5). We note that circuit-based LED is required for the detection and removal of non-abelian anyons. More details on circuit-based LED and generic topological phases can be found in Methods and Supplementary Information.

## Discussion

These results demonstrate that LED constitutes an exceptionally promising approach to enhance the detection and characterization of topological order. Several generalizations and future avenues can be considered. For example, the variational methods of QCNN circuits can enable adaptive measurement procedures, which can recognize a much larger portion of the topological phase. This opens the door towards achieving a necessary and sufficient criterion for topological order using LED, which cannot be done using any fixed linear observable^{44}. Moreover, our results indicate that LED is applicable to generic topological orders in higher dimensions, which is challenging to analyze using any currently known techniques. LED can also potentially serve as an order parameter for efficiently characterizing glassy gauge models^{45}, through a mapping shown in Methods. In addition, while our present work analyzes a spin-liquid state prepared using a Rydberg-atom quantum simulator, LED is also directly applicable to other platforms such as superconducting qubits^{46} or trapped ions^{47}.

Another promising direction is to further study whether the “correctability” of states in our mixed-state phase diagram can be used to characterize topological order in mixed states more generally^{11,27,48,49,50}. In particular, it could be intriguing to further explore the dependence of the correctable regime on the choice of local error correction and/or coarse-graining procedure. Finally, while our approach can be directly applied to any string-net topological order, it could be interesting to consider more general topological phases, fracton phases or gauge theories with continuous gauge groups^{35,51}. Such methods can then become indispensable parts of quantum simulation toolboxes for understanding exotic states of entangled quantum matter.

## Methods

### Numerical simulations for the toric code

In this section, we explain how the numerical simulations underlying Figs. 2 and 3 are performed. We begin by constructing a projected entangled pair state (PEPS) representation of the exact toric code ground state^{52}. This construction utilizes a parity tensor *P* defined as

where each index *i*, *j*, *k*, *l* ∈ {0, 1} (i.e., the tensor *P* has bond dimension two). Because the toric code is defined with qubits on the links of a square lattice, our PEPS representation of the state has one PEPS tensor with two physical indices per unit cell. Letting *p*, *q* be the physical indices and *i**j**k**l* be the virtual indices, the toric code PEPS tensor *A* is then given by \({A}_{ijkl}^{pq}={\delta }_{i}^{p}{\delta }_{j}^{q}{P}_{ijkl}\). Our perturbed states \(\left\vert \psi ({g}_{X},{g}_{Z})\right\rangle\) are constructed from the toric code state by applying imaginary time evolution to each site \(L({g}_{X},\, {g}_{Z})={e}^{{g}_{X}X+{g}_{Z}Z}\):

Notice that this operation does not change the PEPS bond dimension, thereby allowing for efficient simulation.

Our goal is to simulate projective *Z*-basis measurements to serve as the “experimental snapshot” input in Fig. 1b. The key ingredient that enables efficient sampling is an algorithm for efficiently computing marginal and conditional probabilities, which can be implemented as follows: We first label every unit cell by its coordinate (*x*, *y*). There are four possible measurement outcomes at each unit cell, and we compute the probability *P*(*σ*_{(1, 1)} = *a**b*) that measurement of the first site (*x*, *y*) = (1, 1) yields the outcome *a**b* = 00, 01, 10, or 11. Next, we select a sample *a**b*_{11} based on this probability distribution, compute the conditional probability distribution on the second site, *P*(*σ*_{(2, 1)} = *a**b*∣*σ*_{(1, 1)} = *a**b*_{11}), and sample the second measurement outcome *a**b*_{21}. The process then repeats, with each subsequent distribution being conditioned on all prior measurements.

Computing the probabilities requires contracting a 2D tensor network (Fig. 6), which is in general *#**P*-hard^{53}. In practice, however, the states we encounter have finite correlation length, and the computation becomes remarkably efficient throughout much of the phase diagram^{54}. In particular, we work on a strip of finite height *L*_{x} and infinite length *L*_{y}, and introduce boundary matrix product states (MPS) to efficiently capture the effect of the environment—that is, the sites different from the one currently being sampled^{55}. Because singular-value decomposition truncation is used at each step to prevent the bond dimension of the boundary MPS from growing exponentially^{56}, the method is approximate; however, we only discard singular values < 10^{−8}, so truncation errors are insignificant. Details of the boundary conditions and contraction ordering are discussed in the Supplementary Information.

In our simulations, we choose *L*_{x} = 300 unit cells and sample 1000 columns, giving us access to very large snapshots with 600,000 qubits. To minimize boundary effects, we compute observables supported on sites at least 30 unit cells away from the boundaries. Near the phase boundaries, the bond dimension (entanglement) of the boundary MPS becomes large due to the large correlation length, which increases the computational demands for sampling (gray data points in Fig. 2g). We numerically confirm this phase boundary with an independent calculation (see Supplementary Information).

### Details on error-correction and coarse-graining procedures

Here, we explain the details of the LED decoding and coarse-graining procedures and demonstrate how bare Wilson loops become decorated under the LED protocol. Without loss of generality, we consider *Z*-basis measurements, from which we can calculate plaquette stabilizers *B*_{u}. Here, each plaquette is labeled by the 2D coordinate of its unit cell *u* = (*x*, *y*). Since there are two qubits per unit cell, each qubit carries a coordinate and a link label *v* or *h*, depending on whether its corresponding edge in the square lattice is vertical or horizontal, respectively. Finally, the projective measurement outcomes are denoted by *σ* ∈ {+1, −1} (Fig. 7).

To illustrate local error correction, we consider the “pairing decoder,” which flips a qubit if and only if its two neighboring plaquettes are simultaneously occupied. Importantly, to preserve locality, we first compute all stabilizer values and then flip qubits based on these values. The decision of whether to flip any qubit then depends only on its value, and the values of the six adjacent qubits with which it shares a plaquette. Equivalently, this error correction procedure corresponds to an operator transformation

To ensure all local errors are removed after a finite number of LED steps, we also pair anyons, which occupy two plaquettes separated by a diagonal, such as *B*_{u} and \({B}_{u+\hat{x}+\hat{y}}\). The locality of the decoder ensures that the support of any local operator only grows by a finite amount with each step. Subsequently, the coarse-graining procedure replaces each *b* × *b* block of plaquettes with a single plaquette whose value is the product of *b*^{2} plaquettes; microscopically, this can be done by defining new qubits as a product of *b* corresponding qubits in the original lattice. The combination of a local pairing step and a coarse-graining step forms a layer of real-space RG; with each additional layer, one can correct errors of higher and higher weight.

The bare Wilson loops measured in the final state are equivalent to decorated loop operators acting on the original state. These decorated operators can be efficiently computed from projective measurement data, since their eigenstates are product states in the *Z* and *X* bases, respectively. Furthermore, in the operator transformation picture, any loop or string of length *L* maps onto a linear combination of exponentially many (2^{O(L)}) loops or strings, respectively. Thus, while the operator transformation picture is helpful for conceptual reasons, it is computationally much easier to use the original picture of error-correction and coarse-graining.

A few remarks are in order. First, one important property of LED is that it preserves commutation relations: consider two anti-commuting *X* and *Z* strings that intersect at a single point, far from the strings’ endpoints. Upon applying LED, the resulting decorated strings still anti-commute. This is because the correction is computed only using stabilizers, so it decorates *Z*-operators by a linear combination of closed *Z*-loops, and similarly for *X*. Moreover, other local decoding algorithms, such as cellular automata and RG decoders, can also be used to generate different LED operators^{57}. In the following section, we describe a flexible, “patch-based” local decoder for the toric code, which allows LED to classify a wider range of states as topological.

### Patch-based decoder

The patch-based decoder with variable correction distance *d* is based on a local minimum-weight perfect matching (MWPM) procedure. In the first decoding step, a local MWPM decoder is convolved with all *l* by *l* square regions of the toric code, where *l* ~ *d*; for each region, MWPM takes as input the location of the enclosed anyons. Because both *e* and *m* anyons can freely move into and out of the region, this is analogous to decoding a surface code with open boundaries. Therefore, MWPM pairs any given anyon either with another anyon or with the boundary.

The second step aggregates MWPM pairings. Since the square regions can overlap, a pair may appear more than once. As such, after choosing a natural indexing of the plaquettes, we create a list of all MWPM pairings between two plaquettes (*p*, *q*) with *p* < *q*; pairings with the boundary are not included (Fig. 8). For each plaquette *p* containing an anyon, the patch-based decoder then performs the pairing (*p*, *q*) which occurs most often. This procedure naturally favors pairings that flip fewer qubits, because shorter-range pairings can be included in more local patches.

A critical property of this decoder is that it preserves locality. In the first step, MWPM only uses information from local *l* by *l* patches, while the distance between partner plaquettes in the second step is always less than *l*. Aggregation can thus be performed using only the results from a small number of overlapping local patches.

### Decoder details for the ruby lattice spin liquid

We now explain the decoding procedure for a dimer model where qubits lie on the vertices of the ruby lattice, or equivalently, on the links of a kagome lattice. This dimer model supports a \({{\mathbb{Z}}}_{2}\) spin-liquid phase, whose fixed-point is a resonating valence-bond (RVB) state^{29}. This state is in the same universality class as the toric code, as it supports *e* and *m* anyons with similar string operators.

We first describe the decoding procedure for *e* anyons, which correspond to vertices with an even number of adjacent dimers. (We note that this is an odd *Z*_{2} spin liquid, and the trivial empty state corresponds to maximal occupation of *e* anyon states.) In the first correction step, we apply the pairing decoder between adjacent vertices. We then coarse-grain the kagome lattice to a triangular lattice by grouping vertices within each upward-pointing triangle. This transforms vertex stabilizers in the kagome lattice to vertex stabilizers in the triangular lattice (Fig. 9a). The pairing decoder is then applied between adjacent triangles in the second correction step. In the main text, we study the flow from uncorrected loops to vertex-paired and triangle-paired loops, which are denoted as as layers 0, 1, and 2, respectively.

We next consider the *m* anyons, which are associated with hexagonal plaquettes. A rotation is first performed within each triangle, such that the string operators associated with *m* anyons become diagonal in the measurement basis. This allows us to map each configuration onto a triangular lattice, whose vertices are located at the center of each hexagon in the kagome lattice; this mapping transforms *X*-stabilizers of the dimer model into vertex *Z*-stabilizers in the triangular lattice (Fig. 9b). Due to the small experimental system size, we can only perform one layer of correction, and we use the pairing decoder on the triangular lattice. We note that open strings on the triangular lattice map onto open strings on the ruby lattice, although the resultant strings are slightly different from the ones measured in refs. ^{28, 29}.

### Quantum circuit formulation of LED

As discussed in the main text, the most general formulation of LED uses a hierarchical quantum circuit like the QCNN circuit introduced in ref. ^{17}. The structure of such a circuit is illustrated in Supplementary Fig. S11 in a one-dimensional example for simplicity of illustration, but can be easily generalized to the two-dimensional cases considered in LED.

In this framework, stabilizer measurements are performed at each layer using quantum circuits to preserve the coherence of qubits in the system, in the same fashion as for surface-code quantum computation^{58}. When the lattice is coarse-grained as in Figs. 1, 7, a fraction of the system’s qubits are measured, and local operations are applied to each remaining qubit based on nearby stabilizer measurement values, to correct for local errors. One example circuit construction of LED stabilizer measurement, decoding, and coarse-graining for recognizing the toric code phase is presented in the Supplementary Information. For more general string-net models, ancillas can be used to detect the presence of anyons, and the decoding steps perform anyon transport and fusion via procedures described in ref. ^{59}; meanwhile, the coarse-graining circuit is constructed as the inverse circuit of a multiscale entanglement renormalization ansatz (MERA) representation of the fixed-point state (Fig. 5)^{43}. In addition, a layer of variational unitary operations is placed in front of each anyon-detection step.

These variational unitaries can be tuned to optimize the LED order parameter values, especially in the presence of (quasi-)local rotations of qubits on top of a known fixed-point state. For example, if every qubit in a perfectly prepared toric code state underwent a Haar-random, single-qubit operation, both the bare and snapshot-based LED Wilson loop operators will be exponentially small. However, the layer of variational unitaries in front of the first local decoding step enables one to un-do these single-qubit operations and again achieve a high LED signal. In particular, one uses here an adaptive procedure, whereby a hybrid quantum-classical feedback loop is used to tune each unitary to optimize LED loop values. More generally, variational unitaries in front of subsequent local decoding steps *l* allow us to compensate for local operations acting on multiple qubits of the system. This is a major step towards achieving a necessary and sufficient criterion for topological order, which is not possible using a single, fixed observable such as a bare Wilson loop operator^{44}. Moreover, due to the special hierarchical structure of QCNN and LED circuits, the optimization of the variational unitaries can be done efficiently without encountering the so-called “barren plateau” challenges of variational quantum circuits^{60,61}.

Finally, one other advantage of circuit-based LED is that it enables the simultaneous measurement of loop operators in multiple bases in each experimental repetition. This allows us to capture anyonic braiding statistics, which is critical to the application of LED to non-abelian phases. In particular, the final measurement of *s*_{ij} (Fig. 5d) can be performed by initializing an ancilla qubit in the state \(\left\vert+\right\rangle=\frac{1}{\sqrt{2}}(\left\vert 0\right\rangle+\left\vert 1\right\rangle )\), and applying a controlled operation which, conditioned on the ancilla being in \(\left\vert 1\right\rangle\), creates anyon pairs \({\alpha }_{i},\overline{{\alpha }_{i}}\) and \({\alpha }_{j},\overline{{\alpha }_{j}}\), braids \(\overline{{\alpha }_{i}}\) around *α*_{j}, and fuses the pairs \({\alpha }_{i},\overline{{\alpha }_{i}}\) and \({\alpha }_{j},\overline{{\alpha }_{j}}\). *s*_{ij} is then measured in two steps: First, the magnitude ∣*s*_{ij}∣^{2} is equal to the probability of \({\alpha }_{j},\overline{{\alpha }_{j}}\) fusing to vacuum when the ancilla is in \(\left\vert 1\right\rangle\); this probability can be obtained by measuring local energy densities (e.g., by performing stabilizer measurements). Then, when ∣*s*_{ij}∣^{2} > 0, we post-select on both \({\alpha }_{i},\overline{{\alpha }_{i}}\) and \({\alpha }_{j},\overline{{\alpha }_{j}}\) fusing to vacuum and measure the ancilla’s final state

in an appropriate basis to obtain the phase of *s*_{ij}.

For topological phases described by Abelian quantum double models^{16}, the quantum circuit and snapshot-based versions of LED can be combined by measuring all qubits in a fixed basis after some chosen depth *d*, and performing snapshot-based LED using the resulting stabilizer measurement values (see Supplementary Information). The choice of *d* is then determined by a tradeoff between the quantum circuit depth/fidelity and the generality of local rotations, which can be compensated for.

### Topological order witness

Here, we show that LED provides a topological order witness—that is, it does not misclassify any trivial product state as topological. For simplicity, we study the case of \({{\mathbb{Z}}}_{2}\) topological order on a surface with trivial topology, where the fixed-point state is the unique ground state \(\left\vert {\psi }_{{{{{{{{\rm{TC}}}}}}}}}\right\rangle\) of *H*_{TC}. We begin by considering the ideal case where LED operators go to one.

### Theorem 1

Let *ρ* be an arbitrary input state defined on a surface with trivial topology. Then, after performing LED with correction distance *d*, assume the resultant state *ρ*_{f} has, as a subsystem, qubits living on the links of a square lattice, as in the toric code. Then, if the stabilizer expectation values \(\left\langle \frac{1+{A}_{v}}{2}\right\rangle=\left\langle \frac{1+{B}_{p}}{2}\right\rangle=1\) at every vertex *v* and plaquette *p* of the subsystem, then, the input state *ρ* is topologically ordered, in the sense that it is connected to an output state of the form \({\rho }_{f}=\left\vert {\psi }_{{{{{{{{\rm{TC}}}}}}}}}\right\rangle \left\langle {\psi }_{{{{{{{{\rm{TC}}}}}}}}}\right\vert \otimes {\alpha }_{{{{{{{{\rm{anc}}}}}}}}}\) by generalized local unitary (gLU) transformation of depth *O*(*d*).

The key to the proof is a unitary implementation of LED by introducing product state ancillas and performing local unitary gates to perform stabilizer measurement and correction (see Supplementary Information for details). These operations, which cannot change the long-range entanglement structure of the state, are known as gLU transformations^{18}, and preserve phase boundaries. Thus, if we further assume the output ancillas *α*_{anc} are in a trivial state, Theorem 1 guarantees the input state is in the toric code phase. However, we do not certify this condition holds, which is in general more difficult: measurements in multiple bases are needed to uniquely determine *α*_{anc}. Instead, LED certifies that the toric code state can be *distilled* from the input state by gLU transformations. Because long-range entanglement cannot be created from a trivial state by gLU transformations^{18}, Theorem 1 implies that LED operators flowing to unity forms a sufficient condition for topological order, or equivalently, a topological order witness (see also ref. ^{7}).

While the above argument works well in theory, any practical system cannot measure LED observables equal to one with infinite precision. Indeed, even infinitesimal local perturbations to the toric code ground state, such as \({e}^{-i\epsilon H}\left\vert {\psi }_{{{{{{{{\rm{TC}}}}}}}}}\right\rangle\) for arbitrarily small *ϵ* and some local Hamiltonian *H*, can create error strings larger than the correction length *d*. This causes LED loop expectation values to decay exponentially, even in the topological phase. To show that LED still provides a topological order witness in the presence of local perturbations, finite measurement errors, and finite system size, we show the following Theorem:

### Theorem 2

Consider an arbitrary input state *ρ* and LED with correction distance *d*, as in Theorem 1. Suppose the corresponding subsystem of *ρ*_{f} has stabilizer expectation values \(\left\langle \frac{1+{A}_{v}}{2}\right\rangle > 1-\epsilon\), \(\left\langle \frac{1+{B}_{p}}{2}\right\rangle > 1-\epsilon\) at every vertex *v* and plaquette *p*. Then, the input state *ρ* exhibits topological ordering at least up to a length-scale \(O({{{{{{{\mathscr{L}}}}}}}}-d)\); that is, no purification of *ρ* can be prepared using a local quantum circuit of depth less than \(O({{{{{{{\mathscr{L}}}}}}}}-d)\), where \({{{{{{{\mathscr{L}}}}}}}} \sim 1/\sqrt{\epsilon }\).

Our proof of Theorem 2 hinges on the following two Lemmas, proved in the supplement.

### Lemma 3

Given an output state *ρ*_{f} satisfying the conditions of Theorem 2, and a simply connected \(({{{{{{{\mathscr{L}}}}}}}}-2)\times ({{{{{{{\mathscr{L}}}}}}}}-2)\) square region *R* on the system part, the reduced density matrix \({\rho }_{d}={{{{{{{{\rm{Tr}}}}}}}}}_{{R}^{c}}[{\rho }_{f}]\) is indistinguishable from the toric code reduced density matrix \({\sigma }_{{{{{{{{\rm{TC}}}}}}}}}={{{{{{{{\rm{Tr}}}}}}}}}_{{R}^{c}}[\left\vert {\psi }_{{{{{{{{\rm{TC}}}}}}}}}\right\rangle \left\langle {\psi }_{{{{{{{{\rm{TC}}}}}}}}}\right\vert ]\) defined on the same region, up to the bound \(| | {\rho }_{d}-{\sigma }_{{{{{{{{\rm{TC}}}}}}}}}| | \le \max \left(\sqrt{\epsilon },2{{{{{{{{\mathscr{L}}}}}}}}}^{2}\epsilon \right)\).

### Lemma 4

Consider an input state *ρ* and an LED procedure satisfying the conditions of Theorem 2. Then the final state *ρ*_{f} after LED cannot be prepared using a local quantum circuit with depth less than \(O({{{{{{{\mathscr{L}}}}}}}}) \sim O(1/\sqrt{\epsilon })\).

Upon combining the result of Lemma 4 with the fact that our LED procedure corresponds to a local quantum circuit with depth *O*(*d*), we find that the original input state \(\left\vert \psi \right\rangle\) cannot be prepared using a quantum circuit of depth smaller than \(O({{{{{{{\mathscr{L}}}}}}}}-d)\)—which is precisely the statement of Theorem 2. So, if we measure loops of length *L* ≫ *d* to be 1 − *ϵ*, this shows that LED provides a topological order witness up to length-scales of \(O(L/\sqrt{\epsilon })\).

We now discuss how these theoretical results are reflected in our numerical simulations. First, when fluctuations are local, the probability of having an error string of length *ℓ* decays exponentially with *ℓ*, and the exponent is determined by the characteristic length-scale *ξ* of fluctuations. In these systems, we expect the error rate after an optimal LED procedure with correction distance *d* to be given by *ϵ*(*d*) ∝ *e*^{−d/ξ}, so correction distance \(d={{\Omega }}(\xi \log {{{{{{{\mathscr{L}}}}}}}})\) is sufficient to certify topological order up to length-scale \({{{{{{{\mathscr{L}}}}}}}}\). Second, when LED uses the hierarchical, anyon-pairing decoder, the anyon density is observed to decrease faster than exponentially in the number *n* of LED steps (Fig. 10). In this case, both the measured stabilizer size and the correction distance *d* grow exponentially with *n*, which implies that the certification length-scale \({{{{{{{\mathscr{L}}}}}}}}\) grows at least exponentially with *n* as well. Third, our argument does not certify topological order to any length-scale when *L* < *d*; this is because the support of such an LED operator no longer has an interior, potentially giving rise to signal even in the trivial phase. Indeed, this is reflected in our numerics as well (Supplementary Information, Fig. S12).

### Connection to topological entanglement negativity

The entanglement negativity of a mixed state *ρ*_{S} is defined as \({S}_{N}(\rho )=\log | | \rho | {| }_{1}=\log (\sum {\lambda }_{i})\), where *λ*_{i} are the eigenvalues of *ρ*. Prior works have shown, via a combination of analytical arguments and numerical results, that in a topological phase, *S*_{N} obeys an area-law with a constant correction, i.e. *S*_{N} = *α**L* − *γ*. Further, recent results have also shown that the topological term *γ* vanishes at finite-temperature^{62}, or for high incoherent error rates^{63}. Thus, the negativity appears to capture important features of mixed state topological order.

The unitary circuit construction of LED also enables us to connect a positive classification under LED, to the topological entanglement negativity of the input state. In particular, theorem 1 implies that states classified as topological are connected to an output state \({\rho }_{f}=\left\vert {\psi }_{{{{{{{{\rm{TC}}}}}}}}}\right\rangle \left\langle {\psi }_{{{{{{{{\rm{TC}}}}}}}}}\right\vert \otimes {\alpha }_{{{{{{{{\rm{anc}}}}}}}}}\) via local unitary circuits. If we further assume the ancillas contain no long-range order (see SM for rigorous definition), then since \(\left\vert {\psi }_{{{{{{{{\rm{TC}}}}}}}}}\right\rangle\) is topologically ordered, the output state indeed has a topological correction in the entanglement negativity. It is further believed that *γ* is a topological invariant, i.e., it should remain invariant under local unitary circuits. As such, this should be sufficient to certify the input state *ρ*_{S} has topological order.

We show this in the SM, for the special case where the LED circuit is composed of Clifford gates, by extending the stabilizer formalism introduced in ref. ^{62}. Interestingly, there, the topological correction to *S*_{N} comes from the presence of decorated Wilson loops operators with non-trivial twist product in the input state *ρ*_{S} (see also proof of Lemma 4). Thus we conjecture a connection to topological entanglement negativity holds for LED Wilson loops more generally.

## Data availability

The data that support the plots within this paper and other findings of this study are available at https://osf.io/k8up2/. We note that more extensive data from the Rydberg-atom spin liquid experiment of ref. ^{28} are available at https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/BDCTRX.

## Code availability

The data that support the plots within this paper and other findings of this study are available at https://osf.io/k8up2/. We note that more extensive data from the Rydberg-atom spin liquid experiment of ref. ^{28} are available at https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/BDCTRX.

## References

Wen, X.-G. Colloquium: Zoo of quantum-topological phases of matter.

*Rev. Mod. Phys.***89**, 041004 (2017).Nayak, C., Simon, S. H., Stern, A., Freedman, M. & Das Sarma, S. Non-abelian anyons and topological quantum computation.

*Rev. Mod. Phys.***80**, 1083–1159 (2008).Terhal, B. M. Quantum error correction for quantum memories.

*Rev. Mod. Phys.***87**, 307–346 (2015).Sachdev, S. Kagome- and triangular-lattice Heisenberg antiferromagnets: Ordering from quantum fluctuations and quantum-disordered ground states with unconfined bosonic spinons.

*Phys. Rev. B***45**, 12377–12396 (1992).Hastings, M. B. & Wen, X.-G. Quasiadiabatic continuation of quantum states: the stability of topological ground-state degeneracy and emergent gauge invariance.

*Phys. Rev. B***72**, 045141 (2005).Wilson, K. G. Confinement of quarks.

*Phys. Rev. D***10**, 2445–2459 (1974).Haah, J. An invariant of topologically ordered states under local unitary transformations.

*Commun. Math. Phys.***342**, 771–801 (2016).Bridgeman, J. C., Flammia, S. T. & Poulin, D. Detecting topological order with ribbon operators.

*Phys. Rev. B***94**, 205123 (2016).Iqbal, M. & Schuch, N. Entanglement order parameters and critical behavior for topological phase transitions and beyond.

*Phys. Rev. X***11**, 041014 (2021).Duivenvoorden, K., Iqbal, M., Haegeman, J., Verstraete, F. & Schuch, N. Entanglement phases as holographic duals of anyon condensates.

*Phys. Rev. B***95**, 235119 (2017).Jamadagni, A., Kazemi, J. & Weimer, H. Learning of error statistics for the detection of quantum phases https://arxiv.org/abs/2205.12966 (2022).

Kitaev, A. & Preskill, J. Topological entanglement entropy.

*Phys. Rev. Lett.***96**, 110404 (2006).Levin, M. & Wen, X.-G. Detecting topological order in a ground state wave function.

*Phys. Rev. Lett.***96**, 110405 (2006).Schuch, N., Pérez-García, D. & Cirac, I. Classifying quantum phases using matrix product states and projected entangled pair states.

*Phys. Rev. B***84**, 165139 (2011).Chen, X., Gu, Z.-C. & Wen, X.-G. Classification of gapped symmetric phases in one-dimensional spin systems.

*Phys. Rev. B***83**, 035107 (2011).Kitaev, A. Fault-tolerant quantum computation by anyons.

*Ann. Phys.***303**, 2–30 (2003).Cong, I., Choi, S. & Lukin, M. D. Quantum convolutional neural networks.

*Nat. Phys.***15**, 1273–1278 (2019).Chen, X., Gu, Z.-C. & Wen, X.-G. Local unitary transformation, long-range quantum entanglement, wave function renormalization, and topological order.

*Phys. Rev. B***82**, 155138 (2010).Haegeman, J., Van Acoleyen, K., Schuch, N., Cirac, J. I. & Verstraete, F. Gauging quantum states: from global to local symmetries in many-body systems.

*Phys. Rev. X***5**, 011024 (2015).Zhu, G.-Y. & Zhang, G.-M. Gapless coulomb state emerging from a self-dual topological tensor-network state.

*Phys. Rev. Lett.***122**, 176401 (2019).Castelnovo, C. & Chamon, C. Quantum topological phase transition at the microscopic level.

*Phys. Rev. B***77**, 054433 (2008).Haah, J., Harrow, A. W., Ji, Z., Wu, X. & Yu, N. Sample-optimal tomography of quantum states.

*IEEE Trans. Inf. Theory***63**, 5628–5641 (2017).Dennis, E., Kitaev, A., Landahl, A. & Preskill, J. Topological quantum memory.

*J. Math. Phys.***43**, 4452–4505 (2002).Fredenhagen, K. & Marcu, M. Charged states in \({{\mathbb{Z}}}_{2}\) gauge theories.

*Commun. Math. Phys.***92**, 81–119 (1983).Peres, A. Separability criterion for density matrices.

*Phys. Rev. Lett.***77**, 1413–1415 (1996).Horodecki, M., Horodecki, P. & Horodecki, R. Separability of mixed states: necessary and sufficient conditions.

*Phys. Lett. A***223**, 1–8 (1996).Lee, Y. A. & Vidal, G. Entanglement negativity and topological order.

*Phys. Rev. A***88**, 042318 (2013).Semeghini, G. et al. Probing topological spin liquids on a programmable quantum simulator.

*Science***374**, 1242–1247 (2021).Verresen, R., Lukin, M. D. & Vishwanath, A. Prediction of toric code topological order from Rydberg blockade.

*Phys. Rev. X***11**, 031005 (2021).Saffman, M., Walker, T. G. & Mølmer, K. Quantum information with rydberg atoms.

*Rev. Mod. Phys.***82**, 2313–2363 (2010).Misguich, G., Serban, D. & Pasquier, V. Quantum Dimer Model on the Kagome Lattice: Solvable Dimer-Liquid and Ising Gauge Theory.

*Phys. Rev. Lett.***89**, 137202 (2002).Poilblanc, D., Schuch, N., Pérez-García, D. & Cirac, J. I. Topological and entanglement properties of resonating valence bond wave functions.

*Phys. Rev. B***86**, 014404 (2012).Samajdar, R., Joshi, D. G., Teng, Y. & Sachdev, S. Emergent \({{\mathbb{Z}}}_{2}\) gauge theories and topological excitations in Rydberg atom arrays https://arxiv.org/abs/2204.00632 (2022).

Tarabunga, P. S., Surace, F. M., Andreoni, R., Angelone, A. & Dalmonte, M. Gauge-theoretic origin of rydberg quantum spin liquids.

*Phys. Rev. Lett.***129**, 195301 (2022).Verresen, R. & Vishwanath, A. Unifying Kitaev magnets, kagome dimer models and ruby Rydberg spin liquids.

*Phys. Rev. X***12**, 041029 (2022).Bricmont, J. & Frölich, J. An order parameter distinguishing between different phases of lattice gauge theories with matter fields.

*Phys. Lett. B***122**, 73–77 (1983).Gregor, K., Huse, D. A., Moessner, R. & Sondhi, S. L. Diagnosing deconfinement and topological order.

*N. J. Phys.***13**, 025009 (2011).Giudici, G., Lukin, M. D. & Pichler, H. Dynamical preparation of quantum spin liquids in Rydberg atom arrays.

*Phys. Rev. Lett.***129**, 090401 (2022).Cheng, Y., Li, C. & Zhai, H. Variational approach to quantum spin liquid in a Rydberg atom simulator https://arxiv.org/abs/2112.13688 (2021).

Levin, M. A. & Wen, X.-G. String-net condensation: A physical mechanism for topological phases.

*Phys. Rev. B***71**, 045110 (2005).Wang, Z.

*Topological Quantum Computation*. 112 (American Mathematical Soc., 2010).Bakalov, B. & Kirillov, A. A.

*Lectures on Tensor Categories and Modular Functors*, vol. 21 (American Mathematical Soc., 2001).König, R., Reichardt, B. W. & Vidal, G. Exact entanglement renormalization for string-net models.

*Phys. Rev. B***79**, 195123 (2009).Huang, H.-Y., Kueng, R., Torlai, G., Albert, V. V. & Preskill, J. Provably efficient machine learning for quantum many-body problems.

*Science***377**, eabk3333 (2022).Wang, C., Harrington, J. & Preskill, J. Confinement-higgs transition in a disordered gauge theory and the accuracy threshold for quantum memory.

*Ann. Phys.***303**, 31–58 (2003).Satzinger, K. et al. Realizing topologically ordered states on a quantum processor.

*Science***374**, 1237–1241 (2021).Stricker, R. et al. Experimental deterministic correction of qubit loss.

*Nature***585**, 207–210 (2020).Jamadagni, A. & Weimer, H. Operational definition of topological order.

*Phys. Rev. B***106**, 085143 (2022).Bao, Y., Fan, R., Vishwanath, A. & Altman, E. Mixed-state topological order and the errorfield double formulation of decoherence-induced transitions 2301.05687 (2023).

Hastings, M. B. Topological order at nonzero temperature.

*Phys. Rev. Lett.***107**, 210501 (2011).Verresen, R., Tantivasadakarn, N. & Vishwanath, A. Efficiently preparing Schrödinger’s cat, fractons and non-abelian topological order in quantum devices https://arxiv.org/abs/2112.03061 (2021).

Schuch, N., Poilblanc, D., Cirac, J. I. & Pérez-García, D. Resonating valence bond states in the PEPS formalism.

*Phys. Rev. B***86**, 115108 (2012).Schuch, N., Wolf, M. M., Verstraete, F. & Cirac, J. I. Computational complexity of projected entangled pair states.

*Phys. Rev. Lett.***98**, 140506 (2007).Cirac, J. I., Pérez-García, D., Schuch, N. & Verstraete, F. Matrix product states and projected entangled pair states: concepts, symmetries, theorems.

*Rev. Mod. Phys.***93**, 045003 (2021).Napp, J. C., La Placa, R. L., Dalzell, A. M., Brandão, F. G. S. L. & Harrow, A. W. Efficient classical simulation of random shallow 2d quantum circuits.

*Phys. Rev. X***12**, 021021 (2022).Vidal, G. Class of quantum many-body states that can be efficiently simulated.

*Phys. Rev. Lett.***101**, 110501 (2008).Duclos-Cianci, G. & Poulin, D. Fault-tolerant renormalization group decoder for abelian topological codes https://arxiv.org/abs/1304.6100 (2013).

Fowler, A. G., Mariantoni, M., Martinis, J. M. & Cleland, A. N. Surface codes: towards practical large-scale quantum computation.

*Phys. Rev. A***86**, 032324 (2012).Zhu, G., Lavasani, A. & Barkeshli, M. Universal logical gates on topologically encoded qubits via constant-depth unitary circuits.

*Phys. Rev. Lett.***125**, 050502 (2020).McClean, J. R., Boixo, S., Smelyanskiy, V. N., Babbush, R. & Neven, H. Barren plateaus in quantum neural network training landscapes.

*Nat. Commun.***9**, 1–6 (2018).Pesah, A. et al. Absence of barren plateaus in quantum convolutional neural networks.

*Phys. Rev. X***11**, 041011 (2021).Lu, T.-C. & Vijay, S. Characterizing long-range entanglement in a mixed state through an emergent order on the entangling surface https://arxiv.org/abs/2201.07792 (2022).

Fan, R., Bao, Y., Altman, E. & Vishwanath, A. Diagnostics of mixed-state topological order and breakdown of quantum memory 2301.05689 (2023).

## Acknowledgements

We thank E. Altman, Y. Bao, D. Bluvstein, Z.-P. Cian, S. Ebadi, G. Giudici, M. Hafezi, H.-Y. Huang, A. Kitaev, H. Levine, J. Preskill, S. Sachdev, R. Sahay, N. Tantivasadakarn, R. Verresen, A. Vishwanath, T. T. Wang, and X.-G. Wen for insightful discussions, and we especially thank D. Aasen and Z. Wang for providing helpful information and conversations on applying LED to non-abelian topological phases. This work was supported by the US Department of Energy [DE-SC0021013 and DOE Quantum Systems Accelerator Center (contract no. 7568717)], the Defense Advanced Research Projects Agency (grant no. W911NF2010021), the National Science Foundation, the Department of Defense Multidisciplinary University Research Initiative (ARO MURI, grant no. W911NF2010082), and the Harvard-MIT Center for Ultracold Atoms. I.C. acknowledges support from the Alfred Spector and Rhonda Kost Fellowship of the Hertz Foundation, the Paul and Daisy Soros Fellowship, and the Department of Defense through the National Defense Science and Engineering Graduate Fellowship Program. N.M. acknowledges support from the Department of Energy Computational Science Graduate Fellowship under Award Number DE-SC0021110. H.P. acknowledges support from the ERC Starting grant no. 101041435 and the Erwin Schrödinger Center for Quantum Science and Technology.

## Author information

### Authors and Affiliations

### Contributions

All authors contributed to the conception of the LED approach, discussed the results, and helped to prepare the manuscript. I.C., N.M., M.T. and H.P. developed simulation techniques and performed theoretical and numerical analysis. I.C., N.M. and G.S. applied the techniques to experimental data. All work was supervised by S.F.Y., S.C. and M.D.L.

### Corresponding author

## Ethics declarations

### Competing interests

M.D.L. is a co-founder and shareholder of QuEra Computing. The remaining authors declare no competing interests.

## Peer review

### Peer review information

*Nature Communications* thanks the anonymous reviewers for their contribution to the peer review of this work. A peer review file is available.

## Additional information

**Publisher’s note** Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

## Supplementary information

## Rights and permissions

**Open Access** This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/.

## About this article

### Cite this article

Cong, I., Maskara, N., Tran, M.C. *et al.* Enhancing detection of topological order by local error correction.
*Nat Commun* **15**, 1527 (2024). https://doi.org/10.1038/s41467-024-45584-6

Received:

Accepted:

Published:

DOI: https://doi.org/10.1038/s41467-024-45584-6

## Comments

By submitting a comment you agree to abide by our Terms and Community Guidelines. If you find something abusive or that does not comply with our terms or guidelines please flag it as inappropriate.