Time optimal holonomic quantum computation

A three-level system can be used in a $\Lambda$-type configuration in order to construct a universal set of quantum gates through the use of non-Abelian non-adiabatic geometrical phases. Such construction allows for high-speed operation times which diminish the effects of decoherence. This might be, however, accompanied by a breakdown of the validity of the rotating wave approximation (RWA) due to the comparable time scale between counter-rotating terms and the pulse length, which greatly affects the dynamics. Here, we investigate the trade-off between dissipative effects and the RWA validity, obtaining the optimal regime for the operation of the holonomic quantum gates.


I. INTRODUCTION
The implementation of a concrete quantum computing platform poses several challenges.A suitable platform should exhibit features such as scalability [1], long decoherence time [2,3], and universality [4].In this spirit, holonomic quantum computation (HQC) [5][6][7] arose as a promising approach for quantum computing.HQC was initially based on the use of adiabatic geometric phases, which are robust against dynamical details and fluctuations in the evolution [8,9].
The physical implications of geometrical phases came into the limelight after Berry's seminal work [10] on adiabatic systems.Since then, several generalizations have been made.Of particular importance is the generalization to nonadiabatic non-Abelian geometrical phases [11], which have been used in non-adiabatic holonomic quantum computing (NHQC), originally proposed in Ref. [12] for a Λ-type system, and which generalizes quantum computation based on non-adiabatic Abelian geometric phases [13,14] to the non-Abelian case.Due to the long operation time required by adiabatic implementations, quantum gates become more susceptible to open quantum system phenomena.Therefore, nonadiabatic constructions are often regarded as effective strategies to mitigate this effect [12,15,16].Among experimental realizations, implementations using superconducting qubits [17,18] and nitrogen-vacancy centers in diamond [19,20] can be found as examples.Moreover, single-loop implementations, which speed up the protocol even further, have been investigated [21][22][23][24][25][26][27][28].
Ideally, the Λ-type system usually operates in the regime of the rotating wave approximation (RWA).Whenever the counter-rotating frequencies associated with the bare Hamiltonian are large enough in comparison with the typical time scale of the system dynamics, the counter-rotating contributions to the Hamiltonian can be averaged out.This, in practice, introduces a limitation into how fast these gates can operate [29].While arbitrarily fast gates dispel the effects of decoherence, they leave the regime of validity of the RWA: the operation time of the gate becomes comparable with the oscillation frequency of the counter-rotating terms.These two competing effects introduce a trade-off between dissipative effects in the gate and the RWA accuracy.One may note that a somewhat analogous trade-off effect occurs in the adiabatic version of HQC, but with the breakdown of RWA replaced by non-ideal effects associated with the finite run time of the gates [30][31][32].
Our objective in this work is to investigate the trade-off between dissipative effects and breakdown of the RWA.We analyze how different parameters affect the performance of the gates and we also determine the optimal regime of operation for single and two-qubit non-adiabatic holonomic quantum gates in the Λ-type configuration.We find that the counterrotating terms introduce a coupling between the dark and the excited state, which does not occur in the RWA regime.Moreover, we also investigate the effect of heterogeneous counterrotating frequencies.We observe that different frequencies may, very slightly, improve the fidelity for certain gates.
The paper is organized as follows.In Sec.II, we briefly review the holonomic setting for one and two-qubit gates.In Sec.III, we extend the discussion beyond the RWA regime and we discuss our results.Concluding remarks can be found in Sec.IV.

II. HOLONOMIC SETTING
In the Λ-type system, two states |0 and |1 , which encode the qubit space, are coupled to an auxiliary excited state |e , but remain uncoupled between themselves.The system acquires a Λ-like structure, as depicted in Fig. 1(a).We can regard the states |0 and |1 as stable ground states.Meanwhile, |e is typically an unstable state that undergoes dissipation, decaying to an auxiliary ground state |g .Transitions between the levels are induced by a pair of laser pulses, which can be controlled over time.

A. One-qubit gates
The starting point to model the unitary dynamics of the single-qubit gates is the Hamiltonian [29]:

arXiv:2206.06502v2 [quant-ph] 12 Sep 2022
where is the bare Hamiltonian and is the applied oscillating electric pulse.Here, g j (t) and ν j (with j = 0 and 1) are the pulse envelope and the oscillation frequency, respectively.Additionally, µ is the electric dipole operator and j is the polarization.We move to the interaction picture Hamiltonian H I (t) = e −iH 0 t H(t)e iH 0 t , tuning the frequencies ν j so they get resonant with the bare transition frequencies f je , i.e., ν j = f je .By doing so, one finds the Hamiltonian that describes the Λ-type system in the interaction picture: where Ω j (t) = e|µ • | j g j (t)/2 are Rabi frequencies (we put = 1 from now on).Henceforth, we are interested in how to handle the counter-rotating terms e −2i f je t and how they affect the performance of this protocol.
We start by reviewing the ideal case, where the RWA is valid, assuming that f je is large.These rapidly oscillating terms average out to zero and the Hamiltonian in Eq. (3) becomes: Here, we have assumed that both laser pulses are applied simultaneously and have identical shape so that we may rewrite the frequencies as Ω j (t) = Ω(t)ω j , with ω j being timeindependent and satisfying The parameter Ω(t) can be regarded as an overall pulse envelope, while ω 0 and ω 1 refer to the relative (complex) weight between the two transition amplitudes.It is elucidating to rewrite the Hamiltonian above in terms of the bright and the dark states, |b = ω * 0 |0 +ω * 1 |1 and |d = −ω 1 |0 +ω 0 |1 , respectively.The Hamiltonian in Eq. (4) can thereby be re-expressed as This means that the dark state is decoupled from the evolution and the system simply performs Rabi oscillations between the bright and the excited states with frequency Ω(t).
Let us now consider the qubit subspace M(0) = Span{|0 , |1 } = Span{|b , |d } and its dynamics.The subspace evolves into M(t), spanned by: where U(t, 0) is the time-evolution operator in RWA and k = 0 and 1.In the bright-dark basis, the unitary matrix assumes the form [23] where |e⟩ Basic setup for the Λ-type system.The excited state decays to an additional low-lying level |g with a rate γ.There is no coupling or decay with the computational subspace itself.This means that dissipation effects only occur while the excited state is populated.(b) Hyperbolic secant pulses as defined in Eq. ( 11).(c) Configuration and detunings in the two-qubit gate setup.
is the pulse area.Geometrically, this evolution corresponds to a path in the Grassmanian G(3; 2), i.e., the set of twodimensional subspaces of the three-dimensional Hilbert space that define the Λ-type system [33].In particular, when we have Φ = π, the trajectory corresponds to a full loop in the Grassmanian.The effect of this evolution whenever Φ = π is to implement a holonomy matrix after properly projecting U(t, 0) into the qubit space.Here, n = (sin θ cos φ, sin θ sin φ, cos θ) and P = |0 0| + |1 1|.Besides, we have parametrized the frequencies ω 0 and ω 1 as ω 0 = sin(θ/2)e iφ and ω 1 = − cos(θ/2), i.e., θ and φ determine the relative amplitude and phase, respectively, of the two laser pulses.This process corresponds to a π rotation around n on the Bloch sphere.The unitary in Eq. ( 9), however, is not universal (the phase-shift gate, for instance, cannot be written in this form).A universal gate can be implemented by employing a second loop C m , yielding This transformation has a clear physical meaning as well; the universal gate U(C) above corresponds to a rotation in the plane spanned by n and m by an angle of 2 cos −1 (n • m) [12].Therefore, any single-qubit gate can be obtained by an appropriate choice of pulses, determined by n and m.The holonomic nature of U(C) in Eq. ( 10) relies on two facts [12]: (i) the Hamiltonian matrix ψ k (t)|H I (t)|ψ l (t) vanishes so that U(C) becomes purely dependent on C, and (ii) there exist two generic loops C and C in G(3; 2) for which the corresponding unitaries do not commute.The latter, together with the twoqubit setting described below, ensures universality of NHQC.
From hereafter, we use hyperbolic secant pulses as depicted in Fig. 1(b).The parameter β can be regarded as the inverse pulse length: by increasing β we implement sharper and shorter pulses.It also provides a convenient parametrization: this pulse is area-preserving and the condition Φ = π is satisfied regardless of the value of β chosen.Finally, we use the amplitude-damping jump operator L = |g e|, with |g being an additional low lying level, and the Lindblad equation to model decay [34].Here, ρ is the density matrix of the system, D(ρ) = LρL † − 1 2 {L † L, ρ} is the dissipator, and γ is the dissipation rate, as depicted in Fig. 1(a).

B. Two-qubit gate
The original NHQC proposal in Ref. [12] includes a protocol based on the Sørensen-Mølmer scheme [35] for implementing two-qubit gates (see also Ref. [7] for an adiabatic implementation and Refs.[36,37] for generalizations of the NHQC scheme to multi-qubit gates).The setup for the twoqubit gate consists of two identical trapped ions in the same three-level Λ-configuration as the one used for single-qubit gates.The transition 0 ↔ e (1 ↔ e) is driven by a laser with detuning where ν is the trap frequency and δ is an additional detuning, as shown in Fig. 1(c).In addition, we assume that the system satisfies the Lamb-Dicke criterion η 1, where η is the Lamb-Dicke parameter, and also that |Ω i (t)| < ν.The parameter η depends on the zero-point spread of the ion [38] and accounts for the coupling strength between its internal degrees of freedom and its motional states [39].These conditions allow us to suppress the off-resonant couplings [35].As such, the Hamiltonian describing this interaction assumes the form where After eliminating off-resonant couplings of the singly excited states |0e , |e0 , |1e and |e1 , and once again performing the RWA, the Hamiltonian reads: with and Here, |Ω 0 (t)| By choosing θ = 0, we are able to construct a controlled-Z (CZ) gate ) which is an entangling gate and can form a universal set together with a universal single-qubit gate [40].

III. RESULTS
The validity of the RWA has been studied previously in the dissipationless case for single-qubit gates [29].There, the authors show that the approximation starts to break down for very short pulses.We further extend this investigation, considering the competing effect of dissipation and counter-rotating terms; while faster gates avoid decoherent effects, we also observe the counter-rotating terms playing a larger role in the dynamics, compromising the fidelity of the gate.The converse is also true: if we use longer duration pulses in order to offset the counter-rotating terms, the accuracy suffers due to the longer exposure time to dissipative effects.Our objective is to find an optimal relationship between these parameters, namely, to investigate the interplay among three components in this model: the inverse pulse length β defining the hyperbolic secant pulse in Eq. ( 11), the coupling parameter γ, and the counter-rotating frequencies f je .
If we write Eq. ( 3) in terms of the bright and the dark states we obtain Differently from what we observe in the ideal case, the presence of counter-rotating terms introduces a coupling between the dark and the excited state.An exception occurs in the case of homogeneous frequencies, that is, when The equation above means that taking the two counter-rotating frequencies to be the same eliminates the coupling between the dark state and the excited state in Eq. (20).On the other hand, we can see that Eq. ( 21) differs from Eq. ( 5) by a factor of e −2i f i t in the Rabi frequency.This means that even though  4) is used together with the master equation in Eq. ( 12), i.e., when counter-rotating effects are neglected.The spacing between the two pair of pulses is chosen as ∆t = 10/β.This guarantees that the pulses are not significantly overlapping.We used a grid of 500 sample points for β/ f i .(b) Optimal inverse pulse length β opt (in units of f i ) as a function of γ/ f i .We also plot the corresponding infidelity (inset).We have used a sample space of 1000 points for β i / f i in the interval [0.03, 0.3].The average infidelity was calculated for 100 input states uniformly sampled over the Bloch sphere in both figures.
the structure of the Hamiltonian is the same as the one found in the ideal case, due to the counter-rotating corrections we do not, in general, return to the initial subspace at the end of the evolution.

A. Singe-qubit gates
In order to investigate the validity of the RWA, we compute the fidelity F = ψ 0 |U(C) † ρU(C)|ψ 0 for different quantum gates, and analyze the simulation results in terms of the infidelity 1 − F .The unitary U(C) corresponds to the ideal unitary in Eq. (10), which is determined by the choice of n and m.The density matrix ρ is obtained by solving the master equation, Eq. ( 12), for the non-RWA Hamiltonian in Eq. ( 3), and |ψ 0 is the input state.Finally, we compute the average fidelity for several input states uniformly distributed over the Bloch sphere.For details, see the Appendix.
We start by examining the average infidelity for the phase-shift gate.By choosing θ = θ = π/2 resulting in the pulses n = (cos φ, sin φ, 0) and m = (cos φ , sin φ , 0), we can implement the phase-shift gate |k = e 2ik(φ −φ) |k , with k = 0 and 1. Basic results are shown in Fig. 2(a) for the average infidelity 1 − F as a function of the ratio between the inverse pulse length β and the counter-rotating frequencies taken to be the same, i.e., f 0e = f 1e = f i .In Fig. 2(b), we also include the maximum and minimum infidelities in order to investigate how the gate might behave depending on the input state.They seem to play a minor role regarding the optimal configuration of the gate.While we observe a significant gap in the performance of the maximum and minimum achievable infidelities in the inset of Fig. 2(b), the infidelity as a function of β/ f i behaves very similarly for different input states and the optimal inverse pulse length in Fig. 2(b) remains largely unchanged, specially at lower frequencies.Therefore, the mean infidelity is, by itself, able to capture the general behavior of the gates and its optimal configurations sufficiently well.We can notice that for small β/ f i (longer pulses) the curves should converge roughly to the same fidelity, but at different rates depending on γ/ f i .This is not visible in the plot for smaller rates of γ/ f i due to the increasingly large timescales necessary to observe this effect, which make numerical simulations difficult.This happens due to the fact that in this regime the decoherent effects become dominant.More specifically, the dissipation hampers any population transfer between the qubit states, as in this case the populations and coherences in the excited state quickly decay to the ground state.Therefore, the final state is very nearly the same as the input state, regardless of the value of β/ f i .We make a quantitative support to this claim at the end of this section.
On the other hand, for large β/ f i (shorter pulses) we can see that the gate accuracy also decreases and the fidelity becomes independent of the ratio γ/ f i .In this scenario the operation time is very short, hence the counter-rotating terms dominate and the end result depends on the particular value of f i .The asymptotic behavior for γ f i β has been briefly discussed in Ref. [29] for the X and the Hadamard (H) gates, when considering a few selected input states.The counter-rotating correction in Eq. ( 21) becomes 1 + e −2i f i t ≈ 2 for small f i .In this regime, the system undergoes a cyclic evolution twice.This means that the bright state evolves as |b → −|b → |b , and the net effect of the evolution is simply to (approximately) implement the identity gate, once again leaving the input state unchanged.
Finally, for values in-between we observe the optimal regime for the quantum gate and the presence of a global minimum in the infidelity 1 − F .This is consistent with the intuitive idea behind the competition between the RWA and the dissipative effects: the optimal pulse duration should be long enough in order to minimize the counter-rotating contributions to the dynamics while also being short enough to avoid dissipative losses.After that point the RWA starts to break down and the infidelity increases.Figure 2 (a) explicitly shows an overlap between the RWA solution (dashed line) and the full solution (solid lines).The latter deviates from the former when β/ f i approaches the global minimum, explicitly showing a breakdown of the RWA.Therefore, for optimal per- formance, the frequencies and the pulse should be tuned in a way that f i > β γ holds, if possible.This means that the inverse pulse length β should be much larger than γ, and at the same time the counter-rotating frequencies should be sufficiently larger than β.

B. Heterogeneous frequencies
We also examine how different counter-rotating frequencies affect the fidelity of the gates.In Fig. 3 we show a contour plot for the infidelity 1 − F as a function of f je /β for three different gates.Results are shown for the X, H, and S gates, respectively.The red lines correspond to the optimal frequency f 1e for a given f 0e .A few observations can be made from these plots.Foremost, we can explicitly see that for the range of frequencies considered here the S gate has a worse fidelity in general.This corroborates the fact that, since the S gate requires two pulses, the longer operation time makes the gate much more susceptible to open quantum system effects.Additionally, it is also possible to observe that Fig. 3(a) is symmetric, while Fig. 3(b) is not.This is linked to the fact that the complex frequencies ω 0 and ω 1 are of the same modulus for the X gate, but not for the Hadamard gate.
Furthermore, we can analyze the optimal combinations of frequencies in Fig. 3.The results shown in Figs.3(a) and 3(b) show that for single pulse gates and for the frequency range considered, the optimal relationship for the counter-rotating frequencies is to take both of them to be the same, i.e., the infidelity 1 − F is minimum for f 0e = f 1e .This is possibly a result of the decoupling of the dark and the excited states, which happens in Eqs.(20) and (21).The coupling between |e and |d in Eq. ( 20) seems to play a larger role than the presence of the counter-rotating correction in Eq. (21).Increasing one of the frequencies while keeping the other to be the same shows no noticeable improvement.On the contrary, we observe a slight worsening of the gate performance.
Surprisingly, we observe a different behavior for the S gate: there is a slight offset between the optimal f 0e and f 1e .The result indicates that ideally one should increase these two frequencies at a constant ratio, different from unity.This behavior may arise from the use of two pair of pulses in the S gate implementation.It has been verified in Ref. [29] that the fidelity of non-commuting gates is actually lower than the product of their fidelities.A similar mechanism may be playing a role here: the non-Abelian behavior of the unitaries in Eq. ( 10) is possibly the reason why we observe this effect for unequal frequencies in the S gate.Now, we further investigate the effect of heterogeneous frequencies.For that we consider the infidelity of two different single qubit gates.For the first gate we implement the singlepulse gate in Eq. ( 9) for different values of φ, with θ = π/4.For the second gate, we implement the phase-shift gate for different phases ∆φ = 2(φ − φ).Our objective is to analyze how changing φ affects the optimal ratio between the two counterrotating frequencies.Like Fig. 3, the curves in Fig. 4(a) show that single-pulse gates achieve optimality for equal frequencies.On the other hand, Fig. 4(b) shows that while the optimal ratio indeed occurs for different frequencies, the gain is very marginal.This suggests that a weak coupling between the excited state and the dark state alone is much more relevant overall.This claim is further supported by the result in Fig. 5.
We see, for the X, H and S gates, that there is a sudden decrease in the infidelity when f 0e ≈ f 1e .For the S and the X gates the point f 0e = f 1e is actually a global minimum.Meanwhile, when the H gate is considered, the point where the two frequencies are the same only happens to be a local We observe a slight shift in the optimal ratio for the phase-shift gates.
The optimal points depends on the desired phase.Here, the coupling strength is given by γ/β = 10 −3 , the spacing between the pulses is ∆t = 20/β and the frequency f 0e is fixed and given by f 0e /β = 10.We use a sampling space of 250 frequencies and 100 input states, as described in Fig. 2. FIG. 5. Infidelity as a function of the ratio f 1e / f 0e for the NOT gate (yellow), the Hadamard gate (magenta), the Z gate (purple) and the S gate (dark blue).The decay rate, the sampling space and f e0 are the same as those in Fig. 4. Note that the minimum for the S gate is slightly displaced from f 1e / f 0e = 1 (dashed line), in accordance with Figs.3(c) and 4.
minimum.For the Z gate we observe no minimum at all, and the infidelity is simply monotonically decreasing with f 1e / f 0e .Hence, whether the point f 0e = f 1e is optimal may depend on the particular gate implementation and on the frequency range considered.Nevertheless, a characteristic drop in the infidelity around this region seems to be common among all of the gates but the Z gate, and the performance in the regime where f 0e = f 1e is quite similar to the one obtained when f 1e f 0e .The behavior of the curves in Fig. 5 arises mainly because of the last term in Eq. (20).For the Z gate, for instance, we have ω 0 = 0 and ω 1 = 1.In this very particular case, this term vanishes and the fidelity actually depends only on f 1e , and we do not observe any coupling between the dark state and the excited state regardless of f 0e .Meanwhile, the X gate is quite different: since 2, the dependence of the infidelity on f 0e and f 1e is symmetric and the product ω 0 ω 1 is maximum (in modulus), thus, the X gate (or any other gate for which |ω 0 | = |ω 1 |, for that matter) is the most sensitive to the coupling between the dark state and the excited state.For other gates, such as the Hadamard gate, we observe a behavior in-between.The ratio |ω 1 |/|ω 0 | between the amplitudes should then play some role whether the optimal strategy is to take f 1e / f 0e = 1 or f 1e f 0e for maximum fidelity.

C. Two-qubit gates
Finally, we check the robustness against both effects in the case of the two-qubit gate.Considering the counter-rotating contributions in Eqs. ( 13) and ( 14), Eqs. ( 16) and ( 17) become and respectively.We perform simulations for the CZ gate, which can be constructed by taking θ = 0. Results for the infidelity are shown in Fig. 6  showing that the two-qubit gate is also robust against the joint effect of dissipation and counter-rotating terms.Moreover, the asymptotic behavior for larger pulses is even more evident in Fig. 6; we can clearly see how the dissipative effects quickly start to dominate for β/ f i 4 • 10 −3 , eventually converging to a specific value, in a similar fashion to what we obtained for the phase-shift gate.The same phenomenon occurs when β f i due to the increasing influence of counterrotating contributions.This behavior arises precisely due to the two mechanisms we have discussed before: for both the  16).
Other details are the same as those in Fig. 2.
very fast or the very slow gate operation regimes, a given input state |ψ 0 is left roughly unchanged after the evolution, and the fidelity associated with the process is approximately One may then find the asymptotic value for the average infidelity 1 − F in Figs. 2 and 6 by averaging | ψ 0 |U(C)|ψ 0 | 2 over all the input states.It is possible to show that 1 − F = 1/3 for the phase-shift gate in either cases.This is not visible in Fig. 2 (a) simply due to the fact that we would need to use pulses of the order of β/ f i ≈ 10 −4 or smaller in order to observe such a strongly dissipative regime.Moreover, by comparing Figs. 2 and 6 we could think that single and two-qubit gates are similarly robust, but that is not necessarily the case.As we can see in Figs.3(a) and 3(b) and also in Fig. 5, single-pulse gates typically have lower infidelities.On the other hand, a positive feature is that the optimal pulse-length seems quite similar for both single-and twoqubit gates, which might simplify experimental realizations of holonomic quantum gates.

D. Experimental feasibility
On a closing note, we briefly discuss the experimental feasibility of an investigation regarding the frequency asymmetry.In Ref. [17], for instance, the experiment is performed for a ratio of f 0e / f 1e ≈ 1.04 between the frequencies and a dissipation rate given by γ/ f i ≈ 1.1 • 10 −4 .As we can see in Fig. 4, these parameters are close to the optimal scenario for both single and two-pulse gates.However, fine-tuning the frequencies to be the same in this setup in order to achieve even lower infidelities could be somewhat challenging.This implementation uses a transmon qubit based on a nearly harmonic ladder, where its ground state and second excited state span the qubit subspace and the first excited state plays the role of the auxiliary state |e .The anharmonicity is used to average out an undesirable coupling between the Λ-type system subspace and higher energy levels.Thus, homogeneous frequencies could possibly give rise to unwanted dynamical contributions.In this sense, implementations based on ion traps could be used to fine-tune the bare energy levels as desired, reaching the configuration shown in Figs. 4 and 5 for the gates where homogeneous frequencies are optimal.

IV. CONCLUSIONS
We have investigated the robustness of non-adiabatic holomonic quantum gates against dissipative effects and counter-rotating dynamical contributions due to the energy structure of the Λ-type system.While short run times minimize the dissipative losses, the counter-rotating frequencies induce oscillations, which compromise the geometric character of the gate, decreasing its overall fidelity.In a real implementation, one should seek to sufficiently approach the RWA regime while keeping losses due to open quantum system effects minimal.In this work we have explored this trade-off in detail, obtaining an optimal regime of operation for single and two-qubit gates for a range of parameters typically found in experimental scenarios.Thus, we believe that our analysis could provide a suitable rule-of-thumb for optimal experimental parameters, as well as open up for optimization of gate performance by varying the pulse length, in implementations of quantum gates in the Λ-setting.
Moreover, we have also studied how different frequencies affect the performance of single-qubit gates.We showed that counter-rotating corrections introduce an unwanted coupling between the dark state and the excited state in the Λ-type system.Homogeneous frequencies in general result in a sudden decrease of the infidelity due to the suppression of the dark state coupling.However, whether this regime is indeed optimal will depend on the gate which is being implemented.In addition, we have observed that two-pulse single-qubit gates might display an optimal configuration for slightly heterogeneous frequencies.We suspect that this behavior arises due to the non-Abelian property of the geometrical phases.This phenomenon can also be observed for square pulses in a slightly different fashion.However, whether our results still hold for arbitrary pulses shapes remain an open question and is subject for further investigation.
Future directions of study could either probe into generalizations of this analysis to different implementations of the holonomic protocol, such as the off-resonant scheme [21,22], the single loop scheme [23], time-optimal-control [27,28] and path shortening [26] schemes, and environment assisted implementations [41], or into inclusions of other open system effects, such as dephasing and correlated two-qubit noise.A generalization to multi-qubit gates [36,37] or strategies which do not rely on the RWA [42] could also be investigated.

APPENDIX: UNIFORM SAMPLING OVER THE BLOCH SPHERE
Here, we show how the Fibonacci nodes algorithm [43] can be implemented.The algorithm can be used to uniformly sample states over the Bloch sphere.Canonical approaches for this problem based on, e.g., random sampling [44] can also be used.However, the method presented here is deterministic, making it possible to get a reasonable approximation even for a smaller number of points.This greatly reduces the time required for computing the average fidelity, since we can per-form simulations for a smaller number of input states.To implement the algorithm one should follow the steps below: 1. Uniformly distribute the z-coordinate z n of the points in the interval [1, −1].
4. The points are given by the set of triples (x n , y n , z n ), for n = 1, ..., N.

2 FIG. 2 .
FIG. 2. (a)The solid (dashed) lines correspond to the mean (maximum) infidelity 1 − F of the S gate as a function of the ratio β/ f i for different values of γ/ f i .The dotted lines correspond to the RWA solution where the Hamiltonian in Eq. (4) is used together with the master equation in Eq. (12), i.e., when counter-rotating effects are neglected.The spacing between the two pair of pulses is chosen as ∆t = 10/β.This guarantees that the pulses are not significantly overlapping.We used a grid of 500 sample points for β/ f i .(b) Optimal inverse pulse length β opt (in units of f i ) as a function of γ/ f i .We also plot the corresponding infidelity (inset).We have used a sample space of 1000 points for β i / f i in the interval [0.03, 0.3].The average infidelity was calculated for 100 input states uniformly sampled over the Bloch sphere in both figures.

FIG. 4 .
FIG.4.Infidelity as a function of the ratio f 1e / f 0e for single-qubit gates.We show the results for (a) a single-pulse gate with θ = π/4, for different values of φ.In panel (b) we plot the results for the phaseshift gate, for which θ = θ = π/2, for different values of ∆φ ≡ φ − φ.We observe a slight shift in the optimal ratio for the phase-shift gates.The optimal points depends on the desired phase.Here, the coupling strength is given by γ/β = 10 −3 , the spacing between the pulses is ∆t = 20/β and the frequency f 0e is fixed and given by f 0e /β = 10.We use a sampling space of 250 frequencies and 100 input states, as described in Fig.2.

√ 2 ,
as a function of the inverse pulse length β (in units of f 1e = f 0e = f i ).We plot the infidelity, averaged over four different input states: |+ |+ , |+ |− , |− |+ and |− |− with |± = (|0 ± |1 )/ which are states of interest since the application of the CZ gate upon them results in maximally entangled Bell states.Our results are qualitatively similar to what was obtained for the single-qubit case,

FIG. 6 .
FIG.6.Infidelity of the CZ gate as a function of β/ f i .Dotted lines represent the RWA solution given by the Hamiltonian in Eq. (16).Other details are the same as those in Fig.2.
ACKNOWLEDGMENT G.O.A. acknowledges the financial support from the São Paulo founding agency FAPESP (Grant No. 2020/16050-0) and the framework of Erasmus+KA107 -International Credit Mobility, financed by the European Commission.E.S. acknowledges financial support from the Swedish Research Council (VR) through Grant No. 2017-03832.