Introduction

Since Kitaev’s seminal works1,2, the surface code has been the dominant choice for quantum error correction (QEC) as its set of check operators, or stabilizers, is simple and geometrically local enabling parallel syndrome extraction with a high tolerance to errors. However, the encoding—only one logical qubit per code independently of the size—is poor, posing a large resource overhead for scalable quantum computing. The surface code is but one example of a broader class of low-density parity-check (LDPC) codes3,4, other members of which retain all the good properties of the surface code such as large distance, which quantifies the number of correctable errors, while allowing for more favorable encoding rates, defined by the ratio of logical qubits to physical qubits.

Recently, there has been intense activity benchmarking the performance of various LDPC codes both for fault-tolerant error correction5,6,7 and quantum computing8 with results converging towards the idea that “the more non-local, the better”. However, the investigation into how to use the physics available natively in quantum computing platforms to maximally utilize the advantages of LDPC codes is still relatively at an early stage. Ref. 5 shows theoretically that a stacked two-dimensional architecture can outperform the surface code under circuit-level noise in constant-overhead hypergraph product quantum LDPC codes, provided that inter-layer cross-talks are sufficiently suppressed. Similarly, biplanar bivariate bicycle codes6 have recently shown high quantum error suppression with moderate long-range connectivity requirements, which make them intriguing candidates for near-term implementations on several platforms (e.g., superconducting6 or neutral atom9 qubits). While the recent experimental realization of both constant-rate and high-rate quantum LDPC codes via qubit shuttling with trapped ions10,11 and neutral atoms 7,12—at the price of a considerable time overhead—is a major advancement, the goal of identifying the best quantum LDPC code family ultimately remains open and intrinsically hardware-dependent.

In this work, we provide a first proposal for a near-term implementation in neutral atom registers of LDPC codes that is both static—i.e. it does not require qubit shuttling—and fast compared to existing proposals. We show that these quantum LDPC codes outperform the surface code at the circuit level just using moderate non-local resources. To this purpose, we analyze a family of high-rate quantum LDPC codes built via hypergraph product (HGP) construction13,14,15,16. We refer to them as La-cross codes, since the arrays of their stabilizer shapes, each consisting of a surface code stabilizer cross with two extra long-range interactions, is reminiscent of a long-armed cross stitch pattern (Fig. 1a). The length of these interactions—or amount of non-locality—solely depends on the parameters of the classical seeds the quantum code is constructed from and thus is, to an extent, tunable. We discuss encoding capabilities and probe tolerance to errors via circuit-level simulations accounting for state preparation, measurement, single- and range-dependent two-qubit gate errors. Compared to the surface code with the same number of physical and logical qubits, we obtain sub-threshold logical error probability reductions that can reach the order of magnitude and increase with the number of physical qubits. The second part of this work is aimed at making contact with near-term experiments with neutral atom quantum registers17,18,19,20,21,22. For two-dimensional arrays with open boundaries, we show how the Rydberg blockade mechanism enables the necessary long-range gates for stabilizer measurements without the need for swapping or qubit shuttling. Our error model accounts for fidelity decay as a function of gate distance, due fundamentally to the decay of the van der Waals interaction strength. Finally, we show further improvement by adopting an error model with range-independent gate errors. In this case, the threshold increases, and the onset of improvement over the surface code occurs at higher physical error probabilities. For example, the most non-local instance of La-cross codes discussed in this work shows improvement over the surface code below nearest neighbor gate error probabilities of  ~0.5%, already outperforming the surface code logical failure probability by more than one order of magnitude at physical error probabilities of  ~0.1%. Such a range-independent noise model may be realized by qubit shuttling in neutral atom registers7,10,12, or in different physical platforms like photonic registers with direct non-local fiber coupling23 or matter-based qubit architectures with cavity-mediated interactions24.

Fig. 1: Code overview for quantum error correction performance and implementation.
figure 1

a Array patch with data (gray) and ancillary (white) qubits hosting one instance of the here analyzed LDPC code family. Long-range interactions are highlighted in yellow, two stabilizers are drawn (red and blue) with displayed CNOT measurement order for syndrome extraction. The inset shows energy levels and selected transitions (vertical arrows) to different Rydberg states for implementation with neutral atom qubits. Two-qubit gates between one and five lattice sites separated qubits and corresponding Rydberg transitions are colored in orange and violet, respectively. Principal quantum numbers are chosen to minimize gate infidelity while still preserving a sufficient Rydberg blockade strength (see text). b Depth-10 syndrome measurement circuit neglecting idle errors. c Encoding rate, hence qubit overhead, comparison between k-LDPC codes and surface code (SC) given the same number of logical qubits and code distance. d and e Illustration showing logical failure probability for k = 2- and 3-LDPC codes as a function of nearest neighbor two-qubit gate physical error probability and number of physical qubits. Solid lines correspond to crossing probabilities below which the LDPC logical error probability gets lower than the surface code one, assuming an equal number of logical and physical qubits for both codes. Dashed black line is an extrapolation to larger numbers of physical qubits.

Results

Quantum LDPC codes

Quantum LDPC codes3 are stabilizer codes where both the number of qubits acted on by each stabilizer and the number of stabilizers acting on each qubit are constantly bounded. Stabilizers are then sparse, hence the notion of low density invoked in their name. The encoding rate satisfies \(K/N\mathop{\to }\limits^{N\to \infty }C\ge 0\), for some constant C, being N and K the number of physical and logical qubits, respectively. While constant rate, C > 0, quantum LDPC codes exist, the better-studied examples have zero rates. The surface code is an example with \(K={{\mathcal{O}}}(1)\), hence zero rate, and a code distance \(D={{\mathcal{O}}}(\sqrt{N})\). For practical use, it is not necessarily the asymptotic scaling of the rate that matters, but rather choosing a code with a favorable ratio K/N for large but finite N, together with a large distance.

In the following, we review how a quantum LDPC code can be constructed via hypergraph product construction by combining two classical LDPC codes, namely classical codes with sparse checks. Let \({{{\mathcal{C}}}}_{i}=[{n}_{i},{k}_{i},{d}_{i}]\) with i = 1, 2 be two classical linear codes encoding ki logical bits in ni physical bits with code distance di (see below). Any of these codes can be represented by a matrix \({H}_{i}\in {{\mathbb{F}}}_{2}^{{r}_{i}\times {n}_{i}}\), called a parity-check matrix, having as many columns as physical bits and as many rows, ri, as checks. Entries of Hi are non-zero any time a check acts non-trivially on the corresponding bit. The number of encoded bits is then ki = ni−rank(Hi). The codewords of these classical codes are vectors in the kernel of Hi. The minimum Hamming distance between two codewords is called the distance di. Associated with each classical code is a transposed code \({{{\mathcal{C}}}}_{i}^{{\rm {T}}}=[{r}_{i},{k}_{i}^{{\rm {T}}},{d}_{i}^{{\rm {T}}}]\) with parity-check matrix \({H}_{i}^{{\rm {T}}}\). The hypergraph product (HGP) construction13 combines two classical codes along with their transposed codes, \({{{\mathcal{C}}}}_{i}\) and \({{{\mathcal{C}}}}_{i}^{{\rm {T}}}\), to produce a [[NKD]] quantum stabilizer code with a quantum parity-check matrix

The left block of Hq describes X-type stabilizers, while the right one describes Z-type stabilizers. The total number of stabilizers then equals the number of rows of Hq, i.e. n1r2 + n2r1. As before, entries of the quantum parity-check matrix are non-zero anytime an X or Z stabilizer acts non-trivially on the corresponding qubit. The number of physical qubits N = n1n2 + r1r2 is half the number of columns of Hq, while the number of encoded logical qubits is \(K={k}_{1}{k}_{2}+{k}_{1}^{{\rm {T}}}{k}_{2}^{{\rm {T}}}\). The distance D of this quantum code denotes the minimum weight of a Pauli operator commuting with all stabilizers without being itself a product of stabilizers. It can be shown that for the HGP construction, the distance satisfies \(D\ge \min \{{d}_{1},{d}_{2},{d}_{1}^{{\rm {T}}},{d}_{2}^{{\rm {T}}}\}\)13. The resulting quantum stabilizer code is of Calderbank-Shor-Steane (CSS) type25,26 as stabilizers are either products of only X or only Z Pauli operators.

For the present purposes, we have chosen the seed codes \({{{\mathcal{C}}}}_{i}\) to be cyclic codes generalizing the repetition code the surface code is built upon. Such a choice both allows for improving the encoding rate and retaining most of the intuitiveness of the surface code, at the price of a non-constant overhead in the asymptotic limit. However, this does not represent a severe issue in the prospect of implementation on near-term quantum computers, as we will discuss more quantitatively in the next sections.

Classical seeds and quantum layout

In this section we review how stabilizers, logical operators, and array shape of a quantum HGP code are determined from its classical seeds. This represents a huge help in designing new LDPC codes tailored to the connectivity of the quantum hardware.

We have chosen cyclic seed codes, i.e. codes with cyclic shift invariant codewords. A square matrix is said to be circulant if its rows are cyclic shifts of the first row15. When the parity-check matrix, H, is circulant, the associated code is fully specified by the first row of \(H=\,{\mbox{circ}}\,({c}_{0},{c}_{2},\ldots,{c}_{k},0,\ldots,0)\in {{\mathbb{F}}}_{2}^{n\times n}\). Entries ci (i = 0, 1, …, k) can be mapped into coefficients of a degree-k polynomial of the form \(h(x)=1+{\sum }_{i=1}^{k}{c}_{i}{x}^{i}\). More formally, there exists a map \({{\mathbb{F}}}_{2}^{n}\to {{\mathbb{F}}}_{2}[x]/({x}^{n}-1)\), being \({{\mathbb{F}}}_{2}[x]/({x}^{n}-1)\) the ring of polynomials dividing xn−1. This map transforms cyclic shifts in \({{\mathbb{F}}}_{2}^{n}\) into multiplications by x in \({{\mathbb{F}}}_{2}[x]/({x}^{n}-1)\), hence cyclic-shift-invariant codes into polynomials invariant under x-multiplication. Due to the ring structure, invariance under multiplication by x is equivalent to invariance under multiplication of any element of the ring, a property defining the so-called ideals of the ring. Thus, there exists a one-to-one correspondence between cyclic codes \({{\mathcal{C}}}\subseteq {{\mathbb{F}}}_{2}^{n}\) and ideals of \({{\mathbb{F}}}_{2}[x]/({x}^{n}-1)\), which in turn are in one-to-one correspondence with unitary mod-2-divisors of xn−1 having a leading coefficient equal to 1. Building blocks of length-n cyclic codes then correspond to factors of xn−1. For k = 1 the repetition code is recovered.

We note that there always exists a mapping from the quantum parity-check matrix to array indexing so that the shape of the stabilizers of the code can be directly inferred from the polynomial of the classical seed (see Fig. 2a). Additionally, there always exists a basis where logical operators align along the same row or column. In contrast to the surface code where logical operators are Pauli strings stretching from boundary to boundary, for the present code family logical operators are Pauli strings—possibly with holes - which are shorter in length and larger in number (Fig. 2b). As a second remark, we observe that, if H is circulant, for any n only some k’s are allowed, as H may happen to be full-rank, and thus k = 0. The HGP of equal seeds having circulant parity check matrix, \(H\in {{\mathbb{F}}}_{2}^{n\times n}\), naturally leads to a quantum code with parameters N = 2n2, K = 2k2, and periodic boundary conditions. In this work, we are interested in codes with open boundary conditions for the sake of experimental realization, thus we choose a full-ranked \(H\in {{\mathbb{F}}}_{2}^{(n-k)\times n}\), which, by being rectangular, allows for any choice of k and n. Quantum parameters now read N = (nk)2 + n2 and K = k2 (half logical qubits get “lost”), with consequent array shape shown in Fig. 2c, which can be squeezed to restore a full square configuration. A consequent effect is that squeezed stabilizers have effectively shorter legs (see Fig. 2c, right panel), where a leg is defined as the distance between the central ancilla and a non-local data qubit of the stabilizer. Depending on the exact position of the boundary stabilizer, this effective shortening can even result in legs of different lengths in different directions (see, e.g., the red stabilizer in Fig. 2c, right panel). Interestingly, this effective leg shortening improves the circuit-level error correction performance (see below) and is later accounted for in quantum error correction simulations. For more details regarding seed choice and code construction, see Supplementary Information.

Fig. 2: Code layout, logical operators, and boundary conditions.
figure 2

a Classical polynomial seeds constraining stabilizer shape and ruling one lattice direction each. Both symmetric and asymmetric configurations are allowed. The examples here refer to the cases n1 = 6,  k1 = 2 (vertical) and n2 = 15,  k2 = 7 (horizontal). Data(ancilla) qubits are colored black(white). b The [[65, 9, 4]] k = 3-LDPC code with the 9 partially overlapping horizontal logical Z operators shown in different colors. c Array shape and two stabilizers with periodic boundary conditions (PBC), open boundary conditions (OBC), and squeezed open boundary conditions, assuming n = 7 and k = 3 (equal seeds). Long-range gates of boundary stabilizers are effectively shorter upon array reshaping (from length j = 5 lattice sites to j = 4 or j = 3 here), which should be included in quantum error correction simulations under a range-dependent noise model.

In the following, we stick to a sub-family of HGP codes with equal seed polynomials of the form h(x) = 1 + x + xk and, consequently weight-6 stabilizers, which we study for different values of k. The k = 2 instance of this family has recently been studied in ref. 10, where the possibility of implementation via qubit shuttling is discussed. This polynomial choice provides quantum codes with high rate, low stabilizer weight, and moderate non-locality both in terms of range and number of long-range interactions while allowing for a similar implementation scheme as the surface code. We mention in passing that the similar polynomial \(\bar{h}(x)=1+{x}^{k}\) leads to codes with a shorter distance than h(x) = 1 + x + xk and shows no apparent improvement in the overhead over the surface code. For example, the HGP of two [9, 3, 3] classical codes, i.e. 1 + x3, leads to a quantum code with N = 162 (periodic boundary conditions) or N = 117 (open boundary conditions). These code parameters exactly match the number of physical qubits of K copies of surface codes, thus not allowing for any overhead saving, independently of the choice of boundary conditions.

Error models

We perform quantum error correction with data and ancilla qubits placed in the same square array, analogous to an unrotated surface code with open boundaries. To measure a stabilizer, a CZ gate has to be applied between the ancilla qubit, located in the middle of the cross describing the stabilizers, and the six data qubits (see Fig. 1a and b). For the four data qubits that directly neighbor the ancilla qubits, this can be done simultaneously for all stabilizers27, while the long-range CZ gates to the remaining data qubits have to be applied separately for X and Z stabilizers, leading to a stabilizer measurement circuit of depth 10 (see Fig. 1b). Such gate ordering for the syndrome extraction circuit also ensures robustness against hook errors when open boundary conditions are enforced (see Supplementary Information).

The code tolerance against errors is probed via numerical simulations under circuit-level depolarizing noise, which is chosen to directly compare with existing literature6,7. We assume uniformly distributed Pauli errors drawn from {XZY} and {IXZY}2\{I I} with probability p1/3 and p2/15 for single and two-qubit errors, respectively. We simulate D rounds of syndrome measurements, using Stim28 to sample from the code circuit and Belief Propagation with Ordered Statistics Decoder (BP + OSD)29,30 to process syndrome information (see the “Methods” section). The latter is commonly regarded as one of the most viable approaches to decode arbitrary quantum LDPC codes.

For the error model above, we denote our error probabilities as {p1p2(j), pppm} where p1 is the aforementioned single-qubit error probability, p2(j) is the two-qubit error probability for separations of j in units of lattice spacing between control and target, pp and pm are the preparation and measurement error probabilities, respectively. Idle errors are neglected. We focus most of our analysis on noise ratios appropriate for neutral atom hardware based on numbers reported in experiments for state preparation and measurement (SPAM) errors31, and gate errors31,32, by adopting the following hardware-specific noise parameters {p = p2(1), p2(j) = cjpp1 = p/10, pp = pm = 2p}, with cj the proportionality constants between long-range two-qubit gate error probabilities and the nearest neighbor two-qubit gate error probability (see below). The choice of linear dependence is justified in the Methods section. Experimentally, atom arrays can be directly loaded in the reshaped configuration discussed before for squeezed open boundary conditions (Fig. 2c). Consequently, under the range-dependent noise model, boundary long-range gates get shorter and the associated fidelities improve at the boundaries. Such a favorable finite-size effect is particularly relevant for small atom arrays. Subsequently, anticipating potential implementation with other platforms and mostly for comparison with existing literature, we provide numerical results for a hardware-agnostic noise parameter set using {p ≡ p1 = p2(j)jpp = pm = 0}, i.e. where all unitary gate errors are treated as equal (cf. ref. 33). Measurement and reset gates have hardware-dependent fidelities, hence we just set the SPAM error strength to zero.

Performance of La-cross codes

Overhead reduction against the surface code is the main motivation for adopting quantum LDPC codes. As shown in Fig. 1c, the present code family offers a significant advantage in terms of encoding rate, and hence qubit overhead, when compared to surface codes having the same number of logical qubits and distance, although asymptotically both are still scale-like \(K={{\mathcal{O}}}(1),\,D={{\mathcal{O}}}(\sqrt{N})\). Along with overhead saving, the present code family also shows an advantage over the surface code given an equal number of physical and logical qubits, offering larger code distance and lower logical error probability for sufficiently small physical error probabilities, as shown below.

In Fig. 3a–c, we first present the error correction performance for several different sizes of La-cross codes under hardware-specific noise and defer the hardware-agnostic case to the Supplementary Information (Supplementary Fig. 3a–c). We plot the cumulative logical error probability, i.e. the probability that any of the K logical qubits fails, normalized by the number of rounds, \({P}_{{\rm {L}}}=1-{(1-{p}_{{\rm {L}}})}^{1/D}\) vs. the nearest-neighbor two-qubit gate error probability p, with pL = errors/shots, for k = 2, 3, 4-LDPC codes. This is consistent with real experiments where one wants all logical qubits to be protected at the same time. We find nearest-neighbor two-qubit gate error probability thresholds \({p}_{{\rm {th}}}^{k=2}\approx 0.22\%\), \({p}_{{\rm {th}}}^{k=3}\approx 0.20\%\), \({p}_{\rm {{th}}}^{k=4}\approx 0.17\%\), which for simulations with hardware-agnostic noise further improve to \({p}_{\rm {{th}}}^{k=2}\approx 0.38\%\), \({p}_{{\rm {th}}}^{k=3}\approx 0.45\%\), \({p}_{{\rm {th}}}^{k=4}\approx 0.5\%\) (see Supplementary Information). While in the latter case \({p}_{{\rm {th}}}^{k}\) increases with the degree of non-locality k, in the hardware-specific case, long-range gates get longer and thus more faulty (see below) and so \({p}_{{\rm {th}}}^{k}\) decreases with k. In all cases, the slope of the decoding curves is found to be consistent within good agreement (black dashed lines) with the expected behavior in the deep sub-threshold regime: \({P}_{{\rm {L}}}(p)\approx A{\left(p/{p}_{{\rm {th}}}\right)}^{{D}_{{\rm {e}}}}\), being \({D}_{{\rm {e}}}=\left\lfloor \frac{D+1}{2}\right\rfloor\) the effective distance of the code, namely the length of the minimal physical error chain triggering a logical error.

Fig. 3: Error correction performance under hardware-specific noise model.
figure 3

Cumulative logical error probability normalized by the number, D, of rounds \({P}_{{\rm {L}}}(p)={(1-{p}_{{\rm {L}}}(p))}^{1/D}\) for k = 2 (a), k = 3 (b), k = 4 (c) vs. nearest-neighbor two-qubit gate error probability p, under circuit-level depolarizing errors with hardware-specific noise. Error bars correspond to standard deviations \({\sigma }_{{P}_{{\rm {L}}}}=\sqrt{{P}_{\rm {{L}}}(1-{P}_{{\rm {L}}})/(\,{\mbox{shots}})}\). Vertical dotted lines indicate the approximate location of the threshold probability pth. Dashed black lines are added to show the qualitative good agreement of the decoding curves with the expected asymptotic scaling. df Logical error probability comparison against the surface code given the same number of logical and physical qubits. For larger-distance codes, extrapolations to lower logical error probabilities are shown (solid lines) to guide the eye. Surface code simulations have been performed under depolarizing noise with the same single- and nearest neighbor two-qubit gate and SPAM errors as the LDPC codes.

We show in Fig. 3d–f comparisons of error correction performance for the k = 2,  3,  4-LDPC codes with the surface code with an equal number of logical and physical qubits. We find that in all cases a crossing occurs between the LDPC and surface code decoding curves at a given nearest-neighbor gate error probability p* ~ 10−3, with the LDPC achieving lower logical errors for p < p* (see also Fig. 1d and e). The crossing value p* ~ 10−3 is already within experimental reach, despite the penalty on long-range gates we have enforced.

We observe that p* slowly decreases as the distance increases. In the sub-threshold regime, the logical error probability for both codes scales as \({P}_{\rm {{L}}}(p)\approx A{\left(p/{p}_{{\rm {th}}}\right)}^{D/2}=A{\left(p/{p}_{{\rm {th}}}\right)}^{\beta \sqrt{N}}\), with \(\beta={{\mathcal{O}}}(1)\) and A is the logical error probability extrapolated from the power-law behavior up to the threshold. Defining the two k-dependent values \({\beta }_{{{\rm{sc}}}}={(2\sqrt{2K})}^{-1}\) and βldpc, with the former determined by partitioning the N physical qubits into K surface codes so the number of logical qubits is equal for both, a simple argument (see the “Methods” section) shows that

$${p}{*}={\left(\frac{{({p}_{{\rm {th}}}^{{{\rm{sc}}}})}^{{\beta }_{{{\rm{sc}}}}}}{{({p}_{{\rm {th}}}^{{{\rm{ldpc}}}})}^{{\beta }_{{{\rm{ldpc}}}}}}\right)}^{\frac{1}{{\beta }_{{{\rm{sc}}}}-{\beta }_{{{\rm{ldpc}}}}}}{\left[{\left(\frac{{A}_{{{\rm{ldpc}}}}}{{A}_{{{\rm{sc}}}}}\right)}^{\frac{1}{{\beta }_{{{\rm{sc}}}}-{\beta }_{{{\rm{ldpc}}}}}}\right]}^{\frac{1}{\sqrt{N}}}.$$

Therefore, since βsc < βldpc by construction and from data extrapolation 0 < (Aldpc/Asc) < 1, we find that p* decreases as the size N increases, but converges to a constant greater than zero asymptotically. This ensures that the LDPC codes always offer lower logical error probability for sufficiently small physical error probabilities with respect to the surface code, given the same number of logical and physical qubits.

In the Supplementary Information we compare the La-cross codes to other quantum LDPC codes in terms of qubit overhead, type of connectivity and geometrical layout.

Implementation with neutral atom qubits

In the following, we discuss the implementation of our family of La-cross LDPC codes on neutral atom quantum computers. In particular, we show how long-range connectivity can be realized natively via Rydberg-blockade interactions involving highly excited electronic Rydberg states. We rely on the standard blockade gate34, consisting of one laser-excited atom shifting the Rydberg states of a neighboring atom off-resonance via strong Rydberg-Rydberg interaction (Rydberg blockade mechanism) to accumulate the desired two-qubit gate phase shift. In fact, while several other gate protocols exist35,36,37,38, such a gate scheme currently represents the most robust approach for performing high-fidelity two-qubit gates with neutral atom qubits22,39,40,41,42.

For concreteness, we here assume an array of 137Cs atoms with lattice spacing R and take \(\vert 0\rangle=\vert 6{s}_{1/2},\,F=3,\,{m}_{{\rm {F}}}=0\rangle\) and \(\left\vert 1\right\rangle=\vert 6{s}_{1/2},\,F=4,\,{m}_{{\rm {F}}}=0\rangle\). To perform a CZ gate between two atoms with a separation of j lattice sites we couple the state \(\left\vert 1\right\rangle\) to a Rydberg state \(\vert {r}_{j}\rangle=\vert {n}_{j}s\rangle\) using a two-photon transition via the intermediate \(\vert 7{p}_{1/2}\rangle\) state with effective Rabi frequency Ωj. We choose the laser phase φ(t) according to the time-optimal (TO) protocol43,44 in order to minimize gate duration and Rydberg scattering. Note that we propose to use different principal quantum numbers nj for different interatomic distances. Hereafter, in this section, the symbol n will refer to principal quantum numbers and not to classical code parameters.

The atoms interact via a dipole–dipole interaction, which for large atomic distances jR can be perturbatively treated as a van der Waals interaction \({\sum }_{j}{B}_{j}\vert {r}_{j}{r}_{j}\rangle \langle {r}_{j}{r}_{j}\vert\), where the blockade strength Bj scales as \({B}_{j}\propto {n}_{j}^{11}/{(jR)}^{6}\). There are two constraints on our choice of nj: First, nj must be large enough to ensure a sufficient Rydberg blockade. While the TO protocol was originally designed in the limit Bj Ωj, small variations of the phase profile φ(t) allow to implement a CZ gate as long as Bj Ωj. For concreteness, we here require Bj ≥ 3Ωj, striking a compromise between allowing finite interaction strengths Bj while preserving the qualitative behavior of the Bj Ωj limit. The second constraint is that nj must be small enough such that the perturbative treatment of the dipole–dipole interaction is valid. For too large nj we enter the so-called “Spaghetti” regime, in which the eigenstates of the two atom Hamiltonian cannot be approximated by-product states anymore. Both the lower and the upper bound of nj depend on the interatomic distance jR. This is exemplified in Fig. 4, which shows the eigenenergies of the two-atom Hamiltonian near the \(\left\vert 75s,75s\right\rangle\) state45. The shaded green area marks the range of interatomic distances jR for which nj = 75 allows for a sufficient Rydberg blockade without entering the “Spaghetti” regime.

Fig. 4: Two-atom Hamiltonian eigenenergies.
figure 4

Pair state interaction energy ΔE calculated as a function of the interatomic distance jR for different eigenstates of the two-atom Hamiltonian. Red points are eigenenergies of eigenstates with the largest overlap with the \(\left\vert 75s,75s\right\rangle\) state. Panel b shows zoom-in of panel (a) on the range 0 ≤ ΔE/h ≤ 10 MHz. Blue line shows the minimal interaction B = 3Ω which we assume to be necessary for a Rydberg blockade gate (we take the realistic value Ω = 2π × 1.9 MHz18). The range of valid distances in which there is a sufficient blockade (B ≥ 3Ω) but we have not yet entered the “Spaghetti” regime, where the perturbative treatment of the dipole-dipole interaction between the atoms breaks down (see the “Methods” section), is shaded in green.

For a realistic analysis of the logical error probability it is crucial to understand how the physical error probability scales with the number of lattice sites j between the atoms. To estimate this, we assume that the only two sources of infidelity are the decay of the Rydberg states with decay rates γj and the dephasing of the Rydberg states due to a Doppler shift arising from the thermal motion of the atoms at T = 10 μK. The infidelity of a time-optimal CZ gate is then given by46

$$1-{F}_{j}=2.96\frac{{\gamma }_{j}}{{\Omega }_{j}}+7.12\frac{{\Delta }_{{{\rm{Doppler}}}}^{2}}{{\Omega }_{j}^{2}}$$
(1)

where \({\Delta }_{{{\rm{Doppler}}}}={k}_{{{\rm{eff}}}}\sqrt{{k}_{{\rm {B}}}T/m}\) and keff is the effective wave vector of the two photon transition. To find the value nj with the lowest infidelity 1−Fj we assume realistic values of R = 3 μm and 1/γ = 430 μs at n = 75 and use the scalings Ω n−3/2 and γn−347. For each j we now consider different values of the laser intensity (characterized by the value of Ω at a reference principal quantum number n = 75) and numerically minimize 1−Fj over nj, constraining nj to be large enough to achieve a sufficient blockade and small enough to not enter the “Spaghetti” regime (see the “Methods” section). We find that for each j the relationship 1−Fj ≈ cj(1−F1) holds, with the constant cj increasing with j. This scaling forms the basis of our numerical simulation of the logical error probability.

We note that also the gate duration τ increases with increasing interatomic distance j, scaling as τ (jR)18/25 (see the “Methods” section). With demonstrated gate durations around 250 ns for nearest neighbor atoms32, a gate between atoms separated by j = 7 lattice sites (the maximum considered above), could be implemented in ~1 μs.

The implementation on Rydberg atoms dictates that different two-qubit gates can only be implemented in parallel when the qubit pairs are sufficiently separated, i.e. outside a blockade sphere of radius Rb Ω−1/6 2R, since otherwise an atom in the Rydberg state in one qubit pair might blockade an atom in another qubit pair48. A safe option is to divide the lattice into a rectangular grid of square subregions, each of size 2(k + 1)×2(k + 1), and measure each subregion stabilizer, one by one, in parallel over the grid. This will enable measuring all the stabilizers in 4(k + 1)2 measurement rounds.

Finally, we mention that while the values of the cj are specific for Cs atoms at 10 μK, we expect qualitatively similar behavior for other atoms at other temperatures. Dephasing of the Rydberg state arising from sources other than Doppler shifts and optical pumping by black body radiation could be easily incorporated into our model by adding an additional term in Eq. (1). Additional dephasing errors would reduce the optimal principal quantum numbers nj, while additional decay due to black body radiation would increase them. Other error sources, such as leakage to other states, would require a more elaborate error model. However, most error sources become more detrimental with longer gate durations, and, thus, with larger interatomic distances. This is in accordance with our assumption that gate infidelities increase with j.

Discussion

We have developed an integrated approach to neutral atom QEC exploiting flexible data/ancilla qubit layout together with tunable long-range gates using multiple laser colors addressing distinct Rydberg states. Our analysis focuses on a sub-family of HGP quantum LDPC codes with high rate, low stabilizer weight, and moderate non-locality. All these features make them promising candidates to be implemented on near-term neutral atom quantum computers with all qubits in place. The limiting gate time is set by the slowest elementary gate, which is typically state preparation and measurement. Since all ancilla measurements can be deferred to the end of a round of stabilizer circuits, the overall time to perform a round of stabilizer measurements for La-cross codes, even using restricted parallelization, is notably shorter than using qubit shuttling. For example, for the largest code discussed in this work, [[400, 16, 8]], we conservatively estimate the single round time to be 0.6 ms, which is approximately one order of magnitude shorter than the single round movement time costs estimated in ref. 12.

We have examined the performance of these codes via numerical simulations under circuit-level depolarizing noise, which is a useful tool for benchmarking the code performance and making comparisons against the surface code. Noise models beyond depolarizing noise, appearing in many realistic situations, are expected to improve our results. For example, in Rydberg atom arrays it has been predicted that up to 98% of errors can be converted to erasure errors39,40,49, implying much better scaling of the logical error rate with physical probability. Other noise biases50,51 can easily be incorporated into our construction in full analogy with the XZZX surface code52. We defer the problem of addressing these issues to future work.

A severe bottleneck for QEC experiments can be fast real-time decoding of syndrome information. In this work, we have used a state-of-the-art decoding technique at the time of submission, namely a BP+OSD decoder, which can be flexibly applied to arbitrary quantum LDPC codes at the price of a severe time overhead in the OSD part. Recently, new decoders have been proposed to tackle the problem of fast and reliable syndrome information processing in quantum LDPC codes, such as Ambiguity Clustering53, Belief Propagation with Guided Decimation Guessing (BP + GDG)54, Belief Propagation with Localized Statistics Decoding (BP + LSD)55 and Belief Propagation with Ordered Tanner Forest (BP + OTF)56. These decoders are faster and, therefore, may ultimately be preferred over BP+OSD.

Finally, while we have focused here on how to achieve long-lived quantum memory, quantum computation will require implementing fault-tolerant logical gates. Various proposals have been made to perform logical gates with LDPC codes including using non-destructive Pauli measurements assisted with non-local gates8 and code switching to another stabilizer code like the surface code7. Recent work shows a way to perform transversally logical Hadamard (H) and logical CZ gates within the same array patch of HGP codes57. We note that La-cross codes with open boundaries are square but not symmetric HGP codes and they may allow for transversal H and CZ gates by trapping the atoms in a folded triangular configuration in a static plane without increasing the connectivity requirements. Alternatively, one can use our QEC method for static memory and then physically transport qubits for performing logical computation, as demonstrated in ref. 22 for transversal CNOT gates between different array patches of surface codes.

Methods

Quantum error correction simulations

In the following we provide further detail about quantum error correction simulations. The qubit register is firstly initialized to \(\left\vert 0\right\rangle\), Hadamard gates are acted on X-type ancilla qubits and subsequent CNOT gates are applied according to the order prescription specified in the main text (Fig. 1a, b). We simulate as many rounds of syndrome measurements as the code distance, with ancilla measurement and reset after any round and data measurement occurring only after the last round. State preparation and measurement bit-flip errors and single- and two-qubit gate depolarizing errors are applied with probabilities specified in the main text, under both hardware-specific and agnostic noise models, which we show in Supplementary Fig. 3 (see Supplementary Information). Idle errors are always neglected.

Belief Propagation with Ordered Statistics Decoder (BP + OSD)29,30 has been used to obtain all the decoding plots shown in the main text. We have optimized over the decoder parameters and opted for the minimum-sum variant of Belief Propagation with a scaling factor of s = 1.0 for all LDPC codes. The number of iterations of Belief Propagation was found to be almost irrelevant, so we have fixed it to 4. Ordered Statistics Decoding was performed in combination sweep mode up to order 1 to speed up the decoding process, upon testing up to order 10 without finding any relevant improvement. Monte Carlo samplings have been performed using the Sinter library with 103 decoders with a maximal number of errors cutoff and increasing a maximal number of samples cutoff with decreasing physical error rate,  ~104−107, compatible with the system sizes.

Surface code simulations are performed under the same noise model of the LDPC codes they are compared to, performing Dldpc rounds of stabilizer measurements so to keep qubits alive for the same amount of time for both codes. Logical error probability is computed as \({P}_{{\rm {L}}}(p)=1-{(1-{P}_{{\rm {L}}}^{1}(p))}^{K}\), being \({P}_{{\rm {L}}}^{1}(p)\) the single surface code logical error probability. For the fairest comparison, we want to compare our (LDPC code, BP + OSD decoder)-pair against the surface code with its best decoder. Given the impractically huge time overhead of the maximum-likelihood decoder, we have opted for decoding the surface code with the BP + OSD decoder with optimized scaling factor s = 0.625, which was found to outperform the minimum-weight perfect matching decoder with open boundaries. Thus, with safe confidence, we claim that our comparing argument can only benefit from better decoders for the LDPC codes.

Analytical sub-threshold error estimation

The crossing point between LDPC and surface code decoding curves, p*, given an equal number of logical and physical qubits decreases as the distance increases. We can provide a quantitative and decoder-independent estimate of this behavior via the following analytical argument. In the sub-threshold regime, the logical error probability scales as

$${P}_{{\rm {L}}}(p)\approx A{\left(\frac{p}{{p}_{{ {th}}}}\right)}^{\alpha D}=A{\left(\frac{p}{{p}_{{ {th}}}}\right)}^{\beta \sqrt{N}}$$
(2)

with α = 1/2 asymptotically and \(\beta={{\mathcal{O}}}(1)\) being code dependent. For either code, the distance as a function of N can be computed from

$$ N={({\lambda }_{k}{D}_{{{\rm{ldpc}}}}-k)}^{2}+{({\lambda }_{k}{D}_{{{\rm{ldpc}}}})}^{2}\approx 2{\lambda }_{k}^{2}{D}_{{\mbox{ldpc}}\,}^{2}\\ N=K({({D}_{{{\rm{sc}}}}-1)}^{2}+{D}_{{{\rm{sc}}}}^{2})\approx 2K{D}_{{\mbox{sc}}}^{2}$$
(3)

being λk some constant depending on the order k of the LDPC code, for which—we recall—the code distance is \(D={{\mathcal{O}}}(\sqrt{N})\) and K constant for a given code. The crossing rate can be computed by requiring

$${A}_{{{\rm{sc}}}}{\left(\frac{{p}{*}}{{p}_{{ {th}}}^{{{\rm{sc}}}}}\right)}^{{\beta }_{{{\rm{sc}}}}\sqrt{N}} \mathop=^{!}{A}_{{{\rm{ldpc}}}}{\left(\frac{{p}{*}}{{p}_{{ {th}}}^{{{\rm{ldpc}}}}}\right)}^{{\beta }_{{{\rm{ldpc}}}}\sqrt{N}},$$
(4)

leading to

$${p}{*}={\left(\frac{{({p}_{{ {th}}}^{{{\rm{sc}}}})}^{{\beta }_{{{\rm{sc}}}}}}{{({p}_{{ {th}}}^{{{\rm{ldpc}}}})}^{{\beta }_{{{\rm{ldpc}}}}}}\right)}^{\frac{1}{{\beta }_{{{\rm{sc}}}}-{\beta }_{{{\rm{ldpc}}}}}}{\left[{\left(\frac{{A}_{{{\rm{ldpc}}}}}{{A}_{{{\rm{sc}}}}}\right)}^{\frac{1}{{\beta }_{{{\rm{sc}}}}-{\beta }_{{{\rm{ldpc}}}}}}\right]}^{\frac{1}{\sqrt{N}}}.$$
(5)

Therefore, when \(0 \; < \; {({A}_{{{\rm{ldpc}}}}/({A}_{{{\rm{sc}}}}))}^{1/({\beta }_{{{\rm{sc}}}}-{\beta }_{{{\rm{ldpc}}}})} \; < \; 1\) the crossing point decreases with N for βsc < βldpc, which is always our case by construction.

Realistic infidelity calculations

In the following, we detail our estimate of the gate error for an implementation on Rydberg atoms. For a given interatomic distance jR and a given laser intensity, characterized by the Rabi frequency Ω at a fixed reference n, e.g. n = 75, we proceed as follows: We first use the AtomicRydbergCalculator (ARC)45 to determine the lowest nj for which we still obtain Bj ≥ 3Ωj (note that both Bj and Ωj change with nj), as well as the highest nj which is admissible without entering the Spaghetti regime. We define the start of the Spaghetti regime as the smallest value of nj for which there is an eigenstate of the two-atom Hamiltonian, which has a smaller pair state interaction energy ΔE then the perturbed \(\left\vert 75s,75s\right\rangle\) state. We only consider states with a non-zero dipole-dipole coupling to the intermediate \(\vert 7{p}_{1/2}\rangle\) state in this comparison.

Having established the upper and the lower bound of nj, we then minimize the infidelity 1−Fj [Eq. (1)] over this range. Supplementary Fig. 2a (see Supplementary Information) shows an example of this for an interatomic distance of jR = 9 μm with a laser intensity such that at n = 75 we have Ω = 2π × 1.9 MHz58. In this example, as in all cases considered by us, the lowest infidelity is achieved at the lower bound of the allowed values of n.

In Supplementary Fig. 2, we vary the Rabi frequency Ω at n = 75 from 2π × 0.5 to 2π × 15 MHz and compare the gate error 1−Fj for gates over j lattice sites as a function of gate error 1−F1 for nearest neighbor gates. The ratios cj = (1−Fj)/(1−F1) are approximately independent of Ω and given by c1 = 1, c2 ≈ 1.6, c3 ≈ 2.5, c4 ≈ 3.6, c5 ≈ 4.8, c6 ≈ 6.1, c7 ≈ 7.5.

Since the lowest fidelity is always achieved by the lowest value of n, which still gives a sufficient blockade, the ratio B/Ω n25/2/(jR)6 is constant, so that the optimal n scales as nj (jR)12/25. The pulse duration then scales as τ Ω−1n3/2 (jR)18/25.