Superconducting qutrit-qubit circuit: A toolbox for efficient quantum gates

As classical computers struggle to keep up with Moore's law, quantum computing may represent a big step in technology and yield significant improvement over classical computing for many important tasks. Building a quantum computer, however, is a daunting challenge since it requires good control but also good isolation from the environment to minimize decoherence. It is therefore important to realize quantum gates efficiently, using as few operations as possible, to reduce the amount of required control and operation time and thus improve the quantum state coherence. Here we propose a superconducting circuit for implementing a tunable spin chain consisting of a qutrit (three-level system analogous to spin-1) coupled to two qubits (spin-1/2). Our system can efficiently accomplish various quantum information tasks, including generation of entanglement of the two qubits and conditional three-qubit quantum gates, such as the Toffoli and Fredkin gates, which are universal for reversible classical computations. Furthermore, our system realizes a conditional geometric gate which may be used for holonomic (non-adiabatic) quantum computing. The efficiency, robustness and universality of our circuit makes it a promising candidate to serve as a building block for larger spin networks capable of performing involved quantum computational tasks.

Richard Feynman has famously suggested to simulate quantum physics with quantum computers [1]. Fourteen years later, Seth Lloyd proved that an array of spins with tunable interactions indeed represents a universal quantum simulator [2]. Dynamically controlled spin chains can realize analog quantum simulations and digital quantum computations. Several physical systems are being explored for implementing tunable spin chains in the quantum regime, including trapped ions and atoms [3][4][5], quantum dots [6] and superconducting circuits [7]. Over the last decade, superconducting circuits have steadily improved to become one of the most prominent candidates for the realization of scalable quantum computing [8,9]. With the development of the transmon qubit [10] and further advances, such as the 3D transmon [9], coherence times above 50 µs [11,12] and per-step multi-qubit gate fidelity at the fault tolerance threshold for surface code error correction [13] have been achieved.
Still, as the search for better coherence, lower error rates and faster quantum gate operation times continues, efficient universal realizations of key operations for a quantum processor are needed. Most implementations so far have used only one-and two-qubit quantum operations for realizing important multi-qubit gates [14] such as the three-qubit quantum Toffoli [15] (ccnot) and Fredkin [16] (cswap) gates, requiring a theoretical minimum of five two-qubit gates [14,17,18]. This large number of required gates can be remedied by the use of a higher-lying state of a qutrit which can simplify the implementation of e.g. the Toffoli gate to three two-qubit gates as implemented optically in [19] and in superconducting circuits in [20]. Moreover, the current implementations are highly specialized, meaning a whole superconducting circuit is used just to implement a single three-qubit gate. A single circuit implementing several important universal quantum gates with high fidelity and minimal external control is therefore desirable.
Here, we propose a superconducting circuit realizing an effective Heisenberg XXZ chain of two qubits and a qutrit in between. First we show how the circuit can be used to generate two-and three-qubit entangled states [14,21,22]. Then we discuss how to implement the Fredkin gate using only two three-qubit operations, and the Toffoli gate using two (one-qubit) Hadamard gates and a three-qubit gate employing the intrinsic ZZ-couplings and an external one-qubit driving. Finally we discuss how to implement a double-controlled arbitrary unitary single-qubit gate. To illustrate this capability, we use the ZZ-couplings to realize the double-controlled holonomic gate [23,24]. The geometric nature of the holonomic gate provides robustness, but the first proposals required adiabatic control leading to more time for errors to occur. The increase in errors was partly avoided by the introduction of decoherence-free subspaces [25], which can significantly reduce the detrimental effects of noise. We will instead implement a non-adiabatic generalization [26], circumventing many of these difficulties.

A. Heisenberg spin chain
Consider the circuit with four connected superconducting islands shown in figure 1. After obtaining the Lagrangian of the system in the node flux picture and a suitable change of coordinates, we obtain three nodes with the relevant degrees of freedom sequentially coupled via nonlinear interactions. We truncate the outer nodes to the lowest two states, obtaining qubits, while for the middle node we instead choose to truncate its Hilbert space to the lowest three energy levels, obtaining a qutrit. All three degrees of freedom are in the transmon limit with the kinetic terms being much smaller than the potential terms. Finally, by transforming to a rotating frame and making a rotating wave approximation to eliminate the fast oscillating terms, we obtain an effective Hamiltonian for the system of two qubits each coupled to the qutrit (see appendix A for the full derivation). This Hamiltonian has the form where σ + α and σ − α are the spin-1/2 raising and lowering operators for the left (α = L) and right (α = R) qubits, σ z α is the Pauli Z operator, and ∆ L,R is the energy differences between the spin-up and spin-down states of the corresponding qubit. The states of the qutrit are denoted by |j (j = 0, 1, 2), ∆ M is the energy of state |1 and ∆ M + δ M is the energy of state |2 , making the anharmonicity equal to ∆ M − δ M , with the energy of the ground state |0 set to zero. ∆ M and δ M can be tuned dynamically via driving through the flux lines 5 and 6 in fig. 1 (b) (see appendix A). The exchange (XY ) coupling strengths between the qubits and the qutrit are given by J αM . Typically, the coupling J αM12 (α = L, R) to the |1 ↔ |2 transition is stronger than the coupling J αM01 to the |0 ↔ |1 transition by a factor ∼ √ 2. The coefficients J (z) αM determine the dispersive (ZZ) interaction between the qubits and the qutrit, with D 1 2 and D 2 3. For clarity, these parameters are shown in figure 2 relative to the qubit and qutrit states of the truncated system. In a perfectly symmetric circuit, we have ∆ L = ∆ R and J LM = J RM for both qutrit transitions and this is assumed below unless otherwise stated, where we will use the notation ∆ α and J αM with α = L, R.
For typical experimental parameters [28], the coupling strengths J's are in the range of few to several hundred MHz, while the energy splittings ∆'s and δ's are in the GHz range. The interaction part of the Hamiltonian (1), i.e. the last six terms, can be cast in the form of the Heisenberg XXZ spin-model, and S + M = (S − M ) † . Apart from the intrinsic dynamics of the system, we will employ an external microwave (mw) field of (variable) frequency ω mw to drive the system. The microwave field induces transitions between the qubit and qutrit states as described by the Hamiltonian where Ω's are the corresponding Rabi frequencies. Physically, the driving is done through the resonators 2 and 4 for the outer qubits and control lines 5 and 6 for the qutrit, as shown in figure 1 (b).
Our system can be used to achieve many quantum information tasks, examples of which are described below. We simulate the dissipative dynamics of the system numerically, with the relaxation and decoherence times set to T 1 = 31 µs and T 2 = 35 µs respectively, based on recent studies [11,29,30] [31]. The spin-model parameters used in the numerical simulations are all obtained from realistic experimental circuit parameters, as detailed in appendix A.

B. Qutrit dissociation and entangled state preparation
Entangled states are of great interest in quantum computing [21,32]. In our system, we can employ the qutrit to produce an entangled Bell state between the outer qubits 1 √ 2 (|↓↓ + |↑↑ ), as detailed below. First, we dynamically tune the energy levels of the qutrit to make its two transitions |0 ↔ |1 and |1 ↔ c d Figure 1. a) Lumped circuit element drawing of the effective circuit. The system is analyzed in the node flux picture [27] with the four nodes shown as black dots (see appendix A). Each node corresponds to a superconducting island as denoted in b). b) Sketch of a possible physical implementation of the proposed circuit. Each colored box is a superconducting island corresponding to a node in a). Josephson junctions are shown as narrow yellow strips. Bent black wires are inductors. The numbered colored lines are controls for readout and driving of the circuit: 1 and 3 are the flux lines, 2 and 4 are resonators capacitively coupled to left and right qubits; lines 5 and 6 are control and driving of the two middle islands forming the middle qutrit in the resulting spin model. |2 non-resonant with the transitions |↓ ↔ |↑ of the qubits, i.e., we require that |∆ M − ∆ α | J αM01 and |δ M − ∆ α | J αM12 . Starting from the ground state |0 , we produce the superposition state 1 √ 2 (|0 + |2 ) of the qutrit by external driving, employing the STI-RAP (STImulated Raman Adiabatic Passage) sequence of pulses [33]. Namely, we drive the transitions |0 ↔ |1 and |1 ↔ |2 with resonant mw-pulses of Rabi frequencies Ω 1 and Ω 2 . The Ω 2 pulse precedes the Ω 1 pulse, and we adjust the overlap between the pulses so as to obtain the transfer to state |2 with minimal population of the intermediate state |1 . The two pulses are suddenly turned off when their amplitudes are equal, resulting in the desired superposition state. The dynamics of the qutrit under the STIRAP driving is shown in figure 3 (a), with the inset showing the pulse sequence.
Next, the Bell state is obtained as 1 via "dissociation" of the qutrit excitation |2 into two spin excitations |↑↑ . To this end, we set ∆ M + δ M = ∆ L + ∆ R and choose |∆ M − ∆ α | > J αM01 [34] via tuning the frequencies of the outer qubits with flux control and the qutrit with the dynamical driving. Making the intermediate state |1 non-resonant precludes its population but prolongs the dissociation, which results in a more pronounced effect of the noise and relaxations. The dissociation dynamics |↓ 2 ↓ → |↑ 0 ↑ is shown in figure 3.
Using the pairwise ZZ-interaction of the Heisenberg Hamiltonian, the fully entangled three-particle GHZ (Green-Horne-Zeilinger) state 1 √ 2 (|↓ 0 ↓ +|↑ 1 ↑ ) can be obtained from the prepared Bell state 1 √ 2 (|↓ 0 ↓ +|↑ 0 ↑ ) by the external driving of the middle qutrit. To this end, we shine on the circuit with a π pulse Ω 1 which is resonant only for the |↑ 0 ↑ ↔ |↑ 1 ↑ transition and nonresonant for the |↓ 0 ↓ ↔ |↓ 1 ↓ transition, due to the ZZ interactions with the strengths J (z) αM Ω 1 . Alternatively, we can produce a different maximally entangled state 1 √ 2 (|↓ 2 ↓ + |↑ 0 ↑ ) from the simple initial state |↓ 2 ↓ . This can be done by tuning the pa-  Here, n is a parameter controlling at which oscillation of the individual populations the equal superposition is obtained (lower n is quicker). The disadvantage of this scheme is that it requires very precise tuning of the interactions J (z) αM . In contrast, for the method above, only the frequencies have to be adjusted, which is more easily done using the dynamical tuning. Further details are given in Appendix B.

C. Toffoli and CCZ gates
The controlled-controlled not (ccnot) gate, also called the Toffoli gate, is a reversible and universal 3-bit gate for classical computation [15]. It performs a not (bit-flip) operation on the target bit if the two control bits are in state '1', and does nothing otherwise. The Toffoli gate is an important element in many quantum algorithms, such as quantum error correction [35] and the celebrated Shor's algorithm [36]. It has been implemented in systems ranging from trapped ions [37] to superconducting circuits [20], including an implementation with static control optimized with machine learning [38].
We can implement the ccnot gate with the left qubit and the middle qutrit acting as controls and the right qubit acting as the target. The state of the right qubit is then inverted only if the left qubit is in the spin up (ex- cited) state |↑ and the qutrit is in the ground state |0 . The choice of the qutrit state is arbitrary, and the protocols works similarly using the qutrit states |1 or |2 . In our system, the quantum ccnot is realized indirectly by first realizing a double-controlled phase (ccz) gate that shifts the phase of the state |↑ 0 ↑ by π (sign change) while nothing happens if either of the outer qubits are in the spin down state or if the qutrit is in state |2 . The ccnot can then be obtained by the transformation: ccnot = H ·ccz·H, where H is the Hadamard gate that acts on the target qubit, i.e., qubit R. In practice, the Hadamard gate can be obtained by a π/2 rotation about the y axis.
The ccz gate is implemented by choosing suitable experimental parameters such that the transitions between the qubit and qutrit states are non-resonant, while J (z) αM (> 10 MHz) is large. We apply a microwave field acting on the qutrit transition |↑ 0 ↑ ↔ |↑ 1 ↑ with the Rabi frequency Ω 1 J αM . Because of the ZZ interactions, which yield a state-dependent frequency shift of the qutrit, the microwave field frequency can be chosen such that it is resonant only when both outer qubits are in the spin-up state. The microwave 2π-pulse then results in the transformation |0 → i |1 → − |0 that leads to the double conditional π phase change of (only) the state |↑ 0 ↑ . In figure 4 we show the results of the numerical simulations of the ccz gate in the Hadamard basis for the right qubit. Subsequent application of the Hadamard gate to the right qubit will complete the ccnot gate. We note that because of the symmetry of the driving, we could have also chosen the qutrit state |1 instead of |0 as the 'open' state, but here we can view this merely as an ancillary state.

D. Fredkin gate
Another universal 3-bit gate is the Fredkin gate, whose quantum analog is the controlled swap (cswap) gate. Its effect is to swap the states of the two qubits, |↑↓ ↔ |↓↑ , conditional upon the state of the qutrit playing the role of the control. We here use the two lowest states of the qutrit such that the excited state |1 is 'on' and the ground state |0 is 'off'. To realize cswap, we tune the energy levels of the qutrit such that the transition |1 ↔ |2 is resonant with the qubit transitions |↑ ↔ |↓ , i.e.  As can be seen in figure 5, however, the initial state |↓ 1 ↓ has trivial dynamics, unlike the rest of the swapped states which attain a π phase shift during the interaction time T . This means that we have a swap operation only up to a conditional phase for an arbitrary superposition input state. To mitigate this problem, we can use the ccz gate (see subsection I C) to attain the π phase shift of state |↓ 1 ↓ and obtain the correct cswap gate. In figure 6 we show the results of our numerical simulations of the complete cswap protocol, including the conditional resonant swap followed by the ccz gate. More detailed analysis is given in Appendix C. Numerical simulation of the full cswap gate for the initial superposition state cos(θ1) |↑ + e iφ 1 sin(θ1) |↓ |1 cos(θ2) |↑ + e iφ 2 sin(θ2) |↓ with θ1 = π/4, φ1 = 3π/4, θ2 = 3π/4 and φ2 = φ1. In part 1, we perform the cswap-like operation during time T1 = π/2JαM 01 with the parameters as in figure 5. In part 2 we perform the ccz gate during time T2 = 2π/Ω2 with the resonant mw field of frequency ωmw = δM − 2J We finally note that we could have equivalently performed the cswap gate between the two qubits via the resonant qutrit transition |0 ↔ |1 , while the other transition |1 ↔ |2 is non-resonant.

E. Double-controlled holonomic gate
Another idea with importance to quantum computation [14] is the implementation of general (non-abelian) onequbit gates of the form with the computational qubit states as basis. We can implement the non-adiabatic one-qubit holonomic gate [24,39] with our qutrit. Such gates have the benefit of being robust to fluctuations in the parameter space due to the geometric nature, without the limitations of long gate operation times resulting from the adiabatic requirement [40,41]. These have been implemented in a range of different systems [42,43], and the stability has been well tested [44,45] Choosing the same system parameters as for the ccz gate above, we use a driving scheme inspired by [42]. We drive the two transitions |0 ↔ |1 and |1 ↔ |2 with the external fields having the same Gaussian envelope Ω(t) but different complex coupling amplitudes a and b satisfying |a| 2 + |b| 2 = 1, i.e. in eq. (6) Ω 1 (t) = aΩ(t) and Ω 2 (t) = bΩ(t). The pulse Ω(t) is turned on at time t = 0 and turned off at t = τ , such that we get a 2π-pulse Ω(t), τ 0 Ω(t)dt = 2π. Starting in the qutrit ground state |0 , we then obtain the final transformation U (φ, θ) of eq. (7) acting on the qutrit states |0 , |2 . Here θ and φ are defined via e iφ tan(θ/2) = a/b. By using the J (z) αM couplings to shift the qutrit frequencies, we can furthermore make the external driving field resonant or not, depending on the states of the outer qubits. This would then result in a controlled-controlled holonomic gate transforming the state of the qutrit according to (7) only when the outer (control) qubits are in e.g. the spin up state. In figure 7 we show the evolution of different initial states under gate operation.
In figure 8, we show the populations of the final states for various values of θ, while φ = 0. The theoretical curves cos 2 θ and sin 2 θ from (7) are also shown and we observe a very good agreement. The final population of the blocked state |↓ 0 ↑ is somewhat lower than expected primarily due to leakage to the other levels via a weak interaction with the external field, even though it is far from resonance. This leakage is also apparent in figure 7.  Figure 8. Populations of state versus θ (φ = 0) after the application of the controlled-controlled holonomic gate to the initial state |↑ 0 ↑ (black and green points) and |↓ 0 ↑ (red points). The agreement between the obtained results and the ideal case (lines) is remarkably good.

II. DISCUSSION
To summarize, we have shown how the circuit in figure 1 can give rise to a Heisenberg-XXZ like Hamiltonian for a chain of three effective spins. We have then presented efficient implementations of several quantum gates using realistic circuit parameters including noise and relaxations. By utilizing the second excited state of the qutrit in the middle position, we proposed simple schemes for generating a maximally entangled Bell state of the outer qubits and a GHZ state of the qubits and the qutrit. Furthermore, our construction can implement several important quantum gates, such as the ccnot (Toffoli), the cswap (Fredkin) gates. We note that with qubits only, the theoretically most efficient realizations of the Fredkin and Toffoli gates each requires five two-qubit gates [18]. Thus, our results exemplify the usefulness of qutrits for efficient realizations of threequbit gates, and demonstrate the potential of our circuit to serve as a basis for more complicated superconducting circuits.
Our scheme can implement in principle any controlledcontrolled unitary operation. As an example, we have considered the double-controlled non-abelian holonomic quantum gate on a single qubit. We have here chosen to implement the holonomic gate because of its robustness to parameter noise [40] stemming from the geometric nature of this gate. The strategy of using such gates is known as holonomic quantum computation (HQC) [24] and the universal non-abelian HQC (NHQC) generalization has since been performed by Sjöqvist et al. [26]. Here, three bare energy eigenstates are needed and are conveniently provided by the qutrit. A natu-ral next step is to try to implement the suggested twoqubit non-adiabatic holonomic quantum gate, requiring two nearest-neighbor qutrits. This could be possibly achieved by our circuit upon expanding the basis of one of the outer qubits. Together with the holonomic one-qubit gate, this would realize a universal set of holonomic gates.
Realizing qutrit-qutrit interactions would also open the possibility of implementing higher-order effective spin chains, such as the spin-one Haldane spin model [46,47], especially if the coherence times of higher levels are further prolonged [30].
Another possible use of qutrits and a circuit similar to the one proposed in this paper is the implementation of fully autonomous quantum error correction via engineered dissipation. With a relatively small increase in circuit complexity including three energy levels, an impressive increase in transmon coherence time was presented in Ref. [48].
Appendix A: Derivation of the Hamiltonian for the circuit Figure 9. The superconducting circuit and the corresponding parameters describing the properties of the components. Indicated are also the nodes and the corresponding fluxes.
We are considering the effective circuit in fig. 9 and want to show that the low-energy degrees of freedom of this circuit constitutes three qubits(qutrits) with a Heisenberg XXZ-interaction. We start by writing down the Lagrangian of the system in the node flux picture, the general rules summarized in ref. [27]. We choose the nodes as shown in fig.  9 with the closure branches being the two lower horizontal branches (each splitting into three branches with different circuit elements). The resulting Lagrangian is: Defining Φ Σ1 = Φ 1 + Φ 2 and assuming Φ 1 − Φ 2 = 0, we can rewrite the third line using trigonometric identities: We will stay in the transmon regime [10], where the potential terms are much larger than the kinetic terms. This means that we can assume to be close to the potential minimum, approximated to first order by a harmonic oscillator. Thus, we will later rewrite the Hamiltonian in terms of the bosonic step operators related to the harmonic part of the Hamiltonian. We thereafter employ a rotating wave approximation, removing all terms with odd dependence of the node flux variables since these will be energy non-conserving. Specifically these will, after the truncation to the lowest energy levels, represent spontaneous excitation terms. From the Taylor expansion of trigonometric functions, we notice that we can further simplify the expression (A2) to the following form: Making the same kind of definition for the fourth term, i.e. Φ Σ2 = Φ 4 + Φ 5 and assuming Φ 4 − Φ 5 = 0, we can make the same simplification here. We can also ignore the terms dependent on Φ 3 and Φ 6 as these will again only be irrelevant offset terms or have an odd dependence on the node fluxes. The Lagrangian becomes The next step is defining a suitable set of variables. Inspired by the way the φ i 's enter the cosines above, we choose the following: In terms of the new variables after expansion of the brackets and collection of terms, the Lagrangian is: The conjugate momenta can be found from the usual definition p i = ∂L ∂ψi : Now performing a Legendre transforming to the Hamiltonian via the relation H = iψ i p i − L, we obtain: The cosines are now expanded to fourth order in the flux variables: making, up to irrelevant constant terms, Taking the anharmonicity (fourth-order terms) as a perturbation [49], we now choose the bosonic raising and lowering operators related to the harmonic parts of the Hamiltonian (the p 2 and ψ 2 -terms) above as usual: We end up with the rewritten Hamiltonian We could now in principle map this to a spin model by using the anharmonicity to truncate to the lowest two/three energy eigenstates (e.g. b † i + b i → σ x i for a qubit) and after using the rotating wave approximation end up with a Hamiltonian with the desired form. This would have the drawback of being static, i.e. once the circuit is built to certain specifications the experimental parameters are fixed and the energy levels and coupling strengths can not be adjusted significantly afterwards. We will introduce a dynamical tuning by adding an external driving field, effectively mixing the first and second excited state of the middle (ψ 2 ) degree of freedom and thereby changing the energy levels and coupling strengths.

Adding an effective external energy level tuning
We now use the control lines 5 and 6 in figure 1 (b) to drive the middle degree of freedom ψ 2 using external fields. Specifically, we let the control line 5 connect to the node with flux φ a in figure 9 through the capacitance C ext and drive an external field φ ext . Similarly, we apply an external field φ −ext through control line 6 connected to the node flux φ b through the same capacitance C ext . The following extra term will appear in the Lagrangian: This can be rewritten to Assuming φ ext = −φ −ext = A ext sin(ω ext t) and transforming to the ψ-coordinates, this reduces to The first term here is an apparently problematic kinetic term for what has so far been a constraint variable. This can, though, be constructed to have a spacing between the energy levels that is very far from the spacing of the other degrees of freedom and ψ CM can thus be ignored in spite of this term. The second term is another kinetic term for the ψ 2 -variable, the third term is an offset term, and the fourth and last term is an interaction term between ψ 2 and the external field. It is this last term that will be useful for driving transitions between, and hence coupling of, the first and second excited levels of ψ 2 . This will allow us to tune the position of the two levels through non-crossing depending on how much we mix the states.
Including the above addition, the Lagrangian related purely to the ψ 2 -degree of freedom is the following: with all other terms being either purely related to ψ 1 or ψ 3 or interaction terms. The corresponding conjugated momentum is also altered slightly: The related Hamiltonian is therefore, ignoring any offset terms: Performing the same expansions as before addition of the extra capacitances and external fields gives a few extra ψ 2 -terms from the interaction terms. Focusing on only the resulting terms containing only ψ 2 or p 2 , we get: where α 2 and β 2 are defined in (A6). We once again introduce the bosonic step-operators related to the harmonic part of H 2 : which makes where We wish to diagonalize this Hamiltonian to investigate the effect of T ext on the spectrum.

Truncating the middle degree of freedom
We will now investigate the dynamical tuning of the spectrum by first truncating the "internal" Hamiltonian for the ψ 2 degree of freedom, corresponding to setting A ext = 0, to the three lowest degrees of freedom, i.e. find the qutrit eigenstates. We will then add the external field and transform to a frame rotating with the external field, wherein we can see the effective mixing of the qutrit eigenstates. Lastly, we shift basis and use these driven states in the rotating frame as our qutrit eigenstates.
We start by diagonalizing the internal Hamiltonian of the middle degree of freedom "H 2,0 ", i.e. the first two terms in (A15): In the basis of the three lowest simple harmonic oscillator states, which is chosen since we wish to end up with a qutrit in the end, we represent (up to irrelevant offset terms proportional to the identity) This truncation is also done for all terms in (A15), after using the canonical commutation relation [b, b † ] = 1 to transform to normal ordering form: Inserting this in the first two terms in eq. (A15), we get the Hamiltonian which has the eigenenergies: with the corresponding eigenstates: Now turning on the full external field, the full Hamiltonian H 2 can be expressed as where the first three terms are the bare qutrit eigenstates and the last matrix is written in the old basis (|0 , |1 , |2 ). The outer degrees of freedom (1, 3) is truncated to the lowest two degrees levels (i.e. an effective qubit) as is standard, where |↑ and |↓ will denote the excited and ground state, respectively. We now switch to a rotating frame corresponding to the external field, which means performing a unitary transformation with the operator: where U ext,α = e iωextt/2 |↓ ↓| + e −iωextt/2 |↑ ↑| , for α = 1, 3, and U ext,2 (t) = e i3ωextt/2 0 0 + e iωextt/2 1 1 + e −iωextt/2 2 2 .
We are trying to obtain a mixing of the first and second energy levels and therefore assume that we can tune ω ext so that it is close to E 2 − E 1 and far from E 1 − E 0 and E 2 − E 0 , effectively enabling us to perform the two-level approximation. We then transform the Hamiltonian according to the standard transformation rule Since our Hamiltonian is quite big, we take this one part at a time. Starting with the terms purely related to the ψ 2 degree of freedom, it is a good idea to look at the matrix elements from the last factor in (A20) when performing this transformation: where the rest are either irrelevant or zero. So, we get in the rotating frame where we in the last equation has used the rotating wave approximation to remove the fast oscillating terms exp(±2iω ext t), and we have defined Writing this in terms of the detuning from resonance we can rewrite the expression above as or, representing this in the matrix representation in the tilde states as basis states: where I 3 is the 3 × 3 identity matrix of the qutrit, which can be safely ignored, and ξ = E 2 − E 1 − (E 1 − E 0 ) < 0 is the absolute anharmonicity between the first and second level in the qutrit. This can be diagonalized to find the energy spectrum The (normalized) eigenstates of this Hamiltonian, expressed in the basis { 0 , 1 , 2 }, are In the limit ∆ → 0, these reduce to the bare energy states |i → ĩ for i = 0, 1, 2 when δ > 0 meaning the driving frequency is below the undriven energy difference between the upper qutrit states. The Hamiltonian for the ψ 2 degree of freedom reduces to where the diagonal term will again be throw away from this point onwards. In conclusion, we see that by tuning A ext and/or ω ext , we can change E 1 and E 2 , i.e. the contribution of the part of the Hamiltonian purely related to ψ 2 to the energy of the two highest qutrit states.
Next, we perform the transformation to the rotating picture to the parts of the Hamiltonian purely related to the outer fluxes j = 1, 3. We choose the qubit spin-up state as the excited state, e.g. we associate b † j b j → 1 2 + 1 2 σ z j . Thus where we have made the usual truncation to a qubit.
We have yet to do the transformation to the rotating picture for the interaction terms. The factors involved are (b † j + b j ), which normally for a qubit maps to σ x j before moving to the interaction picture, and (b † j + b j ) 2 , which maps to 2 + σ z j for a qubit. We start by looking at the factor (for j = 1, 3): The first factor is: where for i = 0, 2. The second factor contributes with: So: where we in the last equality have used the rotating wave approximation to remove the fast oscillating terms. Since we want to look at the primed mixed states as the new tunable qutrit, we transform this to the primed basis: Some of these terms look troubling, but luckily, all terms proportional with an off-diagonal overlap between the primed and tilde states will be much smaller than the diagonal ones and can be ignored. Also, all these terms are general energy non-conserving and thus could also be eliminated using a rotating wave approximation in the interaction picture. We note that the imaginary factor from the matrix elements can be eliminated by defining |1 → |1 new = −i |1 old . We thus end with: where the "R" denotes the transformation to the rotating frame. We note that the couplings |0 ↔ |1 and |1 ↔ |2 are not equal. In fact, for small ∆, the latter is a factor of √ 2 bigger, originating from the definition of the bosonic step operators.
We can now look at the transformation of the last kind of interaction term: For the second factor, the transformation is equal to the identity for the standard qubit basis, i.e.
Performing the transformation for the first factor, we get: Again, the last two terms are fast-rotating and can be removed. We have defined: Moving to the primed basis, we find: Again, we will ignore the energy non-conserving terms proportional to an off-diagonal overlap. We will, though, keep the terms proportional to a non-diagonal overlap in the energy conserving terms for accuracy of the final Hamiltonian.
Evaluating the matrix elements gives: We are now ready to look at the full transformed Hamiltonian.

Full Hamiltonian
We can now write down the full Hamiltonian for the system when coupled to an external field mixing the first and second excited state in the rotating frame of the Hamiltonian H ext = − 3ωext 2 − ωext 2 1 1 + ωext 2 2 2 . We start from the Hamiltonian in equation (A8) and now insert how the factors containing the bosonic step operators transform under such a transformation, as calculated in the previous section. To sum, up, we found: where We remind the reader that we have defined the excited state as |↑ and the ground state as |↓ , which explains the sign in front of the σ z s. We can now write out the full Hamiltonian in the rotating frame, changing the indices from 1, 2, 3 to L, M, R for the sake of visualizing the system as a chain of two qubits with a qutrit in the middle: Here, the diagonal constants are while the D i constants are defined in (A58) and the rest are To sum up, we have now, starting from the circuit in figure 9, calculated the resulting Hamiltonian and added a dynamical tuning of the qutrit via driving of the first and second excited bare qutrit energy levels. In doing so, we first transformed to the rotating picture with respect to the driving field and then to the new mixed qutrit eigenstates, finally obtaining the Hamiltonian above.
We wish to obtain an entangled state between the state where qubit one and three is in the excited state and the state where they are both in the ground state. Since the Hamiltonian conserves the total projection of spin, we start in the state |↓ 2 ↓ . We look at the matrix representation of our Hamiltonian in the basis { |↓ 2 ↓ , |↓ 1 ↑ , |↑ 1 ↓ , |↑ 0 ↑ }. If we assume the system to be symmetric, i.e. we do not distinguish between α = L and α = R, and further assume the states to be resonant, i.e. ∆ M = ∆ R = ∆ L = δ M , the contribution from these energy terms is proportional to the identity and we are left with the matrix representation of the XX and ZZ-terms, which we can easily diagonalize to find the eigenvalues. In the simplified case J αM01 = J αM12 = J αM and D 1 = D 2 = 1 [50], the eigenvalues are: where The associated eigenvectors are We can now find Here, the second option implies that sin J (z) αM t = ± sin(λt) = ±1 = 0, which is not compatible with the condition (B7). Therefore, we must have sin(λt) = 0 and from (B7) also cos J  3. We notice that the desired entangled state is reached at t = π/λ = π/2J This can be fixed by first operating with a ccz gate on the system so that only this specific state (|↓ 1 ↓ ) obtains a sign change. This of course requires that the states are first moved out of resonance, but this is already required in order to catch the system in the swapped state. We then obtain the state −ac |↑ 1 ↑ − ad |↓ 1 ↑ − bc |↑ 1 ↓ − bd |↓ 1 ↓ = − (c |↑ + d |↓ ) |1 (a |↑ + b |↓ ) . (C11) It is clear that the states of the outer qubits have been swapped, just as we wanted! We thus end up with a cswap gate in the interaction picture of H 0 with a two-step operation scheme and with the control "bit" being comprised of the states |0 and |1 of the qutrit [52] (or, equivalently, the states |1 and |2 if we instead apply the ccz so only the state |↑ 1 ↑ receives a sign change).
A simulation of the cswap/Fredkin gate is shown in figure 6. Here, we have chosen the initial state (the population of which is shown in black) to be 1 where Ω M is the coupling strength to the middle qutrit and the kets denote the qutrit states. We have here assumed that the qutrit is detuned sufficiently from the qubits so that we can target the qutrit specifically. Throughout the driving we have, somewhat arbitrarily, used the values Ω M12 = J αM01 and frequency ω mw = δ M − 4J (z) αM . The driving is then performed for a time t 2 = 2π/Ω M12 . We assume that we can switch between these Hamiltonians instantly. We notice that we get a fidelity of around 0.95 for a perfect swap operation when the qutrit starts in the first excited state, as predicted by the analytical investigation above.