## Introduction

The quantum computers will dramatically accelerate particular computational tasks compared to the classical computers1. Over the last 25 years, various quantum systems have been explored and used for the experimental realization of quantum computational tasks, including trapped ions2, trapped atoms3, photons4, superconducting quantum circuits5, quantum dots6, doped solids7, etc. Among these, superconducting qubits made recently headlines by demonstrating quantum supremacy8, while trapped ions hold the records both in single-qubit9,10 and two-qubit gate fidelity11,12.

The enabling condition for quantum computation is the ability to perform high-fidelity single- and two-qubit quantum gates. Usually, the resonant quantum gates rely on an effective resonant interaction between the qubits which, however, makes the gate implementation sensitive to parameter fluctuations. Alternatively, the quantum gates can be carried out by using adiabatic techniques, which are slower in time but more robust with respect to parameter fluctuations.

An essential building block of quantum algorithms is the quantum Fourier transform. In both quantum cloud with real quantum computing devices13,14 and emulators of classical computers15,16,17, QFT has been used as a representative quantum algorithm for demonstrating the usefulness of quantum computing.

In this work, we propose an adiabatic implementation of the two-qubit quantum Fourier transform by using a Hamiltonian which possesses the circulant symmetry. The unique property of the circulant matrices is that their eigenvectors are the Fourier modes. Moreover, their eigenvectors do not depend on the magnitude of the Hamiltonian parameters as long as the circulant symmetry is preserved. Such a circulant symmetry was studied as an efficient method for creation of superposition states in a single atom placed in a ring of quantum wells18, as well as for implementation of a single-qubit gate19. Here we consider a quantum system, which consists of two interacting spins in the presence of magnetic field. We show that by proper adjustment of the spin-spin coupling and the single-qubit drive one can achieve a spin Hamiltonian with the circulant symmetry. Our method relies on using adiabatic evolution which drives the system into the eigenstates of the circulant Hamiltonian and thereby realizes the quantum Fourier gate in a single interaction step. The adiabatic transition is performed by introducing a time-dependent energy offset of the spin states, which breaks the circulant symmetry but vanishes at the end of the transition. We show that by a proper choice of the time-dependent couplings and detuning one can adiabatically transform any initial state into a superposition of quantum Fourier modes with high fidelity.

Since our technique relies on adiabatic evolution it is robust against parameter fluctuations and is mainly limited by the nonadiabatic transitions. We show that for a specific choice of the parameters one can find exactly the eigenvectors of the full spin Hamiltonian at any instance of time. This allows us to combine our gate scheme with the shortcuts to adiabaticity techniques20 which can be used to suppress the effect of nonadiabatic transitions and thus to reduce the gate time.

We discuss the physical implementation of our gate scheme in a linear ion crystal driven by bichromatic laser fields. Such an interaction creates a coupling between the internal states of the trapped ions with the collective vibrational modes. We consider the dispersive regime in which the beatnote laser frequency is far off-resonant to any vibrational mode frequency. In this regime the collective phonons can be traced out leading to an effective spin-spin interaction. Such a regime where the phonons are only virtually excited was studied in the context of high-fidelity two-qubit gate implementation21,22,23. We show that by controlling the laser detuning we can perform the desired adiabatic evolution to the quantum Fourier modes.

The paper is organized as follows. In Sec. II we provide the general framework of the circulant-symmetric spin-spin Hamiltonian. In Sec. III we discuss the adiabatic transition to the quantum Fourier modes. The physical realization of the circulant Hamiltonian using a laser driven ion crystal is discussed in Sec. IV. In Sec. V we provide numerical estimation for the two-qubit gate fidelity as well as the fidelity for the creation of entangled states. Finally, the conclusions are presented in Sec. VII.

## Model

We begin by considering two interacting spins which are subjected to a magnetic field. The Hamiltonian of the system is given by

$$\begin{array}{lll} {\hat{H}} & = & J({\widehat{\sigma }}_{1}^{+}{e}^{-i{\varphi }_{1}}+{\widehat{\sigma }}_{1}^{-}{e}^{i{\varphi }_{1}})({\widehat{\sigma }}_{2}^{+}{e}^{-i{\varphi }_{2}}+{\widehat{\sigma }}_{2}^{-}{e}^{i{\varphi }_{2}})\\ & & +{\Omega }_{1}({\widehat{\sigma }}_{1}^{+}{e}^{i{\phi }_{1}}+{\widehat{\sigma }}_{1}^{-}{e}^{-i{\phi }_{1}})+{\Omega }_{2}({\widehat{\sigma }}_{2}^{+}{e}^{i{\phi }_{2}}+{\widehat{\sigma }}_{2}^{-}{e}^{-i{\phi }_{2}}),\end{array}$$
(1)

where $${\sigma }_{k}^{+}=\left|{\uparrow }_{k}\right\rangle \left\langle {\downarrow }_{k}\right|$$ and $${\sigma }_{k}^{-}=\left|{\downarrow }_{k}\right\rangle \left\langle {\uparrow }_{k}\right|$$ are the spin flip operators with $$\left|{\uparrow }_{k}\right\rangle$$ and $$\left|{\downarrow }_{k}\right\rangle$$ being the qubit states of the kth spin (k = 1, 2). The first term in  (1) describes the spin-spin interaction which is quantified by the coupling strength J and phase φk. The second and the third terms describe the single-qubit transitions with Rabi frequencies Ω1 and Ω2 and phases ϕ1 and ϕ2. It is convenient to express the Hamiltonian in the computational basis formed by the qubit states $$\{\left|\downarrow \downarrow \right\rangle ,\left|\downarrow \uparrow \right\rangle ,\left|\uparrow \downarrow \right\rangle ,\left|\uparrow \uparrow \right\rangle \}$$. Then the Hamiltonian becomes the 4 × 4 hermitian matrix

$$H=\left[\begin{array}{llll}0 & {\Omega }_{2}{e}^{-i{\phi }_{2}} & {\Omega }_{1}{e}^{-i{\phi }_{1}} & J{e}^{i({\varphi }_{1}+{\varphi }_{2})}\\ {\Omega }_{2}{e}^{i{\phi }_{2}} & 0 & J{e}^{-i({\varphi }_{2}-{\varphi }_{1})} & {\Omega }_{1}{e}^{-i{\phi }_{1}}\\ {\Omega }_{1}{e}^{i{\phi }_{1}} & J{e}^{i({\varphi }_{2}-{\varphi }_{1})} & 0 & {\Omega }_{2}{e}^{-i{\phi }_{2}}\\ J{e}^{-i({\varphi }_{1}+{\varphi }_{2})} & {\Omega }_{1}{e}^{i{\phi }_{1}} & {\Omega }_{2}{e}^{i{\phi }_{2}} & 0\end{array}\right].$$
(2)

In the following our goal is to find the conditions for the couplings J and Rabi frequencies Ω1, Ω2 as well as for the phases ϕk and φk such that the Hamiltonian (2) becomes a circulant matrix. The important property of the circulant matrix is that its eigenvectors are the vector columns of the discrete quantum Fourier transform24. Consequently, the eigenvectors do not depend on the elements of the circulant matrix but on the circulant symmetry only. The most general 4 × 4 circulant matrix has the following structure24:

$$C=\left[\begin{array}{llll}{c}_{0} & {c}_{3} & {c}_{2} & {c}_{1}\\ {c}_{1} & {c}_{0} & {c}_{3} & {c}_{2}\\ {c}_{2} & {c}_{1} & {c}_{0} & {c}_{3}\\ {c}_{3} & {c}_{2} & {c}_{1} & {c}_{0}\end{array}\right],$$
(3)

where cp (p = 0, …, 3) are arbitrary complex numbers. As can be seen the circulant matrix is completely defined by its first vector column (row) in the sense that all other columns (rows) are just cyclic permutations of it. In the computational spin basis the eigenvectors of the 4 × 4 circulant matrix can be expressed as

$$\left|{\psi }_{0}\right\rangle =\frac{1}{2}\{\left|\downarrow \downarrow \right\rangle +\left|\downarrow \uparrow \right\rangle +\left|\uparrow \downarrow \right\rangle +\left|\uparrow \uparrow \right\rangle \},$$
(4a)
$$\left|{\psi }_{1}\right\rangle =\frac{1}{2}\{\left|\downarrow \downarrow \right\rangle +i\left|\downarrow \uparrow \right\rangle -\left|\uparrow \downarrow \right\rangle -i\left|\uparrow \uparrow \right\rangle \},$$
(4b)
$$\left|{\psi }_{2}\right\rangle =\frac{1}{2}\{\left|\downarrow \downarrow \right\rangle -\left|\downarrow \uparrow \right\rangle +\left|\uparrow \downarrow \right\rangle -\left|\uparrow \uparrow \right\rangle \},$$
(4c)
$$\left|{\psi }_{3}\right\rangle =\frac{1}{2}\{\left|\downarrow \downarrow \right\rangle -i\left|\downarrow \uparrow \right\rangle -\left|\uparrow \downarrow \right\rangle +i\left|\uparrow \uparrow \right\rangle \}.$$
(4d)

These four vectors (4a),(4b),(4c),(4d) are the columns of the 4 × 4 quantum Fourier transform matrix. Thus, by preparing the system in the eigenstates of the circulant Hamiltonian one can implement the two-qubit quantum Fourier transform.

In order to fulfill the circulant cyclic permutation symmetry we consider two different cases.

Case 1: We have

$$J={\Omega }_{2},\quad {\Omega }_{1}=0,\quad {\varphi }_{2}={\phi }_{2}=\varphi ,\quad {\varphi }_{1}=2p\pi ,$$
(5)

with p being integer. The first condition requires the spin-spin coupling to be equal to the Rabi frequency on the second spin. The circulant symmetry of the Hamiltonian (2) leaves arbitrariness in the choice of the Rabi frequency on the first spin. Here we have set to zero, Ω1 = 0. Using this, the Hamiltonian (2) becomes a circulant matrix and can be rewritten as

$${ {\hat{H}} }_{{\rm{cir}}}^{(1)}=J({\widehat{\sigma }}_{1}^{+}+{\widehat{\sigma }}_{1}^{-})({\widehat{\sigma }}_{2}^{+}{e}^{-i\varphi }+{\widehat{\sigma }}_{2}^{-}{e}^{i\varphi })+J({\widehat{\sigma }}_{2}^{+}{e}^{i\varphi }+{\widehat{\sigma }}_{2}^{-}{e}^{-i\varphi }).$$
(6)

Case 2: The same conditions as (5) but now with

$${\Omega }_{1}\ne 0,\quad {\phi }_{1}=p\pi .$$
(7)

Again the Hamiltonian is circulant and can be expressed as

$${ {\hat{H}} }_{{\rm{cir}}}^{(2)}=J({\widehat{\sigma }}_{1}^{+}+{\widehat{\sigma }}_{1}^{-})({\widehat{\sigma }}_{2}^{+}{e}^{-i\varphi }+{\widehat{\sigma }}_{2}^{-}{e}^{i\varphi })+J({\widehat{\sigma }}_{2}^{+}{e}^{i\varphi }+{\widehat{\sigma }}_{2}^{-}{e}^{-i\varphi })+{\Omega }_{1}({\widehat{\sigma }}_{1}^{+}+{\widehat{\sigma }}_{1}^{-}).$$
(8)

We will show latter on that the additional Rabi frequency Ω1 in the circulant Hamiltonian in Case 2 can be used to improve significantly the adiabatic evolution even when the spin-spin coupling J is rather small.

## Adiabatic Transition to Fourier Modes

In order to implement the two-qubit Fourier transform we assume that additionally to the circulant Hamiltonian time-dependent frequency shifts are applied such that the total Hamiltonian becomes

$${\hat{H}} (t)={ {\hat{H}} }_{0}(t)+{ {\hat{H}} }_{{\rm{cir}}}^{(j)}(t),$$
(9)

with

$${ {\hat{H}} }_{0}(t)={\Delta }_{1}(t){\widehat{\sigma }}_{1}^{z}+{\Delta }_{2}(t){\widehat{\sigma }}_{2}^{z},$$
(10)

where Δk(t) is the time-dependent detuning of the kth spin. Such a term is needed to control the adiabatic transition of the computational spin states to the quantum Fourier states (4a)(4b)(4c)(4d).

Let us assume that initially the system is prepared in one of the computational product states $$\left|{\psi }_{{s}_{1}{s}_{2}}\right\rangle =\left|{s}_{1}{s}_{2}\right\rangle$$ (sk = ↓k, ↑k) which is an eigenstate of the Hamiltonian $${ {\hat{H}} }_{0}(t)$$. As long as at the initial moment ti the detuning Δ1,2(ti) is mich higher than the couplings J(ti), Ω1(ti), i.e. Δ1,2(ti) J(ti), Ω1(ti) the respective eigenstates of the Hamiltonian (9) coincide with the computational spin states, namely $$\left|\psi ({t}_{{\rm{i}}})\right\rangle =\left|{\psi }_{{s}_{1}{s}_{2}}\right\rangle$$. Then we adiabatically decrease in time the detunings Δ1(t) and Δ2(t) to zero, while we increase the couplings J(t) and Ω1(t) such that in the end we have $${ {\hat{H}} }_{0}({t}_{f})\to 0$$ and $${\hat{H}} (t)\to { {\hat{H}} }_{{\rm{cir}}}^{(j)}(t)$$. In the adiabatic limit, the system remains in the same eigenstate of the full Hamiltonian $${\hat{H}} (t)$$ at all times. With the chosen time behavior of the couplings and the detunings, each such eigenstate is equal to a computational spin state (eigenstate of $${ {\hat{H}} }_{0}$$) in the beginning, $$\left|\psi ({t}_{{\rm{i}}})\right\rangle =\left|{\psi }_{{s}_{1}{s}_{2}}\right\rangle$$, and to a Fourier state (eigenstate of $${ {\hat{H}} }_{{\rm{cir}}}^{(j)}(t)$$) in the end, $$\left|\psi ({t}_{f})\right\rangle =\left|{\psi }_{p}\right\rangle$$ (p = 0, 1, 2, 3). Hence the adiabatic evolution maps each computational spin state onto a Fourier state, thereby producing the quantum Fourier transform in a single interaction step.

The adiabatic evolution requires that the separation between the eigenefrequencies $${\lambda }_{\pm }^{(j)}$$ and $${\mu }_{\pm }^{(j)}$$ of $${\hat{H}} (t)$$ is larger at any instance of time than the nonadiabatic coupling between each pair of the eigenstates $$\left|{\lambda }_{\pm }^{(j)}\right\rangle$$ and $$\left|{\mu }_{\pm }^{(j)}\right\rangle$$ of $${\hat{H}} (t)$$, i.e.

$$| {\lambda }_{\pm }^{(j)}(t)-{\mu }_{\pm }^{(j)}(t)| \gg | \langle {\partial }_{t}{\lambda }_{\pm }^{(j)}(t)| {\mu }_{\pm }^{(j)}(t)\rangle | ,$$
(11a)
$$| {\mu }_{+}^{(j)}(t)-{\mu }_{-}^{(j)}(t)| \gg | \langle {\partial }_{t}{\mu }_{+}^{(j)}(t)| {\mu }_{-}^{(j)}(t)\rangle | .$$
(11b)

For smoothly varying Hamiltonian parameters adiabatic evolution usually demands that the interaction duration T is large compared to the inverse of the smallest coupling or detuning implying large pulse areas and/or large detuning areas.

### Case 1

Let us consider the eigenspectrum of the total Hamiltonian (9). Consider first the circulant Hamiltonian $${H}_{{\rm{cir}}}^{(1)}$$, i.e. $${\hat{H}} (t)={ {\hat{H}} }_{0}(t)+{H}_{{\rm{cir}}}^{(1)}$$. We find that the eigenfrequencies of $${\hat{H}} (t)$$ are

$${\lambda }_{\pm }^{(1)}=\pm {\left\{2{J}^{2}+{\Delta }_{1}^{2}+{\Delta }_{2}^{2}+2{[{J}^{4}{\cos }^{2}2\varphi +{\Delta }_{1}^{2}({J}^{2}+{\Delta }_{2}^{2})]}^{\frac{1}{2}}\right\}}^{\frac{1}{2}},$$
(12a)
$${\mu }_{\pm }^{(1)}=\pm {\left\{2{J}^{2}+{\Delta }_{1}^{2}+{\Delta }_{2}^{2}-2{[{J}^{4}{\cos }^{2}2\varphi +{\Delta }_{1}^{2}({J}^{2}+{\Delta }_{2}^{2})]}^{\frac{1}{2}}\right\}}^{\frac{1}{2}},$$
(12b)

which correspond to the eigenvectors $$\left|{\lambda }_{\pm }^{(1)}\right\rangle$$ and $$\left|{\mu }_{\pm }^{(1)}\right\rangle$$. Note that in order to drive the adiabatic transition we require that the eigenfrequencies are nondegenerate at any instance of time. Otherwise the system may evolve into a superposition of Fourier states which will spoil the gate implementation. Initially we begin with Δ1,2(ti) J(ti), such that the eigenfrequencies are $${\lambda }_{\pm }^{(1)}({t}_{{\rm{i}}})=\pm ({\Delta }_{1}({t}_{{\rm{i}}})+{\Delta }_{2}({t}_{{\rm{i}}}))$$ and respectively, $${\mu }_{\pm }^{(1)}({t}_{{\rm{i}}})=\pm ({\Delta }_{1}({t}_{{\rm{i}}})-{\Delta }_{2}({t}_{{\rm{i}}}))$$. Hence in order to have nondegenerate spectrum we require Δ1(ti) ≠ Δ2(ti). The eigenfrequencies will be equidistant if Δ1(ti)/$${\Delta }_{2}({t}_{{\rm{i}}})=\frac{1}{3}$$ or 3.

At the final instance of time where Δ1,2(tf) J(tf) the Hamiltonian possesses circulant symmetry. At this final stage of the adiabatic transition the eigenfrequencies becomes

$${\lambda }_{\pm }^{(1)}({t}_{{\rm{f}}})=\pm 2J({t}_{{\rm{f}}})\cos (\varphi ),\quad {\mu }_{\pm }^{(1)}({t}_{{\rm{f}}})=\pm 2J({t}_{{\rm{f}}})\sin (\varphi ),$$
(13)

with corresponding eigenvectors $$\left|{\lambda }_{+}^{(1)}\right\rangle =\left|{\psi }_{0}\right\rangle$$, $$\left|{\lambda }_{-}^{(1)}\right\rangle =\left|{\psi }_{2}\right\rangle$$, $$\left|{\mu }_{+}^{(1)}\right\rangle =\left|{\psi }_{1}\right\rangle$$ and $$\left|{\mu }_{-}^{(1)}\right\rangle =\left|{\psi }_{3}\right\rangle$$. As can be seen there exist a finite energy gap for any phase φ except for φ = nπ/4, (n = 0, ±1, ±2, …) where the spectrum becomes degenerate. The gaps are equal when $$\tan (\varphi )=\frac{1}{3}$$ or 3, i.e. when $$\varphi =\arctan (3)\approx 0.3976\pi$$ or $$\varphi =\arctan (1/3)\approx 0.1024\pi$$.

To summarize, the conditions for the scheme to work in this case are

$${\Delta }_{1}({t}_{{\rm{i}}})\ne {\Delta }_{2}({t}_{{\rm{i}}}),$$
(14a)
$$\varphi \ne n\pi /4\quad (n\,{\rm{integer}}).$$
(14b)

### Case 2

Alternatively, one can drive the adiabatic transition to the Fourier states using the circulant Hamiltonian $${ {\hat{H}} }_{{\rm{cir}}}^{(2)}$$, i.e. $${\hat{H}} (t)={ {\hat{H}} }_{0}(t)+{H}_{{\rm{cir}}}^{(2)}$$. In order to get insight of the eigenfrequencies we set the phase to φ = π/4 which allows analytical treatment. We find

$$\begin{array}{lll}{\lambda }_{\pm }^{(2)} & = & \pm \left\{2{J}^{2}+{\Omega }_{1}^{2}+{\Delta }_{1}^{2}+{\Delta }_{2}^{2}\right.\\ & & +\,{\left.2{[{J}^{2}(2{\Omega }_{1}^{2}+{\Delta }_{1}^{2})+{\Delta }_{2}^{2}({\Omega }_{1}^{2}+{\Delta }_{1}^{2})]}^{\frac{1}{2}}\right\}}^{\frac{1}{2}},\end{array}$$
(15a)
$$\begin{array}{lll}{\mu }_{\pm }^{(2)} & = & \pm \{2{J}^{2}+{\Omega }_{1}^{2}+{\Delta }_{1}^{2}+{\Delta }_{2}^{2}\\ & & -\,{\left.2{[{J}^{2}(2{\Omega }_{1}^{2}+{\Delta }_{1}^{2})+{\Delta }_{2}^{2}({\Omega }_{1}^{2}+{\Delta }_{1}^{2})]}^{\frac{1}{2}}\right\}}^{\frac{1}{2}}.\end{array}$$
(15b)

We denote the corresponding instantaneous eigenvectors by $$\left|{\lambda }_{\pm }^{(2)}\right\rangle$$ and $$\left|{\mu }_{\pm }^{(2)}\right\rangle$$. Again initially we start with Δ1,2(ti) J(ti), Ω1(ti) which indicates that $${\lambda }_{\pm }^{(2)}({t}_{{\rm{i}}})=\pm ({\Delta }_{1}({t}_{{\rm{i}}})+{\Delta }_{2}({t}_{{\rm{i}}}))$$ and respectively $${\mu }_{\pm }^{(2)}({t}_{{\rm{i}}})=\pm ({\Delta }_{1}({t}_{{\rm{i}}})-{\Delta }_{2}({t}_{{\rm{i}}}))$$. As in Case 1, the condition Δ1(ti) ≠ Δ2(ti) must be fulfilled in order to avoid degeneracy. Equidistant eigenfrequencies occur initially if Δ1(ti) = 3Δ2(ti) or Δ2(ti) = 3Δ1(ti). In the end, J(tf), Ω1(tf) Δ1,2(tf), the system arrives in an eigenstate of the circulant Hamiltonian $${H}_{{\rm{cir}}}^{(2)}$$. For any value of φ the circulant eigenfrequencies at tf are given by

$$\begin{array}{ccc} & & {\lambda }_{+}^{(2)}({t}_{{\rm{f}}})={\Omega }_{1}+2J\cos (\varphi ),\quad {\lambda }_{-}^{(2)}({t}_{{\rm{f}}})=-{\Omega }_{1}-2J\sin (\varphi ),\\ & & {\mu }_{+}^{(2)}({t}_{{\rm{f}}})={\Omega }_{1}-2J\cos (\varphi ),\quad {\mu }_{-}^{(2)}({t}_{{\rm{f}}})=-{\Omega }_{1}+2J\sin (\varphi ),\end{array}$$
(16)

with corresponding eigenvectors $$\left|{\lambda }_{+}^{(2)}\right\rangle =\left|{\psi }_{0}\right\rangle$$, $$\left|{\lambda }_{-}^{(2)}\right\rangle =\left|{\psi }_{3}\right\rangle$$, $$\left|{\mu }_{+}^{(2)}\right\rangle =\left|{\psi }_{1}\right\rangle$$, and $$\left|{\mu }_{-}^{(2)}\right\rangle =\left|{\psi }_{2}\right\rangle$$. Assuming that Ω1 ≠ 2J we see that the spectrum is nondegenerate except for φ = nπ/2 with n being integer.

### Transitions

Let us now discuss the set of transitions which realize the quantum Fourier transform. For concreteness we focus on the case with Ω1 ≠ 0 and choose the phase φ = π/4, with eigenfrequencies  (15a), (15b). Initially, each of the computational spin states coincide with the eigenvectors of the Hamiltonian (9), namely $$\left|{\lambda }_{+}^{(2)}\right\rangle =\left|\uparrow \uparrow \right\rangle$$, $$\left|{\lambda }_{-}^{(2)}\right\rangle =\left|\downarrow \downarrow \right\rangle$$, and $$\left|{\mu }_{+}^{(2)}\right\rangle =\left|\uparrow \downarrow \right\rangle$$, $$\left|{\mu }_{-}^{(2)}\right\rangle =\left|\downarrow \uparrow \right\rangle$$. The realization of the quantum Fourier transform relies on the adiabatic following of each of the instantaneous eigenvectors,

$$\left|\downarrow \downarrow \right\rangle \to {e}^{i{\alpha }_{2}}\left|{\psi }_{3}\right\rangle ,$$
(17a)
$$\left|\downarrow \uparrow \right\rangle \to -i{e}^{i{\beta }_{2}}\left|{\psi }_{1}\right\rangle ,$$
(17b)
$$\left|\uparrow \downarrow \right\rangle \to {e}^{-i{\beta }_{2}}\left|{\psi }_{2}\right\rangle ,$$
(17c)
$$\left|\uparrow \uparrow \right\rangle \to {e}^{-i{\alpha }_{2}}\left|{\psi }_{0}\right\rangle .$$
(17d)

Here $${\alpha }_{2}={\int }_{{t}_{{\rm{i}}}}^{{t}_{{\rm{f}}}}{\lambda }_{+}^{(2)}(t)dt$$ and $${\beta }_{2}={\int }_{{t}_{{\rm{i}}}}^{{t}_{{\rm{f}}}}{\mu }_{+}^{(2)}(t)dt$$ are the global adiabatic phases which appear due to the adiabatic evolution. As we will show latter on by a proper choice of the detunings Δ1,2 the adiabatic phases can be tuned to be α2 = 2pπ and β2 = 2mπ with p and m being integers. This choice realises the following gate

$${G}_{\frac{\pi }{4}}=\frac{1}{2}\left[\begin{array}{llll}1 & -i & 1 & 1\\ -i & 1 & -1 & 1\\ -1 & i & 1 & 1\\ i & -1 & -1 & 1\end{array}\right].$$
(18)

Up to an additional phase factor −π/2 in the second column, the matrix (18) resembles the quantum Fourier transform for two qubits. This phase factor appears due to the determinant invariance during the adiabatic evolution, which imposes the requirement $$\det \,{G}_{\frac{\pi }{4}}=1$$.

Finally, we point out that if we replace φ = π/4 by φ = − π/4 then two of the circulant eigenfrequencies  (16) interchange $${\lambda }_{-}^{(2)}\leftrightarrow {\mu }_{-}^{(2)}$$ and hence the adiabatic following of the eigenstates implies that $$\left|\downarrow \downarrow \right\rangle \to {e}^{i{\alpha }_{2}}\left|{\psi }_{1}\right\rangle$$ and $$\left|\downarrow \uparrow \right\rangle \to i{e}^{i{\beta }_{2}}\left|{\psi }_{3}\right\rangle$$. Hence the unitary matrix for this case becomes $${G}_{-\frac{\pi }{4}}={\left({G}_{\frac{\pi }{4}}\right)}^{* }$$.

### Controlling the single qubit Rabi frequency

The transition to the circulant Hamiltonian  (8) (Case 2) can be carried out even without the presence of energy offset described by Eq. (10). Indeed, let’s set the phases in  (1) to φ2 = ϕ2 = φ and ϕ1 = 2pπ. Then we have

$$\begin{array}{ccc} & & {\lambda }_{+}^{(2)}({t}_{{\rm{f}}})={\Omega }_{1}+2J\cos (\varphi ),\quad {\lambda }_{-}^{(2)}({t}_{{\rm{f}}})=-{\Omega }_{1}-2J\sin (\varphi ),\\ & & {\mu }_{+}^{(2)}({t}_{{\rm{f}}})={\Omega }_{1}-2J\cos (\varphi ),\quad {\mu }_{-}^{(2)}({t}_{{\rm{f}}})=-{\Omega }_{1}+2J\sin (\varphi ),\end{array}$$
(19)

The Hamiltonian  (19) has no circulant symmetry because the condition J = Ω2 is not fulfilled. However, the adiabatic transition to the Fourier modes can be carried out for example by varying in time the Rabi frequency Ω2(t). At the initial moment we begin with Ω1, Ω2(ti) J such that the eigenstates are $$\left|\psi ({t}_{{\rm{i}}})\right\rangle =\left|{q}_{1}{q}_{2}\right\rangle$$, (qk = ± ) where $$\left|{\pm }_{1}\right\rangle =(\left|{\downarrow }_{1}\right\rangle \pm \left|{\uparrow }_{1}\right\rangle )$$/$$\sqrt{2}$$. Then, adiabatically decrease Ω2(t) such that at the final instance of time we have Ω2(tf) = J. Adiabatically following the instantaneous eigenstates transform the initial states into the respective quantum Fourier states (see the Supplement for the derivation). In contrast to the gate realization with nonzero detuning, now the adiabatic transition is carried out between the initial rotating computation spin states and the quantum Fourier states. Finally, we point out that instantaneous eigenvectors of Hamiltonian  (19) can be found exactly, which allows to combine the gate scheme with the shortcuts to adiabaticity technique (see the Supplement for more details).

## Physical Implementation with Trapped Ions

The implementation of our gate scheme can be realized in various quantum optical systems, for example, including superconductiong qubits coupled to transmission lines25, as well as using color center in nanodiamonds coupled to carbon nanotubes26. Here we consider a trapped-ion realization of the circulant Hamiltonian. Consider a linear ion crystal which consists of N ions with mass M, aligned along the trap axis z with radial and axial trap frequencies Ωx, Ωz. The qubit system typically consists of two metastable levels $$\left|\uparrow \right\rangle$$, $$\left|\downarrow \right\rangle$$ of the trapped ion with energy difference Ω0. The small radial vibrations around the equilibrium positions are described by a set of collective vibrational modes with a Hamiltonian $${ {\hat{H}} }_{{\rm{ph}}}={\sum }_{n}{\Omega }_{n}{{ {\hat{a}} }}_{n}^{\dagger }{{ {\hat{a}} }}_{n}$$27. Here $${ {\hat{a}} }_{n}^{\dagger }$$, $${ {\hat{a}} }_{n}$$ are the phonon creation and annihilation operators of the nth vibrational mode with a frequency Ωn. Including the internal energy of the qubits $${ {\hat{H}} }_{{\rm{q}}}={\sum }_{k}{\Omega }_{0}{\sigma }_{k}^{z}$$/2 the interaction-free Hamiltonian becomes $${ {\hat{H}} }_{0}={ {\hat{H}} }_{{\rm{q}}}+{ {\hat{H}} }_{{\rm{ph}}}$$.

In order to induce an effective spin-spin interaction between spin states we assume that an optical spin-dependent force is applied which couples the internal states of the ions with the collective vibrational modes28,29,30. In the following we assume that the desired spin-spin interaction is mediated by the radial phonons which are less sensitive to ion heating and thermal motion31. Consider that each ion interacts with two pairs of noncopropagating laser beams along the radial direction with laser frequencies $${\Omega }_{k,{{\rm{L}}}_{{\rm{r}}}}={\Omega }_{0}-\mu -{\Delta }_{k}(t)$$, $${\Omega }_{k,{{\rm{L}}}_{{\rm{b}}}}={\Omega }_{0}+\mu -{\Delta }_{k}(t)$$ which give rise to a spin dependent force at frequency μ. Here $${\Delta }_{k}(t)={\int }_{0}^{t}{\Delta }_{k}(\tau )d\tau$$ is the small time-dependent laser detuning (Ω0μ Δk(t)) of the ac Stark shifted states with respect to Ω0 which introduce an effective qubit frequency. In order to induce a single-spin transition we assume that the each ion interacts with a pair of copropagating laser beams with a frequency difference Ωk,L = Ω0 − Δ(t). Assuming the optical rotating-wave approximation (RWA) the interaction Hamiltonian becomes28

$$\begin{array}{ll}{ {\hat{H}} }_{{\rm{I}}}\ \ = & {\sum }_{k}{\Delta }_{k}{\sigma }_{k}^{z}+{\Omega }_{x}{\sum }_{k}{e}^{ik{\widehat{x}}_{k}}\cos (\mu t)({e}^{i{\varphi }_{k}}{\sigma }_{k}^{+}+{e}^{-i{\varphi }_{k}}{\sigma }_{k}^{-})\\ & +\,{\sum }_{k}{\Omega }_{k}({e}^{-i{\phi }_{k}}{\sigma }_{k}^{+}+{e}^{i{\phi }_{k}}{\sigma }_{k}^{-}).\end{array}$$
(20)

Here Ωx, Ωk are the Rabi frequencies, and respectively, φk, ϕk are the laser phases. The small radial oscillations of the kth ion can be written in terms of collective normal modes, $$k{\widehat{x}}_{k}={\sum }_{n}{\eta }_{k,n}({ {\hat{a}} }_{n}^{\dagger }{e}^{i{\Omega }_{n}t}+{ {\hat{a}} }_{n}{e}^{-i{\Omega }_{n}t})$$, where $${\eta }_{k,n}={b}_{k,n}k\sqrt{\hslash /2M{\Omega }_{n}}$$ is the Lamb-Dicke parameters with bk,n being the normal mode transformation matrix for the k ion. Within the Lamb-Dicke regime where $$\Delta k\left\langle {x}_{k}\right\rangle \ll 1$$ and performing the vibrational RWA we arrive at

$$\begin{array}{ccc}{ {\hat{H}} }_{{\rm{I}}} & = & {\sum }_{k}{\Delta }_{k}{\sigma }_{k}^{z}+{\sum }_{k,n}{g}_{k,n}\cos (\mu t)({\sigma }_{k}^{+}{e}^{i{\varphi }_{k}}+{\sigma }_{k}^{-}{e}^{-i{\varphi }_{k}})\\ & & \,\times ({ {\hat{a}} }_{n}^{\dagger }{e}^{i{\Omega }_{n}t}+{ {\hat{a}} }_{n}{e}^{-i{\Omega }_{n}t})+{\sum }_{k}{\Omega }_{k}({e}^{-i{\phi }_{k}}{\sigma }_{k}^{+}+{e}^{i{\phi }_{k}}{\sigma }_{k}^{-}),\end{array}$$
(21)

where gk,n = ηk,nΩx is the spin-phonon coupling.

We consider the regime in which the beatnote frequency μ is not resonant with any radial vibration mode and the condition Ωn − μ gk,n is satisfied for any mode n. In that case the radial collective phonons are only virtually excited, thereby they can be eliminated from the dynamics32. As a result of that the ion’s spin states at different sites become coupled. Finally, by assuming that only the kth and mth ions interact with the bichromatic field we obtain

$$\begin{array}{lll}{ {\hat{H}} }_{{\rm{I}}} & = & J({\sigma }_{k}^{+}{e}^{i{\varphi }_{k}}+{\sigma }_{k}^{-}{e}^{-i{\varphi }_{k}})({\sigma }_{m}^{+}{e}^{i{\varphi }_{m}}+{\sigma }_{m}^{-}{e}^{-i{\varphi }_{m}})\\ & & +{\Omega }_{k}({e}^{-i{\phi }_{k}}{\sigma }_{k}^{+}+{e}^{i{\phi }_{k}}{\sigma }_{k}^{-})+{\Omega }_{m}({e}^{-i{\phi }_{m}}{\sigma }_{m}^{+}+{e}^{i{\phi }_{m}}{\sigma }_{m}^{-})\\ & & +{\Delta }_{k}{\sigma }_{k}^{z}+{\Delta }_{m}{\sigma }_{m}^{z},\end{array}$$
(22)

with $$J={\sum }_{n}\ {g}_{k,n}\ {g}_{m,n}{({\mu }^{2}-{\Omega }_{n}^{2})}^{-1}$$ being the spin-spin coupling between the two ions. By imposing the conditions (5) or (7) we realize the desired circulant Hamiltonian. Note that such dispersive spin-phonon interaction was studied in the context of quantum simulation of effective spin models33 as well as for high-fidelity gate implementation21.

## Numerical Examples

Here we discuss specific time dependences of the detunings and the couplings which can be used to perform the gate implementation. Consider first the Cases1 and 2 where the adiabatic transition to the quantum Fourier modes can be realized by using an exponential ramp of the detunings, Δk(t) = Δkeγtk J, Ω1), with a characteristic rate γ. Such a time dependence captures the asymptotic behaviour of the eigenvectors. Another convenient choice of the time-dependent couplings and detunings, which we use for numerical examples, is

$$\begin{array}{rcc}J(t) & = & {J}_{0}\ {\sin }^{2}(\omega t),\quad {\Omega }_{1}(t)={\Omega }_{1}\ {\sin }^{2}(\omega t),\\ {\Delta }_{k}(t) & = & {\Delta }_{k}\ {\cos }^{2}(\omega t),\quad (k=1,2),\end{array}$$
(23)

where ω is a characteristic parameter which controls the adiabaticity of the transition. The interaction time varies as $$t\in [0,{t}_{\max }]$$ with $${t}_{\max }=\pi$$/(2ω). This time dependence ensures that Δk(0) J(0), Ω1(0), and respectively, $${\Delta }_{k}({t}_{{\rm{tmax}}})\ll J({t}_{{\rm{tmax}}}),{\Omega }_{1}({t}_{{\rm{tmax}}})$$.

Finally, the adiabatic transition to the Fourier states using Hamiltonian  (19) can be carried out by using Δ1,2 = 0,

$$J(t)={J}_{0}\ {\sin }^{2}(\omega t),\quad {\Omega }_{2}(t)={J}_{0}+{V}_{0}\ {\cos }^{2}(\omega t),$$
(24)

and Ω1(t) = Ω1. Again, initially we have Ω1Ω2(0) J(0) and respectively at the end of the transition $$J({t}_{\max })={\Omega }_{2}({t}_{\max })$$ which ensures the circulant symmetry of the Hamiltonian  (19).

### Eigenfrequencies

In Fig. 1 we plot the eigenfrequencies (12a),(12b) and (15a), (15b) as a function of time. We see that the eigenfrequencies for both cases are nondegenerate during the time evolution. Approaching the final interaction time the energy separation between the adiabatic levels for the Hamiltonian (6) is determined by the coupling strength J0, see Eq. (13). For the circulant Hamiltonian  (8) the separation between eigenfrequencies λ± and μ± is again determined by J0. However, the presence of the single-qubit Rabi frequency Ω1(t) leads to higher separation between the eigenfrequencies λ+, μ+, and λ, μ, where the energy gap is determined by Ω11 J0), see Fig. 1(b).

### Gate fidelity

We numerically simulate the adiabatic transition to the quantum Fourier states (4a),(4b),(4c),(4d) using the time-dependent couplings and detunings (23) as well as (24). In Fig. 2(a) we plot the time evolution of the spin populations assuming that the system is prepared initially in the product state $$\left|\psi (0)\right\rangle =\left|\downarrow \downarrow \right\rangle$$. We observe that even for the relatively small coupling J0 the adiabatic transition transforms the initial state into the respective quantum Fourier state, namely $$\left|\downarrow \downarrow \right\rangle \to \left|{\psi }_{3}\right\rangle$$. In this case the nonadiabatic transition is suppressed due to the single-qubit Rabi frequency Ω1 which improves the adiabaticity of the transition. We have found that all other initial computational spin states approach the respective quantum Fourier states according to Eq. (17a),(17b),(17c),(17d). We also show the adiabatic transition $$\left|--\right\rangle \to \left|{\psi }_{3}\right\rangle$$ using Hamiltonian  (19), see Fig. 2(b). We observe that compared to the Case 2 now the adiabatic transition is performed for shorter interaction time.

In Fig. 3 we plot the time evolution of the arguments of the probability amplitudes for the different spin states. The arguments tend toward the respective phases given by Eq. (4a),(4b),(4c),(4d). The same result also is observed for all other initial computational states.

As a figure of merit for the fidelity of the gate implementation we use

$${F}_{{\rm{gate}}}(t)=\frac{1}{16}| \sum _{{s}_{1},{s}_{2}}\langle {s}_{1}{s}_{2}| {G}_{\frac{\pi }{4}}^{\dagger }{G}_{\frac{\pi }{4}}{\prime} (t)| {s}_{1}{s}_{2}\rangle {| }^{2},$$
(25)

where sk = ↑k, ↓k. Here $${G}_{\frac{\pi }{4}}$$ is the desired two-qubit quantum Fourier transform (18) and $${G}_{\frac{\pi }{4}}{\prime} (t)$$ is the actual one. In Fig. 4(a) we show the two-qubit fidelity (25) as a function of time where we choose the detunings Δ1, Δ2 such that the adiabatic phases become α2 = 2kπ, β2 = 2pπ. As the time progresses the unitary propagator $${G}_{\frac{\pi }{4}}^{{\prime} }$$ converges toward $${G}_{\frac{\pi }{4}}$$. We observe that for spin-spin coupling J0/2π = 2 kHz and gate time $${t}_{\max }\approx 1.4$$ ms one can achieve gate infidelity of $$1-{F}_{{\rm{gate}}}({t}_{\max })\approx 1{0}^{-4}$$. In Fig. 4(b) we plot the fidelity of the adiabatic transition between the rotating computational spin states $$\left|{q}_{1},{q}_{2}\right\rangle$$, (qk = ±k) and the quantum Fourier states (4a),(4b),(4c),(4d), using Hamiltonian  (19) (see the Supplement for more details). We observe high fidelity of the adiabatic transition within shorter interaction time $${t}_{\max }\approx 455\ \mu$$s.

### Creation of entangled states

The action of the two-qubit gate on the computational basis creates superposition states which, however, are not entangled. In order to create entangle states one needs to prepare initially the system is a superposition spin state. For example, consider that the initial state is $$\left|\psi (0)\right\rangle =({e}^{-i{\alpha }_{2}}\left|{\downarrow }_{1}\right\rangle +{e}^{i{\beta }_{2}}\left|{\uparrow }_{1}\right\rangle )\left|{\downarrow }_{2}\right\rangle$$/$$\sqrt{2}$$. The two-qubit gate (17a),(17b),(17c),(17d) transforms the initial state into an entangled state which is superposition of two Fourier modes, namely $$\left|\psi (0)\right\rangle \to \left|\psi ({t}_{{\rm{f}}})\right\rangle =(\left|{\psi }_{3}\right\rangle +\left|{\psi }_{2}\right\rangle )$$/$$\sqrt{2}$$. The same state can be created also by preparing initially the system in the rotating superposition state $$\left|{\psi }_{{\rm{r}}}(0)\right\rangle =({e}^{-i\alpha }\left|{-}_{1}\right\rangle +{e}^{-i\beta }\left|{+}_{1}\right\rangle )\left|{-}_{2}\right\rangle$$/$$\sqrt{2}$$. Then adiabatically following the instantaneous eigenstates of Hamiltonian  (19) one can perform the transition $$\left|{\psi }_{{\rm{r}}}(0)\right\rangle \to \left|\psi ({t}_{{\rm{f}}})\right\rangle$$. In Fig. 5 we show the fidelity of the creation of the entangled state defined by $$F(t)=\frac{1}{2}| \left\langle \psi ({t}_{{\rm{f}}})\right|({e}^{-i\alpha }\left|{\chi }_{-}(t)\right\rangle +{e}^{-i\beta }\left|{\nu }_{-}(t)\right\rangle ){| }^{2}$$ as a function of ω and J0, where $$\left|{\chi }_{-}(t)\right\rangle$$ and $$\left|{\nu }_{-}(t)\right\rangle$$ are the instantaneous eigenstates (see the Supplement for the derivation). As can be seen by lowering ω the adiabaticity of the transition is improved which leads to higher fidelity. For example, for J0/2π = 2 kHz and ω/2π = 0.8 kHz with gate time $${t}_{\max }=313\ \mu$$s we estimate infidelity of order of  $$1-F({t}_{\max })\approx 1{0}^{-4}$$.

Finally we discuss the possibility to apply a counterdriving field which suppresses the nonadiabatic transitions. For concreteness we focus on the implementation using the Hamiltonian  (19) because it allows us to derive an explicit analytic expression for the instantaneous eigenstates. Following20 the total Hamiltonian including the counterdriving field becomes

$${ {\hat{H}} }_{{\rm{T}}}= {\hat{H}} +{ {\hat{H}} }_{{\rm{CD}}},\quad { {\hat{H}} }_{{\rm{CD}}}=i\sum _{s=\pm }\{\left|{\partial }_{t}{\chi }_{s}\right\rangle \langle {\chi }_{s}| +| {\partial }_{t}{\nu }_{s}\rangle \left\langle {\nu }_{s}\right|\},$$
(26)

where the second term cancels the nonadiabatic coupling. Here $$\left|{\chi }_{\pm }(t)\right\rangle$$ and $$\left|{\nu }_{\pm }(t)\right\rangle$$ are the time-dependent eigenstates of  (19). We find

$${ {\hat{H}} }_{{\rm{CD}}}=-{\partial }_{t}\ \xi \{\left|{\downarrow }_{1}\right\rangle \left\langle {\uparrow }_{1}\right|+\left|{\uparrow }_{1}\right\rangle \left\langle {\downarrow }_{1}\right|\}\left|{\downarrow }_{2}\right\rangle \left\langle {\downarrow }_{2}\right|,$$
(27)

where the mixing angle is $$\tan (\xi )={\Omega }_{2}$$/J. Using the time-dependent couplings (24) we obtain

$${\partial }_{t}\ \xi =\frac{\omega {J}_{0}({J}_{0}+{V}_{0})\ \sin \ (2\omega t)}{{J}_{0}^{2}\ {\sin }^{4}\ (\omega t)+{[{V}_{0}{\sin }^{2}(\omega t)-({J}_{0}+{V}_{0})]}^{2}}.$$
(28)

In Fig. 6 we show the shape of the counterdriving field (28) for various values of ω and J0. We see that the countrerdriving field vanishes at t = 0 which preserves the requirement system to begin in the rotating spin states. At $${t}_{\max }$$ we have $${\partial }_{t}\ \xi ({t}_{\max })$$ such that the system end up in state with circulant symmetry. Importantly, we observe that for the same magnitude of J0 ~ ∂t ξ one can reduce the gate time such that ω > J0. Consider as an example spin coupling J0/2π = 2.0 kHz. For approximately the same maximal magnitude of ∂t ξ the gate time is approximately a factor of four shorter, ω/2π = 2.5 kHz and $${t}_{\max }=100\ \mu$$s, see Fig. 4(b) for comparison.

## Conclusion

We have shown that using a Hamiltonian with the circulant symmetry one can realize the two-qubit quantum Fourier transform. The unique property of the circulant Hamiltonian is that its eigenvectors are the quantum Fourier modes. Our model consists of two interaction spins which are subjected to an additional single-qubit drive. We have considered the conditions for the spin coupling and the single-qubit Rabi frequencies which lead to the circulant symmetry of the spin Hamiltonian. Our two-qubit gate scheme is based on an adiabatic transition of the computational spin basis into the respective quantum Fourier modes which realizes the quantum Fourier transform in a single interaction step. We have discussed the physical implementation of the circulant Hamiltonian using trapped ions. The realization relies on using a bichromatic laser field which couples the internal ion’s states with the collective vibrational modes. We discuss the fidelity of the gate operation as well as the fidelity of the entangled-state creation. We have shown that the actual two-qubit gate converges with infidelity of order of 10−4 toward the desired quantum Fourier transform. Finally, we described how the gate can be accelerated by at least a factor of 4 by using a counterdiabatic shortcut.