Universal qudit gate synthesis for transmons

Gate-based quantum computers typically encode and process information in two-dimensional units called qubits. Using $d$-dimensional qudits instead may offer intrinsic advantages, including more efficient circuit synthesis, problem-tailored encodings and embedded error correction. In this work, we design a superconducting qudit-based quantum processor wherein the logical space of transmon qubits is extended to higher-excited levels. We propose a universal gate set featuring a two-qudit cross-resonance entangling gate, for which we predict fidelities beyond $99\%$ in the $d=4$ case of ququarts with realistic experimental parameters. Furthermore, we present a decomposition routine that compiles general qudit unitaries into these elementary gates, requiring fewer entangling gates than qubit alternatives. As proof-of-concept applications, we numerically demonstrate the synthesis of ${\rm SU}(16)$ gates for noisy quantum hardware and an embedded error correction sequence that encodes a qubit memory in a transmon ququart to protect against pure dephasing noise. We conclude that universal qudit control -- a valuable extension to the operational toolbox of superconducting quantum information processing -- is within reach of current transmon-based architectures and has applications to near-term and long-term hardware.

Gate-based quantum computers typically encode and process information in two-dimensional units called qubits. Using d-dimensional qudits instead may offer intrinsic advantages, including more efficient circuit synthesis, problem-tailored encodings and embedded error correction. In this work, we design a superconducting qudit-based quantum processor wherein the logical space of transmon qubits is extended to higher-excited levels. We propose a universal gate set featuring a two-qudit cross-resonance entangling gate, for which we predict fidelities beyond 99% in the d = 4 case of ququarts with realistic experimental parameters. Furthermore, we present a decomposition routine that compiles general qudit unitaries into these elementary gates, requiring fewer entangling gates than qubit alternatives. As proof-of-concept applications, we numerically demonstrate the synthesis of SU (16) gates for noisy quantum hardware and an embedded error correction sequence that encodes a qubit memory in a transmon ququart to protect against pure dephasing noise. We conclude that universal qudit control -a valuable extension to the operational toolbox of superconducting quantum information processing -is within reach of current transmon-based architectures and has applications to near-term and long-term hardware.

I. INTRODUCTION
In analogy to their classical counterparts, quantum computers encode information in binary systems -known as qubits -that consist of two physically distinct states. Many experimental implementations, including trapped ions, superconducting qubits, neutral atoms, and spin qubits, embed the logical qubit subspace in a much larger multi-level Hilbert space [1][2][3][4]. This full Hilbert space allows for a richer set of controls that is forgone by confining the computational space to qubits. By coherently controlling additional states we enrich the set of available operations and make use of d-dimensional qudits as the local units of information.
Qudits have several conceptual advantages over their qubit counterparts. The number of qudits needed to reach the same Hilbert space dimension as a system of qubits is reduced by a factor of log 2 (d). For instance, ququarts, i.e. d = 4, cut the number of computational units in half. Moreover, qudits synthesize arbitrary unitaries more efficiently than qubits with regards to the number of required entangling gates [5], an advantage that already emerges in the qutrit case of d = 3 [6]. This has led to proposals for efficient implementations of quantum algorithms in the qudit space [7,8]. Applications that are formulated in a product space of multivalued units particularly benefit from a qudit encoding. These include the quantum simulation of bosonic modes that arise, e.g., in light-matter interaction processes [9][10][11], lattice gauge theories [12][13][14] and chemical vibrations * aur@zurich.ibm.com † ita@zurich.ibm.com and reactions [15,16], but also classical problems like multivalued integer optimization [17]. Moreover, qudit levels simplify the implementation of qubit gates [18,19] and POVM measurements [20,21]. Finally, qudits exhibit more complex entanglement than qubits [22], which can be leveraged to improve protocols such as superdense coding [23] and quantum error correction (QEC) codes [24][25][26][27][28][29][30][31][32][33][34]. As opposed to block-encoding QEC techniques, which use many physical qubits to encode a single logical one, an error-protected logical qubit can be encoded into the multi-level structure of a single qudit system, as proposed for molecular spins [29][30][31]. This simplifies the implementation of QEC by strongly reducing the number of controlled multi-qubit operations. Qudit-based quantum information processing has recently been explored in trapped ions [35], photonic systems [36], Rydberg atoms [37], ultracold atomic mixtures [38], and molecular spins [29][30][31][32][39][40][41]. Here, we conceptualize a superconducting qudit quantum processor, where d qudit levels are encoded into the d energetically lowest states of a transmon [42]. We propose a concrete scheme to transpile arbitrary unitary circuits into a universal set of hardware-native single-and twoqudit gates, which in principle generalizes to any qudit dimension d.
Operating transmons as qutrits has already found many applications including multi-qutrit entanglement studies [43,44], realization of multi-qubit gates [19,45,46], excited state promotion readout [47,48], quantum metrology [49], fast resets [50], and the realization of two-qutrit quantum algorithms [51]. The ququart case has been considered in the context of single-qudit applications [20,52], while several experiments have recently reported coherent control of a single ququart [53][54][55]. However, up to now, it was unclear how to drive general two-qudit unitaries in transmons. For qubits, a popular realization of the Cnot gate relies on driving cross-resonance pulses [56]. Here, we propose a generalization of the echoed cross-resonance (ECR) gate in the qudit space as the fundamental entangling gate between two qudits. We study this generalized ECR gate by numerically simulating the time-dynamics of the system, demonstrating that it can reach ququart gate fidelities of ∼ 99% with simple pulse shapes.
This article is organized as follows. In Sec. II, we propose a universal set of qudit operations and numerically benchmark their fidelities with simulations that include leakage, crosstalk and charge-noise errors. Sec. III outlines how to decompose general two-qudit gates into the qudit ECR gate and single-qudit gates, enabling the synthesis of arbitrary unitary circuits with fewer entangling gates compared to qubits. Finally, in Sec. IV, we show that the ECR gate forms the basis of a qudit-based QEC protocol and we demonstrate its basic implementation in the ququart case. We conclude with a discussion on current and future developments in Sec. V.

II. QUDIT CONTROL IN TRANSMONS
Superconducting circuits are a promising architecture to realize large-scale quantum information processors [57]. They have fast gates and measurement repetition rates [58] with comparatively long coherence times [59]. The transmon is a particularly popular type of superconducting circuit in which a Josephson junction of energy E J shunted by a large capacitance with charging energy E C creates an anharmonic oscillator. The eigenenergies E n of this anharmonic oscillator are characterized by the base excitation frequency ω = (E 1 − E 0 ) between the ground and first excited state, and the anharmonicity α = (E 2 − E 1 ) − ω (setting ℏ = 1). Transmons are tuned towards large ratios of E J /E C ≫ 1. This exponentially suppresses charge noise that causes fluctuations in the eigenenergies of the system, while maintaining sufficient anharmonicities for the selective driving of individual transitions [42]. Whereas the two lowest eigenstates of a transmon are typically employed as a qubit, in this work we encode a d-dimensional qudit in the d lowest energy states. We focus specifically on the ququart case of d = 4 which represents the minimal unit for embedded QEC.

A. Single qudit control
We briefly review how single-qudit unitaries are realized in transmons, following Ref. [20]. Individual transmons are driven by microwave pulses whose carrier frequency are adjusted to resonantly drive different transitions. With base frequencies of ω/(2π) ∼ 6 GHz and anharmonicities of α/(2π) ∼ −300 MHz, the transition  Figure 1. Transition frequencies of a two-transmon model. Blue and red lines denote the control and target, with bare frequencies of ωc/(2π) = 6.3 GHz and ωt/(2π) = 6.1 GHz, respectively. The zoomed inset shows the dressing of the bare target frequency due to the capacitive coupling with the average transition frequency of ωt/(2π) in dashed green.
frequencies of neighboring levels among the first four excited states all lie within 1 GHz from the base frequency [see Fig. 1]. Such frequency shifts are routinely applied in existing microwave control stacks. We thus assume the ability to drive rotations between neighboring levels, e.g., denotes an x-rotation between levels |n⟩ and |n + 1⟩ and acts as the identity on all other levels. Here, σ x is the Pauli x operator and 1 n is the n-dimensional identity operator. Single-qudit phase gates can be applied "virtually" by adjusting the phases of subsequent drive pulses, which affects the polar angle of their rotation axes in the xy-plane. These virtual phase gates are near-perfect and come at no additional experimental cost [60]. By keeping track of the relative phase advances between all d levels, the correct frame changes can be implemented on the drives. In this setting, any single-qudit operation can be realized with a sequence of at most d(d − 1)/2 two-level rotations R n(n+1) x through a decomposition into Givens rotations [20,61].

B. Multi-qudit control
In addition to single-qudit transformations, one entangling two-qudit gate is required to form a complete set of universal qudit operations [62]. We therefore investigate extensions of the popular cross-resonance gate to the qubit space.

The cross-resonance gate
The cross-resonance (CR) gate is applicable to transmons with a weak interaction mediated by a common resonator, since it is an all-microwave gate [56,63]. Here, one transmon, referred to as the control, is driven at the |0⟩ t ↔ |1⟩ t transitions frequency ω t of the second transmon, referred to as the target. This CR tone entangles the two systems through a complicated interaction dominated by a Z c ⊗ X t generator in the qubit space [64]. When tuning this rotation to R ZX (π/2) = exp(−i π 4 σ z ⊗ σ x ), the CR gate is equivalent to a Cnot up to local Clifford gates. Analytical studies of CR tones based on perturbation theory show that the effective two-qubit interaction Hamiltonian contains various single-qubit terms (I ⊗X, I ⊗Z, Z ⊗I), as well as a weak Z ⊗Z term [65,66]. A popular approach to largely cancel these unwanted terms employs the echoed pulse sequence shown in Fig. 2(a). In the echoed cross-resonance (ECR) gate the effects of the Z ⊗ I, Z ⊗ Z, and I ⊗ X destructively interfere, thus isolating the desired Z ⊗ X generator [67]. The echo sequence can further be improved with resonant rotary pulses on the target qubit [68]. Previous studies of the CR gate have focused on the qubit subspace [64][65][66]. In Ref. [19], an ECR sequence with the control prepared in |2⟩ c enables a pulse-efficient decomposition of the three-qubit Toffoli gate. Going beyond this, we now investigate the action of the CR gate in the full two-ququart subspace through a numerical simulation of the system's dynamics.
The transmons are coupled by a weak exchange interaction of strength J/(2π) = 1.8 MHz that is routinely achieved in existing systems (see Appendix A 2 for a detailed definition of the model Hamiltonians). This always-on coupling J leads to a small shift of the eigenenergies of the joint two-transmon systems. From now on, when we denote a basis state as |n⟩ c ⊗ |m⟩ t , we refer to these dressed basis states. In this basis, the |0⟩ t ↔ |1⟩ t transition frequency varies by ∼ ±100 kHz depending on the state of the control qudit [see inset of Fig. 1]. We therefore set the drive frequency of the CR tones at ω t /(2π) = ω t /(2π) + 13 kHz obtained by averaging over the lowest four states of the control. This keeps the de-  Figure 2. Qudit space action of the echoed cross-resonance gate. (a) The ECR pulse sequence applied to the control qudit consists of two cross-resonance tones (gray) played at the target qudit frequency ωt with opposite amplitudes, each followed by a π-pulse on the control. (b) Action of each pulse on the initial target state |0⟩ t depending on the control state |ψ⟩ c on the Bloch sphere spanned by {|0⟩ t , |1⟩ t }. By construction of the echo sequence, a θ (−θ) rotation is applied in the |1⟩ c (|0⟩ c ) case. (c) Evolution of the populations starting from |0⟩ t depending on the control state |ψ⟩ c for the pulse sequence shown in (a). Color denotes the state of the control while line style denotes the state of the target. Pulse durations are calibrated to θ = π.
tuning to each transition as small as possible.

Simulation results
We now analyze the action of a single CR pulse by numerically integrating the full dynamics of the timedependent Schrödinger equation of the two-transmon system in the d = 4 subspace. We choose a Gaussian-square pulse envelope of amplitude Ω/(2π) = 50 MHz and duration τ with a Gaussian rise and fall to suppress leakage out of the |0⟩ t − |1⟩ t subspace, as shown in Fig 2(a) and detailed in Appendix A 3. The chosen model parameters ω c , ω t , α c , α t , J and Ω yield effective Z ⊗ X and Z ⊗ Z interaction strengths in the two-qubit subspace of ω ZX /(2π) = −1.15 MHz and ω ZZ /(2π) = 31 kHz, respectively. Generalizing from the qubit case, we expect the resulting dynamics to create a R 01 x (φ) rotation on the target, whose rotation angle and direction depend on the state of the control. We write this as where each rotation angle φ i is proportional to the total area under the pulse envelope. For the QEC application presented in Sec. IV, we require a rotation angle of ±π in the |0⟩ c case for the echoed sequence. We thus aim to calibrate the CR tones such that φ 0 + φ 1 = π. For the chosen model parameters, this is achieved with a pulse duration of τ = 289 ns shown in Fig. 2(a). Up to local phases on the control and target, the unitary resulting from our pulse simulation reaches an average gate fidelity of F = 99.93% to Eq. (2) with angles ⃗ φ = (φ 0 , . . . φ 3 ) ≈ (0.22, 0.78, 0.30, 0.26) π. This result justifies the intuition behind the schematic illustration in Fig. 2(b). Note the difference in the rotation direction between the states |0⟩ c , |2⟩ c , |3⟩ c and |1⟩ c .
The echo π-pulse R 01 x (π) in the ECR pulse sequence is simulated as a Gaussian at the (average) frequency of the control qudit ω c . We fix the pulse duration at 100 ns and calibrate the amplitude to 12.3 MHz, obtaining a fidelity of F = 99.99%, for details see Appendix A 4. This is slower than current state-of-the-art X-gates in transmons [71,72], to keep leakage minimal. For simplicity, we omit a careful calibration of Drag pulses by which leakage errors and pulse duration could be further reduced [73]. Assuming that the reversed amplitude in the second CR tone of the ECR sequence reverses all rotation angles ⃗ φ in Eq. (2), we expect that the unitary of the full ECR sequence is With the CR tones calibrated as described above, our simulation of the entire pulse sequence obtains an average gate fidelity of 99.56% for the targeted rotation angle U ECR (θ = π) (up to local phase gates). This is the unitary error of the gate. To estimate the additional effect of incoherent error channels, we add amplitude damping with a T 1 -time of 310 µs and pure dephasing with a T 2 time of 170 µs to the simulation as detailed in Appendix A 6, which correspond to median T 1 and T 2 times of state-of-the-art IBM Quantum devices [71]. This reduces the fidelity to 98.66%. With values of 474 µs for T 1 and 666 µs for T 2 , corresponding to the best available pair of neighboring qubits, the fidelity becomes 99.22%. In this work, we are primarily interested in understanding the limits to the unitary error of this gate. We thus leave exploring the trade-off between the unitary gate error -which is minimal for longer gate durations -and the incoherent gate error that increases with the gate duration for future work.
The evolution of the populations in the two-transmon system under the echoed CR sequence is shown in Fig. 2(c), with details given in Appendix A 5. The remaining unitary error of the gate originates mainly from the detuning of the CR tones to the target frequency in the cases where the control is in |2⟩ c and |3⟩ c [see Fig. 1]. This leads to a small Z-contribution in the effective rotation axis in each respective subspace, which is not fully reversed by the echoed CR sequence. These effects could potentially be resolved by adding rotary tones [68], including virtual phase gates into the sequence [60] or more advanced qudit-based optimal control techniques [74,75]. We find that leakage out of the |0⟩ t − |1⟩ t subspace is not a relevant error source with populations of those levels remaining under 10 −5 after the ECR sequence.
For qudit-based circuit decomposition, the ECR gate from Eq. (3) is particularly convenient, as it only depends on a single parameter θ which is tunable through the duration of the CR pulses. In Sec. III, we present a decomposition routine that implements general qudit unitaries through the ecr gate and single-qudit gates.

C. Experimental requirements
Controlling additional states of a transmon beyond the qubit space comes with an increased complexity. We now comment on the requirements to operate the transmon as a ququart in the presence of charge noise, limited lifetimes, and imperfect ququart readout. Charge noise is exponentially larger in higher-excited states |n⟩ [76]. However, charge noise is exponentially suppressed with increasing E J /E C at the cost of a polynomial reduction of the anharmonicity α [42]. Our simulations suggest that reasonable anharmonicities remain with manageable charge noise for ququart operation when choosing E J /E C ∼ 70. Scaling the system to more than two ququarts may require a careful design of the control pulses to mitigate leakage due to the weak anharmonicity and the frequency crowding introduced by the additional qudit levels.
Finally, transmons are measured with a dispersive readout by coupling to a resonator. This technique can distinguish between multiple qudit states, as demonstrated for ququarts [77]. In summary, our simulations along with previous experimental demonstrations of coherence times and readout confirm that high-fidelity ququart operation of transmons is possible.

III. UNIVERSAL QUDIT GATE SYNTHESIS
Quantum algorithms are described at the quantum circuit level with abstract gate instructions that typically do not match those of the hardware. A vast amount of work is dedicated to producing practical and efficient hardware-executable gate decompositions for qubits [19,[78][79][80]. However, little attention has been given to the qudit case aside for general algorithms. Here, we show how to transpile an arbitrary d n × d n unitary on a system of n d-dimensional transmon qudits into the hardware-native gate set of single-qudit rotations and the ECR gate. This constitutes the first practical blueprint for qudit unitary gate synthesis on superconducting qudits, as detailed in Appendices B and C.

A. Qudit transpilation
Any set of arbitrary single-qudit gates combined with a single entangling two-qudit gate is in principle exactuniversal [62,81]. Several constructive decomposition routines exist which rely on different choices of two-qudit gates [8,82]. For qubits, the quantum Shannon decomposition (QSD) is a powerful tool to synthesize arbitrary unitaries [83]. We build on the multivalued QSD that generalizes the QSD to the qudit setting [84]. Within this framework, the circuit complexity, quantified by the number of two-qudit gates required to achieve arbitrary N -qudit unitaries, is reduced by a factor of d − 1 compared to the qubit setting of d = 2, highlighting the comparative efficiency of qudit circuits [5]. The multivalued QSD iteratively reduces the desired unitary to block matrices that contain only one-qudit and two-qudit unitaries. The remaining two-qudit blocks consist of singlycontrolled gates that apply a unitary U ∈ SU(d) on the target qudit if and only if the control qudit is in the basis state |m⟩ [84]. We now present a decomposition routine to realize C m [U ] through single-qudit gates and the ECR(θ) gate. This decomposition holds for any d, as long as the ECR gate in Eq. (3) acts as |n⟩⟨n| ⊗ 1 for all states n ≥ 2.
can then be implemented as a product of controlled phase gates between the target's |0⟩ and |j⟩ states x ] rotations and local phase gates x ] into local permutations and a single C 0 [R 01 x ] gate. Gray shaded gates cancel between consecutive C m [R 0j x ] gates as they arise in (b). (d) Realization of the C 0 [R 01 x (θ)] gate through echoed cross-resonance gates.
controlled x-rotations, yielding [see Fig. 3 This shifts all angular dependence into local phase gates we implement virtually. The general m-controlled R 0j x gates from Eq. (6) can be realized through 0-controlled R 01 x rotations by applying single-qudit permutation gates on the control and the target, as shown in Fig. 3(c). Here, X n(n+1) denotes a swap of the levels i and i + 1 which is equivalent to R n(n+1) x (π) up to virtual local phases. Note that the permutation gates on the control qudit to shift the control from m to 0, highlighted in gray in Fig. 3(c), need to be applied only once at the beginning and the end of the decomposition sequence.
The final step is now to realize the remaining C 0 [R 01 x (θ)] gates with the ECR gate defined in Eq. (3). Since the ECR gate acts non-trivially on the target for both control states |0⟩ c and |1⟩ c , C 0 [R 01 x (θ)] can not be implemented with a single U ECR (θ) gate. Instead, we split the rotation into d − 1 steps of U ECR (−θ/d) and permute the levels of the control between each step, as shown in Fig. 3(d). This way, the action on the target is R 01 x (θ(d − 1)/d) when the control is in |0⟩ c and R 01 x (−θ/d) when the control is in any other state. Applying an R 01 x (θ/d) gate on the target finally recovers the . . . Figure 4. Example application of the general qudit transpiler decomposing a |2⟩-controlled iSWAP gate between two ququarts. Colors indicate the different steps of the transpilation shown in Fig. 3, while two-qudit boxes denote ECR(θ) gates. Fig. 3 shows the decomposition in the most general case. In practice, the complexity of a desired two-qudit gate can be much simpler, as illustrated by the decomposition of a |2⟩-controlled iSWAP gate C 2 [R 12 x (−π)], shown in Fig. 4. Following the notation from above, α 2 , α 3 and γ of the diagonal D are zero, and α 1 = −π/2. Therefore, only one of the green blocks from Fig. 3(a) appears in the decomposition. The single-qudit diagonalization gates V can be realized with two R 01 x gates, one R 12 x gate and virtual phase gates.

B. Comparison to qubits
In general, the presented decomposition routine requires O(d 2 ) two-qudit entangling gates and O(d 3 ) singlequdit gates. In the d = 4 case, any C m [U ] unitary can be synthesized with 18 U ECR (±π/4) gates and 56 + 2m single-qudit gates (not counting virtually implemented phase gates). This construction adds an overhead of single-qudit gates, but makes an efficient use of the entanglement generation rate of the CR effect as the total duration of the ECR pulses is proportional to θ(d − 1)/d. In comparison, a qubit Cnot gate is locally equivalent to a U ECR (±π/2) pulse sequence, and thus takes roughly twice as long as a U ECR (±π/4) qudit gate.
To benchmark the efficacy of our qudit transpiler, we compare its performance against a state-of-the-art qubit transpiler available in the software package Qiskit [85]. Qiskit's transpiler uses a column-by-column decomposition developed in Ref. [86]. We focus on the task of unitary synthesis of general 16 × 16 matrices U target . For the qudit case, we use two ququarts with a basis gate set made of bidirectional U ECR (±π/4) gates, single-qudit gates and virtual phase gates. We make use of an iterative cosine-sine decomposition [87]   linearly connected qubits and a basis gate set of bidirectional Cnot gates as well as single-qubit √ X gates and parametric virtual phase gates.
To compare the gate cost between the qubit and the qudit case, we equate two U ECR (π/4) gates with one Cnot gate, and decompose all single-qudit gates into R n,n+1 x (π/2) gates which we equate to a single-qubit √ X gates. We do not count virtual phase gates since they are implemented by a phase change of subsequent gates. We find that the qubit transpiler requires 286 Cnot and 244 √ X gates to synthesize random SU (16) gates. The ququarts transpiler achieves the same unitary with an equivalent of 170 Cnot and 2776 √ X gates. This highlights the central tradeoff between qudit and qubit transpilation: The two ququarts reduce the required number of entangling gates by ≈ 40%, at the cost of increasing the number of single-qudit gates by a factor of ∼ 11. Since single-qudit gates are typically an order of magnitude faster with at least an order of magnitude higher fidelity, there might be a regime where the qudit transpilation is favorable despite the larger total gate count.
Besides dense, random unitaries, we consider the physically motivated example of the exponentiation of a Hamiltonian associated to a small molecule. We choose the second-quantized Hamiltonian corresponding to the LiH molecule in a minimal Sto-3g basis set, mapped to a four-qubit Hamiltonian H LiH with a Jordan-Wigner mapping. Next, we synthesize the target unitary U target = e −iH LiH t for a time t = 10 and find that qubit transpilation requires 235 Cnots and 218 √ X gates. The ququart case takes the equivalent of 78 Cnots and 744 √ X gates, as shown in Fig. 5. This amounts to a reduction by a factor of 3.01 in entangling gate cost while increasing the single-qudit gate count only by a factor of 3.41. This example illustrates that our qudit transpiler can already rival a heavily optimized qubit transpiler.

C. Qudit gate extensions
As exemplified above, the qudit-based unitary synthesis creates a substantial overhead in single-qudit gates. This is because the entangling gate we use only acts nontrivially when the control is in |0⟩ c or |1⟩ c and only affects the target states |0⟩ t and |1⟩ t , see Eq. (3). This creates the need for single-qudit permutation gates on both the target and the control, such as the single-qudit gates in Fig. 3(c). We now outline two strategies to overcome this bottleneck. (i) The ECR gate acts trivially when the control is in |2⟩ c and |3⟩ c due to the single-qudit R 01 x gates applied in the echoed sequence, see Fig. 2. Replacing these gates with R 12 x or R 23 x rotations creates a gate that instead acts non-trivially on the target when the control is in states |1⟩ c / |2⟩ c or |2⟩ c / |3⟩ c , respectively. (ii) We envision that changing the frequency of the ECR drive tones, such that it is resonant with the |1⟩ t − |2⟩ t or |2⟩ t − |3⟩ t transitions of the target would enable a gate that directly addresses the subspaces spanned by {|1⟩ t , |2⟩ t } or {|2⟩ t , |3⟩ t }, respectively. The added flexibility of either approach would strongly increase the effective "connectivity" of the different levels of two coupled qudits; the permutation gates would no longer be needed to move states into the {|0⟩ , |1⟩} interaction subspace.
Moreover, the number of gates in our decomposition could potentially be improved by working with a direct (non-echoed) CR gate [48], which, however, increases the complexity as this depends on multiple parameters ⃗ φ, see Eq. (2). More broadly, our decomposition could be adapted to different interactions as those provided by, e.g., tunable couplers, or frequency-tunable transmons [51,88]. Another approach to improve the singlequdit gate overhead is given by optimal control pulse shaping techniques [75]. Finally, note also that the step in Eq. (6) introduces controlled R x gates with a maximal rotation angle of ±π, irrespective of the original rotation angle α. Thus, the resulting pulse schedules could be shortened by pulse-efficient circuit transpilation techniques as developed in [79], resulting in better gate fidelities.

IV. CORRECTION OF DEPHASING ERRORS
The multi-level transmon structure and the ECR gate can implement qudit-based QEC protocols [26,28], which were recently proposed in the context of molecular spin qudits with embedded error correction [29][30][31][32][33]. We now first translate the same ideas to the here-proposed transmon setup and then present a detailed simulation of a QEC routine. This highlights how the universal qudit logic toolbox could be used to engineer lower error rates for qubit computations.

A. Embedding error correction into qudits
A 4-level qudit is the minimal unit needed to embed QEC against a single kind of noise source [30], such as amplitude damping or pure dephasing [27]. Indeed, for an error to be identified and corrected, its action on a superposition of logical states (code words) must bring them to distinguishable ones, thus requiring a Hilbert space of dimension ≥ 4. Specifically, we consider a correction of pure dephasing errors, which for a bosonic system are well approximated by an error operator √ Γn, where n = a † a and a † (a) is the creation (annihilation) operator of the bosonic mode [28]. We model dephasing as Markovian noise described by the Lindblad equatioṅ where ρ is the system single-qudit density matrix subject to an external driving Hamiltonian H(t) and Γ = 1/T 2 is the dephasing rate. Expanding the solution to this equation in series for small Γt yields a leading error term proportional to n in the Kraus representation [30]. An analogous result, with error operators represented by powers of n, can be derived for non-Markovian noise [28]. The same form of noise also describes pure dephasing in a slightly anharmonic transmon system as considered here, by simply making the replacement n → m m|m⟩⟨m| in the truncated Hilbert space m = 0, 1, 2, 3 [89]. We require a pair of code words |0 L ⟩ and |1 L ⟩ protected against the set of errors E k ∈ {I, n}, i.e., satisfying the Knill-Laflamme conditions [90]: A possible choice is These code words fulfill Eq. (9) by construction and it can be easily checked that ⟨0 L | n |0 L ⟩ = ⟨1 L | n |1 L ⟩ = 3/2 and ⟨0 L | n 2 |0 L ⟩ = ⟨1 L | n 2 |1 L ⟩ = 3. Hence, the effect of a n error is to bring a generic encoded logical state 0 dephasing encoding decoding detection + recovery error no error 1 Figure 6. Sequence to correct pure dephasing errors in a transmon. The initial qubit state |ψ⟩ 0 is encoded into a ququart logical state |ψL⟩. After dephasing, a decoding unitary UD maps the ideal and erroneous cases to orthogonal states. The error is detected by applying a UECR(π) gate where the target is an ancilla qubit prepared in |1⟩. In the ideal case where the ancilla is de-excited to 0, the state is re-encoded, while in the error case, where the ancilla is measured in 1, a recovery operation UR restores |ψL⟩.
This is a superposition of the code words and of the error words |e 0 ⟩ = ( √ 3 |0⟩ − |2⟩)/2 and |e 1 ⟩ = (|1⟩ − √ 3 |3⟩)/2. Crucially, |ψ e ⟩ preserves α and β. Note that the Lindblad dynamics of Eq. (8) yield the same time evolution as for a spin S subject to pure dephasing, see, e.g., Ref. [30]. This leads to an independent decay of each coherence ρ mm ′ with an exponential rate (m − m ′ ) 2 /T 2 . Indeed, the number operator appearing in Eq. (8) is equivalent to the spin operator S z apart from an irrelevant shift, i.e. S z = n − S.
To test the performance of this qudit code in protecting a transmon memory from dephasing, we consider a pair of transmons. The first one, used as a ququart, encodes the logical state defined by Eq. (10). The second one acts as an ancillary qubit to detect errors. The protocol is summarized in Fig. 6 and consists of the following steps: An initial qubit state |ψ⟩ 0 = α |0⟩ + β |1⟩ is encoded into the logical state |ψ L ⟩ = α |0 L ⟩ + β |1 L ⟩ by an encoding unitary realized with pulses on neighboring levels U E = R 12 y (−π)R 01 y (−2π/3)R 23 y (π/3)R 12 y (π). The ququart then evolves freely for a memory time τ ϕ subject to pure dephasing according to Eq. (8). Next, the decoding sequence U D = U † E is applied to map the basis of the code and error words back into the basis of qudit eigenstates such that |ψ L ⟩ is mapped back to |ψ⟩ 0 and |ψ e ⟩ is mapped to α |2⟩ + β |3⟩.
To detect n errors, i.e., the qudit in |2⟩ or |3⟩, the qudit is coupled to a flag ancilla qubit prepared in |1⟩. The U ECR (π) gate with the data qudit as the control and the ancilla as the target de-excites the ancilla when the control is in |0⟩ or |1⟩. The ancilla is subsequently measured. This projects the qudit either to the 01subspace or the 23-subspace while preserving the encoded superposition. If the ancilla is found in |0⟩, i.e., no error has occurred, the encoding sequence U E can be reapplied, whereas, if the ancilla is found in |1⟩, a recovery sequence U R is applied to restore |ψ L ⟩ from U D |ψ e ⟩. This is accomplished with two-level rotations as U R = R 12 y (−π)R 01 y (π/3)R 23 y (−2π/3)R 12 y (π).

B. Implementation on transmons
We now benchmark the ququart error correction sequence in a transmon qudit through numerical simulations. We consider three cases: (1) The bare qubit case where the qubit state |ψ⟩ 0 dephases for a duration of τ ϕ according to Eq. (8) with no external drives and no encoding, (2) the ideal correction sequence, where all gates in Fig. 6 are applied as instantaneous and perfect unitaries, and (3) the correction sequence with simulations of the pulses that implement each gate by integrating Eq. (8) with the appropriate drive Hamiltonians. We choose a dephasing time of 200 µs, which is comparable to state-of-the-art T 2 values for IBM Quantum devices [71]. In cases (2) and (3), the encoded qudit dephases for a time τ ϕ before the correction cycle, after which a final decoding operation U D and tracing out of the ancilla obtains the resulting qubit state. For case (3), we use the two-transmon model and calibration of the U ECR (π) as presented in Sec. II B where the control qudit becomes the data qudit and the target qubit becomes the ancilla. For details on pulse shapes and numerics see Appendix A.
For all cases, we compute the channel E that maps |ψ⟩ 0 to the final qubit state of the sequence by constructing its 4x4 Liouvillian superoperator matrix. The performance of each qubit channel in preserving an input qubit state is benchmarked by the average gate fidelity to the identity F(E, 1 2 ). In the bare qubit case, F decreases expo- nentially with a time constant given by T 2 . The ideal correction sequence always improves on this for all dephasing times τ ϕ , see Fig. 7(a). The reduction in the error 1 − F is most pronounced after only short dephasing times τ ϕ < 0.1 T 2 and becomes less and less significant for larger τ ϕ , see Fig. 7(b). This is because higher-order powers of n become important for longer times, while the code only protects for first-order n-errors.
The pulse-level simulation introduces imperfections into the correction cycle that arise from finite unitary gate errors, leakage, non-zero durations of the gate and measurement pulses, during which the data qubit is unprotected and subject to dephasing. Therefore, after very short dephasing times, the correction sequence increases the qubit error compared to the bare qubit case [see Fig. 7(b)]. However, for τ ϕ > 0.025 T 2 , the code breaks even. With our choice of parameters, the best achievable error reduction of 45% is found after a dephasing time τ ϕ = 0.09 T 2 .
The error reduction can be extended to longer dephasing times by repeatedly applying the correction cycle, see Fig. 8(a). We denote the time between individual correction cycles as ∆t corr . Ideally, the fidelity is kept arbitrarily high by making ∆t corr correspondingly small. In reality, each correction cycle introduces a small error. For our pulse simulations, we empirically find that the fidelity after each correction cycle is well-described by an exponential decay of the form Here, T 2,eff is an effective T 2 time and F ∞ is the fidelity that is reached asymptotically for long times. We extract T 2,eff and F ∞ from fits to the data. Both quantities are plotted as a function of ∆t corr in Fig. 8(b) and Fig. 8(c), respectively. We find that for a short cycle time, the effective T 2 time reaches up to four times the bare qubit T 2 time. However, this comes at the expense of a much worse asymptotic fidelity at longer times, which, in the bare qubit case, is given by F ∞ = 2/3. The optimal correction frequency thus comes with a trade-off of shortterm gain vs. long term infidelity. Nonetheless, a significant reduction in the error can be upheld for a duration of ≈ T 2 without drastically worsening the asymptotic fidelity as shown by the blue curve in Fig. 8. In a more realistic setting, additional error terms such as amplitude damping are present, which is not handled by this code. We investigate how amplitude damping affects the protocol by adding jump operators of the form n/T 1 |n − 1⟩⟨n| for n ∈ {1, 2, 3} to the Lindbladian evolution of Eq. (8), see Appendix. A 6 for details. Here, T 1 is the time scale of the jumps which is chosen to decrease inverse proportionally with n. This model describes, in accordance with experiments [20,76], a cascading decay from higher to lower-excited states. With additional errors present the correction sequence fails to reduce the error compared to the bare qubit case [see Fig. 9]. In our model, the code reaches a break even point for T 1 /T 2 > 6, when pure dephasing is strongly dominant over amplitude damping. Improving the fidelities of the gates in the correction cycle lowers the break-even threshold. Fully eliminating the unitary errors of all gates reduces it to T 1 /T 2 > 3.3 for the chosen parameters of T 2 and τ ϕ . In this idealized case, we find that reducing τ ϕ further improves the threshold to T 1 /T 2 > 2. These conditions can arise in practice for transmons. For example, of the 127 qubits on ibm_sherbrooke, 9%, 18%, and 36% of the qubits have T 1 /T 2 ratios greater then 6, 3.3, and 2, respectively [71]. Finally, using more than four levels could enable a full-fledged error correction sequence. This is pursued for molecular nanomagnets, where the system size can be increased without a significant impact on decoherence [29][30][31]34]. For example, using d = 7 levels of a bosonic mode with code words |0 L ⟩ = |0⟩ + √ 3 |4⟩ /2 and |1 L ⟩ = √ 3 |2⟩ + |6⟩ /2, it is possible to correct for both dephasing errors (n) and relaxation errors (a) simultaneously [27,28].

V. DISCUSSION
We have proposed a method to perform universal quantum computation in superconducting transmon qudits. Our universal basis gate set consists of general singlequdit unitaries and an entangling cross-resonance gate between two qudits. With this gate set, we have developed a decomposition routine to realize arbitrary mcontrolled two-qudit gates C m [U ] as building blocks to synthesize general qudit unitaries. This decomposition is the center piece of a general purpose qudit transpiler to map application-level qudit-based quantum circuits to hardware-native instructions. Compared to a stateof-the-art qubit transpiler, this qudit decomposition reduces the number of entangling gates required to synthesize general unitaries. We have further proposed several strategies to overcome the single-qudit gate overhead opening future research directions for optimizing qudit unitary synthesis with cross-resonance gates.
The proposed entangling gate is suitable for dispersively coupled transmons. It represents a higherdimensional extension of the echoed cross-resonance gate previously employed for qubits. Our numerical model that includes charge noise and leakage errors predicts average gate fidelities of up to 99.6% with simple Gaussian pulse profiles. The main contribution to the unitary error is the frequency dependence of the dressed target states on the control states. These findings would benefit from systematic complementary analytical studies of the qudit-space interactions. For example, we chose qudit frequencies and anharmonicities such that transition frequencies between neighboring states are well separated. Further research could therefore seek more optimal parameter regions to maximize the desired Z ⊗ X cross-resonance rate, akin to analytical studies of the qubit case [66]. Other open questions are whether a direct cross-resonance driving without echoes benefits qudit operation or whether rotary tones reduce the unitary error, as demonstrated for qubits [68]. Finally, we note that cross-Kerr interactions, tunable couplers, or frequency-tunable transmons may offer different qudit gates [51,77,88].
Qudit operation of transmons is attractive from a theoretical standpoint, as it makes full use of the available quantum resources of the system. Compared to current standard transmon setups, the proposed gates require no additional microwave drive lines. Moreover, the fact that higher-excited states suffer increasingly from charge noise can be mitigated by moving the transmon parameters towards higher E J /E C -ratios than those typically employed for qubit operation. Our numerical simulations suggest that high-fidelity multi-ququart operations are possible under realistic experimental conditions. The maximum number of usable levels d max in a transmon qudit is limited by frequency crowding, charge noise and decoherence. Identifying d max is left to future work. Crucially, our work shows how to extend the recent experimental demonstrations of coherent single-ququart operations [20,[53][54][55] into fully-fledged quantum information processors capable of executing a quantum algorithm.
As an example application, the additional levels of a qudit space can encode logical qubit states for quantum error correction. By embedding logical states within a single object, this scheme significantly reduces the complexity of QEC. To date, its implementation has been proposed for molecular spin systems [30][31][32][33]40], leveraging the large number of addressable levels and their intrinsic coherence. Our work shows that transmons can also embed self-corrected logical units. As a proof-ofprinciple, we used four qudit levels and an ancilla flag qubit to reduce pure dephasing errors for an encoded qubit memory. As a tool to engineer lower noise rates, these techniques could complement some of the most advanced error mitigation strategies known in the literature, such as probabilistic error cancellation [91], to reduce the associated overheads. A fully-fledged quantum error correction code requires more complicated code words that cover more than four qudit states. Although going beyond d = 4 represents a non-trivial challenge for transmons, one may nevertheless envision optimal hybrid encoding schemes, where -making use of a two-qudit universal gate set as proposed here -the code space is spread over multiple qudits.
In conclusion, our results provide a blueprint for the implementation of multivalued quantum logic in transmons and has applications for both noisy as well as errorcorrected hardware. By enabling a richer set of operation modes and embedded functionalities, this approach could open up new design possibilities for the next generation of quantum processors. The eigenenergies E n ofĤ are subject to fluctuations with n g , with a maximal value given by the charge dispersion ∆E n = E n (n g = 0) − E n (n g = 1/2). We compute ∆E n by diagonalizingĤ in the charge representation truncating to 20 Fourier modes inφ [92]. We can then estimate the deviation ∆ω n,n+1 of the transition frequencies ω n,n+1 = E n+1 (n g ) − E n (n g ) from their mean as a uniform average over n g . For the chosen transmon model parameters with E J /E C ∼ 70 as presented in Sec. II B 2, we obtain ∆ω 01 /(2π) = 0.2 kHz, ∆ω 12 /(2π) = 7.7 kHz, and ∆ω 23 /(2π) = 185 kHz. To account for this uncertainty caused by charge dispersion, we apply ∆ω n,n+1 as a detuning to each pulse played on the n ↔ n + 1 transition.

Model Hamiltonians
The transmon Hamiltonian from Eq. (A1) is commonly simplified in the Kerr approximation by expanding the cosine term to fourth order. Taking also the next-highest order into account, the Hamiltonian in its eigenbasis truncated to the d = 4 subspace becomes [66] with the qubit frequency ω and the anharmonicity α.
The capacitive coupling Hamiltonian between control (c) and target (t) is given by H J = Jy c ⊗ y t . It is ex- This always-on coupling leads to a dressing of the basis states of the two-transmon system. The states |n⟩ c ⊗ |m⟩ t referred to in the context of the coupled system, denote the dressed eigenstates of the time-independent Hamiltonian An external microwave drive with a carrier frequency of ω d and pulse envelope Ω(t) leads to an interaction Hamiltonian (in the rotating wave approximation) of We simulate the action of a pulse applied to the control by numerically solving the time-dependent Schrödinger equation for the full Hamiltonian H tot = H 0 + H int (t) ⊗ 1 with the master equation solver provided by QuTip [93].

Single CR pulse
All CR pulses we apply to the control are played at a frequency of ω d = ω t , i.e., the target qudit frequency in the dressed basis averaged over the four lowest levels of the control qudit. We choose a Gaussian-square pulse shape which consists of a plateau of duration τ s between a Gaussian rise and fall with duration τ g and standard deviation σ. The pulse envelope is thus whereΩ is the maximal amplitude, is a rescaling constant, and τ = τ s + 2τ g is the total duration. We choose parameter values ofΩ/(2π) = 50 MHz, τ g = 36 ns, and σ = τ g /4 for the simulated CR pulses, as we empirically find that this leads to a tolerable amount of leakage [see Figs. 10 to 12]. To calibrate the rotation angles, we fixΩ, τ g , and σ, adjusting only the width τ s , and denote the obtained unitary as R CR (τ ).
We benchmark how well the action of a CR pulse is described by the conditional R 01 x rotations from Eq. (2) (denoted U CR (⃗ φ)) through the average gate fidelity F as defined in Ref. [94]. Under the time evolution of the CR pulse, each basis state |n⟩ c ⊗ |m⟩ t acquires a phase e −iαnm , which we assume to be uncorrelated, i.e., α nm = α n α m ∀n, m ∈ {0, 1, 2, 3}. We apply local phases after the action of the pulse to obtain the phase-corrected unitaries diag(e iαt 0 , e iαt 1 , e iαt 2 , e iαt 3 )]R CR (τ ).
In practice, these can be applied virtually on each qudit, as discussed in Sec. II A. For a duration of τ π = 289 ns, we numerically optimize the angles ⃗ φ and phases ⃗ α c , ⃗ α t , obtaining an optimal fidelity F(R CR (τ ), U CR (⃗ φ)) = 99.93%. Such a fidelity is possible since the optimized unitaryR CR (τ ) has a uniform phase structure with vanishing imaginary parts on the diagonal and little leakage, see Fig. 10, . The duration τ π is calibrated such that φ 0 + φ 1 = π, which leads to an echoed CR sequence with a rotation angle of θ = π.

Single qudit pulses
Here, we summarize details on the simulation of singlequdit pulses. The echoed CR sequence reported in Sec. II B 3 requires R 01 x (±π) gates, whereas the singlequdit encoding, decoding, and recovery operations as defined in Sec. IV A are built from R 01 y (±2π/3), R 01 y (π/3), R 12 y (±π), R 23 y (±π/3), and R 23 y (−2π/3) rotations. For simplicity, we simulate the single-qudit system of the control with the Hamiltonian H ′ c + H int (t) and set the drive frequency to ω d = ω i,i+1 c to drive R i,i+1 rotations. We set the phase of the pulse envelope Ω(t) to define the axis of rotation. While a real and positive (negative) Ω(t) drives x (−x) rotations, an imaginary positive (negative) Ω(t) drives y (−y) rotations.
Each single qudit pulse is played with a Gaussian envelope given by Eq. (A7) when setting τ s = 0 and σ = τ g /4 (up to a global phase setting the rotation direction). We fix the duration of the pulses τ g to 100 ns, 66.6 ns, and 33.3 ns for rotation angles ±π, ±2π/3, and ±π/3, respectively. The amplitudeΩ of the pulses is then tuned such that the area under the envelope matches the desired rotation angle. Within this model, we achieve average gate fidelities of > 99.99% (unitary error) in the ququart subspace for all single-qudit pulses.

Echoed CR sequence
Here, we discuss observations from the simulation of the echoed CR sequence in further detail. We simulate the CR pulses individually with the parameters given in Sec. A 3, applying the second CR pulse of the sequence with a negative amplitude. The durations of the CR tones τ s are optimized such that the total rotation angle in Eq. (3) is θ = π. The unitaries of the R 01 x (π) rotations on the control are simulated as discussed in Sec. A 4. We apply local phase corrections for the final unitary to maximize the fidelity with U ECR (π), similar to Eq. (A8). The final unitary, which achieves an average gate fidelity of 99.6%, is shown in Fig. 11. To further investigate the dominant contributions to the unitary error, we plot the evolution of all populations throughout the pulse sequence in Fig. 12. This is the same data as shown in Fig. 2(c), plotted on a logarithmic ordinate to highlight the small contributions in the undesired levels.
We can identify small non-zero off-diagonal entries in the |2⟩ c and |3⟩ c subspaces, which manifest in remaining populations of 0.005 -0.01 for |1⟩ t and |0⟩ t in the bottom two panels of Fig. 12. This means that the second CR pulse does not fully reverse the rotations that were applied to these states by the first CR pulse. We attribute this to the fact that the driving frequency ω t is detuned by 120 kHz to the |2⟩ c |0⟩ t ↔ |2⟩ c |1⟩ t transition and by −110 kHz to the |3⟩ c |0⟩ t ↔ |3⟩ c |1⟩ t transition [see Fig. 1]. Therefore, both the x-rotation of the first CR pulse and the −x-rotation of the second CR pulse carry a small Z-component, which results in a misalignment between the rotation axis of the two CR pulses. We also attribute the non-trivial phase structure on the diagonal that is discernible in Fig. 11 to this effect. The populations of the higher-excited states of the target, shown in purple in Fig. 12, remain below 10 −4 from which we conclude that the chosen pulse shape successfully limits leakage.
Finally, we summarize qualitatively the effect that the different parameters of our model have on the fidelity of the ECR gate. The transmon frequencies ω c , ω t and α c , α t define the level structure of the system. Through the E J /E C -ratio, this defines the amount of charge dispersion in each level. The closeness of frequencies in the system determine the susceptibility to leakage and crosstalk. The maximum drive amplitudeΩ determines the entangling speed of the gate and has a strong influence on leakage and crosstalk. With increasing coupling strength J the entangling speed of the gate also increases. However,  it also increases the dressing of the bare qudit eigenstates, which leads to a dependency of the |0⟩ t ↔ |1⟩ t frequency on the state of the control and limits the unitary of the ECR gate in the idle levels |2⟩ c and |3⟩ c as detailed above.

Lindbladian dynamics
We model non-unitary dynamics under a Markovian noise approximation with a Lindblad master equatioṅ where {L i } are a set of Lindblad jump operators. In Sec. IV, we consider two types of errors for ququarts, pure dephasing and amplitude damping. Firstly, we model pure dephasing with a jump operator L 0 = 2/T 2 3 m=0 |m⟩⟨m|. The choice of T 2 is motivated by the fact that Eq. (A9) with only pure dephasing leads to a quantum channel E(t) whose fidelity F(E(t), 1) in the qubit subspace decays exponentially in time with a time constant of T 2 . Secondly, our model of amplitude damping contains three individual jump operators of the form L n = n/T 1 |n − 1⟩⟨n| for n ∈ {1, 2, 3}. These lead to an exponential decay of the population in the n-th level, with a time constant given by T 1 /n. Note that these definitions of T 1 and T 2 might differ from experimental usage in the context of measuring T 1 , T 2 , or T * 2 times for a qubit. Rather, in this work, T 1 and T 2 simply characterize the time-scale of dephasing and amplitude damping errors in our model. To simulate the action of the two-transmon ECR gate under noise, we include the jump operators on each qudit individually, i.e., adding operators L j ⊗ 1 and 1 ⊗ L j to Eq. (A9).
The shortest current measurement pulses on IBM Quantum devices have a duration of t meas = 675 ns [71]. This affects the error correction sequence of Fig. 6 as the data qudit is in a decoded and thus unprotected state during the measurement of the ancilla. We account for the measurement duration in our simulations by adding an idle time of t meas before processing the measurement.
We compute the quantum channel E of a pulse sequence by simulating its action on a complete set of (not necessarily physical) input states to obtain the full Liouvillian superoperator, leveraging the quantum information package of Qiskit [85]. The error correction sequence from Fig. 6 features a measurement of the ancilla and subsequent classically controlled operations on the data qudit. Simulating this measurement of the ancilla is problematic for non-physical input states as it can result in invalid measurement probabilities. We thus make use of the "delayed measurement principle" [95] and simulate the classically-controlled operations as quantumcontrolled operations which are well-defined also for nonphysical input states. Here, we point out technical details relating to the decomposition of a general unitary into the ECR and singlequdit gates and distinguish our work from previous stateof-the-art. Our transpilation routine presented in Sec. III builds on the multivalued quantum Shannon decomposition as developed in Ref. [84]. The authors of Ref. [84] show how to synthesize arbitrary unitaries with an mcontrolled X gate as the fundamental entangling gate. One might assume that existing implementations of the Cnot gate naturally generalize to the gcx gate. However, this is not the case for both direct and echoed cross-resonance Cnot gates, as discussed below. This necessitates the modification we propose in Sec. III to the transpilation provided in Ref. [84]. As discussed in the main text, the cross-resonance effect applies an R 01 x (φ j ) rotation to the target qudit, where φ j depends on the control state |j⟩ c and the gate duration, see Eq. (2). To implement a direct Cnot, the angles are tuned such that φ 0 −φ 1 = π. In the qubit subspace, the resulting unitary is equivalent to the Cnot up to local operations. However, in contrast to Eq. (B1), the gate acts non-trivially on higher-excited states of the control; an effect that can not be reversed by single-qudit gates. For qutrits, this can be compensated for by tuning the drive strength such that φ 0 = φ 2 , as demonstrated in Ref. [43]. This approach does not scale to higher qudit dimension.
The action of higher-excited control states can be cancelled by an echoed CR sequence, leading to the U ECR (θ) gate defined in Eq. (3). While U ECR (π/2) is local-Clifford equivalent to the Cnot for qubits, it is again not possible to transform U ECR (π/2) to the gcx gate with local operations. As shown in Sec. III, d−1 U ECR (−π/d) gates can be combined to synthesize a C m [R 01 x (π)] gate. However, there is still a subtle difference to the gcx gate. A C m [R 01 x (π)] gate introduces a relative phase factor of i between the qubit subspace and higher-excited states, as Cancelling this relative phase on the target requires a controlled phase gate. The unitary synthesis proposed in Ref. [84] is thus not suitable for architectures that implement m-controlled x rotations, such as the ECR gate. We circumvent this issue by using pairs of C m [R 01 x (π)] and C m [R 01 x (−π)] gates instead of the gcx gate. In Sec. III we present a decomposition of C m [U ] gates into ECR pulses. However, making a quantum computer based on ququarts requires realizing general SU (16) gates. We now show how to do this with bidirectional C m [U ] gates. We decompose a general unitary U into a product of C m [U ] gates with an iterative cosine-sine decomposition (CSD) [87]. In general, a cosine-sine decomposition of a 2 n × 2 n matrix U is with C = diag(cos θ 1 , ..., cos θ 2 n−1 ), S = diag(sin θ 1 , ..., sin θ 2 n −1 ). Here, u, v, x, and y are 2 n−1 × 2 n−1 unitary matrices that can be further decomposed. We label two quqaurts according to control ⊗ target. Applying the CSD five times to a dense two-ququart unitary U yields Here, solid and dashed boxes indicate 4×4 and 8×8 subspaces, respectively. C i and S i are diagonal cosine and sine matrices defined by C i = diag(cos θ i0 , . . . , cos θ i N −1 ) and S i = diag(sin θ i0 , . . . , sin θ i N −1 ) for some angles θ j with N = 4 for i ∈ {0, 1, 3, 4} and N = 8 for i = 2. Crucially, the U i are arbitrary four-dimensional unitaries and the block-diagonal matrices of which they are blocks are directly realized by a sequence of C m [U ] gates as derived in the main text. For example, the first block-diagonal matrix in Eq. (C2) is implemented by Next, we implement the cosine and sine matrices with R ij y rotations applied to the control qubit depending on the state of the target. This requires a bidirectional ECR gate such that the role of control and target can be reversed. For example, the first block of the second matrix in Eq. (C2) is while the center matrix is R 02 y (θ 2n )R 13 y (θ 24+n ) ⊗ |n⟩⟨n| t . (C4) Up to a phase on the ECR drive pulses, these controlled R y rotations are equivalent to the C m [R 0j x ] rotations derived in Sec. III B, and can be accomplished through the decomposition shown in Fig. 3(c). Since our ECR only operates in the |0⟩ / |1⟩-subspaces of the control and the target, this necessitates single-qudit permutation gates on both the control and target. These additional permutation gates needed to shift the control gates are accounted for in the gate counts presented in Sec. III B.
The CSD of an arbitrary SU(16) gate shown here serves as the building block for an arbitrary quantum circuit that is executed on a ququart-based hardware. It requires a total of 340 ECR pulses and, as discussed in Sec. III B, is equivalent to 170 CNOT gates in a qubit-based architecture.