Logical quantum processor based on reconfigurable atom arrays

Suppressing errors is the central challenge for useful quantum computing1, requiring quantum error correction (QEC)2–6 for large-scale processing. However, the overhead in the realization of error-corrected ‘logical’ qubits, in which information is encoded across many physical qubits for redundancy2–4, poses substantial challenges to large-scale logical quantum computing. Here we report the realization of a programmable quantum processor based on encoded logical qubits operating with up to 280 physical qubits. Using logical-level control and a zoned architecture in reconfigurable neutral-atom arrays7, our system combines high two-qubit gate fidelities8, arbitrary connectivity7,9, as well as fully programmable single-qubit rotations and mid-circuit readout10–15. Operating this logical processor with various types of encoding, we demonstrate improvement of a two-qubit logic gate by scaling surface-code6 distance from d = 3 to d = 7, preparation of colour-code qubits with break-even fidelities5, fault-tolerant creation of logical Greenberger–Horne–Zeilinger (GHZ) states and feedforward entanglement teleportation, as well as operation of 40 colour-code qubits. Finally, using 3D [[8,3,2]] code blocks16,17, we realize computationally complex sampling circuits18 with up to 48 logical qubits entangled with hypercube connectivity19 with 228 logical two-qubit gates and 48 logical CCZ gates20. We find that this logical encoding substantially improves algorithmic performance with error detection, outperforming physical-qubit fidelities at both cross-entropy benchmarking and quantum simulations of fast scrambling21,22. These results herald the advent of early error-corrected quantum computation and chart a path towards large-scale logical processors.

Quantum computers have the potential to significantly outperform their classical counterparts for solving certain problems [1].However, executing large-scale, useful algorithms on quantum processors requires very low gate error rates (generally below ∼ 10 −10 ) [23] , far below those that will likely ever be achievable with any physical device [2].The landmark development of quantum error correction (QEC) theory provides a conceptual solution to this challenge [2][3][4].The key idea is to use entanglement to delocalize a logical qubit degree of freedom across many redundant physical qubits, such that if any given physical qubit fails, it does not corrupt the underlying logical information.In principle, with sufficiently low physical error rates and sufficiently many qubits, a logical qubit can be made to operate with extremely high fidelity, providing a path to realizing large-scale algorithms [4].However, in practice useful QEC poses many challenges, ranging from significant overhead in physical qubit numbers [23] to highly complex gate operations between the delocalized logical degrees of freedom [24].Recent experiments have achieved milestone demonstrations of two logical qubits and one entangling gate [5,6], and explorations of novel encodings [25][26][27][28].
One specific challenge for realizing large-scale logical processors involves efficient control.Unlike modern clas-sical processors that can efficiently access and manipulate many bits of information [29], quantum devices are typically built such that each physical qubit requires multiple classical control lines.While suitable to the implementation of physical qubit processors, this approach poses a significant obstacle to the control of logical qubits redundantly encoded over many physical qubits.
Here, we describe the realization of a programmable quantum processor based on hardware-efficient control over logical qubits in reconfigurable neutral atom arrays [7].We use this logical processor to demonstrate key building blocks of QEC and realize programmable logical algorithms.In particular, we explore important features of logical operations and circuits, including scaling to large codes, fault-tolerance, and complex non-Clifford circuits.

Logical processor based on atom arrays
Our logical processor architecture, illustrated in Fig. 1a, is segmented into three zones.The storage zone is used for dense qubit storage, free from entangling gate errors and featuring long coherence times.The entangling zone is used for parallel logical qubit encoding, sta- FIG. 1.A programmable logical processor based on reconfigurable atom arrays.a, Schematic of the logical processor, segmented into three zones: storage, entangling, and readout (see ED Fig. 1 for detailed layout).Logical single-qubit and twoqubit operations are realized transversally with efficient, parallel operations.Transversal CNOTs are realized by interlacing two logical qubit grids and performing a single global entangling pulse that excites atoms to Rydberg states.Physical qubits are encoded in hyperfine ground states of 87 Rb atoms trapped in optical tweezers.b, Fully programmable single-qubit rotations are implemented using Raman excitation through a 2D AOD; parallel grid illumination delivers the same instruction to multiple atomic qubits.c, Mid-circuit readout and feedforward.The imaging histogram shows high-fidelity state discrimination (500 µs imaging time, readout fidelity ≈ 99.8%, Methods), and the Ramsey fringe shows that qubit coherence is unaffected by measuring other qubits in the readout zone (error probability p ∼ 10 −3 , Methods).The FPGA performs real-time image processing, state decoding, and feedforward (Fig. 4).
bilizer measurements, and logical gate operations.Finally, the readout zone enables mid-circuit readout of desired logical or physical qubits, without disturbing the coherence of the computation qubits still in operation.This architecture is implemented using arrays of individual 87 Rb atoms trapped in optical tweezers, which can be dynamically reconfigured in the middle of the computation while preserving qubit coherence [7,9].
Our experiments make use of the apparatus described previously in Refs.[7,8,30], with key upgrades enabling universal digital operation.Physical qubits are encoded in clock states within the ground-state hyperfine manifold (T 2 > 1s [7]), and stored in optical tweezer arrays created by a spatial light modulator (SLM) [30,31].We utilize systems of up to 280 atomic qubits, combining high-fidelity two-qubit gates [8], enabled by fast excitation into atomic Rydberg states interacting through robust Rydberg blockade [32], with arbitrary connectivity enabled by atom transport via 2D acousto-optic deflectors (AODs) [7].Central to our approach of scalable control, AODs [10-15, 31, 33] use frequency multiplexing to take in just two voltage waveforms (one for each axis) to create large, dynamically programmable grids of light.Fully programmable local single-qubit rotations are realized via qubit-specific, parallel Raman excitation through an additional 2D AOD (Fig. 1b) [34].Mid-circuit readout is enabled by moving selected qubits ∼ 100 µm away to a readout zone and illuminating with a focused imag-ing beam [7,35], resulting in high-fidelity imaging as well as negligible decoherence on stored qubits (Fig. 1c).The mid-circuit [10][11][12][13][14][15] image is collected with a CMOS camera and sent to an FPGA for real-time decoding and feedforward.
The central aspect of our logical processor is the control of individual logical qubits as the fundamental units, instead of individual physical qubits.To this end, we observe that during a vast majority of error-corrected operations, the physical qubits of a logical block are supposed to realize the same operation, and this instruction can be delivered in parallel with only a few control lines.This approach naturally multiplexes with optical techniques.For example, to realize a logical single-qubit gate [2], we use the Raman 2D AOD (Fig. 1b) to create a grid of light beams and simultaneously illuminate the physical qubits of the logical block with the same instruction.Such a gate is transversal [2], meaning that operations act on physical qubits of the code block independently.This transversal property further implies the gate is inherently fault-tolerant [2], meaning that errors cannot spread within the code block (see Methods), thereby preventing a physical error from spreading into a logical fault.Crucially, a similar approach can realize logical entangling gates [2,4].Specifically, we use the grids generated by our moving 2D AOD to pick up two logical qubits, interlace them in the entangling zone, and then pulse our single global Rydberg excitation laser to realize a physical entangling gate on each twin pair of the blocks (Figs.1a,2a).This process realizes a high-fidelity, fault-tolerant transversal CNOT in a single parallel step.

Improving entangling gates with code distance
A key property of QEC codes is that, for error rates below some threshold, the performance should improve with system size, associated with a so-called code distance [4,24].Recently, this property has been experimentally verified by reducing idling errors of a code [6].Neutral atom qubits can be idly stored for long times with low errors, and the central challenge is to improve entangling operations with code distance.Thus motivated, we realize a transversal CNOT gate using logical qubits encoded in two surface codes (Fig. 2).Surface codes have stabilizers that are used for detecting and correcting errors without disrupting the logical state [4,24].The stabilizers form a 2D lattice of 4-body plaquettes of X and Z operators, which commute with the X L (Z L ) logical operators that run horizontally (vertically) along the lattice (Fig. 2d).By measuring stabilizers one can detect the presence of physical qubit errors, decode (infer what error occured), and correct the error simply by applying a software Z L /X L correction [24].Such a code can detect and correct a certain number of errors determined by the linear dimension of the system (the code distance d).
To test the performance of our logical entangling gate, we first initialize the logical qubits by preparing physical qubits of two blocks in |+⟩ and |0⟩ states, respectively, and performing a single round of stabilizer measurements with parallel operations [7].While this state preparation is non-fault-tolerant (nFT) beyond d = 3, we are still able to probe error suppression of the transversal CNOT (Methods).Specifically, we prepare the two logicals in state |+ L ⟩ and |0 L ⟩, perform the transversal CNOT, and then projectively measure to evaluate the logical Bell state stabilizers X 1 L X 2 L and Z 1 L Z 2 L (Fig. 2c).For decoding and correcting the logical state, we observe there are strong correlations between the stabilizers of the two blocks (ED Fig. 4) due to propagation of physical errors between the codes during the transversal CNOT (Fig. 2b) [36].We utilize these correlations to improve performance by decoding the logical qubits jointly, realized by a joint decoding graph that includes edges and hyperedges connecting the stabilizers of the two logical qubits (Fig. 2b).Using this correlated decoding procedure, we measure ≈ 0.95 populations in the X L X L and Z L Z L bases (Fig. 2c), showing entanglement between the d = 7 logical qubits.
Studying the performance as a function of code size (Fig. 2d) reveals that the logical Bell pair improves with larger code distance, demonstrating improvement of the entangling operation.In contrast, we note that when conventional decoding, i.e. independent minimum-weight perfect matching within both codes [4], is used, the fi- The concept of correlated decoding.Physical errors propagate between physical qubit pairs during transversal CNOT gates, creating correlations that can be utilized for improved decoding.We account for these correlations, arising from deterministic error propagation (as opposed to correlated error events), by adding edges and hyperedges that connect the decoding graphs of the two logical qubits.delity decreases with code distance.This is in part due to the nFT state preparation, whose effect is partially mitigated by the correlated decoding (Methods).We emphasize that while these results demonstrate surpassing an effective threshold for the entire circuit (implying we surpass the threshold of the transversal CNOT), such a threshold is higher due to projective read- out after the transversal CNOT.In practice, the transversal CNOT should be used in combination with many repeated rounds of noisy syndrome extraction [6], which is expected to have a somewhat lower threshold and is an important goal for future research.

Fault-tolerant logical algorithms
All logical algorithms we perform in this work are built from transversal gates which are intrinsically faulttolerant [2].We now also use fault-tolerant state preparation to explore programmable logical algorithms.We use two-dimensional d = 3 color codes [3,37], which are topological codes akin to the surface code, but with the useful capability of transversal operations of the full Clifford group: Hadamard (H), π/2 phase (S) gate, and CNOT [37].This transversal gate set can realize any Clifford circuit fault-tolerantly.As a test case, here we create a logical GHZ state.Figure 3a shows the implementation of a 10-logical-qubit algorithm, in which all ten qubits are first encoded by a nFT encoding circuit (Methods).Then, five of the codes are used as ancilla logicals, performing parallel transversal CNOTs in order to fault-tolerantly detect errors on the computation logicals [38], and are then moved into the storage zone where they are safely kept.Subsequently four computation logicals are used to prepare the GHZ state, and logical Clif-ford rotations are used at the end of the circuit for direct fidelity estimation [39] and full logical state tomography.
Since not all nontrivial syndromes are equally likely to cause algorithmic failure, one can perform a partial postselection where syndrome events most likely to have caused algorithmic failure are discarded, given by the weight of the correlated matching in the whole algorithm.Figure 3d shows the measured GHZ fidelity as a function of this sliding threshold converted into a fraction of accepted experimental repetitions, continuously tuning the tradeoff between the success probability of the algorithm and its fidelity; e.g., discarding just 50% of the data improves GHZ fidelity to ≈ 90%.(As discussed below, for certain applications purifying samples can be advantageous in improving algorithmic performance.)Finally, fault-tolerantly measuring all 256 logical Pauli strings, we perform full GHZ state tomography (Fig. 3e).
The use of the zoned architecture directly allows scaling circuits to larger numbers, without increasing the number of controls, by encoding and operating on logical qubits, moving them to storage, and then accessing storage as appropriate.This process is illustrated in Figs.4a,b, where ten color codes are made and operated on with parallel transversal CNOTs, moved to storage, and then more qubits are accessed from storage.Repeating this process four times, we create 40 color codes with 280 physical qubits, at the cost of slow idling errors of ∼ 1% logical decoherence per additional encoding step (Fig. 4c).These storage idling errors primarily originate from global Raman π pulses applied for dynamical decoupling of atoms in the entangling zone, which could be significantly reduced with zone-specific Raman controls.
Since mid-circuit readout [10][11][12][13][14][15] is an important component of logical algorithms, we next demonstrate a faulttolerant entanglement teleportation circuit.We first create a three-logical-qubit GHZ state 4d,e) from fault-tolerantly prepared color codes.Mid-circuit X-basis measurement of the middle logical creates by applying a logical S gate to the first and third logicals conditioned real-time on the state of the middle logical, akin to the magic state teleportation circuit [24].Measurements in Fig. 4e indicate that while ⟨X L X L ⟩ and ⟨Y L Y L ⟩ indeed vanish without the feedforward step, applying the feedforward correction we recover a Bell state fidelity of 77(2)%, limited by imperfections in the original underlying GHZ state.By repeating this experiment without mid-circuit readout and instead postselecting on the middle logical being in |+ L ⟩, we find a similar Bell fidelity of 75(2)%, indicating high-fidelity performance of the readout and feedforward operations.

Complex logical circuits using 3D codes
One important challenge in realizing complex algorithms with logical qubits is that universal computation cannot be implemented transversally [42].For instance, when using 2D codes such as the surface code, non-Clifford operations cannot be easily performed [37], and relatively expensive techniques are required for nontrivial computation [24,43] as Clifford circuits can be easily simulated [44].In contrast, 3D codes can transversally realize non-Clifford operations, but lose the transversal H [37].However, these constraints do not imply that classically hard or useful quantum circuits cannot be realized transversally or efficiently.Motivated by these considerations, we explore efficient realization of classically hard algorithms that are co-designed with a particular errorcorrecting code.Specifically, we implement fast scram- bling circuits using small 3D codes, which are used for native non-Clifford operations (CCZ).We focus on small 3-dimensional [ [8,3,2]] codes (Fig. 5a) [16,17,26,27], which have various appealing features.They encode three logicals per block, feature d = 2 (d = 4) in the Z basis (X basis), implying error detection (correction) capabilites for Z (X) errors, and can realize a transversal CNOT between blocks.Most impor- 3 7 We use these transversal operations to realize logical algorithms that are difficult to simulate classically [45,46].More specifically, these circuits can be mapped to Instantaneous Quantum Polynomial (IQP) circuits [20,45,46].Sampling from the output distribution of such circuits is known to be classically hard in certain instances [20], implying a quantum device can be exponentially faster than a classical computer for this task.Figure 5b shows an example implementation of a 12logical-qubit sampling circuit.Here, we prepare all logical blocks in |+⟩ L , implement a scrambling circuit with 28 logical entangling gates, and then measure all logicals in the X-basis.Figure 5b shows the probability of observing each of the 2 12 = 4096 possible logical bitstring outcomes, showing that as we progressively apply more error detection (i.e.postselection) in postprocessing, the distribution more closely reproduces the ideal theoretical distribution.To characterize the distribution overlap, we use the cross-entropy benchmark (XEB) [18], which is a weighted sum between the measured probability distribution and the ideal calculated distribution, normalized such that XEB=1 corresponds to perfectly reproducing the ideal distribution, and XEB=0 corresponds to the uniform distribution which occurs when circuits are overwhelmed by noise.Consistent with Fig. 5b, the 12-logical-qubit circuit XEB increases from 0.156(2) to 0.616 (7) upon applying error detection (Fig. 5e).We note that XEB should be a good fidelity benchmark for IQP circuits (Methods).
We next explore scaling to larger systems and circuit depths.To ensure high complexity of our logical circuits, we use nonlocal connections to entangle the logical triplets on up to 4D hypercube graphs (see supplementary movie), which results in fast scrambling [19].Exploring entangled systems of 3, 6, 12, 24, and 48 logical qubits, in all cases we find a finite XEB score which improves with increased error detection (Figs.5e,f).The finite XEB indicates successful sampling, and the improvement with error detection shows the benefit of using logical qubits.While this improvement comes at the cost of measurement time due to error detection, improving the sample quality cannot be replaced by simply generating more samples.Thus, improving the XEB score yields significant practical gains.We obtain an XEB of ≈ 0.1 for 48 logical qubits and hundreds of nonlocal logical entangling gates, up to roughly an order of magnitude higher than previous physical qubit implementations of similar complexity [18,47], showing the benefits of a logical encoding for this application.
Assuming our best measured physical fidelities, the estimated upper-bound for an optimized physical qubit implementation in our system is also significantly below the measured logical XEB (blue line in Fig. 5f, Methods).In attempting to run these complex physical circuits, in practice we find that realising non-vanishing XEB is significantly more challenging; we confirm with small physical instances that we measure values well below this upper-bound (Methods).In addition to the error-detecting benefits, it appears the logical circuit is significantly more tolerant to coherent errors, exhibiting operation that is inherently digital, just with imperfect fidelity (see e.g.ED Fig. 7a), consistent with theoretical predictions [48].We also note that for the logical algorithms we optimize performance by optimizing the stabilizer expectation values (rather than the complex sampling output), providing further advantage for logical implementations.
Our 48-logical circuit, corresponding to a physical qubit connectivity of a 7D hypercube, contains up to 228 logical two-qubit gates and 48 logical CCZ gates.Simulation of such logical circuits is challenging due to the high connectivity (rendering tensor networks inefficient) and large numbers of non-Cliffords [49].To benchmark our circuits, we structure them such that we can leverage an efficient simulation method (Methods) which takes ≈ 2 seconds to calculate the probability of each bitstring (Fig. 5d).Modeling noise in our logical circuits is even more complicated, as they are composed from 128 physical qubits and 384 T gates, thereby making experimentation with logical algorithms necessary to understand and optimize performance.FIG. 6. Logical two-copy measurement.a, Identical scrambling circuits are performed on two copies of 12 logical qubits, and then measured in the Bell basis to extract information about the state.Z basis measurements are corrected with an [ [8,3,2]] decoder (when full error detection is not applied).b, Measured entanglement entropy as a function of subsystem size, showing expected Page-curve behavior [19] for the highly scrambled state, improving with increased error detection.c, Measured and simulated magic (associated with non-Clifford operations) as a function of number of CCZ gates applied, performed on two copies of scrambled 6-logicalqubit systems.d, Pauli string measurement and zero-noise extrapolation using logical qubits.Plot shows the absolute values of all 4 12 Pauli string expectation values, which only have five discrete values for our digital circuit; Pauli strings with the same theory value are grouped.By analyzing with sliding-scale error detection we improve toward the theoretical expectation values (squares) while also improving toward a purity of 1.By extrapolating to perfect purity, we extrapolate the expectation values and better-approximate the ideal values (shaded regions are statistical fit uncertainty).

Quantum simulations with logical qubits
Finally, we explore the use of logical qubits as a tool in quantum simulation, probing entanglement properties of our fast scrambling circuits, potentially related to complex systems such as black holes [19,50].In particular, we utilize a Bell-basis measurement made on two copies of the quantum state (Fig. 6a), which is a powerful tool that can efficiently extract many properties of an unknown state [21,22,51].With this two-copy technique, in Fig. 6b we plot the measured entanglement entropy in the scrambled system.We observe a characteristic Page curve [50] associated with a maximally entangled, highly scrambled, but globally pure state.These measurements also reveal a final state purity of 0.74(3), compared to the measured XEB of 0.616 (7) in Fig. 5f, consistent with XEB being a good proxy for the final state fidelity.Despite postselection overhead, we find error detection significantly improves signal-to-noise here, as near-zero entropies are exponentially faster to measure (ED Fig. 9).Two-copy measurements can also be used to simultaneously extract information about all 4 N Pauli strings [22].Using this property and an analysis technique known as Bell difference sampling [52] we experimentally evaluate and directly verify the amount of additive Bell magic [52] in our circuits as a function of number of applied logical CCZs (Fig. 6c).This measurement of magic, associated with non-Clifford operations, quantifies the number of T gates (assuming decomposition into T ) required to realize the quantum state by observing the probability that sampled Pauli strings commute with each other (see Methods).Moreover, combining encoded qubits and twocopy measurement allows for additional error mitigation techniques.As an example, Fig. 6d shows the measured absolute expectation values of all 4 12 logical Pauli strings with sliding-scale error detection.Since in the two-copy measurements, for each error detection threshold we also measure the overall system purity, we can extrapolate our expectation values to the case of unit-purity (zeronoise) [53].This procedure evaluates the averaged Pauli expectation values to ≈ 10% relative precision of the ideal theoretical values spanning several orders of magnitude (Methods).

Outlook
These experiments demonstrate key ingredients of scalable error correction and quantum information processing with logical qubits.In addition to implementing the key elements of logical processing, our approach demonstrates practical utility of encoding methods for improving sampling and quantum simulations of complex scrambling circuits.Future work can explore if these methods can be generalized e.g. to more robust, higher-distance codes and if such highly entangled, non-Clifford states could be utilized in practical algorithms.We note the demonstrated logical circuits are approaching the edge of exact simulation methods (Fig. 5d), and can readily be used for exploring error-corrected quantum advantage.These examples demonstrate that the use of novel encoding schemes, co-designed with efficient implementations, can allow one to implement particular logical algorithms at reduced cost.
Our observations open the door for exploration of large-scale logical qubit devices.A key future milestone would be to perform repetitive error correction [6] during a logical quantum algorithm to greatly extend its accessible depth.This repetitive correction can be directly realized using the tools demonstrated here by repeating the stabilizer measurement (Fig. 2) in combination with mid-circuit readout (Fig. 4).The use of the zoned architecture and logical-level control should allow our techniques to be readily scaled to over 10000 physical qubits by increasing laser power and optimizing control methods, while QEC efficiency can be improved by reducing two-qubit gate errors to 0.1% [8].Deep computation will further require continuous reloading of atoms from a reservoir source [11,15].Continued scaling will benefit from improving encoding efficiency, e.g. by using quantum low-density-parity-check (qLDPC) codes [54,55], utilizing erasure conversion [13,33,56] or noise bias [35], and optimizing the choice of (possibly multiple) atomic species [11,14], as well as advanced optical controls [34].Further advances could be enabled by connecting processors together in a modular fashion using photonic links or transport [10,57], or more power-efficient trapping schemes such as optical lattices [58].Although we do not expect clock speed to limit medium-scale logical systems, approaches to speed up processing in hardware [59] or with nonlocal connectivity [60] should also be explored.We expect that such experiments with early-generation logical devices will enable experimental and theoretical advances that dramatically reduce anticipated costs of large-scale error-corrected systems, accelerating development of practical applications of quantum computers.

System overview
Our experimental apparatus (ED Fig. 1a) is described previously in Refs.[7,8,30].To carry out the present experiments, several key upgrades have been made enabling programmable quantum circuits on both physical and logical qubits.A cloud containing millions of cold 87 Rb atoms is loaded in a magneto-optical trap inside of a glass vacuum cell, which are then loaded stochastically into programmable, static arrangements of 852-nm traps generated with a spatial light modulator (SLM), and then rearranged with a set of 850nm moving traps generated by a pair of crossed acousto-optic deflectors (AODs, DTSX-400, AA Opto-Electronic) to realize defect-free arrays [30,31,61].Atoms are imaged with a 0.65-NA objective (Special Optics) onto a CMOS camera (Hamamatsu ORCA-Quest C15550-20UP), chosen for fast electronic readout times.The qubit state is encoded in mF = 0 hyperfine clock states in the 87 Rb ground-state manifold, with T2 > 1s [7], and fast, high-fidelity single-qubit control is executed by two-photon Raman excitation [7,62] (ED Fig. 1b).A global Raman path illuminating the entire array is used for global rotations (Rabi frequency ∼1 MHz, resulting in ∼ 1 µs rotations with composite pulse techniques [7]) as well as for dynamical decoupling throughout the entire circuit (typically 1 global π pulse per movement).Fully programmable local single-qubit rotations are realized with the same Raman light but redirected through a local path which is focused onto targeted atoms by an additional set of 2D AODs.Entangling gates (270-ns duration) between clock qubits are performed with fast two-photon excitation using 420-nm and 1013-nm Rydberg beams to n=53 Rydberg states, utilizing a timeoptimal two-qubit gate pulse [63] detailed in Ref. [8].During the computation, atoms are rearranged with the AOD traps to enable arbitrary connectivity [7].Mid-circuit readout is carried out by illuminating from the side with a locally focused 780-nm imaging beam, with scattered photons collected on the CMOS and processed real-time by a field-programmable gate array, FPGA (Xilinx ZCU102), with feedforward control signal outputs.
The quantum circuits are programmed with a control infrastructure consisting of five arbitrary waveform generators (AWG) (Spectrum Instrumentation), as illustrated in ED 1c, synchronized to < 10-ns jitter.The 2-channel Rearrangement AWG is used for rearranging into defect-free arrangements [30] before the circuit, the 1 channel of the Rydberg AWG is used for entangling gate pulses, the 4 channels of the Raman AWG are used for IQ (in-phase and quadrature) control of a 6.8 GHz source [7,62] (the global phase reference for all qubits) and pulse-shaping of the global and local Raman driving, the 2 channels of the Raman AOD AWG are used for displaying tones that create the programmable light grids for local single-qubit control, and the 2 channels of the Moving AOD AWG are used for controlling the positions of all atoms during the circuit.AODs are central to our methods of efficient control [61], where the two voltage waveforms (one for X-axis and one for Y-axis) control many physical or logical qubits in parallel: each row and column of the grid simply corresponds to a single frequency tone, and these tones are then superimposed in the waveform delivered to the AOD (amplified by Minicircuits ZHL-5W-1+).The phase relationship between tones is chosen to minimize interference.

Programming circuits
Most of the system parameters used in our approach do not have hard limits, but instead result from possible trade-offs.
In what follows we detail some design decisions made for the circuits used in the present work.
Zone parameter choices.For simplicity, we keep the entangling zone fixed for all experiments.This conveniently allows to switch between e.g.surface code and [ [8,3,2]] code experiments, without additional calibrations.We choose our entangling zone profile, realized by 420-nm and 1013-nm Rydberg "tophat" beams generated by SLM phase profiles [30], to be homogeneous over a 35-µm tall region.As the Rydberg beams propagate longitudinally, the entangling zone is longer than it is tall.We optimize tophats to be homogeneous over roughly 250-µm horizontal extent.Taller regions are also achievable, with a trade-off with reduced laser intensity and greater challenge in homogenization.The 250-µm width of the zones used here is set by the bandwidth of our AOD deflection efficiency.We position the readout zone on the other side of the storage zone to further minimize decoherence on entangling zone atoms.
Our two-qubit gate parameters are similar to our prior work in Ref. [8].During two-qubit Rydberg (n=53) gates, we place atoms ≲ 2 µm apart within a "gate site", resulting in ≳ 450 MHz interaction strength between pairs, significantly larger than the Rabi frequency of 4.6 MHz.Importantly, due to the use of the Rydberg blockade [32,64], the gate is largely independent of the exact distance between atoms.Hence, precise inter-atom positioning is not required.Gate sites are separated such that atoms in different gate sites are no closer than 10 µm during the gate, resulting in negligible long-range interactions.Throughout this work we use 4 gate sites vertically (5 for the surface code experiment) and 20 horizontally, performing gates on as many as 160 qubits simultaneously (see ED Fig. 1d).Under various conditions, with proper calibration we measure two-qubit gate fidelities in the range F = 99.3%− 99.5%.We do not observe any error on storage-zone atoms when Rydberg gates are executed in the entangling zone.Even though the tail of the tophat Rydberg excitation beams is only suppressed to ∼ 0.1x intensity, the two-photon drive is far off-resonant due to the ∼ 20 MHz 1013 light shift detuning which is present for the entangling zone atoms [8].We natively realize physical CZ gates; when implementing CNOTs we add physical H gates.We find minimal two-qubit cross-talk between gate sites, as probed with long benchmarking sequences in Ref. [8].Although Ref. [8] appears to find some small cross-talk seemingly originating from decay into Rydberg P states, this should be considerably suppressed in the practical operation here due to the ∼ 200 µs duration between gates, during which time Rydberg atoms should either fly away or decay back to the ground state.
Shuttling and transfers.The SLM tweezers can have arbitrary positions, but are static.The AOD tweezers are mobile, but have several constraints [7,65].In particular, the AOD array creates rectangular grids (but not all sites need to be filled).During the atom moving operations, they are only used for stretches, compressions and translations of the AOD trap array: i.e., atoms move in rows and columns, and rows and columns never cross [7,65].Arbitrary qubit motions and permutation is achieved by shuttling atoms around in AOD tweezers, and then transferring atoms between AOD and SLM tweezers as appropriate.We perform gates on pairs of atoms in both AOD-AOD traps and AOD-SLM traps, with no observed difference for gate performance as measured by randomized benchmarking [8].
We find that free-space shuttling of atoms (i.e., no transfers) in AOD tweezers comes essentially with no fidelity cost (other than time overhead), consistent with our prior work [7].Two additional improvements here are the use of a photodiode to calibrate and homogenize the 2D deflection efficiency of our 2D AODs to percent-level homogeneity across our used region, and engineering atomic trajectories and echo sequences to cancel out residual path-dependent inhomogeneities.For example, we move an atom 100 µm away to realize a distant entangling gate, and then before returning the atom, we perform a Raman π pulse, so that differential light shifts accumulated during the return trip cancel with the first trip.Motion is realized with a cubic profile as in Ref. [7], the characteristic free-space movement time between gates is roughly 200 µs, and acoustic lensing effects from the AOD are estimated to be negligible.We pulse the 1013 laser off during motion to remove loss effects from the large light shifts.Note that the 1013-induced differential light shift on the hyperfine qubit is only kHz-scale but we still ensure its effects are properly echoed out.
Transferring atoms between tweezers [9] presents additional challenges.We measure the infidelity of each transfer, encompassing both dephasing and loss, to be ≲ 0.1%.To achieve this performance, in our transfer from SLM to AOD, we ramp up the AOD tones' intensity (with quadratic intensity profile when possible) corresponding to the appropriate sites over a time of 100-200 µs to a trap depth ∼2x larger than the SLM trap depth, and then move the AOD trap 1 − 2 µm away over a time of 50-100 µs.These time scales can likely be shortened considerably while suppressing errors using optimal control techniques.During subsequent motion we leave the AOD trap depth at this 2x value.To transfer an atom AOD to SLM we perform the reversed process.During these transfer processes, the differential light shifts on the transferred atoms are dynamically changing, and can result in large unechoed phase shifts.As such, whenever possible we engineer circuits such that pairs of transfers will echo with appropriately chosen π pulses.When echoing pairs of transfers is not possible, we perform 1 cycle of XY4 or XY8 dynamical decoupling during the transfer.Finally, we note that low-loss transfer is highly sensitive to alignment of the AOD and SLM grid.We fix small optical distortions between the AOD and SLM tweezer grids by fine adjustment of individual SLM grid tweezers, which can be arbitrarily positioned, to overlap with the AOD traps as seen on an image plane reference camera.It is important to adjust the SLM and not the AOD, as small adjustments of individual AOD tones deviating from a frequency comb causes beating and atom loss.
Dynamical decoupling and local gates.In our circuit design, we engineer our echo sequences in order to cancel out as as many deleterious aspects as possible.We ensure that in our dynamical decoupling we have an odd number of π pulses between CZ gates (whenever possible), as this echoes out both systematic and spurious contributions to the single-qubit phase [7,8].We apply appropriate X(π) and Z(π) rotations between local addressing with the local Raman to cancel out errors induced by the global π/2 pulses, as well as between pulses of the 420-nm laser (when used for entangling zone single-qubit rotations [7]) to echo out small crosstalk experienced in the storage zone by the tail of the 420-nm beam.For our global decoupling pulses we use both BB1 pulses [66] and "SCROFULOUS" pulses [67].To benchmark and optimize coherence during our complex circuits, we perform a Ramsey fringe measurement encompassing the entire movement and single-qubit gate sequence and optimize the observed contrast [7].When performing properly, our total single-qubit error is consistent with SPAM [8], an effective coherence time of 1-2 s, and the Raman scattering error of all the Raman pulses [7,62].We note that these measured coherence time include the movement within and between zones; although we use fewer pulses (typically 1 per movement) than the XY16-128 sequence used to benchmark 1.5s coherence in Ref. [7], the coherence times here are naturally longer due to furtherdetuned tweezers used (852 nm rather than 830 nm. Local single-qubit gates [34,68] with the Raman AOD are realized in arbitrary positions in space on both AOD and SLM atoms.Targeted logical qubit blocks are addressed by a grid illumination of the logical block.Arbitrary patterns of rotations on the qubit grid (e.g., during color code preparation) are realized with row-by-row serializing, with the targeted x coordinates in each row simultaneously illuminated.The duration of each row is 5-8 µs (i.e., several 10s of µs for an arbitrary pattern of rotations), which can be sped up considerably as discussed in the next section.For simplicity we carefully calibrate rotations on 80-160 specific sites across the array, but also perform rotations in arbitrary spots utilizing the nearest calibrated values.
With the local single-qubit gates and entangling zone twoqubit gates calibrated, the entire circuit is simply defined by the appropriate trapping SLM phase profile, and waveforms for our several AWG channels and TTL pulse generator.These several channels then program complex, varied circuits on hundreds of physical qubits.Animations of all of our programmed circuits are attached as Supplementary Movies.

Programmable single-qubit gates
To enable individual single-qubit gates, we use the same Raman laser system as our global rotation scheme and illuminate only chosen atoms using a pair of crossed AODs.The focused beam waist in the plane of the atoms is 1.9 µm, which is large enough to be robust to fluctuations in atomic positions, and small enough to prevent cross-talk to neighboring atoms separated by ≳ 6 µm.For Raman excitation, polarization needs to be carefully considered.Unlike the global path, the local beam propagation direction is perpendicular to the atom quantization axis (set by the external magnetic field).Therefore the fictitious magnetic field ⃗ B fict responsible for driving the transitions, as described in Ref. [62], preferentially drives σ ± hyperfine transitions rather than the desired π clock transition [69].There exist two possible approaches to single-qubit gates, as illustrated in ED Fig. 2a.First, off-resonant σ ± dressing generates differential light shifts between qubit states enabling fast local Z(θ) gates.Global π/2 rotations convert these to local X(θ) gates.Second, one can directly apply local X(θ) gates with direct π transitions by slightly rotating the quantization axis towards the local beam direction; this could be achieved with an external field but, conveniently, ⃗ B fict has a DC component that naturally rotates the axis.Note that, if the local beam is quickly turned on, this same fictitious DC field causes leakage out of the mF = 0 subspace, therefore Gaussian-smoothed pulses are used throughout this work.
Although we realize both the π and σ ± versions above, in the present experiments we use the off-resonant σ ± dressing procedure due to reduced polarization sensitivity, since our polarization homogeneity was affected by the sharp wavelength edge of a dichroic after the AOD.Furthermore, as for most circuits we perform local rotations row-by-row (only 1 Y tone at a time); this enables arbitrary fine-tuning of X coordinates and powers at each site for homogenizing and calibrating rotations (ED Fig. 2b).We calibrate using the procedure in ED Fig. 2c and find these calibrations are stable on month timescales.
To quantify the fidelity, we perform randomized benchmarking using 0, 10, 20, 30, 40, and 50 local Z(π/2) rotations (per site) on 16 sites, obtaining F = 99.912(7)% as shown in ED Fig. 2d (note that the single-qubit gates we execute globally have fidelity closer to 99.99% [7,8]).This approaches the Raman scattering limit for our σ ± scheme (error of ∼ 7 × 10 −4 per π/2 pulse), but when not well-calibrated is limited by inhomogeneity, in particular, associated with distortions of the y position of the rows.In the future, the performance can be further improved by using X(θ) gates, which enables robust composite sequences such as BB1 [66], has an improved Raman scattering contribution, and is faster (∼ 1 µs duration).

Midcircuit readout and feedforward
To perform midcircuit readout [10][11][12][13][14][15] of selected qubits without affecting the others, we use a local imaging beam focused on the readout zone which is roughly 100 µm spatially separated from the entangling zone [7,35].The local imaging beam consists of 780-nm circularly polarized light, with a near-resonant component from F = 2 to F ′ = 3 and a small repump component.This beam is sent through the side of our glass vacuum cell, co-propagating with the global Raman and 1013-nm Rydberg beams (ED Fig. 1a).We use cylindrical lenses to shape the beam with focused beam waists of 30 µm in the plane of the atom array and 80 µm out of the plane.After moving some of the atoms to this readout zone, we first perform local pushout of population in the F = 2 ground state manifold (by turning off the repump laser frequency), followed by local imaging of the remaining F = 1 population.
As depicted in ED Fig. 3a, we collect an average of about 50 photons per imaged atom.To avoid losing the atoms too quickly during mid-circuit imaging (which, unlike our global imaging scheme, does not have multi-axis cooling), we use deep (roughly 5-mK) traps (helping retain the atoms), and stroboscopically pulse them on and off out of phase of the local imaging light to avoid deleterious effects of the deep traps such as inhomogeneous light shifts and fluctuating dipole force heating (ED Fig. 3b) [70].From a double-Gaussian fit to the two distributions in Fig. 3a, we extract an imaging fidelity of over 99.9%.Because this fit can lead to an overestimate of the imaging fidelity (for example due to atom loss during imaging), we compare the total SPAM error (measured by amplitude of Ramsey fringe) with local imaging versus with global imaging for the same state preparation sequence, extracting 0.14(5)% higher error with local imaging; with these considerations we conservatively estimate a local imaging fidelity of around 99.8%.
A number of design considerations facilitate local imaging in the readout zone while preserving coherence of the data qubits in the entangling zone (ED Fig. 3e-g) [35].The main sources of decoherence are rescattering of photons from the locally imaged atoms as well as beam reflections and tails of the local imaging beam hitting the data qubits.As shown in Fig. 1c, for the 500-µs midcircuit imaging used in this work, we are able to achieve unchanged coherence (identical within the errorbars) of the data qubits with the local imaging light on as without it.To understand these effects more quantitatively, we measure the error probability of the data qubits in the entangling zone while the local imaging beam is on in the readout zone for up to 20 ms and with higher intensities than used for local imaging in this work.We suppress decoherence by light shifting the data qubits' 780-nm transition to be different from that of the locally imaged qubits by several 10s of MHz, as studied in ED Fig. 3f-g.Data qubit decoherence is further suppressed by the large spatial separation between the readout zone and the entangling zone, where intensity from the local imaging beam's Gaussian tail should theoretically fall off rapidly.Even at large separations, we find that stray beam reflections (e.g. from the glass cell window and other optical elements) can hit the data qubit region.To mitigate this effect, we displace reflections away from the atom array by angling the local imaging beam as it hits the glass cell window.The estimated effects of re-scattered photons from the imaged atoms, especially with the added relative detuning, is negligible.With all these considerations, we find that we are able to suppress data qubit decoherence rates to ≲ 0.1% per 500 µs of local imaging exposure, as illustrated in ED Fig. 3h.
The full mid-circuit readout and feedforward cycle occurs in slightly less than 1 ms, including local pushout, local imaging, readout of the camera pixels, decoding of the logical qubit state on the FPGA, and a local Raman pulse which is gated on or off by a conditional trigger (ED Fig. 3d).In future work, this approach to midcircuit readout and feedforward can be considerably improved to enable mid-circuit readout close to 100-µs scale [71].This method can directly be extended to perform many rounds of measurement and feedforward, where groups of ancilla atoms are consecutively brought to the readout zone throughout a deep quantum circuit.

Correlated decoding
During transversal CNOT operations, physical CNOT gates are applied between the corresponding data qubits of two logical qubits.These physical CNOT gates propagate errors between the data qubits in a deterministic way: X errors on the control qubit are copied to the target qubit, and Z errors on the target qubit are copied to the control qubit (see ED Fig. 4b).As a result, the syndrome of a particular logical qubit can contain information about the errors that have occured on another logical qubit, at the point in time in which the pair underwent a transversal CNOT operation.We can leverage the information about these correlations and improve the circuit fidelity by jointly decoding the logical qubits involved in the algorithm.We note that this is closely related to other recent developments in decoding entire circuits, or so-called space-time decoding [72][73][74][75].It is also related to Steane error correction [76], where errors are intentionally propagated from a data logical qubit onto an ancilla logical qubit, which is then projectively measured to extract the syndrome of the data logical qubit.
To perform correlated decoding, we solve the problem of finding the most likely error given the measured syndrome.We start by constructing a decoding hypergraph based on a description of the logical algorithm, which describes how each physical error mechanism (e.g. a Pauli-error channel after a two-qubit gate) propagates onto the measured stabilizers [72,77].The hypergraph vertices correspond to the stabilizer measurement results.Each edge or hyperedge corresponds to a physical error mechanism that affects the stabilizers it connects, with an edge weight related to the probability of that error.Each hyperedge can connect stabilizers both within and between logical qubit blocks (see Fig. 2b).We then run a decoding algorithm which uses this hypergraph, along with each experimental snapshot, to find the most likely physical error consistent with the measurements.This correction is then applied in software (with the exception of Fig. 4e, which is decoded real-time).
Concretely, to construct the hypergraph for a given logical circuit, we perform the following procedure.For each logical algorithm (in this section considering only Clifford gates), we identify a set of N detectors (vertices of the hypergraph) Di ∈ {0, 1} for i = 1, . . ., N , which are sensitive to physical errors occuring during the logical circuit.A detector is either on (1) or off (0) to indicate the presence of an error.For the general case, we let Di = 0 if the i th stabilizer measurement matches the measurement of its backwards-propagated Pauli operator at a previous time, and 1 otherwise (the latter indicates that an error has occured).In particular, for our surface code experiments, detectors in the final projective measurement are computed by comparing the final projective measurement of the stabilizers with the value of the ancillabased stabilizer measurement that occured before the CNOT (note that due to our state-preparation procedure, the initial stabilizer measurement is randomly ±1, but the detector is deterministically zero in the absence of noise).For our twodimensional color code experiments, the initial stabilizers are deterministically +1, so each detector is equal to zero if the corresponding stabilizer in the final projective measurement is +1.To construct the concrete hypergraph and hyperedge weights, we then use Stim [72] to identify the probability pj (j = 1, . . ., M ) of each error mechanism Ej in the circuit using a Pauli-channel noise model with approximate experimental error rates, along with the detectors that are affected by Ej.
To find the most likely physical error, we encode it as the optimal solution of a mixed-integer program, a canonical problem in optimization with commercial solvers readily available [78], similar to prior work in Ref. [79].We associate each error mechanism Ej with a binary variable that is equal to one if that error occured, and zero otherwise.Our goal is then to find the error assignment {0, 1} M with maximum total error probability (alternatively, the error with the minimum total weight, where the weight of error i is wi = log[(1 − pi)/pi]), subject to the constraint that the error is consistent with the measured detectors.To be consistent with the measured detectors, the parity of the error variables for all the hyperedges connected to a given detector should match the parity of that detector.Concretely, let f be a map from each detector Di to the subset of error mechanisms that flip its parity.The most likely error is then the optimal solution to the following mixed-integer program: The objective function evaluates to the logarithm of the probability of the assigned error configuration, and each variable Ki ensures that the sum of the error variables in f (Di) matches Di, modulo 2. Finally, we solve the mixed-integer program to optimality using Gurobi, a state-of-the-art solver [78], and apply the correction string associated with the error indices j for which Ej = 1 in the optimal assignment.We explore this correlated decoding in more detail, including its consequences on error-corrected circuits and the asymptotic runtimes of different decoders, in Ref. [80].See Methods sections Surface code and its implementation and Correlated decoding in the surface code for additional discussion on the surface code in particular.

Direct fidelity estimation and tomography
One challenge with logical qubit circuits is that convenient probes that are accessible with physical qubits may no longer be accessible.The GHZ state studied here provides such an example, since conventional parity oscillation measurements cannot be performed [81].Instead, we use a technique known as direct fidelity estimation [39], which can be understood as follows.The target state ψ is the simultaneous eigenstate of the N stabilizer generators {Si}, and so the projector onto the target state is |ψ⟩⟨ψ| = N i (Si + 1)/2 (which is 1 if Si = 1 ∀i, and 0 otherwise).One can thereby directly measure fidelity by measuring the expectation values of all terms in this product, which in other words refers to measuring the expectation values of all elements of the stabilizer group given by the exponentially many products of all the Si.The logical GHZ fidelity is defined as the average expectation value of all measured elements of the stabilizer group.With our 4-qubit GHZ state, with 4 stabilizer generators {XXXX, ZZII, IZZI, IIZZ}, the 16-element stabilizer group is given by all possible products: {IIII, ZZII, IZZI, IIZZ, ZIIZ, IZIZ, ZIZI, ZZZZ, XXXX, XY Y X, Y XXY, XXY Y, Y Y XX, Y XY X, XY XY, Y Y Y Y }.We measure the expectation values of all 16 of these operators; for each element, we simply rotate each logical qubit into the appropriate logical basis and then calculate the average parity of the four logical qubits in this measurement configuration.We then directly average all 16 elements equally (with appropriate signs, as as some of the stabilizer products should have -1 values), and in this way compute the logical GHZ state fidelity.This is an exact measurement of the logical state fidelity [39].Scaling to larger states can be achieved by measuring elements of the stabilizer group at random [39].To perform full tomography in Fig. 3e, we measure in all 3 4 = 81 bases, thereby measuring the expectation values of all 256 logical Pauli strings, and reconstruct the density matrix by solving the system of equations with optimization methods.

Sliding-scale error detection
Here we provide additional information about the sliding-scale error detection protocol applied for Figs.3,5,6.Typically, error detection refers to discarding (or postselecting) measurements where any stabilizer errors occured.In the context of an algorithm, however, discarding the result of an entire algorithm if just one physical qubit error occurred may be too wasteful, and one may want to only discard measurements where many physical qubits fail and the probability of algorithm success is greatly reduced.For this reason, for the algorithms here we explore error detection on a sliding-scale, where one can set a desired "confidence threshold", where based on the syndrome outcomes one determines whether to accept a given measurement.Sliding this confidence threshold enables a continuous trade-off (in data analysis) between the fidelity of the algorithm and the acceptance probability.When sliding-scale error detection is applied, in all applicable cases we also apply error correction to return to the codespace.
We apply such a sliding-scale error detection for the colorcode logical GHZ fidelity measurements in Fig. 3d.One possible method would be to discard measurements based on the number of detected stabilizer errors.However, this is suboptimal, both because on the color code a single physical qubit error can result from anywhere between 1 and 3 stabilizer errors, and also because errors deterministically propagate between codes during the transversal CNOT gates, such that a single physical error on one code can lead to detected errors on all codes, but which are still all correctable errors.As such, we perform the sliding-scale error detection utilizing the correlated decoding technique, and set the confidence threshold as a threshold weight of the overall correction weight on the decoding hypergraph.For example, in the color code GHZ experiment, a stabilizer error on all 4 logical qubits which is just consistent with a single physical qubit error that propagated to all 4 logical qubits, is in fact a low-weight (or, highprobability) error as it corresponds to just a single physical qubit error.If the weight of hypergraph correction (inversely related to log of the probability that a given error mechanism would have occurred leading to the observed syndrome outcome) is below the cut-off threshold weight, then the measurement is accepted; otherwise, it is rejected.For each threshold we then calculate the average algorithm result (y-axis of Fig. 3d), as well as the fraction of accepted data (x-axis of Fig. 3d).
In Fig. 5 with [[8,3,2]] codes, for 3, 6, 24, and 48 logical qubits we apply our sliding-scale detection simply as given by the total number of stabilizer errors detected, although as illustrated above this can likely be improved by considering which stabilizer error patterns are more likely to cause an algorithmic failure.For the 12 logical qubits, in order to have a more fine-grained sliding-scale, for each of the 2 4 = 16 possible stabilizer outcomes we calculate the XEB to rank the likelihood that each of the observed stabilizer outcomes leads to an algorithmic failure, and then use this ranking when deciding whether a given measurement is above/below the cut-off threshold.In Fig. 6b we set the threshold by the number of stabilizer errors, and in Fig. 6d, to have more fine-grained sliding-scale information we take different subsets of stabilizer outcome events that are all below the threshold of allowed number of stabilizer errors, and calculate the y-axis (Pauli expectation value) and x-axis (purity) for all of them.Broadly, there are many ways to perform this sliding-scale error detection, and this can be useful both as continuous trade-offs between fidelity and acceptance probability, as well as for use in techniques such as zero-noise extrapolation in data analysis (Fig. 6d).

Overview of QEC methods
Here we provide a brief overview of key QEC methods used in our work.
Code distance, decoding, and thresholds.[[n, k, d]] notation describes a code with a number of physical qubits n, a number of logical qubits k, and a code distance d.The code distance d sets how many errors a code can detect or correct.The code distance is the minimum Hamming distance between valid codewords (logical states), i.e. the weight of the small-est logical operator [82].In the case of the two-dimensional surface and color codes studied here, d is equivalent to the linear dimension of the system [24].
Following this definition, quantum codes of distance d can detect any arbitrary error of weight up to d − 1.Such errors cause stabilizer violations, indicating that errors occurred.Postselecting on the results with no such stabilizer violations corresponds to performing error detection, which protects the quantum information up to d − 1 errors at the cost of postselection overhead.Conversely, codes can correct fewer errors than they detect (but without any postselection overhead).The correction procedure brings the system back to the closest logical state (codeword); thus, if more than d/2 errors occur, the resulting state may be closer to a codeword different from the initial one, resulting in a logical error [82].For this reason, codes of distance d can correct any arbitrary error of weight up to (d−1)/2 (rounded down if d is even [24]).The process of decoding refers to analyzing the observed pattern of errors and determining what correction to apply to return back to the original code state and undo the physical errors created.In many cases, such as with the 2D surface and color codes, one does not need to apply the correction in hardware (physically flipping the qubits); instead it is sufficient to undo an unintended XL/ZL operator that was applied by hardware errors by simply applying a "software" XL/ZL operator [24], also described as Pauli frame tracking [83].
As the size of an error correcting code and the corresponding code distance is increased, so are the opportunities for errors to occur as the number of physical qubits increases.This leads to a threshold behavior in quantum error correction: if the density of errors p is above a (possibly circuit-dependent) characteristic error rate p th , then increasing code distance will worsen performance.However, if p < p th , then increasing code distance will improve performance [24].Theoretically, since one requires (d + 1)/2 errors to create a logical error, the logical error rate will be exponentially suppressed as ∝ (p/p th ) (d+1)/2 at sufficiently low error rates [24].The performance improvement with increasing code distance, observed for the preparation and entangling operation in Fig. 2, implies that we surpass the threshold of this circuit.We note that in this regime, improving fidelities by e.g. a factor of 2x can then lead to an error reduction of 2 4 = 16x for the distance-7 code studied, and further exponential suppression with increasing code distance.This rapid suppression of errors with reduced error rate and increased code distance is the theoretical basis for realizing large-scale computation.We emphasize that thresholds can be circuit-dependent, as discussed in detail in the surface code section below.
Fault-tolerance and transversal gates.A common definition of fault-tolerance in quantum circuits [82] (which we use in this work) is that a weight-1 error (i.e. an error affecting one physical qubit), cannot propagate into a weight-2 error (now affecting two physical qubits) within a logical block.This property implies that errors cannot spread within a logical block, and thereby prevents a single error from growing uncontrollably and causing a logical error.
Distance-3 codes, which are of significant historical importance [3,84], can correct any weight-1 error.Fault-tolerance is particularly important for these codes, since otherwise a weight-1 error can lead to a weight-2 error and thereby cause a logical fault.An important characteristic of a fault-tolerant circuit that uses distance-3 codes [82] is that (in the low error rate regime), physical errors of probability p lead to logical errors with probability ∝ p 2 .We emphasize that the notion of fault-tolerance refers to circuit structuring to control propagation of errors, but a circuit can be fault-tolerant with low fidelity, or non-fault-tolerant with high fidelity.For example, even if a weight-1 error can lead to a weight-2 error, but the code has high distance, or if this error propagation sequence is possible but highly unlikely, then this property may not be of practical importance (for this reason definitions of faulttolerance may vary).In practice, the goal of QEC is to execute specific algorithms with high fidelity, and fault-tolerant structuring of a circuit is one of many tools in the design and execution of high-fidelity logical algorithms.
Transversal gates, defined here as being composed of independent gates on the qubits within the code block (i.e., entangling gates are not performed between qubits within the same code block) [42], constitute a direct approach to ensure fault-tolerant structuring of a logical algorithm.Since transversal gates imply performing independent operations on the physical constituents of a code block, errors cannot spread within the block, and fault-tolerance is guaranteed.In the present work, all logical circuits we realize (following the logical state preparation) are fault-tolerant, as all logical operations we perform are transversal.Note, in particular, that even though the transversal CNOT allows errors to propagate between code blocks, this is still fault-tolerant as it does not lead to a higher weight error within the block, and thereby a single physical error can neither lead to a logical failure nor an algorithmic failure.Importantly, the large family of codes referred to as Calderbank-Shor-Steane (CSS) codes all have a transversal CNOT [2], all of which can be implemented with the single-step, parallel-transport approach here.
Although all the logical circuits we implement are faulttolerant, the logical qubit state preparation is fault-tolerant for our d = 3 color code (Figs.3,4) and d = 3 surface code (part of Fig. 2), but is non-fault-tolerant for the state preparation of our d = 5, 7 surface codes and [ [8,3,2]] codes.Thus, all of our experiments with the d = 3 color codes are faulttolerant from beginning to end, and so the entire algorithm is fault-tolerant and theoretically has a failure probability that scales as p 2 .However, we note that having a fault-tolerant algorithm also does not imply that errors do not build up during execution of the circuit.For this reason deep circuits require repetitive error correction [6,85] to constantly remove errors and continuously benefit from the, e.g., p 2 suppression.
Our logical GHZ state theoretically has a failure probability scaling as p 2 .Nevertheless, the error build-up (increasing p) during the operations of the circuit and the spreading of errors through transversal gates, limits our logical GHZ fidelity to 72%.This is consistent with numerical modeling.Similar to the surface code modeling (ED Fig. 4) we use empirical error rates consistent with 99.4% two-qubit gate fidelity as well as roughly 4% data qubit decoherence error (including SPAM) over the entire circuit.We simulate the experimental circuit (including the FT state preparation with the ancilla logical flag) and measurements of all 16 elements of the stabilizer group (see direct fidelity estimation section), and extract a simulated logical GHZ fidelity of 79%.This is slightly higher than our measured 72% logical GHZ fidelity, possibly originating from imperfect experimental calibration.This modeling indicates that our logical GHZ fidelity is limited by residual physical errors, which will be reduced quadratically as p 2 with reduction in physical error rate p, in particular by reducing residual single-qubit errors which were larger during this measurement and are dominating the error budget here.
Surface code and its implementation.In 2D planar architectures, such as those associated with superconducting qubits [6,85], stabilizer measurement is the most important building block of error-corrected circuits [24].In such systems, stabilizers need to be constantly measured in order to correct qubit dephasing and increase coherence time, as demonstrated recently [6].Logic operations are implemented by changing stabilizer measurement patterns, enabling realization of techniques such as braiding [24] and lattice surgery [86].Similar techniques can be used to move logical degrees of freedom in order to implement nonlocal logical gates [23].Due to this gate execution strategy, d rounds of stabilizer measurement are required for each entangling gate for ensuring faulttolerance [24].
Neutral atom quantum computers feature different challenges and opportunities.Specifically, they feature long qubit coherence times (T2 > 1s), which can be further increased to the scale of 10 -100s with well-established techniques [68].By using the storage zone, qubits can be idly, safely stored for long periods without repeated stabilizer measurements.Hence, from a practical perspective increasing qubit coherence by using a logical encoding does not provide immediate gains in improving quantum algorithms, and the gains will be from improving the fidelity of entangling operations.Moreover, logic gates and qubit movement do not have to be performed with stabilizer measurements.Instead, they can be executed with nonlocal atom transport and transversal gates.Since such transveral gates are intrinsically fault-tolerant, they do not necessarily require d rounds of correction after each operation.Even syndrome measurement may be better executed in certain cases by techniques such as Steane error correction [76] (similar to our ancilla logical flag with color codes as used in Fig. 3) as opposed to repeated stabilizer measurement.For these reasons, the transversal CNOT is among the most important building blocks in error-corrected circuits.Hence, we here focus on improving the transversal CNOT by scaling code distance.
Specifically, we use the so-called rotated surface code [6], which has code parameters [[d 2 , 1, d]].Our distance-7 surface codes (as drawn in Fig. 2d) are composed of 49 physical data qubits, with 24 X stabilizers (light blue squares) and 24 Z stabilizers (dark blue squares), and 1 encoded logical qubit described by anticommuting weight-7 operators, the horizontally oriented XL and the vertically oriented ZL.The X and Z stabilizers commute with the XL and ZL logical operators, allowing one to measure the stabilizers without disturbing the underlying logical degrees of freedom.In our experiments, we prepare one surface code in |+L⟩ and one surface code in |0L⟩.In the first code, this is realized by preparing all physical data qubits in |+⟩, thereby preparing an eigenstate of XL and the 24 X stabilizers, and then projectively measuring the 24 Z stabilizers with 24 ancilla qubits (Fig. 2d red dots) using four entangling gate pulses [24].The second code is prepared similarly, but with all physical qubits initialized in |0⟩, thus preparing an eigenstate of ZL and the 24 Z stabilizers, and then projectively measuring the 24 X stabilizers with 24 ancillas.The CNOT is directly transversal because these two surface code blocks have the same orientation, and does not require rotation of the lattice to implement a H.The projective measurement of the ancillas defines the values of the stabilizers.During the transversal CNOT, the values of the stabilizers are copied onto the other code as well, and is tracked in software.
Since we only perform a single round of stabilizer measurement, our state preparation scheme is non-fault-tolerant (nFT) for the d = 5, 7 codes.Consider, for instance, the case when all stabilizers are defined as +1, and no errors are present in the system, but an ancilla measurement error in the middle of the surface code lattice yields a stabilizer measurement = -1.Correction then causes a large-weight pairing of this apparent stabilizer violation to the boundary [4].Hence this single ancilla measurement error can lead to several data qubit errors, resulting in nFT operation.The d = 3 code initialization is a special case which does not suffer from this issue [38].Higher-order considerations about fault-tolerance given by gate ordering during stabilizer measurement can also be considered [6].
The effect of these nFT errors from noisy syndrome extraction is to cause X physical errors on the |+L⟩ state, and Z physical errors on the |0L⟩ state.Thus in performing just state preparation and measurement, the presence of these errors would not be directly apparent, as these errors commute with measuring the |+L⟩ in the X-basis and |0L⟩ in the Z basis.As such this circuit would not be a good benchmark of surface code state preparation.Conversely, the transversal CNOT experiment is sensitive to the various aspects of the circuit and a good probe of performance.Since we measure the Bell state in both the X 1 L X 2 L and Z 1 L Z 2 L bases, the nFT errors in both bases will propagate through the logical CNOT and cause errors on both logical qubits in both the X and Z bases.For these reasons, unlike a surface code SPAM measurement, this experiment is a good probe of logical performance.In fact, the effect of these nFT errors is such that if we just apply conventional decoding within each logical block, then we find that the Bell state degrades substantially with increased code distance (Fig. 2d).
The effects of this nFT preparation are suppressed (but are not entirely removed) by using the correlated decoding technique.For example, consider a nFT-induced apparent stabilizer violation to the left of the middle line in the lattice of the d = 7 |+L⟩ state, corresponding to a chain of 3 physical X errors to the boundary.These errors will propagate through the logical CNOT onto the second logical qubit, and affect the independent measurement of both logical qubits in the Z basis when probing the Z 1 L Z 2 L stabilizer.When decoded independently, if another single X error occurs on the first block after the CNOT moving the stabilizer violation to the right of the middle line, becoming a chain of 4 X physical errors, this will cause an incorrect pairing and lead to an independent X 1 L error on this code only and thereby corrupt the Z 1 L Z 2 L stabilizer, and would correspond to a total weight-6 correction between the two codes.However, when decoded jointly with correlated decoding, these errors can be effectively decoded since they will appear on the stabilizers of both logical qubits.In this example, the lowest weight pairing would remove this chain of 3 X errors from both codes, and leave only the 1 remaining X error on the first block, which can also successfully be decoded (total pairing weight here is only 2).Our correlated decoding technique is thus essential to our observation of improved Bell performance with code distance.
Finally, we elaborate on our evaluation of Bell pair error.Bell state fidelity is given by the average of the populations and the coherences, which for physical qubits can be measured as the ZZ populations and the amplitude of parity oscillations.In the language of stabilizers, the parity oscillation amplitude is given by the average of ⟨XX⟩ and −⟨Y Y ⟩ [87].With the surface code we cannot conveniently measure the YL operators fault-tolerantly (and is why we use color codes for programmable Clifford algorithms and full tomography, see next section).For this reason, we estimate the logical coherences as ⟨XLXL⟩, which we then average with the populations for calculating the Bell pair error.To support the validity of this analysis, we can instead calculate a lower bound on the Bell state fidelity [87], which also shows the same improvement in performance as we increase code distance (ED Fig. 4d).
Correlated decoding in the surface code.Following the above discussion, we provide additional insights related to the correlated decoding in the case of the surface code transversal CNOT.Consider a circuit where perfect (noiseless) surface codes are initialized, a transversal CNOT is executed, and then projective readout is performed.If errors occur before the transversal CNOT, then these errors can propagate; e.g., an X physical error on the control logical qubit will propagate onto the target logical qubit, and thereby double the density of errors on the target logical qubit.By multiplying the projectively measured Z stabilizers of the target logical qubit with those of the control logical qubit, the propagation is undone.Now the target logical qubit only has to decode its original density of X errors.The same considerations can be made for Z errors originating on the target logical qubit that propagate onto the control logical qubit.However, if there are errors after the transversal CNOT, then multiplying the stabilizers instead doubles the density of such errors.Thus, the optimal decoding strategy if errors are only after the transversal CNOT is to perform independent matching within both codes.The general case where errors are present both before and after the transversal CNOT corresponds to neither case, and is modeled by our decoding hypergraph that has edges and hyperedges connecting the two logical qubits, with edgeweights informed by our experimental error model.Fig. 5 explores decoding performance with different values of the scaled weights of the edges and hyperedges that connect the stabilizers of the two logical qubits.These results illustrate that the correlated decoding is robust (but not completely insensitive) to the nFT errors associated with ancilla measurement errors.This feature would also be recovered by the simpler multiplication decoder, which would be entirely insensitive to errors from ancilla measurement, but however is more sensitive to errors after the CNOT.Specifically, ED Fig. 5c shows that our optimized decoder is not simply a "multiplication decoder" as the ancilla measurement values indeed contribute to the correction procedure and make the correlated decoding more robust to decoder parameters.For a given logical circuit, our correlated decoding procedure generates a decoding hypergraph which we then solve using most likely error methods, which is done here for both surface code and color code experiments, and can generically be applied to any stabilizer codes and Clifford circuits [75].More theoretical details and discussion of correlated decoding will be presented in Ref. [80].
2D color codes.Two-dimensional color codes are topological codes, which are similar to surface codes [88].Often portrayed in a triangular geometry, the color codes used here are a tiling of three colors of weight-4 and weight-6 stabilizers, with XL and ZL operator strings running along the boundary of the code [88].In this work we study two-dimensional d = 3 color codes, as portrayed in Fig. 3a, which only contain weight-4 stabilizers given by the products of X and Z on the qubits of each colored plaquette.This d = 3 color code is identical to the 7-qubit Steane code.However, we emphasize that the techniques used here directly apply to larger-distance color codes [89].
Although the color codes are similar to surface codes, an important difference is that in the color code, the X and Z stabilizers lie directly on top of the same qubits (as opposed to being on dual lattices with respect to each other), and similarly the XL and ZL operators lie on top of each other (as opposed to propagating in the orthogonal directions on the surface code).In other words, the operators here are symmetric and related by a global basis transformation.This has important consequences for the allowed transversal gate set [41,90].In particular, although the surface code technically has a transversal H which transforms XL ↔ ZL, it requires a physical 90-degree rotation of the code block.While such lattice rotations are possible using atom motion techniques, for many circuits it is inconvenient.Conversely, in the color code H is transversal: it directly exchanges XL ↔ ZL as well as the X and Z stabilizers.This difference is even more important for the transversal S gate which is possible for the color code.Here, transversal S exchanges XL ↔ YL (where YL is given by the product of XL and ZL which lie on top of each other) as intended, and the X stabilizer of a given plaquette returns back to itself by multiplying the Z stabilizer of that same plaquette.(This is in contrast to the surface code, which does not have a transversal S, where the YL operator is a product of horizontally propagating XL and vertically propagating ZL [24].)Since the color code has the entire transversal gate set of {H, S, CNOT} and also does not require tracking any lattice rotations, it is well-suited to exploration of programmable logical Clifford algorithms.
For fault-tolerant preparation of the d = 3 color code we use a modified version of the scheme summarized in Ref. [38], where instead of the 8-gate encoding circuit, we use a 9-gate encoding circuit that is more conveniently mapped to specific atom movements in our system (corresponding to graph state preparation similar to Ref. [7]), followed by a transversal CNOT with an ancilla logical flag.The logical SPAM fidelity is then calculated as the probability of observing |0L⟩ after decoding.We note that in Fig. 3 we could also have made a 5-qubit GHZ state but made a 4-qubit GHZ state for simplicity of performing full tomography.In Fig. 4, when Bell state fidelities with feedforward are reported we estimate the logical coherences as the average of ⟨XLXL⟩ and −⟨YLYL⟩, which we then average with the ZLZL populations (not plotted) for calculating the Bell pair fidelity.Finally, we note that the feedforward Bell state in Fig. 4e could also be performed with a software ZL rotation on either one of the two qubits allowing one to correct to the appropriate Bell state, but here we do the feedforward S on both qubits to test our feedforward capabilities; this technique is directly compatible with performing magic state teleportation [24].
Clifford and non-Clifford gates, and universality.2D topological codes such as the surface and color codes have transversal implementation of Clifford gates (e.g., {H, S, CNOT}).This gate set is not universal, i.e. it cannot alone be used to realize an arbitrary quantum computation, and requires a non-Clifford gate such as {T , CCZ} for achieving universal computation.Moreover, circuits composed solely of stabilizer states and Clifford gates can be simulated in polynomial time due to the Gottesman-Knill theorem [44].This can be understood as stabilizer tracking: for example, consider a 3-qubit system where a stabilizer of the state is X ⊗ I ⊗ I, where X stabilizes the |+⟩ state and I is the identity.Applying two CZ entangling gates CZ1,2 ⊗ CZ1,3 transforms this stabilizer to X ⊗ Z ⊗ Z, since an X flip before the CZ simply changes whether a Z flip will be applied to the other qubits.Even though Clifford circuits create superposition and entanglement between qubits, the N initial stabilizers of the state can simply be tracked as they propagate through the circuit (so-called operator spreading [91]), and thereby simulation of the circuit can be easily accomplished.
The effect of non-Clifford gates, however, is significantly more complex.For example, passing the stabilizer X ⊗ I ⊗ I through a CCZ maps into a superposition of Pauli strings, i.e.X ⊗I ⊗I → 1/4(X ⊗I ⊗I +X ⊗Z ⊗I +X ⊗I ⊗Z −X ⊗Z ⊗Z), as an X flip now changes whether a CZ operator will be applied on the other qubits, resulting in 4x more operators to track after the single CCZ.(The CZ operator matrix is simply equal to 1/4 [I ⊗I +Z ⊗I +I ⊗Z −Z ⊗Z]).This causes not only operator spreading, but also so-called operator entanglement [91].As we apply additional non-Clifford gates, the number of operators to track will grow exponentially, and eventually will become computationally intractable.E.g. state-of-the-art Clifford + T simulators can handle roughly 16 CCZ gates [49].This is the basis behind our complex sampling circuits, where the 48 CCZs on the 48 logical qubits create a high degree of scrambling and magic (defined below), rendering Clifford + T simulation impractical.
[ [8,3,2]] circuit implementation Here we provide additional detail about our [ [8,3,2]] circuit implementations.The [ [8,3,2]] code blocks are initialized in the |−L, +L, −L⟩ state with the circuit in ED Fig. 6, which can be understood as preparing two 4-qubit GHZ states (corresponding to [[4,2,2]] codes [92]), i.e.GHZ 1,3,5,7 Z GHZ 2,4,6,8 X , and subsequently entangling them as illustrated in ED Fig. 6a (as well as applying Z gates).In our circuit implementations, for system sizes of 3 to 24 logical qubits both for sampling and two-copy measurements, we prepare 8 blocks encoded over 64 physical qubits.For the 48 logical qubit circuit (128 physical qubits total) we encode 8 blocks and entangle them, and then drop them into storage; then, we pick up 64 new physical qubits from storage, encode them into 8 blocks in the entangling zone and entangle them.Finally, we bring the original 8 blocks from storage and entangle them with the second group of 8 blocks in the entangling zone (ED Fig. 6) (see Supplementary Movie).
The transversal gate set of the [ [8,3,2]] code is enabled as follows (see also Refs.[16,17,26,27]).The transversal CNOT between blocks immediately follows from the fact that the [ [8,3,2]] code is a CSS code.In-block CZ gates between two logical qubits Li and Lj (CZLi,Lj) can be realized by S, S † gates on the face corresponding to logical qubit L k .For example, consider applying the pattern of S, S † gates to the top face in Fig. 5, i.e., S1S † 3 S † 5 S7, which transforms XL1 = X1X2X3X4 to X ′ L1 = −Y1X2Y3X4, which is equal to X ′ L1 = XL1ZL2, and the same applies to give X ′ L2 = XL2ZL1; i.e., a CZ is realized between logical qubits 1 and 2. This procedure can also be used to understand why the pattern of T , T † realizes a CCZ between the three encoded qubits.CCZ gates should map XL3 to XL3 ⊗ CZL1,L2.By applying the pattern of T , T † in Fig. 5a, each X face maps to itself mul-tiplied by a pattern of S, S † , e.g.XL3 = X1X3X5X7 maps to X ′ L3 = XL3S1S † 3 S † 5 S7, or then X ′ L3 = XL3 ⊗ CZL2,L3.This happens for all three XL faces, thereby realizing a CCZ gate.Finally we detail the permutation CNOT, which was also developed in Ref. [27].Physically permuting atoms to swap qubits 4 ↔ 8 and 3 ↔ 7 takes XL1 = X1X2X3X4 to X ′ L1 = X1X2X7X8 or instead X ′ L1 = XL1XL2 (also by multiplying the global X stabilizer), and similarly it can be seen by tracking the qubit permutations that Z ′ L2 = ZL2ZL1, i.e. realizing a CNOT.Finally, although these 3D codes do not have a transversal H, as they are CSS codes they can be initialized and measured in either the X or Z basis, effectively allowing H gates at the beginning or end of the circuit.
In-block logical entangling gates are applied block-byblock, and any in-block gate combination can be realized.For conceptual simplicity we apply only two particular local Raman patterns in layers.The first is the gate combination , given by applying T † on the entire physical qubit block, and the second gate combination we apply is CCZL1,L2,L3 • CZL2,L3 • CZL1,L3 • ZL3, given by applying T on the top row and T † on the bottom row.In our circuits we alternate layers of in-block transversal entangling gates and out-block transversal CNOTs, entangling logical blocks on up to 4D hypercubes (see ED Fig. 6) [19,93,94].We keep the control and target qubits the same throughout the circuit for conceptual simplicity, allowing the local physical H gates on the target qubits to be compiled with the in-block gate layers, but the control-target direction can also be chosen arbitrarily.We ensure that in-block logical entangling gates are applied such that they do not trivially commute through and cancel with earlier entangling gate applications.As an experimental note, we note that for the Clifford states realized in the other parts of this work, stabilizers take on values of either +1 or -1 (due to, e.g., use of physical π/2 rotations instead of H), which is then simply re-defined in software.Since for our [[8,3,2]] circuits we implement non-Cliffords on the physical level, it is important to ensure all stabilizers are initialized and maintained as +1; e.g., if a Z stabilizer is -1, then the logical CCZ implementation sends the X stabilizer expectation value to 0. This can be understood as a physical X on a single site transforming to a superposition (X + Y )/ √ 2 by physical T 's, going into an equal superposition of X stabilizer being +1 and -1.
Classically hard circuits with [[8,3,2]] codes Our implemented circuits are equivalent to Instantaneous Quantum Polynomial (IQP) circuits [95], which gives a theoretical basis for understanding why our circuits could in principle be classically hard to simulate, for which we also provide numerical evidence of so-called anticoncentration [96,97].IQP circuits are defined as initializing |+⟩ ⊗n on n qubits, applying a diagonal entangling unitary such as those composed by {CCZ, CZ, Z}, and then measuring in the X-basis [20,95].A uniform superposition of 2 n bitstrings is created, the diagonal gates apply -1 signs in a complicated fashion to the exponentially many bit strings, and then "undoing the superposition" with the final H before measurement now results in an intricate "speckle" interference pattern [18].Sampling from the output distribution of this speckle pattern can be done efficiently on a quantum device that implements the circuit, but is exponentially costly on a classical device for certain choices of IQP circuits [20].The transversal gate-set of the [[8, 3, 2]] code, as described above, contains diagonal gates {CCZ, CZ, Z} that apply -1 signs to the bitstrings, but is made nondiagonal by the application of CNOTs, which permute bitstrings.Since this bitstring permutation does not break the IQP framework, these circuits are equivalent to an effective IQP circuit, but which is significantly more complex: e.g., circuits with 48 CCZs and 96 CNOTs map to effective IQP circuits with roughly 1000 CCZ gates.Nevertheless, since IQP circuits are a well-understood framework we can discuss our circuit properties with this toolset.
We experimentally probe these circuits with the XEB [18], defined as XEB = 2 N L Σip(x i L )q(x i L ) − 1, where NL is the number of logical qubits, q(x i L ) is the measured probability distribution for our logical qubits and p(x i L ) is the calculated probability distribution; here, we normalize the XEB by its ideal value such that the XEB for the noiseless circuit is 1.In typical cases, if noise overwhelms the circuit, the measured distribution will be uniform [18], and the measured XEB will be 0.
The IQP circuits are a good setting for quantumadvantage-type experiments, as the bitstring distribution of IQP circuits with randomly applied {CCZ, CZ, Z} gates (random degree-3 polynomials) is known to be classically hard to simulate [20,98].In Ref. [99], we show that the ensemble of random hypercube IQP circuits (hIQP), whose instances are experimentally explored here, converges to the uniform IQP ensemble as the depth and size of the hypercube is increased.In ED Fig. 8a, we show that hIQP circuits with random inblock operations and randomized control-targets on the outblock CNOT layers (realizing the hypercube) anti-concentrate quickly as the dimension of the hypercube is increased, with XEB eventually reaching the uniform-IQP value of 2. We also find that the presence of non-Clifford CCZ gates, which are critical for the computational hardness here, further improves anti-concentration properties, as we observe the ideal XEB of experimental circuits approach 2 as well, even without much randomization.
Moreover, XEB turns out to be a better benchmark for IQP circuits than for generic random circuit sampling settings (such as Haar-random circuits) [100][101][102].For IQP, XEB is close to the many-body fidelity and the difference can be theoretically bounded under reasonable noise assumptions [99].Intuitively, this fact is related to the diagonal structure of the IQP circuits, which allows XEB to capture errors in a manner closer to fidelity, despite being defined only in the computational basis.In other words, a Z error will always corrupt the X basis measurement, and an X error (except one immediately before measurement) will create new Z errors that also corrupt the X basis measurement.Thus, in the fully postselected regime, where errors at the end of the circuit are well-described by logical errors, we expect the XEB to be a good measure of fidelity.We further note that, in addition to the efficient generation of complex IQP circuits here, the [[8,3,2]] gate set presented here can realize arbitrary IQP circuits composed of {CCZ, CZ, Z} gates [103].The in-block {CCZ, CZ, Z} operations can be applied to any groupings of qubits by noting that combining the in-block and out-block CNOTs allow us to compose arbitrary transversal SWAP operations of targeted individual logical qubits between different blocks.

Simulation of bitstring probabilities
To calculate the logical bitstring probabilities necessary for evaluating XEB and benchmarking our circuits, we employ a hybrid simulation approach combining wavefunction and tensor-network [104] methods.It works best only when performing all of the entangling gates of the hypercube a single time, and relies on the fact that the final round of CNOTs is immediately followed by a measurement, simplifying network contraction.Concretely, for a D-dimensional logical hypercube, the two subsystems consisting of 2 D−1 blocks are simulated independently and then the final layer of CNOTs and in-block operations is combined with the measurement outcomes (the bitstring of interest), which results in a contraction of two 8 2 D−1 tensors (see ED Fig. 8b).This is a square-root reduction in the memory requirement compared to the full wavefunction simulation which uses O(8 2 D ) space.The ideal XEB value is calculated by sampling bitstrings from the ideal output distribution and then averaging the corresponding probabilities.The bitstrings are sampled using a marginal sampling algorithm, which utilizes the same contraction scheme described above.
We next consider if the finite XEB scores in this problem can be easily "spoofed" by foregoing exact simulation of the implemented circuit and using a classical algorithm with fewer resources, similar in spirit to the algorithm introduced in Ref. [100].For the circuits studied in Fig. 5 of the main text, containing only a single layer of gates on the hypercube, there is only a single round of CNOTs connecting the two 2 D−1 -block partitions; thus, removing them from the circuit and sampling from the two independent halves might not decrease the XEB substantially while reducing the memory requirement to 8 2 D−2 . In ED Fig. 8c, we study the performance of this spoofing attack and find that the obtained XEB rapidly decreases, once additional gate layers are introduced, for a particular extension of our circuit.
The contraction scheme above, utilized both for the ideal simulation and the XEB spoofing, scales exponentially with the number of qubits.However, the exponent is significantly reduced, by utilizing the fact that the hypercube circuits can be naturally partitioned into smaller blocks, with only a single inter-partition layer of CNOT's at the end of the circuit.This simulation method therefore becomes less efficient if we introduce additional CNOT layers (within a single partition) after the inter-partition layer, as we estimate in Fig. 5d.Applying l = {0, ..., D−1} additional intra-partition CNOT layers forces the CNOT tensors in ED Fig. 8b to be blocked into groups of 2 l , which results in the execution time to scale roughly as O(8 2 l /2 l ), where the numerator comes from the tensor contraction complexity and the denominator accounts for the reduced number of contractions due to blocking.The explicit times quoted in Fig. 5d as a function of additional CNOT layers are based on the above matrix-multiplication estimate and fitted such that the depth-1 hypercube time matches 1.44 s, which corresponds to our implementation.In practice, the actual run-times might differ due to hardware and software optimization, and additional factors such as the cost of tensor permutations; however, we expect the general trend to hold.Finally, if the 2 l blocked tensors were to be stored directly, the memory requirement of this approach would grow as 8 2 l+1 , recovering the full 8 2 D memory complexity for l = D − 1.In this work, we use these circuits and XEB results for benchmarking our logical encoding, which requires the ability to simulate these circuits.Future logical algorithm experimentation can explore quantum-advantage [18,47,[105][106][107] tests with encoded qubits, as will be detailed in Ref. [99].

Physical qubit circuit implementations
To compare our logical qubit algorithms with analogous circuits on physical qubits, we work out a concrete implementation of our sampling / scrambling circuits on physical qubits using the same physical gate set, Clifford + T , as used in the logical circuit, which we also then attempt to realize experimentally.We replace each [[8,3,2]] block with a 3-physicalqubit block, decomposing the "in-block" CCZ gates into 6 CNOTs and 7 {T ,T † } gates, and implement "transversal" CNOTs directly between the 3-qubit blocks.We note that the CZ can be compiled into the CCZ implementation, but this has minor effect on our analysis and estimates.These physical circuits are complex: 48 qubits with 48 CCZs and 228 two-qubit gates (as realized with our logical qubits) decomposes into an effective 516 two-qubit gates (384 if the CZ gates are compiled into the CCZs).In trying to implement these circuits in practice, the build-up of coherent errors resulted in a vanishing XEB for our physical circuits.These experiments made it clear the logical circuit equivalent was greatly outperforming the physical circuit, thereby providing direct evidence that our logical algorithm outperforms our physical algorithm for this specific sampling circuit.
More quantitatively, with a concrete physical implementation, we calculate an upper-bound by assuming optimistic performance.We assume our best-measured fidelities: SPAM of 99.4% [8], local single-qubit gate fidelity of 99.91% (ED Fig. 2), two-qubit gate fidelity of 99.55% [8], and T2 = 2s.We then count the total number of entangling gate pulses for the CZ gates, the total number of compiled local single-qubit gates, and the estimated circuit duration, and use this to calculate the estimate presented in Fig. 5f.We further confirm this analysis for small-scale circuit implementations.For a short 3-qubit circuit, we benchmark the XEB for the physical circuit as ≈ 0.87, below the estimated 3-qubit upper-bound of ≈ 0.92.We note that in Fig. 5f we plot estimates of physical qubit fidelity and not XEB, but we expect XEB and fidelity to be closely related as discussed previously.
We note several observations made in comparing physical and logical implementations of these complex circuits.First, empirically it appears that the logical circuit is significantly more tolerant to coherent errors [48,108,109], and understanding the manifestations of this is a subject of ongoing investigation.Specifically, it appears that the logical circuit realizes inherently digital operation, where the small coherent errors do not significantly shift / distort the bitstring distribution, but just reduce the overall fidelity [48,108] (see e.g. the agreement in ED Fig. 7a).This is in contrast to the physical implementation, where coherent errors are seen to dramatically alter the shape of the bitstring distribution, e.g.changing relative amplitudes.Second, we note that we optimize our [[8,3,2]] circuits only by optimizing the stabilizer expectation values and not by optimizing the XEB or two-copy result directly.When running complex circuits, the stabilizers serve as useful intermediate fidelity benchmarks, both for optimizing circuit design and ensuring proper execution, especially in regimes where output distributions or other observables cannot be calculated.Overall, we find that these complex circuits appear to perform significantly better with logical qubits than physical qubits.

Two-copy measurements
A powerful method to extract various quantities of interest are Bell basis measurements between two copies of the same state [21,22,51].First, we use these measurements to cal-Hertz Foundation, the Paul and Daisy Soros Fellowship, and NDSEG.M.J.G. and D.H. acknowledge support from NSF QLCI (award No. OMA-2120757).The commercial equipment used in this work does not reflect endorsement by NIST.
Author contributions D.B., S.J.E, A.A.G., S.H.L., H.Z., T.M., S.E., and G.S. contributed to the building of the experimental setup, performed the measurements, and analyzed the data.M.C., M.K., D.H., J.P.B.A., N.M., I.C., and X.G. performed theoretical analysis.P.S.R. and T.K. developed the FPGA electronics.All work was supervised by M.J.G., M.G., V.V., and M.D.L.All authors contributed to the logical processor vision, discussed the results, and contributed to the manuscript.
Correspondence and requests for materials should be addressed to M.D.L. Extended Data Fig. 1.Neutral atom quantum computer architecture.a, Experimental layout, featuring optical tools including static SLM and 2D moving AOD traps, global and local Raman single-qubit laser beams, 420-nm and 1013-nm Rydberg beams, and imaging system for both global and local imaging.b, Level structure for 87 Rb atoms, with the relevant atomic transitions employed in this work.c, Control infrastructure used for programming quantum circuits, featuring several arbitrary waveform generators (AWGs).In particular, the moving and Raman 2D AODs are each controlled by two waveforms (one for x axis and one for y axis).An additional AWG is used in first-in-first-out (FIFO) mode for rearrangement before the circuit begins, and then the moving AOD control is switched to the Moving AWG.See Ref. [30] for additional SLM and pre-circuit rearrangement details, Ref. [8] for additional Rydberg AWG details and Rydberg excitation details, Refs.[7,62] for additional Raman laser and microwave control infrastructure details, and Ref. [7] for additional moving AWG details.All AWGs (other than rearrangement AWG) are synchronized to < 10 ns jitter.During Rydberg gates the traps are briefly pulsed off by a TTL.The FPGA processes images from the camera real-time and in this work sends control signals to the Raman 2D AOD for local single-qubit control.d, Example array layout featuring entangling, storage, and readout zones.Zones can be directly reprogrammed and repositioned for different applications, as well as specific tweezer site locations.Tweezer beams and local Raman control are projected from out-of-plane.The entire objective field-of-view is 400-µm diameter, and consequently we do not expect or observe substantial tweezer deformation near the edges of our processor.During two-qubit Rydberg gates, we place atoms ≲ 2 µm apart within a gate site, and gate sites are separated such that atoms in different gate sites are no closer than 10 µm during the gate.At our present n = 53 and two-photon Rabi frequency of 4.6 MHz, the blockade radius is roughly 4.3 µm, such that adjacent atoms are well-within blockade and distant atoms are well-outside blockade.Extended Data Fig. 3. Midcircuit readout and feedforward.a, Single-shot 500 µs local image in the readout zone, where the peak corresponds to roughly 50 photons collected by the CMOS camera.b, Atomic transition and pulse sequence used for local imaging of ancilla qubits.The data qubit trap light shift suppresses data qubit errors, in addition to the large spatial separation between entangling and readout zones.We avoid quickly losing the readout zone atoms during local imaging by using a 5x higher trap depth, and we pulse the ancilla qubit traps and local imaging light to image directly on resonance while avoiding negative effects of large trap light shifts.c, Diagram of components involved in midcircuit readout and feedforward steps.Atom detection and logical state decoding occur using the FPGA, which then outputs a conditional TTL to gate local Raman pulses performed on logical qubits in the entangling zone.d, Diagram of approximate timings for a midcircuit feedforward cycle.First, F = 2 population is pushed out (in 10 µs), and then the remaining F = 1 population is imaged locally for 500 µs.The 24 rows of pixels covering the readout zone are read out to the FPGA in 200 µs, after which processing is performed.Finally, a conditional TTL output based on the decoded state gates on or off local Raman pulses.The whole readout and feedforward cycle takes less than 1 ms, and can be sped up in the future by optimizing local imaging and camera readout.e-g, Characterization of error probability of data qubits during local imaging.e, Data qubit error probability (fraction of population depumped from F = 2 to F = 1) as a function of local imaging duration out to 20 ms to quantify the effect of the local imaging beam on data qubit coherence for very long illumination.f, Data qubit error probability after 20 ms of local imaging, as a function of detuning of the local imaging beam, showing suppression of error both red-or blue-detuned from the data qubit transition.g, Equivalently, increasing the trap depth of the data qubits enables suppression of decoherence due to the local imaging beam.Since qubits in the readout zone are imaged while their traps are pulsed off, any light shift of the data qubit transition from the traps contributes directly to the relative detuning.h, For a long 10.5 ms local beam illumination with optimal local imaging parameters, we observe a 0.7(1)% increase in data qubit error during an XY8 dynamical decoupling sequence.This suggests a roughly 0.034(5)% error probability for the data qubits during the 500 µs midcircuit readout image employed in this work.to the theoretical values from empirically chosen error rates (experiment average = 77%, theory average = 82%).Note that X basis logical 1 and Z basis logical 2 have higher stabilizer error probability due to the error propagation in the transversal CNOT (reducing expectation values relative to if the transversal CNOT is not performed).f, Using the empirical error rates that correspond to data-theory agreement for the measured stabilizers in e, our simulations for improvement in Bell pair error, as a function of code distance, are in good agreement with experiments.The empirical error rates used are consistent with the 99.3% two-qubit gate fidelity, measured for this larger array, as well as the roughly 4% data qubit decoherence error (integrated over the entire circuit and measured by Ramsey method).These dephasing error rates are dominated by a complex moving sequence as we prepare the two surface codes in a serial fashion (see Supplementary Movie), and would be significantly smaller for a repetitive error correction experiment.
Extended Data Fig. 7.Additional [ [8,3,2]] circuit sampling data.a, Overlap of error-detected 12-qubit sampling data with the theoretical distribution (same data as fully error-detected case in Fig. 5b).Progressive zoom-in's show the agreement between theory and experiment, down to the level of 10 −4 probability per bit string.This error-detected data set is composed of 23,545 shots (raw data set is 138,626 shots).Note that we simultaneously measure on two groups of 12 logical qubits; plotted here is only one of the two 12-logical groups with an XEB of 0.69(1), while in plots Figs.5e,f and ED Fig. 7b we average the two logical groups, which gives a measured XEB of 0.616 (7).b, Same data as Fig. 5f of Main Text but with purity (orange), as measured by two-copy measurement, additionally plotted.The measured XEB is slightly below the measured purity, providing evidence that XEB is a faithful fidelity proxy.We further note that under error detection, the logical XEB for these IQP circuits should be a good fidelity proxy.Interestingly, the behavior can be different for the raw, uncorrected data, as the circuit we apply on the physical level is not IQP.Without applying error detection, not all errors are logical errors and therefore the circuit differs from IQP behavior and can lend itself to a different scaling.For systems of 3, 6, and 12 logical qubits, multiple systems are measured in parallel and their results are averaged together.We note that although our preparation of [[8,3,2]] code states makes these states on a cube, it does not have CNOTs between two pairs of qubits in the first step and, therefore, does not have the full gate connectivity of a cube.Instead, one can interpret these CNOTs as having been included but then compiled away as they commute with the state.We neglect this in plotting our physical qubit connectivity, which is derived from entangling 3D cubes on a 4D hypercube connectivity, realizing a 7D hypercube.c, 48-qubit XEB sliding-scale error-detection data.The point with full postselection on all stabilizers being perfect returned only 8 samples, so we omit this point from the Main Text plot for clarity.0).The separation between the histograms improves as more postselection is applied.b, Signal-to-noise (purity divided by statistical uncertainty of purity) as a function of sliding-scale error detection (converted into accepted fraction), for the 12 logical qubit two-copy measurements, where subsystem size 1 indicates a single logical qubit in one copy, and subsystem size 12 indicates all logical qubits.For subsystem size 1, the signal-to-noise ratio gets worse as data is discarded, since the signal does not change (maximally mixed) but the number of repetitions decreases.In contrast, for the global purity, the signal-to-noise increases as near-unity purities are faster to measure [111].c,d, Entanglement entropy when analyzing the circuit as a physical Bell basis measurement as opposed to a logical Bell basis measurement.For logical entanglement entropy calculations we average over all possible subsystems of that given subsystem size, which we find behaves very similarly to e.g.contiguous subsystems due to the highdimensional hypercube connectivity.In the physical qubit entanglement entropy calculations, we randomly choose from the possible subsystems as there are many.c, 6 logical (16 physical) qubits per copy; d, 12 logical (32 physical) qubits per copy.The finite sampling imposes a noise floor for very high entanglement entropy values.e, Entanglement entropy measurements, as in Fig. 6b of main text, but as a function of logical subsystem size.f, Logical circuits used for benchmarking magic.For 1 CCZ, we include U1 and omit U0; for 2 CCZ, we include U0 and omit U1; for the 3 CCZ, we include both U0 and U1.

5 FIG. 2 .
FIG. 2.Transversal entangling gates between two surface codes.a, Illustration of transversal CNOT between two d = 7 surface codes based on parallel atom transport.b, The concept of correlated decoding.Physical errors propagate between physical qubit pairs during transversal CNOT gates, creating correlations that can be utilized for improved decoding.We account for these correlations, arising from deterministic error propagation (as opposed to correlated error events), by adding edges and hyperedges that connect the decoding graphs of the two logical qubits.c, Populations of entangled d = 7 surface codes measured in the XX and ZZ basis.d, Measured Bell pair error as a function of code distance, for both conventional (top) and correlated (bottom) decoding.We estimate Bell error with the average of the ZZ populations and the XX parities (Methods).To reduce code distance we simply remove selected atoms the grid, as shown on the right, ensuring unchanged experimental conditions (for d = 3, four logical Bell pairs are generated in parallel).Error bars represent standard error of the mean.See ED Figs.4,5for additional surface code data.

FIG. 3 .
FIG.3.Fault-tolerant logical algorithms a, Circuit for preparation of logical GHZ state.Ten color codes are encoded non-fault-tolerantly (nFT), and then parallel transversal CNOTs between computation and ancilla logical qubits perform FT initialization.The ancilla logical qubits are moved to storage, and a 4-logical-qubit GHZ state is created between the computation qubits.Logical Clifford operations are applied before readout to probe the GHZ state.b, State-preparationand-measurement (SPAM) infidelity of the logical qubits without (nFT) and with (FT) the transversal-CNOT-based flagged preparation, compared to physical qubit SPAM.c, Logical GHZ fidelity without postselecting on flags (nFT), postselecting on flags (FT), and postselecting on flags and stabilizers of the computation logical qubits, corresponding to error detection (EDFT).d, GHZ fidelity as a function of sliding-scale error detection threshold (converted into the probability of accepted repetitions) and of number of successful flags in the circuit.e, Density matrix of the 4-logical-qubit GHZ state (with at most 3 flag errors) measured via full state tomography involving all 256 logical Pauli strings.

FIG. 4 .
FIG. 4. Zoned logical processor: scaling and midcircuit feedforward.a, Atoms in storage and entangling zones, and approach for creating and entangling 40 color codes with 280 physical qubits.b,c, 40 color codes are prepared with an nFT circuit, and then 20 transversal CNOTs are used to fault-tolerantly prepare 20 of the 40 codes, whose fidelity is plotted.Logical decoherence is smaller than the physical idling decoherence experienced during the encoding steps.d, Mid-circuit measurement and feedforward for logical entanglement teleportation.The middle of three logical qubits is measured in the X-basis, and by applying a midcircuit conditional, locally pulsed logical S rotation on the other two logical qubits, the state |0L0L⟩ + |1L1L⟩ is prepared.e, Measured logical qubit parity with and without feedforward, showing that feedforward recovers the intended state with Bell fidelity of 77(2)% (ZZ parities of 83(4)% not plotted, Methods).No mid-circuit refers to turning off the mid-circuit readout, and postselecting on the middle logical being in state |+L⟩ in the final readout.By postselecting on perfect stabilizers of only the two computation logicals (error detection in the final measurement) the feedforward Bell fidelity is 92(2)% (not plotted).In d three of the additional blocks are flag qubits and the other four are prepared but unused for this circuit.

1 Extended Data Fig. 2 .
Single-qubit Raman addressing.a, 5S 1/2 hyperfine level diagram illustrating the two possible implementations of local single-qubit gates: resonant X(θ) (purple) and off-resonant Z(θ) (turquoise) rotations with twophoton Rabi frequencies ΩRaman.In this work, we use the Z rotation scheme and are blue-detuned by 2 MHz from the two-photon resonance.Due to Clebsch-Gordan coefficients, Ω Z Raman = − √ 3Ω Z Raman .b, Schematic showing the conversion of local Z(π/2) into local X(±π/2) gates, where the pulses before (after) the central Y (π) have positive (negative) sign, while leaving non-addressed qubit states unchanged.The Gaussian-smoothed local pulses have duration 2.5 µs for π/4 pulses and 5 µs for π/2 pulses, and are performed on single rows at a time with a 3 µs gap between subsequent gates to allow the RF tones in the AODs to be changed (including this, duration is 5-8 µs per row).In this way, arbitrary patterns of qubits, such as the example drawn, can be addressed.c, Calibration procedure used to homogenize the Rabi frequency over a 220 µm × 35 µm array.The position calibration is illustrated for 80 sites: approximate X(π/2) gates are locally performed and the horizontal/vertical position of all tones is scanned in parallel such that a Gaussian fit returns the optimal alignment.After this, powers are iteratively calibrated until the fitted scale factors for the individual RF tones converge to unity.d, Single-qubit randomized benchmarking of local Z(π/2) gates.The local gates are interleaved with random global single-qubit Clifford gates and the final operation C f is chosen to return to the initial state.Each data point is the average of 100 random sets of Clifford gates, and fitting an exponential decay to the return probability quantifies the fidelity F per local gate.Note that we apply all 51 global Clifford gates for each data point, such that errors from the global Clifford gates (in addition to SPAM errors) do not contribute to the fitted value.

1 Extended Data Fig. 4 .
Additional surface code data.a, Depiction of Bell state circuit and d = 7 surface codes.b, Diagram showing the transversal CNOT and physical error propagation rules.c, Covariance of the 48 measured stabilizers in both bases.The correlations near the diagonal corresponds to adjacent stabilizers within each block.Strong correlations are also observed with the stabilizers of the other block due to the error propagation in the transversal CNOT.d, Bell pair infidelity upper bound (as opposed to estimated Bell pair error in Fig. 2d of Main Text, see Methods text), showing improvement with increasing code distance.e, Probability of no detected error for each of the 96 measured stabilizers, showing agreement when compared -noise ratio (SNR) Extended Data Fig. 9.Additional Bell basis measurement results.a, Histogram of |tr(P ρ)| 2 for all 4 6 Pauli strings P in the 6 logical qubit circuit, as a function of stabilizer postselection threshold (i.e.number of correct stabilizers across the 6x2 logical qubits).Blue (red) indicate Pauli strings that are expected to have |tr(P ρ)| 2 = 0.0625 (