{'fraction_non_alphanumeric': 0.03798266351457841, 'fraction_numerical': 0.014531126871552403, 'mean_word_length': 4.300918964076859, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Quantum Logic Spectroscopy with Ions in Thermal Motion

A mixed-species geometric phase gate has been proposed for implementing quantum logic spectroscopy on trapped ions, which combines probe and information transfer from the spectroscopy to the logic ion in a single pulse. We experimentally realize this method, show how it can be applied as a technique for identifying transitions in currently intractable atoms or molecules, demonstrate its reduced temperature sensitivity, and observe quantum-enhanced frequency sensitivity when it is applied to multi-ion chains. Potential applications include improved readout of trapped-ion clocks and simplified error syndrome measurements for quantum error correction.


I. INTRODUCTION
Quantum logic spectroscopy (QLS) can be used for internal-state preparation and readout of atomic and molecular ion species that lack a suitable electronic level structure to directly implement these tasks [1][2][3][4]. In principle, through the use of a "logic ion" (LI) and its motional coupling to a cotrapped "spectroscopy ion" (SI), QLS allows control over any ion species. The traditional QLS protocol, as presented in Ref. [1], has two main limitations. First, it requires the ions to be cooled to near the motional ground state. Second, its readout efficiency scales poorly with the number of SIs, which could pose an obstacle to achieving the improved stability that could come from scaling quantum-logic-enabled atomic clocks to multiple ions [5]. Methods have been developed to mitigate these effects using repetitive quantum nondemolition (QND) measurements [6][7][8]. However, applying them might not be possible due to an unsuitable electronic structure, and repetitive measurements will decrease the duty cycle of the spectroscopy probe. Here, we demonstrate a QLS method proposed in Ref. [9] based on a geometric phase gate that is often used in quantum information processing for multiqubit entangling gates. This type of geometric phase gate has previously been used on a mixed-species ion pair to implement quantum logic readout with reduced temperature sensitivity as part of a controlled-NOT operation [10]. In that experiment, the interrogation and detection of the SI are accomplished with separate laser operations. We explore a technique, using only a Mømer-Sørensen (MS) interaction [11][12][13][14][15], to simultaneously implement both the spectroscopy operation and transfer of SI state information to the LI for readout. This technique reduces temperature sensitivity compared to traditional QLS [16]. Additionally, the technique can be applied to multiple SIs, for which it can exhibit Heisenberg-limited spectroscopic sensitivity [17,18]. Assuming the LI and SI are singly charged, the coupling strength will depend on the mass ratio of the ions, with the strongest coupling for equal masses. In multispecies experiments done so far, quantum logic spectroscopy has been accomplished with mass ratios of up to approximately four. Since state control of ions with masses from 9 u ( 9 Be + ) up to 176 u ( 176 Yb + ) has been achieved, it should be possible to perform quantum logic spectroscopy with singly charged ions having masses up to about 4 × 176 u. While our technique shares some features with previous work, which implements Heisenberg-limited Ramsey [19,20] and Rabi spectroscopy [21], it extends metrology that takes advantage of entanglement to a wider range and number of spectroscopy ions [9].

A. Basic operations
Modeling ions as effective two-level (spin-1/2 with eigenstates ) and ) systems with coupling through a shared harmonic oscillator normal mode of motion with frequency ω m and eigenstates n , we require interactions that can drive motional sideband transitions n n ± 1 with "+" denoting a "blue" sideband (BSB) and "-" a "red" sideband (RSB). Relative to the spin ("carrier") transition, the detunings of the RSB and BSB are δ = ± ω m + δ MS , where δ MS serves to implement the MS interaction. Such interactions can be implemented with laser fields [22] and microwave fields [23,24] and have been demonstrated on mixed-species pairs and triads [10,25,26]. For simplicity, we initially assume equal and known sideband Rabi frequencies Ω sb and explore more general Rabi frequencies later in Sec. III B. If the BSB and RSB are applied simultaneously for t MS = 4π/δ MS (twice the duration of a typical MS entangling operation U MS ), and with detuning δ MS = 4Ω sb , for an even number of ions K, the system undergoes (up to a global phase factor) a complete spin flip Here, σ j i are the Pauli operators j ∈ x, y, z acting on ion i. We call this operation a "mutually controlled multiflip" (shortened to "multiflip" in the following.) However, if K is odd, the interaction does not result in a spin flip, and, instead, the system only accumulates a global phase. See the Appendix A 2 for the full MS Hamiltonian and details of the implementation.
Now, let us consider two species of ions (LIs and SIs) with pseudospin states labeled LI , LI and SI , SI , respectively, driven by independent RSBs and BSBs but with the same Ω sb . Let the detunings of the LI sidebands be δ LI = ± ω m + δ MS as above.
The SI sidebands have an additional detuning so that δ SI = ± ω m + δ MS + δ S . In this scheme, δ S acts as a "switch" to turn on and off the SI's participation in the interaction. The SI resonance frequency, which would initially be unknown in a general spectroscopy experiment, can also be located by scanning δ S .
For M SIs and N LIs, if the BSBs and RSBs for both species are applied simultaneously and on resonance (δ S = 0), all ions undergo a complete spin flip as described above, provided M + N is even. Far off resonance δ S ≫ Ω sb , only the parity of N matters, with the LIs undergoing the interaction and the SIs unaffected. For example, if N is even, the interaction that occurs is described by where I SI is the identity operator acting on all M SIs and σ x i acts on LI i ∈ 1, …N. In this paper, we consider the specific cases of N = 1 and M odd or both M and N even.
For N = 1 and the SIs far off resonance, the effect on the single LI is just a phase factor e iπ/4 .
For intermediate detuning, δ S ≃ Ω sb , the dynamics are complicated, leading to substantial populations in several basis states. The probability of the LI flipping as a function of δ S (i.e., the spectral line shape) is not straightforward to express analytically and depends on the temperature of the motional mode, but qualitatively the result on the logic ion is that it continuously transfers from no flip to a full flip as δ S is swept from far detuned to on resonance.
For M and N even, the LIs flip with both the SIs on resonance and far off resonance, since both M + N and N are even. Other states are populated for an intermediate detuning δ S ≃ Ω sb leading to a characteristic, temperature-dependent line shape.
In all cases, the multiflip retains the temperature insensitivity of the MS interaction in the Lamb-Dicke (LD) regime [13], so it can be used as a robust combined spectroscopy probe and readout method. Moreover, the center frequency of the resonance does not depend on the initial states of the two species (though the line shape and linewidth do). Hence, when searching for the approximate location of an unknown transition, it is not necessary to prepare the SIs in a pure state [27]. As described so far, the multiflip is analogous to Rabi spectroscopy and ideally achieves a Fourier-limited frequency resolution of approximately 1/ t MS when scanning the detuning δ S . The characteristics of Ramsey spectroscopy appear when the MS interaction is applied twice with a duration of t MS /2 (effective π/2 pulses) before and after a period T R of free evolution. Analogous to traditional Ramsey spectroscopy, this sequence ideally achieves Fourier-limited frequency resolution (1/T R for a single SI) if the effective π/2 pulses are much shorter than the Ramsey free evolution time, i.e., t MS ≪ T R . As discussed in the next section, for more SIs driven on resonance, M-partite entangled "Schrödinger-cat spin states" [20,28,29] evolve during T R to ideally achieve Heisenberg-limited resolution.

B. Heisenberg scaling
In the Ramsey version of the multiflip, the SIs evolve in a maximally entangled state, resulting in increased frequency sensitivity, i.e., providing Heisenberg scaling with the number of SIs [9,[18][19][20][21]. For example, if an ensemble of N SIs and M LIs (N and M even) is prepared in the spinup state 1 , 2 , … N + M , the first Ramsey pulse results in a Schrödinger-cat spin state for the SIs and LIs. Its evolution is then mapped onto the LIs with the second Ramsey pulse.
The LIs being part of the entangled state does not add frequency sensitivity. In principle, a single LI would suffice, although a larger number of LIs could result in a better detection signal (for example, with three or more LIs, one can perform a majority vote to decide whether the SIs have flipped or not) and also improve the initial cooling of the mixedspecies ion chain. For best performance and the simplest implementation, the mode of motion being driven in the MS interaction should ideally have the same mode amplitudes for all ions of the same species. For long ion chains, this result could be approximately achieved by using the in-phase mode of motion (see Appendix D).

C. Influence of LI properties on the protocol
We note that, by symmetry between the LIs and SIs in this protocol, any detuning of the LIs from resonance shifts the line center in Rabi spectroscopy and the fringe pattern in Ramsey spectroscopy. In addition, any decoherence of the SIs or LIs reduces the contrast of the signal.
To reduce the impact of frequency instability of the LI, it is advantageous to choose an LI with a low absolute frequency transition, for example, a hyperfine transition (approximately 1 GHz), to pair with an SI with an optical clock transition (approximately 1 PHz). In this case, the fractional stability of the LIs can be approximately 10 6 worse than that of the SIs, given by the frequency ratio of the two transitions. When applying the technique to state-ofthe-art optical atomic ion clocks with fractional frequency uncertainties at the approximately 10 −18 level, this choice requires approximately 1 GHz LI transitions to have a frequency uncertainty of about 10 −12 . This stringent requirement can be relaxed by deploying dynamic decoupling sequences, where suitable π pulses on only the LIs refocus their phase during free-precession periods. This relaxation can reduce the contribution of the LIs to the accumulated phase by orders of magnitude. Shifts in the clock transition due to LI driving fields can be suppressed by techniques similar to hyper-Ramsey and autobalanced spectroscopy [30][31][32]. Finally, the dependence of the LI's spin population on both the LI and SI can also be used to implement "designer atoms" or an "atomic combination clock" using two clock species [33,34], where one of the clock species does not require a direct readout.

A. Basic method
We demonstrate the basic features of this method on a mixed-species ion pair of electronic ground-state hyperfine qubits composed of one SI ( 25 Mg + with the two-level system defined as Mg = 3, 1 and Mg = 2, 0 , with a frequency splitting ω Mg ≈ 2π × 1.7632 GHz at the applied magnetic field of B ≈ 11.9 mT) and one LI ( 9 Be + with Be = 1, 1 , Be = 2, 0 , with a frequency splitting ω Be ≈ 2π × 1.2075 GHz at the same magnetic field). The MS interaction is implemented on the in-phase mode of motion along the (axial) direction defined by the line connecting the equilibrium positions of both ions. We perform Rabi-and Ramsey-type experiments with both axial modes of motion initially cooled to the ground state, while the LI is prepared in and the SI in either or . We repeat this procedure for a range of values of δ S and detect both the LI and SI spin states (see Appendix A 1 for details on cooling, state preparation, state detection, and the MS interaction). The LI is driven on resonance throughout the entire series of experiments.
As predicted for the multiflip protocol, both the LI and SI show a clear simultaneous resonance at δ S = 0 [Figs. 1(a) and 1(b)]. The asymmetries visible at larger detuning arise from the red-or blue-detuned light fields of the MS interaction becoming resonant with red or blue sideband transitions when δ S = ± δ MS . For large values of δ S , the spin states of both ions remain unchanged. To fit the full spectrum of these Rabi-type experiments, we numerically simulate the evolution of the full system Hamiltonian without making the LD approximation, truncating the harmonic oscillator Hilbert space at n = 10. We fit the resulting spin populations to the data. We use the parameter c to define Ω MS LI = cΩ MS and Ω MS SI = Ω MS /c and optimize by varying c, Ω MS , δ MS , and t MS . We choose this parametrization of the Rabi frequencies because Ω MS 2 = Ω MS LI Ω MS SI is calibrated precisely, but we cannot assume c = 1 because we do not precisely calibrate the SI and LI Rabi rates separately. We find good agreement between the data and fit. In principle, it is possible to set c > 1 deliberately if the SI laser intensity is too low to achieve Ω MS SI = Ω MS LI , and increasing the gate duration would lead to detrimental effects. These experiments confirm that the initial spin state of the SI does not significantly impact the spectroscopy signal of the LI and that the LI's signal faithfully represents the SI's spin resonance.
When cooling the ions to the ground state and sweeping δ S in a Ramsey-type experiment with free evolution time T R = 1 ms, we observe the expected sinusoidal pattern for both species with a contrast in the LI signal of 0.89(1) and a phase offset between LI and SI oscillations of Δϕ = 0.01 (1) [Fig. 1(c)]. The imperfect signal contrast, caused by experimental error sources (the leading contributions are most likely relative phase fluctuations between the Raman beam pairs), reduces the frequency sensitivity of the measurement (slope) by a factor equal to the contrast. This reduction is not a fundamental limit of the method and could be improved by reducing the experimental imperfections. While the phase offset between SI and LI oscillations in these data is not significant, it is possible for a phase shift to arise from imperfect Ramsey-pulse calibration and a finite temperature. This phase offset poses a potential issue for precision spectroscopy, but simulations show that it can be suppressed by using a modified pulse sequence (see Appendix C).

B. Robustness of the method
To demonstrate the robustness of the multiflip, we perform two sets of experiments under nonideal conditions. In the first instance, we investigate the effects of unwanted residual thermal motion. Instead of ground-state cooling, we Doppler cool the LI of the ion pair [resulting in thermal states with mean occupations of n = 3.3 5 /1.7 1 for the axial in-phase or out-of-phase modes of motion; the MS interaction is again implemented using the inphase mode]. We tune the Rabi frequencies for both species to the optimal values for the respective n. The LI shows a resonance with a contrast of approximately 65% in a Rabi experiment [ Fig. 1(d)] and 57(2)% in a Ramsey experiment for the LI populations and a phase offset between the LI and SI oscillations of Δϕ = 0.21 (4) [ Fig. 1(e)]. Here, the reduction in contrast can be attributed to the relatively high LD parameters of our experiment (η Be ≈ 0.17) and η Mg = 0.29 for the in-phase mode), which cause fluctuations in Debye-Waller factors. From simulations, we find a contrast of approximately 97% for a Ramsey-type experiment using the same thermal excitation as in the experiment (n = 3.3) but using LD parameters of η = 0.1 for the LI and SI. The phase offset is expected from simulations, caused by the combination of large LD parameters, thermal occupation of the motion, and potential miscalibration of the pulse parameters. Simulations imply that a modified pulse sequence can be used to suppress the offset (see Appendix C). This ability to operate with imperfect motional ground-state preparation in frequency measurement and clock applications can save time otherwise spent on ground-state cooling, improving the duty cycle (thereby reducing the Dick effect [36,37]). The tradeoff between an improved duty cycle and reduction in contrast depends highly on the details of the experiment, e.g., initial Doppler temperature, heating rate of the trap, the ion LD parameters, and other error sources on logic operations. One should also consider the effects of second-order Doppler shifts when working at a finite temperature. The target level of precision, together with these considerations, informs the preferred spectroscopy conditions as demonstrated, for example, across different aluminum ion clocks [38,39].
In another set of experiments, we consider a case where Ω MS 2 is not ideal. This case could be useful in situations where SI transition frequencies and corresponding coupling strengths are not well known and have to be found and identified first, as is the case with many molecular ions. As a test, we ground-state cool the ion pair and set the Rabi frequency Ω MS SI of the SI MS interaction to roughly half [ Fig. 1(f)] or twice the optimal value Ω MS [ Fig. 1(g)]. The experiment with the SI Rabi frequency reduced (increased) by a factor of 2 shows a contrast of approximately 40% (approximately 70%) in the LI signal at δ S ≈ 0. In addition to the reduction in contrast, the LI signal exhibits increased sidelobes when the SI is overdriven.
For Ω MS SI = 2Ω MS , the additional resonances where the blue-detuned (red-detuned) frequency component of the MS interaction is resonant with the blue (red) sideband transition (δ S = ± δ m ) are more strongly pronounced. Counterintuitively, the SI signal shows a much stronger sideband resonance when it is underdriven [ Fig. 1(f)]. This result is because the weakened MS interaction causes reduced coupling between the spins. When Ω SI > Ω MS , the MS interaction increases, causing the LI and SI spectra to overlap over a larger range of detunings.
The capability to find transitions with an accuracy of approximately ±δ MS combined with the LI's signal independence of the initial state of the SI and the possibility to operate with imperfect ground-state cooling could speed up searches for transitions. Once a transition is found, Rabi frequencies and transition frequencies can be determined more precisely.
We fit all datasets as described in Sec. III A. When fitting the Doppler-cooled data, the harmonic oscillator Hilbert space is truncated at n = 20, and a thermal state with n = 3.3 is used as the initial state. For comparison, simulations of traditional QLS using the thermal excitation measured in the experiment with just Doppler cooling give a contrast of approximately 23% in a Ramsey sequence (compared to approximately 57% with the multiflip). The pulse durations are optimized numerically for the best contrast. Both the optimized pulse durations and the contrast depend on the temperature. Lowering the LD parameter as proposed for the multiflip when using Doppler cooling results in a decrease of the contrast for the traditional QLS. For the above simulated example of n = 3.3 and LD parameters η = 0.1 for both the LI and SI, the traditional QLS would result in a contrast of approximately 18%.
With the SI Rabi frequency reduced by a factor of 2 in a Rabi sequence using the traditional QLS, we predict a contrast of 50% (compared to approximately 40% for the multiflip). With the SI Rabi frequency increased by a factor of 2 in the traditional QLS, no usable signal exists on resonance (2π spin flip), but symmetric side peaks at approximately ±2π × 300 kHz relative to the resonant frequency show a contrast of approximately 47%, which could also be used to identify the transition (compared to approximately 70% on resonance for the multiflip). We conclude that imperfect Rabi-frequency settings affect both the traditional QLS and multiflip roughly equally.

C. Application to four ions
Finally, we demonstrate the behavior of the multiflip for larger systems of ions in Ramseytype spectroscopy. We use a four-ion linear chain of two SIs ( 25 Mg + ) and two LIs ( 9 Be + ). The ions in the chain are ordered 9 Be + -25 Mg + -25 Mg + -9 Be + . We implement the MS interaction on the motional mode in the axial direction, for which the 9 Be + -25 Mg + pair of the chain oscillates out of phase with the remaining 25 Mg + -9 Be + pair. All axial motional modes are cooled to the ground state, and the spin state of the ions is initialized to LI SI SI LI . We perform a Ramsey-type experiment (Fig. 2) with free evolution time T R = 500 μs (Ramsey pulse duration 64 μs) and observe a contrast of 75(2)% with the same Ramsey fringe oscillation frequency as the two-ion experiment for T R = 1 ms, consistent with Heisenberg scaling. The LI-LI and SI-SI oscillations do not show a significant phase offset [Δϕ = 0.03 (3)]. A phase offset, which could again arise from imperfect calibration of the Ramsey pulses or other imperfections, can, as in the two-ion case, be canceled with a modified pulse sequence (see Appendix C).
In practice, the signal-to-noise ratio is reduced below that expected for Heisenberg scaling due to the loss in contrast from imperfect entangling operations [20]. The enhancement from multiqubit entanglement depends on various aspects of the particular experimental realization, such as the properties of the local oscillator [40,41]. In our experiment, the reduction in contrast is mainly caused by slow fluctuations of the relative phase between the Raman beams, which could be mitigated by actively stabilizing this phase. This error reduces the contrast by approximately 0.08 in the two-ion experiment and by approximately 0.17 in the four-ion experiment, in close agreement with the expectation that the phase sensitivity of the four-ion entangled state should be twice that of the two-ion entangled state.

D. Applications in quantum information processing
The multiflip can be used on resonance (δ S = 0) as a QND measurement method to detect if the SI (or qubit) is in the intended two-level manifold. In particular, if the SI can be described as a three-level system, with levels a and b defining a qubit and c an auxiliary state, the multiflip can be used to detect any leakage into level c, which in a quantum information processing context would be described as a leakage error. When the multiflip is applied to the a -b state manifold, the final state of the LI will indicate if a leakage event has occurred, and, if not, the qubit can be restored with a single-qubit rotation that reverses the rotation of the SI caused by the multiflip. Leakage will be relevant at some level for almost any quantum information or spectroscopy application. Streamlined QND detection of this error could reduce error-correction overhead [42]. Similar ideas about the use of the multiflip for detecting leakage errors are contemplated by Schindler et al. [43].
The multiflip could also be used as a general QND readout method of the populations of a two-level system in trapped ions: Invoking the three-level model described in the previous paragraph, the MS multiflip could be used to determine the populations of the states a and b by applying the multiflip to the state manifolds a-c or b-c. This QND measurement could also be used to improve readout fidelity in frequency measurement and clock applications with potentially fewer repeated applications compared to Refs. [6][7][8] due to higher singleshot fidelity.

IV. CONCLUSION
We have demonstrated a new method for QLS based on the MS interaction using a mixedspecies ion system, showing its basic behavior, its robustness to experimental imperfections, and how it scales in larger systems. This "multiflip" technique provides a spectroscopy method with improved readout performance compared to traditional QLS. Additionally, it can be used as a combined multi-ion-clock probe and readout technique, naturally providing Heisenberg scaling in Ramsey-type spectroscopy, which could help improve the stability of ion-based clocks.
Further applications of the multiflip in quantum information include optimized QND errorsyndrome measurements, which may help to scale future trapped-ion quantum computers to larger numbers of qubits. The MS multiflip might also be generalized to other systems where oscillators can be coupled to two-level systems, such as superconducting circuits, the rovibrational levels of a molecule, or micro-and nanomechanical resonators.
With analogous pulse sequences, the 25 Mg + 3, 3 state is transferred to the 2, 2 state and subsequently to the 3, 1 = Mg state.
To measure the qubit states, the initial mapping procedure is reversed, putting the Be and Mg states back in their respective cycling transition ground states. The Be ≡ 2, 0 and Mg ≡ 2, 0 states are shelved to 1, − 1 and 2, − 2 , respectively, using a single microwave π pulse for the 9 Be + 2, 0 1, − 1 transition and composite pulse sequences for the 2, 0 3, − 1 and 3, − 1 2, − 2 transitions of 25 Mg + . We subsequently apply the Doppler-cooling laser beams tuned to resonance and collect the fluorescence light of the ions with an achromatic imaging system designed for both 313 and 280 nm light [47]. With a detection duration of 330 μs for 9 Be + (200 μs for 25 Mg + ), we detect on average 30 photons per ion when they are in the 2, 2 3, 3 state and 1.9 (0.7) photons when they are in the 1, − 1 2, − 2 state (predominantly from light scattered by the trap structure). The qubit state is determined by choosing a photon-count threshold of ten counts such that the states are maximally distinguished. To prepare the initial state of the four-ion string 9 Be + -25 Mg + -25 Mg + -9 Be + , we use the same techniques and ground-state cool all four axial modes. Here, the qubit states are determined by fitting Poissonian distributions to histograms of the count data.

Mølmer-Sørensen interaction, four-ion entangled state
The MS Hamiltonian in the interaction picture can be written (neglecting fast-rotating terms, in the LD regime, and for a single motional mode) as H = ℏ j Ω MS j σ j ae i δ S j δ m t ϕ r σ j a e i δ S j δ m t ϕ b + H . c . , where the sum runs over the number of ions with j labeling the ion and Ω MS,j the Rabi frequency for each ion, defined as Ω MS,j = η j Ω 0,MS,j with Ω 0,MS,j the carrier Rabi frequency of each ion and η j = δk j z 0, j b j the respective ion's LD parameter. The difference of the k vectors of the Raman beams addressing the jth ion is given by δk j , b j is the normalized motional mode amplitude of the jth ion, and z 0, j = ℎ/ 2m j ω m with m j the mass of the jth ion and ω m the oscillation frequency of the motional mode used. The detuning from the motional mode is δ m , t the duration, δ S,j the detuning from the respective ion's spin transition, σ j + the respective ion's spin raising operator, and a a † the lowering (raising) operator of the motional mode used. Without loss of generality, we can set all optical phases to zero. Unless otherwise noted, the Rabi frequencies are assumed to be equal for all ions Ω MS,j = Ω MS .
The implementation of the MS interaction on the two-ion pair is as described in Ref. [10] with the difference that the MS interaction is implemented on the axial in-phase mode of motion that has an oscillation frequency of approximately 2π × 2.1 MHz, resulting in LD parameters of η Be ≈ 0.17 and η Mg ≈ 0.29 for the two species. We choose to implement the MS interaction for the four-ion chain (ordered 9 Be + -25 Mg + -25 Mg + -9 Be + ) on the motional mode in the axial direction, for which the 9 Be + -25 Mg + part of the chain oscillates out of phase with the remaining 25 Mg + -9 Be + part, which has an oscillation frequency of approximately 2π × 3.1 MHz, resulting in LD parameters of η Be ≈ 0.17 and η Mg ≈ 0.14 for the two species.
When applying the MS interaction to the state Be Mg Mg Be for a duration t = 2π/δ MS ≈ 66 μs, we measure a state fidelity of 0.937(6) for the four-ion Schrödinger-cat-type state 1/ 2 Be Mg Mg Be + i Be Mg Mg Be , by performing an analysis of spin populations and spin parity measurements [48]. For this analysis, we measure the spin state of each ion individually by splitting the 9 Be + -25 Mg + -25 Mg + -9 Be + ion chain into two 9 Be + - 25  , where U free t is the free evolution for the duration t. Using simulations, we find that a sequence with only a single π pulse after half the Rabi or Ramsey sequence mirrors the detuned resonance feature; i.e., the resonance is centered on −δ S LI instead of δ S LI when the MS interaction is detuned by δ S LI .

APPENDIX C:: LI-SI RAMSEY PHASE OFFSET CANCELLATION
Residual spin-motion entanglement after the MS interaction can lead to a phase offset in the Ramsey-type protocol. This offset can be caused by a finite temperature, large LD parameters, and imperfect calibration of MS-interaction parameters. The phase shift can be suppressed by increasing T R or eliminated by constructing a four-measurement error signal instead of a two-measurement error signal [49]. The four-measurement error signal is given by e = P SI > , ϕ = π/2 LI − P SI > , ϕ = − π/2 LI + P SI > , ϕ = π/2 LI − P SI > , ϕ = − π/2 LI , where P SI / SI , ϕ = ± π/2 LI is the measured population of LI after a Ramsey-type sequence with the initial SI state prepared to SI / SI and the phases of the SI red and blue sideband tones shifted by ±π/2 for the second Ramsey pulse relative to the first. This more complex protocol still features the same SNR as the original; i.e., a single round of the four-measurement sequence gives the same amount of information as two rounds of the twomeasurement sequence.

APPENDIX D:: MOTIONAL MODE AMPLITUDES FOR LONG ION CHAINS
For high multiflip contrast, the Rabi frequencies of all LIs and SIs should be the same. This requirement can be challenging in long ion chains, because the mode amplitudes will, in general, be different for different ions along the chain. However, this effect is least pronounced for the axial in-phase mode of motion. To demonstrate this difference, we calculate the mode amplitudes for 40 Ca + and 27 A1 + chains with different numbers of ions and find that the axial in-phase mode amplitudes for ions of the same species differ by an experimentally insignificant amount. For example, in a symmetric ion chain with seven 27 A1 + and six 40 Ca + (alternating) ions confined by a potential with normal mode frequencies for a single 27 A1 + ion of 2π × {6, 6.1, 1} MHz (with the lowest value corresponding to the axial direction), we find relative differences in the axial in-phase mode amplitudes for each ion species to be below 1%. Spin populations for the four-ion chain LI-SI-SI-LI (SI, blue; LI, orange), initially prepared in the spin state LI SI SI LI , performing Ramsey spectroscopy with free evolution time T R = 500 μs. The data show the same Ramseyfringe oscillation frequency as the LI-SI data with T R = 1 ms, consistent with Heisenberg scaling. We fit sinusoids to the LI-LI and SI-SI data [displayed in matching colors with solid (dashed) curves for fits to SI (LI) data] and extract a contrast of 75(2)% for the LI data and a phase shift between the LI-LI and SI-SI data of Δϕ = 0.03 (3). In this experiment, t MS ≈ 64 μs. Error bars (1 sigma) are calculated assuming quantum projection noise only. Each data point represents the average outcome of 200 repetitions of the experiment.