# One- and two-qubit gate infidelities due to motional errors in trapped ions
and electrons

R. Tyler Sutherland<EMAIL_ADDRESS>Department of Electrical and
Computer Engineering, Department of Physics and Astronomy, University of Texas
at San Antonio, San Antonio, TX 78249, (USA)  Qian Yu  Physics Department,
University of California, Berkeley, CA 94720, (USA)  Challenge Institute for
Quantum Computation, University of California, Berkeley, CA 94720, (USA)
Kristin M. Beck  Lawrence Livermore National Laboratory, 7000 East Avenue
Livermore, CA 94550, (USA)  Hartmut Häffner  Physics Department, University of
California, Berkeley, CA 94720, (USA)  Challenge Institute for Quantum
Computation, University of California, Berkeley, CA 94720, (USA)
Computational Research Division, Lawrence Berkeley National Laboratory,
Berkeley, CA 94720, (USA)

###### Abstract

In this work, we derive analytic formulae that determine the effect of error
mechanisms in laser-free one- and two-qubit gates in trapped ions and
electrons. First, we analyze, and derive expressions for, the effect of
driving field inhomogeneities on one-qubit gate fidelities. Second, we derive
expressions for two-qubit gate errors, including static motional frequency
shifts, trap anharmonicities, field inhomogeneities, heating, and motional
dephasing. We show that, for small errors, each of our expressions for
infidelity converges to its respective numerical simulation; this shows that
our formulae are sufficient for determining error budgets for high-fidelity
gates, obviating numerical simulations in future projects. All of the
derivations are general to any internal qubit state, and any mixed state of
the ion crystal’s motion. Finally, we note that, while this manuscript focuses
on laser-free systems, static motional frequency shifts, trap anharmonicities,
heating, and motional dephasing are also important error mechanisms in laser-
based gates, and our expressions apply.

##  I Introduction

The highest-fidelity quantum computing gates are, at present, performed with
trapped ions Srinivas  _et al._ (2021); Ballance  _et al._ (2016); Gaebler
_et al._ (2016). This, in combination with long coherence times, inherent
uniformity, and all-to-all connectivity, has rendered trapped ions one of the
most promising quantum computing platforms to date Cirac and Zoller (1995);
Monroe  _et al._ (1995); Wineland  _et al._ (1998); Nielsen and Chuang (2010);
Häffner  _et al._ (2008); Blatt and Wineland (2008); Harty  _et al._ (2014).
The most common method for performing high-fidelity gates is to couple the
internal states of the ions using lasers. While laser-based gates have many
advantages, strong spin-motion coupling for example, they suffer from photon
scattering and phase-noise. Further, the lasers necessary for high-fidelity
gates are expensive and difficult to calibrate. Laser-free gates, however,
offer a promising alternative to this paradigm, where laser-fields are
replaced with microwaves that directly couple internal states of the ions
Mintert and Wunderlich (2001); Ospelkaus  _et al._ (2008, 2011); Harty  _et
al._ (2014, 2016); Srinivas  _et al._ (2019); Webb  _et al._ (2018);
Zarantonello  _et al._ (2019); Srinivas  _et al._ (2021). First, the use of
microwave fields eliminates photon scattering. Secondly, the phase and
amplitude of microwave fields are easier to control, thereby reducing
decoherence due to noisy driving fields, which is often a limiting factor in
laser-based gates. However, the relatively slow gate times of microwave gates
(compared with laser-based gates) exaggerate the effects of motional
decoherence. Trapped electrons, albeit significantly less explored than ions,
are another promising qubit platform, and will likely have gate operations
similar to those in laser-free trapped ion setups Daniilidis  _et al._ (2013);
Peng  _et al._ (2017); Matthiesen  _et al._ (2021). Due to their light mass,
we expect trapped electrons will operate on much faster time-scales relative
to laser-free trapped ion experiments. Unfortunately, because sideband cooling
is not possible, trapped electrons will have to operate at much higher
temperatures than trapped ions, and, therefore, are likely to be sensitive to
motional decoherence as well.

High-fidelity gates are critical for fault tolerant quantum computation, which
requires infidelities ranging from $10^{-2}$ to $10^{-4}$ Campbell  _et al._
(2017), making it important to quantify sources of infidelity. While many
error sources are general to laser-free trapped ion (and would-be trapped
electron) experiments, their effect on gate fidelity is typically calculated
numerically; this leads to duplicate computational effort between research
groups. Further, it is difficult to determine how gate fidelities scale with
various experimental parameters (such as temperature) when working only with
numerical simulations. In this work, we aim to ameliorate these issues by
deriving analytic formulae for likely sources of motional decoherence in
trapped ions and electrons. The formulae we derive make no assumptions about
the initial qubit state of the ion, and assume only that the motion is in an
incoherent mixed state. We also assume that the qubit frequency is very
different from the motional frequency of all relevant motional modes. We then
compare every formula to its respective numerical simulation, showing that the
two calculations converge in the high-fidelity limit for each source of
infidelity. In short, this work aims to expedite the formulation of error
budgets in future experiments, providing analytic formulae where numerical
simulations were needed. Moreover, the derivations provide insight into each
error mechanism, and show how they scale with relevant experimental
parameters. While this work focuses on laser-free gates, static motional
frequency shifts, heating, trap anharmonicities, and motional dephasing are
also sources of infidelity in laser-based gates, and, therefore, the formulae
we derive apply to these systems too.

The paper is organized as follows. We first describe the theoretical
techniques that we use to derive our analytic expressions for infidelity. We
then derive errors in single-qubit gates from field inhomogeneities. We then
derive errors for two-qubit gates, including static shifts, trap
anharmonicities, field inhomogeneitites, motional dephasing, and motional
heating.

##  II Theory

For the calculations we present in this work, we focus on one- or two-qubit
laser-free gates in both trapped ions and trapped electrons, studying systems
with one or two qubits coupled to one or two phonon modes. We represent the
qubit subspace as $\ket{\psi(t)}$, and the motion of the crystal as phonon
Fock states $\ket{n}$. The density matrix of the initial state is assumed to
be $\hat{\rho}(0)=\ket{\psi(0)}\bra{\psi(0)}\otimes\hat{\rho}_{n}(0)$, where
$\hat{\rho}_{n}(0)$ is the density matrix of the phonon subspace:

$\displaystyle\hat{\rho}_{n}(0)\equiv\sum_{n}\mathcal{P}_{n}\ket{n}\bra{n}.$
(1)

Here, $\mathcal{P}_{n}$ is the probability that the phonon subspace begins in
the $\ket{n}$ state. For every calculation below, we determine the fidelity by
applying the system’s time-propagator to a pure state wave function
initialized to $\ket{\psi(0)}\ket{n}$, which gives $\mathcal{F}_{n}$, which
can then be averaged over $\mathcal{P}_{n}$ to obtain $\mathcal{F}$; this is
mathematically equivalent to solving the master equation for an incoherent
mixed state, and tracing over the motional degree-of-freedom to determine the
fidelity $\mathcal{F}$. For each calculation, we leave our final answer in
terms of the infidelity for a state with an initial phonon number
$\mathcal{I}_{n}$, which allows one to straightforwardly determine the
ensemble averaged infidelity $\mathcal{I}$, as discussed below.

For each of the calculations, we consider a gate Hamiltonian $\hat{H}_{g}$;
when $\hat{H}_{g}$ acts on a system for a gate time $t_{g}$, it results in an
‘ideal’ time-propagator for the gate that we represent with $\hat{U}_{g}(t)$.
We note that, unless it would lead to ambiguities, we will drop the time
arguments of operators from here on. Under realistic conditions, the actual
Hamiltonian will deviate from $\hat{H}_{g}$, producing a value of
$\mathcal{F}$ that is less than one. In this manuscript, we only consider
high-fidelity gates ($\mathcal{F}\sim 1$), meaning that we can take each
individual error source to be small, and assume their resultant infidelities
($\mathcal{I}\equiv 1-\mathcal{F}$) will be additive. If we represent each
source of error with $\hat{H}_{e}$, this makes the total Hamiltonian:

$\displaystyle\hat{H}_{t}=\hat{H}_{g}+\hat{H}_{e}.$ (2)

which results in a time-propagator for the system acting under $\hat{H}_{t}$,
which we represent as $\hat{U}_{t}$. The fidelity $\mathcal{F}_{n}$ for a
system with initial phonon number $n$ being acted on by $\hat{U}_{t}$ is given
by:

$\displaystyle\mathcal{F}_{n}$ $\displaystyle=$
$\displaystyle\sum_{n^{\prime}}|\bra{\psi(0)}\bra{n^{\prime}}\hat{U}_{g}^{\dagger}\hat{U}_{t}\ket{\psi(0)}\ket{n}|^{2}$
(3)

where $\hat{U}_{g}\ket{\psi(0)}$ is the ‘ideal’ target state.

In this work, we isolate the small deviation of $\hat{U}_{t}$ from
$\hat{U}_{g}$ by factoring the total time-propagator such that

$\displaystyle\hat{U}_{t}=\hat{U}_{g}\hat{U}_{e}.$ (4)

If this factorization is straightforward, we can immediately rewrite Eq. (3)
as:

$\displaystyle\mathcal{F}_{n}$ $\displaystyle=$
$\displaystyle\sum_{n^{\prime}}|\bra{\psi(0)}\bra{n^{\prime}}\hat{U}_{e}\ket{\psi(0)}\ket{n}|^{2}.$
(5)

We can, subsequently, Taylor expand $\hat{U}_{e}$, and determine the leading-
order correction to $\mathcal{F}_{n}$ due to $\hat{H}_{e}$. When it is not
straightforward to factor $\hat{U}_{t}$, we transform into the interaction
picture with respect to $\hat{H}_{g}$, then use $2^{\text{nd}}$-order time-
dependent perturbation theory to approximate $\hat{U}_{e}$. A similar
technique was used in Ref. Haddadfarshi and Mintert (2016). The interaction
picture Hamiltonian is given by:

$\displaystyle\hat{H}_{I}(t)=\hat{U}_{g}^{\dagger}(t)\hat{H}_{t}(t)\hat{U}_{g}(t)+i\hbar\dot{\hat{U}}_{g}^{\dagger}(t)\hat{U}_{g}(t).$
(6)

Upon doing this, we can determine the time-propagator for a system acting
under a small $\hat{H}_{I}$ for a time $t_{g}$ by using $2^{\text{nd}}$-order
time-dependent perturbation theory:

$\displaystyle\hat{U}_{e}\simeq\hat{I}-\frac{i}{\hbar}\int^{t_{g}}_{0}\\!\\!dt^{\prime}\hat{H}_{I}(t^{\prime})-\frac{1}{\hbar^{2}}\int^{t_{g}}_{0}\\!\\!\\!\int^{t^{\prime}}_{0}\\!\\!dt^{\prime}dt^{\prime\prime}\hat{H}_{I}(t^{\prime})\hat{H}_{I}(t^{\prime\prime}).$

Transforming out of the interaction picture, this gives:

$\displaystyle\ket{\psi(t_{g})}=\hat{U}_{g}\hat{U}_{e}\ket{\psi(0)},$ (8)

meaning we have factorized $\hat{U}_{t}=\hat{U}_{g}\hat{U}_{e}$, at which
point Eq. (5) applies, and we can determine the leading-order correction to
$\mathcal{F}_{n}$ using the expansion given by Eq. (II).

For all of the calculations below, we first calculate the infidelity of a gate
for an initial phonon number $\mathcal{I}_{n}=1-\mathcal{F}_{n}$. Each value
of $\mathcal{I}_{n}$’s dependence on the initial qubit state is written in
terms of the variance of an operator $\hat{A}$ that acts on the qubit
subspace:

$\displaystyle\lambda_{\hat{A}}^{2}\equiv\braket{\hat{A}^{2}}-\braket{\hat{A}}^{2},$
(9)

such that
$\hat{A}\in\\{\hat{\sigma}_{\alpha},\hat{S}_{\alpha},\hat{S}_{\alpha}^{2}\\}$,
where $\hat{\sigma}_{\alpha}$ is a Pauli spin operator with eigenstates
pointing in the $\alpha$-direction on the Bloch sphere, and
$\hat{S}_{\alpha}=\hat{\sigma}_{\alpha,1}+\hat{\sigma}_{\sigma,2}$ is a
collective spin operator acting on qubits $1$ and $2$. Finally, we use each
equation for $\mathcal{I}_{n}$ to determine an ensemble average over an
initial mixed state by summing over the probability distribution
$\mathcal{P}_{n}$ via:

$\displaystyle\mathcal{I}=\sum_{n}\mathcal{P}_{n}\mathcal{I}_{n},$ (10)

resulting in the replacement $n^{k}$ with its average over $\mathcal{P}_{n}$
$\overline{n^{k}}$ for each equation. Thus, all of the equations derived below
are general to any initial qubit state and mixed state of the motion.

##  III Single-qubit gate errors

For the ideal case, we represent a single-qubit gate Hamiltonian with:

$\displaystyle\hat{H}_{1g}=\hbar\Omega_{1g}\hat{\sigma}_{\alpha}.$ (11)

This Hamiltonian is in the rotating frame with respect to the qubit frequency,
and we have made the rotating wave approximation with respect to terms
oscillating near the qubit frequency. Here, $\Omega_{1g}$ is the Rabi
frequency of the microwave field oscillating in the $\hat{n}_{\alpha}$
direction, and $\hat{\sigma}_{\alpha}=(\hat{n}_{\alpha}\cdot\vec{\sigma})$ is
a single-qubit Pauli operator, with eigenvectors that point in the $\pm\alpha$
direction on the Bloch sphere. We also assume that the qubit frequency
deviates significantly from the motional frequency. After a gate time $t_{g}$,
the time-propagator for $\hat{H}_{1g}$ is:

$\displaystyle\hat{U}_{1g}=e^{-i\Omega_{1g}t_{g}\hat{\sigma}_{\alpha}},$ (12)

which (by definition) would give $\mathcal{F}=1$ in the absence of an error
term. In this section, we consider the infidelity of gates generated by Eq.
(11) in the presence of inhomogeneities in the microwave field.

### Driving field inhomogeneity

Inhomogeneities of the driving field do not constitute a significant part of
the error budget of the highest-fidelity single-qubit laser-free gates in
trapped ions Harty  _et al._ (2014). Due to their light mass, though, trapped
electrons typically have a relatively large spatial extent compared to ions.
The problem is exacerbated by the absence of laser cooling methods, likely
leading to substantially higher motional temperatures. This could render
inhomogeneities a significant part of the trapped electron single-qubit error
budget. Here, we provide analytical and numerical quantification of the
infidelity due to these errors. We represent the error Hamiltonian for driving
field inhomogeneities in the presence of two phonon modes as:

$\displaystyle\tilde{H}_{1e}$ $\displaystyle=$
$\displaystyle\hbar\Big{\\{}\omega_{a}\hat{a}^{\dagger}\hat{a}+\omega_{b}\hat{b}^{\dagger}\hat{b}+\hat{\sigma}_{\alpha}\Big{(}\Omega^{\prime}_{a}[\hat{a}^{\dagger}+\hat{a}]+\Omega^{\prime}_{b}[\hat{b}^{\dagger}+\hat{b}]$
(13)
$\displaystyle+\Omega_{a}^{\prime\prime}[\hat{a}^{\dagger}+\hat{a}]^{2}+\Omega_{b}^{\prime\prime}[\hat{b}^{\dagger}+\hat{b}]^{2}$
$\displaystyle+\Omega_{ab}^{\prime\prime}[\hat{a}^{\dagger}+\hat{a}][\hat{b}^{\dagger}+\hat{b}]\Big{)}\Big{\\}},$

where the tilde indicates that we are in the lab-frame with respect to the
motion, $\omega_{a(b)}$ is the motional frequency of the $a(b)$ mode,
$\Omega_{a(b)}^{\prime}\equiv\sqrt{\hbar/2m\omega_{a(b)}}\partial\Omega_{1g}/\partial\hat{x}_{a(b)}$
is the Rabi frequency of the $1^{\text{st}}$-derivative of the driving field
projected on along the $a(b)$ mode,
$\Omega_{a(b)}^{\prime\prime}\equiv(\hbar/4m\omega_{a(b)})\partial^{2}\Omega_{1g}/\partial\hat{x}_{a(b)}^{2}$
is the Rabi frequency of the $2^{\text{nd}}$-derivative of the driving field
along the $a(b)$ mode, and
$\Omega_{ab}^{\prime\prime}\equiv(\hbar/2m\sqrt{\omega_{a}\omega_{b}})\partial^{2}\Omega_{1g}/\partial\hat{x}_{a}\partial\hat{x}_{b}$
is the cross-Kerr coupling Rabi frequency between modes $a$ and $b$; here,
each partial derivative is evaluated at the qubit’s location. Moving into the
rotating frame with respect to each mode’s frequency, and dropping the
$2^{\text{nd}}$-order terms that oscillate near $\omega_{a(b)}$, we get:

$\displaystyle\hat{H}_{1e}$ $\displaystyle\simeq$
$\displaystyle\hbar\hat{\sigma}_{\alpha}\Big{\\{}\Omega_{a}^{\prime}\Big{(}\hat{a}^{\dagger}e^{i\omega_{a}t}\\!+\hat{a}e^{-i\omega_{a}t}\Big{)}\\!+\Omega_{b}^{\prime}\Big{(}\hat{b}^{\dagger}e^{i\omega_{b}t}\\!+\hat{b}e^{-i\omega_{b}t}\Big{)}$
(14)
$\displaystyle+\Omega_{a}^{\prime\prime}\Big{(}2\hat{a}^{\dagger}\hat{a}+1\Big{)}+\Omega_{b}^{\prime\prime}\Big{(}2\hat{b}^{\dagger}\hat{b}+1\Big{)}$
$\displaystyle+\Omega_{ab}^{\prime\prime}\Big{(}\hat{a}^{\dagger}\hat{b}e^{i\omega_{ab}t}+\hat{a}\hat{b}^{\dagger}e^{-i\omega_{ab}t}\Big{)}\Big{\\}},$

where $\omega_{ab}\equiv\omega_{a}-\omega_{b}$. Note that the above equation
comprises what are effectively three different error types:
$\propto\Omega_{a(b)}^{\prime}$ terms that arise from the
$1^{\text{st}}$-derivative of the driving field’s projection along the $a(b)$
mode, $\propto\Omega_{a(b)}^{\prime\prime}$ terms that arise from the
projection of the $2^{\text{nd}}$-derivative of the driving field on the
$a(b)$ mode, and $\propto\Omega_{ab}^{\prime\prime}$ cross-Kerr terms.

Figure 1: Comparison between the one-qubit gate infidelities due to field
inhomogeneities given by numerical simulations (dashed lines) and the analytic
predictions (solid lines) given in the text. Each graph shows the gate
infidelity, normalized by the phonon dependence of the infidelity predicted by
the analytic formulae, $\tilde{\mathcal{I}}_{n}$ versus the relative size of
the error term compared to the gate Rabi frequency $\Omega_{1g}$. For each
error source, we compare for two initial states:
$\ket{\psi(0)}=\ket{\downarrow}$ (analytic: black, numeric: blue), and
$\ket{\psi(0)}=\sqrt{3/4}\ket{\downarrow}+\sqrt{1/4}\ket{\uparrow}$ (analytic:
grey solid, numerical: red). (a) Shows
$\tilde{\mathcal{I}}^{1a}_{n_{a}}=\mathcal{I}^{1a}_{n_{a}}/(2n_{a}+1)$ versus
the first-order field inhomogeneity $\Omega_{a}/\Omega_{1g}$. This is shown
for initial phonon numbers of $n_{a}=0$ (dotted), $n_{a}=100$ (dashed dotted),
and $n_{a}=200$ (dashed). (b) Shows
$\tilde{\mathcal{I}}^{1a^{2}}_{n_{a}}=\mathcal{I}^{1a^{2}}_{n_{a}}/(2n_{a}+1)^{2}$
versus the strength of the second-order field inhomogeneity
$\Omega_{a^{2}}/\Omega_{1g}$, for $n_{a}=0$ (dotted), $n_{a}=100$, and
$n_{a}=200$. (c) Shows
$\tilde{\mathcal{I}}^{1ab}_{n_{a},n_{b}}=\mathcal{\mathcal{I}}^{1ab}_{n_{a},n_{b}}/(2n_{a}n_{b}+n_{a}+n_{b})$
versus cross-Kerr coupling strength $\Omega_{ab}/\Omega_{1g}$, when
$\omega_{ab}=10\Omega_{1g}$.

####  $1^{\text{st}}$-order inhomogeneity

In this subsection, we consider the infidelity $\mathcal{I}^{1a}$ of a single-
qubit gate in the presence of a non-zero projection of the field gradient onto
mode $a$, noting that the calculation for mode $b$ is identical. This is given
by the Hamiltonian:

$\displaystyle\hat{H}_{1e}^{a}=\hbar\Omega^{\prime}_{a}\hat{\sigma}_{\alpha}\Big{\\{}\hat{a}^{\dagger}e^{i\omega_{a}t}+\hat{a}e^{-i\omega_{a}t}\Big{\\}}.$
(15)

The total Hamiltonian for the system is then:

$\displaystyle\hat{H}_{1t}^{a}$ $\displaystyle=$
$\displaystyle\hat{H}_{1g}+\hat{H}_{1e}^{a}.$ (16)

In this situation, $\hat{H}_{1e}^{a}$ creates a residual spin-dependent
displacement at $t_{g}$, decohering the system.

Because $\hat{H}_{1g}$ and $\hat{H}_{1e}^{a}$ commute at all times, we can
immediately factor their time-propagator:

$\displaystyle\hat{U}_{1t}^{a}=\hat{U}_{1g}\hat{U}_{1e}^{a},$ (17)

allowing us to apply Eq. (5) to calculate the infidelity of a state
initialized to phonon mode $n_{a}$ for this error source
$\mathcal{I}^{1a}_{n_{a}}$. We calculate $\hat{U}_{1e}^{a}$ using the Magnus
expansion Magnus (1954) for $\hat{H}_{1e}^{a}$. Up to a phase, this is
described by a spin-dependent displacement operator:

$\displaystyle\hat{U}_{1e}^{a}$ $\displaystyle=$
$\displaystyle\exp\Big{\\{}-\frac{i}{\hbar}\int^{t_{g}}_{0}dt^{\prime}\hat{H}_{1e}^{a}(t^{\prime})\Big{\\}}$
(18) $\displaystyle=$
$\displaystyle\exp\Big{\\{}-\frac{2i\Omega_{a}^{\prime}}{\omega_{a}}\hat{\sigma}_{\alpha}\sin\Big{(}\frac{\omega_{a}t_{g}}{2}\Big{)}$
$\displaystyle\hskip
42.67912pt\times\Big{(}\hat{a}^{\dagger}e^{i\omega_{a}t_{g}/2}+\hat{a}e^{-i\omega_{a}t_{g}/2}\Big{)}\Big{\\}},$

which we can plug into Eq. (5). Since we assume $\hat{U}_{1e}^{a}\sim\hat{I}$,
we can subsequently insert its Taylor series, and keep only the quadratic
contributions to the fidelity $\mathcal{F}_{n_{a}}^{1a}$. This expression for
$\mathcal{F}_{n_{a}}^{1a}$, keeping terms up to
$\propto(\Omega_{a}^{\prime}/\omega_{a})^{2}$, is:

$\displaystyle\mathcal{F}_{n_{a}}^{1a}$ $\displaystyle\simeq$ $\displaystyle
1-\frac{4\Omega_{a}^{\prime
2}}{\omega_{a}^{2}}\sin^{2}\Big{(}\frac{\omega_{a}t_{g}}{2}\Big{)}\Big{(}2n_{a}+1\Big{)}\lambda^{2}_{\hat{\sigma}_{\alpha}}.$
(19)

where we have simplified this expression by substituting the $t=0$ variance of
the $\hat{\sigma}_{\alpha}$ operator:
$1-\braket{\psi(0)}{\hat{\sigma}}{\psi(0)}^{2}=\braket{\hat{\sigma}_{\alpha}^{2}}-\braket{\hat{\sigma}_{\alpha}}^{2}\equiv\lambda^{2}_{\hat{\sigma}_{\alpha}}$.
We can further simplify our expression by taking the time-average of
$\sin^{2}(\omega_{a}t_{g}/2)\simeq 1/2$. This gives an equation for the
infidelity of a gate acting on a state beginning with $n_{a}$ phonons:

$\displaystyle\mathcal{I}_{n_{a}}^{1a}$ $\displaystyle\simeq$
$\displaystyle\frac{2\Omega_{a}^{\prime
2}}{\omega_{a}^{2}}\Big{(}2n_{a}+1\Big{)}\lambda^{2}_{\hat{\sigma}_{\alpha}}.$
(20)

In Fig. 1(a), we compare Eq. (20) to the direct numerical integration of Eq.
(16), varying $\ket{\psi(0)}$ and $n_{a}$, and showing they converge when
$|\Omega^{\prime}_{1a}/\omega_{a}|\ll 1$. Finally, we can average over
$\mathcal{P}_{n_{a}}$ to determine the infidelity for a system beginning in a
general mixed-state of the motion:

$\displaystyle\mathcal{I}^{1a}$ $\displaystyle\simeq$
$\displaystyle\frac{2\Omega^{\prime
2}_{a}}{\omega_{a}^{2}}\Big{(}2\bar{n}_{a}+1\Big{)}\lambda^{2}_{\hat{\sigma}_{a}}.$
(21)

####  $2^{\text{nd}}$-order inhomogeneity

If the $2^{\text{nd}}$-derivative of the driving field has a non-zero
projection onto phonon mode $a$, noting again the calculation is identical for
mode $b$, the Hamiltonian for a single-qubit gate is:

$\displaystyle\hat{H}_{1t}$ $\displaystyle=$
$\displaystyle\hat{H}_{1g}+\hat{H}_{1e}^{a^{2}}$ (22) $\displaystyle=$
$\displaystyle\hbar\Omega_{g}\hat{\sigma}_{\alpha}+\hbar\Omega_{a}^{\prime\prime}\hat{\sigma}_{\alpha}\Big{(}2\hat{a}^{\dagger}\hat{a}+1\Big{)}.$

Here, $\hat{H}_{1g}$ and $\hat{H}_{1e}^{a^{2}}$ commute at all times, so we
may factor $\hat{U}_{1t}^{a^{2}}=\hat{U}_{1e}^{a^{2}}\hat{U}_{1g}$, allowing
us to apply Eq. (5), where:

$\displaystyle\hat{U}_{1e}^{a^{2}}=\exp\Big{\\{}-i\Omega_{a}^{\prime\prime}t_{g}\hat{\sigma}_{\alpha}\Big{(}2\hat{a}^{\dagger}\hat{a}+1\Big{)}\Big{\\}}.$
(23)

Assuming that $|\Omega_{a}^{\prime\prime}t_{g}|\ll 1$, we only keep terms up
to $\propto(\Omega_{a}^{\prime\prime}t_{g})^{2}$. The result is:

$\displaystyle\mathcal{F}_{n_{a}}^{1a^{2}}\simeq 1-\Omega_{a}^{\prime\prime
2}t_{g}^{2}\Big{(}2n_{a}+1\Big{)}^{2}\lambda^{2}_{\hat{\sigma}_{\alpha}},$
(24)

giving an equation for the infidelity of a gate acting on a state that begins
with $n_{a}$ phonons:

$\displaystyle\mathcal{I}_{n_{a}}^{1a^{2}}\simeq\Omega_{a}^{\prime\prime
2}t_{g}^{2}\Big{(}2n_{a}+1\Big{)}^{2}\lambda^{2}_{\hat{\sigma}_{\alpha}},$
(25)

where we have, again, simplified our expression by substituting in the $t=0$
expression for the variance of the $\hat{\sigma}_{\alpha}$ operator. In Fig.
1(b), we compare Eq. (25) to the direct numerical simulation of Eq. (22),
showing they converge when $|\Omega_{a}^{\prime\prime}t_{g}|\ll 1$. Finally,
we can average over $\mathcal{P}_{n_{a}}$ to determine the infidelity for a
system beginning in a general mixed-state of the motion:

$\displaystyle\mathcal{I}^{1a^{2}}\simeq\Omega_{a}^{\prime\prime
2}t_{g}^{2}\Big{(}4\overline{n^{2}_{a}}+4\bar{n}_{a}+1\Big{)}\lambda^{2}_{\hat{\sigma}_{\alpha}}.$
(26)

#### Cross-Kerr coupling

If the mixed, $2^{\text{nd}}$-order partial derivative of the driving field
has a non-zero projection over modes $a$ and $b$, the single-qubit gate is
described by:

$\displaystyle\hat{H}_{1t}^{ab}$ $\displaystyle=$
$\displaystyle\hat{H}_{1g}+\hat{H}_{1e}^{ab}$ $\displaystyle=$
$\displaystyle\hbar\Omega_{1g}\hat{\sigma}_{\alpha}+\hbar\Omega_{ab}^{\prime\prime}\hat{\sigma}_{\alpha}\Big{\\{}\hat{a}^{\dagger}\hat{b}e^{i\omega_{ab}t}+\hat{a}\hat{b}^{\dagger}e^{-i\omega_{ab}t}\Big{\\}},$

where $\hat{H}^{ab}_{1e}$ takes the form of a spin-dependent beam-splitter
interaction. While $\hat{H}_{1e}^{ab}$ still commutes with $\hat{H}_{1g}$ at
all times, allowing us to factor $\hat{U}_{1t}^{ab}$ as
$\hat{U}_{1e}^{ab}\hat{U}_{1g}$, the $2^{\text{nd}}$-order term in the Magnus
expansion in $\hat{U}_{1e}^{ab}$’s contribution to the dynamics is no longer
merely a global phase. Thus, keeping terms up to $2^{\text{nd}}$-order in
$\hat{U}_{1e}^{ab}$ gives:

$\displaystyle\hat{U}_{1e}^{ab}$ $\displaystyle\simeq$
$\displaystyle\exp\Big{\\{}-\frac{i}{\hbar}\int^{t_{g}}_{0}dt^{\prime}H_{1e}^{ab}(t^{\prime})$
(28) $\displaystyle\hskip
31.29802pt-\frac{1}{2\hbar^{2}}\int^{t_{g}}_{0}\int^{t^{\prime}}_{0}dt^{\prime}dt^{\prime\prime}\Big{[}\hat{H}_{1e}^{ab}(t^{\prime}),\hat{H}_{1e}^{ab}(t^{\prime\prime})\Big{]}\Big{\\}}$
$\displaystyle=$
$\displaystyle\exp\Big{\\{}\\!\\!-i\hat{\sigma}_{\alpha}\Big{(}\chi\hat{a}^{\dagger}\hat{b}+\\!\\!\chi^{*}\hat{a}\hat{b}^{\dagger}\Big{)}\\!\\!-i\beta\Big{(}\hat{a}^{\dagger}\hat{a}\\!-\\!\\!\hat{b}^{\dagger}\hat{b}\Big{)}\Big{\\}},$

where we have defined:

$\displaystyle\chi$ $\displaystyle\equiv$
$\displaystyle\frac{2\Omega^{\prime\prime}_{ab}}{\omega_{ab}}\sin\Big{(}\frac{\omega_{ab}t_{g}}{2}\Big{)}e^{i\omega_{ab}t_{g}/2}$
$\displaystyle\beta$ $\displaystyle\equiv$
$\displaystyle\frac{\Omega_{ab}^{\prime\prime
2}}{\omega_{ab}}\Big{\\{}t_{g}-\frac{\sin(\omega_{ab}t_{g})}{\omega_{ab}}\Big{\\}},$
(29)

up to a phase. Since $\hat{H}_{1e}^{ab}$ couples two modes, when applying Eq.
(5) we must consider both when calculating the fidelity:

$\displaystyle\\!\\!\\!\\!\\!\\!\mathcal{F}_{n_{a},n_{b}}^{1ab}\\!\\!=\\!\\!\\!\\!\sum_{n^{\prime}_{a},n^{\prime}_{b}}\\!\\!|\bra{\psi(0)}\bra{n^{\prime}_{a}}\bra{n^{\prime}_{b}}\hat{U}_{1e}^{ab}\ket{\psi(0)}\ket{n_{a}}\ket{n_{b}}|^{2}.$
(30)

Applying this equation and, again, keeping only the leading-order contribution
to the fidelity $\hat{F}_{n_{a},n_{b}}^{ab}$, we get:

$\displaystyle\mathcal{F}^{1ab}_{n_{a},n_{b}}$ $\displaystyle\simeq$
$\displaystyle 1-\frac{4\Omega_{ab}^{\prime\prime
2}}{\omega^{2}_{ab}}\sin^{2}\Big{(}\frac{\omega_{ab}t_{g}}{2}\Big{)}\Big{(}2n_{a}n_{b}+n_{a}+n_{b}\Big{)}\lambda^{2}_{\hat{\sigma}_{\alpha}},$

which we can simplify by substituting in the variance of the
$\hat{\sigma}_{\alpha}$ operator, and the time-average of the sinusoidal
oscillation $\sin^{2}(\omega_{ab}t_{g}/2)\simeq 1/2$. This gives:

$\displaystyle\mathcal{I}_{n_{a},n_{b}}^{1ab}\simeq\frac{2\Omega^{\prime\prime
2}_{ab}}{\omega^{2}_{ab}}\Big{(}2n_{a}n_{b}+n_{a}+n_{b}\Big{)}\lambda^{2}_{\hat{\sigma}_{\alpha}}.$
(32)

In Fig. 1(c), we compare this result to the direct numerical integration of
Eq. (III), showing that the two calculations converge when
$|\Omega_{ab}^{\prime\prime}/\omega_{ab}|\ll 1$. Finally, we can sum over
$\mathcal{P}_{n_{a},n_{b}}$ and determine the infidelity of a system beginning
in a general mixed-state:

$\displaystyle\mathcal{I}^{1ab}\simeq\frac{2\Omega^{\prime\prime
2}_{ab}}{\omega^{2}_{ab}}\Big{(}2\bar{n}_{a}\bar{n}_{b}+\bar{n}_{a}+\bar{n}_{b}\Big{)}\lambda^{2}_{\hat{\sigma}_{\alpha}},$
(33)

where we have assumed
$\mathcal{P}_{n_{a},n_{b}}=\mathcal{P}_{n_{a}}\mathcal{P}_{n_{b}}$, i.e. that
modes $a$ and $b$ are uncorrelated.

Single-Qubit Gate Errors
---
error name |  equation |  infidelity

1${}^{\text{st}}$-order inhomogeniety |  Eq. (21) |  $\mathcal{I}^{1a}=\frac{2\Omega_{a}^{\prime 2}}{\omega_{a}^{2}}\Big{(}2\bar{n}_{a}+1\Big{)}\lambda^{2}_{\hat{\sigma}_{\alpha}}$
---|---|---
2${}^{\text{\text{nd}}}$-order inhomogeniety |  Eq. (26) |  $\mathcal{I}^{1a^{2}}=\Omega_{a}^{\prime\prime 2}t_{g}^{2}\Big{(}4\overline{n_{a}^{2}}+4\bar{n}_{a}+1\Big{)}\lambda^{2}_{\hat{\sigma}_{\alpha}}$
cross-Kerr coupling |  Eq. (33) |  $\mathcal{I}^{1ab}=\frac{2\Omega^{\prime\prime 2}_{ab}}{\omega^{2}_{ab}}\Big{(}2\bar{n}_{a}\bar{n}_{b}+\bar{n}_{a}+\bar{n}_{b}\Big{)}\lambda^{2}_{\hat{\sigma}_{\alpha}}$

Table 1: Summary of infidelities for single-qubit gates. See text for variable
definitions.

##  IV Two-qubit gate errors

We represent the, idealized, two-qubit gate Hamiltonian:

$\displaystyle\tilde{H}_{2g}$ $\displaystyle=$
$\displaystyle\frac{\hbar\omega_{0}}{2}\hat{S}_{z}+\hbar\omega_{a}\hat{a}^{\dagger}\hat{a}+2\hbar\Omega_{2g}f(t)\hat{S}_{\alpha}\Big{(}\hat{a}^{\dagger}+\hat{a}\Big{)},$

where, again, the tilde indicates that we are working in the lab-frame,
$\hat{S}_{\alpha}\equiv\hat{\sigma}_{\alpha,1}+\hat{\sigma}_{\alpha,2}$ is a
multi-qubit Pauli spin operator with eigenvectors pointing in the $\alpha$
direction, $\Omega_{2g}$ is the two-qubit gate Rabi frequency, and $f(t)$ is a
sinusoidal function representing the temporal dependence of the gradient
field, which is either $f(t)\equiv\cos([\omega_{a}-\Delta]t)$ if $\alpha\equiv
z$, or
$f(t)\equiv\cos([\omega_{0}-\omega_{a}+\Delta]t)+\cos([\omega_{0}+\omega_{a}-\Delta]t)$
if $\alpha$ is in the $xy$-plane; in both bases, $\Delta$ acts as the detuning
of the gate. Transforming into the rotating frame with respect to the qubit
and motion, as well as making the rotating wave approximation, gives:

$\displaystyle\hat{H}_{2g}=\hbar\Omega_{2g}\hat{S}_{\alpha}\Big{(}\hat{a}^{\dagger}e^{i\Delta
t}+\hat{a}e^{-i\Delta t}\Big{)},$ (35)

the form of which can be generated using lasers Mølmer and Sørensen (1999);
Sørensen and Mølmer (2000); Leibfried  _et al._ (2003) and with microwaves
Mintert and Wunderlich (2001); Ospelkaus  _et al._ (2008, 2011); Weidt  _et
al._ (2016); Harty  _et al._ (2016); Sutherland  _et al._ (2019, 2020);
Srinivas  _et al._ (2021). We will begin with Eq. (35) for all of the
following sections except Sec. IV.3.

We analyze the unitary evolution of Eq. (35) under the influence each
subsection’s error term, giving a total Hamiltonian $\hat{H}_{2t}$. We
continue to assume each error’s contribution to the final infidelity will be
additive. We analyze the unitary evolution using the Magnus expansion Magnus
(1954), keeping terms up to $2^{\text{nd}}$-order:

$\displaystyle\hat{U}_{2t}$ $\displaystyle=$
$\displaystyle\exp\Big{(}-\frac{i}{\hbar}\int^{t}_{0}dt^{\prime}\hat{H}_{2t}(t^{\prime})$
(36)
$\displaystyle-\frac{1}{2\hbar^{2}}\int^{t}_{0}\int^{t^{\prime}}_{0}dt^{\prime}dt^{\prime\prime}[\hat{H}_{2t}(t^{\prime}),\hat{H}_{2t}(t^{\prime\prime})]\Big{)}.$

For geometric phase gates, the first term in the Magnus expansion represents a
spin-dependent displacement operator, making a circular trajectory in phase-
space. Ideally, this term will disappear after each of $N$ ‘loops’ in phase-
space, occurring every integer multiple of $t=2\pi/\Delta$. Because the spin
and motion are entangled during a loop, any decoherence of the motion will
affect the spin, and, ultimately, the fidelity of the gate. For an ideal gate,
after a time $t_{g}=2\pi N/\Delta$, this gives:

$\displaystyle\hat{U}_{2g}$ $\displaystyle=$ $\displaystyle
e^{i\phi\hat{S}_{\alpha}^{2}},$ (37)

where, in this work, we set the phase $\phi=2\pi
N\Omega_{2g}^{2}/\Delta^{2}=\pi/8$, to give a maximally entangled Bell state
when operating on $\ket{\psi(0)}=\ket{\downarrow\downarrow}$. This may be
turned into an $N$-loop gate by setting $t_{g}\rightarrow N^{1/2}t_{g}$ and
$\Delta\rightarrow N^{1/2}\Delta$. Finally, we note that we will frequently
use the fact that $\hat{S}_{\alpha}^{2(k+1)}=4^{k}\hat{S}_{\alpha}^{2}$ and
$\hat{S}_{\alpha}^{2k+1}=4^{k}\hat{S}_{\alpha}$, where $k\in\mathbb{N}$.

###  IV.1 Static motional frequency shifts

During a two-qubit gate, if the frequency of the motional mode is shifted from
its idealized value the phase-space trajectory is distorted, giving an error.
In this section, we will show that the effects of this error mechanism may be
separated into two physical sources: residual spin-motion entanglement from
the phase-space trajectory, and the area encompassed in phase-space deviating
from its idealized value. These two effects require different techniques to
ameliorate their deleterious effects on the gate fidelity.

The total gate Hamiltonian including a static motional frequency shift is:

$\displaystyle\hat{H}_{2t}$ $\displaystyle=$
$\displaystyle\hat{H}_{2g}+\hat{H}_{2e}^{\delta}$ (38) $\displaystyle=$
$\displaystyle\hbar\Omega_{2g}\hat{S}_{\alpha}\Big{(}\hat{a}e^{-i\Delta
t}+\hat{a}^{\dagger}e^{i\Delta t}\Big{)}+\hbar\delta\hat{a}^{\dagger}\hat{a},$

where $\delta\ll\Omega_{2g}$ is the frequency shift. Unlike the error
mechanisms we have explored thus far,
$[\hat{H}_{2g},\hat{H}_{2e}^{\delta}]\neq 0$, meaning we cannot directly
factor $\hat{U}_{2t}^{\delta}$. In order to put $\hat{U}_{2t}^{\delta}$ in a
form that enables factorization, we transform the above equation into the
rotating frame with respect to $\hat{H}_{2e}^{\delta}$, which gives:

$\displaystyle\hat{H}_{2g,I}=\hbar\Omega_{2g}\hat{S}_{\alpha}\Big{(}\hat{a}e^{-i[\Delta+\delta]t}+\hat{a}^{\dagger}e^{i[\Delta+\delta]t}\Big{)}.$
(39)

Plugging this into Eq. (36), and dropping terms higher-order than
$\propto\delta^{2}$, we can factorize
$\hat{U}_{2t}^{\delta}=\hat{U}_{2g}\hat{U}_{2e}^{\delta}$, up to a global
($n_{a}$ dependent) phase, where:

$\displaystyle\hat{U}_{2e}^{\delta}\simeq\exp\Big{(}-\frac{i\Omega_{2g}\delta
t_{g}}{\Delta}\hat{S}_{\alpha}[\hat{a}+\hat{a}^{\dagger}]-\frac{2i\Omega_{2g}^{2}\delta
t_{g}}{\Delta^{2}}\hat{S}_{\alpha}^{2}\Big{)}.$

The first term in this equation is a displacement operator, representing the
error from residual spin-motion entanglement, whereas the second term
represents the erroneous area encompassed in phase-space, producing an
incorrect geometric phase. Due to the fact that $\Delta\propto N^{1/2}$ and
$t_{g}\propto N^{1/2}$ for an $N$-loop gate, we can see that increasing $N$
reduces the error due to the incorrect geometric phase, but does not affect
the error due to residual spin-motion entanglement. Because of this, more
sophisticated pulse sequences such as Walsh modulations Hayes  _et al._ (2012)
(see appendix) or polychromatic gates Haddadfarshi and Mintert (2016); Webb
_et al._ (2018); Shapira  _et al._ (2018); Sutherland  _et al._ (2020) are
needed. We note that, in the appendix, we derive the value of
$\mathcal{I}^{2\delta}_{n_{a}}$ for gates undergoing such Walsh modulations.
We can plug Eq. (IV.1) into Eq. (5) to obtain $\mathcal{I}_{n_{a}}^{2\delta}$
up to $\propto(\delta/\Omega_{2g})^{2}$:

$\displaystyle\mathcal{I}_{n_{a}}^{2\delta}$ $\displaystyle\simeq$
$\displaystyle\frac{\pi^{2}\delta^{2}}{64\Omega_{2g}^{2}}\Big{[}(2n_{a}+1)\lambda_{\hat{S}_{\alpha}}^{2}+\lambda_{\hat{S}_{\alpha}^{2}}^{2}/4N\Big{]},$
(41)

where we have encapsulated the dependence of $\mathcal{I}_{n_{a}}^{2\delta}$
on the initial qubit state with the variances of $\hat{S}_{\alpha}$ and
$\hat{S}_{\alpha}^{2}$. In Fig. 2(a), we compare Eq. (41) to the direct
numerical integration of Eq. (38), showing they converge when
$|\delta/\Omega_{2g}|\ll 1$. Finally, we can average over
$\mathcal{P}_{n_{a}}$, and obtain the infidelity of a general mixed-state of
the motion:

$\displaystyle\mathcal{I}^{2\delta}$ $\displaystyle\simeq$
$\displaystyle\frac{\pi^{2}\delta^{2}}{64\Omega_{2g}^{2}}\Big{[}(2\bar{n}_{a}+1)\lambda_{\hat{S}_{\alpha}}^{2}+\lambda_{\hat{S}_{\alpha}^{2}}^{2}/4N\Big{]}.$
(42)

###  IV.2 Trap anharmonicity

We now examine the contribution of anharmonicities in the trapping potential
to the two-qubit gate infidelity. Considering that $3^{rd}$-order
anharmonicities only contain terms that oscillate near $\omega_{a}$, we make
the rotating wave approximation and take the leading-order trap anharmonicity
to be a quartic $\propto\hat{x}^{4}$ addition to $\hat{H}_{2g}$. Representing
$\hat{H}_{2t}$ in terms of ladder operators, and in the rotating frame with
respect to $\omega_{a}$, gives:

$\displaystyle\hat{H}_{2t}$ $\displaystyle=$
$\displaystyle\hbar\Omega_{2g}\hat{S}_{\alpha}\Big{\\{}\hat{a}^{\dagger}e^{i\Delta
t}+\hat{a}e^{-i\Delta t}\Big{\\}}$ (43) $\displaystyle\hskip
28.45274pt+\hbar\varepsilon\Big{\\{}\hat{a}^{\dagger}e^{i\omega_{a}t}+\hat{a}e^{-i\omega_{a}t}\Big{\\}}^{4}.$

Upon making the rotating wave approximation, and dropping a global phase, this
can be reduced to give:

$\displaystyle\hat{H}_{2t}$ $\displaystyle\simeq$
$\displaystyle\hbar\Omega_{2g}\hat{S}_{\alpha}\Big{\\{}\hat{a}^{\dagger}e^{i\Delta
t}+\hat{a}e^{-i\Delta
t}\Big{\\}}+6\hbar\varepsilon\Big{\\{}\hat{a}^{\dagger}\hat{a}+(\hat{a}^{\dagger}\hat{a})^{2}\Big{\\}}.$
(44) $\displaystyle=$ $\displaystyle\hat{H}_{2g}+\hat{H}_{2e}^{\varepsilon}.$

We here transform into the interaction picture with respect to $\hat{H}_{2g}$,
using $\hat{U}_{2g}$ described by Eq. (36), which gives:

$\displaystyle\hat{H}_{2I}^{\varepsilon}=6\hbar\varepsilon\Big{\\{}\\!(\hat{a}^{\dagger}\\!+\\!\hat{S}_{\alpha}\gamma^{*})(\hat{a}\\!+\\!\hat{S}_{\alpha}\gamma)\\!+\\![(\hat{a}^{\dagger}\\!+\\!\hat{S}_{\alpha}\gamma^{*})(\hat{a}\\!+\\!\hat{S}_{\alpha}\gamma)]^{2}\Big{\\}},$

where:

$\displaystyle\gamma\equiv\frac{\Omega_{2g}}{\Delta}\Big{\\{}1-e^{i\Delta
t}\Big{\\}}.$ (46)

After this transformation, the time propagator for an ideal gate is
$\hat{U}_{2I}^{\varepsilon}=\hat{I}$. Since we assume that infidelities are
small, $\hat{U}_{2I}^{\varepsilon}\sim\hat{I}$, which we can evaluate using
Eq. (II). Before evaluating Eq. (II) we transform out of the interaction
picture, giving a factored
$\hat{U}_{2t}^{\varepsilon}=\hat{U}_{2g}\hat{U}_{2I}^{\varepsilon}$, and then
apply Eq. (5). Here, we only wish to extract the leading-order
($\propto[\varepsilon/\Omega_{2g}]^{2}$) contribution to the infidelity. This
means that in evaluating the fidelity we can neglect imaginary, and off-
diagonal, terms from the $2^{\text{nd}}$-order integral, simplifying the
evaluation. Doing this, and then plugging Eq. (II) into Eq. (5) gives an
infidelity of:

$\displaystyle\mathcal{I}_{n_{a}}^{2\varepsilon}$ $\displaystyle\simeq$
$\displaystyle\frac{9\pi^{2}\varepsilon^{2}}{16\Omega_{2g}^{2}}\Big{\\{}\lambda^{2}_{\hat{S}_{\alpha}}\Big{[}4(2n^{3}_{a}+3n_{a}^{2}+3n_{a}+1)$
(47)
$\displaystyle+\frac{6}{N}(2n^{2}_{a}+2n_{a}+1)+\frac{9}{4N^{2}}(2n_{a}+1)\Big{]}$
$\displaystyle+\lambda^{2}_{\hat{S}_{\alpha}^{2}}\Big{[}\frac{3}{8N}(11n_{a}^{2}+11n_{a}+3)$
$\displaystyle+\frac{3}{4N^{2}}(2n_{a}+1)+\frac{9}{64N^{3}}\Big{]}\Big{\\}},$

where we have, again, encapsulated the dependence on the initial spin with the
variances $\lambda_{\hat{S}_{\alpha},\hat{S}_{\alpha}^{2}}$. Figure 3(b)
compares Eq. (47) to the direct numerical integration of Eq. (44) for various
initial states of the qubits and motion, showing the two calculations converge
when $|\varepsilon/\Omega_{2g}|\ll 1$. Finally, we can average over
$\mathcal{P}_{n_{a}}$ and obtain the infidelity of a general mixed-state of
the motion:

$\displaystyle\mathcal{I}^{2\varepsilon}$ $\displaystyle\simeq$
$\displaystyle\frac{9\pi^{2}\varepsilon^{2}}{16\Omega_{2g}^{2}}\Big{\\{}\lambda^{2}_{\hat{S}_{\alpha}}\Big{[}4(2\overline{n^{3}_{a}}+3\overline{n_{a}^{2}}+3\bar{n}_{a}+1)$
(48)
$\displaystyle+\frac{6}{N}(2\overline{n^{2}_{a}}+2\bar{n}_{a}+1)+\frac{9}{4N^{2}}(2\bar{n}_{a}+1)\Big{]}$
$\displaystyle+\lambda^{2}_{\hat{S}_{\alpha}^{2}}\Big{[}\frac{3}{8N}(11\overline{n_{a}^{2}}+11\bar{n}_{a}+3)$
$\displaystyle+\frac{3}{4N^{2}}(2\bar{n}_{a}+1)+\frac{9}{64N^{3}}\Big{]}\Big{\\}},$

###  IV.3 Field inhomogeneities

Another error occurs if the gradient field that generates spin-motion coupling
for the two-qubit gate changes significantly over the spatial extent of the
qubits’ motion. In this section, we consider a gradient with non-zero
$1^{\text{st}}$ and $2^{\text{nd}}$ derivatives. We begin by transforming Eq.
(IV) into the rotating frame with respect to the qubit and motional
frequencies, and eliminating terms that oscillate $\propto\omega_{0}$. This
gives:

$\displaystyle\hat{H}_{2t}$ $\displaystyle=$ $\displaystyle
2\hbar\cos([\omega_{a}-\Delta]t)\hat{S}_{\alpha}\Big{\\{}\Omega_{2g}+\Omega_{2g}^{\prime}\Big{(}\hat{a}^{\dagger}e^{i\omega_{a}t}+\hat{a}e^{-i\omega_{a}t}\Big{)}$
$\displaystyle+\Omega_{2g}^{\prime\prime}\Big{(}\hat{a}^{\dagger}e^{i\omega_{a}t}+\hat{a}e^{-i\omega_{a}t}\Big{)}^{2}\Big{\\}}\Big{\\{}\hat{a}^{\dagger}e^{i\omega_{a}t}+\hat{a}e^{-i\omega_{a}t}\Big{\\}},$

where
$\Omega_{2g}^{\prime}\equiv(\hbar/2m\omega_{a})^{1/2}\partial\Omega_{2g}/\partial\hat{x}_{a}$,
and
$\Omega_{2g}^{\prime\prime}\equiv(\hbar/4m\omega_{a})\partial^{2}\Omega_{2g}/\partial\hat{x}_{a}^{2}$.
In our treatment, we assume the $1^{\text{st}}-$order
$\propto\Omega_{2g}^{\prime}$ term is negligible relative to the
$2^{\text{nd}}$-order $\propto\Omega_{2g}^{\prime\prime}$ term, because the
former contains only terms that rotate $\propto\omega_{a}$ and the latter
contains terms that rotate $\propto\Delta$. This makes the relative
contribution of the $\propto\Omega_{2g}^{\prime}$ terms to the
$\Omega_{2g}^{\prime\prime}$ terms
$\sim(\Omega_{2g}^{\prime}\Delta/\Omega_{2g}^{\prime\prime}\omega_{a})^{2}$;
since the value of $(\Delta/\omega_{a})^{2}$ will be very small for both
trapped ions and trapped electrons, $\Omega_{2g}^{\prime}$ would need to be
several orders-of-magnitude larger than $\Omega_{2g}^{\prime\prime}$ to
significantly contribute. Further, because traps are typically designed so
that the ions are located near where $\Omega_{2g}$ is at a maximum, they tend
to minimize $\Omega_{2g}^{\prime}$ by default. Neglecting the
$1^{\text{st}}$-order inhomogeneity, and dropping all terms that oscillate
$\propto\omega_{a}$, gives:

$\displaystyle\hat{H}_{2t}$ $\displaystyle=$
$\displaystyle\hat{H}_{2g}+3\hbar\Omega_{2g}^{\prime\prime}\hat{S}_{\alpha}\Big{\\{}\hat{a}^{\dagger}\hat{a}\hat{a}^{\dagger}e^{i\Delta
t}+\hat{a}\hat{a}^{\dagger}\hat{a}e^{-i\Delta t}\Big{\\}}.$

To calculate the fidelity, we, again, transform into the interaction picture
with respect to the ideal gate Hamiltonian $\hat{H}_{2g}$. Transforming into
the interaction picture using $\hat{U}_{2g}$ gives:

$\displaystyle\hat{H}_{2I}^{\Omega_{2g}^{\prime\prime}}$ $\displaystyle=$
$\displaystyle
3\hbar\Omega_{2g}^{\prime\prime}\hat{S}_{\alpha}[\hat{a}^{\dagger}+\hat{\gamma}^{\dagger}][\hat{a}+\hat{\gamma}][\hat{a}^{\dagger}+\hat{\gamma}^{\dagger}]e^{i\Delta
t}+c.c.$

After this transformation, we can apply Eq. (II), which results in a
factorized
$\hat{U}_{2t}^{\Omega_{2g}^{\prime\prime}}=\hat{U}_{2g}\hat{U}_{2I}^{\Omega_{2g}^{\prime\prime}}$
upon transforming out of the interaction picture. We can subsequently apply
Eq. (5), and keep only the
$(\propto\Omega_{2g}^{\prime\prime}/\Omega_{2g})^{2}$ contributions to the
gate fidelity:

$\displaystyle\mathcal{I}_{n_{a}}^{2\Omega_{2g}^{\prime\prime}}$
$\displaystyle=$ $\displaystyle\frac{9\pi^{2}\Omega_{2g}^{\prime\prime
2}}{16\Omega_{2g}^{2}}\Big{\\{}\lambda^{2}_{\hat{S}^{2}_{\alpha}}\Big{[}4n^{2}_{a}+4n_{a}+1+\frac{3}{2N}\Big{(}2n_{a}+1\Big{)}$
(52)
$\displaystyle+\frac{9}{16N^{2}}\Big{]}+\frac{4}{N}\lambda_{\hat{S}_{\alpha}}^{2}\Big{(}2n_{a}+1\Big{)}\Big{\\}},$

giving the infidelity of a two-qubit gate initialized to the motional state
$n_{a}$, as well as an initial qubit state with variances
$\lambda_{\hat{S}_{\alpha}}^{2}$ and $\lambda_{\hat{S}_{\alpha}^{2}}^{2}$. In
Fig. 2(c), we compare Eq. (52) to the direct numerical integration of Eq.
(IV.3), showing for various initial states of the qubits and motion that the
two calculations converge when $|\Omega^{\prime\prime}_{2g}/\Omega_{2g}|\ll
1$. Finally, we can average over $\mathcal{P}_{n_{a}}$ and obtain the
infidelity of a general mixed-state of the motion:

$\displaystyle\mathcal{I}_{n_{a}}^{2\Omega_{2g}^{\prime\prime}}$
$\displaystyle=$ $\displaystyle\frac{9\pi^{2}\Omega_{2g}^{\prime\prime
2}}{16\Omega_{2g}^{2}}\Big{\\{}\lambda^{2}_{\hat{S}^{2}_{\alpha}}\Big{[}4\overline{n^{2}_{a}}+4\bar{n}_{a}+1+\frac{3}{2N}\Big{(}2\bar{n}_{a}+1\Big{)}$
(53)
$\displaystyle+\frac{9}{16N^{2}}\Big{]}+\frac{4}{N}\lambda_{\hat{S}_{\alpha}}^{2}\Big{(}2\bar{n}_{a}+1\Big{)}\Big{\\}}.$

Figure 2: Comparison of infidelities $\mathcal{I}_{n_{a}}$ for an initial
phonon number $n_{a}$ versus error size between the analytic formulas (solid
lines) described in this work and their corresponding numerical simulations
(dashed lines). This is shown for initial states:
$\ket{\psi(0)}=\ket{\downarrow\downarrow}$ (blue),
$\ket{\psi(0)}=\sqrt{1/3}\ket{\downarrow\downarrow}+\sqrt{2/3}\ket{\uparrow\uparrow}$
(red), and
$\ket{\psi(0)}=\sqrt{1/3}\ket{\downarrow\downarrow}-\sqrt{2/3}\ket{\uparrow\uparrow}$
(green). The left column (a-b) is for a static motional frequency shift
$\delta$, the middle column (c-d) is for a trap anharmonicities
$\varepsilon_{a}$, and the right column (e-f) is for inhomogeneities of the
gradient field $\Omega_{2g}^{\prime\prime}$. The first row (a,c,e) is for ion
crystals that begin in the ground state of the phonon mode $n=0$, and the
second row (b,d,f) is for ion crystals that begin with a phonon mode such that
$n=50$. Note that, for every figure, the values of $\mathcal{I}_{n}$ predicted
by the numeric and analytic results converge, for high-fidelity gates.

###  IV.4 Infidelities from Markovian bath

There is a temporal window during a geometric phase gate where the qubits are
entangled to their motion. During this window, the fidelity of the gate is
sensitive to extraneous fields that couple to the motion. In this section, we
focus on fields that have very low coherence times relative to $t_{g}$, namely
those causing heating and motional dephasing. In this work, we eschew the
application of the Lindblad equation, typically used to model these two
decoherence mechanisms Mandel and Wolf (1995). We model our ‘coupling to a
bath’ by first calculating the fidelity of a two-qubit gate in the presence of
an error of the form:

$\displaystyle\hat{H}_{2\omega}\propto\cos(\omega t)\hat{M},$ (54)

where $\hat{M}$ is an operator describing bath coupling. Subsequently, we
average over the probability $S_{\omega}$ of each $\omega$:

$\displaystyle\mathcal{F}=\int^{\infty}_{0}d\omega
S_{\omega}\mathcal{F}_{\omega},$ (55)

where $\mathcal{F}_{w}$ is the fidelity of a gate undergoing the
$\hat{H}_{2\omega}$ perturbation.

We first show that, upon invoking the Markovian approximation, this
prescription is equivalent to the Linblad formalism. Take
$\ket{\psi_{\omega}(t)}$ to be a wave function undergoing $\hat{H}_{2t}$. We
wish to calculate $\ket{\psi_{\omega}(t+\delta t)}$, then, upon averaging over
$S_{\omega}$, show that $\hat{\rho}(t)\equiv\int^{\infty}_{0}d\omega
S_{\omega}\hat{\rho}_{\omega}$ follows the Lindblad formalism, where
$\hat{\rho}_{\omega}\equiv\ket{\psi_{\omega}(t)}\bra{\psi_{\omega}(t)}$.
Assuming $1/\delta t$ is significantly larger than any Rabi frequency in
$\hat{H}_{2t}\equiv\hat{H}_{2g}+\hat{H}_{2\omega}$, we can use
$2^{\text{nd}}$-order time-dependent perturbation theory to calculate
$\ket{\psi_{\omega}(t)}$:

$\displaystyle\ket{\psi_{\omega}(t\\!+\\!\delta t)}\\!$ $\displaystyle\simeq$
$\displaystyle\\!\ket{\psi_{\omega}(t)}-\frac{i}{\hbar}\int^{t+\delta
t}_{t}dt^{\prime}\hat{H}_{2t}(t^{\prime})\ket{\psi_{\omega}(t)}$ (56)
$\displaystyle\\!\\!\\!-\frac{1}{\hbar^{2}}\\!\\!\\!\int^{t+\delta
t}_{t}\\!\\!\\!\\!\\!\int^{t^{\prime}}_{t}\\!\\!\\!\\!\\!dt^{\prime}\\!dt^{\prime\prime}\\!\hat{H}_{2t}(t^{\prime\\!})\\!\hat{H}_{2t}(t^{\prime\prime}\\!)\\!\ket{\psi_{\omega}(t)}$

We now calculate $\hat{\rho}(t+\delta t)$, keeping only terms that are linear
in $\delta t$, and dropping every term that averages to zero upon integrating
over $S_{\omega}$, i.e. terms that are proportional to $\hat{H}_{2\omega}$,
$\hat{H}_{2g}\hat{H}_{2\omega}$, or $\hat{H}_{2\omega}\hat{H}_{2g}$. We also
replace $\hat{\rho}_{\omega}(t)\rightarrow\hat{\rho}(t)$, equivalent to making
the Markovian approximation, which gives:

$\displaystyle\hat{\rho}(t\\!+\delta t)\\!$ $\displaystyle\simeq$
$\displaystyle\hat{\rho}(t)-\frac{i\delta
t}{\hbar}\big{[}\hat{H}_{2g}(t),\hat{\rho}(t)\big{]}$ (57)
$\displaystyle+\frac{1}{\hbar^{2}}\int^{\infty}_{0}\\!\\!\int^{t+\delta
t}_{t}\\!\\!\\!\int^{t+\delta t}_{t}\\!\\!d\omega
dt^{\prime}dt^{\prime\prime}S_{\omega}\hat{H}_{2\omega}(t^{\prime})\hat{\rho}(t)\hat{H}_{2\omega}(t^{\prime\prime})$
$\displaystyle-\frac{1}{\hbar^{2}}\int^{\infty}_{0}\\!\\!\int^{t+\delta
t}_{t}\\!\\!\\!\int^{t^{\prime}}_{t}\\!\\!d\omega
dt^{\prime}dt^{\prime\prime}S_{\omega}$
$\displaystyle\times\Big{[}\hat{H}_{2\omega}(t^{\prime})\hat{H}_{2\omega}(t^{\prime\prime})\hat{\rho}(t)+\hat{\rho}(t)\hat{H}_{2\omega}(t^{\prime\prime})\hat{H}_{2\omega}(t^{\prime})\Big{]},$

noting that we have dropped the $\propto\hat{H}_{2g}^{2}$ terms because they
are $\propto\delta t^{2}$. By making the substitution
$\dot{\hat{\rho}}(t)\simeq[\hat{\rho}(t+\delta t)-\hat{\rho}(t)]/\delta t$ we
obtain:

$\displaystyle\dot{\hat{\rho}}(t)$ $\displaystyle\simeq$
$\displaystyle-\frac{i}{\hbar}[\hat{H}_{2g}(t),\hat{\rho}(t)]$ (58)
$\displaystyle+\frac{1}{\hbar^{2}\delta
t}\int^{\infty}_{0}\\!\\!\int^{t+\delta t}_{t}\\!\\!\\!\int^{t+\delta
t}_{t}\\!\\!d\omega
dt^{\prime}dt^{\prime\prime}S_{\omega}\hat{H}_{2\omega}(t^{\prime})\hat{\rho}(t)\hat{H}_{2\omega}(t^{\prime\prime})$
$\displaystyle-\frac{1}{\hbar^{2}\delta
t}\int^{\infty}_{0}\\!\\!\int^{t+\delta
t}_{t}\\!\\!\\!\int^{t^{\prime}}_{t}\\!d\omega
dt^{\prime}dt^{\prime\prime}S_{\omega}$
$\displaystyle\times\Big{[}\hat{H}_{2\omega}(t^{\prime})\hat{H}_{2\omega}(t^{\prime\prime})\hat{\rho}(t)+\hat{\rho}(t)\hat{H}_{2\omega}(t^{\prime\prime})\hat{H}_{2\omega}(t^{\prime})\Big{]},$

which takes the form of the Lindblad master equation. In the appendix, we show
that evaluating the integrals gives the standard form of the master equation
for both heating and motional dephasing.

Figure 3: Comparison between infidelities for a given initial phonon number
$\mathcal{I}_{n}$ between numerical simulations (dashed lines) and the
analytic formulas (solid lines) for motional heating and dephasing, as
described in this work, versus the bath coupling rate. This is shown for
initial states: $\ket{\psi(0)}=\ket{\downarrow\downarrow}$ (blue),
$\ket{\psi(0)}=\sqrt{1/3}\ket{\downarrow\downarrow}+\sqrt{2/3}\ket{\uparrow\uparrow}$
(red), and
$\ket{\psi(0)}=\sqrt{1/3}\ket{\downarrow\downarrow}-\sqrt{2/3}\ket{\uparrow\uparrow}$
(green). The left column (a-b) motional heating $\dot{\bar{n}}$ and the right
column (c-d) is for motional dephasing $\eta$. The first row is for ion
crystals that begin in the ground state of the phonon mode $n=0$, and the
second row (b,d,f) is for ion crystals that begin with a phonon mode where
$n=50$. Note that, for every figure, the values of $\mathcal{I}_{n}$ predicted
by the numeric and analytic results converge, for high-fidelity gates.

####  IV.4.1 Heating

When an ion crystal is close to a surface, moving charges within the surface
create extraneous electric fields that decohere the motion of the crystal
Brownnutt  _et al._ (2015). We assume these fields are homogeneous over the
extent of the qubits’ motion, and model $\hat{H}_{2\omega}^{g_{h}}$ as:

$\displaystyle\hat{H}_{2\omega}^{g_{h}}(t)$ $\displaystyle=$
$\displaystyle\hbar F\cos(\omega t)\hat{x}_{a}$ (59) $\displaystyle=$
$\displaystyle 2\hbar g_{h}\cos(\omega t)(\hat{a}^{\dagger}+\hat{a}),$

where $F$ is the projection of the electric force onto the designated mode of
motion, $\hat{x}_{a}$ is the position operator, and
$g_{h}\equiv\frac{1}{2}F\sqrt{\hbar/2m\omega_{a}}$. Writing this in the
interaction picture with respect to the frequency of the motional mode
$\omega_{a}$, and making the rotating wave approximation, we get:

$\displaystyle\hat{H}^{g_{h}\prime}_{2\omega}(t)\simeq\hbar
g_{h}(\hat{a}^{\dagger}e^{i(\omega_{a}-\omega)t}+\hat{a}e^{-i(\omega_{a}-\omega)t}).$
(60)

We analyze the effect of $\hat{H}^{g_{h}\prime}_{2\omega}$ on
$\mathcal{F}_{n_{a},\omega}$ by transforming
$\hat{H}_{2t}=\hat{H}_{2g}+\hat{H}^{g_{h}\prime}_{2\omega}$ into the
interaction picture with respect to $\hat{H}^{g_{h}\prime}_{2\omega}$. We do
this using the transformation:

$\displaystyle\hat{U}_{\omega}=\exp\Big{\\{}\gamma_{\omega}(t)\hat{a}^{\dagger}-\gamma_{\omega}^{*}(t)\hat{a}\Big{\\}},$
(61)

giving a displacement operator that transforms the system into a frame that
follows the changes to the ‘classical’ position and momentum induced by the
electric field Ehrenfest (1927); Heller (1975); Sutherland  _et al._ (2021),
up to a phase, where:

$\displaystyle\gamma_{\omega}(t)=\frac{g_{h}}{\omega-\omega_{a}}\Big{[}e^{i(\omega_{a}-\omega)t}-1\Big{]},$
(62)

which makes:

$\displaystyle\hat{H}_{2t}^{g_{h}}$ $\displaystyle=$
$\displaystyle\hat{H}_{2g}+\hat{H}_{2e}^{g_{h}}$ (63) $\displaystyle=$
$\displaystyle\hbar\Omega_{2g}\hat{S}_{\alpha}\Big{(}\hat{a}^{\dagger}e^{i\Delta
t}+\hat{a}e^{-i\Delta t}\Big{)}$
$\displaystyle+\hbar\Omega_{2g}\hat{S}_{\alpha}\Big{(}\gamma_{\omega}^{*}e^{i\Delta
t}+\gamma_{\omega}e^{-i\Delta t}\Big{)}.$

This equation shows that heating can be represented as a
$\propto\hat{S}_{\alpha}$ shift of the qubit in this frame. This is because
the electric field displaces the charged particles along the the spin-
dependent gradient that is driving the gate, shifting the spin coupling
strength. As we will show, this correspondence results in an infidelity that
does not depend on the initial state of the motion, and is, therefore,
independent of temperature. Noting that $\hat{H}_{2g}$ and
$\hat{H}_{2e}^{g_{h}}$ commute at all times, we can factor the time propagator
for the whole system $\hat{U}_{2t}=\hat{U}_{2g}\hat{U}_{2e}^{g_{h}}$, where:

$\displaystyle\hat{U}_{2e}^{g_{h}}=\exp\Big{(}-i\Omega_{2g}\hat{S}_{\alpha}\int^{t_{g}}_{0}dt^{\prime}\big{[}\gamma_{\omega}^{*}(t^{\prime})e^{i\Delta
t^{\prime}}+\gamma_{\omega}(t^{\prime})e^{-i\Delta t^{\prime}}\big{]}\Big{)}.$

Since we assume small errors, we can Taylor expand $\hat{U}_{2e}^{g_{h}}$, and
apply Eq. (5), which, to leading-order, gives:

$\displaystyle\mathcal{F}_{n_{a},\omega}^{g_{h}}=1-\xi_{\omega}(t_{g})\lambda_{\hat{S}_{\alpha}}^{2},$
(65)

where:

$\displaystyle\xi_{\omega}(t_{g})\equiv\Omega_{2g}^{2}\int^{t_{g}}_{0}\int^{t_{g}}_{0}dt^{\prime}dt^{\prime\prime}$
$\displaystyle\Big{[}\gamma_{\omega}^{*}(t^{\prime})e^{i\Delta
t^{\prime}}+\gamma_{\omega}(t^{\prime})e^{-i\Delta t^{\prime}}\Big{]}$
$\displaystyle\times$
$\displaystyle\Big{[}\gamma_{\omega}^{*}(t^{\prime\prime})e^{i\Delta
t^{\prime\prime}}+\gamma_{\omega}(t^{\prime\prime})e^{-i\Delta
t^{\prime\prime}}\Big{]}.$

We can now apply Eq. (55) and average over $S_{\omega}$:

$\displaystyle\mathcal{F}_{n_{a}}^{g_{d}}$ $\displaystyle=$ $\displaystyle
1-\lambda_{\hat{S}_{\alpha}}^{2}\int^{\infty}_{0}d\omega
S_{\omega}\xi_{\omega}(t_{g}),$ (67)

leaving a final integral over $\omega$ to determine the fidelity:

$\displaystyle\xi(t_{g})\equiv\\!\Omega_{2g}^{2}\\!\\!\int^{\infty}_{0}\\!\\!\\!\\!\int^{t_{g}}_{0}\\!\\!\\!\int^{t_{g}}_{0}$
$\displaystyle\\!\\!\\!\\!d\omega
dt^{\prime}dt^{\prime\prime}\\!S_{\omega}\\!\Big{[}\gamma_{\omega}^{*}(t^{\prime})e^{i\Delta
t^{\prime}}\\!\\!\\!\\!+\\!\gamma_{\omega}(t^{\prime})e^{-i\Delta
t^{\prime}}\Big{]}$ (68)
$\displaystyle\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\times\\!\Big{[}\gamma_{\omega}^{*}(t^{\prime\prime})e^{i\Delta
t^{\prime\prime}}\\!\\!+\\!\gamma_{\omega}(t^{\prime\prime})e^{-i\Delta
t^{\prime\prime}}\Big{]}.$

Keeping only terms that do not average to zero upon integrating over time
(since $t_{g}=2\pi N/\Delta$):

$\displaystyle\xi(t_{g})$ $\displaystyle=$
$\displaystyle\medint{\int^{\infty}_{0}}\medint{\int^{t_{g}}_{0}}\medint{\int^{t_{g}}_{0}}d\omega
dt^{\prime}dt^{\prime\prime}\frac{4g_{h}^{2}S_{\omega}\Omega_{2g}^{2}}{(\omega-\omega_{a})^{2}}\cos(\omega^{\prime}t^{\prime})\cos(\omega^{\prime}t^{\prime\prime})$
$\displaystyle=$
$\displaystyle\medint{\int^{\infty}_{0}}\medint{\int^{t_{g}}_{0}}\medint{\int^{t_{g}}_{-t_{g}}}d\omega
dt^{\prime}dt^{\prime\prime}\frac{2g_{h}^{2}S_{\omega}\Omega_{2g}^{2}}{(\omega-\omega_{a})^{2}}\cos(\omega^{\prime}t^{\prime})\cos(\omega^{\prime}t^{\prime\prime}),$

where $\omega^{\prime}\equiv\omega_{a}-\omega-\Delta$. We now make two
approximations: extending the limits of the the first integral from
$[t_{g},-t_{g}]$ to $[-\infty,\infty]$, and setting
$S_{\omega_{a}-\Delta}\simeq S_{\omega_{a}}$. After this, the above integrals
may be straightforwardly integrated, giving:

$\displaystyle\xi(t_{g})$ $\displaystyle=$ $\displaystyle\frac{4\pi
g_{h}^{2}S_{\omega_{a}}\Omega_{2g}^{2}t_{g}}{\Delta^{2}},$ (70)

resulting in a final infidelity of:

$\displaystyle\mathcal{I}_{n_{a}}^{2g_{h}}=\frac{\pi^{2}g_{h}^{2}S_{\omega_{a}}}{8\Omega_{2g}N^{1/2}}\lambda_{\hat{S}_{\alpha}}^{2},$
(71)

We substitute the heating rate $\dot{\bar{n}}=\pi g_{h}^{2}S_{\omega_{a}}$
(see appendix), giving a final form:

$\displaystyle\mathcal{I}_{n_{a}}^{\dot{\bar{n}}_{a}}=\frac{\pi\dot{\bar{n}}\lambda^{2}_{\hat{S}_{\alpha}}}{8\Omega_{2g}N^{1/2}}.$
(72)

Since $\mathcal{I}_{n_{a}}^{\dot{\bar{n}}_{a}}$ is independent of $n_{a}$, as
expected, averaging over $\mathcal{P}_{n_{a}}$ simply gives
$\mathcal{I}^{\dot{\bar{n}}_{a}}_{n_{a}}=\mathcal{I}^{\dot{\bar{n}}_{a}}$. In
Fig. 3(a), we compare Eq. (72) to the direct integration of the heating master
equation (see appendix) for various initial states of the qubits and motion,
showing that the two converge when $\dot{\bar{n}}/\Omega_{2g}\ll 1$.

Two-Qubit Gate Errors
---
error name |  equation |  infidelity

static motional shift |  Eq. (41) |  $\mathcal{I}^{2\delta}=\frac{\pi^{2}\delta^{2}}{64\Omega_{2g}^{2}}\Big{[}(2\bar{n}_{a}+1)\lambda_{\hat{S}_{\alpha}}^{2}+\lambda_{\hat{S}_{\alpha}^{2}}^{2}/4N\Big{]}$
---|---|---
trap anharmonicity |  Eq. (47) |  $\mathcal{I}^{2\varepsilon}=\frac{9\pi^{2}\varepsilon^{2}}{16\Omega_{2g}^{2}}\Big{\\{}\lambda^{2}_{\hat{S}_{\alpha}}\Big{[}4\Big{(}2\overline{n_{a}^{3}}+3\overline{n_{a}^{2}}+3\overline{n}_{a}+1\Big{)}+\frac{6}{N}\Big{(}2\overline{n_{a}^{2}}+2\bar{n}_{a}+1\Big{)}+\frac{9}{4N^{2}}\Big{(}2\bar{n}_{a}+1\Big{)}\Big{]}$
|  |  $+\lambda^{2}_{\hat{S}_{\alpha}^{2}}\Big{[}\frac{3}{8N}(11\overline{n_{a}^{2}}+11\bar{n}_{a}+3)+\frac{3}{4N^{2}}(2\bar{n}_{a}+1)+\frac{9}{64N^{3}}\Big{]}\Big{\\}}$
field inhomogeneities |  Eq. (52) |  $\mathcal{I}^{2\Omega_{2g}^{\prime\prime}}=\frac{9\pi^{2}\Omega_{2g}^{\prime\prime 2}}{16\Omega_{2g}^{2}}\Big{\\{}\lambda^{2}_{\hat{S}^{2}_{\alpha}}\Big{[}4\overline{n_{a}^{2}}+4\bar{n}_{a}+1+\frac{3}{2N}\Big{(}2\bar{n}_{a}+1\Big{)}+\frac{9}{16N^{2}}\Big{]}+\frac{4}{N}\lambda_{\hat{S}_{\alpha}}^{2}\Big{(}2\bar{n}_{a}+1\Big{)}\Big{\\}}$
heating |  Eq. (72) |  $\mathcal{I}^{2\dot{\bar{n}}_{a}}=\frac{\pi\dot{\bar{n}}}{8\Omega_{2g}N^{1/2}}\lambda^{2}_{\hat{S}_{\alpha}}$
motional dephasing |  Eq. (79) |  $\mathcal{I}^{2\eta}=\frac{\pi\eta}{16\Omega_{2g}N^{1/2}}\Big{[}\Big{(}2\bar{n}_{a}+1\Big{)}\lambda^{2}_{\hat{S}_{\alpha}}+\frac{3}{16N}\lambda^{2}_{\hat{S}_{\alpha}^{2}}\Big{]}$

Table 2: Summary of infidelities for $N$-loop two-qubit gates. See text for
variable definitions.

####  IV.4.2 Motional dephasing

In Sec. IV.1, we derived the infidelity of a gate due to a static shift in
motional frequency. In this section, we derive the effects of non-static
shifts in the limit of vanishingly small coherence times. We begin by adding
an error term:

$\displaystyle\hat{H}_{2\omega}^{g_{d}}(t)=\hbar g_{d}\cos(\omega
t)\hat{a}^{\dagger}\hat{a},$ (73)

which adds a sinusoidally oscillating frequency shift to the motional mode,
giving $\hat{H}_{2t}=\hat{H}_{2g}+\hat{H}_{2\omega}^{g_{d}}$ for the total
system Hamiltonian. In this section, we first transform $\hat{H}_{2t}$ into
the interaction picture with respect to $\hat{H}_{2g}$, which gives:

$\displaystyle\hat{H}_{2I}^{g_{d}}=\hbar g_{d}\cos(\omega
t)[\hat{a}^{\dagger}+\hat{S}_{\alpha}\gamma^{*}][\hat{a}+\hat{S}_{\alpha}\gamma],$
(74)

where $\gamma$ is here defined by Eq. (46). We now determine
$\hat{U}_{2I}^{g_{d}}$ using Eq. (II), leaving the integrals unevaluated for
now. Since this results in a factored
$\hat{U}_{2t}^{g_{d}}=\hat{U}_{2g}\hat{U}_{2I}^{g_{d}}$, we can apply Eq. (5).
Dropping all terms higher-order than $\propto g_{d}^{2}$ gives:

$\displaystyle\mathcal{F}_{n_{a},\omega}^{g_{d}}$ $\displaystyle=$
$\displaystyle
1-2g_{d}^{2}\\!\int^{t_{g}}_{0}\\!\\!\int^{t^{\prime}}_{0}dt^{\prime}dt^{\prime\prime}\cos(\omega
t^{\prime})\cos(\omega t^{\prime\prime})\Big{[}n_{a}^{2}$ (75)
$\displaystyle+\braket{\hat{S}_{\alpha}^{2}}\Big{\\{}n_{a}\big{(}|\gamma(t^{\prime})|^{2}+|\gamma(t^{\prime\prime})|^{2}\big{)}+n_{a}\gamma(t^{\prime})\gamma^{*}(t^{\prime\prime})$
$\displaystyle+(n_{a}+1)\gamma^{*}(t^{\prime})\gamma(t^{\prime\prime})\Big{\\}}+\braket{\hat{S}_{\alpha}^{4}}|\gamma(t^{\prime})|^{2}|\gamma(t^{\prime\prime})|^{2}\Big{]}$
$\displaystyle+g_{d}^{2}\int^{t_{g}}_{0}\int^{t_{g}}_{0}dt^{\prime}dt^{\prime\prime}\cos(\omega
t^{\prime})\cos(\omega t^{\prime\prime})\Big{[}n_{a}^{2}$
$\displaystyle+\braket{\hat{S}_{\alpha}^{2}}\\!n_{a}\big{(}|\gamma(t^{\prime})|^{2}+|\gamma(t^{\prime\prime})|^{2}\big{)}\\!+\\!$
$\displaystyle\braket{\hat{S}_{\alpha}}^{2}\Big{\\{}n_{a}\gamma^{*}(t^{\prime})\gamma(t^{\prime\prime})+(n_{a}+1)\gamma(t^{\prime})\gamma^{*}(t^{\prime\prime})\Big{\\}}$
$\displaystyle+\braket{\hat{S}_{\alpha}^{2}}^{2}|\gamma(t^{\prime})|^{2}|\gamma(t^{\prime\prime})|^{2}\Big{]}.$

We can plug this equation into Eq. (55) to obtain
$\mathcal{F}^{g_{d}}_{n_{a}}$. Upon doing this, we are left with a sum of
triple integrals, each of which is proportional to:

$\displaystyle\zeta$ $\displaystyle=$
$\displaystyle\\!\int^{\infty}_{0}\\!\\!\int^{t_{g}}_{0}\\!\int^{t_{s}}_{0}\\!d\omega
dt^{\prime}dt^{\prime\prime}\frac{S_{\omega}}{2}\Big{\\{}\\!\cos(\omega[t^{\prime\prime}\\!+\\!t^{\prime}])\\!+\\!\cos(\omega[t^{\prime\prime}\\!-\\!t^{\prime}])\Big{\\}},$

where $t_{s}\in\\{t_{g},t^{\prime}\\}$. In order to evaluate Eq. (IV.4.2), we
perform the following manipulations:

$\displaystyle\zeta$ $\displaystyle=$
$\displaystyle\\!\int^{\infty}_{-\infty}\\!\int^{t_{g}}_{0}\\!\int^{t_{s}}_{0}d\omega
dt^{\prime}dt^{\prime\prime}\frac{S_{\omega}}{4}\Big{\\{}\\!\cos(\omega[t^{\prime\prime}\\!+\\!t^{\prime}])\\!+\\!\cos(\omega[t^{\prime\prime}\\!-\\!t^{\prime}])\\!\Big{\\}}$
(77) $\displaystyle\simeq$
$\displaystyle\frac{S_{0}}{4}\\!\int^{\infty}_{-\infty}\\!\int^{t_{g}}_{0}\\!\int^{t_{s}}_{0}\\!d\omega
dt^{\prime}dt^{\prime\prime}\\!\Big{\\{}\\!\cos(\omega[t^{\prime\prime}\\!+\\!t^{\prime}])\\!+\\!\cos(\omega[t^{\prime\prime}\\!-\\!t^{\prime}])\Big{\\}}$
$\displaystyle=$ $\displaystyle\frac{\pi
S_{0}}{2}\int^{t_{g}}_{0}\int^{t_{s}}_{0}dt^{\prime}dt^{\prime\prime}\Big{\\{}\delta(t^{\prime\prime}+t^{\prime})+\delta(t^{\prime\prime}-t^{\prime})\Big{\\}},$

where, in the second line, we assumed a white noise bath of $\omega$ and
pulled $S_{\omega}\simeq S_{0}$ outside of the integral. We can now
straightforwardly evaluate the integrals in Eq. (75), which gives:

$\displaystyle\mathcal{F}_{n_{a}}^{g_{d}}\simeq 1-\pi
g_{d}^{2}S_{0}\Big{(}\frac{\Omega_{2g}^{2}t_{g}}{\Delta^{2}}\Big{)}\Big{(}[2n_{a}+1]\lambda^{2}_{\hat{S}_{\alpha}}+\frac{3\Omega_{2g}^{2}}{\Delta^{2}}\lambda^{2}_{\hat{S}_{\alpha}^{2}}\Big{)},$

where, plugging in $t_{g}=2\pi N/\Delta$ and $\Delta=4\Omega_{2g}N^{1/2}$
gives a final infidelity of:

$\displaystyle\mathcal{I}_{n_{a}}^{g_{d}}$ $\displaystyle=$
$\displaystyle\frac{\pi\eta}{16\Omega_{2g}N^{1/2}}\Big{(}[2n_{a}+1]\lambda^{2}_{\hat{S}_{\alpha}}+\frac{3}{16N}\lambda^{2}_{\hat{S}_{\alpha}^{2}}\Big{)},$
(79)

where $\eta\equiv\pi g_{d}^{2}S_{0}/2$ (see appendix). In Fig. 3(b), we
compare Eq. (79) to the direct numerical integration of the motional dephasing
master equation (see appendix), showing the two calculations converge when
$\eta/\Omega_{2g}\ll 1$ for various initial states of the qubits and motion.

##  V Conclusion

In this work, we derived formulae describing the effect that many sources of
error in laser-free trapped ions and trapped electrons have on the fidelity of
one- and two-qubit gates. The effect of these error sources on infidelities
are typically calculated numerically when determining an individual
experiment’s error budget. Therefore, this work serves to both expedite the
creation of error budgets, and provide physicists with a deeper understanding
of how these gate infidelities depend on the parameters of their experiments:
temperature, initial qubit state, the number of loops traversed in phase-
space, and so on. While this work focuses on laser-free experiments, our
calculations for static motional frequency shifts, trap anharmonicities,
heating, and motional dephasing, are also relevant to laser-based two-qubit
gate experiments. Finally, we compare all our analytic derivations to their
respective numerical simulations, showing they converge for high-fidelity
gates.

## Acknowledgements

R.T.S., Q.Y. and K.M.B. acknowledge support from the Lawrence Livermore
National Laboratory (LLNL) Laboratory Directed Research and Development (LDRD)
program under Grant No. 21-FS-008. Q.Y. and H.H. acknowledge support from
AFOSR through grant FA9550-20-1-0162, the NSF QLCI program through grant
number OMA-2016245. K.M.B’s contributions to this work were performed under
the auspices of the U. S. Department of Energy by Lawrence Livermore National
Laboratory under Contract No. DE-AC52-07NA27344. LLNL-JRNL-828517

## Appendix

###  V.1 Static Qubit frequency shifts

If the qubit frequency is erroneously shifted from its desired value during
the course of a one-qubit gate, the Hamiltonian is given by:

$\displaystyle\hat{H}_{1t}$ $\displaystyle=$
$\displaystyle\hat{H}_{1g}+\hat{H}_{1e}^{q}$ (80) $\displaystyle=$
$\displaystyle\hbar\Omega_{1g}\hat{\sigma}_{x}+\hbar\delta\hat{\sigma}_{z},$

where we have assumed that the gate operation is polarized in the
$\hat{x}$-direction. Equation (80) acts as a rotation about the $\hat{n}$
axis, where:

$\displaystyle\hat{n}\equiv\frac{\Omega_{1g}\hat{x}+\delta\hat{z}}{\sqrt{\Omega_{1g}^{2}+\delta^{2}}},$
(81)

at an angular frequency:

$\displaystyle\Omega^{\prime}_{1g}\equiv\sqrt{\Omega^{2}_{1g}+\delta^{2}}.$
(82)

This gives a time evolution operator:

$\displaystyle\hat{U}_{t}(t)$ $\displaystyle=$ $\displaystyle
e^{-i\Omega^{\prime}_{1g}t(\hat{n}\cdot\vec{\sigma})}$ (83) $\displaystyle=$
$\displaystyle\hat{I}\cos(\Omega^{\prime}_{1g}t)-i(\hat{n}\cdot\vec{\sigma})\sin(\Omega^{\prime}_{1g}t).$

This is the exact solution for the time evolution of Eq. (80) Agarwal (2012).
In this work, however, we concerned with calculating the the infidelity
$\mathcal{I}^{1q}$ due to small values of $\delta$. We, therefore, relate
$\hat{U}_{t}$ to $\hat{U}_{1g}$ by expanding $\Omega^{\prime}_{1g}$ and
$\hat{n}$ about the point $\delta=0$, which gives:

$\displaystyle\Omega^{\prime}_{1g}$ $\displaystyle\simeq$
$\displaystyle\Omega_{1g}+\frac{\delta^{2}}{2\Omega_{1g}}$
$\displaystyle\hat{n}$ $\displaystyle\simeq$
$\displaystyle\Big{(}1-\frac{\delta^{2}}{2\Omega_{1g}^{2}}\Big{)}\hat{x}+\Big{(}\frac{\delta}{\Omega_{1g}}\Big{)}\hat{z}.$
(84)

After expanding these two variables, we can also expand the sinusoidal
functions that appear in Eq. (83):

$\displaystyle\cos(\Omega^{\prime}_{1g}t)$ $\displaystyle\simeq$
$\displaystyle\cos(\Omega_{1g}t)-\Big{(}\frac{\delta^{2}t}{2\Omega_{1g}}\Big{)}\sin(\Omega_{1g}t)$
$\displaystyle\sin(\Omega^{\prime}_{1g}t)$ $\displaystyle\simeq$
$\displaystyle\sin(\Omega_{1g}t)+\Big{(}\frac{\delta^{2}t}{2\Omega_{1g}}\Big{)}\cos(\Omega_{1g}t).$
(85)

Plugging these expansions into Eq. (83) gives:

$\displaystyle\hat{U}_{1g}\Big{\\{}1\\!-\\!i\Big{(}\frac{\delta^{2}t}{2\Omega_{1g}}\Big{)}\hat{\sigma}_{x}\Big{\\}}\\!+\\!i\sin(\Omega_{1g}t)\Big{\\{}\Big{(}\frac{\delta^{2}}{2\Omega^{2}_{1g}}\Big{)}\hat{\sigma}_{x}\\!-\\!\Big{(}\frac{\delta}{\Omega_{1g}}\Big{)}\hat{\sigma}_{z}\Big{\\}}.$

We can then plug this equation into Eq. (3), which gives:

$\displaystyle\mathcal{F}$ $\displaystyle=$
$\displaystyle\Big{|}\bra{\psi(0)}\Big{\\{}1-i\Big{(}\frac{\delta^{2}t}{2\Omega_{1g}}\Big{)}\hat{\sigma}_{x}\Big{\\}}+i\sin(\Omega_{1g}t)\hat{U}_{1g}^{\dagger}\Big{\\{}\Big{(}\frac{\delta^{2}}{2\Omega_{1g}^{2}}\Big{)}\hat{\sigma}_{x}$
(87)
$\displaystyle-\Big{(}\frac{\delta}{\Omega_{1g}}\Big{)}\hat{\sigma}_{z}\Big{\\}}\ket{\psi(0)}\Big{|}^{2}.$

Only keeping terms up to $\mathcal{O}([\delta/\Omega_{1g}]^{2})$, we get:

$\displaystyle\mathcal{F}$ $\displaystyle\simeq$ $\displaystyle
1-\Big{(}\frac{\delta}{\Omega_{1g}}\Big{)}^{2}\Big{\\{}\sin^{2}(\Omega_{1g}t)$
$\displaystyle-\Big{[}\cos(\Omega_{1g}t)\sin(\Omega_{1g}t)\braket{\hat{\sigma}_{z}}+\sin^{2}(\Omega_{1g}t)\braket{\hat{\sigma}_{y}}\Big{]}^{2}\Big{\\}}.$

If we assume that $\ket{\psi(0)}=\ket{0}$, i.e. $\braket{\sigma_{z}}=-1$ and
$\braket{\sigma_{y}}=0$, this gives an infidelity of:

$\displaystyle\mathcal{I}^{1q}\simeq\Big{(}\frac{\delta^{2}}{\Omega_{1g}^{2}}\Big{)}\sin^{4}(\Omega_{1g}t).$
(89)

If we average $\ket{\psi(0)}$ over the Bloch sphere, this gives:

$\displaystyle\mathcal{I}^{1q}\simeq\Big{(}\frac{2\delta^{2}}{3\Omega_{1g}^{2}}\Big{)}\sin^{2}(\Omega_{1g}t).$
(90)

###  V.2 Static motional frequency shifts with Walsh sequences

In Sec. IV.1, we showed that a geometric phase gate traversing a single loop
in phase-space produces an error operator of:

$\displaystyle\hat{U}_{2e}^{\delta,0}\equiv\exp\Big{(}-\frac{i\Omega_{2g}\delta
t_{l}}{\Delta}\hat{S}_{\alpha}[\hat{a}+\hat{a}^{\dagger}]-\frac{2i\Omega_{2g}^{2}\delta
t_{l}}{\Delta^{2}}\hat{S}_{\alpha}^{2}\Big{)},$

where we have replaced the gate time $t_{g}$ in Eq. (IV.1) with a single loop
time $t_{l}=2\pi/\Delta$. The error described by $\hat{U}_{2e}^{\delta,0}$
comprises a spin-dependent ($\propto\hat{S}_{\alpha}$) displacement operator,
representing the residual spin-motion entanglement, and a
$\propto\hat{S}_{\alpha}^{2}$ operator, representing the error in the
geometric phase. Reference Hayes  _et al._ (2012) showed that administering
pi-pulses such that $\hat{H}\rightarrow-\hat{H}$ can suppress the former of
these. To see how this works, we first must understand that the $k^{th}$-order
Walsh sequence $W(2^{k}-1,x)$ is simply two concatenated $(k-1)^{th}$-order
Walsh sequences, where $\hat{H}\rightarrow-\hat{H}$ for the latter of the two.
If the error operator for the $(k-1)^{th}$-order Walsh function takes the
form:

$\displaystyle\hat{U}_{2e}^{\delta,k-1}=\exp\Big{(}-i\hat{S}_{\alpha}\varepsilon\Big{[}\gamma\hat{a}^{\dagger}+\gamma^{*}\hat{a}\Big{]}\Big{)},$
(92)

where $\varepsilon$ is an arbitrary constant, and:

$\displaystyle\gamma(t)$ $\displaystyle=$
$\displaystyle\int^{t}_{t_{0}}dt^{\prime}e^{i(\Delta+\delta)t^{\prime}}$ (93)
$\displaystyle=$ $\displaystyle
e^{i(\Delta+\delta)t_{0}}\int^{t-t_{0}}_{0}dt^{\prime}e^{i(\Delta+\delta)t^{\prime}}$
$\displaystyle=$ $\displaystyle e^{i\delta
t_{0}}\int^{t-t_{0}}_{0}dt^{\prime}e^{i(\Delta+\delta)t^{\prime}},$

where, in the third-line, we have assumed that that $t_{0}$ is an integer
multiple of $2\pi/\Delta$. If $t_{k-1}$ is the time it takes a
$(k-1)^{th}$-order Walsh sequence to complete, $\gamma(t)$ for the second of
the two concatenated Walsh sequences is:

$\displaystyle\gamma(2t_{k-1})$ $\displaystyle=$
$\displaystyle\int^{2t_{k-1}}_{t_{k-1}}dt^{\prime}e^{i(\Delta+\delta)t^{\prime}}$
(94) $\displaystyle=$ $\displaystyle e^{i\delta
t_{k-1}}\int^{t_{k-1}}_{0}dt^{\prime}e^{i(\Delta+\delta)t^{\prime}},$

meaning that $\gamma$ for the second sequence will be identical to the first,
up to a phase $e^{i\delta t_{k-1}}$. Keeping this in mind, we get:

$\displaystyle\hat{U}^{\delta,k}_{2e}$ $\displaystyle=$
$\displaystyle\\!\exp\\!\Big{(}\\!i\hat{S}_{\alpha}\varepsilon\\!\Big{[}e^{i\delta
t_{k-1}}\gamma\hat{a}^{\dagger}\\!\\!+\\!e^{-i\delta
t_{k-1}}\gamma^{*}\hat{a}\Big{]}\Big{)}\\!\exp\\!\Big{(}\\!\\!-\\!i\hat{S}_{\alpha}\varepsilon\Big{[}\gamma\hat{a}^{\dagger}\\!+\\!\gamma^{*}\hat{a}\Big{]}\Big{)}$
(95) $\displaystyle\simeq$
$\displaystyle\exp\Big{(}\\!\\!-i\hat{S}_{\alpha}\varepsilon(i\delta
t_{k-1})\Big{[}-\gamma\hat{a}^{\dagger}+\gamma^{*}\hat{a}\Big{]}\Big{)},$

showing that increasing $k$ by one reduces the argument of
$\hat{U}^{\delta,k-1}_{2e}$ by a factor of $i\delta t_{k-1}$. A $W(1,x)$ Walsh
sequence is a two loop gate where $\hat{H}\rightarrow-\hat{H}$ after the first
loop at $t_{k-1}=t_{l}$. This gives:

$\displaystyle\hat{U}^{\delta,1}_{2e}$ $\displaystyle=$
$\displaystyle\exp\\!\Big{(}\\!-\frac{\Omega_{2g}(i\delta
t_{l})^{2}}{\Delta}\hat{S}_{\alpha}[\hat{a}-\hat{a}^{\dagger}]-\frac{2i\Omega_{2g}^{2}\delta
t_{g}}{\Delta^{2}}\hat{S}_{\alpha}^{2}\Big{)},$

where $t_{g}=2\pi N/\Delta$, where $N=2^{k}$ is the number of loops in phase
space. This process can be repeated for a $W(3,x)$ sequence, which is just two
concatenated $W(1,x)$ sequences, such that $\hat{H}\rightarrow-\hat{H}$ after
the first sequence at $t_{k-1}=2t_{l}$:

$\displaystyle\hat{U}^{\delta,2}_{2e}\\!=\exp\\!\Big{(}\\!-\frac{\Omega_{2g}(i\delta
t_{l})^{3}}{\Delta}(1\cdot
2)\hat{S}_{\alpha}[\hat{a}+\hat{a}^{\dagger}]-\frac{2i\Omega_{2g}^{2}\delta
t_{g}}{\Delta^{2}}\hat{S}_{\alpha}^{2}\Big{)}.$

This pattern can be repeated to give the error propagator for a general
$k^{th}$-order Walsh sequence:

$\displaystyle\hat{U}^{\delta,k}_{2e}$ $\displaystyle=$
$\displaystyle\exp\\!\Big{(}\\!\\!-\frac{\Omega_{2g}(i\delta
t_{l})^{k+1}2^{\frac{k(k-1)}{2}}}{\Delta}\hat{S}_{\alpha}[\hat{a}\\!+\\!(-1)^{k}\hat{a}^{\dagger}]$
(97) $\displaystyle~{}~{}~{}~{}~{}~{}-\frac{2i\Omega_{2g}^{2}\delta
t_{g}}{\Delta^{2}}\hat{S}_{\alpha}^{2}\Big{)}.$

This error operator can be plugged into Eq. (5) and Taylor expanded to find
the leading-order corrections to the gate infidelity:

$\displaystyle\mathcal{I}^{\delta,k}_{n_{a}}\\!$ $\displaystyle=$
$\displaystyle\\!2^{k(k-1)}\frac{\Omega_{2g}^{2}(\delta
t_{l})^{2(k+1)}}{\Delta^{2}}(2n_{a}+1)\lambda^{2}_{\hat{S}_{\alpha}}\\!\\!+\\!\\!\frac{4\Omega_{2g}^{4}\delta^{2}t_{g}^{2}}{\Delta^{4}}\lambda_{\hat{S}_{\alpha}^{2}},$

which we can simplify by substituting $\Delta=4\Omega_{2g}N^{1/2}$,
$t_{l}=2\pi/\Delta$, $t_{g}=2\pi N/\Delta$, and $N=2^{k}$. Upon averaging over
$\mathcal{P}_{n_{a}}$, we obtain the infidelity of a two-qubit gate undergoing
a $W(2^{k}-1,x)$ Walsh sequence, for an arbitrary initial state of the qubits’
and mixed-state of the motion:

$\displaystyle\mathcal{I}^{\delta,k}\\!$ $\displaystyle=$
$\displaystyle\\!\Big{(}\frac{\pi\delta}{\Omega_{2g}}\Big{)}^{2(k+1)}\\!2^{-(5k+6)}(2\bar{n}_{a}\\!+\\!1)\lambda^{2}_{\hat{S}_{\alpha}}\\!\\!+\\!\frac{\pi^{2}\delta^{2}}{\Omega_{2g}^{2}}2^{-(k+8)}\lambda^{2}_{\hat{S}_{\alpha}^{2}}.$

###  V.3 Markovian master equations

Equation (58) contains three triple integrals:

$\displaystyle\Upsilon_{i}$ $\displaystyle=$
$\displaystyle\frac{1}{\hbar^{2}\delta
t}\\!\int^{\infty}_{0}\\!\\!\\!\int^{t+\delta t}_{t}\\!\\!\\!\int^{t+\delta
t}_{t}\\!\\!\\!d\omega
dt^{\prime}dt^{\prime\prime}S_{\omega}\hat{H}_{2\omega}({t^{\prime}})\hat{\rho}(t)\hat{H}_{2\omega}(t^{\prime\prime})$
$\displaystyle\Upsilon_{ii}$ $\displaystyle=$
$\displaystyle\frac{1}{\hbar^{2}\delta
t}\\!\int^{\infty}_{0}\\!\\!\int^{t+\delta
t}_{t}\\!\\!\int^{t^{\prime}}_{t}\\!\\!\\!d\omega
dt^{\prime}dt^{\prime\prime}S_{\omega}\hat{\rho}(t)\hat{H}_{2\omega}({t^{\prime\prime}})\hat{H}_{2\omega}(t^{\prime})$
$\displaystyle\Upsilon_{iii}$ $\displaystyle=$
$\displaystyle\frac{1}{\hbar^{2}\delta
t}\\!\int^{\infty}_{0}\\!\\!\int^{t+\delta}_{t}\\!\\!\int^{t^{\prime}}_{t}\\!\\!\\!d\omega
dt^{\prime}dt^{\prime\prime}S_{\omega}\hat{H}_{2\omega}({t^{\prime}})\hat{H}_{2\omega}(t^{\prime\prime})\hat{\rho}(t).$

Once we determine $\hat{H}_{2\omega}(t)$, we can evaluate these integrals
using the similar approximations to that in the text.

#### Heating master equation

We begin with Eq. (60), representing a stray electric field at frequency
$\omega$, taken in the rotating frame with respect to the frequency of the
trap $\omega_{a}$, and makes the rotating wave approximation:

$\displaystyle\hat{H}^{g_{h}\prime}_{2\omega}(t)\simeq\hbar
g_{h}\Big{(}\hat{a}^{\dagger}e^{i[\omega_{a}-\omega]t}+\hat{a}e^{-i[\omega_{a}-\omega]t}\Big{)}.$
(101)

Plugging this into $\Upsilon_{i}$ in Eq. (V.3) gives:

$\displaystyle\Upsilon_{i}$ $\displaystyle=$
$\displaystyle\frac{g_{h}^{2}}{\delta
t}\\!\\!\int^{\infty}_{0}\\!\\!\int^{t+\delta t}_{t}\\!\\!\\!\int^{t+\delta
t}_{t}d\omega
dt^{\prime}dt^{\prime\prime}S_{\omega}\Big{\\{}\hat{a}^{\dagger}\hat{\rho}(t)\hat{a}^{\dagger}e^{i\omega^{\prime}(t^{\prime\prime}+t^{\prime})}$
(102)
$\displaystyle+~{}\hat{a}\hat{\rho}(t)\hat{a}e^{-i\omega^{\prime}(t^{\prime\prime}\\!+t^{\prime})}\\!+\hat{a}^{\dagger}\hat{\rho}(t)\hat{a}e^{-i\omega^{\prime}(t^{\prime\prime}\\!-t^{\prime})}$
$\displaystyle+~{}\hat{a}\hat{\rho}(t)\hat{a}^{\dagger}e^{i\omega^{\prime}(t^{\prime\prime}\\!-t^{\prime})}\\!\Big{\\}},$

where $\omega^{\prime}\equiv\omega_{a}-\omega$. We can evaluate this integral
by first replacing $S_{\omega}$ with a constant $S_{\omega_{a}}$:

$\displaystyle\Upsilon_{i}$ $\displaystyle\simeq$
$\displaystyle\frac{g_{h}^{2}S_{\omega_{a}}}{\delta
t}\\!\\!\int^{\infty}_{0}\\!\\!\int^{t+\delta t}_{t}\\!\\!\int^{t+\delta
t}_{t}\\!\\!\\!d\omega
dt^{\prime}dt^{\prime\prime}\Big{\\{}\hat{a}^{\dagger}\hat{\rho}(t)\hat{a}^{\dagger}e^{i\omega^{\prime}(t^{\prime\prime}+t^{\prime})}$
(103)
$\displaystyle+\hat{a}\hat{\rho}(t)\hat{a}e^{-i\omega^{\prime}(t^{\prime\prime}\\!+t^{\prime})}\\!\\!+\\!\hat{a}^{\dagger}\hat{\rho}(t)\hat{a}e^{-i\omega^{\prime}(t^{\prime\prime}\\!-t^{\prime})}\\!\\!+\\!\hat{a}\hat{\rho}(t)\hat{a}^{\dagger}e^{i\omega^{\prime}(t^{\prime\prime}-t^{\prime})}\Big{\\}}$
$\displaystyle\simeq$ $\displaystyle\frac{g_{h}^{2}S_{\omega_{a}}}{2\delta
t}\int^{\infty}_{-\infty}\\!\\!\int^{t+\delta t}_{t}\int^{t+\delta
t}_{t}\\!\\!\\!d\omega
dt^{\prime}dt^{\prime\prime}\Big{\\{}\hat{a}^{\dagger}\hat{\rho}(t)\hat{a}^{\dagger}e^{i\omega^{\prime}(t^{\prime\prime}+t^{\prime})}$
$\displaystyle+\hat{a}\hat{\rho}(t)\hat{a}e^{-i\omega^{\prime}(t^{\prime\prime}+t^{\prime})}\\!\\!+\\!\hat{a}^{\dagger}\hat{\rho}(t)\hat{a}e^{-i\omega^{\prime}(t^{\prime\prime}\\!-t^{\prime})}\\!\\!+\hat{a}\hat{\rho}(t)\hat{a}^{\dagger}e^{i\omega^{\prime}(t^{\prime\prime}\\!-t^{\prime})}\Big{\\}}$
$\displaystyle=$ $\displaystyle\frac{\pi S_{\omega_{a}}g_{h}^{2}}{\delta
t}\int^{t+\delta t}_{t}\int^{t+\delta
t}_{t}dt^{\prime}dt^{\prime\prime}\Big{\\{}\delta(t^{\prime\prime}+t^{\prime})[\hat{a}^{\dagger}\hat{\rho}(t)\hat{a}^{\dagger}+\hat{a}\hat{\rho}(t)\hat{a}]$
$\displaystyle+\delta(t^{\prime\prime}-t^{\prime})[\hat{a}^{\dagger}\hat{\rho}(t)\hat{a}+\hat{a}\hat{\rho}(t)\hat{a}^{\dagger}]\Big{\\}}$
$\displaystyle=$ $\displaystyle\pi
S_{\omega_{a}}g_{h}^{2}[\hat{a}^{\dagger}\hat{\rho}(t)\hat{a}+\hat{a}\hat{\rho}(t)\hat{a}^{\dagger}]$
$\displaystyle=$
$\displaystyle\dot{\bar{n}}[\hat{a}^{\dagger}\hat{\rho}(t)\hat{a}+\hat{a}\hat{\rho}(t)\hat{a}^{\dagger}],$

where, in the last line, we have introduced the heating rate
$\dot{\bar{n}}\equiv\pi S_{\omega_{a}}g_{h}^{2}$. Keeping in mind the added
factor of $1/2$ that comes from changing the limits of integration from
$t+\delta t$ to $t^{\prime}$ in the integral over $dt^{\prime\prime}$, we can
follow this prescription to evaluate $\Upsilon_{ii}$ and $\Upsilon_{iii}$.
This gives a final master equation for Markovian heating of:

$\displaystyle\dot{\hat{\rho}}(t)$ $\displaystyle=$
$\displaystyle-\frac{i}{\hbar}\Big{[}\hat{H}_{2g}(t),\hat{\rho}(t)\Big{]}+\dot{\bar{n}}\Big{\\{}\hat{a}^{\dagger}\hat{\rho}(t)\hat{a}+\hat{a}\hat{\rho}(t)\hat{a}^{\dagger}$
$\displaystyle-\frac{1}{2}\Big{(}\hat{a}^{\dagger}\hat{a}+\hat{a}\hat{a}^{\dagger}\Big{)}\hat{\rho}(t)-\frac{1}{2}\hat{\rho}(t)\Big{(}\hat{a}^{\dagger}\hat{a}+\hat{a}\hat{a}^{\dagger}\Big{)}\Big{\\}}$

#### Motional dephasing master equation

We begin with Eq. (73), representing fluctuations of the motional frequency of
the trap at frequency $\omega$ as:

$\displaystyle\hat{H}_{2\omega}^{g_{d}}(t)=\hbar g_{d}\cos(\omega
t)\hat{a}^{\dagger}\hat{a}.$ (105)

Plugging this into $\Upsilon_{i}$ in Eq. (V.3) gives:

$\displaystyle\Upsilon_{i}$ $\displaystyle=$
$\displaystyle\frac{g_{d}^{2}}{\delta
t}\\!\int^{\infty}_{0}\\!\\!\\!\int^{t+\delta t}_{t}\\!\\!\\!\\!\int^{t+\delta
t}_{t}\\!\\!\\!\\!\\!\\!d\omega
dt^{\prime}dt^{\prime\prime}\\!S_{\omega}\\!\cos(\omega
t^{\prime})\\!\cos(\omega
t^{\prime\prime})\hat{a}^{\dagger}\hat{a}\hat{\rho}(t)\hat{a}^{\dagger}\hat{a}$
(106) $\displaystyle=$ $\displaystyle\frac{g_{d}^{2}}{2\delta
t}\int^{\infty}_{0}\int^{t+\delta t}_{t}\int^{t+\delta t}_{t}d\omega
dt^{\prime}dt^{\prime\prime}S_{\omega}\Big{\\{}\cos(\omega[t^{\prime\prime}+t^{\prime}])$
$\displaystyle+\cos(\omega[t^{\prime\prime}-t^{\prime}])\Big{\\}}\hat{a}^{\dagger}\hat{a}\hat{\rho}(t)\hat{a}^{\dagger}\hat{a}.$

We can, again, make the approximation of replacing the $S_{\omega}$ term with
a constant $S_{0}$, and change the limits of the integral over $\omega$ to
obtain:

$\displaystyle\Upsilon_{i}$ $\displaystyle\simeq$
$\displaystyle\frac{g_{d}^{2}S_{0}}{4\delta
t}\int^{\infty}_{-\infty}\int^{t+\delta t}_{t}\int^{t+\delta t}_{t}d\omega
dt^{\prime}dt^{\prime\prime}\Big{\\{}\cos(\omega[t^{\prime\prime}+t^{\prime}])$
(107)
$\displaystyle+\cos(\omega[t^{\prime\prime}-t^{\prime}])\Big{\\}}\hat{a}^{\dagger}\hat{a}\hat{\rho}(t)\hat{a}^{\dagger}\hat{a}$
$\displaystyle=$ $\displaystyle\frac{\pi g_{d}^{2}S_{0}}{2\delta
t}\int^{t+\delta t}_{t}\\!\\!\\!\\!\int^{t+\delta
t}_{t}\\!\\!\\!\\!\\!\\!dt^{\prime}dt^{\prime\prime}\Big{\\{}\\!\delta(t^{\prime\prime}\\!+\\!t^{\prime})+\delta(t^{\prime\prime}-t^{\prime})\\!\Big{\\}}\hat{a}^{\dagger}\hat{a}\hat{\rho}(t)\hat{a}^{\dagger}\hat{a}$
$\displaystyle=$ $\displaystyle\frac{\pi
g_{d}^{2}S_{0}}{2}\hat{a}^{\dagger}\hat{a}\hat{\rho}(t)\hat{a}^{\dagger}\hat{a}$
$\displaystyle=$
$\displaystyle\eta\hat{a}^{\dagger}\hat{a}\hat{\rho}(t)\hat{a}^{\dagger}\hat{a},$

where, in the last line, we have introduced the motional dephasing rate
$\eta\equiv\pi g_{d}^{2}S_{0}/2$. Again, keeping in mind the limits of
integration over $dt^{\prime\prime}$, $\Upsilon_{ii}$ and $\Upsilon_{iii}$ can
be evaluated in the same manner. This gives a final equaiton for Markovian
motional dephasing:

$\displaystyle\dot{\hat{\rho}}(t)$ $\displaystyle=$
$\displaystyle-\frac{i}{\hbar}\Big{[}\hat{H}_{2g}(t),\hat{\rho}(t)\Big{]}$
$\displaystyle+\eta\Big{\\{}\hat{a}^{\dagger}\hat{a}\hat{\rho}(t)\hat{a}^{\dagger}\hat{a}-\frac{1}{2}[\hat{a}^{\dagger}\hat{a}]^{2}\hat{\rho}(t)-\frac{1}{2}\hat{\rho}(t)[\hat{a}^{\dagger}\hat{a}]^{2}\Big{\\}}.$

## References

  * Srinivas  _et al._ (2021) R. Srinivas, S. C. Burd, H. M. Knaack, R. T. Sutherland, A. Kwiatkowski, S. Glancy, E. Knill, D. J. Wineland, D. Leibfried, A. C. Wilson, Allcock D. T. C., and Slichter D. H., “High-fidelity laser-free universal control of trapped ion qubits,” Nature 597, 209–213 (2021).
  * Ballance  _et al._ (2016) C. J. Ballance, T. P. Harty, N. M. Linke, M. A. Sepiol, and D. M. Lucas, “High-fidelity quantum logic gates using trapped-ion hyperfine qubits,” Phys. Rev. Lett. 117, 060504 (2016).
  * Gaebler  _et al._ (2016) J. P. Gaebler, T. R. Tan, Y. Lin, Y. Wan, R. Bowler, A. C. Keith, S. Glancy, K. Coakley, E. Knill, D. Leibfried, and D. J. Wineland, “High-fidelity universal gate set for ${{}^{9}\mathrm{Be}}^{+}$ ion qubits,” Phys. Rev. Lett. 117, 060505 (2016).
  * Cirac and Zoller (1995) J. I. Cirac and P. Zoller, “Quantum computations with cold trapped ions,” Phys. Rev. Lett. 74, 4091 (1995).
  * Monroe  _et al._ (1995) C. Monroe, D. M. Meekhof, B. E. King, W. M. Itano, and D. J. Wineland, “Demonstration of a. fundamental quantum logic gate,” Phys. Rev. Lett. 75, 4714 (1995).
  * Wineland  _et al._ (1998) D. J. Wineland, C. Monroe, W. M. Itano, D. Leibfried, B. E. King, and D. M. Meekhof, “Experimental issues in coherent quantum-state manipulation of trapped at.ic ions,” J. Res. Natl. Inst. Stand. and Technol. 103, 259 (1998).
  * Nielsen and Chuang (2010) M. A. Nielsen and I. L. Chuang,  _Quantum computation and quantum information_ (Cambridge University Press, 2010).
  * Häffner  _et al._ (2008) H. Häffner, C. F. Roos, and R. Blatt, “Quantum computing with trapped ions,” Phys. Rep. 469, 155 (2008).
  * Blatt and Wineland (2008) R. Blatt and D. J. Wineland, “Entangled states of trapped atomic ions,” Nature 453, 1008 (2008).
  * Harty  _et al._ (2014) T. P. Harty, D. T. C. Allcock, C. J. Ballance, L. Guidoni, H. A. Janacek, N. M. Linke, D. N. Stacey, and D. M. Lucas, “High-fidelity preparation, gates, memory, and readout of a. trapped-ion quantum bit,” Phys. Rev. Lett. 113, 220501 (2014).
  * Mintert and Wunderlich (2001) F. Mintert and C. Wunderlich, “Ion-trap quantum logic using long-wavelength radiation,” Phys. Rev. Lett. 87, 257904 (2001).
  * Ospelkaus  _et al._ (2008) C. Ospelkaus, C. Langer, J. M. Amini, K. R. Brown, D. Leibfried, and D. J. Wineland, “Trapped-ion quantum logic gates based on oscillating magnetic fields,” Phys. Rev. Lett. 101, 090502 (2008).
  * Ospelkaus  _et al._ (2011) C. Ospelkaus, U. Warring, Y. Colombe, K. R. Brown, J. M. Amini, D. Leibfried, and D. J. Wineland, “Microwave quantum logic gates for trapped ions,” Nature 476, 181 (2011).
  * Harty  _et al._ (2016) T. P. Harty, M. A. Sepiol, D. T. C. Allcock, C. J. Ballance, J. E. Tarlton, and D. M. Lucas, “High-fidelity trapped-ion quantum logic using near-field microwaves,” Phys. Rev. Lett. 117, 140501 (2016).
  * Srinivas  _et al._ (2019) R. Srinivas, S. C. Burd, R. T. Sutherland, A. C. Wilson, D. J. Wineland, D. Leibfried, D. T. C. Allcock, and D. H. Slichter, “Trapped-ion spin-motion coupling with microwaves and a. near-motional oscillating magnetic field gradient,” Phys. Rev. Lett. 122, 163201 (2019).
  * Webb  _et al._ (2018) A. E. Webb, S. C. Webster, S. Collingbourne, D. Bretaud, A. M. Lawrence, S. Weidt, F. Mintert, and W. K. Hensinger, “Resilient entangling gates for trapped ions,” Phys. Rev. Lett. 121, 180501 (2018).
  * Zarantonello  _et al._ (2019) G. Zarantonello, H. Hahn, J. Morgner, M. Schulte, A. Bautista-Salvador, R. F. Werner, K. Hammerer, and C. Ospelkaus, “Robust and resource-efficient microwave near-field entangling 9Be+ gate,” Phys. Rev. Lett. 123, 260503 (2019).
  * Daniilidis  _et al._ (2013) N. Daniilidis, D. J. Gorman, L. Tian, and H. Häffner, “Quantum information processing with trapped electrons and superconducting electronics,” New J. Phys. 15, 073017 (2013).
  * Peng  _et al._ (2017) P. Peng, C. Matthiesen, and H. Häffner, “Spin readout of trapped electron qubits,” Phys. Rev. A 95, 012312 (2017).
  * Matthiesen  _et al._ (2021) C. Matthiesen, Q. Yu, J. Guo, A. M. Alonso, and H. Häffner, “Trapping electrons in a room-temperature microwave paul trap,” Phys. Rev. X 11, 011019 (2021).
  * Campbell  _et al._ (2017) E. Campbell, B. Terhal, and C. Vuillot, “Roads towards fault-tolerant universal quantum computation,” Nature 549, 172–179 (2017).
  * Haddadfarshi and Mintert (2016) F. Haddadfarshi and F. Mintert, “High fidelity quantum gates of trapped ions in the presence of motional heating,” New J. Phys. 18, 123007 (2016).
  * Magnus (1954) W. Magnus, “On the exponential solution of differential equations for a linear operator,” Comm. Pure Appl. Math. 7, 649–673 (1954).
  * Mølmer and Sørensen (1999) K. Mølmer and A. Sørensen, “Multiparticle entanglement of hot trapped ions,” Phys. Rev. Lett. 82, 1835 (1999).
  * Sørensen and Mølmer (2000) A. Sørensen and K. Mølmer, “Entanglement and quantum computation with ions in thermal motion,” Phys. Rev. A 62, 022311 (2000).
  * Leibfried  _et al._ (2003) D. Leibfried, B. DeMarco, V. Meyer, D. M. Lucas, M. Barrett, J. Britton, W. M. Itano, B. Jelenković, C. Langer, T. Rosenband, and D. J. Wineland, “Experimental demonstration of a. robust, high-fidelity geometric two ion-qubit phase gate,” Nature 422, 412 (2003).
  * Weidt  _et al._ (2016) S. Weidt, J. Randall, S. C. Webster, K. Lake, A. E. Webb, I. Cohen, T. Navickas, B. Lekitsch, A. Retzker, and W. K. Hensinger, “Trapped-ion quantum logic with global radiation fields,” Phys. Rev. Lett. 117, 220501 (2016).
  * Sutherland  _et al._ (2019) R. T. Sutherland, R. Srinivas, S. C. Burd, D. Leibfried, A. C. Wilson, D. J. Wineland, D. T. C. Allcock, D. H. Slichter, and S. B. Libby, “Versatile laser-free trapped-ion entangling gates,” New J. Phys. 21, 033033 (2019).
  * Sutherland  _et al._ (2020) R. T. Sutherland, R. Srinivas, S. C. Burd, H. M. Knaack, A. C. Wilson, D. J. Wineland, D. Leibfried, D. T. C. Allcock, D. H. Slichter, and S. B. Libby, “Laser-free trapped-ion entangling gates with simultaneous insensitivity to qubit and motional decoherence,” Phys. Rev. A 101, 042334 (2020).
  * Hayes  _et al._ (2012) D. Hayes, S. M. Clark, S. Debnath, D. Hucul, I. V. Inlek, K. W. Lee, Q. Quraishi, and C. Monroe, “Coherent error suppression in multiqubit entangling gates,” Phys. Rev. Lett. 109, 020503 (2012).
  * Shapira  _et al._ (2018) Y. Shapira, R. Shaniv, T. Manovitz, N. Akerman, and R. Ozeri, “Robust entanglement gates for trapped-ion qubits,” Phys. Rev. Lett. 121, 180502 (2018).
  * Mandel and Wolf (1995) L. Mandel and E. Wolf,  _Optical coherence and quantum optics_ (Cambridge university press, 1995).
  * Brownnutt  _et al._ (2015) M. Brownnutt, M. Kumph, P. Rabl, and R. Blatt, “Ion-trap measurements of electric-field noise near surfaces,” Rev. Mod. Phys. 87, 1419 (2015).
  * Ehrenfest (1927) P. Ehrenfest, “Bemerkung über die angenäherte Gültigkeit der klassischen Mechanik innerhalb der Quantenmechanik,” Z. Phys. 45, 455–457 (1927).
  * Heller (1975) E. J. Heller, “Time-dependent approach to semiclassical dynamics,” J. Chem. Phys. 62, 1544–1555 (1975).
  * Sutherland  _et al._ (2021) R. T. Sutherland, S. C. Burd, D. H. Slichter, S. B. Libby, and D. Leibfried, “Motional squeezing for trapped ion transport and separation,” Phys. Rev. Lett. 127, 083201 (2021).
  * Agarwal (2012) G. S. Agarwal,  _Quantum optics_ (Cambridge University Press, 2012).