Mid-circuit operations using the omg-architecture in neutral atom arrays

We implement mid-circuit operations in a 48-site array of neutral atoms, enabled by new methods for control of the $\textit{omg}$ (optical-metastable-ground state qubit) architecture present in ${}^{171}$Yb. We demonstrate laser-based control of ground, metastable and optical qubits with average single-qubit fidelities of $F_{g} = 99.968(3)$, $F_{m} = 99.12(4)$ and $F_{o} = 99.804(8)$. With state-sensitive shelving between the ground and metastable states, we realize a non-destructive state-detection for $^{171}$Yb, and reinitialize in the ground state with either global control or local feed-forward operations. We use local addressing of the optical clock transition to perform mid-circuit operations, including measurement, spin reset, and motional reset in the form of ground-state cooling. In characterizing mid-circuit measurement on ground-state qubits, we observe raw errors of $1.8(6)\%$ on ancilla qubits and $4.5(1.0)\%$ on data qubits, with the former (latter) uncorrected for $1.0(2)\%$ ($2.0(2)\%$) preparation and measurement error; we observe similar performance for mid-circuit reset operations. The reported realization of the $\textit{omg}$ architecture and mid-circuit operations are door-opening for many tasks in quantum information science, including quantum error-correction, entanglement generation, and metrology.


I. INTRODUCTION
Quantum state initialization and measurement are essential tasks in quantum information science [1].In many NISQ-era experiments, these operations bookend an experiment, e.g. in a finite depth quantum circuit, studying a many-body Hamiltonian for quantum simulation, or integrating a phase from a signal Hamiltonian for metrology [2,3].However, it can be desirable that measurements, as well as the dissipative operations that are common to state initialization, are interleaved "mid-circuit" with coherent operations.This capability is especially powerful when performed in a partial fashion, that is, in a manner which leaves a subset of qubits -"data qubits" -unperturbed by the operations applied to its complement, the "ancilla qubits".Salient areas where these socalled mid-circuit operations are enabling include quantum error correction, measurement-based quantum computing, metrology, entanglement generation, and quantum simulation, to name a few [4][5][6][7][8][9][10][11][12][13].
With many developing quantum science platforms -such as superconducting qubits, trapped ions, and neutral-atom arrays -the realization of high-fidelity mid-circuit operations (MCOs) is a key focus [14][15][16].Within the superconducting qubits and trapped ion architectures, high fidelity mid-circuit measurement has facilitated state teleportation, quantum error correction, and the generation of topologically-ordered entangled states [17][18][19][20][21][22].Meanwhile, mid-circuit qubit reset and reuse can decrease resource overhead and increase circuit fidelity, reducing the number of physical qubits and entangling gates needed to execute algorithms [23,24].In trapped ions, mid-circuit cooling of the motional modes is * adam.kaufman@colorado.eduemployed to attain high two-qubit gate fidelities [18,19] and can aid in correcting bit-flip errors [25], while on the superconducting platform the reset alleviates leakage errors [26] and enables implementation of autonomous error-correction [27].
For neutral atom arrays as well as trapped ions, midcircuit operations can be particularly challenging.This is because operations like fluorescence detection, optical pumping, and laser cooling often involve illuminating atoms with near-resonant light, during which an accidental scattering of a single photon can destroy quantum information stored in internal states.Accordingly, the central goal is to devise methods to protect data qubits during these resonant operations.In trapped-ion systems, mid-circuit operations have been performed using additional atomic species, qubit shuttling, and long-lived shelving states [17,19,[28][29][30].
It is only within the past year that mid-circuit qubit readout has been demonstrated in neutral atoms arrays.In a cavity-based approach, two atoms were transported sequentially into the waist of a cavity for statedetection [31].In a dual-species scheme, the frequency selectivity of atomic transitions enabled one atomic species to be measured, and the measurement outcome was fed-forward as a phase correction to the second atomic species [32].Finally, in the third approach, through local light-shifting in an alkali-atom qubit array, a single data qubit was selected and shelved into a state dark to the imaging light, albeit where the field sensitivity and the hyperfine structure were key challenges [33].
The two latter approaches rely on the data qubits being stored in states dark to the measurement operation.This capability also arises in the optical-metastable-ground state qubit (omg) architecture (fig.1(a)), where the quantum information is encoded in either of the three qubit manifolds: optical o, ground g and metastable m.Within this architecture, quantum information can be coherently transferred between the manifolds, with certain (possibly mid-circuit) operations acting only on one of the manifolds.While the concept of omg originally surfaced for trapped ions systems [34][35][36][37], tweezer-trapped alkaline-earth-like atoms such as ytterbium-171 ( 171 Yb) are also ideal candidates for this architecture [38][39][40].For applications in quantum information science, the omg architecture pairs well with already demonstrated features of 171 Yb, including efficient preparation of lowentropy arrays, fast, high-fidelity single qubit gates, nondestructive state detection, as well as Rydberg-mediated two-qubit gates [38,39,[41][42][43].Indeed, in very recent related work, detected leakage from the metastable states was used to improve post-selected performance [44], as well as facilitate mid-circuit erasure conversion [43].
In this work, we demonstrate full control of the omg architecture in 171 Yb and exploit its features to realize MCOs, including both measurements and resets, in a tweezer array of 48 sites.Here, the two Zeeman levels in each of the g and m manifolds serve as the nuclear spin qubit basis with |0 ≡ |m F = +1/2 and |1 ≡ |m F = −1/2 , such that the states available to the atom are |{g, m}, {0, 1} (fig.1(a)).Within g and m, we perform single qubit rotations on the nuclear spin qubit via optical Raman transitions, using beams globally illuminating the atom array, with single-qubit gate fidelity of F g = 99.968(3)% and F m = 99.12(4)%.In both manifolds, we observe coherence times of many seconds, due to an absence of coupling between the nuclear and electronic spin [38,39,43].Further, we demonstrate global and local control of the optical qubit with single-qubit fidelity of F o = 99.804(8)% for global operations.We exploit the optical qubit for rapid, high-fidelity shelving operations between the g and m manifolds, and describe a new method that minimizes recoil heating from the shelving.With rotations on the σ − -clock transition, we turn |g, 0 dark to the imaging light and reinitialize it afterwards in g.We distinguish the two spin states with detection fidelities of P |g,0 = 98.6(2)% and P |g,1 = 99.4(1)%,successfully reinitializing 97.4(3)% and 99.0(2)% of |0 and |1 atoms in the process, leaving them at low temperatures for further operations.
With the addition of light-shifting tweezers, we realize high-fidelity atom-selective shelving that enables MCOs.In protocols of approximately 20 ms duration, we demonstrate mid-circuit state-readout of the ancilla qubits, and, in a separate experiment, reset of the ancillas' spin and motional degrees of freedom via Raman-sideband cooling.For ground-state qubits, these operations preserve the state of data qubits at the 95% level, with a realistic path to > 99% performance.Emphasizing the versatility of this approach, we further show how these tools can be used to implement mid-circuit measurement on the metastable qubit.

II. EXPERIMENTAL APPARATUS
To prepare arrays of 171 Yb, we use an apparatus previously described in [38].For MCO, our basic strategy is to realize site-resolved shelving operations of data qubits into the metastable space, and then perform operations on the ancilla qubits in the ground-state space by applying near-resonant light to the 3 P 1 states (fig.1(b)).Accordingly, successful protection of the data qubits relies on (1) the fidelity of the local shelving operation, i.e. clock rotations, and, (2) that the time for ground state operations, such as atom detection, must be short compared to the decay time of qubit coherence in the metastable space.We implement several significant experimental upgrades to realize this scheme and satisfy these constraints.
First, we add an optical tweezer trapping potential at 759 nm (fig.1(c,d)).At this wavelength, the polarizabilities for |g, {0, 1} and |m, {0, 1} are equal ("magic" condition), eliminating tweezer-depth-dependent light shifts and thus improving control of the clock transition [3,45].The tweezer array geometries are generated by reflecting the 759 nm beam from a spatial-light-modulator (SLM), which imprints a programmable phase pattern onto the light.By subsequently focusing the beam through a 0.6 NA microscope objective, the phase information is translated into an intensity pattern of our choice (2 × 24 tweezer array for these experiments) [46,47].
Secondly, we implement a fast, high-fidelity and lowloss scheme for imaging on 1 S 0 ↔ 3 P 1 in 759 nm tweezers.For the transition to | 3 P 1 , F = 3/2, m F = −1/2 , we find a ≈17 • angle between the quantization axis and the tweezer light polarization (along x), where the differential polarizability of the ground and excited states vanishes [48].This magic condition decouples scattering and cooling rates from the atom position within the trap, minimizing loss during imaging.To image and cool, we address the atoms with two beams red-detuned from the resonance, with a net k-vector that has projection along all trapping axes.With that, in 3.5 ms we collect ≈20 photons per atom and focus them onto an Electron Multiplying Charge-Coupled Device (EMCCD) camera (fig.1(c)).We distinguish an atom and a vacancy with ≈99.8% fidelity, while losing 0.19(2)% of atoms per image, predominantly due to Raman scattering of 759 nm photons to 3 P 2 -a state anti-trapped at 759 nm.
Preparation of motional ground state aids the fidelity of operations on the clock transition.As such, we realize improved gray-molasses cooling (GMC) and Ramansideband cooling in 759 nm tweezers, initializing the atom in n ≈ 0.05 motional state within 4 ms.Additionally, the combination of GMC and blue-shielding [38,49], allows us to load single atoms into 759 nm tweezers with up to 80% efficiency.
With the ability to perform fast detection and groundstate cooling in magic-wavelength tweezers, we can apply clock light at 578 nm to drive rotations on the optical qubit (fig.1(d)).We operate in the regime where the clock Rabi frequency Ω o /(2π) ≈ 0.11 MHz, is much larger than the radial trapping frequency ω/(2π) = 9.5 kHz [50].
Here, the population transfer between g and m occurs with high fidelity, reduced sensitivity to atomic motional state and at speeds comparable to those of our single qubit gates [38,40].Depending on the experiment, we use circular or linear polarizations (with the quantization axis along z or x) that respectively drive a σ − transitions (|g, 0 ↔ |m, 1 ) or a π transitions |g, i ↔ |m, i for i ∈ {0, 1}).For pulse lengths of π/Ω o , these rotations constitute shelving operations denoted here as S 1 and S 0 respectively (fig.1(b)).During S 0 , the quantization axis is defined by a 1.5 G magnetic field, which splits the nuclear spin qubits by δ g = 1.1 kHz and δ m = 1.7 kHz.For S 1 , we increase the field to 32 G, to provide additional frequency selectivity for the σ − transition.For shelving operations, we operate with Ω o /(2π) ≈ 80 kHz.
To achieve atom-resolved control of the optical qubit, we employ 532 nm tweezers generated with acoustooptic-deflectors (AODs) (fig.1(c,d)).These tweezers are used for local light-shifting operations L, that take the clock transition out-of-resonance for selected sites (fig.1(b)).The resultant site-selective shelving between g and m allows for single-qubit gates, measurement and reset operations to gain local character.
Lastly, we add the capability to perform global singlequbit operations in both g and m nuclear spin manifolds.Following the scheme outlined in our prior work [38], we realize an R X nuclear qubit rotation by driving an optical Raman transition via an intermediate state ( 3 P 1 for g and 3 D 1 for m).Here, a single beam of circular polarization propagating perpendicular to the quantization axis provides all necessary components of the Raman transition while benefiting from motional-state insensitivity and the intrinsic phase stability.To drive an R Z qubit rotation, we employ a beam of the same wavelength and polarization but propagating along the quantization axis, which induces a light shift between the qubit states.Due to the symmetry between the two beams (QB1,2), we can control whether a beam performs R X or R Z rotation with the direction of the quantization axis.To minimize Raman scattering from the qubit beams, we operate at large detunings with ∆ g /(2π) = −5.8GHz and ∆ m /(2π) = +1 GHz (from 3 P 1 , F = 1/2 and 3 D 1 , F = 3/2 respectively).

III. CONTROL OF THE OMG ARCHITECTURE
The nuclear qubit is initialized in the |g, 0 state, by optically pumping on the |g, [38].A subsequent shelving operation can then change the qubit manifold to m if desired.We detect the nuclear spin state following two approaches: (1) ejecting atoms in |g, 0 from the traps through rapid driving on the stretched transition |g, 0 ↔ | 3 P 1 , F = 3/2, m F = +3/2 [38]; or (2) hiding |g, 0 from (or exposing |m, 1 to) imaging light through S 1 shelving operation.The results for the non-destructive approach are presented in sec.IV.
Figure 2(a) presents the characterization of the average single-qubit gate fidelity for g and m with Clifford randomized benchmarking (RB) [51].The Clifford gates are compiled from native gates, X ≡ R X (π/2) and Z ≡ R Z (π/2), through a software package pyGSTio [52], with ≈3.5 native gates per Clifford gate [38,39,52].The gate sequences of varying lengths are then applied to atoms and their measured final state is compared to the ideal outcome; for each circuit depth, forty random Clifford strings are generated, with ideal outcome ran-domized between |0 and |1 .Single qubit fidelities are extracted from fits to the success probability as a function of circuit depth, revealing F g = 99.968(3)% and F m = 99.12(4)%.We also analyze RB data site-wise, revealing homogeneous fidelities across the array, the spread being consistent with statistical variation.The error sources are discussed in Appendix D.
Next, we compare the nuclear qubit coherence in the g and m manifolds in a Ramsey-type experiment (fig.2(b)).With an X-gate acting on |g, 0 , we prepare a |1 y = 1 √ 2 (|0 − i|1 ) superposition in g, and subsequently apply S 0 to half of the atoms, shelving those qubits into m.After variable dark time T , we bring the qubits back to g and complete the Ramsey sequence for both qubit subsets with another X-gate.We scan the phase φ accumulated between |0 and |1 and record the contrast of the resultant fringe.The decay at short times of the extracted coherences are consistent with T * 2,g = 12(2) s and T * 2,m = 7.2(6) s, where the timescale for the metastable qubit is limited by additional decay mechanisms.
Finally, we characterize the control of the optical qubit and shelving operations.The optical qubit is initialized in |g, {0, 1} and the state-readout is performed by measuring the |g, {0, 1} population, while the |m, {0, 1} population is dark to the imaging light ( 1 S 0 ↔ 3 P 1 ).A major detection error here is the dark-to-bright state leakage due to Raman scattering of 759 nm photons: 3 P 0 → 3 S 1 → 3 P 1 , which then decays to 1 S 0 [53].While at the trap-depths employed for qubit operations (U/h = 230 kHz), this scattering rate is 0.05(1)s −1 , for the trapdepths employed in imaging (U/h = 8.7 MHz), that rate increases to 2.0(4)s −1 .If the atom decays to the ground state and scatters enough collected photons to cross the detection-threshold, an error will occur.
Similar to the nuclear spin qubit, we perform RB and extract F o = 99.804(8)%average fidelity of single-qubit operations in the o manifold (fig.2(c)).Here X and Z gates, realized with π/2 clock rotations on the σ −transition and 90 • laser phase jumps respectively, are used to compile the Clifford gates, with ≈ 1.7 X gates per Clifford gate.The observed error rate is consistent with the calculated error per Clifford gate present in Ω o ω regime (see Appendix D).This error arises from off-resonantly driving multiple motional sidebands [50,54] and reduces with increasing the Ω o /ω ratio [38].We also note that π-polarization impurity present in the clock drive would manifest as a non-Markovian error, which is not appropriate for RB characterization.We estimate this effect to contribute errors an order of magnitude smaller than the motional errors.
We characterize the performance of local optical qubit rotations by performing RB for o in the presence of lightshifting tweezers applied to half of the array.For the non-light-shifted subset of sites, we observe an optical qubit fidelity of F L o = 99.53(4)% per Clifford gate, the additional error likely arising due to finite overlap with diffracted or scattered 532 nm light; similar level of performance for local optical qubit operations was observed in recent work [55].We also analyze the suppression of clock rotations for the light-shifted sites, extracting 0.27(2)% suppression error per Clifford gate applied to the other subset of sites.Since we operate in the Ω o ω regime, our measured coherence timescales of the optical qubit are on the scale of 2π/ω, due to coupling of the motional-and spin-states of the atom.In addition, the local clock operations are constrained to cases when the qubits on light-shifted sites are either in g or m, since otherwise the light-shift operation would destroy any coherences.
For MCOs, we employ the above methods for rapid shelving operations between the ground and metastable manifolds.An imperfect shelving operation will leave a small atom population ( S ) in the original manifold.The major source of this error is the already mentioned motional effect: a clock π-pulse excites a superposition in the motional degree of freedom while off-resonantly driving motional sidebands (fig.3(a)).Since these are coherent effects, for a single tweezer, one can always find a 2nπ/ω wait time between two shelvings (for integer n) for which S is minimized (ignoring trap anharmonicity).However, the distribution of trapping frequencies among the tweezers in the array makes the above approach unfeasible.For wait times of the order of few ms, the coherent effects average-out leading to S > 1% (fig.3(c)).We reduce this error 5-fold with a motional-state preserving pulse (MPP), a composite pulse sequence which controls the motional degree of freedom during the shelving operation.The MPP consists of two consecutive CORPSE (Compensation for Off-Resonance with a Pulse SEquence) pulses [56], each realizing a target 90 • rotation on the clock transition (fig.3(b)).The origin the improvement in the shelving performance for the MPP becomes clear while looking at the evolution in the x − p phase space of the trap harmonic oscillator (fig.3(d)).For a π-pulse the motional state is coherently displaced away from the origin, while MPP traces a closed loop, with the state arriving back at the origin at the end of the pulse sequence.We note that related ideas are used in trapped-ion two-qubit gates to remove spin-motional entanglement [57].We assess the MPP performance by looking at the average number of motional quanta n, accessible to us through sideband spectroscopy, as a function of the number of shelvings applied (fig.3(e)).We find that the atoms are heated 20-times less with MPP compared to a single π-pulse.

IV. CLOCK-BASED NON-DESTRUCTIVE STATE-READOUT OF 171 YB
The omg architecture in 171 Yb naturally enables nondestructive state read-out, in which the state of the nuclear spin qubit is determined in a manner that does not depend on destruction of one spin component [58], as is often done [38,39,[59][60][61][62].The ability to reuse the measured qubits can significantly improve experimental dutycycle, which is key for high precision experiments, and can also improve the resilience of atomic clocks against local oscillator noise [63][64][65][66].Similarly, in quantum errorcorrection protocols, it is desirable to salvage measured ancilla qubits so that they may be recycled for subsequent code cycles.The potential benefits of non-destructive state detection have motivated multiple demonstrations in neutral atom arrays [67][68][69][70][71][72], including nuclear spin qubits of 87 Sr and very recently 171 Yb [42,58].In this work, using high-fidelity shelving operations, we demonstrate clock-based non-destructive nuclear-qubit detection with low loss, and we identify clear steps to improve the scheme to >99%.Importantly, compared to alkali demonstrations employing repeated scattering on cycling transitions, our methods leave the temperature of the measured qubits <10 µK, so that they may be readily used for subsequent operations.
Figure 4(a) shows the outline of the procedure.We start by preparing a qubit in the g manifold in |ψ = cos θ 2 |0 − i sin θ 2 |1 state.We then apply an S 1 shelving operation and take an image.Since |g, 0 population is shelved into |m, 1 , it appears dark, while the |g, 1 population appears bright.Subsequently, we perform a reset, bringing the shelved population back to g, and take a second image to assess whether the atoms were reinitialized in the ground state at the end of the procedure.Figure 4(d) shows typical measurement outcomes for the two images.
We explore two schemes for performing reset: (1) a sequence of global operations and (2) a local feed-forward approach [32,42], which each have benefits depending on experimental aims.In the former (fig.4(b)), the atoms measured in the bright state are reinitialized in |g, 1 through optical pumping followed by a R X (π) rotation.Alternatively, in the second reset scheme (fig.4(c)), we use processed information from the first image to apply a local light-shift onto sites that were detected bright.In both cases, a subsequent S 1 operation addresses only the atoms that appeared dark in the first image, resetting all into g.The two reset schemes suffer from errors that may leave atoms in m at the end of the sequence.As such, to distinguish these errors from atom loss from traps, we include an additional repumping step through 3 D 1 before the second image.
To assess detection fidelities of correctly identifying |0 as dark and |1 as bright, we independently prepare and measure each spin state (fig.4(e)), and extract P |g,0 = 98.6(2)% and P |g,1 = 99.4(1)%while postselecting on atom survival at the the end of the sequence.The analysis method and infidelity contributions are presented in detail in Appendix F and Table I.For the |0 state, the major error sources include Raman scattering of 759 nm photons in deep traps during imaging and shelving error, while the P |g,1 is mainly limited by polarization impurity of the clock drive.
We also compare the probabilities for successfully resetting the atoms to g for the two schemes employed (see Appendix F and Table I).The global approach, with atoms repumped at the end of the sequence, performs the best, preserving p |g,0 = 97.4(3)%and p |g,1 = 99.0(2)% of the two populations.The losses here are dominated by vacuum lifetime and Raman scattering to anti-trapped 3 P 2 .With future technical improvements, we project that reset probabilities of {99.1%, 99.9%} for {|0 , |1 } are within reach, which would be on par with the stateof-the-art [72].For some applications, repumping may not be desireable (e.g. if the data qubit is being stored in m at the same time).We find that without repump the feed-forward approach is better at resetting |g, 1 population back to g.However, due to errors stemming from detection infidelity in image 1 and Raman scattering during image-processing time, this method resets a smaller fraction of |g, 0 atoms at the same time.1)% contrast are performed for AQ and DQ, respectively.The state-readout for AQ and DQ is non-destructive, retaining ≈94% of atoms at the end of the sequence.For all panels, no corrections are applied to the data nor to the reported contrasts; see text for an explanation of SPAM and errors.

V. MID-CIRCUIT OPERATIONS
Equipped with the capabilities offered by the omg architecture, we realize mid-circuit operations (MCOs) on this platform.We divide our system into two subsets of ancilla (AQ) and data qubits (DQ), and perform operations on the ancilla qubits, while preserving the coherences stored in the data qubits.Figure 5(a) presents the schematic diagram of our procedure.We start by initializing all atoms in a |1 y = 1 √ 2 (|0 − i|1 ) state within the g manifold and follow by a S 0 shelving operation on the data qubits to the m manifold.Subsequently, we perform MCOs on ancillas, including state-sensitive measurement and reset of the spin and motional degrees of freedom, and then unshelve the data qubit.In the reported results, the mid-circuit operations take approximately 20 ms, which reflects the time between shelving and unshelving of the data qubit.We characterize the coherence of the data qubits following the MCOs via a Ramsey-type protocol.Depending on the experiment, we also take a final measurement of ancilla qubits to confirm if the implemented MCO was successful.
In the first experiment, we perform mid-circuit measurements (MCMs) on ancilla qubits (fig.5(b)).In a Ramsey-type experiment, we scan the phase φ accumulated between |0 and |1 and measure a contrast of C AQ MCM = 98.2(6)%.The observed contrast reduction is consistent with known errors (see Table II).The statedependent readout employed here is destructive to the |g, 0 state; this temporary limitation can be relieved with more laser power and separate beams for S 0 and S 1 operations.After the mid-circuit measurement, we follow with a contrast measurement for the data qubit obtaining a raw C DQ MCM = 95.5(1.0)%, which is uncorrected for 2.0(2)% state-preparation and measurement (SPAM) errors.The main contributors to the data qubit contrast reduction are: Raman scattering in deep tweezers during imaging and shelving errors (Table II).
As a separate method to characterize the performance of the MCM, we quantify dephasing, depolarization, and rotation errors through quantum process tomography [73,74] on both the data and ancilla qubits (Appendix I).We reconstruct the MCM process, excluding loss and shelving errors, and find process fidelities F p,DQ = 0.972 (5) and F p,AQ = 0.979 (6) for the data and ancilla, respectively.These process fidelities can be converted into average state fidelities F av that reflect loss and shelving errors [75], for which we find F av,DQ = 0.961(3) and F av,AQ = 0.972(4), consistent with the Ramsey measurements.
The second experiment, mid-circuit reset, consists of two parts: reset of the motional state and reinitialization into the desired nuclear spin qubit state (fig.5(c)).Our demonstration starts with a heating beam that drives the 399 nm 1 S 0 ↔ 1 P 1 transition.A 150 ns pulse is enough to controllably increase the average number of motional quanta to n = 1.3(2), while also creating a mixed state in the spin degree-of-freedom.We then reset the n with a combination of gray-molasses cooling and Raman sideband cooling.A subsequent optical pumping and an X-gate prepare the initial |1 y state of the ancilla.We note that the time required to perform graymolasses cooling, sideband cooling and optical pumping (all in deep tweezers) is 3.8 ms -comparable to the imaging time.After the reset is completed, we perform two separate measurements on the ancilla: Raman sideband spectroscopy to measure n and the ancilla qubit coherence measurement through a Ramsey sequence.With the reset, we observe a reduction in ancilla's temperature to n = 0.26 (6) and increase in the fringe contrast from 12(1)% to C AQ reset = 97.7(5)%.Finally, we record the contrast for the data qubit, following the reset operation, obtaining C DQ reset = 95.2(8)%.The contrast reduction sources are listed in Table II.In addition to the reset operation, we note that the data qubit coherences were also not affected by the heating beam, pointing to the possibility of loading the broad-line magneto-optical trap in the presence of metastable spin qubits for atom replenishing.
The MCO approach described so far assumed g as the computational subspace for the data and ancilla qubits, with the m manifold used exclusively for temporary data qubit shelving.This scheme is favorable for applications where the quantum information is to be stored for longer times, since it mitigates Raman scattering errors inherent to the m manifold.However, a complimentary approach of using m as the computational subspace may be preferred for certain tasks, and its use underlies recently proposed schemes for erasure conversion to improve logical qubit performance [43,76].
We employ the site-selective shelving techniques to realize MCOs also in the m qubit manifold (fig.5(d)), which incorporates elements of the non-destructive statereadout discussed in sec.IV.We start by preparing |ψ = cos θ 2 |0 −i sin θ 2 |1 superposition with Raman rotations on the metastable qubit.An S 1 shelving operation on the ancilla qubit brings |m, 1 population down to g for measurement, while a local light shift L acting on the data qubit shields it from shelving and therefore projection.We scan θ and record Rabi oscillation for the ancilla qubit with C AQ MCM,m = 96.2(8)%contrast.The MCO is concluded with recooling of the imaged ancilla atoms.To check whether coherence of the data qubit was preserved, we apply an X gate to qubits in m and non-destructively measure |m, 1 population, completing a Ramsey-type experiment for the data qubits.The contrast of the Ramsey fringe, recorded by scanning θ, is C DQ MCM,m = 90(1)%.Finally, we repump all atoms to g and measure ≈94% survival of both ancilla and data atoms.The breakdown of the errors for this protocol is presented in Table II, with the Raman scattering being the dominant error source.

VI. DISCUSSION
Moving forward, we can identify several areas in which to improve and expand the MCO performance.Errors from Raman scattering can be nearly eliminated with differential control of the tweezer depths, so that data qubits are kept in shallow traps.Our total shelving error exceeds the theoretical prediction for the motional-state preserving pulse (≈ 10 −4 ) substantially, which will be the subject of future investigation (see Appendix E).To scale to 100s of qubits, we will need roughly 10 times more power with similar phase noise properties, which is likely achievable with newly available fiber-laser products.Further, with modest beam path changes, the reported mid-circuit measurement of g qubits can be made non-destructive using a combination of S 1 and S 0 operations.Accordingly, with realistic upgrades, we expect then that this versatile shelving approach to MCO can reach above > 99% efficacy as well as perform nondestructively for both g and m qubits.
As an alternative to clock rotations, both the shelving and Raman scattering errors might be avoided by leaving data qubits in the ground-state.In this case, it would be possible to use a combination of 3 P 1 light-shifting (i.e. with 680 nm on the 3 S 1 ↔ 3 P 1 transition) and nondestructive spin-detection in the ground-state [42,77] to perform site-selective measurements.This comes at the price of more stringent fractional field stability, as such methods rely on large magnetic fields [42,77].Perhaps, most importantly, using a large field splits the nuclear qubit in such a manner that it is more challenging to operate in a regime where the Rabi-frequency significantly exceeds the qubit frequency [38].Consequently, one must operate in the opposite, more typical regime with slower single-qubit gate operations.In addition, the motional reset via Raman sideband cooling is likely incompatible with 3 P 1 light shifting, since the Raman transition would not be suppressed in the same manner as resonant driving of the 3 P 1 transition.Looking forward, using a combination of 3 P 1 and 3 P 0 light-shifting might be a particularly powerful suite for MCO.
The realization of high-fidelity mid-circuit operations in a neutral atom array, and, in particular 171 Yb, has immediate implications.Neutral atom arrays possess many favorable features for quantum-information processing: single-site addressibility and readout, real-time adjustment qubit connectivity, and tunable range Rydberg interactions [78][79][80][81].The recent realization of the two-qubit entangling gates with fidelities of 99.5% in alkali qubits, and 98% in 171 Yb nuclear-spin qubit, bring neutral atom arrays even closer to implementing faulttolerant computation [43,82].When combined with high fidelity two-qubit gates, the parallel, high-fidelity MCOs demonstrated here pave the way for first realizations of quantum error correction in a neutral atom array.
Mid-circuit operations can also enable protocols that enhance metrology.For Ramsey interferometry in atomic clocks, it is known that mid-circuit measurement can be used to track phase slips and thereby extend the interrogation time for which a Ramsey signal can be inverted for laser frequency correction [6,55,83,84].In this context, the use of sub-ensembles with cascaded interrogation times, potentially incorporating mid-circuit measurement and/or site-resolved clock rotations, can allow an improvement in atom-laser stability that is exponential in the number of sub-ensembles [6,55,[83][84][85].To achieve Heisenberg-limited metrology in the presence of laser phase noise, mid-circuit measurement can be deployed for phase tracking of rapidly evolving Greenberger-Horne-Zeilinger (GHZ) states, while the addition of feedback can be used to preserve the enhanced signalto-noise of squeezed states [7,8,66,86,87].By shelving optical qubit coherence in the nuclear qubit via the tools demonstrated here, these protocols become realizable in an atom array optical clock [65,88,89].In addition, the use of mid-circuit reset could allow for near continuous operation of an optical atomic clock, in a manner that mirrors multi-apparatus clock experiments [64].
Mid-circuit measurement and reset also increasingly play a role in many-body physics.A new class of phase transitions have garnered recent significant interest, where a transition in entanglement scaling is determined by the relative rate of mid-circuit measurements compared to coherent dynamics [9,90,91].Combining the tools demonstrated in this work with Rydbergmediated interactions are one potential path to realizing these models experimentally [80,81,[92][93][94].In a similar vein, the use of mid-circuit reset might open new paths to dissipative preparation of long-range entangled states or even autonomous error correction, in an atom array of 100s of qubits [10,21,25].
Beyond applications enabled by MCO, the MPP-based shelving protocol we report provides a rapid method for repeatedly and locally transferring quantum amplitudes between the g and m manifolds, which has important implications for using the omg architecture for neutral-atom quantum computing.In particular, the single-photon Rydberg transition from the metastable manifold has been the basis of recent demonstrations of high fidelity Rydberg physics and two-qubit gates in alkaline-earth atoms [43,44,[94][95][96].Paired with atom-selective MPP shelving, the two-qubit gates and Rydberg-mediated operations can be locally controlled, and used repeatedly in deep quantum circuits.Meanwhile, untargeted qubits can remain in the g manifold, which is well-isolated from the environment and easily controlled.These methods therefore make it possible to fully exploit the omg architecture, and the flexibility it affords for optimizing different state manifolds for distinct quantum operations.

VII. CONCLUSION
In this work, we have demonstrated control of the omg architecture in neutral 171 Yb atoms trapped in optical tweezer arrays.We characterized the single-qubit ma-nipulation of the ground, metastable and optical qubits, and compared the coherence timescales of the ground and metastable nuclear spin qubits.We have shown nondestructive state-detection, with atom reset aided by local feedback, and mid-circuit measurement and reset, enabled by local shelving operations between the ground and metastable states.We expect that these tools will have manifold applications in quantum science, as well as underlie new technical capabilities, such as site-resolved two-qubit gates.
Note: During completion of this work, we became aware of related studies in 171 Yb from Atom Computing [77].

VIII. ACKNOWLEDGEMENTS
We wish to acknowledge Hannes Bernien, Nelson Darkwah Oppong, Matteo Marinelli, and Ana Maria Rey for a careful reading of this manuscript.We also thank Felix Veitmayer for assistance with FPGA integration in the control system, and Andrew Ludlow for helpful conversations regarding our clock laser system.These  In this work, 171 Yb atoms are trapped in a 2 × 24 tweezer array generated by a spatial light modulator (SLM).The trapping light is at 759 nm, the magic wavelength for the ytterbium clock transition, 1 S 0 ↔ 3 P 0 .Atoms are loaded from a narrowline magneto-optical trap (MOT) at 556 nm ( 1 S 0 ↔ 3 P 1 ) into the tweezers, initially loading several atoms per tweezer.Employing the same transition, we realize light-assisted collisions and leave each tweezer with either 0-or 1-atom occupancy.We achieve enhanced loading through the same scheme as described in our previous work [38], though this time we load into the tweezers at 759 nm instead of 532 nm.We find that the loading scheme achieves a lower loading fraction for similar densities, up to 80%, and demands longer loading times.
After loading the tweezer array, an initial image is taken to identify which tweezers are occupied.With gray molasses cooling followed by Raman sideband cooling, we reduce the atom temperature, initializing the atoms near to the radial motional ground state [38].(see sec.A 3 for details).Finally, the atoms are prepared in the |g, 0 state, with a fidelity of 99.72(5)%, by optically pumping on the 1 S 0 , m F = −1/2 ↔ 3 P 1 , F = 1/2, m F = +1/2 transition.Destructive spin detection in the g manifold is realized by detuning the optical pumping beam to resonantly drive the 1 S 0 , m F = +1/2 ↔ 3 P 1 , F = 3/2, m F = +3/2 transition, thereby heating atoms in |g, 0 out of the traps.The fidelity of this process is 99.91(1)%, with the residual error stemming from a small fraction of |g, 1state atoms being pumped to |g, 0 by the push-out beam.
To minimize Raman scattering of trap light from the clock state, the main experiment is typically conducted in 230 kHz (11 µK) shallow tweezers, with only imaging and cooling performed in 8.7 MHz (0.4 mK) deep tweezers.In the experiments, images are taken to determine which tweezer sites have an atom in the 1 S 0 state following atom manipulations.See sec.H for further details regarding the experimental sequence.

Magic angle and fast imaging
Although 759 nm is a magic wavelength for the clock transition, it is not for the 1 S 0 ↔ 3 P 1 transition, which we use for imaging.To realize fast imaging of the ground state, we find a first-order magic condition for the | 1 S 0 ↔ | 3 P 1 , F = 3/2, m F = −1/2 transition (fig.A1(a)).When the magnetic field (B = 16 G) is tilted by ≈17 • with respect to the tweezer polarization, the perturbation from the tweezers mixes F = 3/2 states [48,97], such that the sensitivity of the transition frequency to trap intensity is reduced to much less than the transition's natural linewidth over the range of trap intensities employed.
In this condition, we perform fluorescence imaging using two non-retroreflected beams, propagating along the axial and the radial direction of the tweezer respectively.Both beams have an intensity of several tens of I sat and are red-detuned by several Γ from the transition.I sat = 0.14 mW/cm 2 and Γ/(2π) = 180 kHz is, respectively, the saturation intensity and natural decay rate of the 1 S 0 ↔ 3 P 1 transition.We find that an imaging duration of 3.5 ms enables a discrimination fidelity of 99.80( 5) % (fig.A1(b)).To assess the imaging loss, we take a variable number of consecutive images and record the final atom survival (fig.A1(c)).After accounting for vacuum losses occurring during the wait times in-between the images (≈20 ms), we extract a loss rate of 0.19(2)% per image, which is consistent with the expected Raman scattering rate of atoms from 3 P 1 into the anti-trapped 3 P 2 state.

Gray molasses cooling and Raman sideband cooling
We perform gray molasses cooling (GMC) with the same beams as the 556 nm 3D MOT [38], and with the same magnetic field as used in imaging.With detuning of ≈ 9Γ from the 1 S 0 ↔ | 3 P 1 , F = 3/2, m F = +1/2 transition and a total beam intensity of 76 I sat , we reach 3 µK temperatures in less than 1 ms, as shown through release-and-recapture measurements in fig.A2(a).Independently, through Raman sideband spectroscopy, we measure an average motional quanta after GMC to be n ≈ 0.5 for the trap frequency of 58 kHz.This corresponds to a temperature of 2.8 µK-a value consistent with the release-and-recapture measurement.
After gray molasses cooling, we use Raman-sideband cooling to further reduce temperature of the atoms in the radial dimension.We implement multiple cycles of pulsed Raman sideband cooling [38].We operate with a trap frequency of ω r /(2π) = 58 kHz, a carrier Raman Rabi frequency of Ω c /(2π) = 26 kHz and Gaussian pulse shaping to reduce off-resonant excitation to other mo- One cooling cycle consists of a Gaussian-shaped Raman pulse and a rectangular optical pumping pulse.(bottom) Raman sideband spectroscopy for a probing time corresponding to a π-pulse on the sideband (≈ 3π-pulse on the carrier).The average motional state, n, is estimated to be about 0.05 from the ratio of the blue and red sidebands.
tional states.The pulse sequence and a Raman sideband spectroscopy following cooling are presented in fig.A2(b).For 15 cooling cycles (total cooling time of ≈2 ms), the atoms are prepared with an average motional quanta of n ≈ 0.05 in the radial direction.We note that even with only 5 cycles, the atoms can be cooled down to n ≈ 0.1.This condition was preferred for the motional state reset experiment to shorten the total cooling time.
Appendix B: Controlling the clock transition

Clock laser system
The overview of the clock laser system is shown in fig.A3(a).We lock an 1156 nm external cavity diode laser (ECDL) to an ultra-low-expansion (ULE) cavity with a finesse of 240,000.In addition to the laser current and laser piezo in the ECDL, we feedback on an in-loop fiber eom [99].This technique suppresses frequency noise near the clock Rabi frequencies used in this work (≈ 100 kHz)-difficult to achieve using only piezo and current feedback.After pre-amplifying the seed laser with a semiconductor optical amplifier (SOA), we injection lock the laser to a butterfly-packaged diode laser reaching ≈400 mW [100].The amplified laser is doubled gram of the clock-transition laser system.1156 nm seed laser light emitted from an external cavity diode laser (ECDL), locked to a high finesse ultra-low expansion (ULE) glass cavity, is pre-amplified by a semiconductor optical amplifier (SOA) and further amplified by an injection-lock to a high power DL in a butterfly package (DL), using a free-space optical isolator (ISL).Electro-optic modulators (EOMs) and acousto-optical modulators (AOMs) are mainly used for modulating frequency, except for the last AOM used for intensity servo.The frequency doubler is a single-path waveguide.
Phase noise between the seed laser and the 578 distribution is removed with phase noise cancellation (PNC).(b) Suppression of excitation on the clock transition using 532 nm light.
The ordinate is the probability that atoms are excited into 3 P0 despite the presence of the 532 nm light, and the abscissa is the magnitude of the light shift from the 532 nm beam.A CORPSE-based motional state-preserving pulse (MPP) is applied here.The solid line is the Lorentzian line shape for the corresponding Rabi frequency, with no free parameters.(c) The heating by the light shift beam.The light shift operation L is applied repetitively, and the final average motional quanta is measured via Raman sideband spectroscopy.From the linear fit (solid line) we extract 0.056(5) quanta accumulated per iteration of L.
by a single-pass waveguide doubler to obtain ≈90 mW of 578 nm light.Phase noise cancellation (PNC), referencing the beat note of the transmitted residual 1156 nm laser after the doubler and the initial seed laser, is used to suppress phase noise induced by fibers and amplifiers between the seed and the doubler.

Clock light delivery to the atoms
Following the PNC pick-off, the clock light is intensitystabilized to a photodiode and transduced with an acousto-optic modulator (AOM).A second AOM is used for fast pulse-shaping of the clock light.The light is delivered to the experiment on a short fiber (1 meter) and focused onto the atoms to the waist radius of ≈ 20 µm.A piezo-actuated mirror near a Fourier plane is used for precise alignment of the spot onto the atom array, along with a separate mirror to optimize the dive angle.A Glan-Taylor polarizer (GTP), on an adjustable angle mount, is used as the last optic before the vacuum cell window to set the clock polarization.To optimize for a pure π-polarization component, as is desired for ground-state MCO operations, fine-alignment is accomplished by optimizing the magnetic field angle with three-axis control to minimize driving of a σ transition.
For experiments in which we drive σ − transitions, we add a quarter-wave plate after the GTP.The magnetic field quantization axis is angle optimized based on clock spectroscopy to purify the σ − transition.For the nondestructive state detection, errors from the clock coupling to the untargeted spin component are a key concern, which arise due to non-zero Ω σ + ; for the optical qubit randomized benchmarking, contaminant Ω π is most problematic, as it removes population from the two-level system of |g, 0 ↔ |m, 1 .After optimization, we can directly spectroscopically measure the ratios Ω σ + /Ω σ − = 0.02 and Ω π /Ω σ − = 0.01.These measurements inform the error budgeting discussed in Appendices F and D.

Local clock control
For local control of the clock, we use a 532 nm tweezer array generated by crossed acousto-optical deflectors (AODs).We highlight the flexibility of this approach, in that the same set of tweezers can also be used to achieve > 90% loading effciency [38].The crossed-AOD tweezer rail allows for fast, dynamic changes of the local light shift potential, a functionality which is not afforded by the SLM system supplying the 759 nm trap potential.We observe that a 532 nm tweezer of 2.4 mW (at the microscope input) induces a light shift of 3 MHz.Figure A3(b) shows the measured clock suppression error when light-shifting is used in tandem with the motional-state-preserving pulse (MPP), described in the next section.We note that although the MPP is robust to small detuning errors, in the far-off-resonant regime, the (undesired) excitation rate generally falls off like a Lorentzian.
We observe the light shifting operation slightly heats up ground-state atoms each time it is applied.Figure A3(c) shows the measured average motional quanta after variable number of light-shifting operations, for the light-shift beam depth of 3 MHz and the beam intensity ramped linearly for 1.5 ms.The extracted heating rate is 0.06 quanta per operation.In the future, this could be improved by pulse shaping of the light-shifting beam.(a) Simulated randomized benchmarking in g compared with measurements.We include measured intensity noise and site-to-site intensity variation, detuning errors, and scattering errors.We also include an error due to the X and Z beams propagating at an angle that is not perfectly orthogonal.Using the atoms as a probe, we measure the deviation from the orthogonal condition to be θX = 0.9(8) • .The total simulated error rate ranges from r = 1.2 × 10 −4 at θX = 0.1 • to r = 5.5 × 10 −4 at θX = 1.7 • (shaded purple region).The black points are the measured values and the gray line is the fit to data.The success probability at 0 gates in the simulation is fixed to the value given by the fit to data.(b) Simulated randomized benchmarking of the optical qubits o compared with measurements.Here we include only errors due to motional effects and plot the expected error as a function of initial n.At the measured initial n = 0.05(1), the calculated error rate r = 1.8 × 10 −3 due to motional effects is close to the measured value r = 2.0 × 10 −3 .The black points are the measured values.known matrix elements.We compute the total decoherence rate from the scattering to be Γ m,decoh.= 1.8(2)s −1 , with a corresponding error per Clifford gate of 0.7(1)%, which is near to the measured value.In the future, we will improve F m with higher optical powers and larger intermediate-state detunings.However, due to branching into other states of the 3 P J manifold, we anticipate that it will be challenging to achieve the error rates attained with the ground-state qubit.
Appendix E: Motional-state preserving pulse

Theoretical analysis
To realize fast preparation of the clock state, we choose to operate in an unconventional regime where the clock Rabi frequency is larger than the tweezer trap frequency.A high clock-transition Rabi frequency is more acccessible for fermionic than bosonic alkaline-earth(-like) atoms, because of a relatively broader natural linewidth arising from the effect of hyperfine coupling [101].Generally, the clock pulse modifies the atomic motional state even if the initial atomic state starts in the motional ground state, an effect which is exacerbated outside the resolvedsideband regime and for large Lamb-Dicke parameter.To address this, we find a condition in which such the motional state excitation is suppressed during the complete state transfer operation, which we call the motional-state preserving pulse (MPP).
We find that with a certain ratio of Rabi frequency to trap frequency, two 90-degree CORPSE composite pulse sequences preserve the motional ground state while simultaneously realizing high fidelity state transfer.The Bloch sphere picture of state evolution with this pulse sequence is given in Figure A5 (a), as well as the motional state evolution in Figure 3 (d) in the main text.
We analyze the MPP numerically for a trap frequency of 10 kHz, and the initial state is assumed to be the motional ground state.Fig. A5 (b) shows the theoretical estimation of the clock transfer fidelity for the MPP, which exceeds that of the normal π-pulse by nearly two orders of magnitude.Although the clock rotation fidelity has a flat dependence on Rabi frequency in this strong drive regime, the final average motional quanta with the MPP has a clear minimum at a specific Rabi frequency, as shown in Fig. A5 (c).We choose to operate all the shelving experiments near this optimal condition.Further exploration of the optimal pulse sequence for a shorter pulse, or a universal single qubit operation, is left for future work.
The observed MPP transfer fidelity in the experiment (0.28(3)%) substantially exceeds the theoretical calculation (≈ 10 −4 ).One possibility of the difference is the theoretical assumption of a perfect harmonic oscillator.We expect that anharmonicity of the Gaussian trap potential shape could influence the atomic motion in the shallow tweezer regime we have chosen to operate in.Errors from anharmonicity could be alleviated by using deeper traps while holding the ratio of Rabi frequency and trap frequency fixed.We leave this question to future investigations.

Simulation of motional heating
In Figure 3(e) of the main text, we calculate the heating per shelving event for different shelving pulse sequences.When shelving atoms to the clock state, inhomogeneity of the trap frequencies across the array (typically with a fractional spread of 3.5%) cause the motional states of different atoms to dephase rapidly compared to the timescale of the mid-circuit operations.In our clock shelving simulations, we account for this dephasing by removing motional coherences after each shelving step.After a clock pulse the atom states are given by ρ with both motional and orbital degrees of freedom.In order to dephase the motional state, we take the partial trace over both degrees of freedom, ρ orbital = Tr motional (ρ), ρ motional = Tr orbital (ρ), and then keep only the diagonal components of the resulting motional state ρ D motional .Then we take the combined motional/orbital state to be the tensor product We simulate the accumulation of the average motional  quanta by alternating this dephasing procedure and the unitary clock pulse evolution.
Appendix F: Clock-based non-destructive state-readout In the clock-based non-destructive state-detection experiment (sec.IV) we take 3 images: image 0 (not included in fig.4) identifies sites with loaded single atoms; image 1 distinguishes between the two spin components |g, 0 and |g, 1 ; and image 2 assesses atom survival at the end of the sequence.In each image, the tweezer site appears either bright b or dark d and the measurement outcomes from the whole experiment are labelled ijk with i, j, k ∈ {b, d}.In the following, we always post-select on i = b (loaded tweezer sites).Since the atoms initialized in |g, 0 and |g, 1 are prone to different error and loss mechanisms, we extract detection fidelities and atom loss separately for each spin-state.In the experiment, we prepare atoms in state s ∈ {|g, 0 , |g, 1 } and measure the number of jk events for that state, N s jk .The global approach, with a repumping step at the end of the sequence, re-initializes the largest fraction of atoms in g.We measure p |g,0 = 97.4(3)%and p |g,1 = 99.0(2)% for this method, with the losses dominated by vacuum lifetime and Raman scattering to antitrapped 3 P 2 .When we assess the atom return to g without the addition of the repump, we find that the global approach leaves 0.6(4)% and 1.3(4)% of |g, 0 and |g, 1 atoms in m at the end of the sequence, respectively.For |0 , this arises from a shelving error; while for |g, 1 , the error stems from optical pumping and clock polarization impurities.The latter two error sources are absent in the feed-forward approach-indeed, we find that the |g, 1 population trapped in m for this reset scheme is smaller.However, the feed-forward reset suffers from its own errors associated with correctly identifying |g, 0 and |g, 1 states in the first image as well as additional Raman scattering events that occur during image-processing time.As such, the feed-forward method ends up with 2.8(5)% and 0.7(1)% of |g, 0 and |g, 1 atoms trapped in m (the latter number is inferred).

Appendix G: Error budget
To check whether we understand all errors and losses present in the non-destructive state-detection and in midcircuit operations, we measure and analyze each known error mechanism independently and estimate its effect on the quantity of interest.The error budgets are presented in Tables I and II.Below we summarize the procedures used to determine the quoted numbers.
Image infidelity is extracted from a separate "calibration" data set, where all operations except magnetic field and tweezer depth ramps are removed.These are used to compute the probabilities of misidentifying a bright event as a dark one and a dark event as a bright one.
3 P 1 → 3 P 2 Raman scattering This is a Raman process where 759 nm tweezer photons scatter from the intermediate 3 S 1 state, changing the state of the atom from 3 P 1 to 3 P 2 .Since 3 P 2 is anti-trapped at 759 nm, the atoms are subsequently lost from the traps.With repeated imaging, we measure this loss to be 0.19(2)% per image (fig.A1).This is near to our ab initio calculations of scattering rates, given known matrix elements.
3 P 0 → 3 P 1 Raman scattering.This is a Raman process caused by 759 nm tweezer photons, which changes the state of the atom from 3 P 0 to 3 P 1 .Since 3 P 1 is shortlived, the atoms subsequently end up in g.We extract the scattering rate of this process Γ3 P0→ 3 P1 by initializing atoms in m, recording the g population as a function of wait time t and fitting with 1 − exp(−Γ3 P0→ 3 P1 t) model.We repeat this measurement for a range of trap depths U obtaining a linear relation between Γ3 P0→ 3 P1 and U .The error is then computed as the total probability of the scattering event occurring, given the time atom in m spends in the trap depth U .We note that this error maps a d event to b, and thus will contribute only if the atom can scatter enough photons during imaging to cross the photon count threshold.We take this effect into account.
3 P 0 → 3 P 2 Raman scattering.This is a Raman process mediated by 759 nm photons, changing the state of the atom from 3 P 0 to 3 P 2 .Since 3 P 2 is anti-trapped at 759 nm, the atoms are subsequently lost from the traps.With ab initio calculations involving known matrix elements, we calculate the ratios of Γ3 P0→ 3 P2 and Γ3 P0→ 3 P1 scattering rates and with the Γ3 P0→ 3 P1 values measured as a function of trap depth U (see above), we compute corresponding Γ3 P0→ 3 P2 .The error is then calculated as the probability of a scattering event occurring, given the time atom in m spends in the trap depth U .
Natural lifetime of 3 P 0 .Corresponding error calculated using measured natural lifetime from [101].
Vacuum loss is measured for each experiment in a separate "calibration" experiment, where all operations except magnetic field and tweezer depth ramps are removed.We correct the results for image infidelity.The observed error is consistent with independently determined vacuum lifetime, in addition to the imaging loss we expect.
Optical pumping.We characterize the optical pumping performance directly by preparing atoms in |g, 0 and subsequently applying a push-out operation.The error is taken as the residual population fraction, corrected for the image infidelity.We note that for the ground-state mid-circuit operations, this statepreparation error reduces the contrast by 2 OP .
Push-out operation is realized by resonantly driving |g, 0 ↔ 3 P 1 , F = 3/2, m F = +3/2 transition for a certain time t.During this procedure, the off-resonant scattering on the |g, 1 ↔ 3 P 1 , F = 3/2, m F = +1/2 transition leads to |g, 1 → |g, 0 pumping process, where the pumped atoms are immediately ejected from the traps.Initializing atoms in |g, 1 and recording atom survival as a function of push-out beam pulse length, we measure the off-resonant scattering rate τ and compute the push-out error as 1 − exp(−t/τ ).
Shelving error is the fraction of the population remaining in the original state after S 1 or S 0 operation, defined in the main text as S .We measure it by repeating the shelving operation odd number of times and detecting population that remains in g.The results are presented in fig.3(c).
Shelving heating is measured by repeating S 1 or S 0 operation even number of times, followed by repumping any residual population back to g.We observe a quadratic relation between the number of shelvings and atom loss.The quoted shelving heating is extracted from the fit to the data.
Clock suppression error is the population fraction shelved by S 1 or S 0 operation, in spite of the 532-nminduced light-shift.The measurement of this error is presented in fig.A3(b).
σ − clock polarization impurity.We measure the error in S 1 shelving operation due to polarization impurities present in the σ − clock drive.We initialize atoms in |g, 1 and apply a single S 1 operation.After accounting for state-preparation errors, we observe that a fraction of atoms is shelved to m, which we attribute to a σ + polarization component present in the drive.
m single-qubit error.The error in the m singlequbit gates is extracted from randomized benchmarking measurements (fig.2(a)), and scaled by the time the pulse is applied in the relevant experiment.a When the scattering event or decay occurs between image 1 and feed-forward operation, the atom is shelved to m.

Appendix H: Timing diagram of mid-circuit operations
The detailed experimental sequence used in fig. 5 is given in the fig.A6.Below we highlight differences between the ground-and metastable-qubit operations.We note that in both cases there are substantial ≈ 100 ms delays between images associated with the charge clearing on the EMCCDs required for high signal/noise images; this will be avoidable in the future.The mid-circuit operations on their own take about 20 ms, including shelving, trap ramps, field ramps, the image or reset, and data qubit unshelving.
For the ground-state mid-circuit measurement and mid-circuit reset experiments, the light shift beam (discussed in Appendix B 3) is ramped up for 1.5 ms.For the imaging/cooling and push-out spin detection, we ramp up the magnetic field to 16 G, and increase the trap depth to 0.4 mK.
For the metastable qubit mid-circuit measurement, we used a 400 µs-long pulse with a smooth envelop for the light shifting (L) beam to minimize the time of the L beam while suppressing the loss from the procedure.For the S 1 operation, we increase the magnetic field to 32 G from the 1.5 G to reduce errors from polarization impurity.The imaging in this experiment was operated in the depth of ≈0.2 mK, which is close to half of the depth of the typical imaging operation, to reduce Raman scattering errors on the data qubit.In order to identify error sources and benchmark the fidelity of the mid-circuit measurement (MCM), we perform quantum process tomography [73,74,102,103].We prepare the ancilla and data qubits in a set of input states, |g, 0 , |g, 1 , |g, 0 , (|g, 0 + |g, 1 )/ √ 2, and (|g, 0 − i |g, 1 )/ √ 2, feed these states in to the MCM operation, and perform state tomography on the resulting output states.In our destructive measurement protocol, the detection of no atom corresponds to events in which the atom was in the |g, 0 state, but also to events in which the atom was lost from the trap or ended up in |m, 0 or |m, 1 states.To separate the probabilities of measuring |g, 1 and |g, 0 from the probabilities that the atom is lost or in the metastable state, we also perform the MCM without the destructive measurement pulses.We use the resulting atom detection probabilities to normalize the |g, 1 and |g, 0 detection probabilities used in state tomography.Implicit in this procedure is the assumption that the trap loss and metastable state shelving errors are independent of the nuclear spin state.Using these normalized detection probabilities, the process we reconstruct describes the MCM for events without loss or shelving errors.The output density matrices from this process can then be scaled by the probability of no loss and no shelving errors [75].
We use an iterative maximum likelihood estimation algorithm to reconstruct the (lossless) MCM process, constraining the process to be completely positive and trace preserving [74,104,105].Despite being lossless, this process still describes the dephasing, depolarization, and unitary rotation errors present in our MCM operation.The Choi matrices obtained from the reconstruction algorithm are converted to χ matrices (fig.A7) and used to calculate the process fidelities as F p = T r(χχ ideal ) where χ ideal describes the ideal MCM process [73].Due to the field splitting, there is phase accumulation between the qubit states during the MCM.For the ancilla qubits, we calibrate the time between initialization and readout so that χ ideal represents the identity.For the data qubits, we find that a qubit echo pulse minimizes the dephasing errors that are present on the timescales required to collect all data.The resulting process for the data qubits has a rotation given by R Z (θ 1 )R X (π)R Z (θ 2 ), where θ 1 and θ 2 are chosen so that the full rotation of the MCM process is equivalent to R Y (π).We find process fidelities for the data and measurement qubits F p,DQ = 0.972 (5) and F p,AQ = 0.979(6) respectively.These process fidelities can be converted to average state fidelities as F av = (dF p + 1)/(d + 1) [103,106].In our case d = 2, yielding F av,DQ = 0.981(4) and F av,AQ = 0.986 (4).Including a scaling factor in the output density matrices that accounts for loss and shelving errors results in average state fidelities F av,DQ = 0.961(3) and F av,AQ = 0.972 (4).Using the reconstructed process, we can also directly calculate the output state fidelities, including loss and shelving errors, for the specific input state (|g, 0 − i |g, 1 )/ √ 2. This gives F |−y ,DQ = 0.948 and F |−y ,AQ = 0.978, which can be compared to the Ramsey contrast of ancilla and data qubits in Fig. 5, C DQ MCM = 95.5(1.0)% and C AQ MCM = 98.2(6)%.

FIG. 1 .
FIG. 1. Mid-circuit operations using the omg-architecture in 171 Yb.(a) The omg level structure in 171 Yb: the optical qubit o is defined on the clock transition between 1 S0 and 3 P0 states; the metastable m and ground g state qubits are defined by the |0 ≡ |mF = +1/2 and |1 ≡ |mF = −1/2 Zeeman states of nuclear spin-1/2 within the respective manifolds.The optical Raman transitions through 3 P1 and 3 D1 drive nuclear qubit rotations in g and m.The insets show Rabi oscillations with {Ωm/2π, Ωo/2π, Ωg/2π} ≈ {0.26 MHz, 0.11 MHz, 0.33 MHz} and 1/e damping of ≈ {30, 80, 80} cycles respectively.(b) Local shelving operations and MCO.The array is divided into data qubit (DQ) and ancilla qubit (AQ) subsets.The light shift operation L hinders shelving for ancilla qubits leaving them in g and therefore in a bright state for an image.The data qubits are shelved into m with the S0 shelving operation-a rotation on the π-polarized clock transitions which addresses both |0 and |1 states.At the end of MCO, the data qubit is assessed for coherence (right inset).The complimentary S1 operation-a rotation on the σ − -polarized clock transition-shelves only |0 spin state, realizing a non-destructive spin-sensitive detection.Atom images shown are averages of 600 shots.(c) Trapping, imaging and local addressing apparatus.(d) The qubit addressing beam geometry.QB1,2 control RX and RZ nuclear spin qubit rotations in ground the g (green) and metastable m (blue) manifolds.The S0,1 beam controls optical qubit and shelving operations between the two nuclear spin qubit manifolds.The 532 nm tweezers (L) site-selectively light shift the clock transition for local shelving operations.

Figure 1 (
d) shows the beam geometry.

FIG. 3 .
FIG. 3. Coherent shelving.(a) Motional effects in the Ωo ω regime: a single π-pulse addresses multiple sidebands heating up the atom, while MPP leaves the original motional state unchanged after the operation is complete.(b) Pulse sequences for the MPP.MPP comprises of two CORPSEs, each realizing a target 90 • rotation on the clock transition.One CORPSE consists of 384.3 • +x , 318.6 • −x and 24.3 • +x rotations, with ±x denoting 0 • and 180 • phases of the applied pulses [56].(c) Population remaining in the ground state after odd number of shelving operations.From the slope we extract the error per shelving operation: S = 0.21(2)% for a π-pulse and no wait time (grey); S = 1.33(4)% for a π-pulse and 2 ms wait time (orange); and S = 0.28(3)% for MPP and 2 ms wait time.(d) Simulation of the motional state evolution in the x − p phase space of a harmonic oscillator under a π-pulse (left) and MPP (right) with the units of a zero-point motion.(e) Average number of motional quanta vs. number of shelving operations.A π-pulse and MPP increase n by 9(1) × 10 −2 and 4(2) × 10 −3 , respectively.Lines show a nofree-parameter simulation of the expected behaviour for the two cases (see Appendix E 2).
FIG. 4. Non-destructive state-sensitive detection.(a) Overview of the protocol.S1 turns spin |g, 0 dark, shelving it to the m manifold, while |g, 1 remains and appears bright for the image.The spins are then reset back to the g manifold.A final image checks for atom loss at the end of the procedure.(b) and (c) show the two reset approaches employed.(d) Image 1 (yellow) is spin sensitive, resolving |0 and |1 populations of a |ψ = cos θ 2 |0 − i sin θ 2 |1 input state in g.Image 2 shows the atoms can be reinitialized in g following spin detection via global control.No correction was applied to the data shown.(e) 2D histogram showing counts recorded in both images for atoms initially prepared in |0 (orange) and |1 (yellow).Reinitialization in g, for this data set, was performed via global control and repumping step before image 2.

FIG. 5 .
FIG. 5. Mid-circuit operations (MCOs).(a) Overview of the protocol.With local light-shifts L acting on ancilla qubits (AQ), S0 shelves data qubits (DQ) to the metastable state, dark to MCOs.After the MCO is completed, the DQ is brought back to the ground state and assessed for coherence loss.For reset operations, a final measurement is performed on AQ to check whether the operation was successful.(b) Mid-circuit measurement results.In a Ramsey-type experiment, the contrast for AQ is measured mid-circuit with C AQ MCM = 98.2(6)%.After the MCO, the contrast for the DQ is C DQ MCM = 95.5(1.0)%.Atom image shown is an average of 600 shots.(c) Mid-circuit reset results.Prior to reset we apply a pulse of a 399 nm heating beam, which increases n and mixes the spin state.The gray-molasses cooling (GMC) and Raman sideband cooling (SB cool) then reset the motional state, while optical pumping (OP) and an X-gate, reset the spin state of AQ. (left) Sideband spectroscopy (SB spec), showing decrease in n after reset.(right) Ramsey-type experiment, showing contrast reset for AQ to C AQ MCR = 97.7(5)%.The DQ contrast after the MCO was C DQ MCR = 95.2(8)%.(d) Starting from qubits stored in the m manifold, a Rabi oscillation of a C AQ MCM,m = 96.2(8)%contrast and a Ramsey experiment with a C DQ MCM,m = 90(1)% contrast are performed for AQ and DQ, respectively.The state-readout for AQ and DQ is non-destructive, retaining ≈94% of atoms at the end of the sequence.For all panels, no corrections are applied to the data nor to the reported contrasts; see text for an explanation of SPAM and errors.
results are based upon work supported by the Office of Naval Research (N00014-20-1-2692), Air force Office of Scientific Research (FA9550-19-1-0275), Army Research Office (W911NF-19-1-0149, W911NF-19-1-0223), National Science Foundation Physics Frontier Center (Phys-1734006), U.S. Department of Energy, Office of Science, National Quantum Information Science Research Centers, Quantum Systems Accelerator, and the National Institute of Standards and Technology.This research was supported by an appointment to the Intelligence Community Postdoctoral Research Fellowship Program at JILA at the University of Colorado, Boulder administered by Oak Ridge Institute for Science and Education (ORISE) through an interagency agreement between the U.S. Department of Energy and the Office of the Director of National Intelligence (ODNI).A. S. acknowledges the support from the Funai Overseas Scholarship.W. M. acknowledges support of the NIST NRC program.F. R. acknowledges the support from Cluster of Excellence Matter and Light for Quantum Computing (ML4Q) EXC 2004/1-390534769.

Appendix A: Method 1 .
Overview of the experimental procedure

3. 5
FIG. A1.Magic angle and fast imaging.(a) Magic angle condition for the 1 S0 ↔ | 3 P1, F = 3/2, m F = −1/2 transition.Purple points are measured with the magnetic field (B) parallel to the tweezer polarization (E), and red points, with B tilted by 17• with respect to E (near magic angle condition for our configuration).The tweezer-induced light shift has a linear sensitivity to the trap intensity that is about 50 times smaller for the magic angle condition than for the parallel case.(b) Histogram for high-fidelity fast imaging.The imaging has a duration of 3.5 ms and a discrimination fidelity of 99.80(5)%.Dashed line is the photon count thresholdevents with photon counts below (above) the threshold are identified as dark (bright).(c) The survival rate after a variable number of images, yielding an average loss of 0.19(2)% per image after accounting for the vacuum loss.
FIG.A2.Gray molasses cooling and Raman sideband cooling.(a) Temperature of tweezer-trapped atoms as a function of gray-molasses cooling time.The temperature is determined by comparing results of a release-and-recapture experiment and a Monte Carlo simulation for an atom of a certain temperature[98].The black line is an exponential fit, yielding a cooling time constant of 0.4(2) ms and a final temperature of 3 µK.(inset) Magnetic field splits excited states of 3 P1 realizing a lambda configuration employed for the gray-molasses cooling.(b) (top) Pulse sequence for Raman sideband cooling in the radial direction.The two axes of the radial direction are cooled alternately, each typically for 15 cooling cycles.One cooling cycle consists of a Gaussian-shaped Raman pulse and a rectangular optical pumping pulse.(bottom) Raman sideband spectroscopy for a probing time corresponding to a π-pulse on the sideband (≈ 3π-pulse on the carrier).The average motional state, n, is estimated to be about 0.05 from the ratio of the blue and red sidebands.
FIG. A3.Control of the clock transition (a) Schematic diagram of the clock-transition laser system.1156 nm seed laser light emitted from an external cavity diode laser (ECDL), locked to a high finesse ultra-low expansion (ULE) glass cavity, is pre-amplified by a semiconductor optical amplifier (SOA) and further amplified by an injection-lock to a high power DL in a butterfly package (DL), using a free-space optical isolator (ISL).Electro-optic modulators (EOMs) and acousto-optical modulators (AOMs) are mainly used for modulating frequency, except for the last AOM used for intensity servo.The frequency doubler is a single-path waveguide.Phase noise between the seed laser and the 578 distribution is removed with phase noise cancellation (PNC).(b) Suppression of excitation on the clock transition using 532 nm light.The ordinate is the probability that atoms are excited into 3 P0 despite the presence of the 532 nm light, and the abscissa is the magnitude of the light shift from the 532 nm beam.A CORPSE-based motional state-preserving pulse (MPP) is applied here.The solid line is the Lorentzian line shape for the corresponding Rabi frequency, with no free parameters.(c) The heating by the light shift beam.The light shift operation L is applied repetitively, and the final average motional quanta is measured via Raman sideband spectroscopy.From the linear fit (solid line) we extract 0.056(5) quanta accumulated per iteration of L.
FIG. A4.(a) Simulated randomized benchmarking in g compared with measurements.We include measured intensity noise and site-to-site intensity variation, detuning errors, and scattering errors.We also include an error due to the X and Z beams propagating at an angle that is not perfectly orthogonal.Using the atoms as a probe, we measure the deviation from the orthogonal condition to be θX = 0.9(8) • .The total simulated error rate ranges from r = 1.2 × 10 −4 at θX = 0.1 • to r = 5.5 × 10 −4 at θX = 1.7 • (shaded purple region).The black points are the measured values and the gray line is the fit to data.The success probability at 0 gates in the simulation is fixed to the value given by the fit to data.(b) Simulated randomized benchmarking of the optical qubits o compared with measurements.Here we include only errors due to motional effects and plot the expected error as a function of initial n.At the measured initial n = 0.05(1), the calculated error rate r = 1.8 × 10 −3 due to motional effects is close to the measured value r = 2.0 × 10 −3 .The black points are the measured values.

1 .
Detection fidelityThe detection fidelities of correctly identifying |g, 0 as d and |g, 1 as b, P |g,0 and P |g,1 , are defined asP |g,0 = Nwhere OP is the optical pumping infidelity.Additionally, we post-select on atom survival in image 2 (k = b) to separate detection errors from atom loss.The analysis was conducted for experiments with reset via global control and a repump.The results are summarized in table I.
FIG. A6.Experimental sequence of the MCOs, with the timing is counted after the initial imaging and state preparation.For MCM, the freen shaded region indicates imaging.(a) Sequence for the ground-state MCM and MC reset.Both share a similar experimental sequence, except for the spin detection, cooling and spin reset.(b) Sequence for the metastable MCM.Here,an extra image is taken at the end to asses atom loss.
FIG.A5.Theoretical analysis of the motional state preserving pulse (MPP) in a harmonic oscillator.The trap frequency is fixed to be 10 kHz.(a) Bloch sphere picture of the state evolution in a single MPP.(b) Theoretical state transfer infidelity after a single MPP for various initial average motional quanta, indicating 2 orders of magnitude smaller infidelity, compared to a normal π-pulse.The dashed line is for the normal π-pulse and the solid line is for the MPP.(c) Theoretical average motional state after a single MPP, assuming the initial state is in a motional ground state.A clear minimum can be observed at the Rabi frequency of ≈80 kHz, where we confirmed qualitatively this feature is retained in another choice of initial temperature.
and p |g,1 represent atom populations remaining in the trapping potential at the end of the reset sequence.When calculated for experiments without the repumping step, p |g,0 and p |g,1 are reduced by the populations trapped in m at the end of the reset sequence.The results are summarized in table I.

TABLE I .
Error budget for detection fidelities P and ground-state re-initialization probabilities p in a clock-based nondestructive state-detection protocol.For each error, we indicate whether the physical mechanism responsible for the error is measured (m) or calculated (c).

TABLE II .
Contrast loss budget for mid-circuit measurement (MCM) and mid-circuit reset.For each error, we indicate whether the physical mechanism responsible for the error is measured (m) or calculated (c).