Introduction

Representing and processing information according to the laws of quantum physics, a quantum computer may surpass the computational power of a classical computer by many orders of magnitude and is expected to transform areas such as machine learning1,2, cryptosystems3, materials science4,5, and finance6,7, to name only a few. Improving the reliability of quantum computation beyond the level of today’s machines8,9,10 is therefore critical to promote the quantum computer from a subject of academic interest to a powerful tool for solving problems of practical importance and utility.

The trapped-ion quantum information processor (TIQIP) is one of the most promising architectures for achieving a universal, programmable quantum computer, operating according to the gate model of quantum computing. Apart from a set of single-qubit gates, only a single entangling, two-qubit gate is necessary for achieving this goal. Today’s TIQIPs8,9 typically use an Ising XX gate, following the Mølmer-Sørensen protocol11,12,13, as the two-qubit native gate. Its best-reported fidelity is 99.9%14,15, which may be compared with the best-reported fidelity 99.9999% of single-qubit gates16. A host of pulse-shaping techniques have been devised9,12,13,17,18 to better control the underlying trapped-ion quantum systems for more efficient XX gate implementation, while reducing errors.

Highlighting the importance of efficient and robust implementation of XX gates, Fig. 1 shows the resource requirements for various quantum computations. For this figure and for near-term, pre- fault-tolerant (FT) quantum computers, we considered variational quantum eigensolvers that compute the ground state of the water molecule19, a material spin-dynamics undergoing state-evolution according to the Heisenberg Hamiltonian5, a quantum approximate optimization algorithm addressing a maximum-cut problem relevant for various optimization problems20, the widely-employed quantum Fourier transform subroutine21, quantum factoring of a 1024-bit integer22, which is meaningful for cybersecurity, and data-driven quantum-circuit learning for certain visual patterns2. The resource-cost metric used in the pre-FT regime considered here is the gate count for two-qubit XX gates since these are the gates that limit algorithm performance. For the FT regime, in addition to the FT-regime-optimized versions of Heisenberg-Hamiltonian simulations, the quantum Fourier transform, and integer factoring, we considered Jellium- and Hubbard-model simulations for condensed-matter systems23, the Femoco simulation4, relevant for a certain nitrogen-fixation process that can help make fertilizer production more efficient, and solving difficult instances of satisfiability problems24,25. The resource-cost metric used for the FT regime is the number of T gates. Note that each T gate in FT quantum computing requires, e.g., a distillation process, typically referred to as a magic-state factory26,27. Each distillation process for the T-gate implementation in the FT regime requires at least a few tens of two-qubit gates, such as XX gates, at the native, hardware-implementation-level26,27. Optimizing the XX-gate implementation on a TIQIP is therefore critical for both pre-FT and FT quantum computing, and the construction and experimental demonstration of robust, power-optimal pulses for XX-gate implementation on a TIQIP is the focus of this paper.

Fig. 1: Resource requirement of various quantum circuits as a function of system size.
figure 1

For the pre-FT regime, the resource cost is measured in terms of required number of XX gates. For the FT regime, the resource cost is measured in T gates, where each FT T gate requires tens of hardware-implementation-level XX gates26,27. Shown are the water-molecule ground-state computation (Water)19, Heisenberg-Hamiltonian simulation (Heisenberg)5, maximum-cut optimization (QAOA)20, the quantum Fourier transform (QFT)21, integer factoring (Shor)22, generative-model quantum machine learning (QML)2, Jellium- and Hubbard-model simulations (Jellium, Hubbard)23, and the Femoco simulation (Femoco)4. Grover’s algorithm24 implementation (not shown) that solves known difficult satisfiability problems25 requires  2000 qubits and  2 × 1027T gates. See Supplementary Note 1 for details.

Results

Power-optimal two-qubit entangling gate

There is only so much power that optical components can withstand. But more importantly, increased power leads to reduced gate fidelity due to, e.g., carrier coupling28, ion–ion crosstalk9,29, and spontaneous emission from intermediate Raman levels30. Therefore, it is important to construct gates that, in addition to being stabilized against control-parameter fluctuations, require the least amount of power possible, i.e., they need to be power-optimal. In this paper we present a comprehensive, scalable approach to the construction of stabilized, power-optimal XX gates that is based on the Mølmer-Sørensen Hamiltonian of an ion chain interacting with laser pulses:

$${H}_{MS}=\mathop{\sum}\limits_{i}\mathop{\sum}\limits_{p}{\eta }_{p}^{i}{g}_{i}(t)[{a}_{p}\exp (-i{\omega }_{p}t){\sigma }_{x}^{i}]+h.c.$$
(1)

Here i and p label the ions and the motional modes, respectively, \({\eta }_{p}^{i}\) is the Lamb-Dicke parameter, \({\sigma }_{x}^{i}\) and gi(t) are the Pauli-x operator and the pulse function acting on ion i, and ωp and ap are the frequency and mode operator of motional mode p, respectively. A judicious choice of pulse functions generates an XX gate that induces entanglement between two trapped-ion qubits, defined by the unitary operator

$${{{\rm{xx}}}}\left({\theta }_{ij}\right)={e}^{-i{\theta }_{ij}({\sigma }_{x}^{i}{\sigma }_{x}^{j})/2},$$
(2)

where θij = 4χij denotes the degree of entanglement between ions i and j. To induce the desired XX gate in practice, all motional modes of the ion chain need to be decoupled from the computational states of the qubits at the end of the gate operation8,9,11, leaving only the spins entangled. For an N-qubit system, and assuming that the same pulses are directed at ions i and j, these constraints are of the form

$${\alpha }_{p}=\int\nolimits_{0}^{\tau }g(t){e}^{i{\omega }_{p}t}dt=0\to \mathop{\sum }\limits_{n=1}^{{N}_{A}}{M}_{pn}{A}_{n}=0,$$
(3)

where τ, a free parameter, is the pulse duration. The degree of entanglement between qubits i and j is obtained as

$$\begin{array}{ll}&{\chi }_{ij}=\mathop{\sum }\limits_{p=1}^{N}{\eta }_{p}^{i}{\eta }_{p}^{j}\displaystyle\int\nolimits_{0}^{\tau }d{t}_{2}\int\nolimits_{0}^{{t}_{2}}d{t}_{1}g({t}_{2})g({t}_{1})\sin [{\omega }_{p}({t}_{2}-{t}_{1})]\\ &\to {\chi }_{ij}={\overrightarrow{A}}^{T}D\overrightarrow{A}\,={\overrightarrow{A}}^{T}S\overrightarrow{A}.\end{array}$$
(4)

To find a power-optimal pulse, we require that the norm of g is minimized, while g still satisfies (3) and (4) exactly. This can be achieved by expanding g in a complete basis, e.g., the Fourier-sine basis according to \(g(t)={\sum }_{n = 1}{A}_{n}\sin (2\pi nt/\tau )\), which spans the entire desired function space over the gate-time interval τ. Restricted to a finite sub-space with basis-function amplitudes An, n = 1, 2, .., NA, with sufficiently many NA basis functions, the constraint (3) can be written in linear algebraic form as shown on the right-hand side of (3), where Mpn is the time integral of the product between the nth basis function and \({e}^{i{\omega }_{p}t}\). Therefore, to satisfy (3), all that is required is to draw amplitudes An from the null-space of M31, where the null space is defined as the vector space that is mapped to zero under the action of M. Similarly, the constraints (4) can be denoted in linear algebraic form, as stated in the second line of (4), where the matrix D has elements Dnm, defined as the p-sum of the double integrals in (4) of the product between \(\sin [{\omega }_{p}({t}_{2}-{t}_{1})]\) and the nth and mth basis functions that stem from expanding the two g functions. Thus, defining the symmetric matrix S = (D + DT)/2, (4) can be satisfied, including the requirement of minimal norm of g, by finding the appropriate linear combination of the null-space vectors of M that combine to the eigenvector of R with maximal absolute eigenvalue, where R is the null-space projected matrix S.

Our approach is linear and satisfies the two constraints (3) and (4) exactly. Since (3) can be split into even and odd symmetry components, it is possible to consider only N out of 2N real constraints of (3) and induce, at our discretion, a pulse that is symmetric or anti-symmetric about its center. Additionally, because, e.g., the Fourier basis is complete in its respective symmetry class, the resulting g(t) is provably optimal in minimizing the norm of g(t), which corresponds to minimizing the average power required to induce a XX gate. There is no iteration of any kind necessary. For instance, searching for an optimal solution in the parameter space, such as in12,13,17,18,29,32,33, is not necessary for our approach. Since only matrix operations are required to arrive at the optimal pulse solution, the optimal pulse is obtained in time \(O({N}_{A}^{3})\)34.

Figure 2a,b shows the amplitudes An for a sample pulse function of the form \(g(t)=\mathop{\sum }\nolimits_{n}^{{N}_{A}}{A}_{n}\sin (2\pi nt/\tau )\) for NA = 10000 and τ = 300 μs. As expected, the An are large for 2πn/τ ≈ ωp, showing that, to induce the desired XX interaction between two qubits via motional modes, the frequency components of the pulse function g(t) need to be reasonably close to the motional-mode frequencies. We confirmed that a NA = 1000 basis-function solution essentially results in the same An spectrum, visually indistinguishable from that with NA = 10, 000, when overplotted. This demonstrates the robustness of our method with respect to the basis size.

Fig. 2: Power-optimal pulse function g and spin-dependent force applied to an ion qubit.
figure 2

See Supplementary Note 4 for the relevant parameters of the sample case of five qubits considered here. a Fourier-sine coefficients An of the pulse function \(g(t)={\sum }_{n}{A}_{n}\sin (2\pi nt/\tau )\), τ = 300μs. The tails of An decay according to ~1/n. The arrows indicate the locations of the mode frequencies. The signs of An are color-coded, i.e., negative An are depicted with orange and positive An are depicted with gray. The top scale shows the basis frequencies n/τ, which are in resonance with the mode frequencies at the locations of the arrows. b Same as a but for a basis of 10,000 states. The main features occur at the same positions in n and in frequency, which shows convergence and basis independence. c Scaling of the maximal power, \(\mathop{\max }\nolimits_{t}g(t)\)as a function of the number of qubits N. Gate time τ = 500μs. Orange circles: numerical results, heuristic bound. Gray curve: analytic bound derived in Supplementary Note 5. d The time-dependent displacement in the phase space of ion number 1, where K = 0 (pink) and K = 3 (blue) are shown. The trajectories start and end at the origin.

The pulse function g(t) corresponding to the amplitudes An shown in Fig. 2a,b is shown as the green line in Fig. 3a. Since g(t) is a fast-oscillating function, it is instructive to write it in the form

$$g(t)={{\Omega }}(t)\sin [\psi (t)],$$
(5)

where Ω(t) is the envelope function of the pulse (orange line in Fig. 3a and \(\psi (t)=\int\nolimits_{0}^{t}\mu (t^{\prime} )dt^{\prime}\) is the phase function, where μ(t) is the detuning function8,9. We see that the amplitude of the pulse function is relatively flat, which implies that the average power minimization obtained by the g-norm minimization is essentially as good as minimizing the peak power of the pulse. Figure 3b shows the detuning function μ(t). Consistent with the large Fourier amplitudes near the motional-mode frequencies in Fig. 2a, the demodulated frequency hovers around the motional-mode frequencies.

Fig. 3: Optimal τ = 300 μs pulse function for a maximally entangling XX gate between ions i = 1 and j = 3, for five ions with NA = 1000 basis states.
figure 3

The expansion coefficients An of this pulse are shown in Fig. 2a. a The optimal pulse function \(\hat{g}(t)\) (thin green line) with its amplitude function (thick orange line), obtained by demodulating \(\hat{g}(t)\) as detailed in Supplementary Note 9. b Detuning function μ(t) obtained by frequency demodulating the pulse function, using the method described in Supplementary Note 9. The frequencies of the motional modes are shown as the five horizontal lines. The sample motional-mode frequencies used to generate this pulse are listed in Supplementary Table 1 and the set of η parameters used are listed in Supplementary Table 2 in Supplementary Note 4.

Because the minimal-power pulse function can be determined efficiently, it is straightforward to investigate the power requirement of the optimal pulse as a function of system size. Figure 2c shows the maximal power of the optimal pulse \(\mathop{\max }\limits_{t}g(t)\), obtained with NA = 1000, for system sizes ranging from 5 to 100 ions. The power is consistent with our analytical bounds (see Supplementary Note 5). Additionally, since according to the analytical results the power requirement is inversely proportional to the gate duration, the power optimum implies gate-time optimum for a given power budget. Thus, for a given amount of maximally available power, the power-optimal pulse is the fastest possible for XX gate execution. The ion displacement in position-momentum phase space for each mode ωp entering into the computation of our sample pulse function g(t) shown in Fig. 2a,b, is shown in Fig. 2d.

Control-pulse stabilization

Because the pulse function is constructed using a completely linear method, any additional linear constraints may be added, which still results in a power-optimal pulse when generated according to the steps discussed in the previous section. As an example, we show here how to stabilize the pulse against errors in external parameters, such as mode-frequency fluctuations.

To stabilize against fluctuations of ωp, we start by expanding the number of constraints (3). Explicitly, we add

$$\frac{{\partial }^{k}}{\partial {\omega }_{p}^{k}}\int\nolimits_{0}^{\tau }g(t){e}^{i{\omega }_{p}t}dt=0\to \mathop{\sum }\limits_{n=1}^{{N}_{A}}{M}_{pn}^{(k)}{A}_{n}=0,$$
(6)

where k denotes the order of stabilization. Since the additional constraints in (6) are linear, all we need to do to stabilize the pulse up to Kth order is to include the additional linear equations (6) in the coefficients matrix M. The decoupling between the computational states of the qubits and the motional modes is thus achieved exactly, and the pulse is stabilized by using up N(K + 1) degrees of freedom.

Figure 2d shows the phase-space trajectories for the stabilized pulse with K = 3. Compared to the K = 0 case, the general structure of the pulse with K = 3 remains the same—the frequency components are centered around the motional-mode frequencies and the phase-space closure is guaranteed. In Fig. 4a, the infidelity of stabilized pulses K = 0, 1, .., 8 is shown as a function of the extent of the ωp fluctuations. Considered are pulses with duration τ = 300 μs over the five-ion chain considered in the previous section. The widths of the infidelity curves, extracted at infidelity of 0.001, increase from ~0.1kHz to ~13kHz as K is increased from 0 to 8 (see Fig. 4b). The power requirement of the stabilized pulses for each K is shown in Fig. 4c; the requirement scales linearly in K. Figure 4d shows the width-scaling for each K as a function of different choices of gate duration τ. The effect of the stabilization increases inversely proportional to the gate duration.

Fig. 4: Stabilization of the control pulses.
figure 4

a The infidelity (see Supplementary Note 8 for detail) as a function of the motional-mode frequency drift Δf. All mode frequencies were drifted according to ωpωp + 2πΔf. b The width of the infidelity curves in a for various error tolerances ϵ = 10−3, 10−5, and 10−7, as a function of the highest moment K of stabilization. c The maximal power requirement \(\mathop{\max }\nolimits_{t}| {g}_{K}(t)|\) of the control pulses, as a function of the order or moment of stabilization K. The power requirement suggests a linear scaling in the moment of stabilization. d The width of the infidelity curves for various different orders of stabilization K = 0, 2, 4, and 6, as a function of the gate duration τ for a fixed error tolerance level ϵ = 10−3. The data suggests ~1/τ scaling of the width.

The most straightforward way of experimentally implementing our amplitude- and frequency-modulate (AMFM) pulses is via an arbitrary waveform generator (AWG)35,36. However, if an AWG is not available, implementation via the decomposition (5) (demodulation) is also possible (see Supplementary Note 9 for more detail).

In various contexts our protocol has already been implemented, tested, and verified experimentally. In8 it was used in its simpler amplitude-modulated version to benchmark one of the IonQ quantum computers. In36 it was used as the basis for demonstrating a fidelity trade-off scheme called extended null-space (ENS)36. By sacrificing negligible amounts of fidelity, via ENS, an "add-on” to our basic AMFM scheme, additional power savings of up to an order of magnitude can be realized. This demnstrates that our protocol is extensible and adaptable.

In both applications our power-optimal protocol has proved its experimental utility.

While our protocol has already found experimental applications, its stabilizing effect in its exact [see (3)] version, employing simultaneous amplitude and frequency modulation, has not yet been demonstrated. This is done in the following section.

Experimental demonstration

We implement the power-optimal, stabilized entangling gate on a trapped-ion quantum computer that has been described elsewhere in detail8. A chain of seven ions is sideband cooled according to the protocol detailed in37. The two end ions are used to obtain equal spacing between the middle five individually addressed ions, which comprise the qubit register, and single- and two-qubit gate operations are driven by a two-photon Raman transition at 355 nm. As described in8 the coherence of our quantum computer has been completely characterized. In particular, the fidelity of two-qubit gates was determined to be ≈ 96%, measured via parity contrast and partial tomography as described in8,14,15.

The propagator of (1) can be written in the form12

$$U=V{{{\rm{xx}}}}\left({\theta }_{ij}\right),$$
(7)

where

$$V=\exp \left\{-i\mathop{\sum}\limits_{ip}{\eta }_{p}^{i}({\alpha }_{p}{a}_{p}^{{\dagger} }+{\alpha }_{p}^{* }{a}_{p}){\sigma }_{x}^{i}\right\}$$
(8)

and XX(θij) is defined in (2). For αp = 0, which is guaranteed exactly according to our protocol, an AMFM gate solution, computed from the measured motional-mode spectrum, implements the unitary in (2) over two qubits with ≈ 96% fidelity. Since αp = 0 corresponds to zero mode-frequency drift, the ≈ 4% loss in fidelity is not due to mode-frequency drift but is due to other processes, such as beam-steering errors, laser-power fluctuations, fluctuating ambient electric and magnetic fields, etc.

Starting in the intial state \(\left|00\right\rangle\), the ideal gate operator (2) strictly preserves the even-parity population Peven = P00 + P11, where Pmn is the population in \(\left|mn\right\rangle\) after the gate pulse is over. When motional-mode frequencies start to drift, αp becomes nonzero and the propagator V in (7) is "switched on”. This causes population transfer into the odd-parity states \(\left|01\right\rangle\) and \(\left|10\right\rangle\), which, in turn, causes a reduction of Peven. Thus, Peven is a sensitive probe of stabilization of an AMFM gate against mode-frequency drift. We strongly emphasize that mode frequency drift causes a reduction of fidelity that is completely independent of the other sources of infidelity mentioned above. Thus, if the mode frequency drift is compensated, i.e., V is "switched off” by constructing a steering pulse g(t) that assures αp ≈ 0 to high order, as accomplished by our protocol, the gate fidelity is unchanged from its value at zero mode-frequency offset. This was verified experimentally in36 in the way of spot-checks using contrast measurements for selected values of mode frequency drift.

Figure 5 shows the even-parity population Peven as a function of mode-frequency offset, measured after applying an XX(π/2) gate designed for zero mode-frequency offset, to the initially prepared two-qubit state \(\left|00\right\rangle\). Three different pulses were used to implement XX(π/2), with moment stabilization orders K = 1, 4, 7. The gray line in each frame of Fig. 5 shows the analytical infidelity \((4/5){\sum }_{p}\left[{({\eta }_{p}^{i})}^{2}+{({\eta }_{p}^{j})}^{2}\right]| {\alpha }_{p}{| }^{2}\)30, with a constant 4% offset to account for the other errors that are independent of the gate-frequency offset. The shaded region indicates the range of mode-frequency offsets for each moment stabilization where the theoretical fidelity F > 0.99. The width of the shaded region can be seen to increase for increasing moment. In fact, for K = 1 stabilization (top frame of Fig. 5) acceptable fidelity is achieved only over a range of less than 1 kHz, outside of which Peven drops precipitously to around 65%. K = 4 stabilization (middle frame of Fig. 5) achieves stability over a mode-frequency range of about ± 2 kHz, a factor-2 improvement of allowed mode-frequency fluctuations accompanied by a restoration of the gate fidelity back up to ≈ 96%. In the interval between 1 kHz and 2 kHz we see an improvement of Peven of about 30%. This is not a small effect. This is a sizable stabilization effect adding to the proven utility of our protocol. K = 7 stabilization (bottom frame of Fig. 5) shows a similar ≈30% improvement of Peven over an even larger frequency interval ≈ ±3 kHz), a factor-3 improvement of the stable frequency range. More details concerning our experiment can be found in Supplementary Note 11.

Fig. 5: Experimental demonstration of K-moment stabilized two-qubit gates.
figure 5

A single XX(π/2) gate is applied to the fiducial state \(\left|00\right\rangle\), and the even-parity population is plotted as a function of the gate frequency offset. For increasing moment stabilization (shown are K = 1, 4, 7), the region of high even-parity population increases, as indicated by the detuning-robust region shaded in blue. The gray line shows the analytical expression [Supplementary Eq. (60)], valid in the low-error limit, with a 4% offset to account for other sources of infidelity that are independent of the gate frequency. Notice that our experiment reproduces the oscillating fine structure of the fidelity expression, Supplementary Eq. (60). Error bars on the experimental data are 1σ confidence intervals, sampled from a binomial distribution, and each point represents 300 realizations of the experiment.

Discussion

Application of our protocol is not limited to the case of the trapped ion-chain quantum computer architecture8,9. It can be applied to all quantum computing architectures that rely on phase-space closure, such as the QCCD architecture38. It is even applicable to the superconducting quantum computer architecture that also relies on pulse shaping39.

Our work is most closely related to28,40, who use a multi-tone approach to construct stabilized two-qubit gates. However, there are substantial differences. For instance: (i) The authors of28,40 formulate and demonstrate their protocol for the special case of trapped two-ion crystals, and since it relies on an analytical solution for the gate pulses, it is not scalable to N-ion, many-mode systems. (ii) The multi-tone approach in28,40 requires the different tones (which can be interpreted as Fourier components) of g(t) to be equi-spaced. While this is very closely related to our expansion of g(t) in a Fourier-sine series, equi-spacing in the frequency of basis functions is not necessary in our approach. Any basis can be used to express g(t). For instance, we found that short pulses are better represented in a polynomial basis, whose Fourier components are not equi-spaced. Thus, any kind of chirped pulse can be used in our method. (iii) While, indeed, stability against several types of errors was demonstrated in28,40, these conditions, to much higher order than demonstrated in28,40, are more easily implemented according to our protocol, which requires only added linear equations for each stability condition or constraint. (iv) As discussed in Supplementary Notes 15, 16, and 17, our protocol can be extended to include stability against drifts in the degree of entanglement. (v) Power optimization was not considered in28,40. Thus our protocol, presenting a unified, scalable approach to arbitrarily stabilized N-ion gate construction, goes far beyond the methods presented in28,40 and is thus a substantial advance over existing methods.

The ability to symmetrize the pulse solution gives rise to potential additional room for robustness with respect to errors. Since, e.g., the inner products between a symmetric pulse function g(t) and the antisymmetric part of the constraint \({e}^{i{\omega }_{p}t}\) in (3) are zero (see Supplementary Note 3 for details), akin to echos, as long as the pulse function is modified symmetrically due, e.g., to implementation defects, half of the null-space conditions in (3) is still exactly satisfied, while leaving the error entirely in the part of the constraint with the opposite symmetry. The knowledge that the error lies in the oppositely symmetric part leaves room for a secondary echo, wherein the sign of the errors may be flipped. In case the errors cannot be manipulated to be echoed out in this particular symmetry, other symmetries may be considered at the pulse-construction level, rendering our approach an integrated protocol that can be designed to be robust against different symmetry classes of errors.

The methodology and paradigm used to construct our power-optimal pulses is general and can readily accept incomplete bases to result in pulses that are subjected to additional constraints. Beyond the AM, FM, PM pulses that can be obtained by appropriately demodulating the pulse function according to (5), a step-pulse approach that has been used in the literature12,13,29 can also be derived. In fact, as shown in Supplementary Note 12, by carefully tuning the gate duration time, even the beneficial symmetric pulse structure can be preserved.

Adding to the generality is the application to the Efficient Arbitrary Simultaneously Entangling (EASE) gates29, where any combination of quadratically many pairs of qubits can be entangled to any degree of entanglement. As detailed in Supplementary Note 13, because our approach is linear and the EASE-gate approach is amenable to any linear approach, it is straightforward to adapt the pulse-construction method presented here to the EASE protocol. Together with the power- or time-optimality guaranteed in our pulse construction by design, then, the EASE gate equipped with our method enables one of the fastest ways to implement as many entangling gates as possible in a TIQIP.

The moment-stabilization adds robustness against those errors induced by not properly decoupling the computational states from the motional modes. However, unitary errors in the computational space may still linger, since the entanglement degree is sensitive to, e.g., ωp fluctuations (see Supplementary Note 14). In practice, this may be fended off by calibrations, i.e., by monitoring how the degree of entanglement changes over time and adjusting the amplitude of the illuminating beams to compensate for this change. Note that the shape of the pulse does not change; amplitude scaling suffices. If frequent calibrations are impractical, active stabilization in the entanglement degree χij may be implemented, which involves finding pulses that, apart from satisfying (3), (4), and (6), also satisfy

$$\frac{{\partial }^{k}{\chi }_{ij}}{\partial {\omega }_{p}^{k}}=0,\,\,\,k=1,2,\ldots ,{K}_{\chi },$$
(9)

where Kχ is the maximal order of desired χ stabilization. In Supplementary Notes 15, 16, and 17, we offer three methods which either achieve (9) approximately (see Supplementary Note 15) or completely (see Supplementary Notes 16, and 17). While the projection method presented in Supplementary Note 15 achieves (9) only approximately, and only for Kχ = 1, it does reduce the errors originating from fluctuating mode frequencies substantially. A qualitative improvement over the projection method are the two-pulse moments method presented in Supplementary Note 16 and the hybrid method, presented in Supplementary Note 17. These two methods fulfill (9) exactly, and consequently actively stabilize the degree of entanglement over a large interval of frequency drift [see Supplementary Fig. 6a and Supplementary Fig. 7]. However, constructing the two pulses characterizing these methods is computationally more expensive and the pulses require more power. Therefore, whether to use the simple projection method described in Supplementary Note 15 or the two-pulse methods described in Supplementary Notes 16 and 17, depends on experimental conditions and available computational resources.

Stabilization against other parameters, such as the Lamb-Dicke parameters \({\eta }_{p}^{i}\) or the amplitude of the laser beam, encoded in the norm of g(t), is also possible. Notice that \({\eta }_{p}^{i}\mapsto {\eta }_{p}^{i}(1+{{{\Delta }}}_{{\eta }_{p}^{i}})\) or g(t) g(t)(1 + Δg), where \({{{\Delta }}}_{{\eta }_{p}^{i}}\) and Δg are small constants, does not affect the decoupling condition (3). The effect of the errors is confined to the degree of entanglement (4), i.e., χijχij + Δχij, where Δχij is the error in χij that arises from \({{{\Delta }}}_{{\eta }_{p}^{i}}\) and Δg. As discussed in Supplementary Note 18, this can be adequately compensated by, e.g., a broadband compensation sequence applicable for the two-qubit case.

We note that, while technically challenging, in principle, it is possible to directly implement our Fourier-basis pulse solution g(t) using a multi-tone laser. As shown in Supplementary Note 19, by implanting NA different colors with different amplitudes to the beams that address ions, then locking the phases of them, we can induce the desired evolution of the XX on a TIQIP. The technique here is similar to the discrete multi-tone, widely used in communication lines. The development of the technology in the optical regime remains a promising avenue for future research.

Formally speaking, there are infinitely many smooth solutions that qualify as adequate pulse functions. Out of these infinitely many possible solutions, our protocol extracts the power-optimal solution without any iterations or parameter scans. Including symmetry and stabilization, the solution is also robust against errors, helping to significantly increase the uptime of TIQIPs41. With an AWG, as already demonstrated36, our AMFM pulses can be implemented directly experimentally to produce an optimal XX gate. If AWG technology is not available, as in our experiments reported in this paper, implementation via demodulation (see Supplementary Note 9) is also an option. Demodulation of our AMFM pulses also shows that their amplitude function is nearly flat, i.e., average power minimization is an excellent approximation of maximal power minimization. Indeed, an exact analytical bound on power and its comparison to the demodulation results shows that the optimal solution is close to the bound. With the XX gate implemented using the pulse constructed according to our protocol, just about any quantum algorithms can now be implemented with minimal power requirement, or in the shortest possible time for a given power budget, at the two-qubit gate, physical implementation level. This provides decisive advantages in improving both noisy, near-term TIQIPs and fault-tolerant TIQIPs to come in the future.

Methods

Theory

The strength of our method lies in the fact that pulse construction is linear and requires only a few lines of code on a classical computer. The method is particularly straightforward if the pulse is implemented directly via an AWG, which avoids the demodulation step.

The two core elements of our pulse construction algorithm are described in detail in the Results section: (a) Finding the null-space of the matrix M, defined in (3) and (6), and (b) diagonalizing the matrix R, i.e., the null-space projected matrix S, defined in (4). Accomplishing (a) and (b) involves only elementary linear algebra tasks, which can be performed using standard singular-value-decomposition and diagonalization codes, respectively (see, e.g.,34). The following serves as a brief guide through the Supplementary Information, where more details of our methods can be found in the respective sections.

Following Supplementary Note 1, a presentation of our methods used to obtain the resource requirements illustrated in Fig. 1, explicit step-by-step linear algebra formulas reflecting our method of pulse construction, including stabilization against motional-mode frequency drift and pulse-timing errors, and our method of symmetry classes, are presented in Supplementary Notes 24, 8, and 10. Sensitivity of the degree of entanglement is illustrated in Supplementary Note 14, and several methods for active stabilization of the degree of entanglement are presented in Supplementary Notes 1518.

Our method of pulse construction includes many pulse-construction schemes previously described in the literature. As an example, Supplementary Note 12 shows explicitly how our AMFM method includes the previous method of fixed-detuning step pulses.

Our analytical methods for computing an exact lower bound for the minimal power requirement of a 2-qubit XX gate are presented in Supplementary Note 5, and our methods for evaluating power and execution-time scaling are presented in Supplementary Note 6. In Supplementary Note 7 we use the method of Lagrangian multipliers to show that—not considering χ stabilization—power optimality requires that the same pulse (up to a phase) is applied to the two ions in a 2-qubit XX gate.

In Supplementary Note 9 we present our method of pulse demodulation, which can be used either for the analysis of AMFM-constructed pulses, or for implementing AMFM pulses experimentally if an AWG is not available. In Supplementary Note 19, we suggest a method for the direct implementation of our Fourier pulses, using multi-tone lasers.

Parallel execution of quantum gates is an important strength of TIQIPs. How to apply our AMFM methods to the EASE protocol29 of parallel-gate construction is briefly discussed in Supplementary Note 13.

Experiment

The setup of our experiment and our experimental methods are described in detail in8. More details, in particular the implemented pulse shape (see Fig. S2) and the motional-mode frequencies (see Tables S4 and S5) used to construct the pulses implemented in our experiment, can be found in Supplementary Note 11.