Designing gate operations for single ion quantum computing in rare-earth-ion-doped crystals

Quantum computers based on rare-earth-ion-doped crystals show promising properties in terms of scalability and connectivity if single ions can be used as qubits. Through simulations, we investigate gate operations on such qubits and discuss how gate and system parameters affect gate errors, the required frequency bandwidth per qubit, and the risk of instantaneous spectral diffusion (ISD) occurring. Furthermore, we examine how uncertainties in the system parameters affect the gate errors, and how precisely the system needs to be known. We find gate errors for arbitrary single-qubit gates of $2.1\cdot 10^{-4}$ when ISD is not considered and $3.4\cdot 10^{-4}$ when we take heed to minimize it. Additionally, we construct two-qubit gates with errors ranging from $5\cdot 10^{-4} \rightarrow 3\cdot 10^{-3}$ over a broad range of dipole-dipole interaction strengths.

The qubit is encoded in the ground hyperfine states, which can have lifetimes of days [34] and coherence times of hours [35], while gate operations are performed using optical transitions to an excited state with coherence times of up to milliseconds [36,37]. Individual qubits are addressed in frequency space, where each qubit occupies a specific frequency channel, of which there can be many thanks to the large inhomogeneity in the optical transitions [34]. The spectral addressing makes it possible for the ions to be packed at nanometer spacing in three dimensions, thus providing very high qubit densities. This in turn allows for strong dipole-dipole interactions even between qubits that are not nearest neighbours [25,26,[38][39][40], leading to high connectivity. The dipoledipole interaction might also be used when reading out the state of qubits via co-doped readout ions [28]. The optical transitions simplifies the process of transferring quantum information into flying qubits, which opens up the possibility to perform remote entanglement and construct quantum networks.
However, due to the difficulty of detecting single ions, most results so far have been limited to use the ensemble approach where the qubit consists of many rare-earthions, and where the resulting inhomogeneities complicate * adam.kinos@fysik.lth.se the gates and limit the fidelities [38,39,[41][42][43][44][45][46]. Furthermore, this ensemble approach has been shown to scale poorly [28], but might still be useful, e.g., when using stoichiometric materials where small quantum processors have been envisioned [31]. Fortunately, recent progress in single-ion detection [47][48][49][50][51][52] paves the way for singleion rare-earth quantum computing. In order to focus the research community, a roadmap for rare-earth quantum computing using single-ion qubits has now been developed [53]. One important step in this process is choosing a good system and designing high fidelity gate operations in a scalable and realistic way. This is complicated since each of the system and gate parameters affect the gate operations and the properties of the quantum computer in multiple different ways. For example, the gate duration affects the gate error in three different ways, but it also sets an upper limit to the speed of the quantum computer, and affects the required frequency bandwidth per qubit thus potentially limiting the number of qubits available in the quantum computer.
In the present work we design qubit operations that take the known complexities into account and explain what effects different parameter choices have. Our intention is that the detailed analysis and discussion of singleand two-qubit operations provided in this work can form a foundation for studying interactions and operation fidelities involving larger number of qubits. In this way it can further develop the possibilities to reliably analyze scalability of rare-earth-ion-based quantum computing.
An overview of the sections and content of the paper is now provided. In Sec. II the system and the single-qubit gate operations used are described and motivated. The connection between different error sources and system and gate parameters are discussed, and gate parameters giving low gate errors are provided. The error sources we investigate are categorized in three different ways: decay and decoherence, which include fundamental and unknown error sources; internal crosstalk, which we define as error sources that only depend on the properties and control of an individual qubit, and in this work we assume that internal crosstalk only occurs when gate operation pulses off-resonantly drive other transitions in  [54], including the two optical driving fields with strengths Ω A 0 and Ω A 1 , and phases φ A 0 and φ A 1 , respectively. All simulations assume a zero magnetic field in the sense that the hyperfine levels are doubly degenerate, i.e., |+1/2g overlaps with |-1/2g and will therefore be treated as one single level, |±1/2g . b) Relevant energy levels for a second qubit, qubit B. Its optical transitions are detuned from qubit A due to an inhomogeneous broadening which is concentration dependent and can be up to hundred GHz broad [34]. The two qubits interact through a dipole-dipole interaction which shifts the optical transitions of one qubit when the other is excited. The shift, ∆ν, is proportional to 1/r 3 , where r is the distance between the qubits. c) The relative oscillator strengths of the different transitions [55], and the assumed life-, T1, and coherence, T2, times for the optical and ground transitions [36]. The ground state times are assumed infinite since they can be much longer compared to their optical counterparts [34,35,56,57]. d) The optimal transmission windows in the inhomogeneously broadened absorption profile surrounding the frequencies of the two qubit transitions |0 → |e and |1 → |e , indicated by the green and blue lines, respectively,, where the former transition has a frequency of ν0.
the qubit than the intended ones; and finally, external crosstalk, which we define as error sources that depend on properties external to an individual qubit, e.g., errors occurring when pulses intended to drive one qubit also off-resonantly drive the transitions in another qubit, or instantaneous spectral diffusion (ISD) where a non-qubit ion is unintentionally excited and cause an instantaneous frequency shift of the optical transitions of the qubit. Sec. III investigates how gate operations on one qubit affects another qubit, how this scales when adding more qubits, and how it connects to the frequency bandwidth per qubit and hence the number of potential qubits in the quantum computer. Following this, two types of twoqubit gate operations, the blockade and interaction gates, are analyzed in Sec. IV. Then, Sec V determines how precisely the system parameters need to be known with respect to uncertainties and fluctuations. In this section we also briefly discuss another external crosstalk effect, namely spectral diffusion [58][59][60], which is different from ISD since the latter only occurs when other non-qubit ions are excited by the gate operation pulses. Finally, the paper is concluded in Sec. VI.

II. SINGLE-QUBIT GATE OPERATIONS
In order to investigate how high the fidelity of singleand two-qubit gate operations can be in a realistic case using single ions, we start by deciding on a system. Here we investigate site 1 of 153 Eu:Y 2 SiO 5 , whose relevant properties such as energy level structure, relative oscillator strengths, and life-and coherence times used in the calculations can be seen in Fig. 1. We pick |±1/2g = |0 and |±3/2g = |1 as our qubit system. Motivations behind these choices are provided later in this section.
Single-qubit (SQ) gate operations can be performed in several different ways, e.g., see references [27,43,[61][62][63]. In this work we focus on arbitrary SQ gate operations performed using 2 two-color optical pulses resonant with the transitions from the qubit levels to the excited state |±5/2e = |e , roughly following the scheme presented in [43]. Since we investigate a resonant single-ion qubit, the dark state compensation pulses used in [43], which are designed to fix a phase error for ions that are optically detuned from the pulses, are no longer necessary and are not used. Furthermore, the hyperbolic secant pulse shape in [43], which achieves robustness against certain fluctuations at the cost of a longer gate duration, is changed to a cut Gaussian envelop to achieve the required pulse area in a shorter duration. For completeness, we describe the SQ gate operation procedure here.
First, a two-color pulse with Rabi frequencies Ω 0 (t)e iφ0 and Ω 1 (t)e iφ1 , that have a relative phase of φ = φ 1 − φ 0 , is sent in. Both components have the same cut Gaussian pulse shape, Ω 0 (t) = Ω 1 (t) = Ω(t): where t g is the cut-off pulse duration, σ is the standard deviation of the Gaussian, C 1 is chosen so that a pulse area of π/ √ 2 is achieved, and C 2 enforces the shape to start and end at zero [61,64]. The qubit system now has two superpositions, called bright and dark, which are coupled or uncoupled, respectively, to the excited state. These superpositions are defined as follows [43]: The interaction strength with bright state is increased by a factor √ 2, and since the pulse area of the cut Gaussian is chosen to be π/ √ 2, the first pulse performs a π rotation, thus exciting |B to |e .
The second two-color pulse is identical to the first, except for a phase change of the driving fields, This deexcites |e back to |B , but with an added phase of e iθ compared to the dark state, |D . By picking various choices of φ and θ any SQ rotation can be performed, keeping in mind that one can always redefine the phases of subsequent pulses to perform a virtual z rotation [65].
The simulations in this article numerically solve the Lindblad master equation [66] with either 6 or 36 energy levels depending on if the simulation is for one or two qubits, see Appendix A for more information. Unless otherwise specified, the gate errors provided are the average error when averaging over six initial states for each qubit: , where we disregard any normalization factors, and six gate operations: where I is the identity operator, and X and Y are the Pauli operators [68]. The error, , is calculated using: where ρ is the achieved density matrix from the simulation and Ψ is the desired target state.
We now investigate three error sources that affect the SQ gate error: decay and decoherence; internal crosstalk; and instantaneous spectral diffusion (ISD). In Fig. 2a one can see how the average SQ gate error depend on the gate duration as well as the main source of the error. Long gate durations lead to errors due to decay and decoherence. Short gate durations lead to internal crosstalk as the pulses off-resonantly interact with other energy levels in the qubit than the intended ones. This can be in the form of state leakage where population is transferred to another energy level, which scales as 1/δ 2 where δ is the detuning to a nearby unwanted transition, or phase errors due to an AC Stark shift, which scales as 1/δ [69,70].
Instantaneous spectral diffusion (ISD) is another error source in rare-earth-ion-doped crystals where a non-qubit ion interacts with a qubit ion in an unpredicted way via the dipole-dipole interaction explained in Fig. 1b. Here the pulses intended to perform a gate operation on the qubit ion also excites a non-qubit ion (potentially offresonantly) which through the dipole-dipole interaction shifts the resonant frequencies of the qubit ion. This can lead to either phase errors on the qubit or an unwanted entanglement between the qubit and the non-qubit ion. The effect on the SQ gate error from this interaction depends on both how detuned the non-qubit ion is from the pulses and the distance between the non-qubit and qubit ion, since the latter determines the dipole-dipole interaction strength. ISD is therefore a stochastic error which depend on the properties of the non-qubit ions surrounding a particular qubit ion.
Using this knowledge, one can now motivate our choice of system. 153 Eu:Y 2 SiO 5 site 1 have long life-and coherence times making it possible to achieve low gate errors even for relatively long gate durations. Furthermore, the level splittings are relatively large, thus minimizing internal crosstalk. Lastly, the qubit and excited states |0 , |1 , and |e , are picked because the relative oscillator strengths for those transitions are relatively high, 0.75 and 0.20, respectively, and the frequency separation to other transitions are relatively large, and both these properties also help in minimizing internal crosstalk.
Furthermore, one way to minimize the risk of ISD occurring is to isolate the qubit ion in frequency space from non-qubit ions which otherwise may be excited and affect the gate operation. This can be done using spectral hole burning techniques [26,41,55,71], where semipermanent transmission windows are burned into the inhomogeneously broadened rare-earth-ion ensemble, see Fig.  1d. One can calculate the largest possible widths of such windows by iterating through all inhomogeneously broadened ions and placing them in the ground state whose transitions to all excited states are as far away as possible from the frequencies of the two qubit transitions. These widths depend on which qubit system is picked, and wide windows reduce the risk of ISD more than narrow windows since it forces the non-qubit ions to be further detuned from the gate operation pulses. For our choice of system, the empty regions surrounding the two optical transitions, |0 → |e and |1 → |e , range from −9.0 MHz to 9.1 MHz, and −35.9 MHz to 14.6 MHz, measured from the center of the respective transitions. The fact that the second window is wider is good since that transition has a lower relative oscillator strength, and therefore requires stronger fields to drive with the same Rabi frequency. Outside of these empty regions there are Single-qubit (SQ) gate error as a function of the SQ gate duration for a physical system (solid blue), a system with only decay and decoherence (dashed red), and a system with only internal crosstalk (dotted yellow). As can be seen, short (long) gate durations lead to errors mainly due to internal crosstalk (decay and decoherence). The pulse shape of the gate operation is defined in Eq. 1 with tg/σ = 0.4, where 2tg is the SQ gate duration. The black dot shows the total gate duration for the optimized parameters used to simulate arbitrary SQ gate operations in this work, which means that our gate is mostly limited by decay and decoherence. b) Shows the Rabi frequency envelope of the optimized pulse with parameters: tg = 1.68 µs and σ = 4.16 µs in Eq. 1, with a total gate duration of 2tg = 3.36 µs. c) Shows the total SQ error as a function of the number of randomized arbitrary SQ gate operations using the optimized gate parameters listed above and performed on the system depicted in Fig. 1. The simulation is repeated 100 times, and the solid blue line shows the average error whereas the lighter blue region shows the standard deviation. The dashed black line is a fit based on Eq. 6 with an average error rate of a lot of non-qubit ions that if excited can cause ISD which may increase the gate error. Note that in a real experimental setup the transmission windows might have some residual absorption. Furthermore, depending on how the qubit ion is initialized there may be multiple other ions that are also transferred back into the transmission windows. Such ions can possible be removed again, e.g., using the technique described in reference [28]. Neither of these effects are considered further in this article, and the focus instead lies on minimizing the impact on the ions outside the transmission windows. Note that ISD can potentially be mitigated by lowering the concentration of the dopant in randomly doped crystals. However, one should keep in mind that doing so also increases the average distance between qubit ions, thus making it more difficult to find qubits that interact strongly. ISD might also be completely avoided if, e.g., ion implantation is used to directly implant the qubit ions into a crystal, thus circumventing the problem of all the non-qubit ions that exist in randomly doped systems [72]. However, presently implanted techniques have other issues, e.g., the coherence properties of the implanted ions are sometimes worse than in bulk materials [53], and so more work is required on such methods.
A detailed investigation of how ISD quantitatively affects the SQ gate operation in a stochastic manner is beyond the scope of this work. Instead we design two different sets of gate pulses; one set which can be used if no ISD is present, and another set which takes heed for ISD by minimizing the effect on all the non-qubit ions just outside the empty transmission windows.
When no ISD is present one can optimize for the lowest SQ gate error achievable in the physical system curve of Fig. 2a, which yields an average SQ gate error of roughly 2.4 · 10 −4 . However, there are more complicated gate schemes that can be beneficial to use, e.g., DRAG [62,64,73,74], which reduces the error due to internal crosstalk by modifying the driving pulses, or accelerated adiabatic pulses [63,75]. A slightly lower average SQ gate error of 2.1 · 10 −4 was found by using a DRAG off-quadrature compensation; Ω off (t) = α y dΩ(t) dt , with gate parameters of α y = −1.46 · 10 −9 , t g = 0.77 µs, and σ = 1.4 µs. Note that while these values gave the lowest SQ gate error in the optimization procedure, similar parameters exist that yield roughly the same error, e.g., α y = −2 · 10 −9 → −1 · 10 −9 , t g = 0.65 µs → 0.85 µs, and σ = 0.5 µs → 1.5 µs. For more information about the optimization procedure used to find these gate parameters, see Appendix B.
The focus of this work, however, is on finding and investigating gate parameters that take heed for ISD as well, so the rest of this work is pursuing that task. Now the optimization of the gate parameters simultaneously tries to achieve the two partially competing goals of finding the lowest SQ gate error while also minimizing the impact on the non-qubit ions at the edges of the transmission windows to reduce the risk of ISD occurring. These goals are partially competing since the former sometimes benefits from shorter gate durations, which lead to less decay and decoherence, whereas the latter benefits from longer gate durations which have lower frequency bandwidths. Again, more information about the optimization procedure can be found in Appendix B.
The optimization led to pulse parameters of t g = 1.68 µs and σ = 4.16 µs, and had an average SQ gate error of 3.4 · 10 −4 . Thus, our choice to find gate parameters that also take heed for ISD comes at the cost of a slightly higher SQ gate error compared to when such considerations were not taken. DRAG compensation gave no significant improvement this time since the largest error of this gate stem from decay and decoherence, which can be seen in Fig. 2a, where the result for these optimized gate parameters are indicated by the black dot. In general this choice corresponds to choosing a pulse duration where the effect on ions just outside the transmission windows was roughly equal to the SQ gate error of the qubit. Note again that the values of the parameters could be tuned in a relatively large range and still provide similar optimization scores, e.g., t g = 1.5 µs → 2 µs, and σ > 1 µs. The Rabi frequency envelope for the optimized gate parameters can be seen in Fig. 2b. The optimization led to an almost quadratic pulse shape, thus finding it optimal to deliver the required pulse area with as low maximum Rabi frequency as possible for the given pulse duration while still being forced to maintain the shape of a cut Gaussian.
Note that the dark state compensation pulses used in [43] could be useful in this case as they minimize the impact of the gate operation on the detuned non-qubit ions. However, when investigated, the doubling of the gate duration required to also perform the dark state compensation pulses resulted in larger errors than if they were not used.
In order to benchmark this SQ gate operation we successively perform 1000 random gates by randomizing the phases of the gate pulses 0 ≤ φ ≤ 2π and 0 ≤ θ ≤ π, whose definitions are described in the text surrounding Eqs. 1-4. We then look at the total error as a function of the number of gate operations. In order to build statistics this is repeated 100 times and the average total error and its standard deviation can be seen in Fig. 2c.
We also estimate the average error per gate, p, by assuming that the gate can either introduce a new error or fix a previous error with the same probability: where n is the total error obtained after n gate operations. The average error per gate is p ≈ 3.4 · 10 −4 , and the result of the simple error model can be seen in the dashed black line of Fig. 2c. the system to more qubits it is important that a SQ gate operation on one qubit, qubit B, doesn't add a significant error to other qubits, e.g., qubit A. This can happen since the pulses intended to perform a SQ gate operation on qubit B also off-resonantly drive the transitions in qubit A. The additional error due to this interaction is investigated in Fig. 3 as a function of the optical detuning ∆ of qubit B from qubit A, where a zero optical detuning means that the two qubits have identical transition frequencies.
The spikes in the graph occur when the pulses intended to drive either |0 → |e or |1 → |e in qubit B also resonantly drives a transition from |0 or |1 in qubit A, thus resulting in large errors. If we also consider the fact that qubit A might be reinitialized during operation and therefore uses the auxiliary state | ± 5/2g , additional spikes appear when the pulses resonantly drives a transition from the auxiliary state as well, which occur at following optical detunings: -331. For our choice of system and gate parameters we must separate our qubits by more than roughly 600 MHz to not introduce significant additional errors when performing gate operations on other qubits. Note that although an optical detuning of, e.g., ∆ = 250 MHz doesn't introduce a significant additional error on qubit A when qubit B is driven, it does introduce an additional error on qubit B when qubit A is driven, since from the perspective of qubit B, qubit A has an optical detuning of −∆ = −250 MHz. Note also that the choice of a system with large level splittings in order to minimize internal crosstalk has a potential drawback here, since its transitions are far apart and therefore might result in a larger bandwidth per qubit, thus limiting the number of qubit channels within the inhomogeneous absorption profile. Similarly, using a system with lower coherence time, or picking weaker qubit transitions or using shorter gate pulses, two choices which require stronger fields, may also result in a larger bandwidth per qubit.
In the main part of Fig. 3 a SQ gate operation is only performed on qubit B while qubit A remains idle. This corresponds to the case when the SQ gate operations run sequentially on different qubits, which can be done without introducing large errors on the idle qubits thanks to the long coherence times of the ground hyperfine states in rare-earth-ion-doped crystals. Note that running sequentially still leads to longer execution times of algorithms compared to when running gate operations in parallel. However, when running in parallel the additional error on qubit A scales differently with detuning. For large positive optical detunings, ∆ ≥ 1 GHz, this scaling can be seen in the inset of Fig. 3. When running sequentially (blue data) the error decreases by roughly 1/∆ 2 compared to 1/∆ when running in parallel (red data).
It is also important to investigate how the additional error scales when qubit A is driven off-resonantly by many pulses intended to drive multiple different qubits. When running sequentially the additional error from many qubits each separated by the order of 1 GHz saturates relatively quickly thanks to the 1/∆ 2 dependence. However, when running in parallel the effect is more difficult to analyze. For example, for large negative optical detunings the pulses intended to drive qubit B, which also off-resonantly drive qubit A, actually compensates for a small part of the gate error otherwise obtained when performing the NOT operation on qubit A. Thus resulting in a slightly lower SQ gate error on qubit A when qubit B is driven simultaneously. However, from the perspective of qubit B, qubit A has a large positive detuning, which from the inset of Fig. 3 we already know leads to an additional error, this time for the operation on qubit B. Fortunately, even when assuming the worst case where the additional error only decreases as 1/∆, it only grows as the logarithm of the number of additional qubits (each separated by the order of 1 GHz). The effect on the SQ gate error can therefore still be kept under relatively good control, and gate operations can be performed in parallel with only a limited impact on gate errors if the decreased execution time of the algorithm is important.
However, in addition to the fact that the pulses intended to drive qubit B also off-resonantly drives qubit A, if one run SQ gate operations in parallel they can also interact via the dipole-dipole interaction explained in Fig. 1a-b. When the qubits are sufficiently far apart in space, this interaction is weak and introduces no significant additional error and the gate operations can run in parallel. But, when the qubits are too close in space the SQ gate operations must be performed sequentially in order to maintain a low SQ gate error.

IV. TWO-QUBIT GATE OPERATIONS
We now turn our investigation toward two different methods of performing two-qubit (TQ) gate operations, namely, a blockade gate which through the dipole blockade mechanism can perform control-arbitrary gates [25,28], and an interaction gate which uses the exact dipole-dipole shift in order to evolve a phase on a specific TQ state [39,76]. In these simulations we assume that the qubits are placed sufficiently far apart in frequency so that the pulses driving one qubit doesn't affect the other.
The blockade gate is constructed in the following way, using qubit A as control and qubit B as target: 1. Excite qubit A on |0 → |e , thus shifting the resonant frequencies of qubit B through the dipoledipole interaction explained in Fig. 1a- 2. Apply an arbitrary SQ gate pulse sequence on qubit B 3. Deexcite qubit A via the transition |0 → |e with an additional phase of π, thus deexciting it on the same path as it was excited The operations on qubit A uses single-color pulses that only interacts with the |0 → |e transition, and new gate parameters of the cut Gaussian defined in Eq. 1 were optimized for this case: t g = 2.17 µs, σ = 6.75 µs, and C 1 is chosen so that a pulse area of π is achieved. The apostrophe is used to differentiate these parameters from those used for a SQ gate operation. This gives a total TQ gate duration of t g + 2t g + t g = 7.7 µs.
The gate operation works when the dipole-dipole shift, ∆ν, is large enough to render the arbitrary gate operation on qubit B ineffectual when qubit A is in |0 . The average TQ gate error when averaging over the previously defined six initial states for each qubit and six gate operations on the target, can be seen in Fig. 4a.
The difference frequency between the transitions |0 → |e and |1 → |e is 90 MHz. Therefore, if the control is excited when ∆ν = −90 MHz the pulse intended to drive the transition |0 → |e of the target qubit instead drives |1 → |e , with the reverse being true when ∆ν = +90 MHz. This is the reason behind the error spikes at ±90 MHz. Their widths differ because of the differences in oscillator strengths between the intended transition and the transition being driven. TQ control-arbitrary gate operations with average errors of about 2 · 10 −3 can be achieved over a large range of dipole-dipole shifts. However, since the blockade gate relies on the dipole blockade mechanism it only works well for relatively large shifts. In order to also utilize the qubits with weak coupling a so-called interaction gate is also examined, and is described below for a gate that adds a phase of π to the |00 TQ state: 1. Excite both qubits simultaneously on their |0 → |e transition, aiming to excite everything despite the dipole-dipole shift that occurs 2. Wait a specific amount of time during which the |ee TQ state evolves an additional phase due to the specific dipole-dipole shift between the two qubits 3. Deexcite both qubits simultaneously on their |0 → |e transition with an additional phase of π on both transitions, thus deexciting the qubits on the same path as they were excited In order to excite both qubits despite the dipoledipole shift that occurs, while still reducing the impact of ISD by minimizing the effect on non-qubit ions just outside the transmission windows, a hyperbolic-squarehyperbolic (HSH, also called sechscan) pulse shape [77] is used instead of a cut Gaussian. The parameters for these pulses are optimized for each specific dipole-dipole shift, see Appendix B for more information. The TQ gate error for this interaction gate when averaging over six initial states for each qubit, can be seen in Fig. 4b. The drastic increase in gate errors for |∆ν| > 7.5 MHz arises since the optimization algorithm also takes heed for ISD, thus limiting the maximum frequency bandwidth of the pulses in order to not excite the non-qubit ions just outside the transmission windows.
When utilizing both TQ gate types one can achieve an average TQ gate error ranging from 5 · 10 −4 → 3 · 10 −3 as long as |∆ν| is larger than 0.1 MHz and avoids the spikes in error when the shift coincides with the frequencies of other internal transitions, e.g., the spikes at ±90 MHz seen in Fig. 4a.
In general the blockade gate is independent on the exact dipole-dipole shift, and the frequency bandwidth of the gate operation must be less than |∆ν| for the gate to be successful, something that can be both an advantage or a disadvantage. On the contrary, the interaction gate requires the knowledge of the exact shift and must have a frequency bandwidth that covers the dipole-dipole shift. For a given shift this means that the interaction gate can be made faster than the blockade gate, and therefore suffers less from decay and decoherence, at the cost of a larger frequency bandwidth. In this work the two gate types are used in different ranges of dipole-dipole shifts to utilize their strengths without suffering much from their disadvantages. In other words, the blockade gate is used for large dipole-dipole shifts where the frequency bandwidth of the pulses are limited by other constrains, e.g., reducing internal crosstalk or minimizing the risk of ISD occurring. Whereas the interaction gate is used for small dipole-dipole shifts where it is possible to utilize the faster gate operations without requiring a too high frequency bandwidth.

V. UNCERTAINTIES IN SYSTEM PARAMETERS
In order to estimate how precisely one needs to know the system parameters of the qubits in order to achieve the low gate errors shown in Fig. 2 and 4, we here investigate how sensitive the gate errors are toward changes in various parameters. Fig. 5 shows the SQ gate error as a function of fluctuations or uncertainties in a) Rabi frequencies, b) relative oscillator strengths, and c) level splittings. As can be seen one can still achieve high fidelity even when the system parameters are relatively uncertain as long as the frequencies of the two transitions that are being driven are known to at least 1 kHz and that their Rabi frequencies are not fluctuating by more than roughly ±0.5%. Note that commercial laser amplitude stabilizers that can achieve fluctuations an order of magnitude less than this exist on the market today.
Note that these sensitivities might change if more sophisticated pulses are used, e.g., in DRAG schemes which compensate for internal crosstalk the knowledge of other transitions might be more important. Further note that while 1 kHz resolution of the two transitions being driven is sufficient to keep the SQ gate error low, one might still want better resolution on the |0 → |1 frequency since the qubit dephase on a timescale roughly equal to 1/(frequency uncertainty) even when no gate operation is performed, unless dynamic decoupling pulses are used [78][79][80].
We can also use the data in Fig. 5c to make some predictions about the effect of spectral diffusion. Reference [81] measured that narrow spectral holes in Eu:Y 2 SiO 5 only increase their linewidth by roughly 1.5 kHz over 49 days, which when combined with the data of Fig. 5c indicates that the error contribution due to long term spectral diffusion is low. Note, however, that the results obtained in reference [81] were for a bulk crystal when examining spectral holes that consist of large ensembles of ions. There might therefore exist other spectral diffusion processes which can only be seen on the single ion level or when examining other samples than bulk.
Another uncertainty investigation, this time for two specific TQ gate operations, can be found in Fig. 6. The reason for not showing all combinations of initial states and gate operations was due to the unjustifiable time this would take to simulate. Here one can see that even though the TQ gate errors are slightly increased due to the uncertainties, they remain relatively low and qualitatively unchanged.
If these precisions are too difficult to achieve, or if the added error due to the fluctuations are deemed too high, one can always change the cut Gaussian pulse shape into, e.g., an hyperbolic secant pulse shape. Thus trading faster gate operations for robustness against fluctuations in both Rabi frequencies and resonance frequencies.

VI. CONCLUSION
In conclusion, we have through simulations indicated that one can perform gate operations with low errors in rare-earth-ion-doped crystals; 2.1 · 10 −4 and 3.4 · 10 −4 for arbitrary single-qubit gates when either no ISD is present or when we take heed to minimize the effect of ISD, respectively. Furthermore, two-qubit gates with errors ranging from 5·10 −4 → 3·10 −3 were possible over a broad range of dipole-dipole interaction strengths (|∆ν| > 0.1 MHz). Such error rates lie beneath the threshold for error correction using surface codes [82,83] and lies at the border of the threshold for CSS codes [84]. Furthermore, the required knowledge of system parameters is investigated and shows that a reasonable precision of the parameters is sufficient to keep the errors low. Finally, throughout the article we discuss how gate and system parameters affect gate errors, the required frequency bandwidth per qubit, and the risk of ISD occurring, thus highlighting many of the trade-offs that one need to do when designing a quantum computer based on rare-earth-ion-doped crystals.
All simulations were performed by evolving the Lindblad master equation [66] using MATLAB's explicit Runge-Kutta ode45 function [85,86]. The Hamiltonian consisted of 6 or 36 energy levels when examining SQ or TQ gates, respectively. All system parameters, including the decay and decoherence terms, were added based on the parameters listed in Fig. 1. The relative and absolute tolerances for the ode45 function were kept at 10 −6 for most simulations, which for a single gate operation results in global errors of roughly 10 times that. The simulations in Fig. 3 used lower tolerances of 10 −11 to 10 −9 depending on the detuning.

Appendix B: Optimization of pulse parameters
The optimizations of pulse parameters were performed using a combination of the GlobalSearch and fminsearch  Fig. 1. For each value on the horizontal axis, 100 randomizations are performed (half-transparent circles), and the average SQ gate error is calculated (solid lines). In the red data the gate pulses are constructed without knowledge of these random changes, and are therefore implemented with (b) the wrong Rabi frequencies and (c) the wrong resonant frequencies. This leads to larger SQ gate errors the more uncertain the system parameters are. However, in an experimental setting the Rabi and transition frequencies of the gate pulses can easily be fine-tuned to compensate for such uncertainties, at least for the two transitions that are being driven. This is simulated in the blue data, where (b) the Rabi frequencies only fluctuate within ±0.5%, and (c) the resonant frequencies are known to within at most ±1 kHz, when compared to the ideal values of the randomized system. In these simulations, the uncertainties that change along the horizontal axes therefore mostly affect how the gate pulses off-resonantly interact with other optical transitions than the intended ones. Now the SQ gate error remains low regardless of the uncertainties in the system parameters.
FIG. 6. Shows the TQ gate error as a function of the dipole-dipole shift when examining the impact of uncertainties in both the relative oscillator strengths (maximum uncertainty 0.05) and level splittings (maximum uncertainty 10 kHz) simultaneously. All gate pulses are optimized in the same way as the blue data in Fig. 5b-c, i.e., when compared to the ideal values of the randomized system their Rabi frequencies only fluctuate by up to ±0.5%, and their resonant frequencies are known to within ±1 kHz. 100 randomizations are performed for each shift (half-transparent circles), and the average TQ gate error is calculated (solid lines). This is simulated for a) a blockade gate performing a CNOT operation on the initial state (|0 + |1 ) ⊗ (|0 + i|1 ), and b) an interaction gate adding a π phase to the |00 state performed on the initial state (|0 + |1 ) ⊗ (|0 + |1 ). tools in MATLAB, where the initial guess was provided through a manual search of the parameter space.
The SQ gate parameters t g and σ from Eq. 1 were optimized for two different scenarios; without ISD or trying to minimize the risk of ISD. When optimizing the parameters without ISD the optimization tried to find the lowest average SQ error when performing the six gate operations on the six initial states listed in the main text. Here the optimization also included a parameter controlling the off-quadrature DRAG compensation, α y , as explained in the main text.
When taking heed for ISD the gate parameters were optimized by simultaneously trying to achieve two competing goals. First, find the lowest average SQ error as described above. Second, try to minimize the risk of ISD by doing as little as possible on ions detuned more than roughly 9 MHz from the qubit, since this is the closest frequency from the qubit to an edge of the semipermanent transmission windows. If the effect of ISD is estimated by only looking at the impact on ions with one detuning, the pulses might be optimized to have a minimum in their excitation probability for only that detuning. Therefore, several detunings were evaluated between −11 MHz and −9 MHz. Note that one could equally well use only positive detunings, or a combination of positive and negative detunings, and that the range of detunings could be chosen differently. The important part is to evaluate multiple detunings over a wide enough frequency range so that the optimization doesn't produce gate parameters which have a local minimum in their effect on ions at the specified detunings. The two goals were weighted equally in the optimization procedure, i.e., the SQ gate error for the resonant case and the error of doing nothing on the detuned ions were calculated and the sum of these two errors were minimized in the optimization procedure. The resulting gate parameters indicated that DRAG compensation was not needed in this case where we take heed to minimize the effect of ISD, and was therefore not used in subsequent simulations using these pulse parameters.
The blockade control-arbitrary gates uses the same SQ gate parameters that take heed for ISD to perform the gate operation on the target qubit. However, new parameters were optimized for the excitation of the control qubit. The procedure was similar to that described above, except that the only gate operation was to excite/deexcite |0 → |e , and the initial states were the six superpositions both between |0 and |1 and between |e and |1 .
The TQ interaction gate uses two hyperbolic-squarehyperbolic (HSH, also called sechscan) pulses [77], which are hyperbolic secant (sechyp) pulses [43] with a linear frequency chirp added in the middle of the pulse, defined as follows, where Ω(t) = |Ω(t)|e −iφ(t) : 0 ≤ t < t 0 2πfscan 2 (−t + (t−t0) 2 tscan ) t 0 ≤ t ≤ t 0 + t scan −µ ln[sech(β(t − t 0 − t scan ))] + 2πfscan 2 (−t 0 + (t − t 0 − t scan )) t 0 + t scan < t ≤ t g 0 otherwise (B2) where Ω 0 is the maximum Rabi frequency, t fwhm is the full-width-at-half-maximum of the intensity profile for the sechyp envelope, f width is the frequency width of the sechyp, f scan is the frequency range of the linear chirp which is applied over a duration of t scan , and finally, t g is the cut-off duration of the pulse which lasts from t = 0 → t g .
The pulse must excite both qubits regardless of the dipole-dipole shift that occurs, which means that each shift has a different requirement on the frequency bandwidth of the pulse. Therefore, new pulse parameters were optimized for each individual shift. Similarly as before, two competing goals were used in the optimization procedure. First, find the lowest error of the gate operation that adds a phase π to the |00 TQ state performed on the initial state (|0 + |1 ) ⊗ (|0 + |1 ). Second, minimize the risk of ISD by doing as little as possible on ions detuned by −11 MHz → −9 MHz from either qubit. Again, the two goals are weighted equally as described previously. The gate parameters vary, but have sechyp parameters of roughly t g = 1.5 ± 0.5 µs, t fwhm = 0.32 ± 0.14 µs, f width = 12 ± 3.5 MHz, and Ω 0 = 5.1 ± 1.3 MHz, with a linear chirp of f scan = 2.1 ± 0.7 MHz and f scan ≈ 0 MHz, for shifts lower and higher than 3.6 MHz, respec- is calculated from φ(t) in Eq. B2, of the sechscan pulse using parameters optimized for a dipole-dipole shift of 3 MHz is shown. The optimized gate parameters for this specific shift are: tg ≈ 1.7 µs, t fwhm ≈ 0.28 µs, f width ≈ 9.5 MHz, Ω0 ≈ 5.8 MHz, and fscan ≈ 2.2 MHz.
tively. The shape of the pulse when using the optimized parameters for the case of a dipole-dipole shift of 3 MHz can be seen in Fig. 7.
The phase of the final |00 TQ state evolves both when the qubits are being driven by the gate pulses, and during the wait when the qubit is in |ee . In order to determine how long wait duration is required for each shift, a simulation is first performed running the gate sequence without waiting between the two optical pulses. This allows us to determine the phase obtained due to only the qubits being driven. By comparing this phase to the desired phase of the TQ state, one can calculate the additional phase that should be added during the wait, which for a specific shift also gives you the wait duration. Note that the same wait duration must be used for all initial states of the two qubits. Therefore, the simulation performed in order to calculate the wait duration is only performed once, in our case on the initial TQ state |0 ⊗ (|0 + |1 ).