# Time-Optimal Two- and Three-Qubit Gates for Rydberg Atoms

Sven Jandura and Guido Pupillo

University of Strasbourg and CNRS, CESQ and ISIS (UMR 7006), aQCess, 67000 Strasbourg, France

We identify time-optimal laser pulses to implement the controlled-Z gate and its three-qubit generalization, the C₂Z gate, for Rydberg atoms in the blockade regime. Pulses are optimized using a combination of numerical and semi-analytical quantum optimal control techniques that result in smooth Ansätze with just a few variational parameters. For the CZ gate, the time-optimal implementation corresponds to a global laser pulse that does not require single-site addressability of the atoms, simplifying experimental implementation of the gate. We employ quantum optimal control techniques to mitigate errors arising due to the finite lifetime of Rydberg states and finite blockade strengths, while several other types of errors affecting the gates are directly mitigated by the short gate duration. For the considered error sources, we achieve theoretical gate fidelities compatible with error correction using reasonable experimental parameters for CZ and C₂Z gates.

## 1 Introduction

The improvement of fidelities for two- and multi-qubit quantum gates is a main driver of research in the field of quantum computing: High-fidelity two-qubit gates are essential for the realization of deep quantum circuits in noisy near-term digital quantum devices [1] as well as for the realization of fully-fledged fault tolerant quantum computers in the long term [2–5], while high-fidelity *k*-qubit quantum gates (*k* > 2) may drastically reduce the gate count for quantum algorithms and enable fault tolerant quantum computation schemes adapted to specific platforms [6, 7].

Neutral atoms are among the leading technologies for advanced analog and digital quan-

tum simulations and have recently emerged as a highly promising platform for quantum computing [8–12]. Near defect-free arrays of alkali-metal and alkali-earth(-like) atoms can be routinely prepared at sub-millikelvin temperatures in optical tweezers and in optical lattices in arbitrary dimensions [13–17]. Fast two-qubit gates can be achieved by encoding quantum information in the internal – usually electronic ground – states of individual atoms (or collective excitations of atomic ensembles [12]) while strong interactions can be mediated by electronically highly excited Rydberg states, which can be controlled using laser fields [see Fig. 1(a)]. In the original scheme [18], the accumulation of relevant phase shifts in two-qubit quantum gates is facilitated by the so-called “Rydberg blockade” mechanism, whereby one laser-excited atom shifts the Rydberg states of neighboring atoms out of resonance due to strong Rydberg-Rydberg interactions – a process that can be readily generalized to *k*-qubit gates, in principle [19, 20]. Two-qubit entangling gates have been implemented in several experiments [21–26], achieving fidelities up to 99.1% [26].

A variety of error sources limit gate fidelities in experiments, including a finite Rydberg blockade strength, decay of the Rydberg state, scattering of an intermediate state in a two photon transition, laser phase noise, variations of the laser intensity with the position of the atom in the trap and Doppler shifts of the laser frequency due to thermal motion of the atoms [22, 27, 28]. To mitigate the effects of these errors, many different improvements of the original protocol [18] have been proposed based on adiabatic passage [29–34], dark state mechanisms [35], Rydberg Antiblockade [34, 36, 37], and many other approaches [19, 38–41]. It is increasingly recognized that all these approaches can benefit from *quantum optimal control methods* to improve both the speed and fidelities of the various
quantum gates. Quantum optimal control methods can also provide additional solutions that differ qualitatively from any of the known basic gate schemes.

Quantum optimal control methods [42] have been successfully used on a variety of platforms, including superconducting qubits [43–46], trapped ions [47, 48] and neutral atoms [49–56]. For neutral atoms, three properties of the laser pulses implementing a given gate are of particular interest: (i) They should be time-optimal (i.e., as short as possible) because many errors mentioned above can be mitigated by short pulse durations; (ii) They should ideally require only a global control laser addressing all atoms of the gate simultaneously – so-called *global* pulses –, instead of requiring single-site addressability, in order to simplify experiments; (iii) They should allow for executing three and more qubit gates *natively* (i.e., without decomposing them into single- and two-qubit gates). In line with these three requirements, a remarkable result in Ref. [21] shows that a global pulse for the Controlled-Z (CZ) gate exists, which is more then 30% faster than the original, non-global proposal [18], and a global pulse exists for a Toffoli gate, albeit only with a moderate theoretically predicted fidelity of 97.6%. Naturally the question arises if it is possible to find pulses that are even faster and achieve higher fidelities, in order to make both CZ and $C_2Z$ gates fully compatible with error correction schemes.

In this work, we answer the fundamental question of identifying the fastest possible global pulse for a CZ gate and for its three-qubit generalization, the $C_2Z$ gate, satisfying the requirements (i)-(iii) above. While we assume the basic level structure of Ref. [18] (see Fig. 1(a)), our results provide original pulse schemes. Key results include: (i) For the CZ gate, we find that the time-optimal global pulse corresponds to a pulse where the laser amplitude is kept constant, while the laser phase is varied continuously and smoothly in time. The resulting pulse is about 10% faster than that of Ref. [21] – which we thus find to be already an excellent pulse. Interestingly, the found global CZ gate remains time-optimal even when considering pulses making use of single-site addressability, demonstrating that the latter is not necessary for two-qubit operations. (ii) For the $C_2Z$ gate, we find two qualitatively different time-optimal global pulses, which differ by less

than 1% in speed. Interestingly, both pulses are even faster than the pulse proposed in Ref. [20], which requires single-site addressability. To our knowledge this is the first work to identify time-optimal pulses for $C_2Z$ gates. (iii) We demonstrate that the found time-optimal pulses can be adjusted to minimize errors arising from the decay of the Rydberg state or a finite blockade strength. (iv) All pulses for CZ and $C_2Z$ gates correspond to smooth time evolutions of the laser phase that can be fully described by just a few variational parameters and (v) allow for reaching theoretical fidelities compatible with most error correction schemes.

The results in this work are obtained using two complementary quantum optimal control techniques, namely Gradient Ascent Pulse Engineering (GRAPE) and Pontryagins Maximum Principle (PMP), which we combine in a novel way: The time-optimal pulses are first found using GRAPE, which requires optimization over several hundreds of parameters to describe the pulses. The pulses can then be fitted by the solution of a simple differential equation, derived using the PMP from the condition of time-optimality. In this way, the number for parameters needed to describe the pulses is reduced to only 4 and 6 for the CZ and the $C_2Z$ gate, respectively.

The paper is structured as follows: In Sec. 2 we introduce the theoretical tools used in this work. In particular, in Sec. 2.1 we introduce the level scheme and the Hamiltonian, and define the averaged fidelity as a quality measure for the implementation of a gate. We also discuss how complex conjugation or time-reversal of a laser pulse affect the implemented gate and how calculations can be simplified for global pulses. In Secs. 2.2.1 and 2.2.2 we give a brief introduction to GRAPE and the PMP, respectively. In Sec. 3 we use GRAPE to find the time-optimal global pulses that implement a CZ and a $C_2Z$ gate in the limit of an infinitely large blockade strength. In Sec. 4 we then use the PMP to give a semi-analytical description of the time-optimal pulses found in Sec. 3. In Sec. 5 we change the optimization objective and use GRAPE to identify pulses that are the most robust against decay of the Rydberg state. In Sec. 6 we discuss how the time-optimal gates from Sec. 3 can be modified to compensate for a finite blockade strength. For this, we consider two approaches: In Sec. 6.1 we assume a fixed and
known blockade strength and find pulses that implement a CZ or C₂Z gate exactly only at this specific blockade strength, while in Sec. 6.2 we find pulses that implement a CZ or C₂Z gate exactly only at infinite blockade strength, but whose error increases as slowly as possible if the blockade strength is decreased. In Sec. 7 we calculate the fidelity for the time-optimal pulses from Sec. 3 for specific experimental parameters. Section 8 presents the conclusions.

All pulses found in this work are available at Ref. [57].

## 2 Theoretical Tools

In this section we introduce the theoretical tools that are used to derive optimal pulses in the subsequent sections. Section 2.1 introduces the Hamiltonian and presents the basic properties of pulses implementing a quantum gate. Section 2.2 gives a brief introduction to GRAPE, followed by an introduction to the application of the PMP method to time-optimal control.

### 2.1 Hamiltonians and Pulses

In Sec. 2.1.1 we first introduce the level scheme and the corresponding Hamiltonian that are used in remainder of the work. In Sec. 2.1.2 we introduce phase gates, of which the CZ gate and the C₂Z gate are two examples, and show how the gate error of a pulse aiming to implement a phase gate is calculated. In Sec 2.1.3 we discuss how complex conjugation and/or time reversal of a pulse affect the implemented gate and show that in general there is not only one time-optimal pulse for a given gate, but several pulses which are related by symmetry operations. Finally, in Sec. 2.1.4 we focus on global pulses and show how some calculations simplify for them.

#### 2.1.1 General Hamiltonian

Consider n atoms treated as three-level systems: A qubit is stored in states $|0\rangle$ and $|1\rangle$, which can be taken to be hyperfine states of the ground state manifold. Additionally, a Rydberg state $|r\rangle$ is used to mediate the interactions between the qubits. This work focuses on the cases n = 2 and n = 3 to describe two- and three-qubit gates.

The level scheme for n = 2 is shown in Fig. 1(a). The states $|1\rangle_j$ and $|r\rangle_j$ of the j-th

atom are coupled by a laser with time-dependent Rabi frequency $\Omega_j(t) = |\Omega_j(t)|e^{i\phi_j(t)}$. The Rabi frequency $\Omega_j(t)$ is taken to be complex, encoding both the amplitude $|\Omega_j(t)|$ and the phase $\phi_j(t)$ of the laser. For this reason, no additional detuning of the laser is included, since the laser detuning $\Delta_j(t)$ and the laser phase are related through $\Delta_j = d\phi_j/dt$. In any experiment, the maximal achievable Rabi frequency $|\Omega_j(t)|$ is limited by the laser power and waist diameter. To include this into the model, a maximum Rabi frequency $\Omega_{max}$ is introduced and only pulses with $|\Omega_j(t)| \le \Omega_{max}$ are considered for the rest of the paper.

The inter-atomic interaction term $B_{jk}|rr\rangle_{jk} \langle rr|$ shifts the energy of the atoms j and k that are prepared in the Rydberg state, with $B_{jk}$ called the blockade strength. This results in the Hamiltonian (with $\hbar = 1$)

$$H(t) = \sum_{i=j}^{n} \frac{\Omega_j(t)}{2} |1\rangle_i \langle r| + \text{h.c.} \quad (1) \\ + \sum_{j<k} B_{jk} |rr\rangle_{jk} \langle rr|.$$

The Hamiltonian (1) ignores any Rydberg-laser induced light shifts on $|0\rangle$, $|1\rangle$ and $|r\rangle$. These light shifts can be cancelled by adjusting the laser frequency and by applying additional single qubit rotations around the z axis after the pulse.

In previous studies, blockade strengths up to $B_{jk}/2\pi = 3$GHz have been considered [32, 38]. In Appendix A we provide a concrete example of how a blockade strength of $B_{jk}/2\pi = 180$MHz can be achieved in experiments, taking fully into account the dipole-dipole interaction between all relevant Rydberg states. The corresponding gate pulse errors for blockade strengths between 100MHz < $B_{jk}/2\pi < 3$GHz are calculated in Sec. 7. We note that the coupling between the electronic and the motional degree of freedom [58] is not treated explicitly in Eq. (1). However, we expect that the gate errors arising due to this coupling are mitigated by the short gate durations of the time-optimal pulses.

For $q \in \{0, 1\}^n$ we denote by $P_q$ the projector onto the space spanned by all states such that atom j is in state $|0\rangle$ iff $q_j = 0$. For example, at n = 2 we have $P_{00} = |00\rangle \langle 00|$, $P_{01} = |01\rangle \langle 01| + |0r\rangle \langle 0r|$, and $P_{11} = |11\rangle \langle 11| + |1r\rangle \langle 1r| + |r1\rangle \langle r1| + |rr\rangle \langle rr|$. (Here and in the following, a bra or a ket vector without a subscript means that this vector describes the state of all atoms, e.g. $|00\rangle =$
<figure><img src="image_1.png" /><figcaption>Figure 1: Time-optimal global CZ gate. a) Level scheme used for $n = 2$ atoms. Qubits are stored in electronic states of the atoms. The $|1\rangle_j$ state is coupled to the $|r\rangle_j$ state via a laser (red) with Rabi frequency $\Omega_j(t)$. Additionally there is a van der Waals interaction (blue) $B|rr\rangle_{12} \langle rr|$ if both atoms are in the Rydberg state. b) Smallest possible gate error $1-F$ found by GRAPE as a function of the dimensionless gate duration $T\Omega_{max}$. Points shown by blue circles are obtained assuming a global laser, while points shown by red squares are obtained by assuming individual addressability of the atoms. At all $T$ the optimization in started with independent, random initial conditions. A piecewise constant Ansatz with 99 pieces was used for GRAPE, doubling the number of pieces decreases the gate error by at most $3 \cdot 10^{-6}$, showing that 99 pieces are sufficient to capture the time-optimal pulse. c) Zoom-in at the gate errors, shown in log-scale, between $T\Omega_{max} = 7.5$ and $T\Omega_{max} = 7.7$. We start at $T\Omega_{max} = 7.7$ with a random initialization, the optimized pulse is then used as the initial guess at $T\Omega_{max} = 7.695$ and so on. The fit is $1-F = A(T_* - T)^2$ if $T < T_*$ and $1-F = 0$ if $T \ge T_*$ with $T_* = 7.612$ and $A = 0.0544$. Beyond the minimal pulse duration $T_*$ the gate error around $10^{-10}$ is given by the convergence condition of the optimization. d) Phase $\varphi(t)$ of the time-optimal laser pulse at $T = T_*$ as found by GRAPE (solid line) and fitted with the PMP (dashed line). Inset: Population of $|0r\rangle$ (blue, solid line) and $|W\rangle$ (orange, dashed line) over time.</figcaption></figure>

$|00\rangle_{12}$). Since the lasers only couple $|1\rangle_j$ to $|r\rangle_j$, $H$ is block-diagonal with respect to the $P_q$, i.e.

$$H = \sum_q H_q \qquad H_q = P_q H P_q. \qquad (2)$$

This block-diagonality allows for solving the time evolution of a computational basis state $|q\rangle$ by solving the Schrödinger equation for $H_q$ instead of $H$, which reduces the dimension of the relevant Hilbert space. This will simplify the use of GRAPE and PMP methods in Secs. 3 and 4.

### 2.1.2 Phase Gates and Gate Error

Because any quantum gate has to map a state in the computational subspace $C = \text{span}\{|q\rangle|q \in \{0,1\}^n\}$ back to $C$ and $H$ is block diagonal with respect to the $P_q$, the only quantum gates that can be implemented with Eq. (1) are phase gates.

Given laser pulses $\Omega_1, ..., \Omega_n$ of duration $T$, we denote by $U(t) = \tau \exp(-i \int_0^t H(t')dt')$ the time evolution operator. The pulse is said to implement a $(\xi_q)_{q \in \{0,1\}^n}$ phase gate if

$$U(T) |q\rangle = e^{i\xi_q} |q\rangle. \qquad (3)$$

Note that since $H_{0...0} = 0$ only phase gates with $\xi_{0...0} = 0$ can be implemented. A phase gate on $n = 2$ qubits is, up to single qubit gates, a CZ gate if $\xi_{11} - \xi_{01} - \xi_{10} = \pi$. A phase gate on $n = 3$ qubits is, up to single qubit gates, a C$_2$Z gate if $\xi_{111} - \xi_{001} - \xi_{010} - \xi_{100} = \pi$ and $\xi_{011} = \xi_{001} + \xi_{010}$ and all permutations of the second equation hold.

The averaged fidelity $F$ of a pulse aiming to implement a $(\xi_q)_q$ phase gate is defined by

$$F = \int_C d\psi |\langle\psi|U_0^\dagger U(T)|\psi\rangle|^2 \qquad (4)$$

where $U_0 = \sum_q e^{i\xi_q} |q\rangle\langle q|$ is the desired phase gate and the integral is taken over all normalized states in $C$ and with respect to the Haar measure on the unit sphere $S^{2n-1}$. The integral can be evaluated to [59]

$$F = \frac{1}{2^n(2^n+1)} \left( \left| \sum_q e^{-i\xi_q} \langle q|U(T)|q\rangle \right|^2 + \sum_q |\langle q|U(T)|q\rangle|^2 \right). \qquad (5)$$

Interestingly, the fidelity can be found by propagating a single (unnormalized) state – namely
$|\psi(0)\rangle = \sum_q |q\rangle$ - under $H(t)$, since by the bock-diagonality of $H$ it holds that $\langle q|U(T)|q\rangle = \langle q|\psi(T)\rangle$. The so called gate error $1-F$ is used in the following as a quality measure for a pulse aiming to implement a $(\xi_q)_q$ phase gate. In Sec. 3, GRAPE will be used to time-optimally steer $|\psi(0)\rangle$ to $U_0|\psi(0)\rangle$ by minimizing the gate error, which then provides a time-optimal pulse to implement the phase gate by considering the evolution of a single state only.

For the specific case of a CZ gate as a phase gate the Bell state fidelity is commonly used instead of the averaged fidelity [21, 22, 38, 58]. The Bell state fidelity measures the quality of a pulse by the fidelity between the state obtained by applying the pulse to $|++\rangle = (|00\rangle + |01\rangle + |10\rangle + |11\rangle)/2$ and the desired output state CZ $|++\rangle$. It is thus given by $F_{\text{bell}} = |\langle 00|\psi_{00}\rangle + \langle 01|\psi_{01}\rangle + \langle 10|\psi_{10}\rangle - \langle 11|\psi_{11}\rangle|^2/16$, which can be generalized to arbitrary phase gates as

$$F_{\text{bell}} = 4^{-n} \left| \sum_q e^{-i\xi_q} \langle q|U(T)|q\rangle \right|^2 \quad (6)$$

Comparing Eq. (5) and Eq. (6) shows that the averaged fidelity puts more emphasis on errors leading outside of the computational subspace than the Bell state fidelity. In this work we use the averaged fidelity. We expect that the same pulses can be obtained by optimizing the Bell state fidelity instead.

### 2.1.3 Symmetry Operations

The time-optimal pulse implementing a phase gate is not necessarily unique, as other pulses implementing the same or a related gate can be obtained by symmetry operations. Here, three of these symmetry operations are discussed: Phase shifts, time-reversal, complex conjugation.

Given a pulse $\Omega_1, ..., \Omega_n$ of duration $T$ implementing a $(\xi_q)_q$ phase gate for a blockade strength $B_{jk}$, several other pulses $\tilde{\Omega}_1, ..., \tilde{\Omega}_n$ with the same duration $T$ can be constructed that implement a $(\tilde{\xi}_q)_q$ phase gate using the following symmetry operations

a) Phase shifts: $\tilde{\Omega}_j(t) = e^{i\alpha_j}\Omega_j(t)$, $\tilde{B}_{jk} = B_{jk}$ and $\tilde{\xi}_q = \xi_q$, for constants $\alpha_1, ..., \alpha_n$. To prove this statement, we denote here and in the following by $\tilde{H}$ the Hamiltonian given by the pulses $\tilde{\Omega}_1, ..., \tilde{\Omega}_n$ and blockade

strengths $\tilde{B}_{ij}$ according to Eq. (1). Further, let $\tilde{U}(t)$ be the time evolution operator under $\tilde{H}$. Then with the basis change $V = \otimes_j(|0\rangle\langle 0| + |1\rangle\langle 1| + e^{-i\alpha_j}|r\rangle\langle r|)$ we have $\tilde{H} = VHV^\dagger$. Hence $\tilde{U}(T) = VU(T)V^\dagger$, thus also $\langle q|\tilde{U}(T)|q\rangle = \langle q|U(T)|q\rangle = e^{i\xi_q}$.

b) Time reversal: $\tilde{\Omega}_i(t) = \Omega_i(T - t)$, $\tilde{B}_{ij} = -B_{ij}$ and $\tilde{\xi}_q = -\xi_q$. To prove that, we first show that another symmetry is given by $\tilde{\Omega}_i(t) = -\Omega_i(T - t)$, $\tilde{B}_{ij} = -B_{ij}$ and $\tilde{\xi}_q = -\xi_q$. To see this, note that $\tilde{H}(t) = -H(T - t)$, so the time evolution operator under $\tilde{H}$ is $\tilde{U}(t) = U(T - t)U(T)^\dagger$. Hence $\langle q|\tilde{U}(T)|q\rangle = \langle q|U(T)^\dagger|q\rangle = e^{-i\xi_q}$. Together with the symmetry under phase shifts, symmetry under time reversal follows.

c) Complex conjugation: $\tilde{\Omega}_i(t) = \Omega_i(t)^*$, $\tilde{B}_{ij} = -B_{ij}$ and $\tilde{\xi}_q = -\xi_q$. To prove this, we note that joint time reversal and complex conjugation is a symmetry, given by $\tilde{\Omega}_i(t) = \Omega_i(T - t)^*$, $\tilde{B}_{ij} = B_{ij}$ and $\tilde{\xi}_q = \xi_q$. To see this, note that $\tilde{H}(t) = H(T - t)^*$, so the time-evolution operator under $\tilde{H}$ is $\tilde{U}(t) = U(T - t)^*(U(T)^*)^\dagger$. Hence $\langle q|\tilde{U}(T)|q\rangle = \langle q|(U(T)^*)^\dagger|q\rangle = e^{i\xi_q}$. Together with symmetry under time reversal, symmetry under complex conjugation follows.

These three symmetry operations show that when using numerical methods to find the time-optimal pulse for a gate, several solutions are to be expected. Firstly, two time-optimal pulses can differ by an arbitrary constant phase. This degree of freedom can be eliminated by restricting the discussion to pulses where $\Omega_j(0)$ is real and positive, as we will do from now on. Even with this restriction there are in general two different time-optimal pulses for a given phase gate, related by joint complex conjugation and time reversal. In the special case of $B = \infty$ and for phase gates where all $\xi_q$ are real, which is studied in Sec. 3, there are in general even four different time-optimal pulses, because also individual time reversal or complex conjugation give pulses implementing the same gate. As will be apparent in Sec. 3, sometimes, but not always, time-optimal pulses are invariant under joint time-reversal and complex conjugation, reducing the number of distinct time-optimal pulses to two.
### 2.1.4 Global Pulses

This work focuses primarily on so called global pulses, where $\Omega_1 = \Omega_2 = ... = \Omega_n =: \Omega$. In fact, except in Sec. 3.2, all considered pulses will be global. Global pulses can be implemented with just a single global laser addressing all atoms at the same time, no single-site addressability being needed. They are thus expected to be easier to realize experimentally. When working with global pulses it will be further assumed (except briefly in Sec. 6) that all $B_{jk}$ are equal to the same blockade strength $B$.

The theoretical treatment using global pulses is simplified compared to the general case in two different ways: Firstly, now it holds that $\langle q|\psi(T)\rangle = \langle q'|\psi(T)\rangle$ if $q$ and $q'$ have the same number of 1s. As a consequence, only phase gates with $\xi_q = \xi_{q'}$ can be implemented. For $n = 2$ the whole gate is then determined by the evolution of $|\psi(0)\rangle = |01\rangle + |11\rangle$ under $H_{01} + H_{11}$, and the fidelity is given by

$$F = \frac{1}{20} \left( |1 + 2a_{01} + a_{11}|^2 + 1 + 2|a_{01}|^2 + |a_{11}|^2 \right) \quad (7)$$

with $a_q = e^{-i\xi_q} \langle q|\psi(T)\rangle$. Similarly, for $n = 3$ the whole gate is determined by the evolution of $|\psi(0)\rangle = |001\rangle + |011\rangle + |111\rangle$ under $H_{001} + H_{011} + H_{111}$, with

$$F = \frac{1}{72} \left( |1 + 3a_{001} + 3a_{011} + a_{111}|^2 + 1 + 3|a_{001}|^2 + 3|a_{011}|^2 + |a_{111}|^2 \right) \quad (8)$$

The second simplification due to global pulses is a simplification of Hamiltonians $H_q$ if $q$ contains two or more 1s. For $n = 2$ we have

$$H_{11} = \frac{\Omega}{2} ( |11\rangle \langle 1r| + |11\rangle \langle r1| + |1r\rangle \langle rr| + |r1\rangle \langle rr| ) + \text{h.c.} + B |rr\rangle \langle rr| = \frac{\sqrt{2}\Omega}{2} ( |11\rangle \langle W| + |W\rangle \langle 11| ) + \text{h.c.} + B |rr\rangle \langle rr| \quad (9)$$

with $|W\rangle = (|1r\rangle + |r1\rangle)/\sqrt{2}$. The rank of $H_{11}$ thus reduces from generally 4 to 3 in the global case. For $n = 3$ we make the analogous simplification

$$H_{011} = |0\rangle \langle 0| \otimes H_{11}. \quad (10)$$

To simplify $H_{111}$, we note that the only states that can be accessed from $|111\rangle$ with a global pulse are $|W_1\rangle = (|11r\rangle + |1r1\rangle + |r11\rangle)/\sqrt{3}$, $|W_2\rangle = (|1rr\rangle + |r1r\rangle + |rr1\rangle)/\sqrt{3}$ and $|rrr\rangle$. It is thus sufficient to consider just the projection of $H_{111}$ onto the symmetric subspace span{$|111\rangle, |W_1\rangle, |W_2\rangle, |rrr\rangle$}, given by

$$H_{111}^{\text{sym}} = \frac{\sqrt{3}\Omega}{2} |111\rangle \langle W_1| + \Omega |W_1\rangle \langle W_2| + \frac{\sqrt{3}\Omega}{2} |W_2\rangle \langle 111| + \text{h.c.} + B |W_2\rangle \langle W_2| + 3B |rrr\rangle \langle rrr|. \quad (11)$$

This reduces the rank of $H_{111}$ from generally 8 to 4 in the global case.

This discussion concludes the presentation of the basic properties of pulses implementing phase gates, and of global pulses in particular. After a brief introduction to GRAPE and the PMP in the following subsection, the theoretical discussion from this section will be used in Secs. 3 and 4 to identify the time-optimal pulses for the CZ gate and the $C_2Z$ gate.

## 2.2 Quantum Optimal Control Methods

In this section we give a brief introduction to GRAPE and the PMP, the two quantum optimal control methods used in this work.

### 2.2.1 GRAPE Algorithm

Gradient Ascent Pulse Engineering (GRAPE) is a quantum optimal control technique based on gradient descent. It was originally developed to design pulse sequences for NMR spectroscopy, and has been used successfully to speed up quantum gates and to increase the fidelity of pulses in the presence of imperfections [60–63]. In the context of neutral atoms GRAPE has been used to design arbitrary SU(16) gates in the hyperfine levels of $^{133}$CS [54–56].

Given an initial state $|\psi(0)\rangle$, a pulse duration $T$ and a Hamiltonian $H$ depending on controls $u(t)$, GRAPE can be used to find the optimal controls $u(t)$, minimizing $J(|\psi(T)\rangle)$, for an arbitrary objective function $J$. For this, a piecewise constant Ansatz for $u(t)$ is made, i.e. $u(t) = u_j$ if $t \in [j\Delta t, (j+1)\Delta t]$ and $\Delta t = T/N$, with $N$ the number of pieces. Typically,
several hundreds of pieces are used. Minimizing $J(|\psi(T)\rangle)$ becomes an optimization problem over $u_0, ..., u_{N-1}$. GRAPE provides a fast way to calculate all derivatives $\partial J/\partial u_j$, which then allows for the efficient use of a gradient descent algorithm to find a local minimum of the cost function. In our implementation, we use the Broyden-Fletcher-Goldfarb-Shanno algorithm [64, 65] as the gradient descent method.

### 2.2.2 Pontryagin's Maximum Principle for Time-Optimal Control

Pontryagin's Maximum principle (PMP) [66–68] is an optimal control technique that has been used successfully to find time-optimal [61, 69–71] or robust [72] quantum gates, and to optimize variational quantum algorithms [73]. The PMP is an analytic principle that gives a set of necessary conditions that optimal pulses have to satisfy, thereby allowing to reduce the infinite dimensional control landscape to a low-dimensional space [72]. In contrast to GRAPE, which usually uses several hundreds of variational parameters, the PMP can therefore describe optimal pulses with just a handful of parameters. On the downside, the PMP does not provide a universal algorithm to find the parameters leading to the optimal pulse. In Sec. 4 we will combine GRAPE and the PMP to describe the pulses found by GRAPE using the PMP with just 4 parameters for the CZ and 6 parameters for the C₂Z gate.

In this section we give a formulation of the PMP and apply it to the problem of time-optimal pulses on Rydberg atoms. We start by formulating the PMP for the specific case of time-optimal control problems [67]: Suppose one wants to steer a real vector $x \in \mathbb{R}^n$ from an initial point $x_i$ to a final point $x_f$ using the differential equation $\dot{x} = f(x, u)$, where $u(t)$ describe the available controls (i.e., the Rabi frequencies $\Omega_1, ..., \Omega_n$ of the lasers in our case). Later, $x$ will correspond to the quantum state and $f$ will be given by Schrödinger's equation. We call a triplet $(T, x(\cdot), u(\cdot))$ a controlled trajectory if $x(0) = x_i$, $x(T) = x_f$ and $\dot{x}(t) = f(x(t), u(t))$. The PMP gives necessary conditions on the controlled trajectory $(T, x, u)$ that minimizes $\int_0^T g(x(t), u(t))dt$, where $g$ is an arbitrary cost function.

By focusing on time-optimal control problems, we can fix $g(x, u) = 1$. In this case, the PMP then states that for a given time-optimal controlled

trajectory $(T, x, u)$ there exist so-called costates $\lambda(\cdot)$ with values in $\mathbb{R}^n \setminus \{0\}$ such that at each time the following equations are satisfied

$$ \dot{\lambda} = - \langle \lambda, \nabla_x f(x, u) \rangle \quad (12) $$

and

$$ \langle \lambda(t), f(x(t), u(t)) \rangle = \sup_{u'} \langle \lambda(t), f(x(t), u') \rangle, \quad (13) $$

where $\langle \cdot, \cdot \rangle$ denotes the scalar product. Further, if the $x$ are restricted to a submanifold $M$ of $\mathbb{R}^n$, the $\lambda(t)$ can be restricted to the tangent space of $M$ at $x(t)$ [74]. If the supremum in Eq. (13) is only achieved by a single value $u'$ of the controls, the PMP allows to reduce the search for the time-optimal trajectory to the search over the initial costates $\lambda(0)$, which determine the full trajectory via Eqs. (12) and (13).

In this work, we directly apply the PMP to the Schrödinger equation $|\dot{\psi}\rangle = -iH(u)|\psi\rangle$. This is done by decomposing the state $|\psi\rangle = |\psi_R\rangle + i|\psi_I\rangle$ and the Hamiltonian $H = H_R + iH_I$ into real and imaginary parts [70, 71], which results in two real costates $|\chi_R\rangle$ and $|\chi_I\rangle$. By combining the two real costates with a complex one as $|\chi\rangle = |\chi_R\rangle + i|\chi_I\rangle$, Eq. (12) becomes the Schrödinger equation $|\dot{\chi}\rangle = -iH|\chi\rangle$ for the costates, while Eq. (13) reads [71]

$$ \begin{aligned} & \mathrm{Im}(\langle \chi(t) | H(u(t)) | \psi(t) \rangle) \\ & = \sup_{u'} \mathrm{Im}(\langle \chi(t) | H(u') | \psi(t) \rangle). \end{aligned} \quad (14) $$

The key point is that, as long as the supremum is achieved at a unique value of the controls, the initial states and costates completely determine the optimal trajectory.

Applied to time-optimal phase gates the PMP states that there are costates $|\chi_q(t)\rangle$ evolving under the Schrödinger equation $|\dot{\chi}_q\rangle = -iH_q|\chi_q\rangle$ such that

$$ \begin{aligned} & \mathrm{Im} \left( \sum_q \langle \chi_q(t) | H_q(u(t)) | \psi_q(t) \rangle \right) \\ & = \sup_{u'} \mathrm{Im} \left( \sum_q \langle \chi_q(t) | H_q(u') | \psi_q(t) \rangle \right) \end{aligned} \quad (15) $$

where the sum can be either over all $q \in \{0, 1\}^n$, or for global pulses with $n = 2$ or $n = 3$ only over $q \in \{01, 11\}$ or $q \in \{001, 011, 111\}$, respectively.

In Sec. 4 we will use the PMP to reproduce the results found by GRAPE by extracting the initial costates from the pulses found by GRAPE. This
allows us to describe the time-optimal pulses just through the initial costates, which correspond to 4 parameters for the CZ gate and 6 parameters for the C₂Z gate.

### 3 Time-Optimal Gates at Infinite Blockade Strength ($B = \infty$)

In this section we use GRAPE to find the time-optimal pulses in the limit $B = \infty$. In this limit states with more than one atom in the Rydberg state $|r\rangle$ cannot be populated, because the lasers coupling them to states with one atom in the Rydberg state are infinitely far detuned. We start by considering the CZ gate in Sec. 3.1 and find that the time-optimal global pulse is approximately 10% faster than the pulse of Ref. [21]. In Sec. 3.2 we then show that allowing for individual addressability for the atoms brings no speedup for the CZ gate, which is one of the main results of the work. Finally, in Sec. 3.3 we find the time-optimal global pulse for the three-qubit C₂Z gate, and a second, slightly slower global pulse that also implements a C₂Z gate. All found pulses are smooth functions of the parameters.

#### 3.1 Global CZ Gate

In this section we apply GRAPE to find the time-optimal global pulse that implements a CZ gate in the setup of Fig. 1(a) with $B = \infty$. We say that a pulse implements a CZ gate if it implements a $(\xi_q)_q$ phase gate with $\xi_{00} = 0$, $\xi_{01} = \xi_{10} = \theta$ and $\xi_{11} = 2\theta + \pi$ for some single qubit phase $\theta$. By additional single qubit gates compensating the phase of $\theta$ gained by $|01\rangle$ and $|10\rangle$, a CZ gate with $|xy\rangle \mapsto (-1)^{xy}|xy\rangle$ can be achieved.

As discussed in Sec. 2.1, the action of a global pulse is completely described by the evolution of $|\psi(0)\rangle = |10\rangle + |11\rangle$ under the Hamiltonian

$$H_{01} + H_{11} = \begin{pmatrix} 0 & \frac{\Omega}{2} & 0 & 0 \\ \frac{\Omega^*}{2} & 0 & 0 & 0 \\ 0 & 0 & 0 & \frac{\sqrt{2}\Omega}{2} \\ 0 & 0 & \frac{\sqrt{2}\Omega^*}{2} & 0 \end{pmatrix} \quad (16)$$

where the matrix representation is in the $|01\rangle$, $|0r\rangle$, $|11\rangle$, $|W\rangle$ basis. Since the $|rr\rangle$ state can never be populated, it is omitted from the description.

The time-optimal pulse must have maximal amplitude $|\Omega(t)| = \Omega_{max}$ for all $t$, because if at

some time it had sub-maximal amplitude, the pulse could be sped up by simply increasing $\Omega$ and shortening the pulse accordingly. Since the Hamiltonian is proportional to $|\Omega|$, this operation only speeds up the gate, but does not change the trajectory of $|\psi(t)\rangle$. Therefore, the Ansatz $\Omega(t) = \Omega_{max}e^{i\varphi(t)}$ is made. To find the time-optimal $\varphi(t)$ we start by fixing a pulse duration $T$ and use GRAPE to minimize the gate error $1 - F(|\psi(T)\rangle, \theta)$, as given in Eq. (7), over the laser phase $\varphi(t)$ and the single qubit rotation angle $\theta$. GRAPE is initialized with a random guess for $\varphi(t)$ and $\theta$.

The minimal gate error $1 - F$ computed by GRAPE for for dimensionless pulse durations $T\Omega_{max}$ between 0 and 10 is shown by blue circles in Fig. 1b). At $T = 0$ the gate error is 0.4, corresponding to the identity gate with $\theta = \pi/2$. As $T$ is increased, the minimal gate error drops and reaches 0 around $T\Omega_{max} \sim 7.6$. We find that for $T\Omega_{max} \lesssim 2$ GRAPE can converge to two different values of $1 - F$, one of them being the sub-optimal gate error 0.4 – corresponding to the identity. In the interesting range $T\Omega_{max} > 2$, however, a unique value of $1 - F$ is found for all runs of the algorithm. To precisely determine the duration $T_*$ of the time-optimal pulse we plot the gate errors in the range $7.5 \le T\Omega_{max} \le 7.7$ in log scale in Fig. 1(c). The gate errors drop until they are of order of $1 - F \lesssim 10^{-10}$, which corresponds to the chosen convergence criterion of the optimization. We fit the gate errors with

$$1 - F = \begin{cases} A(T_* - T)^2 & \text{if } T < T_* \\ 0 & \text{if } T \ge T_* \end{cases} \quad (17)$$

and extract the time-optimal pulse duration $T_*\Omega_{max} = 7.612$ for the CZ gate. The form of the fitting function is motivated by the observation that $1 - F$ should vanish in the first order of $T - T_*$, otherwise negative gate errors would be possible for $T > T_*$. The resulting time-optimal pulse is about 10% faster than the pulse in Ref. [21] with $T\Omega_{max} = 8.58536$, showing a relevant speedup of the gate. Our results also show that the duration of the pulse in Ref. [21] is already quite close to the achievable minimum.

The laser phase $\varphi(t)$ that leads to the time-optimal pulse as obtained by the GRAPE algorithm is shown as a solid blue line in Fig. 1(d) as a function of the dimensionless time $t\Omega_{max}$. The shape of $\varphi$ is the piecewise constant approxima-
tion of a smooth curve, which resembles, but is not identical to, a sine wave with a linear offset: It first increases to $\varphi \approx 1.0$ (at $t\Omega_{\text{max}} \approx 2.4$), then decreases to $\varphi \approx -0.4$ (at $t\Omega_{\text{max}} \approx 5.2$), and finally increases again to $\varphi = 0.7$. We show below in Sec. 4 using the PMP that the piecewise constant curve found by GRAPE is in fact the discrete approximation of a “true” time-optimal pulse, which is smooth [dashed black curve in Fig. 1(d)]. Note that our pulse is significantly simpler, and thus easier to implement, than the pulses found in Refs. [50, 51], which also apply optimal control techniques. Our pulse is also more than three times faster than the pulse found in Ref. [24] by optimizing the amplitude of $\Omega$ while assuming a fixed laser detuning. We attribute this to our approach of including the laser phase in the optimization, and to our use of the simplest possible model of the system, which allows to identify the fundamentally time-optimal pulse regardless of experimental imperfections.

As discussed in Sec. 2.1.3 above, a pulse implementing a CZ gate can also be obtained by complex conjugation and/or time-reversal of the pulse shown in Fig. 1(d). No sign flip of $B$ is necessary during this symmetry operations, because a pulse implementing a certain phase gate at $B = \infty$ implements the same phase gate at $B = -\infty$. When applying complex conjugation or time reversal, the single qubit rotation angle needs to be changed to $-\theta$. For the time-optimal global pulse for the CZ gate, complex conjugation and time reversal coincide, so there are only two time-optimal global pulses: The pulse in Fig. 1(d) and the complex conjugated pulse.

The occupation probabilities of $|0r\rangle$ (or $|r0\rangle$) – when starting in $|01\rangle$ (or $|10\rangle$) – and $|W\rangle$ – when starting in $|11\rangle$ – as a function of $t\Omega_{\text{max}}$ are shown in the Inset of Fig. 1(d) as a blue solid curve and an orange dashed curve, respectively. The figure shows that the populations of $|0r\rangle$ (and $|r0\rangle$) and $|W\rangle$ have a maximum and a local minimum at $T_*\Omega_{\text{max}}/2$, respectively. This is due to the fact that since the coupling between $|11\rangle$ and $|W\rangle$ is $\sqrt{2}$ times stronger than the coupling between $|01\rangle$ and $|0r\rangle$ the population of $|W\rangle$ changes with a faster rate than that of $|0r\rangle$.

## 3.2 CZ Gate with single-site addressability

A natural question is whether the pulse from the previous section can be sped up by allowing

single-site addressability of the atoms. Here we find that this is not the case.

In order to identify the time-optimal non-global pulse, we proceed just like for global pulses above, except that now two independent lasers described by complex $\Omega_1(t)$ and $\Omega_2(t)$ are considered: We thus proceed by minimizing the gate error [see Eq. (5)] over both phase and amplitude of $\Omega_1$ and $\Omega_2$ (not shown). Now the evolution of $|10\rangle$ could in principle be different from that of $|01\rangle$ and the state $|11\rangle$ could evolve to arbitrary states in the $\{|11\rangle, |1r\rangle, |r1\rangle\}$ subspace. However, as shown by the red squares in Fig. 1(b)c), the minimal gate error is not reduced when allowing for non-global instead of global pulses. Hence also when allowing for single-site addressability, the time-optimal pulse satisfies $\Omega_1(t) = \Omega_2(t) = \Omega(t)$, where $\Omega(t)$ describes the time-optimal global pulse found above. Single-site addressability thus brings no speed advantage for the implementation of a CZ gate. This is one of the main results of the paper.

## 3.3 Global $C_2Z$ Gate

For the global three-qubit $C_2Z$ gate we follow a similar protocol as for the 2-qubit CZ gate. The goal is to implement a phase gate with $\xi_{001} = \theta$, $\xi_{011} = 2\theta$ and $\xi_{111} = 3\theta + \pi$. Up to single qubit rotations of $\theta$ around the z-axis, this implements the gate $|xyz\rangle \mapsto (-1)^{xyz}|xyz\rangle$. We use GRAPE to minimize the gate error $1-F(\psi(T), \theta)$ with the fidelity given in Eq. (8), the initial state $|\psi(0)\rangle = |001\rangle + |011\rangle + |111\rangle$, and the Hamiltonian $H_{001} + H_{011} + H_{111}$, given as a matrix by

$$ \begin{pmatrix} 0 & \frac{\Omega}{2} & 0 & 0 & 0 & 0 \\ \frac{\Omega^*}{2} & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & \frac{\sqrt{2}\Omega}{2} & 0 & 0 \\ 0 & 0 & \frac{\sqrt{2}\Omega}{2} & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & \frac{\sqrt{3}\Omega}{2} \\ 0 & 0 & 0 & 0 & \frac{\sqrt{3}\Omega^*}{2} & 0 \end{pmatrix} \quad (18) $$

in the $|001\rangle, |00r\rangle, |011\rangle, |0\rangle \otimes |W\rangle, |111\rangle, |W_1\rangle$ basis.

Figure 2(a) shows the gate error $1-F$ as a function of the dimensionless pulse duration $T\Omega_{\text{max}}$ in the range $0 \le T\Omega_{\text{max}} \le 20$, as obtained for the $C_2Z$ gate using GRAPE. In the figure, the size of the blue dots is proportional to the number of times that each gate error was obtained in the given set of GRAPE runs. The figure shows that the lowest gate errors form a smooth curve
<figure><img src="image_2.png" /><figcaption>Figure 2: Time-optimal global C₂Z gate. a) Smallest possible gate error $1-F$ found by GRAPE at different values of the dimensionless pulse duration $T\Omega_{max}$. A piecewise constant Ansatz with 399 pieces was used, and at each $T$ GRAPE was started 10 times with a random initialization. The size of the markers is proportional to the number of times that the gate error was within a distance $10^{-5}$ to the position of the marker. b) Zoom-in at the gate errors between $T\Omega_{max} = 16.3$ and $T\Omega_{max} = 16.6$. There are two qualitatively different pulses: Pulse 1 (red, upward pointing triangles) has a duration $T_{*}^{(1)}\Omega_{max} = 16.43$, Pulse 2 (turquoise, downward pointing triangles) $T_{*}^{(2)}\Omega_{max} = 16.53$. c) Phase $\varphi(t)$ of Pulse 1 and Pulse 2 at their respective $T_{*}$. Solid lines show the pulse found by GRAPE, dashed lines the fit with the PMP. d)(e)) Population of the states $|00r\rangle$ (blue, solid line), $|0\rangle \otimes |W\rangle$ (orange, dashed line) and $|W_1\rangle$ (green, dash-dotted line) during pulse 1(2).</figcaption></figure>

made of larger dots – corresponding to more frequent convergences of the algorithm – with several plateaus. Minimal gate errors with values $1-F \lesssim 10^{-12}$ are reached around $T\Omega_{max} \simeq 16.5$. In order to precisely determine the optimal $T_*$, Fig. 2(b) shows a zoom-in of the results of panel (a) in the interesting range $16.3 \le T\Omega_{max} \le 16.6$, in log-scale. The figure shows the existence of two distinct curves with very similar $T_*$: The first curve, called “Pulse 1” from now on, has a $T_*^{(1)}\Omega_{max} = 16.43$, while the second one, called “Pulse 2”, has a $T_*^{(2)}\Omega_{max} = 16.53$. Both pulses are faster than the original non-global implementation with $T\Omega_{max} = 6\pi$ [20]. The two pulses result from rather different $\varphi(t)$, which are shown in Fig. 2(c): The laser phase for Pulse 1 oscillates from 0 to -2.6 and then back to about 2.3, while the phase of Pulse 2 is monotonically decreasing from 0 to approximately -9.0. Again equivalent pulses can be obtained by time-reversal and complex conjugation of Pulse 1 and Pulse 2. For Pulse 1 this leads to four different pulses, for Pulse 2 only to two different pulses, since time-reversal and complex conjugation coincide. Figures 2(d) and (e) show the population during Pulse 1 and Pulse 2, respectively, of $|00r\rangle$, (blue solid line), $|0\rangle \otimes |W\rangle = (|01r\rangle + |0r1\rangle)/\sqrt{2}$ (orange dashed line), and $|W_1\rangle = (|11r\rangle + |1r1\rangle + |r11\rangle)/\sqrt{3}$ (green dash-dotted line). The three types of populations are found to oscillate approximately with the frequencies $\Omega_{max}$, $\sqrt{2}\Omega_{max}$ and $\sqrt{3}\Omega_{max}$ that are expected if the laser phase is kept constant. Populations in Pulse 2 are further found to be symmetric with respect to time-reversal.

This concludes Sec. 3, in which GRAPE was applied to find the time-optimal global pulses for the CZ and the C₂Z gate. For both gates the time-optimal pulse is faster than the traditional non-global pulse, for the CZ gate additionally ~10% faster than the pulse in Ref. [21]. All pulses are, up to the discretization introduced by GRAPE, simple and smooth pulses. For the CZ gate we additionally found that allowing for individual addressability of the atoms brings no speedup of the gate.

## 4 Semi-Analytical Description of the Pulses using the PMP

The pulses found by GRAPE are piecewise constant functions obtained using 99 and 399 param-
<table><caption>Table 1: Initial costates, gate durations and gate errors for the CZ gate and for both pulses of the C₂Z gate</caption><thead><tr><th></th><th>CZ Pulse</th><th>C<sub>2</sub>Z Pulse 1</th><th>C<sub>2</sub>Z Pulse 2</th></tr></thead><tbody><tr><td>&lt;0|&chi;<sub>1</sub>(0)&gt;</td><td>0.11212523i</td><td>0.23064809i</td><td>0.18360502i</td></tr><tr><td>&lt;1|&chi;<sub>1</sub>(0)&gt;</td><td>-0.70546052<br>-0.21533291i</td><td>0.06339133<br>+0.42859775i</td><td>0.11567664<br>+0.46913157i</td></tr><tr><td>&lt;0|&chi;<sub>2</sub>(0)&gt;</td><td>-0.06056999i</td><td>-0.55488096i</td><td>-0.54588492i</td></tr><tr><td>&lt;1|&chi;<sub>2</sub>(0)&gt;</td><td>0.51526141<br>-0.41739917i</td><td>0.18981665<br>-0.03941303i</td><td>0.14734489<br>-0.04548695i</td></tr><tr><td>&lt;0|&chi;<sub>3</sub>(0)&gt;</td><td></td><td>0.29436027i</td><td>0.30789524i</td></tr><tr><td>&lt;1|&chi;<sub>3</sub>(0)&gt;</td><td></td><td>-0.19206657<br>-0.53858404i</td><td>-0.18760792<br>-0.53014859i</td></tr><tr><td>T&Omega;<sub>max</sub></td><td>7.6114828</td><td>16.426439</td><td>16.532211</td></tr><tr><td>1 - F</td><td>3.1 &middot; 10<sup>-10</sup></td><td>3.1 &middot; 10<sup>-7</sup></td><td>2.8 &middot; 10<sup>-6</sup></td></tr></tbody></table>

eters for the CZ and the C₂Z gate, respectively. In the following, the PMP is used to demonstrate that the latter functions are in fact discrete approximations of smooth pulses that are solutions of ordinary differential equations with just 4 and 6 parameters for the CZ and the C₂Z gates, respectively.

In order to apply the PMP to the time-optimal global CZ and C₂Z gates at $B = \infty$, the maximization condition (15) has to be formulated for $H_{01}$, $H_{11}$ and $H_{001}$, $H_{011}$, $H_{111}$ as a function of the laser phase $\varphi$. The Hamiltonians are, in the appropriate basis,

$$H_q = \frac{\Omega_{\max}}{2} \sqrt{m_q} (\cos \varphi \sigma_x - \sin \varphi \sigma_y) \quad (19)$$

with $m_q = \sum_i q_i$ the number of 1s in $q$ and $\sigma_x$ and $\sigma_y$ the Pauli X- and Y-matrices, respectively. The maximization condition (15) is

$$\varphi(t) = \underset{\varphi'}{\operatorname{argmax}} \sum_q \operatorname{Im}(\langle\chi_q(t)|H_q(\varphi')|\psi_q(t)\rangle). \quad (20)$$

with $q$ summed over {01, 11} for the CZ gate and {001, 011, 111} for the C₂Z gate. Note that contrary to many other applications of the PMP to quantum optimal control [61, 69–71, 73], in our case the Hamiltonian depends on the control $\varphi$ in a non-linear way. Therefore, the optimal control is not given by a so-called “bang-bang” pulse, but by a continuous function $\varphi(t)$.

The maximization in Eq. (20) then leads to

$$\cos \varphi = A/\sqrt{A^2 + B^2} \qquad \sin \varphi = -B/\sqrt{A^2 + B^2} \quad (21)$$

with

$$A = \operatorname{Im} \left( \sum_q \sqrt{m_q} \langle \chi_q | \sigma_x | \psi_q \rangle \right) \quad (22)$$

$$B = \operatorname{Im} \left( \sum_q \sqrt{m_q} \langle \chi_q | \sigma_y | \psi_q \rangle \right). \quad (23)$$

Given the initial costates $|\chi_q(0)\rangle$, the whole pulse can be determined from Eq. (21) and the Schrödinger equation for states and costates, as long as the quantity $A^2 + B^2$ does not vanish during the pulse. The time-optimal pulse is now found by minimizing the gate error calculated from the final states $|\psi_q(T)\rangle$ over the initial costates $|\chi_q(0)\rangle$ and the pulse duration $T$. This reduces the control landscape from an infinite dimensional space to a 4-dimensional space for the CZ gate ($|\chi_{01}\rangle$ and $|\chi_{11}\rangle$ are both two-dimensional vectors) and a 6-dimensional space for the C₂Z gate. Since the $|\psi_q\rangle$ are constrained on the $\langle\psi_q|\psi_q\rangle = 1$ manifold, the costates can be restricted to the tangent space of this manifold, so they can be chosen such that $\operatorname{Re}(\langle\chi_q(t)|\psi_q(t)\rangle) = 0$ for all $t$.

In Ref. [72], optimal pulses for the robust control of a two-level system haven been successfully obtained by the use of a gradient descent algorithm in the reduced control landscape. In our case however, such an optimization proved to be unsuccessful without a good initial guess for the $|\chi_q(0)\rangle$, because small variations in the initial costates can lead to large variations in the final states. Therefore, we introduce the following new procedure to obtain a good initial guess of the $|\chi_q(0)\rangle$ based on the pulses found by GRAPE:
Denote by $U_q(t)$ the time evolution operator under $H_q$, so that $|\chi_q(t)\rangle = U_q(t)|\chi_q(0)\rangle$. Equation (20) then implies that for all $t$

$$0 = \frac{d}{d\varphi} \sum_q \mathrm{Im}(\langle\chi_q(t)|H_q(\varphi)|\psi_q(t)\rangle) \quad (24) \\ = \sum_q \mathrm{Im}(\langle\chi_q(0)|\alpha_q(t)\rangle)$$

with

$$|\alpha_q(t)\rangle = U_q^\dagger(t) \frac{d}{d\varphi} H_q(\varphi(t)) |\psi_q(t)\rangle. \quad (25)$$

GRAPE gives the states, controls and time-evolution operators at discrete times $t_1, ..., t_N$. Letting $A_q = \sum_j |j\rangle \langle\alpha_q(t_j)|$ we obtain

$$\sum_q \mathrm{Im}(A_q |\chi_k(0)\rangle) = 0. \quad (26)$$

Now the real and imaginary parts of all $A_q$ are combined into a single real matrix $A$, and the real and imaginary parts of all $|\chi_q\rangle$ into a single real vector $v$, such that Eq. (26) just becomes $Av = 0$. To find approximate, nonzero solutions to this linear equation $A$ is decomposed as $A = \sum_i \lambda_i w_i v_i^T$. An approximate solution to $Av = 0$, and thus a good initial guess for $|\chi_q(0)\rangle$, is given either by $v_i$ or by $-v_i$, where $v_i$ is the singular vector with the smallest, approximately zero, singular value $\lambda_i$.

Using this approximate solution as a starting point of the minimization of the gate error over the initial costates $|\chi_k(0)\rangle$ and the pulse duration $T$ using the Powell method [65] the optimized values in Table 1 are obtained. Using Eq. (20) together with the Schrödinger equation for the states and costates then allows one to reconstruct the pulses found by GRAPE directly from the initial costates. We find that these pulses reconstructed by the PMP are in excellent agreement with the pulses found by GRAPE, as can be seen from Fig. 1(d) and Fig. 2(c). These results demonstrate that the pulses found by GRAPE are simply discrete approximations of smooth time-optimal pulses, which can be obtained by just a few variational parameters. This procedure allows for immediate reproducibility of the time-optimal pulses using the few parameters in Table 1 and Eq. (20) together with the Schrödinger equation for the states and costates only.

<figure><img src="image_3.png" /><figcaption>Figure 3: Phase of the $C_2$Z pulse at $T\Omega_{max} = 16.74$ where the atoms spend the smallest average time $T_R$ in the Rydberg state. Inset: Smallest possible value of $T_R\Omega_{max}$ for different values of the dimensionless gate duration $T\Omega_{max}$. The duration $T\Omega_{max} = 16.74$ of the shown pulse is marked by the red arrow.</figcaption></figure>

## 5 Minimizing the Decay of the Rydberg State

In the following, we focus on obtaining global pulses for the CZ and $C_2$Z gates that achieve the highest fidelity in the presence of a finite lifetime of the Rydberg state. For this a non-Hermitian term $-\frac{i}{2}\Gamma|r\rangle\langle r|$ is added to the Hamiltonian of each atom, where $\Gamma$ is the decay rate of the chosen Rydberg state $|r\rangle$. This term describes the loss of population from the $\{|0\rangle, |1\rangle, |r\rangle\}$ subspace of the Hilbert space and thus slightly overestimates the gate error, since it neglects the fact that spontaneous decay of the Rydberg state may repopulate the $|0\rangle$ or $|1\rangle$ state [35]. As shown in Appendix B, the gate error of a pulse that leads to an exact CZ or $C_2$Z in the decay-free case is now given by $1 - F = \Gamma T_R$ for $\Gamma T_R \ll 1$. Here, $T_R$ is the average time that the atoms spend in the Rydberg state, as given by

$$T_R = \frac{1}{2^n} \sum_{q \in \{0,1\}^n} \int_0^T \langle \psi_q(t) | \Pi_r | \psi_q(t) \rangle \mathrm{d}t. \quad (27)$$

where $|\psi_q(t)\rangle = U(t)|q\rangle$ and $\Pi_r$ is the projector onto the subspace with one atom in the Rydberg state. Our goal is to minimize $T_R$ over all pulses that implement a CZ or $C_2$Z gate with fidelity 1 in the decay-free case. For this, $\Gamma \ll \Omega_{max}$ is chosen and $1 - F$ minimized using GRAPE. Because $\Gamma \ll \Omega_{max}$ the resulting pulses still have a fidelity $F \approx 1$ in the decay-free case. Because $\Gamma > 0$ the resulting pulses minimize $T_R$ over all pulses with fidelity 1 in the decay free case.

To use GRAPE we fix $\Gamma/\Omega_{max} = 10^{-4}$, but we stress that the resulting pulse minimizes $T_R$
for any $\Gamma$ and thus minimizes the gate error as long as $\Gamma T_R \ll 1$. For the CZ gate we then find that the time-optimal pulse is essentially indistinguishable from the pulse with the lowest $T_R$: $T_R \Omega_{\text{max}}$ takes the values $T_R \Omega_{\text{max}} = 2.957$ and $T_R \Omega_{\text{max}} = 2.947$ for the former and the latter cases, respectively, where the latter is evaluated for a comparatively long pulse duration $T \Omega_{\text{max}} = 30$. On the contrary, for the $C_2$Z gate the minimal $T_R$ is improved with respect to both Pulses 1 and 2 found above (which have $T_R \Omega_{\text{max}} = 6.90$ and $T_R \Omega_{\text{max}} = 7.52$, respectively). This is shown in the Inset of Fig. 3, which displays $T_R$ for the pulses leading to the lowest gate errors in the range $16.5 < T \Omega_{\text{max}} < 17.5$: $T_R$ is found to sharply decrease to a value $T_R \Omega_{\text{max}} \approx 6.431$ at $T \Omega_{\text{max}} \approx 16.74$ and then to stay constant for larger $T$. We have checked that this behavior persists for comparatively long times of at least $T \Omega_{\text{max}} = 30$ – twice as long as the time-optimal pulse. The pulse improves $T_R$ by about 7% and 14% over the $T_R$ of the time-optimal Pulses 1 and 2, respectively, clearly demonstrating that in general the time-optimal pulse is not identical to the pulse with the smallest average time in the Rydberg state for the three-qubit $C_2$Z gate. Consistently, Fig. 3 shows that the phase of the pulse that minimizes $T_R$ at $T \Omega_{\text{max}} = 16.74$ is qualitatively different from that of both time-optimal Pulses 1 and 2 found above (see Fig. 2(c)).

These results demonstrate that GRAPE can also be used to find the pulse minimizing the time spent in the Rydberg state, instead of the total pulse duration. While for the CZ gate the time-optimal pulse coincides with the pulse minimizing $T_R$, for the $C_2$Z gate a slight reduction of $T_R$ compared to the time-optimal pulse can be achieved.

# 6 Gates at Finite Blockade Strength

The assumption $B = \infty$ can never be achieved in a real experiment, so it is a natural question to ask how pulses can operate at finite $B$. There are at least two approaches to this problem: In the first approach, treated in Sec. 6.1, $B$ is assumed to take a fixed value, and global pulses are optimized to achieve fidelity $F = 1$ only at this specific value of $B$. However, in many experiments $B$ is not known with high precision, because it depends on the distance between the atoms, which can fluctuate due to thermal motion.

For this reason the second approach, treated in Sec. 6.2, aims to find global pulses that achieve fidelity $F = 1$ only at $B = \infty$, but are affected as weakly as possible as $B$ is decreased.

## 6.1 Fixed Blockade Strength

In the first approach, treated in this section, a finite $B$ is fixed and GRAPE is used to find the time-optimal pulses. We begin by discussing CZ gate, where the time-optimal pulses at a finite $B$ are close to the time-optimal pulses at $B = \infty$. Then we find that for the $C_2$Z gate there is in fact a pulse at finite $B$ that is much faster than the time-optimal pulse at $B = \infty$. This pulse significantly populates states with two atoms in the Rydberg state and thus accesses parts of the Hilbert space that are inaccessible in the $B = \infty$ limit. Finally we show that also for the $C_2$Z gate pulses with fidelity 1 at finite $B$ can be found that are close to the time-optimal $B = \infty$ pulses. As a way of example, we take $B = 10 \Omega_{\text{max}}$ for the rest of this subsection.

### 6.1.1 Time-Optimal CZ Gate

Just like in Sec. 3.1 for $B = \infty$, we now use GRAPE at a finite interaction strength $B = 10 \Omega_{\text{max}}$. The only modification is that now the $|rr\rangle$ state has to be included, so the pulse is completely described by the evolution of $|\psi(0)\rangle = |10\rangle + |11\rangle$ under the Hamiltonian

$$H_{01} + H_{11} = \begin{pmatrix} 0 & \frac{\Omega}{2} & 0 & 0 & 0 \\ \frac{\Omega^*}{2} & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & \frac{\sqrt{2\Omega}}{2} & 0 \\ 0 & 0 & \frac{\sqrt{2\Omega^*}}{2} & 0 & \frac{\sqrt{2\Omega}}{2} \\ 0 & 0 & 0 & \frac{\sqrt{2\Omega^*}}{2} & B \end{pmatrix} \quad (28)$$

in the $|01\rangle, |0r\rangle, |11\rangle, |W\rangle, |rr\rangle$ basis. We find two different pulses with similar pulse duration: The first pulse, “Pulse A”, with $T_*^{(A)} \Omega_{\text{max}} = 7.574$ qualitatively resembles the $B = \infty$ pulse from Fig. 1(d), while the second, slightly longer, “Pulse B” with $T_*^{(B)} \Omega_{\text{max}} = 7.639$ qualitatively resembles the complex conjugated version of the pulse from Fig. 1(d). Pulse A and Pulse B are shown together with the two time-optimal pulses in the $B = \infty$ case in Fig. 4a. Pulse A is slightly faster, pulse B slightly slower than the time-optimal pulse for $B = \infty$. Both pulses achieve a gate
<figure><img src="image_4.png" /><figcaption>Figure 4: Pulses with gate error $1 - F < 10^{-9}$ at a finite blockade strength $B = 10\Omega_{max}$ (in color) and at $B = \infty$ for comparison (grey). a) For the CZ gate. Pulse A has duration $T_A\Omega_{max} = 7.58$, pulse B $T_B\Omega_{max} = 7.64$. b) For the C₂Z gate with pulses close to Pulse 1. $T_C\Omega_{max} = 16.4$, $T_D\Omega_{max} = 16.6$. c) For the C₂Z gate with pulses close to Pulse 2. $T_E\Omega_{max} = 17.1$, $T_F\Omega_{max} = 16.2$.</figcaption></figure>

<figure><img src="image_5.png" /><figcaption>Figure 5: Pulse for a C₂Z gate with duration $T\Omega_{max} = 10$ and gate error $1 - F = 2.5 \cdot 10^{-10}$ at $B = 10\Omega_{max}$. a) Laser phase $\varphi$ over time. b) Detuning $\Delta = \frac{d\varphi}{dt}$. The detuning is of the order of B. c) Population of $|0rr\rangle$ and $|1rr\rangle$ shown as blue solid line and orange dashed line, respectively. Both states with two atoms in the Rydberg state get significantly populated.</figcaption></figure>

error below $10^{-10}$, showing that even for a finite $B$ it is possible to implement an exact CZ gate.

### 6.1.2 Speeding up the C₂Z gate

For the C₂Z gate the effects of a finite blockade strength depend on the positioning of the atoms relative to each other. Here we assume that the blockade strength $B$ is the same for any pair of atoms. In the case of an isotropic blockade strength this can be achieved by placing the atoms on the vertices of an equilateral triangle, the so-called triangular arrangement [75]. Another possibility is the so-called linear arrangement, in which the three atoms are arranged in

a one-dimensional chain, so the distance between the two outer atoms is twice the distance between an outer and the inner atom. We discuss this linear arrangement briefly at the end of this section and in Appendix C.

When applying GRAPE to find the time-optimal pulse for a C₂Z gate in the triangular arrangement at a finite $B$, pulses with a duration significantly below the duration of the time-optimal pulse in the $B = \infty$ case are found. As an example, at $B = 10\Omega_{max}$ there exists a pulse with duration $T\Omega_{max} = 10$ and gate error $1-F = 3 \cdot 10^{-10}$, which is shown in Fig. 5(a). The phase $\varphi(t)$ of this pulse varies rapidly with $t$, such that the detuning $\Delta = d\varphi/dt$ is of the order of $B$ [Fig. 5(b)]. This suggests that this pulse operates in the so-called Rydberg antiblockade regime [76] where states with two atoms in the Rydberg state can become significantly populated. This is confirmed by the populations of $|0rr\rangle$ and $|1rr\rangle$, that are shown as a function of $t$ in Fig. 5(c) as blue solid line and orange dashed line, respectively. The pulse therefore speeds up the C₂Z gate by using states with two atoms in the Rydberg state, which is not possible in the $B = \infty$ case. Naturally one would expect such a pulse to be very sensitive to variations of $B$, and indeed when decreasing $B$ by just 10% the gate error increases drastically to $1-F = 0.59$. At a finite $B$ it is therefore possible to significantly speed up the C₂Z gate at the cost of a high sensitivity to variations in the blockade strength. Since the blockade strength depends strongly on the distance of the atoms, this pulse is only feasible if the distance between the atoms is known with high precision.
### 6.1.3 Pulses for the C₂Z Gate resembling the $B = \infty$ pulses

In order to find pulses for the C₂Z gate that more are robust against variations of the blockade strength, we now determine pulses at finite $B$ that are close to the time-optimal $B = \infty$ pulses. For this, we start by the approximation that the effects of a finite $B$ can be completely captured by an ac-Stark shift of the states with one atom in the Rydberg state. This approximation is justified in in Sec. 6.2 and in more detail in Appendix D through a time dependent Schrieffer-Wolff transformation. Since in this approximation the Hamiltonians are close to the Hamiltonians in the $B = \infty$ case, we also expect the time-optimal pulses to be close to Pulse 1 and Pulse 2. With this approximation, $H_{011}$ and $H_{111}$ are given by

$$H_{011} = |0\rangle\langle 0| \otimes \left( \frac{\sqrt{2}\Omega}{2} |11\rangle\langle W| + \text{h.c.} \right) - \frac{|\Omega|^2}{2B} |W\rangle\langle W| \quad (29)$$

and

$$H_{111} = \frac{\sqrt{3}\Omega}{2} |111\rangle\langle W_1| + \text{h.c.} - \frac{|\Omega|^2}{B} |W_1\rangle\langle W_1| \quad (30)$$

GRAPE is used to find the time-optimal pulses under this approximation. These pulses are then used as initial guesses for GRAPE with the exact Hamiltonian. Through this procedure, pulses with fidelity $F = 1$ at finite $B$ resembling the $B = \infty$ pulses are found. Pulses C and D, close to Pulse 1 and its complex conjugated version, respectively, are shown Fig. 5(b). Their durations are $T^{(C)}\Omega_{\max} = 16.4$ and $T^{(D)}\Omega_{\max} = 16.6$. Pulses E and F, close to Pulse 2 and its complex conjugated version, respectively, are shown in Fig. 5(c), with durations $T^{(E)}\Omega_{\max} = 17.1$ and $T^{(F)}\Omega_{\max} = 16.2$. All pulses have a gate error $1 - F < 10^{-9}$ at $B = 10\Omega_{\max}$. They are also significantly less susceptible to variations of $B$ than the faster pulse found above, i.e. reducing $B$ by 10% never increases the gate error to more than $4 \cdot 10^{-4}$. This is an improvement by three orders of magnitude compared to the faster pulse found above.

For the linear instead of the triangular arrangement it is shown in Appendix C that, under the

approximation that the effects of a finite $B$ can be completely captured by an ac-Stark shift and in the $B \gg \Omega_{\max}$ limit, there exist no pulses with fidelity $F = 1$ close to the $B = \infty$ pulses. Qualitatively, this is caused by different pairs of atoms being affected differently by the finite $B$, but in the same way by the global laser.

In summary, the results of this section show that for both the CZ and the C₂Z gate in the triangular arrangement the time-optimal pulses at $B = \infty$ can be modified to compensate for a finite value of $B$. For the C₂Z gate it is even possible to significantly decrease the gate duration in the finite $B$ case by a pulse which significantly populates states with two atoms in the Rydberg state. This comes at the downside of a much larger sensitivity to variations in $B$. Note that for the CZ gate a similar speedup of the gate is not possible. All results were obtained at $B = 10\Omega_{\max}$. We expect that the picture remains qualitatively the same as long as $B \gg \Omega_{\max}$.

## 6.2 Variable Blockade Strength

Instead of designing a pulse to work at a specific blockade strength $B$, in this section only pulses that have fidelity $F = 1$ at $B = \infty$ are considered. Within the set of these pulses, the pulses that are affected the least by a finite $B$ are identified. To this end, it is shown in Appendix D using a time dependent Schrieffer-Wolff transformation [77] that to first order in $1/B$ all effects of the finiteness of $B$ can be described by an ac-Stark shift of the energy of the states with one atom in the Rydberg state. For the CZ gate this means modifying $H_{11}$ to

$$H_{11} = \frac{\sqrt{2\Omega}}{2} (|11\rangle\langle W| + \text{h.c.}) - \frac{|\Omega|^2}{2B} |W\rangle\langle W| \quad (31)$$

where we split $H_{11} = H_{11}^{(0)} + \frac{1}{B}H_{11}^{(1)}$. We also expand the state as $|\psi_{11}(t)\rangle = U(t)|11\rangle = |\psi_{11}^{(0)}(t)\rangle + \frac{1}{B}|\psi_{11}^{(1)}(t)\rangle + \mathcal{O}(B^{-2})$.

As shown in Appendix E, a pulse with fidelity $F = 1$ in the $B = \infty$ case has at finite $B$ a gate error of

$$(1-F)B^2 = \frac{1}{4} \langle \psi_{11}^{(1)}(T) | \psi_{11}^{(1)}(T) \rangle - \frac{1}{10} \left| \langle 11 | \psi_{11}^{(1)}(T) \rangle \right|^2 + \mathcal{O}(B^{-1}) \quad (32)$$
<figure><img src="image_6.png" /><figcaption>Figure 6: Pulses for the CZ and the C₂Z gate that are as robust as possible against variations of the blockade strength. a) Rescaled gate errors $(1-F)B^2T^2$ for different values of the dimensionless gate duration $T\Omega_{max}$ for the CZ gate. b) Rescaled gate errors $(1-F)B^2T^2$ for the C₂Z gate. Red upward pointing triangles show optimization results when initializing GRAPE with the time-optimal Pulse 1, turquoise downward pointing triangles when initializing with Pulse 2. c) (d)) Laser amplitude (phase) minimizing $(1-F)B^2T^2$ for the CZ gate at $T\Omega_{max} = 30$. e) Population of $|W\rangle$ during the pulse from c)/d) as a function of time. The laser amplitude is large when the population of $|W\rangle$ is small. f) (g)) Laser amplitude (phase) minimizing $(1-F)B^2T^2$ for the C₂Z gate when initializing GRAPE with Pulse 1 at $T\Omega_{max} = 60$. h) Population of $|0\rangle \otimes |W\rangle$ (orange solid line) and $|W_1\rangle$ (green dashed line) during Pulse 1 as a function of time. The laser amplitude is large when the populations of $|0\rangle \otimes |W\rangle$ and $|W_1\rangle$ are small. i),j),k) Analogous to f),g),h) for Pulse 2 instead of Pulse 1.</figcaption></figure>

To lowest order, the gate error thus increases quadratically with $1/B$. Our goal is now to use GRAPE to minimize $\frac{1}{2}\frac{d^2(1-F)}{d(1/B)^2}|_{B=\infty}$, as given by the right hand side of Eq. (32). Note that this minimizes the gate error simultaneously for all values of $B$ for which contributions of order $B^{-3}$ and higher can be neglected.

To apply GRAPE, $|\psi_{11}^{(0)}\rangle$ and $|\psi_{11}^{(1)}\rangle$ are treated as independent states satisfying

$$ \frac{d}{dt} \begin{pmatrix} |\psi_{11}^{(0)}\rangle \\ |\psi_{11}^{(1)}\rangle \end{pmatrix} = -i \begin{pmatrix} H_{11}^{(0)} & 0 \\ H_{11}^{(1)} & H_{11}^{(0)} \end{pmatrix} \begin{pmatrix} |\psi_{11}^{(0)}\rangle \\ |\psi_{11}^{(1)}\rangle \end{pmatrix}. \quad (33) $$

Eq. (33) now replaces the Schrödinger Equation for $|\psi_{11}\rangle$ in the formulation of GRAPE.

To minimize $\frac{1}{2}\frac{d^2(1-F)}{d(1/B)^2}|_{B=\infty}$ over all states with fidelity $F=1$ in the $B=\infty$ case, the objective function for GRAPE is taken as

$$ J = CF(|\psi_{01}\rangle, |\psi_{11}^{(0)}\rangle, \theta) + \frac{1}{2} \frac{d^2(1-F)}{d(1/B)^2} \Big|_{B=\infty} . \quad (34) $$

Here, $C$ is a large constant ensuring that only pulses with fidelity close to 1 in the $B = \infty$ case can minimize $J$. We take $C = 10^4$ and verify that indeed the gate errors at $B = \infty$ are always below $3 \cdot 10^{-6}$.

Given a pulse $\Omega(t)$ with duration $T$ that implements a CZ gate at $B = \infty$, the gate error at finite $B$ can be reduced by an arbitrary factor $\beta^2$, for $0 < \beta < 1$, by simply stretching the pulse to duration $T/\beta$ and taking $\tilde{\Omega}(t) = \beta\Omega(\beta t)$. To see this, note that $H_{11}^{(1)}$ is decreased by $\beta^2$, while the pulse duration is increased by $1/\beta$. Hence $|\psi_{11}^{(1)}\rangle$ is decreased by $\beta$, and $1-F$ according to Eq. (32) by $\beta^2$. To compare different pulses beyond a stretch, the dimensionless quantity $\alpha = (1-F)B^2T^2$ is taken as a quality measure for pulses from now on.

Using Eq. (32), the time-optimal pulse for the CZ gate is found to have $\alpha = 35.9$. To improve upon this, GRAPE is now used to minimize $\alpha$ over both the amplitude and the phase of the
laser pulse at a fixed T, using the time-optimal pulse stretched to duration T as initial guess. The minimal values of α for values of TΩmax between 7.61 and 30 are shown in Fig. 6(a). α decreases as the pulse duration increases, but asymptotically approaches a non-zero value around α ≈ 28 as T → ∞, which is an improvement of over 20% compared to the time-optimal pulse. The amplitude and the phase of Ω(t) at TΩmax = 30 are shown in Figs. 6(c) and (d) respectively. The amplitude starts maximal, then drops to about 25% after a quarter of the pulse duration. Towards the middle of the pulse the amplitude increases again to around 50%, then it decreases again to 25% at three quarters of the pulse duration and finally increases to the maximal amplitude at the end of the pulse. This behavior can be understood by considering the population of |W⟩, the only state affected by the ac-Stark shift due to the finite B. The population of |W⟩, shown in Fig. 6(e), starts at 0 and increases to 0.9 at t ≈ 0.25T*. It then decreases to 0.25 at t = 0.5T* and increases again to 0.9 at t ≈ 0.75T*, before dropping to 0 at the end of the pulse. Notably, the laser amplitude is inversely correlated to the population |W⟩. Through this, whenever the population of |W⟩ is large, the laser amplitude, and thus also the ac-Stark shift of |W⟩, is reduced.

For the C₂Z gate in the triangular arrangement the ac-Stark shift due to the finite B leads to H₀₁₁ and H₁₁ as given in Eqs. (29) and (30). A formula for the gate error depending on |ψ<sup>(1)</sup><sub>011</sub>(T)⟩ and |ψ<sup>(1)</sup><sub>111</sub>(T)⟩ analogous to Eq. (32) is derived in Appendix E [Eq. (55)]. Again α = (1−F)B²T² is used as a quality measure for different pulses, the time-optimal Pulse 1 has α = 1850, the slightly slower Pulse 2 has α = 1660. GRAPE is applied with either Pulse 1 or Pulse 2 as initial guess to minimize α for TΩmax between 16.6 and 60, shown in Fig. 6(b) with red upward pointing triangles for Pulse 1 as initial guess and turquoise downward pointing triangles for Pulse 2 as initial guess. For both cases α decreases when T is increased and asymptotically approaches α ≈ 1300 for both pulses, an improvement of 30% over the time-optimal Pulse 1 and of 20% over Pulse 2. The amplitude and phase for the pulse minimizing α at TΩmax = 60 when initializing GRAPE with pulse 1 are shown in Figs. 6(f) and (g) respectively, the amplitude and phase when initializing GRAPE with Pulse 2 in Figs. 6(i) and (j) respectively.

<figure><img src="image_7.png" /><figcaption>Figure 7: Minimal gate errors (blue, in log scale) and optimal Rabi frequencies Ω<sub>max</sub> (red, in linear scale) for the CZ gate (solid lines) and Pulse 1 of the C<sub>2</sub>Z gate in the triangular arrangement (dashed lines) for the blockade strength between 100MHz < B/2π < 3GHz. The parameters in Eq. (35) are Γ = 1/540μs and TΩ<sub>max</sub> = 7.612, T<sub>R</sub>Ω<sub>max</sub> = 2.975, α = 35.9 for the CZ gate and TΩ<sub>max</sub> = 16.43, T<sub>R</sub>Ω<sub>max</sub> = 6.9, α = 1850 for Pulse 1 of the C<sub>2</sub>Z gate.</figcaption></figure>

The results in this section show that both for the CZ and for the C₂Z gate the time-optimal pulses can be improved to decrease the effect of a finite blockade strength at the cost of a longer pulse duration. The improvement of the gate error goes beyond simply stretching the pulses and is based on a modulation of the laser amplitude to reduce the ac-Stark shift when the states affected by it are populated most.

## 7 Gate Errors for a Specific Setup

Finally, in this section we calculate the gate errors of the time-optimal pulses found above at a specific blockade strength and decay rate of the Rydberg state. The same setup as in [32] is chosen, with the qubits encoded in the clock states of Caesium and the Rydberg state $|r\rangle = |107P_{3/2} m_j = 3/2\rangle$. At 300K the Rydberg state has a lifetime of $1/\Gamma = 540\mu s$. Adding the error contributions from the decay of the Rydberg state and due to a finite blockade strength and neglecting all other error sources, the gate error is given by

$$1 - F = \frac{\Gamma(T_R \Omega_{\text{max}})}{\Omega_{\text{max}}} + \frac{\Omega_{\text{max}}^2 \alpha}{B^2 (T \Omega_{\text{max}})^2}. \quad (35)$$
The gate error can now be minimized by varying $\Omega_{max}$ while keeping $T\Omega_{max}$ and $T_R\Omega_{max}$ fixed and thus balancing the trade-off between the error due to decay of the Rydberg state and due to a finite blockade strength. The minimal gate errors and the optimal values of $\Omega_{max}$ for the CZ gate and Pulse 1 for the $C_2Z$ gate are shown in Fig. 7. At the maximal considered blockade strength $B/2\pi = 3$GHz the minimal gate errors are $1-F \approx 7.0 \cdot 10^{-5}$ for the CZ and $1-F \approx 2.8 \cdot 10^{-4}$ for Pulse 1 for the $C_2Z$ gate in the triangular arrangement. For the blockade strength $B/2\pi = 180$MHz, which is shown to be achievable in Appendix A, the gate errors are $1-F \approx 4.6 \cdot 10^{-4}$ for the CZ gate and $1-F \approx 1.8 \cdot 10^{-3}$ for the $C_2Z$ gate. The required Rabi frequencies take realistic values of the order of $\Omega_{max} \approx 2\pi \times 10$MHz. For Pulse 2 for the $C_2Z$ gate (not shown in Fig. 7) the gate error is always slightly above the gate error for Pulse 1, at most by 8%. Additionally, the optimal Rabi frequency is also always slightly above that for Pulse 1, at most by 7%.

In summary, these results show that moderate blockade strengths around $B \approx 180$MHz and moderate Rabi frequencies around $\Omega_{max} \approx 5$MHz are sufficient to achieve gate errors of order of $1-F \lesssim 10^{-3}$ for both the CZ and the $C_2Z$ gate. Even lower gate errors can be achieved by higher blockade strengths and larger Rabi frequencies. For the calculations above, the time-optimal pulses from Sec. 3, which were optimized at $B = \infty$, were used. For the gates from Sec. 6.1, which were optimized at a finite $B$, the gate error $1-F = \Gamma T_R$ arises solely due to the decay of the Rydberg state and is inversely proportional to $\Omega_{max}$. Only the errors due to a finite blockade strength and decay of the Rydberg state were considered in the calculations above.

## 8 Conclusion

In this work the time-optimal global pulses for the CZ and the $C_2Z$ gate in the blockade regime were identified. The pulse durations of $T\Omega_{max} = 7.612$ for the CZ gate and $T\Omega_{max} = 16.43$ for the $C_2Z$ gate improve even upon the traditional, non-global pulses [18, 20] and upon the recently discovered global pulse for the CZ gate with $T\Omega_{max} = 8.585$ [21]. Due to the shortest possible pulse duration, most types of errors which become

more detrimental for longer gate durations, like the decay of the Rydberg state or Doppler shifts of the laser frequency, are mitigated. Since the pulses are global, they can be realized by a single laser addressing all atoms simultaneously. No single-site addressability is needed, thus significantly simplifying the experimental requirements. Interestingly, for the CZ gate single-site addressability even brings no speedup over the time-optimal global pulse, showing that single-site addressability, which requires a more complex experimental setup, is not always advantageous.

The results were obtained using the quantum optimal control techniques GRAPE and PMP, which we combined in a novel way. GRAPE allowed to find the time-optimal pulses in the first place, using several hundreds of variational parameters. The PMP then allowed to reduce the variational parameters to just 4 for the CZ and 6 for the $C_2Z$ gate, thus showing that the pulses found by GRAPE are indeed the piecewise constant approximation of a simple smooth pulse given by the solution of an ordinary differential equation. The description by the PMP allows for immediate reproducibility of the time-optimal pulses just from the parameters in Table 1 and without using GRAPE again.

GRAPE was also used to optimize the robustness of pulses for a CZ and $C_2Z$ gate against the decay of the Rydberg state and against errors arising due to a finite blockade strength. To mitigate the effects of the decay of the Rydberg state, the average time spent in the Rydberg state was minimized. Interestingly, for the CZ gate the time-optimal pulse coincides with the pulse minimizing the time in the Rydberg state, while for the $C_2Z$ gate a small improvement is possible. Two approaches were taken to mitigate the effects of a finite blockade strength: In the first approach, pulses were optimized at a fixed, finite value of $B$ and it was shown that the time-optimal pulses can be modified to compensate for the finiteness of $B$. In the second approach, pulses were identified that implement a CZ or $C_2Z$ gate exactly at infinite blockade strength while minimizing the second derivative of the gate error with respect to the inverse blockade strength. The first approach works best if the blockade strength is known exactly, while the second approach gives a pulse that works well for all large blockade strengths.
Finally, the gate errors were calculated for a plausible experimental setup using the $|107P_{3/2}m_j = 3/2\rangle$ state of Caesium as the Rydberg state. Gate errors as low as $1-F = 7 \cdot 10^{-5}$ for the CZ gate and $1-F = 3 \cdot 10^{-4}$ for the $C_2Z$ gate can be achieved at $B/2\pi = 3$GHz and Rabi frequencies of the order of $\Omega_{max}/2\pi \approx 10$MHz. At the much weaker blockade strength of $B/2\pi = 180$MHz still gate errors of $1-F = 4.6 \cdot 10^{-4}$ for the CZ gate and $1-F = 1.8 \cdot 10^{-3}$ for the $C_2Z$ gate can be achieved.

The results show that quantum optimal control techniques, especially GRAPE and the PMP, are versatile tools to design gates on Rydberg atoms. In this work, only gates that make use of a single Rydberg state per atom and that operate in the blockade regime were considered. While most gates in current experiments are of this kind, it is known that more robust gates can be achieved when using several Rydberg states per atom [35, 78], and ultrafast gates can be achieved

by operating outside of the Rydberg blockade regime [79]. We expect that quantum optimal control techniques can also be used to improve these gates.

## Data Availability

All pulse shapes found in this work are available at Ref. [57].

## Acknowledgments

We are grateful to Shannon Whitlock and Frank Wilhelm-Mauch for stimulating discussions. This research has received funding from the European Union's Horizon 2020 research and innovation programme under the Marie Skłodowska-Curie grant agreement number 955479. G. P. acknowledges support from the Institut Universitaire de France (IUF) and the University of Strasbourg Institute of Advanced Studies (USIAS).
<figure><img src="image_8.png" /><figcaption>Figure 8: a) Eigenvalues of the Rydberg-Rydberg Hamiltonian $H$ as a function of the interatomic distance $R$. Each marker represents an eigenvalue, the color indicates the squared overlap of the corresponding eigenstate with $|rr\rangle$. b) Zoom-in on the eigenvalues between $6\mu m < R < 7\mu m$. There are two eigenstates that become resonant around $R \approx 6.5\mu m$, c) The effective blockade strength for different values of $R$.</figcaption></figure>

## A Estimation of the Effective Blockade Strength

In this appendix we calculate which effective blockade strength can be achieved when using Caesium atoms, $|r\rangle = |107p_{3/2} m = 3/2\rangle$ and $|1\rangle = |6S_{1/2} F = 4 m_F = 4\rangle$, and aligning the atoms perpendicular to quantization axis. This is the same setup as assumed in [32, 38]. The interaction between two atoms at a distance $R$ is given by the dipole-dipole potential

$$V_{dd} = \frac{e^2}{4\pi\epsilon_0} \frac{\hat{x}_1 \cdot \hat{x}_2 - 3(\hat{x}_1 \cdot \vec{n})(\hat{x}_2 \cdot \vec{n})}{R^3} \quad (36)$$

where $\hat{x}_i$ denotes the 3d position operator of atom $i$ and $\vec{n}$ is the unit vector along the line interconnecting the atoms. The system of two atoms is then described by the Hamiltonian

$$H = \sum_{ab} (E_a + E_b) |ab\rangle \langle ab| + \sum_{abcd} \langle ab| V_{dd} |cd\rangle |ab\rangle \langle cd| \quad (37)$$

where $a, b, c, d$ denote single atom Rydberg states and $E_a(E_b)$ is the binding energy of the Rydberg state $|a\rangle(|b\rangle)$.
Using the Alkali ne Rydberg Calculator (ARC) package [80], H can be easily calculated and diagonalized. To find the effective blockade strength (defined below), we diagonalized H, taking into account all Rydberg states with principle quantum number $104 \le n \le 110$ and with orbital quantum number $l \le 3$. The eigenvalues for R between 3µm and 12µm are shown in Fig. 8(a), with the color indicating the squared overlap between the corresponding eigenstate and $|rr\rangle$. It can be seen that, contrary to the simple model in Fig. 1(a), there are several eigenstates $|\phi_i\rangle$ with a significant overlap with $|rr\rangle$. Since the effects of a finite blockade strength are well approximated through an ac-Stark shift of the $|W\rangle$ state (see Appendix D), we define the effective blockade strength $B_{eff}$ as the blockade strength which correctly reproduces the ac-Stark shift of $|W\rangle$ coming from the coupling to all $|\phi_i\rangle$. This effective blockade strength has been introduced under the name frequency shift factor before [81]. $B_{eff}$ can be calculated as

$$ \frac{1}{B_{eff}} = \frac{2}{\Omega^2} \sum_i \frac{|\langle W | H_{laser} | \phi_i \rangle|^2}{\Delta_i} \qquad (38) $$

where $\Delta_i$ is the energy of $|\phi_i\rangle$ (relative to the energy of $|rr\rangle$ in the absence of the dipole-dipole interaction), $H_{laser}$ describes the laser coupling the $|1\rangle$ state to the Rydberg states and $\Omega$ is the Rabi frequency of this laser for the coupling between $|1\rangle$ and $|r\rangle$.

$B_{eff}$ is shown as a function of R in Fig. 8(c). When decreasing R from infinity, $B_{eff}$ increases monotonically until $R \approx 6.5\mu m$, where it suddenly drops. This drop can be explained by two eigenstates of H becoming resonant ($\Delta_i = 0$) around $R \approx 6.5\mu m$, which is shown in Fig. 8(b). These two eigenstates consist primarily of $106S_{1/2} + 109S_{1/2}$ states, with a squared overlap summed over all magnetic quantum numbers of 0.56. The squared overlap with $|rr\rangle$ is 0.02 for both states.

For $R \lesssim 6.5\mu m$ the effective blockade strength changes rapidly and non-monotonously with R. We therefore take the maximal achievable blockade strength to be the maximal $B_{eff}$ for $R > 6.5\mu m$, which is given by $B_{eff}/2\pi = 180$MHz at $R \approx 7\mu m$.

## B Gate Error due to Decay

In this appendix, we show that a pulse $\Omega_1, ..., \Omega_n$ of duration T which implements a $(\xi_q)_q$ phase gate with fidelity $F = 1$ in the absence of decay has a gate error of $1-F = \Gamma T_R$ when a decay of the Rydberg state with decay rate $\Gamma$ with $\Gamma T_R \ll 1$ is included. For this, denote by $H^{(0)}$ the Hamiltonian from Eq. (1) and by $\Delta H = -\frac{i}{2}\Gamma \sum_j |r\rangle_j \langle r|$ the nonhermitian term added to the Hamiltonian to describe decay. Further, denote by $U^{(0)}(t', t)$ and $U(t', t)$ the time evolution operator from $t'$ to $t$ under $H^{(0)}$ and $H^{(0)} + \Delta H$, respectively. We use the abbreviations $U^{(0)}(t) = U^{(0)}(0, t)$ and $U(t) = U(0, t)$. Then to first order in $\Gamma$ we have

$$ U(T) = U^{(0)}(T) - i \int_{0}^{T} dt U^{(0)}(t, T) \Delta H U^{(0)}(t) = U^{(0)}(T) - \frac{\Gamma}{2} \int_{0}^{T} dt U^{(0)}(t, T) \sum_{j} |r\rangle_{j} \langle r| U^{(0)}(t). \quad (39) $$

Now we use that $U^{(0)}(t, T) = U^{(0)}(T)U^{(0)}(t)^\dagger$ and that $\langle q|U^{(0)}(T)|q\rangle = e^{i\xi_q}$ to obtain

$$ \langle q | U(T) | q \rangle = e^{i\xi_q} - \frac{\Gamma}{2} e^{i\xi_q} \int_0^T dt \langle \psi_q(t) | \Pi_r | \psi_q(t) \rangle \qquad (40) $$

where $|\psi_q(t)\rangle = U^{(0)}(t)|q\rangle$ and $\Pi_r = \sum_j |r\rangle_j \langle r|$. Note that for the $B = \infty$ case, where there is at most one atom in the Rydberg state, $\Pi_r$ is the projector onto the states with exactly one atom in the Rydberg state.
Now we insert Eq. (40) into Eq. (5) and expand in first order of Γ to obtain

$$
\begin{align}
F &= \frac{1}{2^n(2^n + 1)} \left( \left| \sum_q e^{-i\xi_q} \langle q|U(T)|q \rangle \right|^2 + \sum_q |\langle q|U(T)|q \rangle|^2 \right) \tag{41} \\
&= \frac{1}{2^n(2^n + 1)} \left( \left| \sum_q \left( 1 - \frac{\Gamma}{2} \int_0^T dt \langle \psi_q(t) | \Pi_r | \psi_q(t) \rangle \right) \right|^2 + \sum_q \left| \left( 1 - \frac{\Gamma}{2} \int_0^T dt \langle \psi_q(t) | \Pi_r | \psi_q(t) \rangle \right) \right|^2 \right) \nonumber \\
&= \frac{1}{2^n(2^n + 1)} \left( 2^{2n} - 2^n \sum_q \Gamma \int_0^T dt \langle \psi_q(t) | \Pi_r | \psi_q(t) \rangle + 2^n - \sum_q \Gamma \int_0^T dt \langle \psi_q(t) | \Pi_r | \psi_q(t) \rangle \right) \nonumber \\
&= 1 - \Gamma 2^{-n} \sum_q \Gamma \int_0^T dt \langle \psi_q(t) | \Pi_r | \psi_q(t) \rangle \nonumber \\
&= 1 - \Gamma T_R \nonumber
\end{align}
$$

where in the last equality the definition of $T_R$[Eq. (27)] was used.

C The C₂Z Gate in the Linear Arrangement

In this appendix we discuss the C₂Z gate in the linear arrangement, in which three atoms are aligned in a row. There, the outer two atoms, labeled atoms 1 and 3 from now on, are separated by a larger distance than an outer and the middle atom (labeled 2). Thus, there are two different blockade strengths: $B_{12} = B_{23} =: B$ and $B_{13} =: B' < B$. In the van der Waals regime where the blockade strength is proportional to $R^6$, with $R$ the interatomic distance, we have $B' = B/64$, but the following arguments will hold for all $B'$ with $B' \neq B$.

Let $\Omega^{(0)}$ be a global pulse of duration $T$ that implements a C₂Z gate at $B = \infty$, for example Pulse 1 or Pulse 2 from Sec. 3.3. We will show that if $B, B' \gg \Omega_{\max}$ there is no small change $\Delta\Omega$ such that $\Omega^{(0)} + \Delta\Omega$ implements a C₂Z gate at blockade strengths $B, B'$.

Denote by $H_q^{(0)}$ the Hamiltonian under $\Omega^{(0)}$ as defined in Eq. (2) at $B = \infty$, and by $\Delta H_q$ the perturbation of the Hamiltonian due to the change $\Delta\Omega$ of the laser pulse and due to the finite Blockade strength. In the limit $B, B' \gg \Omega_{\max}$ we can treat the finite blockade strength through an ac-Stark shift (see Appendix D) and obtain

$$
\Delta H_{011}(t) = \frac{\sqrt{2}\Delta\Omega(t)}{2} |011\rangle \langle W_{011}| + \text{h.c.} - \frac{|\Omega^{(0)}|^2}{2B} |W_{011}\rangle \langle W_{011}| \quad (42)
$$

and

$$
\Delta H_{101}(t) = \frac{\sqrt{2}\Delta\Omega(t)}{2} |101\rangle \langle W_{101}| + \text{h.c.} - \frac{|\Omega^{(0)}|^2}{2B'} |W_{101}\rangle \langle W_{101}| \quad (43)
$$

with $|W_{011}\rangle = (|01r\rangle + |0r1\rangle)/\sqrt{2}$ and $|W_{101}\rangle = (|10r\rangle + |r01\rangle)/\sqrt{2}$. Now we denote by $U_q^{(0)}(t', t)$ the time evolution operator from $t'$ to $t$ under $H_q^{(0)}$, set $U_q^{(0)}(t) = U_q^{(0)}(0, t)$ and define $U_q$ analogously with $H_q^{(0)} + \Delta H_q$. Then

$$
U_q(T) = U_q^{(0)}(T) - i \int_0^T dt U_q^{(0)}(t, T) \Delta H_q U_q^{(0)}(t). \quad (44)
$$

For the C₂Z gate we require $\langle 011|U_{011}(T)|011\rangle = \langle 101|U_{101}(T)|101\rangle = e^{2i\theta}$. We obtain with $U_q^{(0)}(t, T) = U_q^{(0)}(T)U_q^{(0)}(t)^\dagger$ that

$$
\langle 011 | U_{011}(T) | 011 \rangle = e^{2i\theta^{(0)}} \left[ 1 - i \left( a_{011} + \frac{b_{011}}{B} \right) \right] \quad (45)
$$

and

$$
\langle 101 | U_{101}(T) | 101 \rangle = e^{2i\theta^{(0)}} \left[ 1 - i \left( a_{101} + \frac{b_{101}}{B'} \right) \right] \quad (46)
$$
with

$$a_q = 2\mathrm{Re} \left( \int_0^T dt \frac{\sqrt{2}\Delta\Omega(t)}{2} \langle \psi_q(t) | q \rangle \langle W_q | \psi_q(t) \rangle \right) \qquad (47)$$

and

$$b_q = - \int_0^T dt \frac{|\Omega^{(0)}|^2}{2} |\langle \psi_q(t) | W_q \rangle|^2 \qquad (48)$$

where again $|\psi_q(t)\rangle = U^{(0)}(t)|q\rangle$.

Because $|\psi_{011}\rangle$ and $|\psi_{101}\rangle$ behave identically up to relabeling the qubits, we obtain $a_{011} = a_{101}$ and $b_{011} = b_{101}$. Since $b_{011} \neq 0$ and $B \neq B'$, it follows from Eqs. (45) and (46) that $\langle 011|U_{011}(T)|011\rangle \neq \langle 101|U_{101}(T)|101\rangle$. Hence the pulse $\Omega^{(0)} + \Delta\Omega$ does not implement a C₂Z gate. Qualitatively, this is because the $H_{011}$ and $H_{101}$ are effected differently by a finite blockade strength, but identically by a change in $\Omega(t)$.

## D Approximation of a Finite Blockade Strength through an AC-Stark Shift

Let $\Omega(t)$ be a global pulse with duration $T$ that implements a CZ or C₂Z with fidelity 1 at $B = \infty$. In this appendix we use a time dependent Schrieffer-Wolff transformation (TDSWT) [77] to show that the final state $|\psi(T)\rangle$ can be obtained to first order in $1/B$ just by including an ac-Stark shift to the Hamiltonian, modifying $H_{11}$ to

$$\tilde{H}_{11} = \frac{\sqrt{2}\Omega}{2} |11\rangle \langle W| + \text{h.c.} - \frac{|\Omega|^2}{2B} |W\rangle \langle W| \qquad (49)$$

and $H_{011}$ and $H_{111}$ as in Eqs. (29) and (30). We only show this explicitly for the CZ gate, the statement for the C₂Z gate follows completely analogously.

The goal of a TDSWT is to make a time dependent basis transformation $e^{-S(t)}$, where $S$ is an anti-hermitian matrix, such that $|\tilde{\psi}_{11}\rangle = e^{S(t)}|\psi_{11}\rangle$ evolves under a Hamiltonian $\tilde{H}_{11}$ that does not couple the $|rr\rangle$ state to the $|W\rangle$ or $|11\rangle$ state anymore. For this, we split $H_{11} = H_{L1} + H_{L2} + H_{vdW}$ with

$$H_{L1} = \frac{\sqrt{2\Omega}}{2} |11\rangle \langle W| + \text{h.c.} \qquad H_{L2} = \frac{\sqrt{2\Omega}}{2} |W\rangle \langle rr| + \text{h.c.} \qquad H_{vdW} = B|rr\rangle \langle rr|. \qquad (50)$$

We expand $S = S_1 + S_2 + ...$ and $\tilde{H}_{11} = \tilde{H}_{11}^{(-1)} + \tilde{H}_{11}^{(0)} + \tilde{H}_{11}^{(1)} + ...$ where $S_j$ and $\tilde{H}_{11}^{(j)}$ are of order $B^{-j}$. There is no $S_0$ term, because in the limit $B = \infty$, $H_{11}$ already does not couple $|rr\rangle$ to $|11\rangle$ or $|W\rangle$. From this limit we can also infer $\tilde{H}_{11}^{(-1)} = H_{vdW}$ and $\tilde{H}_{11}^{(0)} = H_{L1}$. According to the TDSWT, $S_1$ and $\tilde{H}_{11}^{(1)}$ can be found by (see Eqs. (6) and (7) in Ref. [77]):

$$[H_{vdW}, S_1] = -H_{L2} \qquad (51)$$

$$\tilde{H}_{11}^{(1)} = \frac{1}{2}[H_{L2}, S_1]. \qquad (52)$$

Solving Eqs. (51) and (52) gives

$$S_1 = \frac{1}{B} \frac{\sqrt{2\Omega}}{2} |W\rangle \langle rr| - \text{h.c.} \qquad \tilde{H}_{11}^{(1)} = \frac{|\Omega|^2}{2B} (-|W\rangle \langle W| + |rr\rangle \langle rr|) \qquad (53)$$

We conclude that to first order in $1/B$ we can treat the effects of a finite $B$ just through an ac-Stark shift, as long as we consider $|\tilde{\psi}_{11}\rangle$ instead of $|\psi_{11}\rangle$. However, we are only interested in $|\psi_{11}(t)\rangle$ at $t = 0$ and $t = T$, and at both times $|\psi_{11}(t)\rangle$ is, to 0th order in $1/B$, proportional to $|11\rangle$. Because $S_1|11\rangle = 0$ we thus have at these two times $|\tilde{\psi}_{11}(t)\rangle = |\psi_{11}(t)\rangle + \mathcal{O}(B^{-2})$. To describe the effects of a finite $B$ up to first order in $1/B$, it is therefore sufficient to just consider the ac-Stark shift of $|W\rangle$ and use $\tilde{H}_{11}$ instead of $H_{11}$. We remark that terms of order $1/B^2$ are either proportional to $(\Omega/B)^2$
or to $\dot{\Omega}/B^2$. To neglect these terms, $B \gg |\Omega|$ is therefore not sufficient, additionally $B^2 \gg |\dot{\Omega}|$ has to hold. Analogously, to be able to neglect terms of higher orders, $B^n \gg \left|\frac{d^n}{dt^n}\Omega\right|$ has to hold for all $n$. If $\Omega$ oscillates with a frequency of the order of $B$, as for example for the pulse in Sec. 6.1.2, this does not hold and the effect of a finite $B$ can not described solely by an ac-Stark shift.

## E Gate Error of a CZ and C₂Z Gate to Second Order in $1/B$

In this appendix we derive perturbative expressions for the gate error at finite $B$ for pulses that implement a CZ or C₂Z with fidelity $F = 1$ in the $B = \infty$ case. For this, we expand $|\psi_q\rangle = |\psi_q^{(0)}\rangle + \frac{1}{B}|\psi_q^{(1)}\rangle + \frac{1}{B^2}|\psi_q^{(2)}\rangle + \mathcal{O}(B^{-3})$ and show that for the CZ gate it holds that

$$F = 1 - \frac{1}{B^2} \left( \frac{1}{4} \langle \psi_{11}^{(1)} | \psi_{11}^{(1)} \rangle - \frac{1}{10} \left| \langle 11 | \psi_{11}^{(1)} \rangle \right|^2 \right) + \mathcal{O}(B^{-3}) \quad (54)$$

while for the C₂Z gate in the triangular arrangement it holds that

$$F = 1 - \frac{1}{72B^2} \left( 27 \langle \psi_{011}^{(1)} | \psi_{011}^{(1)} \rangle + 9 \langle \psi_{111}^{(1)} | \psi_{111}^{(1)} \rangle - \left| 3 \langle 011 | \psi_{011}^{(1)} \rangle - e^{-i\theta} \langle 111 | \psi_{111}^{(1)} \rangle \right|^2 \right. \\ \left. - 3 \left| \langle 011 | \psi_{011}^{(1)} \rangle \right|^2 - \left| \langle 111 | \psi_{111}^{(1)} \rangle \right|^2 \right) \quad (55)$$

To derive both formulas, we use two ingredients: Firstly any quantity $x = x^{(0)} + \frac{1}{B}x^{(1)} + \frac{1}{B^2}x^{(2)} + \dots$ depending on $B$ satisfies

$$|x|^2 = |x^{(0)}|^2 + \frac{2}{B}\mathrm{Re}\left( (x^{(0)})^* x^{(1)} \right) + \frac{1}{B^2} \left( |x^{(1)}|^2 + 2\mathrm{Re}\left( (x^{(0)})^* x^{(2)} \right) \right) + \mathcal{O}(B^{-3}). \quad (56)$$

Secondly, for any normalized vector $|\varphi_q\rangle$ depending on $B$ and with $|\varphi_q^{(0)}\rangle = |q\rangle$ it holds that

$$1 = \langle \varphi_q | \varphi_q \rangle = 1 + \frac{1}{B} \mathrm{Re} \left( (\langle q | \varphi_q^{(1)} \rangle) + \frac{1}{B^2} \left( \langle \varphi_q^{(1)} | \varphi_q^{(1)} \rangle + 2 \mathrm{Re} (\langle q | \varphi_q^{(2)} \rangle) \right) \right) + \mathcal{O}(B^{-3}) \quad (57)$$

so that

$$\mathrm{Re} \left( (\langle q | \varphi_q^{(1)} \rangle) \right) = 0 \quad (58)$$

and

$$\mathrm{Re}(\langle q | \varphi_q^{(2)} \rangle) = -\frac{1}{2} \langle \varphi_q^{(1)} | \varphi_q^{(1)} \rangle. \quad (59)$$

For the fidelity of a CZ gate we obtain from Eq. (7) with $|\varphi_{01}\rangle = e^{-i\theta}|\psi_{01}\rangle$ and $|\varphi_{11}\rangle = -e^{-2i\theta}|\psi_{11}\rangle$ that

$$F = \frac{1}{20} \left( |1 + 2 \langle 01 | \varphi_{01} \rangle + \langle 11 | \varphi_{11} \rangle|^2 + 1 + 2 |\langle 01 | \varphi_{01} \rangle|^2 + |\langle 11 | \varphi_{11} \rangle|^2 \right) \quad (60)$$

Now we apply Eq. (56). Because the pulse has fidelity 1 in the $B = \infty$ case we have $|\varphi_{01}\rangle = |01\rangle$ and $|\varphi_{11}^{(0)}\rangle = |11\rangle$, so that

$$\begin{aligned} F &= \frac{1}{20} \left( |3 + \langle 0 | \varphi_{11} \rangle|^2 + 3 + |\langle 0 | \varphi_{11} \rangle|^2 \right) \\ &= \frac{1}{20} \left( 20 + \frac{10}{B} \mathrm{Re} \left( \langle 0 | \varphi_{11}^{(1)} \rangle \right) + \frac{1}{B^2} \left( 2 \left| \langle 0 | \varphi_{11}^{(1)} \rangle \right|^2 + 10 \mathrm{Re} \left( \langle 0 | \varphi_{11}^{(2)} \rangle \right) \right) \right) + \mathcal{O}(B^{-3}) \end{aligned} \quad (61)$$

By inserting Eqs. (58) and (59) into Eq. (61) we obtain Eq. (54).

For the C₂Z gate we obtain from Eq. (8) with $|\varphi_{001}\rangle = e^{-i\theta}|\psi_{001}\rangle$, $|\varphi_{011}\rangle = e^{-2i\theta}|\psi_{011}\rangle$ and $|\varphi_{111}\rangle = -e^{-3i\theta}|\psi_{011}\rangle$ that

$$F = \frac{1}{72} \left( |1 + 3 \langle 001 | \varphi_{001} \rangle + 3 \langle 011 | \varphi_{011} \rangle + \langle 111 | \varphi_{111} \rangle|^2 \right. \\ \left. + 1 + 3 |\langle 001 | \varphi_{001} \rangle|^2 + 3 |\langle 011 | \varphi_{011} \rangle|^2 + |\langle 111 | \varphi_{111} \rangle|^2 \right) \quad (62)$$
<figure><img src="image_9.png" /><figcaption>Figure 9: Comparison between the exact gate error at finite B (blue, solid line) and the gate error calculated from Eqs. (54) and (55) together with approximating the effects of a finite B through an ac-Stark shift (orange, dashed line). a) For the time-optimal pulse for the CZ gate. b)(c)) For Pulse 1(2) for the C₂Z gate. For all three pulses there is an excellent agreement between the exact gate error and the approximation for large enough B.</figcaption></figure>

We apply Eq. (56) and use that $\varphi_{001} = |001\rangle$, $|\varphi_{011}^{(0)}\rangle = |011\rangle$ and $|\varphi_{111}^{(0)}\rangle = |111\rangle$ to obtain

$$F = \frac{1}{72} \left[ 72 + \frac{1}{B} \mathrm{Re} \left( 54 \langle 011 | \varphi_{011}^{(1)} \rangle + 18 \langle 111 | \varphi_{111}^{(1)} \rangle \right) + \frac{1}{B^2} \left( \left| 3 \langle 011 | \varphi_{011}^{(1)} \rangle + \langle 111 | \varphi_{111}^{(1)} \rangle \right|^2 + 3 \left| \langle 011 | \varphi_{011}^{(1)} \rangle \right|^2 + \left| \langle 111 | \varphi_{111}^{(1)} \rangle \right|^2 + \mathrm{Re} \left( 54 \langle 011 | \varphi_{011}^{(2)} \rangle + 18 \langle 111 | \varphi_{111}^{(2)} \rangle \right) \right) \right] \quad (63)$$

By inserting Eqs. (58) and (59) into Eq. (63) we obtain Eq. (55).

We numerically confirm Eqs. (54) and (55) as well as the fact that to first order in $1/B$ it is sufficient to account for the finiteness of B through an ac-Stark shift (see Appendix D). For this, we consider the time-optimal pulse for the CZ gate and Pulse 1 and Pulse 2 for the C₂Z gate (see Sec. 3) and calculate the gate error once using the exact Hamiltonian and once from Eqs. (54) and (55). In the latter case, the $|\psi_q^{(1)}\rangle$ are found through Eq. (33). The exact and the approximate gate error are shown in Fig. 9 as blue solid line and orange dotted line, respectively. For all three considered pulses the exact and the approximate gate error are in excellent agreement for large B.

## References

[1] John Preskill. Quantum Computing in the NISQ era and beyond. Quantum, 2:79, 2018. DOI: 10.22331/q-2018-08-06-79.

[2] K.M. Svore, D.P. DiVincenzo, and B.M. Terhal. Noise threshold for a fault-tolerant two-dimensional lattice architecture. QIC, 7:297-318, 2007. DOI: 10.26421/QIC7.4-2.

[3] Austin G. Fowler, Matteo Mariantoni, John M. Martinis, and Andrew N. Cleland. Surface codes: Towards practical large-scale quantum computation. Phys. Rev. A, 86:032324, 2012. DOI: 10.1103/PhysRevA.86.032324.

[4] Federico M. Spedalieri and Vwani P. Roychowdhury. Latency in local, two-dimensional, fault-tolerant quantum computing. QIC, 9:666-682, 2009. DOI: 10.26421/QIC9.7-8-9.

[5] Ching-Yi Lai, Gerardo Paz, Martin Suchara, and Todd A. Brun. Performance and error analysis of Knill's postselection scheme in a two-dimensional architecture. QIC, 14:807-822, 2014. DOI: 10.26421/QIC14.9-10-7.

[6] Jonathan M. Baker, Andrew Litteken, Casey Duckering, Henry Hoffmann, Hannes Bernien, and Frederic T. Chong. Exploiting Long-Distance Interactions and Tolerating Atom Loss in Neutral Atom Quantum Architectures. In 2021 ACM/IEEE 48th Annual International Symposium on Computer Architecture (ISCA), pages 818-831, Valencia, Spain, 2021. IEEE. ISBN 978-1-66543-333-4. DOI: 10.1109/ISCA52012.2021.00069.
[7] Iris Cong, Sheng-Tao Wang, Harry Levine, Alexander Keesling, and Mikhail D. Lukin. Hardware-Efficient, Fault-Tolerant Quantum Computation with Rydberg Atoms. arXiv:2105.13501, 2021. DOI: 10.48550/arXiv.2105.13501.

[8] Immanuel Bloch, Jean Dalibard, and Wilhelm Zwerger. Many-body physics with ultracold gases. Rev. Mod. Phys., 80:885-964, 2008. DOI: 10.1103/RevModPhys.80.885.

[9] M. Saffman, T. G. Walker, and K. Mølmer. Quantum information with Rydberg atoms. Rev. Mod. Phys., 82:2313-2363, 2010. DOI: 10.1103/RevModPhys.82.2313.

[10] Antoine Browaeys and Thierry Lahaye. Many-body physics with individually controlled Rydberg atoms. Nat. Phys., 16:132-142, 2020. DOI: 10.1038/s41567-019-0733-z.

[11] Loïc Henriet, Lucas Beguin, Adrien Signoles, Thierry Lahaye, Antoine Browaeys, Georges-Olivier Reymond, and Christophe Jurczak. Quantum computing with neutral atoms. Quantum, 4:327, 2020. DOI: 10.22331/q-2020-09-21-327.

[12] M. Morgado and S. Whitlock. Quantum simulation and computing with Rydberg-interacting qubits. AVS Quantum Sci., 3:023501, 2021. DOI: 10.1116/5.0036562.

[13] Manuel Endres, Hannes Bernien, Alexander Keesling, Harry Levine, Eric R. Anschuetz, Alexandre Krajenbrink, Crystal Senko, Vladan Vuletic, Markus Greiner, and Mikhail D. Lukin. Atom-by-atom assembly of defect-free one-dimensional cold atom arrays. Science, 354:1024-1027, 2016. DOI: 10.1126/science.aah3752.

[14] Daniel Barredo, Sylvain de Léséleuc, Vincent Lienhard, Thierry Lahaye, and Antoine Browaeys. An atom-by-atom assembler of defect-free arbitrary two-dimensional atomic arrays. Science, 354: 1021-1023, 2016. DOI: 10.1126/science.aah3778.

[15] Daniel Ohl de Mello, Dominik Schäffner, Jan Werkmann, Tilman Preuschoff, Lars Kohfahl, Malte Schlosser, and Gerhard Birkl. Defect-Free Assembly of 2D Clusters of More Than 100 Single-Atom Quantum Systems. Phys. Rev. Lett., 122:203601, 2019. DOI: 10.1103/PhysRevLett.122.203601.

[16] Daniel Barredo, Vincent Lienhard, Sylvain de Léséleuc, Thierry Lahaye, and Antoine Browaeys. Synthetic three-dimensional atomic structures assembled atom by atom. Nature, 561:79-82, 2018. DOI: 10.1038/s41586-018-0450-2.

[17] Malte Schlosser, Sascha Tichelmann, Dominik Schäffner, Daniel Ohl de Mello, Moritz Hambach, and Gerhard Birkl. Large-scale multilayer architecture of single-atom arrays with individual addressability. arXiv:1902.05424, 2019. DOI: 10.48550/arXiv.1902.05424.

[18] D. Jaksch, J. I. Cirac, P. Zoller, S. L. Rolston, R. Côté, and M. D. Lukin. Fast Quantum Gates for Neutral Atoms. Phys. Rev. Lett., 85:2208-2211, 2000. DOI: 10.1103/PhysRevLett.85.2208.

[19] M. Müller, I. Lesanovsky, H. Weimer, H. P. Büchler, and P. Zoller. Mesoscopic Rydberg Gate Based on Electromagnetically Induced Transparency. Phys. Rev. Lett., 102:170502, 2009. DOI: 10.1103/PhysRevLett.102.170502.

[20] L. Isenhower, M. Saffman, and K. Mølmer. Multibit C k NOT quantum gates via Rydberg blockade. Quantum Inf Process, 10:755-770, 2011. DOI: 10.1007/s11128-011-0292-4.

[21] Harry Levine, Alexander Keesling, Giulia Semeghini, Ahmed Omran, Tout T. Wang, Sepehr Ebadi, Hannes Bernien, Markus Greiner, Vladan Vuletić, Hannes Pichler, and Mikhail D. Lukin. Parallel Implementation of High-Fidelity Multiqubit Gates with Neutral Atoms. Phys. Rev. Lett., 123:170503, 2019. DOI: 10.1103/PhysRevLett.123.170503.

[22] T. M. Graham, M. Kwon, B. Grinkemeyer, Z. Marra, X. Jiang, M. T. Lichtman, Y. Sun, M. Ebert, and M. Saffman. Rydberg-Mediated Entanglement in a Two-Dimensional Neutral Atom Qubit Array. Phys. Rev. Lett., 123:230501, 2019. DOI: 10.1103/PhysRevLett.123.230501.

[23] C J Picken, R Legaie, K McDonnell, and J D Pritchard. Entanglement of neutral-atom qubits with long ground-Rydberg coherence times. Quantum Sci. Technol., 4:015011, 2018. DOI: 10.1088/2058-9565/aaf019.

[24] Zhuo Fu, Peng Xu, Yuan Sun, Yang-Yang Liu, Xiao-Dong He, Xiao Li, Min Liu, Run-Bing Li, Jin Wang, Liang Liu, and Ming-Sheng Zhan. High-fidelity entanglement of neutral atoms via a Rydberg-mediated single-modulated-pulse controlled-phase gate. Phys. Rev. A, 105:042430, 2022. DOI: 10.1103/PhysRevA.105.042430.
[25] Michael J. Martin, Yuan-Yu Jau, Jongmin Lee, Anupam Mitra, Ivan H. Deutsch, and Grant W. Biedermann. A Mølmer-Sørensen Gate with Rydberg-Dressed Atoms. arXiv:2111.14677, 2021. DOI: 10.48550/arXiv.2111.14677.

[26] Ivaylo S. Madjarov, Jacob P. Covey, Adam L. Shaw, Joonhee Choi, Anant Kale, Alexandre Cooper, Hannes Pichler, Vladimir Schkolnik, Jason R. Williams, and Manuel Endres. High-Fidelity Entanglement and Detection of Alkaline-Earth Rydberg Atoms. Nat. Phys., 16:857-861, 2020. DOI: 10.1038/s41567-020-0903-z.

[27] Sylvain de Léséleuc, Daniel Barredo, Vincent Lienhard, Antoine Browaeys, and Thierry Lahaye. Analysis of imperfections in the coherent optical excitation of single atoms to Rydberg states. Phys. Rev. A, 97:053803, 2018. DOI: 10.1103/PhysRevA.97.053803.

[28] X. L. Zhang, A. T. Gill, L. Isenhower, T. G. Walker, and M. Saffman. Fidelity of a Rydberg-blockade quantum gate from simulated quantum process tomography. Phys. Rev. A, 85:042310, 2012. DOI: 10.1103/PhysRevA.85.042310.

[29] D. D. Bhaktavatsala Rao and Klaus Mølmer. Robust Rydberg-interaction gates with adiabatic passage. Phys. Rev. A, 89:030301, 2014. DOI: 10.1103/PhysRevA.89.030301.

[30] I. I. Beterov, M. Saffman, E. A. Yakshina, D. B. Tretyakov, V. M. Entin, S. Bergamini, E. A. Kuznetsova, and I. I. Ryabtsev. Two-qubit gates using adiabatic passage of the Stark-tuned Förster resonances in Rydberg atoms. Phys. Rev. A, 94:062307, 2016. DOI: 10.1103/PhysRevA.94.062307.

[31] Anupam Mitra, Michael J. Martin, Grant W. Biedermann, Alberto M. Marino, Pablo M. Poggi, and Ivan H. Deutsch. Robust Mølmer-Sørensen gate for neutral atoms using rapid adiabatic Rydberg dressing. Phys. Rev. A, 101:030301, 2020. DOI: 10.1103/PhysRevA.101.030301.

[32] M. Saffman, I. I. Beterov, A. Dalal, E. J. Paez, and B. C. Sanders. Symmetric Rydberg controlled-Z gates with adiabatic pulses. Phys. Rev. A, 101:062309, 2020. DOI: 10.1103/PhysRevA.101.062309.

[33] I. I. Beterov, D. B. Tretyakov, V. M. Entin, E. A. Yakshina, I. I. Ryabtsev, M. Saffman, and S. Bergamini. Application of adiabatic passage in Rydberg atomic ensembles for quantum information processing. J. Phys. B: At. Mol. Opt. Phys., 53:182001, 2020. DOI: 10.1088/1361-6455/ab8719.

[34] Yucheng He, Jing-Xin Liu, F.-Q. Guo, Lei-Lei Yan, Ronghui Luo, Erjun Liang, Shi-Lei Su, and M. Feng. Multiple-qubit Rydberg quantum logic gate via dressed-states scheme. arXiv:2010.14704, 2021. DOI: 10.48550/arXiv.2010.14704.

[35] David Petrosyan, Felix Motzoi, Mark Saffman, and Klaus Mølmer. High-fidelity Rydberg quantum gate via a two-atom dark state. Phys. Rev. A, 96:042306, 2017. DOI: 10.1103/PhysRevA.96.042306.

[36] Jin-Lei Wu, Yan Wang, Jin-Xuan Han, Shi-Lei Su, Yan Xia, Yongyuan Jiang, and Jie Song. Unselective ground-state blockade of Rydberg atoms for implementing quantum gates. arXiv:2107.09975, 2021. DOI: 10.1007/s11467-021-1104-7.

[37] Jin-Lei Wu, Yan Wang, Jin-Xuan Han, Shi-Lei Su, Yan Xia, Yongyuan Jiang, and Jie Song. Resilient quantum gates on periodically driven Rydberg atoms. Phys. Rev. A, 103:012601, 2021. DOI: 10.1103/PhysRevA.103.012601.

[38] L. S. Theis, F. Motzoi, F. K. Wilhelm, and M. Saffman. High-fidelity Rydberg-blockade entangling gate using shaped, analytic pulses. Phys. Rev. A, 94:032306, 2016. DOI: 10.1103/PhysRevA.94.032306.

[39] Shuai Liu, Jun-Hui Shen, Ri-Hua Zheng, Yi-Hao Kang, Zhi-Cheng Shi, Jie Song, and Yan Xia. Optimized nonadiabatic holonomic quantum computation based on Förster resonance in Rydberg atoms. Front. Phys., 17:21502, 2022. DOI: 10.1007/s11467-021-1108-3.

[40] Cai-Peng Shen, Jin-Lei Wu, Shi-Lei Su, and Erjun Liang. Construction of robust Rydberg controlled-phase gates. Opt. Lett., 44:2036, 2019. DOI: 10.1364/OL.44.002036.

[41] Chen-Yue Guo, L.-L. Yan, Shou Zhang, Shi-Lei Su, and Weibin Li. Optimized geometric quantum computation with a mesoscopic ensemble of Rydberg atoms. Phys. Rev. A, 102:042607, 2020. DOI: 10.1103/PhysRevA.102.042607.
[42] Steffen J. Glaser, Ugo Boscain, Tommaso Calarco, Christiane P. Koch, Walter Köckenberger, Ronnie Kosloff, Ilya Kuprov, Burkhard Luy, Sophie Schirmer, Thomas Schulte-Herbrüggen, Dominique Sugny, and Frank K. Wilhelm. Training Schrödinger's cat: Quantum optimal control: Strategic report on current status, visions and goals for research in Europe. *Eur. Phys. J. D*, 69: 279, 2015. DOI: 10.1140/epjd/e2015-60464-1.

[43] D. J. Egger and F. K. Wilhelm. Optimized controlled Z gates for two superconducting qubits coupled through a resonator. *Supercond. Sci. Technol.*, 27:014001, 2014. DOI: 10.1088/0953-2048/27/1/014001.

[44] J. Kelly, R. Barends, B. Campbell, Y. Chen, Z. Chen, B. Chiaro, A. Dunsworth, A. G. Fowler, I.-C. Hoi, E. Jeffrey, A. Megrant, J. Mutus, C. Neill, P. J. J. O'Malley, C. Quintana, P. Roushan, D. Sank, A. Vainsencher, J. Wenner, T. C. White, A. N. Cleland, and John M. Martinis. Optimal Quantum Control Using Randomized Benchmarking. *Phys. Rev. Lett.*, 112:240504, 2014. DOI: 10.1103/PhysRevLett.112.240504.

[45] Shang-Yu Huang and Hsi-Sheng Goan. Optimal control for fast and high-fidelity quantum gates in coupled superconducting flux qubits. *Phys. Rev. A*, 90:012318, 2014. DOI: 10.1103/PhysRevA.90.012318.

[46] M. Werninghaus, D. J. Egger, F. Roy, S. Machnes, F. K. Wilhelm, and S. Filipp. Leakage reduction in fast superconducting qubit gates via optimal control. *npj Quantum Inf*, 7:14, 2021. DOI: 10.1038/s41534-020-00346-2.

[47] V. Nebendahl, H. Haffner, and C. F. Roos. Optimal control of entangling operations for trapped ion quantum computing. *Phys. Rev. A*, 79:012312, 2009. DOI: 10.1103/PhysRevA.79.012312.

[48] T. Choi, S. Debnath, T. A. Manning, C. Figgatt, Z.-X. Gong, L.-M. Duan, and C. Monroe. Optimal Quantum Control of Multimode Couplings between Trapped Ion Qubits for Scalable Entanglement. *Phys. Rev. Lett.*, 112:190502, 2014. DOI: 10.1103/PhysRevLett.112.190502.

[49] Michael H Goerz, Tommaso Calarco, and Christiane P Koch. The quantum speed limit of optimal controlled phasegates for trapped neutral atoms. *J. Phys. B: At. Mol. Opt. Phys.*, 44:154011, 2011. DOI: 10.1088/0953-4075/44/15/154011.

[50] M. M. Müller, D. M. Reich, M. Murphy, H. Yuan, J. Vala, K. B. Whaley, T. Calarco, and C. P. Koch. Optimizing entangling quantum gates for physical systems. *Phys. Rev. A*, 84:042315, 2011. DOI: 10.1103/PhysRevA.84.042315.

[51] Michael H. Goerz, Eli J. Halperin, Jon M. Aytac, Christiane P. Koch, and K. Birgitta Whaley. Robustness of high-fidelity Rydberg gates with single-site addressability. *Phys. Rev. A*, 90:032329, 2014. DOI: 10.1103/PhysRevA.90.032329.

[52] A. Omran, H. Levine, A. Keesling, G. Semeghini, T. T. Wang, S. Ebadi, H. Bernien, A. S. Zibrov, H. Pichler, S. Choi, J. Cui, M. Rossignolo, P. Rembold, S. Montangero, T. Calarco, M. Endres, M. Greiner, V. Vuletić, and M. D. Lukin. Generation and manipulation of Schrödinger cat states in Rydberg atom arrays. *Science*, 365:570-574, 2019. DOI: 10.1126/science.aax9743.

[53] Jian Cui, Rick van Bijnen, Thomas Pohl, Simone Montangero, and Tommaso Calarco. Optimal control of Rydberg lattice gases. *Quantum Sci. Technol.*, 2:035006, 2017. DOI: 10.1088/2058-9565/aa7daf.

[54] A. Smith, B. E. Anderson, H. Sosa-Martinez, C. A. Riofrío, Ivan H. Deutsch, and Poul S. Jessen. Quantum Control in the Cs 6 S 1 / 2 Ground Manifold Using Radio-Frequency and Microwave Magnetic Fields. *Phys. Rev. Lett.*, 111:170502, 2013. DOI: 10.1103/PhysRevLett.111.170502.

[55] B. E. Anderson, H. Sosa-Martinez, C. A. Riofrío, Ivan H. Deutsch, and Poul S. Jessen. Accurate and Robust Unitary Transformations of a High-Dimensional Quantum System. *Phys. Rev. Lett.*, 114:240401, 2015. DOI: 10.1103/PhysRevLett.114.240401.

[56] Nathan K. Lysne, Kevin W. Kuper, Pablo M. Poggi, Ivan H. Deutsch, and Poul S. Jessen. Small, Highly Accurate Quantum Processor for Intermediate-Depth Quantum Simulations. *Phys. Rev. Lett.*, 124:230501, 2020. DOI: 10.1103/PhysRevLett.124.230501.

[57] Sven Jandura and Guido Pupillo. Figshare data repository, 2022. URL https://doi.org/10.6084/m9 figshare.19658427.
[58] F. Robicheaux, T. M. Graham, and M. Saffman. Photon-recoil and laser-focusing limits to Rydberg gate fidelity. *Phys. Rev. A*, 103:022424, 2021. DOI: 10.1103/PhysRevA.103.022424.

[59] Line Hjortshøj Pedersen, Niels Martin Møller, and Klaus Mølmer. Fidelity of quantum operations. *Physics Letters A*, 367:47-51, 2007. DOI: 10.1016/j.physleta.2007.02.069.

[60] Navin Khaneja, Timo Reiss, Cindie Kehlet, Thomas Schulte-Herbrüggen, and Steffen J. Glaser. Optimal control of coupled spin dynamics: Design of NMR pulse sequences by gradient ascent algorithms. *Journal of Magnetic Resonance*, 172:296-305, 2005. DOI: 10.1016/j.jmr.2004.11.004.

[61] A. Garon, S. J. Glaser, and D. Sugny. Time-optimal control of SU(2) quantum operations. *Phys. Rev. A*, 88:043422, 2013. DOI: 10.1103/PhysRevA.88.043422.

[62] Bilal Riaz, Cong Shuang, and Shahid Qamar. Optimal control methods for quantum gate preparation: A comparative study. *Quantum Inf Process*, 18:100, 2019. DOI: 10.1007/s11128-019-2190-0.

[63] Frank K. Wilhelm, Susanna Kirchhoff, Shai Machnes, Nicolas Wittler, and Dominique Sugny. An introduction into optimal control for quantum technologies. *arXiv:2003.10132*, 2020. DOI: 10.48550/arXiv.2003.10132.

[64] Jorge Nocedal and Stephen J. Wright. *Numerical Optimization*. Springer Series in Operation Research and Financial Engineering. Springer, New York, NY, 2. ed edition, 2006. ISBN 978-1-4939-3711-0 978-0-387-30303-1.

[65] Eric Jones, Travis Oliphant, Pearu Peterson, and others. SciPy: Open source scientific tools for Python, 2001.

[66] L. S. Pontryagin and Lucien W. Neustadt. *The Mathematical Theory of Optimal Processes*. Classics of Soviet Mathematics. Gordon and Breach Science Publishers, New York, english ed edition, 1986. ISBN 978-2-88124-077-5.

[67] E. B. Lee and L. Markus. *Foundations of Optimal Control Theory*. R.E. Krieger Pub. Co, Malabar, Fla, 1986. ISBN 978-0-89874-807-9.

[68] U. Boscain, M. Sigalotti, and D. Sugny. Introduction to the Pontryagin Maximum Principle for Quantum Optimal Control. *PRX Quantum*, 2:030203, 2021. DOI: 10.1103/PRXQuantum.2.030203.

[69] Seraph Bao, Silken Kleer, Ruoyu Wang, and Armin Rahmani. Optimal control of superconducting gmon qubits using Pontryagin's minimum principle: Preparing a maximally entangled state with singular bang-bang protocols. *Phys. Rev. A*, 97:062343, 2018. DOI: 10.1103/PhysRevA.97.062343.

[70] Chungwei Lin, Yebin Wang, Grigory Kolesov, and Uroš Kalabić. Application of Pontryagin's minimum principle to Grover's quantum search problem. *Phys. Rev. A*, 100:022327, 2019. DOI: 10.1103/PhysRevA.100.022327.

[71] Chungwei Lin, Dries Sels, and Yebin Wang. Time-optimal control of a dissipative qubit. *Phys. Rev. A*, 101:022320, 2020. DOI: 10.1103/PhysRevA.101.022320.

[72] L. Van Damme, Q. Ansel, S. J. Glaser, and D. Sugny. Robust optimal control of two-level quantum systems. *Phys. Rev. A*, 95:063403, 2017. DOI: 10.1103/PhysRevA.95.063403.

[73] Zhi-Cheng Yang, Armin Rahmani, Alireza Shabani, Hartmut Neven, and Claudio Chamon. Optimizing Variational Quantum Algorithms Using Pontryagin's Minimum Principle. *Phys. Rev. X*, 7:021027, 2017. DOI: 10.1103/PhysRevX.7.021027.

[74] Dong Eui Chang. A simple proof of the Pontryagin maximum principle on manifolds. *Automatica*, 47:630-633, 2011. DOI: 10.1016/j.automatica.2011.01.037.

[75] D. Barredo, S. Ravets, H. Labuhn, L. Béguin, A. Vernier, F. Nogrette, T. Lahaye, and A. Browaeys. Demonstration of a Strong Rydberg Blockade in Three-Atom Systems with Anisotropic Interactions. *Phys. Rev. Lett.*, 112:183002, 2014. DOI: 10.1103/PhysRevLett.112.183002.

[76] C. Ates, T. Pohl, T. Pattard, and J. M. Rost. Antiblockade in Rydberg Excitation of an Ultracold Lattice Gas. *Phys. Rev. Lett.*, 98:023002, 2007. DOI: 10.1103/PhysRevLett.98.023002.

[77] L. S. Theis and F. K. Wilhelm. Nonadiabatic corrections to fast dispersive multiqubit gates involving Z control. *Phys. Rev. A*, 95:022314, 2017. DOI: 10.1103/PhysRevA.95.022314.

[78] Mohammadsadegh Khazali and Klaus Mølmer. Fast Multiqubit Gates by Adiabatic Evolution in
Interacting Excited-State Manifolds of Rydberg Atoms and Superconducting Circuits. Phys. Rev. X, 10:021054, 2020. DOI: 10.1103/PhysRevX.10.021054.

[79] Yeelai Chew, Takafumi Tomita, Tirumalasetty Panduranga Mahesh, Seiji Sugawa, Sylvain de Léséleuc, and Kenji Ohmori. Ultrafast energy exchange between two single Rydberg atoms on the nanosecond timescale. arXiv:2111.12314, 2021. DOI: 10.48550/arXiv.2111.12314.

[80] N. Šibalić, J.D. Pritchard, C.S. Adams, and K.J. Weatherill. ARC: An open-source library for calculating properties of alkali Rydberg atoms. *Computer Physics Communications*, 220:319-331, 2017. DOI: 10.1016/j.cpc.2017.06.015.

[81] Thad G. Walker and M. Saffman. Consequences of Zeeman degeneracy for the van der Waals blockade between Rydberg atoms. *Phys. Rev. A*, 77:032723, 2008. DOI: 10.1103/PhysRevA.77.032723.