Optical quantum nondemolition measurement of a solid-state spin without a cycling transition

Optically-interfaced spins in the solid state are a promising platform for quantum technologies. A crucial component of these systems is high-fidelity, projective measurement of the spin state. In previous work with laser-cooled atoms and ions, and solid-state defects, this has been accomplished using fluorescence on an optical cycling transition; however, cycling transitions are not ubiquitous. In this work, we demonstrate that modifying the electromagnetic environment using an optical cavity can induce a cycling transition in a solid-state atomic defect. By coupling a single Erbium ion defect to a telecom-wavelength silicon nanophotonic device, we enhance the cyclicity of its optical transition by a factor of more than 100, which enables single-shot quantum nondemolition readout of the ion's spin with 94.6% fidelity. We use this readout to probe coherent dynamics and relaxation of the spin. This approach will enable quantum technologies based on a much broader range of atomic defects.

A key capability for atomic defects is high-fidelity spin readout using the optical transition [1]. Single-shot optical spin measurements have been achieved in quantum dots [22] and in the NV [23] and SiV − [24] color centers in diamond by leveraging highly cyclic optical transitions that arise from atomic selection rules. However, cyclic optical transitions are not a universal feature of atomic defects, and are often absent in low-symmetry defects and in the presence of strain [25] or spin-orbit coupling without careful alignment of the magnetic field [22,24]. Singleshot readout has not been achieved in atomic defects without intrinsic cycling transitions, such as rare earth ions [26].
In this work, we demonstrate that tailoring the electromagnetic density of states around an atom with an optical cavity can induce highly cyclic optical transitions in an emitter that is not naturally cyclic. Using a single Er 3+ ion in Y 2 SiO 5 (YSO) coupled to a silicon nanophotonic cavity (Fig. 1a), we demonstrate a greater than 100-fold enhancement of the cyclicity: under conditions where the ion alone can scatter fewer than 10 photons before flipping its spin, a cavity-coupled ion can scatter over 1200. This is sufficient to realize singleshot spin readout with a fidelity of 94.6%, and to enable continuous, quantum nondemolition measurement of quantum jumps between the ground state spin sublevels. The improvement in the cyclicity arises from selective Purcell enhancement of the spin-conserving optical decay pathway (Fig. 1b), determined primarily by the alignment of the cavity polarization and the spin quantization axis defined by a magnetic field. A small additional enhancement arises from detuning of the spin-non-conserving transitions from the optical cavity, an effect that was recently used to enhance the cyclicity of a quantum dot in a nanophotonic cavity [27]. This generic technique opens the door to exploiting a much broader range of atomic defects for quantum technology applications, and is a particular advance for individually addressed rare earth ions.
Our experimental approach, following Ref. 20, is based on a YSO crystal doped with a low concentration of Er 3+ ions placed in close proximity to an optical cavity in a silicon photonic crystal waveguide (Fig. 1a). Assembled devices are placed inside a 3 He cryostat at 0.54 K with a 3-axis vector magnet. Light is coupled to the cavities using a lensed optical fiber on a 3-axis translation stage. The high quality factor (6 × 10 4 ) and small mode volume of the cavity, together with the high radiative efficiency of the Er 3+ optical transition, enable Purcell enhancement of the Er 3+ emission rate by a factor of P = 700 (Fig. 2a). There are several hundred ions within the mode volume of the cavity, but their optical transitions are inhomogeneously broadened over a several GHz span, such that stable, single ion lines can be clearly isolated (Fig. 1c) [20].
The ground and excited states of the 1.536 µm optical transition in Er 3+ :YSO are effective spin-1/2 manifolds, which emerge from the lowering of the 16-(14-)fold degeneracy of the 4 I 15/2 ground ( 4 I 13/2 excited) states by the crystal field. In the absence of a magnetic field, the ground and excited states are two-fold degenerate, as required by Kramers' theorem [28]. This degeneracy is lifted in a small magnetic field, revealing four distinct optical transitions (Fig. 1b,c). Transitions A and B conserve the spin, while C and D flip the spin.
To probe the selection rules of the optical transition, we excite the spin-conserving A and B lines alternately (Fig. 2a). The average fluorescence following the A and B pulses is the same, since the transitions are symmetrically detuned from the cavity and the spin is on average unpolarized from continuous optical pumping by the excitation light. However, the intensity autocorrelation function, g (2) (nt rep ) (where n is the offset in the number of pulses) is anti-bunched for odd-numbered pulse offsets (i.e., A-B correlations) and bunched for even offsets (i.e., A-A or B-B correlations), revealing that only one of the transitions A or B is bright at any given time, depending on the instantaneous spin state (Fig. 2b). Note that the fluorescence after each pulse is integrated before computing the autocorrelation, so g (2) (nt rep ) is only defined for discrete times. Eventually, the spin relaxes and g (2) decays exponentially to 1 after an average of n 0 pulses. Under the assumption (to be verified later) that the observed spin relaxation arises primarily from optical pumping between the spin sublevels, we extract the optical transition cyclicity C = n 0 P ex , where P ex ≈ 1/2 is the probability to excite the ion in each pulse. This value of P ex is assured by using an intense excitation pulse to saturate the ion, and is verified using the independently measured collection efficiency [29].
We repeat this measurement with different orientations of the magnetic field, and find that the cyclicity varies by nearly three orders of magnitude (Fig. 2c,d), with a maximum value of 1260 ± 126. This results from the changing orientation of the atomic transition dipole moment with respect to the cavity polarization. It can be captured by a simple model where the decay rates on each transition are proportional to the projection of an associated dipole moment d onto the cavity polarization at the position of the ion. For the spin conserving transition, When the magnetic field is rotated, the spin sublevels mix such that |↑ (ϕ , θ ) = α |↑ (ϕ, θ) +β |↓ (ϕ, θ) , with the coefficients α, β completely specified by the anisotropic g tensor describing the Zeeman shifts ( Fig. 1d) [30]. Together with the time-reversal symmetry properties of the Kramers' doublets, this allows the complete angular dependence of C = Γ AB /Γ CD + 1 to be described by only two parameters: · d || and · d ⊥ at a single (arbitrary) reference orientation [29]. In this model, the role of the cavity is to restrict the decay to a particular polarization, such that the decay rates are determined by a single matrix element | · d| 2 ; in free space, there is no preferred .
Since the dipole matrix elements for Er 3+ :YSO and the cavity field polarization at the position of the atom are not known, we treat · d || and · d ⊥ as fit parameters. A fit to this model displays excellent agreement with the data, and allows the complete angle dependence of the cyclicity to be extracted from a small number of measurements. While this discussion centers on electric dipole coupling, the Er 3+ transition we study has comparable electric and magnetic dipole matrix elements [31], and the predicted magnetic Purcell factor for our structures is similar [20], depending on the precise position of the ion. We show in the Supplementary Information [29] that the electric and magnetic contributions have the same angular dependence and may be summed into a single term.
To quantify the extent to which the cyclicity is enhanced by the cavity, we study a second ion with lower Purcell factor and then lower it further by detuning the cavity. The cyclicity is observed to decrease roughly linearly with P (Fig. 2e). Based on the dependence of the cyclicity on the cavity detuning for this ion, we estimate that the cyclicity C 0 of the ion alone is less than 10 [29], such that the enhancement by the cavity is greater than 100. We note that C 0 has not been directly measured for Er 3+ :YSO.
Next, we focus on using the cavity-enhanced cyclicity to measure the spin state. Fig. 3a shows a time trace of photons recorded in a single run of the experiment, with telegraph-like switching between |↓ g (where transition B is bright) and |↑ g (where transition A is bright) clearly visible. A continuous estimation of the spin state occupation using a Bayesian estimator applied to the full measurement record [32] shows clearly resolved quantum jumps between these states, demonstrating the quantum nondemolition nature of the measurement. The quantum jumps are driven by optical pumping from the measurement process itself, because of the finite cyclicity.
To demonstrate single-shot measurement of the spin, we use a maximum likelihood (ML) algorithm to estimate the state at time t using photon counts from times t > t. The measurement duration is adaptive: each measurement terminates when a set fidelity threshold or time limit is reached, and a new, independent measurement is begun [33]. The outcome of each measurement is shown by the circles in Fig. 3b. The average measurement fidelity estimated by the ML algorithm is 94.6%, and 91% of consecutive measurements have the same outcome. The average time to complete a measurement is 20 ms, which corresponds to the average time to detect two photons. The optimum fixed measurement window is 51 ms, resulting in a slower measurement with a lower average fidelity of 91.1% (Fig. 3c).
Lastly, we apply this spin readout technique to investigate the ground state spin dynamics. We measure the intrinsic spin relaxation rate T 1,dark by reducing the optical excitation rate 1/t rep until the total spin lifetime T 1 = 1/(T −1 1,dark +T −1 1,op ) saturates (Fig. 4a). T 1,op = Ct rep /P ex is the optical pumping time. T 1,dark increases with increasing magnetic field strength, in a manner that starkly diverges from the expected B −4 behavior of spin-lattice relaxation (Fig. 4b) [28]. One possible explanation is flip-flop interactions with nearby Er 3+ ions [34], which is consistent with the fact that T 1,dark varies sharply with the magnetic field angle and is different by a factor of 4 between two ions studied [29]. In this device, the average separation between magnetically equivalent Er 3+ ions is estimated to be 70 nm, such that the dipoledipole interaction strength is around 1 kHz; the flip-flop rate is likely much slower because of spectral diffusion from nearby 89 Y nuclear spins. The longest relaxation time we observe, T 1,dark = 12.2 ± 0.4 s, is the longest electronic spin T 1 measured for Er 3+ , to the best of our knowledge [35].
In Fig. 4c, we demonstrate high-visibility Rabi oscillations between the ground state spin sublevels, driven by a microwave magnetic field applied through a coplanar waveguide. We measure T * 2 = 125 ± 5 ns (in a Ramsey experiment), and T 2 = 3.3 ± 0.2 µs (Hahn echo), consistent with previous measurements of electron spin coherence in solid-state hosts with abundant nuclear spins [17,36]. Longer coherence times to enable storage of quantum states and the observation of coherent dynamics between interacting Er 3+ ions may be achieved using dynamical decoupling. Ultimately, it will be beneficial to use alternative host crystals with lower nuclear spin content; Er 3+ incorporation has been demonstrated in several candidates including CaWO 4 , Si and TiO 2 [37].
Our results demonstrate that the optical properties of atomic systems are malleable through control of their local environment. Using a photonic nanostructure, we have achieved more than two orders of magnitude improvement in the emission rate and cyclicity of a single Er 3+ ion, and demonstrated single-shot readout of its spin. Realistic improvements in the quality factor of the optical cavity and photon collection efficiency η will enable another 20-fold enhancement in emission rate and spin readout with F > 0.99 in 50 µs (Q = 10 6 and η = 0.2). These results represent a significant step towards realizing quantum networks based on single Er 3+ ions. This measurement approach may also be extended to address many closely-spaced Er 3+ spins in the same device by exploiting small differences in their optical transition frequencies, providing a foundation for studying strongly interacting spin systems. Finally, this technique will enable a much broader class of atomic defects to be explored for quantum technologies.
We acknowledge helpful conversations with Charles Thiel, Nathalie de Leon and Alp Sipaghil. Support for this research was provided by the National Science Foundation ( The intensity autocorrelation g (2) is computed from the integrated fluorescence after each pulse. Odd values of n (blue points) probe the correlation between pulses driving different transitions and are anti-bunched as a result of the spin staying in the same state over many excitation cycles. g (2) decays as e −n/n 0 because of optical pumping, giving the cyclicity C ≈ n 0 /2. In this measurement, C = 660 ± 66. g (2) (0) = 0.3 is consistent with the signal-to-background ratio of 10. (c, d) The cyclicity varies dramatically with the angle of the external magnetic field, but is described by a model (red line) based on the independently measured g tensors (see text). (e) The cyclicity decreases rapidly with the Purcell factor, demonstrated here by measurements on several ions (shown in different colors) with the detuning varied to change P .

Experimental Details
The devices and substrates used in this work are identical to those in Ref. 1, and are described in detail there. The key difference in the present work is that the measurements take place in a 3 He cryostat with a base temperature of approximately T = 540 mK. At T = 4 K, spin dynamics are unobservable, presumably because of rapid spinlattice relaxation in the ground or excited states [2]. The measurement of Rabi oscillations in Fig. 4c uses a slightly different device geometry that incorporates a microwave coplanar waveguide approximately 125 µm from the photonic crystal. Microwave pulses are generated using a signal generator (SRS SG386) modulated by an IQ mixer driven by an arbitrary waveform generator (Agilent 33622) and amplified to 21 W (MiniCircuits ZHL-30W-252+) before entering the cryostat. A low duty cycle is used to avoid heating the sample.
All data in this paper comes from measurements on 3 different ions (Table 1). Figs. 1,2,3, Figs. S1 and S4 are based on "ion 1", while Fig. 4a,b, S2, S3 and part of Fig. 2e, are based on "ion 2". Fig. 4c and part of Fig. 2e are based on "ion 3". Ions 1 and 2 are coupled to different photonic crystals on the same YSO substrate, while ion 3 is in a different YSO crystal. Out of the many ions coupled to each cavity, these particular ions were selected for careful study because they are strongly coupled to the cavity (large Purcell factor) and spectrally well-separated from other ions. Importantly, no additional selection was made on the basis of cyclicity or spin readout fidelity. The transition from ion 1 to ion 2 was necessitated by the accidental destruction of the photonic crystal coupled to ion 1 (which was also damaged, lowering Q, after the measurements in Fig. 2a and 3 but before those in Fig. 2cd), while the transition to ion 3 was motivated by a new device geometry allowing for microwave driving of the spins.

Theoretical model of cavity-enhanced cyclicity
In this section, we develop a theoretical model describing the cyclicity of the optical transitions measured in Fig. 2 of the main text. Calculating the cavity coupling strength for all four possible transitions A-D is not currently possible because the relevant transition dipole moments of Er 3+ :YSO have not been measured, and the precise position of the ion in the cavity is not known. As an alternate approach, we demonstrate that these four rates and their dependence on the magnetic field angle can be reduced to only two fit parameters that physically correspond to the decay rates of the AB and CD transitions into the cavity at a single magnetic field orientation. The agreement of this model with the data validates our interpretation of the underlying physics, and is also practically useful for predicting conditions where the cyclicity is maximized from a small number of measurements.
Here, d is the electric dipole operator and µ is the magnetic dipole operator. Typically, expressions for multipolar coupling include electric quadropole (E2) terms at the same order as MD contributions. However, for Er 3+ , it has been calculated that the vacuum E2 emission rate is approximately 7 orders of magnitude smaller than the MD rate [3], justifying its exclusion in the present analysis. We quantize the electric and magnetic fields in the cavity as: The i appearing in the expression for B reflects the fact that the magnetic field oscillates out of phase with the electric field in a standing wave cavity. For nanophotonic cavities, the TE/TM polarization mode splitting is high enough that we only consider a single polarization mode. We then introduce four transition dipole operators σ i , corresponding to the four transitions A-D. Each operator couples to electric and magnetic fields via the dipole moments d i and µ i , respectively. The complete atom-photon interaction Hamiltonian is ( = 1): (4) Making the rotating wave approximation and taking the cavity to be resonant with the atomic transition (neglecting Zeeman splittings), we arrive at: In the limit κ ( d · E, µ · B), the atom-cavity dynamics are simply Purcell-enhanced spontaneous emission into the cavity (the bad-cavity limit of cavity QED). The decay rate on the transition i into the cavity is given by: where κ is the cavity linewidth. In previous work, we have shown that the contributions from electric and magnetic coupling to the cavity could be of similar magnitude [1], depending on the position of the ion within in the cavity standing wave.

Reducing parameters using Kramers' theorem
Er 3+ has an odd number of electrons, so in the absence of a magnetic field, its eigenstates are all even-fold degenerate according to Kramers' theorem. In a low-symmetry environment like the Y site in YSO (C 1 point group), the degeneracy is minimal and all eigenstates are doublets [5]. The application of a magnetic field lifts the degeneracy of the doublets, resulting in the singly degenerate states {↓ g , ↑ g , ↓ e , ↑ e } shown in Fig. 1b. The states emerging from the same doublet are time-reversal conjugates of each other:Θ |↑ j = |↓ j and Θ |↓ j = − |↑ j , whereΘ is the antiunitary time-reversal operator. This has implications for the matrix elements of the electric and magnetic dipole operators, which are even and odd under time reversal (Θ −1 AΘ = ±A), respectively [5]. In particular: We can now revisit the atom-photon coupling Hamiltonian, Eqn. (5). Writing the atomic operators σ i in the basis {↓ g , ↑ g , ↓ e , ↑ e }: In going from the first to the second line, we have made use of Eqns. (7) - (10). In going from the second to the third line, we have taken the cavity fields to be real-valued, which is an excellent approximation as they are highly linearly polarized. The final expression, Eqn. (14), has the same form for the electric and magnetic dipole moments despite the difference in their transformation properties in Eqns. (7) - (10). Mathematically, this arises from the factor of i in front of the magnetic field term in Eqn. (5). Physically, this means that interference of the electric and magnetic dipole decay channels into the cavity does not introduce any chirality (i.e., preference for decays from |↑ e relative to |↓ e ) into the atom-cavity system, which is intuitive for a standing-wave optical cavity.

Angle dependence of the cyclicity
We now turn to computing the cyclicity and its dependence on the orientation of the external magnetic field defining the spin quantization axis. The branching ratio between spin-non-conserving and spin-conserving decays through the cavity is R = Γ ⊥ /(Γ || + Γ ⊥ ) = |g ⊥ | 2 /(|g || | 2 + |g ⊥ | 2 ), and the cyclicity is C = 1/R. The spin eigenstates are given by the effective spin Hamiltonian: where B is the applied magnetic field, S = {σ x , σ y , σ z } is a vector of Pauli matrices, µ B is the Bohr magneton and g is a symmetric, real 3x3 matrix. For Er 3+ :YSO, g is highly anisotropic in both the ground and excited electronic states, with principal components (14.65, 1.80, 0.56) for the ground state and (12.97, 0.85, 0.25) for the excited state [6]. Note that the orientation of the eigenvectors of g is different from the crystal axes and also slightly different between the ground and excited states. A consequence of the anisotropy of g is that the spin eigenvectors are not generally parallel to the applied magnetic field. The eigenvectors at one magnetic field orientation (ϕ , θ ) can be expressed in terms of those at another orientation as: |↑ g (ϕ , θ ) = α |↑ g (ϕ, θ) + β |↓ g (ϕ, θ) . Denoting the matrix of atom-cavity coupling matrix elements in Eqn. (14) as M (ϕ, θ), we can transform it to another basis according to: (18) and evaluate the cyclicity as before.
We note that a similar model was applied to the orientation dependence of the absorption of linearly polarized light by Nd 3+ :YVO 4 in Ref. 7. The applicability of this model to emission in our work stems from the restriction of the emission to a single polarization by the high Purcell factor coupling to a single-mode, non-degenerate cavity.
This model is used to fit the data in Fig. 2 of the main text. The model is fit using M (100 • , 90 • ) as the fit parameters, and the result is g || = e −i1.15 , g ⊥ = 0.024 × e −i1.476 . Since the cyclicity only depends on the ratio of these quantities, we constrain |g || | = 1.

Correction for free-space decay
As the Purcell factor is finite, free-space emission can influence the cyclicity when it is very large. We incorporate this by adding free space decays to the branching ratio expression, such that the cyclicity becomes C 0 when the cavity coupling vanishes: In this expression, Γ 0 i denotes the decay rate on transition i in the absence of a cavity, C 0 = 1 + Γ 0 AB /Γ 0 CD is the cyclicity in the absence of a cavity, and P ||/⊥ = g 2 ||/⊥ /(κΓ 0 ), where Γ 0 is the total decay rate out of the excited state in the absence of the cavity.
For the ions studied here with P of order several hundred, the inclusion of this correction does not meaningfully improve the fit. We believe this occurs because the fit function can artificially increase g ⊥ by a small amount at the orientation of maximum cyclicity to account for the free space decay without significantly impacting the cyclicity at other angles. However, measuring the same ion with different Purcell factors (realized by changing the cavity detuning) makes the free-space decay evident and allows C 0 to be estimated (section 4).

Highest achievable cyclicity
For an atom with Purcell factor P and bare cyclicity C 0 , the highest possible cyclicity is C = P C 0 , achieved when g ⊥ = 0. This can always be realized by choosing the cavity polarization to be perpendicular to d ⊥ , for some spin quantization axis. In contrast, if the cavity polarization is fixed, it may be possible to tune the quantization axis angle to achieve g ⊥ = 0. We consider three cases: 1. If the g tensors in the ground and excited state are isotropic (or equal), it is always possible to choose an orientation of B where g ⊥ = 0. This can be proved from the normality of the matrix m formed by the upper-right 2x2 block of M .
2. If the g tensors for the ground and excited states are not simultaneously diagonalizable (having different axes), then it is not possible to achieve g ⊥ = 0 in general. This is proved by the specific counterexample of Er 3+ :YSO, where we observe (in a numeric model) that g ⊥ can be made small but never quite zero for certain values of M .
3. If the g tensors for the ground and excited states are parallel but have different (non-zero) magnetic moments, it appears (numerically) to always be possible to make g ⊥ = 0. We have not proven this mathematically.
Er 3+ :YSO falls into the second case because of the C 1 site symmetry of the Er site. However, the principal axes of the ground and excited state g tensors are only rotated by about 15 • from each other [6], which may explain the success in achieving high cyclicity anyway. Many other host crystals for REIs and other defects have higher site symmetry, which forces the alignment of the g tensor axes to the crystal, and are therefore covered by the third case. Therefore, we expect that this technique is fairly general.

Calibration of P ex
For the measurements in Fig. 2 of the main text, we use saturating optical pulses to ensure P ex ≈ 0.5 regardless of the magnetic field orientation. The approximate value of P ex is confirmed by counting the emitted photons and comparing to the independently measured collection and detection efficiency (Fig. S1). We note that the finite duration of the excitation pulse may allow for P ex > 0.5 if a photon is emitted during the pulse and the ion is re-excited, and have observed increased values of C at certain angles when using optical π pulses instead. In that sense, the values of C that we quote should be interpreted as lower bounds.
FIG. S1. Pex calibration. Average number of collected photons following each excitation pulse during the measurement in Fig. 2c. The photon numbers are scaled by the independently measured collection and detection efficiency η = 0.020. Since the spin is on average unpolarized and only resonant with the laser half of the time, Pex = 1/2 (as defined here) corresponds to 1/4 photon per pulse.

Estimate of intrinsic cyclicity of Er 3+ :YSO transition
A central claim of our work is that the cyclicity of the ion is enhanced by the optical cavity. Since the cyclicity C 0 of the spin transitions in Er 3+ :YSO without a cavity has not been previously measured, there is no direct basis for comparison. In ensemble experiments, C 0 has been estimated to be around 10 using measurements of the optical pumping rate and a number of simplifying assumptions [8]. We have attempted to measure C 0 using a single ion by detuning the cavity as much as possible, which increases the fraction of decays into free space and yields a weighted average of the cavity-enhanced C and C 0 [Eq. 19].
In Fig. S2c, we show several measurements of the same ion with increasing cavity detuning to decrease the total Purcell factor. The maximum cyclicity is strongly reduced: at the highest detuning, we observe a cyclicity of 53 ± 5, which sets an upper bound on C 0 . In Fig. S2d, we plot the cyclicity vs. detuning together with a theoretical model for several values of C 0 . From this model, we conclude that C 0 is less than 10, and likely closer to 2. Direct measurements at higher detunings are not possible because the count rate falls dramatically.

Single-shot measurement fidelity
Two factors contribute to the ML fidelity: the statistical error set by the signal-to-background ratio during the collection period (SNR), and the probability to decay to the wrong state before enough photons are collected, m/(ηC), where m is the number of photons needed to reach the target fidelity F T . m is related to the SNR as F T = SNR m /(SNR m + 1). In our experiment, SNR is typically high enough (14 for ion 1, limited by a timing error, and around 20 for ions 2 and 3, limited by dark counts) that by the time a single photon is detected, the error from the finite cyclicity is larger than the statistical error. In this regime, a nearly-optimal strategy is to infer that the spin state is |↑ g whenever an "A" photon is detected, and |↓ g whenever an "B" photon is detected. The average measurement fidelity is 1 − 1/(ηC), and the average measurement duration is t meas = 1/(P ex ηC).
Based on this model, we can project how improved devices might lead to improved measurements. Assuming the same demonstrated cyclicity (1500), fiber-waveguide coupling and photon detection efficiency, but improving the cavity to realize Q int = 10 6 with critical coupling (κ wg = κ int ) and using optical π pulses to increase P ex to 1, it FIG. S2. Extracting the bare ion cyclicity, C0. (a,b) Cyclicity measurements on ion 2 (situated in a different cavity) show a similar orientation dependence to ion 1. Each of the two crystallographically inequivalent Y sites in YSO has two possible orientations related by a C2 rotation about the b axis. Ion 2 is in the opposite site from ion 1, so we have inverted the θ axis to make the apparent dependence the same. (c) Measurement of cyclicity for the same ion 2 at several different Purcell factors, achieved by detuning the cavity from the atomic transition by an amount ∆cav. The data is fit to Eq. 19. Here, |B| = 112 G and θ = 90 • . (d) Cyclicity at (ϕ, θ) = (100, 90) • vs. cavity detuning. The model is Eq. 19, where P || and P ⊥ acquire a detuning dependence P (∆i) = Pmax 1+(2∆ i /κ) 2 based on the known Zeeman splittings of the four transitions. Since the decay rates out of the two excited states are no longer equal when the cavity is detuned (i.e., ΓA = ΓB), Eq. 19 is averaged over the two excited states. A fit yields C0 = 2 ± 3.
should be possible to realize an average measurement fidelity of 0.996 in average time of 50 µs. This assumes that SNR remains dark-count limited as the Purcell factor is increased.

Intrinsic spin relaxation
The spin relaxation rates in Fig. 4a are fit to a model of the form T −1 SR = T −1 1,dark + P ex /(t rep C), where the repetition rate t rep is varied to change the optical pumping strength. The intrinsic relaxation rate T 1,dark varies strongly with the magnetic field amplitude, and the cyclicity C also has a weak dependence. The latter is explained by the larger Zeeman shift of the spin-non-conserving transitions CD (∼ 13.1 MHz/Gauss) compared to the AB transitions (∼ 2.5 MHz/Gauss) shifting the former out of resonance with the cavity more quickly (Fig. S3). From this data, we can also affirm that the selective Purcell enhancement of the spin-conserving transition does not primarily arise from detuning the CD transitions, as in Ref. 9, although this effect does provide an additional factor of 2-3 at the highest magnetic fields.
The magnetic field dependence of T 1,dark disagrees markedly with predictions based on the measured coefficients for the Raman, Orbach and direct processes for Er 3+ :YSO [10]. At T = 0.5 K, these are dominated by the direct process, which should have a magnetic field dependence T 1 ∝ B −4 , which arises from the combination of the frequency-dependence of the phonon density of states and the magnetic field-dependence of the spin-phonon coupling [5]. The measured values display a B 1/2 dependence at low fields, transitioning to a more rapid increase around B = 50 Gauss before saturating at 200 Gauss. We note that the point where T 1,dark saturates is roughly  Fig. 4a,b of the main text, we extract the cyclicity of the optical transitions at a fixed magnetic field orientation for varying field amplitudes. The data is fit to the model in Eq. 19, incorporating the detuning-dependence of the Purcell enhancement as described in the caption to Fig. S2. C0 fits here to 5 ± 1. consistent with the onset of the direct process, and that the disagreement could be attributed to anisotropy in the direct process rate. Anomalous magnetic field dependence in the low-field relaxation of rare earth ions has been previously observed in electron paramagnetic resonance [11] without a definitive explanation. Concentrationdependent spin relaxation has been observed in spectral hole burning experiments [12] and attributed to flip-flop interactions between nearby Er ions. This is a likely explanation for our observations, which is bolstered by the difference in T 1,dark for different ions [which may arise from the stochastic arrangement of ions in this low-density sample ([Er] ≈ 300 ppb)] and a strong ansiotropy in T 1,dark (Fig. S4).
7 Additional data analysis 7.1 Correction of cyclicity estimate at small n 0 values In Fig. 2b and thereafter, the intensity autocorrelation g (2) has been fitted to an exponential function and the decay constant n 0 is utilized to extract C = P ex n 0 . This expression for C is only valid when n 0 1 because of the discrete time steps in the measurement. We estimate the value of C more accurately by using the following expression: which reduces to the previous expression for C at large n 0 values. 7.2 Extracting n 0 from g (2) at low optical pumping rates The spin relaxation time is extracted from fits to g (2) measurements as described in Fig. 2b. When these time constants are longer than 1 s, the even-and odd-offset g (2) time constants begin to differ. We believe this results from spectral diffusion of the optical transitions. Under the assumption that this is uncorrelated with the spin dynamics and acts identically on the A and B transitions, we find that the spin time constant can be isolated by fitting an exponential to the difference of the even-and odd-offset traces.