A scalable architecture for quantum computing requires logical units supporting quantum-error correction. In this respect, magnetic molecules are particularly promising, since they allow one to define logical qubits with embedded quantum-error correction by exploiting multiple energy levels of a single molecule. The single-object nature of this encoding is expected to facilitate the implementation of error correction procedures and logical operations. In this work, we make progress in this direction by showing how two-qubit gates between error-protected units can be realised, by means of easily implementable sequences of electro-magnetic pulses.

## I. INTRODUCTION

Recent progresses in the quantum computing technology have led to the realization of noisy intermediate-scale quantum computers (NISQ^{1}) with remarkable performance.^{2–8} However, NISQ devices are only a halfway step toward the implementation of a scalable, general purpose quantum computer. This unavoidably requires logical units supporting quantum-error correction (QEC), ^{9} a goal whose achievement beyond the proof-of-principle level appears still far from current technological capabilities. Indeed, standard QEC codes based on multi-qubit encodings yield a large increase in the number of physical qubits and operations, thus making the control of such a platform very demanding.

Here we pursue a different approach, based on exploiting a single multi-level object to encode an error-protected logical qubit.^{10} In particular, it was recently shown that magnetic molecules provide the ideal playground for such an architecture,^{11} thanks to their rich and chemically tunable spectrum, characterized by many (more than the two needed for un unprotected qubit) available and individually addressable low-energy levels. These systems have already demonstrated remarkable coherence times, ^{12–16} along with the possibility of being arranged in supra-molecular structures tailored for specific or general purpose quantum computing applications.^{17–22} In addition, they can be easily manipulated by microwave/radio-frequency pulses^{10,12,16} or via electric fields at the single-molecule level on surfaces.^{23}

In Ref. 11 it was demonstrated that the additional degrees of freedom of magnetic molecules can be exploited to design an error-correction procedure targeted to the most important error for these systems, i.e. pure spin dephasing. The scheme can be implemented in a wide class of molecular systems. The simplest one may be represented by a monomer of an electronic spin 1/2 coupled by hyperfine interaction to a nuclear spin *I* > 1/2 ({*I*, 1/2} in the following), such as the Cu complex^{16} (*I* = 3/2) proposed in Ref. 11.

Here we show that a simple extension of that architecture can support two-qubit gates between error protected units. This extended architecture consists of dimers of the aforementioned {*I*, 1/2} units, interacting through the electronic spins, ^{22} as sketched in Fig. 1. By interacting with each other, the electronic spins form an effective spin 1 system, whose excitation (by micro-wave pulses) is used to mediate the effective coupling between the error protected logical qubits. We demonstrate here, by numerical simulations with on-going pure dephasing, that this procedure implements a switchable two-qubit gate between the logical qubits, with very small overhead of resources and manipulation requirements compared to its uncorrected version. These results suggest the proposed system as a promising building-block for a future scalable quantum-computing architecture.

The paper is organized as follows: we first provide (Sec. II A) an overview of the spin-binomial encoding proposed in Ref. 11, along with a description of the general pulse sequence implementing it on a nulcear spin qudit *I* (Sec. II B). We then illustrate in Sec. III how to implement the two-qubit gate between error-protected logical qubits and we numerically simulate it on a {3/2, 1/2} dimer. We finally draw conclusions and future perspectives in Sec. IV.

## II. SPIN-BINOMIAL CODES FOR MOLECULAR ERROR-CORRECTED QUBITS

### A. Spin-binomial code words for pure dephasing

Below we overview the QEC scheme proposed in Ref. 11. In contrast with other approaches designed to correct abstract generic error models,^{10,24,25} this scheme is explicitly developed to fight pure dephasing, which is by far the most important error occurring on the real molecular hardware. This type of error fully preserves the diagonal entries of the density matrix of the system in the energy basis, while it induces purely loss of coherence, corresponding to a decay of off-diagonal elements. For a system coupling to the environment through the spin operator *I*_{z}, this effect can be described by means of the following Lindblad master equation^{26–28}

where *ρ*(*t*) is the system density matrix at time *t* in interaction picture and *T*_{2} is the coherence time of the system. If no QEC is implemented, Eq. (1) implies that quantum information encoded in an initial state *ρ*(0) is lost irreversibly as time goes by. Specifically, the initial coherence *ρ*_{m,m′}(0) =⟨ *m*|*ρ*(0)|*m*′⟩ between eigenstates |*m*⟩ and |*m*′⟩ would decay exponentially like exp [−(*m* − *m*′)^{2}*t*/*T*_{2}]*ρ*_{m,m′}(0). An operator-sum representation of the solution of Eq. 1 can be derived, ^{11}

which allows us to identify the *error operators*

Note that each operator $Ek\rho (0)Ek\u2020$ is at least of order *k* with respect to (*t*/*T*_{2}). Hence, in the limit of small parameter *t*/*T*_{2}, operators with a small value of *k* give major contribution to *ρ*(*t*). By expanding the operators *E*_{k}, low orders of the decomposition of Eq. (2) can equivalently be expressed through increasing powers of *I*_{z}. In order to perform an approximate QEC^{29} which recovers *ρ*(*t*) up to order $(t/T2)n$ one needs a correction procedure for *E*_{k} operators up to *k* = *n*. To this end, a sufficient condition is that $Izk$ operators satisfy Knill-Laflamme conditions^{30} for *k* < *I*. That is, code words |0_{L}⟩ and |1_{L}⟩ must be found which satisfy $\u30080L|IzkIzl|0L\u3009=\u30081L|IzkIzl|1L\u3009$, while $\u30080L|IzkIzl|1L\u3009=0$ for *k*, *l* < *I*. These two conditions guarantee that errors bring different code-words to orthogonal states, while the coefficients of a superposition of the logical basis are preserved. In this way, errors can be detected through appropriate measurements, and the initial state can be restored. As shown in Ref. 11, these requirements are fulfilled by introducing the code-words

where the states are labeled by eigenvalues of *I*_{z}, i.e. *I*_{z}|*m*⟩ = *m*|*m*⟩. Logical zero and logical one are thus defined as superpositions of |*m*⟩ states, with |0_{L}⟩ having non-zero overlap only with states |*m*⟩ such that *m* + *I* is odd, while |1_{L}⟩ involves only states such that *m* + *I* is even.

### B. Physical implementation and general pulse sequence

For being able to practically realize the QEC algorithm described in Sec. II A in realistic spin systems, it is necessary to provide the sequence of explicit control operations that the experimenter needs to implement. Complete control of the system is achieved by transverse magnetic pulses (parallel to *y*) resonant with |*m*⟩ → |*m* ± 1⟩ transitions. These pulses induce the two-level transformations $Rymm\u2032(\mathit{\vartheta})=e\u2212iYmm\u2032\mathit{\vartheta}/2$, with *Y*_{m,m+1} = *i*|*m*⟩⟨*m* + 1|− *i*|*m* + 1⟩⟨*m*|. We illustrate below the complete sequence of pulses we have designed for implementing the code on a generic spin *I* [reported in Fig. 2–(a)]. In particular, the required steps are the following: (i) to encode an initial two-level superposition |*ψ*(0)⟩ = *α*|*m*⟩ + *β*|*m*′⟩ into a superposition of the two code words, |*ψ*_{L}⟩ = *α*|0_{L}⟩ + *β*|1_{L}⟩ (achieved by the sequence of pulses reported in the left part of Fig. 2). (ii) To perform error detection, without collapsing such a superposition, that is, preserving *α* and *β*. (iii) To recover the initially encoded state by a correction step which depends on the detection outcome. Between encoding and detection, the system evolves freely for a *memory time*, accumulating errors due to continuous dephasing.

Non-demolition error detection is achieved by exploiting a spin *s* = 1/2 ancilla, coupled by hyperfine interaction to the nuclear spin *I*. Hence, the spin Hamiltonian of the single {*I*, 1/2} error-corrected logical qubit is given by:

The first and third terms in Eq. (5) describe the Zeeman interaction of the nuclear spin and of the ancilla with a static field parallel to *z*, the second term describes the quadrupole coupling with strength *D*. The last term describes the hyperfine coupling between *I* and *s*, through a diagonal ancilla-qudit hyperfine tensor **A**. Remarkably, our scheme only excites the ancilla for error detection (without corrupting the qudit state), thus making the code practically unaffected by ancilla pure dephasing. Here the 2*I* + 1 qudit levels allow us to correct dephasing errors up to $Izk$ with *k* < *I*. Hence, the error detection procedure must distinguish between the *k* + 1 orthogonal states spanning the same Hilbert space as ${Izk|0L\u3009,Izk|1\u3009L}$ with integer *k* ∈ [0, *I*).^{29,30} An orthonormal basis of *error words* for this space is indicated in the following and in Fig. 2 as ${|E(0)k\u3009,|E(1)k\u3009}$. For performing the detection step, it is convenient to first implement (by a properly designed sequence of pulses) the unitary transformation

mapping each possible *code/error word* (which is a superposition of *m* states) onto a single |*m*⟩ state. Here negative/positive *m* are associated to the error subspaces of |0_{L}⟩/|1_{L}⟩, respectively, and $\u230aI\u230b$ indicates the largest integer smaller than *I*. The general procedure to obtain *U* as a sequence of elementary pulses for a generic *I* is reported in Ref. 11. Once *U* has been performed, consecutive conditional excitations of the ancilla depending on the |*m*⟩ state of the qudit (made possible by the ancilla-qudit coupling Γ) allow us to detect different errors (corresponding to different *k*) by implementing the projectors

Each projector *P*_{k} projects onto a two-state subspace associated to the *k*-th error. As a result of the measurement, the resulting state is of the form $\alpha |E(0)k\u3009+\beta |E(1)k\u3009$ and thus the coefficients *α*, *β* of the initial superposition are preserved and can then be recovered. For implementing the sequence of measurements realising the projectors *P*_{k}, we start from *k* = 0 and apply two simultaneous pulses resonant with the transitions |*I*⟩|⇓⟩ → |*I*⟩|⇑⟩ and |− 1/2⟩|⇓⟩ → |− 1/2⟩|⇑⟩, i.e. we excite the ancilla only if the qudit state is |*ψ*_{0}⟩ = *α*|− 1/2⟩ + *β*|*I*⟩. Measurement of the ancilla projects the system either into |*ψ*_{0}⟩⟨*ψ*_{0}|*ρ* ⊗|⇑⟩⟨⇑| or $(I\u2212|\psi 0\u3009\u3008\psi 0|)\rho \u2297|\u21d3\u3009\u3008\u21d3|$ (being *ρ* the qudit state), depending on the outcome, with no demolition of quantum information encoded in the qudit. In case of positive outcome (ancilla in state ⇑), the ancilla is de-excited and a sequence of *π* pulses is applied to restore the initial logical state |*ψ*_{L}⟩ [recovery part of Fig. 2–(a)], after which the encoding procedure is repeated. In case of negative outcome, conditional excitation of the ancilla is repeated for the *k* = 1, 2, …, $\u230aI\u230b$− 1 cases, until the first positive outcome is found. In case of $\u230aI\u230b$− 1 negative outcomes the recovery procedure corresponding to *k* = $\u230aI\u230b$ is applied.

We focus hereafter on the paradigmatic *I* = 3/2, which is sufficient to recover first order errors ∝ *I*_{z} using the simple pulse sequence reported in panel (b). The sequence in (b) is slightly simplified with respect to the general case (a) for reducing the number of pulses and hence the duration of the QEC. Detailed simulations including gate errors and pure dephasing also during the implementation of the pulses have demonstrated^{11} that a proper *I* = 3/2 system coupled to an electronic spin 1/2 ancilla^{16} already yields a significant error reduction compared to an uncorrected qubit.

## III. TWO-QUBIT GATES

Implementing two-qubit gates between error-protected logical units is usually a severe bottleneck, requiring complex operations between several physically distant qubits.^{31,32} This task can be easily achieved in our platform, by using only a few microwave pulses. In particular, we discuss in the following how to realise a controlled-phase (C-*φ*) gate. Let us consider a “dimer” of protected qubits with the two electronic ancillae coupled by an exchange/dipolar interaction, as in Ref. 22. The system is characterized by the spin Hamiltonian

where we have introduced, in addition to the single {*I*, s=1/2} terms already present in Eq. (5), a slightly anisotropic exchange interaction between the two ancillae of strength *J* = Tr **J**/3. Different forms of the spin-spin interaction between the two ancillae do not alter the scheme. For simplicity, we have assumed $gz1A=gz2A=gz$.

We now focus, for sake of simplicity, on *I* = 3/2 qudits. In this case, the two-qubit code words are given by

where qudit states are labeled by eigenvalues of *I*_{zi} = −3/2, …, 3/2 and are factorized (in a sizable magnetic field) from the states of the two ancillae ⇑, ⇓. Note that the code words are defined in the subspace with both ancillae in state |⇓⟩. If *J* is significantly larger than *A*, the two ancillae form an effective spin-1 system, whose excitation from |⇓⇓⟩ to $|\u21d1\u21d3\u3009+|\u21d3\u21d1\u3009/2$ state depends on the |*m*, *m*′⟩ state of the qudits. To first order, this is given by

Hence, given sufficiently narrow pulses, it is possible to selectively excite the ancillae only if the qudits are in the four states entering the definition of |1_{L}1_{L}⟩ (Eq. 8d) by four semi-resonant pulses at energies Δ_{−3/2,−3/2}, Δ_{−3/2,1/2}, Δ_{1/2,−3/2}, Δ_{1/2,1/2}.^{33} In this way, we can add a phase *φ* to the qudit states |− 3/2, −3/2⟩, |− 3/2, 1/2⟩, |1/2, −3/2⟩, |1/2, 1/2⟩ and thus to the logical state |1_{L}1_{L}⟩, implementing a C-*φ* gate in the protected basis. By *semi-resonant* we mean a pulse *π* at a frequency detuned by a small amount *δ* from the addressed energy gap. It can be shown^{33} that a rectangular semi-resonant pulse adds a phase $\phi =\pi \u2212\pi \delta \delta 2+4G2$ to the system wave-function, being *G* the matrix element of the transition. We provide in Fig. 3 a simulation of the C-*φ* gate on a dimer consisting of two {3/2, 1/2} units. This is obtained by numerically integrating the Lindblad Equation (1) for the density matrix of the full qudits+ancillae system, including the sequence of pulses needed to implement the gate and including pure dephasing on both nuclear and electronic spins. As reported in Fig. 3–(a), the four semi-resonant pulses induce a full Rabi flop on the four |*m*, *m*′⟩ states of Eq. 8d. Panel (b) shows that this procedure induces a corresponding Rabi flop on the |1_{L}1_{L}⟩ logical state, thus adding to it a phase *φ* = *π*. The building up of this phase in time is depicted with a red line. Conversely, the other two-qubit logical states are unaffected by the pulse, which therefore implements the controlled-phase gate with fidelities exceeding 99% and a total duration of 200 ns. In the simulations we have used *T*_{2} = 1 ms for the qudits and 10 *μ*s for the ancillae, *J* = 0.4 meV, *A*_{1} = (118, 118, 400) MHz, *A*_{2} = (118, 118, 650) MHz, *g*_{z} = 2.09, *D*_{i} = 60 MHz. This set of parameters represents a realistic choice for the individual Cu ions.^{16} An analogous performance can be obtained by assuming the same hyperfine coupling reported in Ref. 16 for the two ions, rotated by 90 degrees.

## IV. CONCLUSIONS AND OUTLOOK

In conclusion, we have shown that magnetic molecules are particularly promising logical units for a forthcoming, scalable quantum computing architecture. Indeed, they can embed quantum error correction at the single molecule level, thus avoiding the large increase of hardware resources typically required by block-encoding QEC schemes. We have demonstrated that two-qubit gates between pairs of error-correctable units can be easily implemented, by using only a few micro-wave pulses, thus making our setup very appealing for an experimental proof-of-principle demonstration in state-of-the-art platforms.

We have focused here on an easily realizable implementation, in which logical units are represented by spin *I* ≥ 3/2 nuclei. As a perspective, it is expected that the performance of the scheme can be further improved by considering a different class of molecular spin systems, characterized by several electronic spins with competing interactions, yielding a sizable number of low-spin multiplets in their low-energy spectrum.^{34–43} Encoding the protected qubit into these multiplets may significantly reduce the effect of decoherence (since transitions with large |*m* − *m*′| would be avoided) and simplify the implementation of the error correction algorithm and of single-qubit gates (by exploiting the increased number of matrix-elements). We will investigate, in the future works, code words and sequences of pulses adapted to this specific case. In the spirit of simplifying gate sequences for implementing multi-level state transfers on the logical qubits, the use of different control strategies may also be explored, such as adiabatic passages^{44} and optimized variants.^{45,46}

The scheme proposed here can be adapted to other sources of error, such as relaxation, and can be specialized to address decoherence effects arising from a more detailed many-body model of the bath inducing spin dephasing.

## AUTHORS’ CONTRIBUTIONS

A.C., F.P. contributed equally to this work.

## ACKNOWLEDGMENTS

This work has received funding from the the Italian Ministry of Education and Research (MIUR) through PRIN Project 2015 HYFSRT “Quantum Coherence in Nanostructures of Molecular Spin Qubits” and the European Union’s Horizon 2020 programme under grant agreement No 862893 (FET-OPEN project FATMOLS), the European Project “Scaling Up quantum computation with MOlecular spins” (SUMO) of the call QuantERA, cofunded by MIUR.

## DATA AVAILABILITY

The data that support the findings of this study are available from the corresponding author upon reasonable request.

## REFERENCES

*et al.*, “

*et al.*, “

_{2}CtBu)

_{2}]

_{9}: Synthesis and characterization of a regular homometallic ring with an odd number of metal centers and electrons

*et al.*, “

_{8}Mn

*et al.*, “

_{8}Zn antiferromagnetic molecular rings

_{8}Ni

_{7}molecular nanomagnet