Introduction

Dynamical evolution of interacting quantum many-body systems is often intractable with classical computation. Controlled studies are best done in quantum simulators1,2,3,4 wherein the essential many-body dynamics is manifest but resides in an experimentally manageable configuration. Trapped ions3 owing to their inherent long-range interactions offer the ability to manipulate individual spin–spin interactions, in principle, arbitrarily.5 Long-range spin–spin interactions are straightforward to generate in ion trap quantum simulators, and additionally, can be controlled in their range, magnitude, and sign.6,7,8,9,10,11,12,13,14 Leveraging phonon modes to build inter-spin interactions is what makes a trapped ion system fully connected and thereby inherently higher dimensional. The advantages of full-connectivity between qubits have recently been harnessed in quantum computing experiments.15 Importantly, the full-connectivity potentially allows the ability to probe a rich variety of physical phenomena, such as quantum transport and localization, topological insulators,16 the Haldane model,17 as well as in topological quantum computation following the Kitaev honeycomb model.18

However, despite a few notable experiments and proposals,10,14,19,20,21,22 most quantum simulations have been limited to one-dimensional (1D) chain of ions due to the constraints of radio-frequency ion traps.23 While experimental efforts to broaden the number of ion traps with higher dimensional ion arrays are underway, significant experimental simplification is offered by leveraging existing 1D ion chains, especially considering remarkable progress, where N > 100 ions have been trapped in a linear geometry,24,25 and prospects for still larger system sizes looking optimistic in the future. In addition, existing experimental approaches can be experimentally resource-intensive, operating on either analog9,10,11,12,13,14,24,26,27,28,29,30 or digital31,32,33,34 quantum simulation protocols. Analog-digital hybrid protocols can incorporate the benefits offered by both approaches.35,36,37 In this work, we propose a hybrid quantum simulation that enables the dynamical engineering of a fully connected 1D ion chain to, in principle, an arbitrary 2D lattice (see Fig. 1). When the target lattice contains certain symmetries, for instance in the case of engineering rectangular lattices, our numerical results indicate that the quantum control required scales exceedingly favorably (\({\cal{O}}(N)\)) compared with other methods.

Fig. 1
figure 1

Schematic of a hybrid analog-digital quantum simulation of a 2D rectangular lattice via dynamical Hamiltonian engineering. a A 1D chain of N = 6 ions acts like a fully connected network of spins. Here the thickness of bonds represent the strength of couplings. The interactions in the ion network can be categorized into two classes, A (shown in solid red) and B (shown in dashed green). Only class A bonds are present in the target Hamiltonian. The interaction network can be modified by subjecting the system to b) a stroboscopic sequence of free evolution under the native Hamiltonian \(\pm \hat H_{{\mathrm{int}}}\) and single qubit (phase) gates \(\hat H_{{\mathrm{ext}}}\) acting simultaneously on all qubits. The average Hamiltonian of the system, \(\hat H_{{\mathrm{eff}}}\) resembles the target Hamiltonian \(\hat H_{{\mathrm{Target}}}\), here a 2 × 3 rectangular lattice, at discrete time steps, t = nTcyc (n = 1, 2, ), where Tcyc is the duration of pulse sequence in each cycle. The horizontal and the vertical couplings of the target Hamiltonian are specified by \(J_H^\prime\) and \(J_V^\prime\), respectively. A square lattice is obtained when \(J_H^\prime = J_V^\prime\)

Results

We propose a protocol for time-domain engineering of the interaction graph between trapped ion spins in a quantum simulator. The method relies on a repeated and stroboscopic application38,39,40 of the full interaction Hamiltonians \(\hat{H}_{{\mathrm{int}}}\) and \(-\hat H_{{\mathrm{int}}}\), and laser driven Stark shift gradients. A quantum simulator can be tuned such that the inter-spin interactions in a one-dimensional chain of trapped ions has the form,

$$\hat H_{{\mathrm{int}}} = \mathop {\sum}\limits_{i < j} {J_{ij}} \left( {\hat S_i^ + \hat S_j^ - + \hat S_i^ - \hat S_j^ + } \right),$$
(1)

where \(\hat S_i^ \pm = \hat S_{x_i} \pm i\hat S_{y_i}\) are the raising and lowering spin operators acting on spin i. The long-range couplings are characterized by

$$J_{ij} \approx \frac{{J_0}}{{\mid i - j\mid ^\alpha }},$$
(2)

where 0 < α < 3 sets the range of interactions.7,41 Here, J0 is the nearest-neighbor coupling strength. Without the loss of generality, we assume J0 > 0. Our goal is to modify the interaction profile in Eq. (2) such that the 1D spin-chain can be mapped onto rectangular lattices. We achieve this with the help of an external gradient field, represented by the Hamiltonian,

$$\hat H_{{\mathrm{ext}}} = \mathop {\sum}\limits_{i = 1}^N {\omega _i} \hat S_{z_i},$$
(3)

where \(\hat S_z\) is the z component of the spin-1/2 operator. If the external Hamiltonian, \(\hat H_{{\mathrm{ext}}}\), is applied for a duration τ, the Hamiltonian in Eq. (1) is transformed to \(\hat{\tilde H}_{{\mathrm{int}}} = e^{i\hat H_{{\mathrm{ext}}}\tau }\hat H_{{\mathrm{int}}}e^{ - i\hat H_{{\mathrm{ext}}}\tau } = \mathop {\sum}\nolimits_{i < j} {J_{ij}} \hat S_i^ + \hat S_j^ - e^{i\omega _{ij}\tau } + h.c.\), where ωij = ωi − ωj (note \(\omega _{ij} \gg J_{ij}\)). Thus the phase tags ϕij = ωijτ appear in \(\hat{\tilde H}_{{\mathrm{int}}}\). These phase tags give us a handle to modify the couplings Jij. Figure 1 shows a schematic of the Hamiltonian engineering scheme. It works by removing (decoupling) interactions (forthwith “class B” interactions) that are absent in the target Hamiltonian graph, while appropriately weighting (engineering) the other interactions (“class A”), all by the global manipulation of all spins in the linear ion chain. Thus, the experimental implementation is considerably simpler than a fully digital simulation model, which requires individual single and two qubit gates on the ion chain.

Our scheme consists of a periodic application (with a cycle time of Tcyc) of a multi-pulse sequence on all the qubits simultaneously, as shown in Fig. 1b. Each cycle consists of two multi-pulse blocks with alternating pulses of \(\pm \hat H_{{\mathrm{int}}}\) (with duration {tk}) and \(\hat H_{{\mathrm{ext}}}\) (with duration {τk}). \(\pm \hat H_{{\mathrm{int}}}\) in the first block are substituted by \(\mp \hat H_{{\mathrm{int}}}\) in the second block. As explained in the Supplementary Materials, the average Hamiltonian at the end of each cycle retains the form of Eq. (1), with modified couplings \(J_{ij}^\prime\) that depend on \(\{ t_k,\tau _k,\phi _{ij}^{(k)}\}\), where \(\phi _{ij}^{(k)} = \omega _{ij}\tau _k\). \(J_{ij}^\prime\) is related to Jij by,

$$J_{ij}^\prime (T_{{\mathrm{cyc}}}) = \frac{{J_{ij}}}{2}[\beta _{ij}(1 - e^{i\phi _{ij}^{({\mathrm{tot}})}})],$$
(4)

where

$$\beta _{ij} = \frac{2}{{T_{{\mathrm{cyc}}}}}\left[ { \pm t_1e^{i\phi _{ij}^{(1)}} \pm t_2e^{i(\phi _{ij}^{(1)} + \phi _{ij}^{(2)})} \cdots \pm t_le^{i\phi _{ij}^{({\mathrm{tot}})}}} \right],$$
(5)

with \(\phi _{ij}^{({\mathrm{tot}})} = \mathop {\sum}\nolimits_{k = 1}^l {\phi _{ij}^{(k)}}\). Our choice of the pulse sequence in each block results in real-valued βij. The total phase accumulated in one block, \(\phi _{ij}^{({\mathrm{tot}})}\) has to be an integer multiple of π for \(J_{ij}^\prime\) to be real-valued (Eq. (4)). For the most efficient use of this protocol, we use a labeling scheme for mapping the ions in the 1D chain to the target lattice and the external field gradient {ωij} such that \(\phi _{ij}^{({\mathrm{tot}})} = 2n\pi\) (n = 0, 1, 2, ), and hence \(J_{ij}^\prime = 0\) for as many class B couplings as possible. This is achieved by choosing a semi-linear gradient field, which can be engineered in experiments (see Methods section). The remaining couplings in class B are set to zero, versus the class A couplings which are scaled to their target values by appropriately choosing \(\{ t_k,\tau _k = \phi _{ij}^{(k)}/\omega _{ij}\}\) in Eq. (5). In a target square lattice, we require equal horizontal and vertical nearest-neighbor bonds, \(J_H^\prime = J_V^\prime\) as seen in Fig. 1a.

In an analogy to holography, the target Hamiltonian can be engineered by a Fourier expansion of the target couplings in the domain of phases imparted by the external field over the duration T = Tcyc/2 of a multi-pulse block. The Fourier ‘filtering’ function

$$F(\phi ) = a_0 + \mathop {\sum}\limits_{i^{\prime} = 1}^i {a_{i^{\prime} }} \cos (i^{\prime} W\phi )$$
(6)

is chosen such that \(F(\phi _{ij}^{({\mathrm{tot}})}) = \beta _{ij}\), where \(\phi _{ij}^{({\mathrm{tot}})} = (2n - 1)\pi\), and W is a fitting parameter. The coefficients {tk} in Eq. (5) are simply obtained from the Fourier coefficients {ai}, as explained in Methods. The Fourier engineering allows a powerful means to achieve the target Hamiltonian efficiently while exploiting its inherent symmetries. Most importantly, by dynamically modifying the Fourier filtering function, the engineered Hamiltonians can be dynamically modified. This opens several possibilities for studying quantum transport, dynamical phase transitions under a Hamiltonian quench,24,30,42,43 and thermalization44 and many-body localization45,46,47,48,49 in high dimensions.

Practically, the global spin–spin interactions (\(\pm \hat H_{{\mathrm{int}}}\)) are realized by laser driven Mølmer–Sørensen couplings6 and the single qubit phase gates (by \(\hat H_{{\mathrm{ext}}}\)) are realized by imprinting light shift (AC Stark shift) in the qubit frequency by an additional laser beam with an intensity gradient. The sign of the internal Hamiltonian (\(\pm \hat H_{{\mathrm{int}}}\)) can be flipped by changing the frequencies of global laser beams.50 The scheme can be extended to other 2D lattice geometries, 3D lattices, and can potentially be adapted to other systems with long-range interactions and control over individual spins. Our approach therefore offers both a simplification of control parameters and a favorable linear scaling with ion number, and offers compelling possibilities for exploiting the remarkable versatility of long-range coupled linear chain of ions for the generation of exotic engineered Hamiltonians.

Numerical simulations

We successfully reproduce the spin–spin interaction graph of target 2D square lattices at discrete evolution times t = nTcyc (n = 1, 2, ). We demonstrate control over dynamically changing the vertical and horizontal nearest neighbour bonds (\(J_{\mathrm{V}}^\prime\) and \(J_{\mathrm{H}}^\prime\) in Fig. 1a).

Figure 2a, b illustrates the results for a 2 × 3 and a 3 × 3 square lattice, respectively. These results are obtained using the labeling and field gradient schemes presented in Fig. 5 in Methods section. The semi-linear field gradient in Fig. 5 assigns \(\phi _{ij}^{({\mathrm{tot}})} = 2n\pi\) to most coupling in Class B and \(\phi _{ij}^{({\mathrm{tot}})} = (2n - 1)\pi\) to all Class A couplings. Decoupling interactions in Class B with an \(\phi _{ij}^{({\mathrm{tot}})} = (2n - 1)\pi\) and rescaling Class A interactions (e.g., \(J_{\mathrm{H}}^\prime = J_{\mathrm{V}}^\prime\) in Fig. 1a) are accomplished through the Fourier filtering functions F(ϕ) specified by coefficients {ai} (see Eq. (6) and Table 1). The first and second row of the table correspond, respectively, to {ai} for engineering a 2 × 3 and a 3 × 3 square lattice. The target lattices are engineered through application of multi-pulse sequences constructed from the given Fourier coefficients taking the steps discussed in Methods section. The Fourier expansion coefficients for engineering an m × m square lattice (\(m = \sqrt N\)) up to m = 7 are given in Supplementary Materials. In Fig. 3, we show that the number of pulses in each cycle scales linearly with the number of ions.

Fig. 2
figure 2

Numerical results for engineering a a 2 × 3 square lattice and b 3 × 3 square lattice. (i) The interaction graphs in the 1D ion chains with α = 0.2 are shown, along with a 2D color plot of the couplings Jij vs (i, j) in Eq. (2). The couplings are normalized to J0. (ii) The engineered interaction graph closely resembles the target interaction graph of the square lattices with an RMS error of <0.1%. The engineered couplings \(J_{ij}^{\prime\prime} = J_{ij}^\prime /{\mathrm{max}}\{ J_{ij}^\prime \}\) are shown vs (i, j) in the color plot. (iii) The evolution of the engineered lattice (red dots) is compared with the evolution of the target lattice (green curve). The system is initially prepared in a |ψ0〉 = |↑123456〉 and b |ψ0〉 = |↑123456789〉 state. The probability of measuring the state of the system in its initial state is shown over time

Table 1 Fourier expansion coefficients for a 2 × 3 and a 3 × 3 square lattice when α = 0.2 (see Eq. (2))
Fig. 3
figure 3

Scaling of number of pulses with system size. The number of pulses (includes \(\hat H_{{\mathrm{ext}}}\) and \(\pm \hat H_{{\mathrm{int}}}\)) in a time cycle, Tcyc required for engineering m × m square lattices scales linearly with the number of ions, N = m2 in a 1D chain

On the target square lattices, spins interact with strength \(J_{ij}^\prime\), which is non-zero only when the ion-pairs (i, j) are nearest neighbors in the target lattice. Since the interactions are decaying with distance in the original 1D chain, for α > 0 in Eq. (2), \(J_{{\mathrm{ij}}}^\prime\) can be at most J0/mα for an m′ × m square lattice.

The engineered interaction matrix formed by the couplings \(\{ J_{ij}^\prime \}\) matches the target interaction matrix of the 2D square lattice with an RMS error of <0.1%. Here we define the RMS error as \(\sqrt {\mathop {\sum}\nolimits_{ij} {(J_{ij}^\prime - J_{ij}^\prime ({\mathrm{Target}}))^2} } /\mathop {\sum}\nolimits_{ij} {|J_{ij}^\prime ({\mathrm{Target}})|}\). In Fig. 2, we also compare spin dynamics under the engineered lattice (red dots) with that of the ideal target (green curve), and find excellent agreement. Here the systems are initially prepared in |ψ0〉 = |↑123456〉 for N = 6 and |ψ0〉 = |↑123456789〉 for N = 9 at t = 0, when the pulse sequence is turned on. Here, |↑i〉 and |↓i〉 are the eigenstates of \(\hat S_z\) for the ith spin. The probability of the system being in |ψ0〉 (Fig. 2a(iii), b(iii)) follows the expected dynamics of the ideal 2D square lattice. These numerical simulations were performed using the time dependent master equation solver based on the QuTip python package.51,52

The near-perfect matching of the target and engineered spin dynamics in Fig. 2 indicates small intrinsic errors in the dynamical Hamiltonian engineering protocol. However, additional errors may creep into an experimental realization due to imperfect single qubit gates. In our numerical simulation, we find that RMS error between the target and engineered interaction matrices scales linearly with single qubit phase error, with 1% error in single qubit phase (in each pulse of \(\hat H_{{\mathrm{ext}}}\)) contributing to ~1.2% error in \(J_{ij}^\prime\).

A crucial feature of the protocol presented here is the ability to dynamically change the Hamiltonian within the same symmetry class, by changing the pulse sequence obtained from the Fourier decomposition of the target interaction profile. This enables simulation of many-body dynamics, such as quantum quench experiments that are hard to simulate numerically. As an example, we show a quench from two decoupled chains of three spins each into a 2 × 3 square lattice in Fig. 4. To simulate the decoupled chains, N3 couplings are set to zero (see Fig. 6 in Methods section) in estimating the Fourier filtering function and hence the multi-pulse sequence. The spin–spin correlations between the previously uncoupled chains start to build up after the quench. We show the engineered dynamics (red dots) of the two-point correlation functions C12(t) between spins 1 and 2 and C14(t) between spins 1 and 4. They follow closely to the ideal target dynamics (green line).

Fig. 4
figure 4

Dynamical changing of the target Hamiltonian. The Fourier filtering function, F(ϕ) in Eq. (6) can be updated at each time cycle to realize a dynamically changing target Hamiltonian. For example, here we perform a quench from two decoupled chains of three spins each into a 2 × 3 square lattice. a The correlation measure between spins 1 and 4 defined by \(C_{14}(t) = \langle S_z^1S_z^4\rangle - \langle S_z^1\rangle \langle S_z^4\rangle\). b The correlation measure between spins 1 and 2 defined by \(C_{12}(t) = \langle S_z^1S_z^2\rangle - \langle S_z^1\rangle \langle S_z^2\rangle\). The spin–spin correlations between the previously uncoupled chains start to build up after the quench, indicated by the dashed line. The engineered dynamics follow closely to the ideal target dynamics

Proposal for experimental implementation

The experimental implementation of the multi-pulse scheme can be achieved in a trapped ion system such as 171Yb+ trapped in a radio-frequency (Paul) trap. When the confining potential is sufficiently anisotropic, laser-cooled ions will form a linear chain.53 The hyperfine states |↓〉 ≡ |2S1/2, F = 0, mF = 0〉 and |↑〉 ≡ |2S1/2, F = 1, mF = 0〉 form the spin (qubit) states for this ion.54

The inter-spin interactions in Eq. (1) can be simulated12,13 by shining the ions with a laser beam that imparts optical dipole forces, using the Mølmer–Sørensen scheme.6 When the frequencies of the laser beams (referred to as the Mølmer–Sørensen detuning in this manuscript) are appropriately chosen to off-resonantly excite the center-of-mass collective vibrational (phonon) modes of the ion chain, a long-range interaction in the form of Eq. (2) can be obtained. The global sign of \(\hat H_{{\mathrm{int}}}\) can be flipped by changing the Mølmer–Sørensen detuning, with additional laser beams improving the accuracy as discussed in Supplementary Materials.

The field gradient in \(\hat H_{{\mathrm{ext}}}\) can be implemented with laser beams imprinting AC Stark shifts (ωi in Eq. (3)), and by spatially modulating the laser intensity using a spatial light modulator (SLM) or an acousto optic deflector (AOD). Another potentially easier experimental implementation will be to combine a global tightly focused laser beam with additional relatively low power beams created by an AOD. The global beam propagating along the axis of the ion chain can be focused before hitting the ions, such that its intensity varies linearly on the ion chain. The jumps in the gradient field can be added by beams created by an SLM or AOD and shining on the ions from the transverse direction. A 100 mW laser beam propagating along the ion chain, detuned from the 171Yb+ 2S1/2 − 2P1/2 resonance by 105 natural line-widths, and focused to ~2 microns will create a two-photon differential AC Stark shift gradient ωi on the order of ~1 MHz. Thus, the total time (τtot) that the Stark shifting beam is shining on the ions in a time cycle can be limited to a few microseconds, minimizing spontaneous emission errors.

Discussion

In summary, we have proposed an analog-digital hybrid quantum simulation protocol to dynamically engineer a 2D lattice in a linear chain of ions. For an arbitrary target lattice, the Hamiltonian engineering protocol presented here requires \({\cal{O}}(N^2)\) Fourier coefficients, hence the number of pulses. However, in presence of common symmetries between the target lattice and the external field gradient, as is the case for a square lattice, the number of pulses in the engineering time-sequence is drastically reduced to \({\cal{O}}(N)\). Note that we can also engineer the target lattice using \(\hat H_{{\mathrm{int}}}\) only instead of \(\pm \hat H_{{\mathrm{int}}}\) where all the interactions are scaled or set to zero by Fourier filtering function (Eq. (6)) alone. However, for small system sizes (N < 36), using \(\pm \hat H_{{\mathrm{int}}}\) instead of \(\hat H_{{\mathrm{int}}}\) reduces the number of pulses approximately by up to a factor of 2 (see Table 2 in Supplementary Materials).

The engineered interactions in the target 2D lattice will become weaker with increasing system size N, approximately as 1/N2 for small α in Eq. (2). This scaling in the interaction strength is inherited from the 1D chain for α ≈ 0. Since the separation between the vibrational normal modes in the ion chain will decrease with increasing N, the coupling strength J0 will have to scale down accordingly in order to avoid direct excitation of phonons that limit the validity of a spin-only Hamiltonian (see Supplementary Materials for more details). To engineer an m × m square lattice with equal nearest-neighbor couplings, nearest-neighbor couplings N1 of the 1D chain have to be scaled down to the mth neighbor coupling, Nm of the 1D chain (see Fig. 6 in Methods section). This further scales the target interaction in the 2D lattice down by 1/mα, making the overall scaling 1/N(2+α/2) for N = m2. However, for small α, the effect of 1/mα factor is small compared with 1/N2 scaling inherited from the original 1D chain. For the results presented here with N = 6 and N = 9 ions, we have chosen α = 0.2, which is experimentally realizable in current systems, and provides sufficiently strong target interactions. When α = 0.2, the target coupling of a 2 × 3 square lattice is estimated to be 2π × 300 Hz, while for a 3 × 3 square lattice, the target coupling is estimated to be 2π × 102 Hz. It should be noted that the average Hamiltonian theory employed here works when \(J_0T_{{\mathrm{cyc}}} \ll 1\). Due to the linear scaling of the number of pulses in a cycle with N (Fig. 3), Tcyc is expected to scale linearly. That is, longer simulation times are necessary as the system size increases. Since the initial coupling J0 scales as 1/N2 while Tcyc grows with N, the average Hamiltonian validity condition is readily satisfied for any system size.

While trapped ion qubits have long single qubit coherence time,9 scaling the simulation to a large number of spins where classical computation of dynamics may be intractable will require isolating experimental noise sources, such as intensity fluctuations of the global Mølmer–Sørensen and Stark shifting laser beams, and drifts in the collective phonon mode frequencies.

In a small chain of ions, the couplings are inhomogeneous. The errors due to the inhomogeneity can be mitigated by using an anharmonic trapping potential for the ions55 and spatially modulating the global Mølmer–Sørensen laser beams to increase the homogeneity of the couplings. The errors can also be reduced at the expense of increasing the number of pulses within a cycle and using a field gradient that breaks the symmetry between interactions belonging to an interaction class Nd where d = |j − i| is the distance between the spin pairs (i, j) in the 1D chain (see Methods section).

As the number of ions N increases, the spacing between the vibrational modes decreases for a given frequency bandwidth of the phonon spectrum, constrained by experimental resources (such as the radio-frequency power for a Paul trap). This will make it harder to engineer \(- \hat H_{{\mathrm{int}}}\) with a single global Mølmer–Sørensen beam that is detuned close to the center-of-mass mode. The accuracy of engineering \(- \hat H_{{\mathrm{int}}}\) is enhanced by introducing additional global beams with Mølmer–Sørensen detuning near the neighboring phonon modes as demonstrated in Supplementary Materials. Engineering \(- \hat H_{{\mathrm{int}}}\) for very large N will require either a large number of global Mølmer–Sørensen beams to cancel the effect of multiple modes, or reducing the overall intensity of laser beams resulting in a reduction in the strength of interactions (J0) in the 1D chain.

Methods

Labeling and field gradient scheme

To map the interactions Jij in the 1D spin-chain onto the target 2D rectangular lattice, we have categorized them into classes Nd (d = |j − i|), with N1 denoting the nearest-neighbor couplings in the 1D chain, N2 denoting the next nearest-neighbor couplings, and so on. Here, we ignore inhomogeneities due to the finite size effect. As seen in Fig. 5 top left corner, we employ a labeling scheme in which the N1 and Nm couplings form the horizontal and vertical bonds of an m′ × m target square lattice. That is class A = {N1, Nm}, with the exception of couplings Jkm,km+1, k = 1, …, m′ − 1, that form a toroidal linkage between the edges of the square lattice and must be excluded from class A.

Fig. 5
figure 5

Labeling and field gradient scheme for m′ × m rectangular (including square) lattices (m′ < m). Top left corner: N1 (the nearest neighbor in the 1D chain) and Nm (the mth neighbor in the 1D chain) form, respectively, the horizontal and vertical bonds of the target lattice. Main plot: The external field gradient profile, {ωi} in Eq. (3), increases linearly with a constant slope ω0 with some added jumps designed between the kmth and (km + 1)th ions (k = 1, 2, …, m′ − 1) such that Jkm,km+1 = 0

A semi-linear field gradient as illustrated in Fig. 5 assigns proper phase tags to the couplings in the original 1D chain. That is ϕ = (2n − 1)π to class A couplings with unique phase tags to Jkm,km+1 and ϕ = 2 to most class B couplings, n being an integer. The external field profile is assumed to increase linearly with a constant slope ω0 and added jumps of 2ω0 (for even m) or 3ω0 (for odd m) between the kmth and (km + 1)th spins to address the toroidal linkages Jkm,km+1. Hence,

$$\begin{array}{l}\omega _{i,i + 1} = \omega _0\,{\mathrm{for}}\,N_{\mathrm{1}}\,{\mathrm{except}}\,J_{km,km + 1},\\ \omega _{i,i + m} = (m + 2)\omega _0\,{\mathrm{for}}\,N_m\,{\mathrm{when}}\,m\,{\mathrm{is}}\,{\mathrm{odd,}}\\ \omega _{i,i + m} = (m + 1)\omega _0\,{\mathrm{for}}\,N_m\,{\mathrm{when}}\,m\,{\mathrm{is}}\,{\mathrm{even}}{\mathrm{.}}\end{array}$$

Given \(\phi = \phi _{ij}^{({\mathrm{tot}})} = \omega _{ij}\tau _{{\mathrm{tot}}}\), we can achieve desired phase tags upon adjusting ω0τtot = π.

Fourier filtering of interactions

The interactions that were not automatically be canceled by our chosen field gradient can be rescaled to their target value by designing a Fourier filter function F(ϕ) (see Eq. (6)). The N1 couplings in class A have to be rescaled to match the Nm couplings for α ≠ 0 in Eq. (2). In addition, the couplings in class B for which ϕ = (2n − 1)π have to be rescaled to zero. These scalings are performed through F(ϕ).

In Fig. 6, we show the Fourier filter function fit for engineering a 2 × 3 square lattice when α = 0.2. The nearest-neighbor couplings N1, except the toroidal linkage (J34) have a phase of ϕ = π. The N3 couplings accumulate a phase of 5π. Hence we require \(F(\pi )/F(5\pi ) = \frac{1}{{3^\alpha }} = 0.80\) such that N1 couplings (except J34) are equal to N3. The toroidal linkage J34 (ϕ = 3π) and N5 couplings (ϕ = 7π) are scaled to zero. We have introduced a global rescaling factor to all the target couplings, by setting F(5π) = 0.7. The global rescaling of all the target couplings ensures an efficient Fourier fit with minimum number of parameters.

Fig. 6
figure 6

Constructing the Fourier filtering function. For a 2 × 3 square lattice, the filtering function, F(ϕ) in Eq. (6) is fit to the Fourier series target scaling parameters, βij in Eq. (5). The external field gradient in Eq. (3) creates a phase of \(\phi = \phi _{ij}^{({\mathrm{tot}})} = \omega _{ij}\tau _{{\mathrm{tot}}}\) for all the couplings Jij that need to be rescaled by the same factor βij. The Fourier series coefficients directly give the duration of the pulses {tk} within a time cycle of the simulation

In general, the Fourier filter function should satisfy \(F(\phi = \phi _{ij}^{({\mathrm{tot}})}) = \beta _{ij}\) for all couplings with a phase ϕ = (2n − 1)π to engineer target Hamiltonian graph. By comparing Eq. (5) with Eq. (6), one can find the proper multi-pulse sequence for implementing the Fourier filtering function F(ϕ) by taking the following steps:

  1. 1.

    The number of single-qubit phase gates (by \(\hat H_{{\mathrm{ext}}}\)) l in each block is l = 2i + 1, where the number of Fourier terms in Eq. (6) is i + 1.

  2. 2.

    The pulse sequence in each block is anti-symmetric about the central \(\hat H_{{\mathrm{ext}}}\) pulse. That is tk = tlk and \(\pm \hat H_{{\mathrm{int}}_k} = \mp \hat H_{{\mathrm{int}}_{l - k}}\) for k = 1, …, l − 1. This leads to the cancellation of all even order correction terms to the average Hamiltonian.

  3. 3.

    The time intervals {tk} are proportional to the coefficients in the Fourier filter function: tk = T|ak|/2 for k = 1, …, l − 1 and tl = T|a0|, with the constraint that \(\mathop {\sum}\nolimits_{j = 0}^l {|a_j| = 1}\). This constraint can be relaxed for an efficient search for the Fourier coefficients at the expense of reducing all the couplings in the target lattice by a global rescaling factor. Numerically, we find that βi,i+m = 0.7 allows us to find efficient solutions for up to N = 100.

  4. 4.

    A negative coefficient (aj < 0) in Eq. (6) is implemented by an \(\hat H_{{\mathrm{ext}}}\) pulse followed by \(- \hat H_{{\mathrm{int}}}\). If we want to use \(\hat H_{{\mathrm{int}}}\) only instead of \(\pm \hat H_{{\mathrm{int}}}\) the Fourier search must be performed under the constraint that aj > 0 for all j.

  5. 5.

    We choose the phase gates to be of equal duration τ, except the central phase gate in each block which has to have a duration of τ′ = τtot − (l − 1)τ. τ can be read-off from W = τ/τtot.