Quantum computation with logical gates between hot systems

,


I. INTRODUCTION
Quantum computers offer the promise to enhance the efficiency to solve various problems, or even enlarge the class of accessible ones.Several architectures to design large-scale quantum computers exist [1][2][3].While some approaches are intrinsically scalable, others rely on the combination of small modules that can be connected [4][5][6].Promising platforms include trapped ions in segmented traps, where ions are shuttled around to an interaction zone [7][8][9].Similarly, arrays of trapped Rydberg atoms have been realized, where atoms can be moved using optical tweezers and interact via induced dipole-dipole interactions [10][11][12][13][14][15].But also other types of segmented traps are conceivable, where, e.g., 1D or 2D arrays of ions are manipulated by laser pulses [16,17], and where interaction between ions in different modules takes place via some distance-dependent coupling [18][19][20][21][22]. What most approaches have in common is the necessity to cool particles to their mechanical ground state, to enable their manipulation and gates between them with high fidelity [16,[23][24][25][26][27].For different platforms, explicit approaches have been developed to perform gates between hot systems, and avoid or at least reduce the demand for cooling [28][29][30].
Here we present a novel, generic, and platformindependent approach to deal with the influence of thermal fluctuations and position noise in particle-trap-based architectures.We consider a setting where qubit systems interact via some distance-dependent commuting coupling [31], which can be, e.g., induced by laser pulses [18-20, 32, 33] or via dipole-dipole interactions [10][11][12]14].Obviously, such an approach is susceptible to position noise and thermal fluctuations.Rather than attempting to cool the system, we use a logical encoding of quantum information to tailor effective interactions and make them insensitive to particle positions.The basic idea is to encode quantum information in multiple physical systems, that form one logical qubit [34][35][36][37][38].The physical systems interact, which generates an effective interaction between a logical system and other physical ones, or between two logical systems.By properly choosing the encoding, we show that thermal noise can be significantly suppressed.
Increasing the size of encoding, i.e., the number of involved physical systems, leads to larger gate fidelities that approach unity.
We demonstrate the applicability of our approach in multiple setups, which include classical treatment of particle positions in terms of trajectories or probability distributions, as well as a full quantum treatment using mechanical eigenmodes for ions trapped in a 1D Paul trap: a) We show that one can mediate interactions and gates between two hot physical systems that suffer from thermal fluctuations utilizing a cool logical system.
b) We consider collective fluctuations, where relative positions of the individual systems in the same logical system are fixed, while the position of each logical system is given by a probability distribution, e.g., a Gaussian.Logical systems are either 1D chains or 2D arrays of trapped particles.c) We treat two logical systems where each particle is independently affected by classical thermal noise.
d) We consider a fully quantized model of 1D Paul traps and their mechanical eigenstates, demonstrating that interactions between two logical ion strings can be made insensitive to their temperature.
The considered setups are illustrated in Fig. 1, even though when analyzing different cases we will restrict the position noise to dominant directions or degrees of freedom.In all cases, we find a significant improvement in achievable gate fidelities.The situation of a) is relevant when shuffling ions or atoms around, which are heated up due to this process [27,39].They can be moved to some interaction zone, where a properly cooled system consisting of several qubits is used to mediate an interaction between the two hot particles.Similarly, this can account for the heating of ions or atoms due to measurements, or the application of multiple gates.The setup of b) consists of two independent 1D or 2D traps, where particles interact due to some induced, distant-dependent coupling [18][19][20][21][22].The setting considered in c) is, e.g., concerned with independent traps for each of the constituents, and hence independent thermal fluctuations.It may also relate to situations where all systems are moved and hence heated up.Finally, the fully quantized version we treat in d) is concerned with two independent ion strings in Paul traps, where again some distant-dependent coupling between the ions is induced to couple the two traps.We consider the Boltzmann distribution of the mechanical energy eigenstates and compute resulting gate fidelities when increasing the number of ions in each trap.
Due to the kind of encoding we use, our approach can at the same time be used as an error correction code against bit-flip errors.This however requires additional control and overhead but may be useful in a quantum computation setup that goes beyond the usage of bare qubits.In addition, we can modify our scheme such that it also protects against fluctuations of a constant background field, one of the main sources of decoherence in certain ion-trap setups.Similarly, fluctuations against background fields and noise sources with specific spatial dependence or fixed origin can be achieved.
The paper is organized as follows.In Sec.II we describe different quantum computation setups, as well as the general setting and approach we consider.In Sec.III we introduce how we model thermal noise and how we can utilize logical encodings to mitigate the noise effects.In Secs.IV-VII we discuss the different settings (a)-(d), and provide explicit examples that demonstrate the performance of our approach.In Sec.VIII we briefly discuss how to achieve protection against a noisy background field, without increasing the size of the logical system.We summarize and conclude in Sec.IX.

II. MODULAR QUANTUM COMPUTER MODELS
The primary strategy for developing a scalable quantum computer is based on modularity [4][5][6].This approach involves constructing the entire system by interconnecting smaller, independent quantum processors that can execute quantum operations and store quantum information.One approach to interconnecting modules relies on distant-dependent interactions among the constituent physical systems.However, by definition, such interactions are sensitive to position fluctuations.Hence, achieving a high-fidelity interaction requires cooling down the systems to their mechanical ground state, which is not always feasible.In this paper, we introduce an alternative (or complementary) solution, demonstrating how the adverse effects of mechanical thermal noise can be mitigated by leveraging the interaction between logical systems encoded within multiple physical ones.In a multiqubit system, one can implement a logical qubit by restricting the state of the system into a twodimensional subspace.In particular, we consider the repetition encoding where the logical computational basis is of the form | 0⟩ = |a⟩ and | 1⟩ = |−a⟩, where |a⟩ is a state of the computational basis such that Z i |a⟩ = a i |a⟩.We refer to a as the logical vector and as we show in the next section, interactions between logical qubits can be made approximately position-independent by a proper choice of a.In principle, a i ∈ {−1, 1}, however by performing fast flips of the individual qubits during the evolution we can effectively obtain an arbitrary logical vector with a i ∈ [−1, 1] (see Sec. 3.6 in Ref. [40]).Next, we describe several modules-connected-based architectures subjected to different kinds of thermal noise and how logical encoding can be used to mitigate the effects of position fluctuations.

A. Interactions mediator system
The first model we consider resembles the von Neumann architecture [41] and is based on an auxiliary system (or module) that is used to mediate interactions between hot physical systems [42].We consider two kinds of modules.The data module consists of multiple trapped physical systems, e.g., ions or neutral atoms, where each encodes a qubit state.We assume the state of the qubits can be individually manipulated but multiqubit gates cannot be directly implemented.For that, the physical systems are individually moved into an interaction zone [7][8][9] where they interact with an auxiliary system, which is used to mediate interactions between the data qubits [43]; see Fig. 1a.For instance, the multiqubit gate e iαZ ⊗n can be mediated on the data qubits by applying a control-Z gate between each data qubit and the auxiliary system, and then measuring the auxiliary system on the appropriate basis, i.e., where P (k) = |k⟩⟨k|, and |ψ⟩ is an arbitrary state.In this model, the mediator module also consists of multiple trapped physical systems but it is assumed to be well cooled and fully controllable.By encoding a logical qubit in the mediator module, we establish interactions that mitigate the effects of thermal noise acting on the components of the data module.
In Sec.IV we analyze the fidelity of a mediated interaction by computing the fidelity of a control gate between a noiseless logical qubit system and a hot physical qubit system.

B. Independent classical modules
The second scheme is based on independent modules consisting of multiple physical qubit systems which can be fully controlled.The modules are coupled with each other by a distance-dependent interaction between their physical components.We assume the modules are affected by collective position noise, meaning that the physical systems are well trapped within the modules but the position of the latter is subject to position fluctuations; see Fig. 1b.In this case, we implement a logical qubit within each module and make use of their interactions.Similar to the previous scheme, logical systems allow us to establish high-fidelity interactions.In Sec.V we analyze how the fidelity of the interaction between two modules can be enhanced by enlarging the size of the modules.

C. Independent physical qubit systems
The third scheme is similar to the one considered in the previous section, but in this case, thermal noise affects all physical systems independently, see Fig. 1c.This scenario is of particular interest as the total amount of noise affecting a module increases with its size.However, in Secs.VI and VII B we show, both in a classical and quantized approach, that grouping the qubits in logical systems still allows one to arbitrarily enhance the interaction by increasing the system size.In this case, alternative ways of coupling the qubits within the modules should be used as the independent nature of noise would affect the manipulation of the logical systems.

D. Independent quantum modules
The last scheme we consider is a quantized version of independent modules.For example, each module is a 1D quantum trap where at a certain temperature the collective motion of the physical systems is described by the thermal state over their mechanical eigenmodes; see Fig. 1d.These fluctuations lead to a noisy interaction between different traps.In contrast to the classical model introduced in Sec.II B, the noise impact of the whole system grows with the number of trapped particles.However, the temperature does not affect the physical systems independently but instead excites the collective oscillation modes of the trap, which we take as an advantage.In Sec.VII A, we show that by implementing logical systems with trapped physical systems one can obtain significant gate fidelity enhancements.

III. FROM THE PHYSICAL TO A LOGICAL LAYER
In this section, we introduce the formalism used to evaluate the influence of thermal noise in the schemes detailed in the previous section.First, we describe the notation, and then we formally introduce the considered physical interaction and how it is affected by the uncertainty of its position.We also introduce the logical systems and show how they can be used to minimise the effects of thermal noise.

A. Notation
Throughout the paper, we make use of stochastic and nonstochastic variables.To clarify the usage of those, a stochastic variable is written in Roman style, e.g., "x", while nonstochastic variables are in Italic style, e.g., "x ".We write x ∼ {x, p(x)}, if x is distributed with probability p(x), and x denotes a particular realization of the variable.
We also distinguish between different kinds of vectors.On the one hand, we consider "spatial vectors" which are 2-or 3-dimensional real vectors and refer to space positions.We write spatial vectors with the standard arrow notation, i.e., "⃗ x ".On the other hand, we denote any other kind of vector with a bold symbol, i.e., x.We also use both notations to refer to a list of spatial vectors, i.e., ⃗ x = (⃗ x 1 , . . ., ⃗ x K ).

B. Minimal size setting: two physical qubit systems
First, we consider the minimal size case, two physical qubit systems, A and B, each located at a certain position, ⃗ r and ⃗ q, respectively.We assume an antiferromagnetic long-range Ising interaction between the qubits; i.e., the interaction Hamiltonian is given by where the coupling strength depends on the distance between the two-qubit systems and it is given by µ(⃗ r, ⃗ q ) = J |⃗ r − ⃗ q | −γ , where J is the coupling constant and γ ∈ N.
By letting the qubits interact for a time ∆t = π 4µ , one can implement our target entangling gate which can be, e.g., transformed into a CZ or a CNOT with the help of local operations.Uncertainty in the coupling strength leads to a noisy implementation of U which we denote as the ZZ-damping channel.If the coupling strength is distributed as µ ∼ {µ, p(µ)}, the evolution of an arbitrary two-qubit state ρ is given by We evaluate the performance of the interaction with the so-called Choi fidelity of the channel U to the ideal gate U ; i.e., the fidelity of the gate is given by see Appendix A for derivation.As µ depends on ⃗ r and ⃗ q, thermal noise is a source of uncertainty.In particular, if p(⃗ r, ⃗ q ) is the probability distribution of ⃗ r and ⃗ q then the probability distribution of µ is given by where δ[x] is the Dirac delta function.
Note that if one is restricted to individual control, the most natural way to enhance the interaction between two qubits is by cooling down the physical systems, i.e., reducing uncertainty in their position.In the following section, we show how by using physical multiqubit systems to implement logical qubits, the fidelity can be enhanced without cooling down the system.

C. Arbitrary size setting: two logical qubits
We consider two modules A and B consisting of N A and N B spatially distributed physical qubit systems, respectively, i.e., A = {A i , ⃗ r i } N A i=1 and B = {B j , ⃗ q j } N B j=1 , where physical qubit system A i (B j ) is located at the position ⃗ r i (⃗ q j ).Like in the previous setting, we assume the qubits can be individually controlled but two-qubit gates cannot be implemented.

Logical interaction
The physical systems interact with a two-body longrange interaction given by where where H A(B) zz describes interactions within module A(B), which we refer to as the self-interactions of A(B), and H AB describes interactions between physical systems in different modules.
Let us now prepare (encode) each module into a logical qubit subspace span{|a⟩ , |−a⟩} and span{|b⟩ , |−b⟩} by choosing the logical vectors a for A and b for B. When the states of the modules are restricted to a logical subspace the Hamiltonian simplifies.On the one hand, the self-interaction terms just yield a global phase and can be ignored, i.e., H A zz |±a⟩ = f (a) |±a⟩ where f (a) = i<j a i a j µ(⃗ r i , ⃗ r j ).On the other hand, H AB zz is also diagonal in the logical subspace with eigenvalues where is the coupling strength between the logical qubits, ⃗ r = (⃗ r 1 , . . ., ⃗ r N A ) and ⃗ q = (⃗ q 1 , . . ., ⃗ q N B ). Hence, for the logical qubits the Hamiltonian H zz simply reads Note that the interaction between the logical qubits is also given by a ZZ coupling, but its strength can be tuned by a suitable choice of the logical subspace, i.e., a suitable choice of the vectors a and b.

Logical gate fidelity
Like in the minimal size setting, uncertainty in the position of the qubit systems leads to a noisy implementation of the two-logical-qubit gate.However, in contrast to the minimal size scenario, in this case, the effective coupling, and hence the gate fidelity with our target gate U = e −i π 4 ZZ , also depends on the logical subspaces a and b, Given a particular setting with a certain probability distribution for the position of the qubit systems, p(⃗ r, ⃗ q), our goal is to find the logical subspaces (given by a and b) which maximize the fidelity and minimize the implementation time.In order to quantify the performance of a given setting, we compute its optimal infidelity curve which corresponds to the optimal infidelity for every implementation time, i.e., In the following section, we analyze for different schemes how the fidelity can be enhanced by increasing the system size.

IV. COLD MEDIATING SYSTEM
First, we look at the scheme detailed in Sec.II A where a fully controllable cold system is used to mediate an

Fig. 2. (a) Module
A is fixed and it consists of a 1D chain oriented along the x axis, i.e., ⃗ ri = (i∆x, 0).Module B consists of a single qubit system located at ⃗ q 1 = (q 1x , ∆y) where q 1x ∼ N (NA − 1)∆x/2, σ 2 .(d) Each module, A and B, consists of a 1D chain oriented along the x axis, i.e., ⃗ ri = (i∆x + rx, 0) and ⃗ rj = (j∆x + rx, ∆y) where rx and q x are i.i.d.∼ N 0, σ 2 .(b, e) Logical coupling strength as a function of q x and rx − q x for the settings described in (a) and in (d), respectively.Each curve is multiplied by a constant c such that the difference in shape can be appreciated.Solid lines correspond to the trivial encoding, i.e., a = b = 1, while dotted lines to the optimal encoding for t = 0.9 and 0.5, respectively.(c, f) Infidelity of the implementation of U = e −i π 4 ZZ as a function of the implementation time ∆t for different system sizes for the setting described in (a) and in (d), respectively, with J = 1, γ = 1, ∆x = ∆y = 1 and σ = 3. "t.t.b." means "top to bottom".
effective interaction between two-qubit systems affected by thermal noise.If we consider the gate sequence shown in Eq. ( 1), the fidelity of the mediated interaction is given by F 12 = F 01 F 02 where F 0i is the fidelity of a control gate U between the ith qubit and the auxiliary system (see Appendix.B for derivation).Therefore, for our purposes, it suffices to analyze the implementation of U = e −i π 4 ZZ between a logical and a hot and a single qubit affected by position noise.
The scheme we consider is inspired by 1D traps where particles are strongly bounded in the y direction but weakly in the x direction.Module A contains N A perfectly trapped physical qubit systems, meaning their positions are well defined.In turn, B consists of a single physical qubit system, N B = 1, with a noisy position, i.e., ⃗ q = ⃗ q 1 and b = (b 1 ).In this case, the logical coupling strength is given by μab1 (⃗ r, ⃗ q 1 ) = b 1 We consider the setting shown in Fig. 2a.Module A is a 1D chain aligned with the x axis.System B is at a fixed distance ∆y of the chain, but its position along the x is a normally distributed random variable, i.e., ⃗ q 1 = (q 1x , ∆y) where q 1x ∼ N 0, σ 2 .
As shown in the previous section, the logical coupling strength μab1 (⃗ r, ⃗ q 1 ) can be modified by changing the logical vector a.Ideally, we would like to establish a logical coupling which is independent of the position of the physical qubit system ⃗ q 1 , making the interaction insensitive to thermal fluctuations.However, this is not possible due to the inherent form of the physical qubit-qubit interaction.Nevertheless, we can establish a μab1 (⃗ r, ⃗ q 1 ) that ap-proximates a constant function within the region of space where qubit B is most likely to be found.In Fig. 2b we plot the logical coupling strength as a function of q 1x .Observe how with the trivial encoding increasing the size of A, i.e., a = 1 = (1, . . ., 1), μab1 (⃗ r, ⃗ q 1 ) becomes flatter for q 1x ∈ [−σ, σ].We can increase this effect even further by optimising the logical subspace, see in Appendix.F the optimal a for different system sizes.Note that the optimal logical subspace already amplifies the interaction.Still, the maximum coupling strength is obtained with the trivial encoding, i.e., max a,b1 μab1 = μ11 .In Fig. 2c we plot the infidelity curve Eq. ( 6) for different values of N A , i.e., for each implementation time ∆t we show the best infidelity we can reach by establishing a logical subspace a for all ∆t.If ∆t is small, the fidelity is given by F ab (∆t) = 1  2 + μab ∆t, and hence, in this regime, the trivial encoding, i.e., a = (1, . . ., 1), is optimal because it maximizes μab .At a certain value of ∆t, the trivial encoding is no longer optimal, as it is better to establish a weaker but flatter coupling function μab1 (⃗ r, ⃗ q 1 ).This trade-off gradually changes with ∆t until eventually the optimal shape μab1 (⃗ r, ⃗ q 1 ) can be established, as the drop in interaction strength can be compensated by the longer interaction time.Then the infidelity saturates because one always can "slow down" the interaction by scaling the optimal logical encoding, i.e., F ab (∆t) = F a ′ b (∆t/c) where a ′ = c a.In the figure, we show the best fidelity that can be achieved with the trivial encoding (solid lines) and the enhancement (dashed liens) that an optimisation of a provides.Observe that the larger the size of A the bigger the enhancement in terms of fidelity and implementation time.To compute the optimal infidelity curve, we discretize ∆t, and for each ∆t we used the Wolfram Mathematica function NMaximize to find the optimal logical encoding.To avoid local minima we used the solution of the previous time step as a starting point for the next optimization.In Appendix C we show the optimal infidelity for a 2D example.This behavior is observed in all examples computed in the article and the same discussion applies to all of them.

V. COLLECTIVE POSITION NOISE
In this section, we analyze the scheme introduced in Sec.II B. We consider modules A and B to be affected by collective noise.The position of the physical qubit systems is well defined within the modules, whose "center of mass" position is subject to noise.Formally, this means that we can parametrize the position of the physical qubit systems of each module as ⃗ r = ⃗ r 0 + (⃗ r,⃗ r, . . .,⃗ r ), ⃗ q = ⃗ q 0 + (⃗ q, ⃗ q, . . ., ⃗ q ), where ⃗ r and ⃗ q are two independent stochastic variables, and ⃗ r 0 and ⃗ q 0 are the positions of the physical qubit systems in the module reference frame, which are fixed.
Here we consider each module to be arranged in a 1D chain along the x axis; see Fig. 2d.Similarly to the example considered in Sec.IV, their position on the y axis is fixed but not on the x axis, i.e., ⃗ r = (r x , r y ) and ⃗ q = (q x , q y ), while r x and q x are independent and identically distributed (i.i.d.) ∼ N [0, σ 2 ].In Fig. 2e we plot the logical coupling strength as a function of the distance between the two modules, i.e., μab (r x − q x ).We obtain similar behavior as in the previous setting.In this case, the optimal subspaces lead to an approximate logical coupling strength for a significantly larger region, as the total number of physical qubit systems (and hence tunable parameters) is larger than the one in Fig. 2b.In Fig. 2f, we show the optimal infidelity curve with our target gate U for different system sizes.The results are similar to the ones obtained in Sec.IV.However, in this case, for each curve we increase the size of both modules, leading to a quadratic enhancement in the coupling strength.
Similar results are obtained when considering a 2D example; see Appendix D for details.

VI. INDEPENDENT NOISE
We now consider the model detailed in Sec.II C, where the position of each physical qubit system is an independent stochastic discrete variable, i.e., p(⃗ r, ⃗ q) = p(⃗ r 1 ) p(⃗ q 1 ) • • • p(⃗ r N A ) p(⃗ q N B ).In this case, the fidelity is given by Note that in this case, if each physical qubit system can be in κ different positions the total number of configurations and possible couplings μab (⃗ r, ⃗ q) is given by κ N A +N B .Unlike in the previous examples, in this case, increasing the size of the modules A and B the sample space of the logical coupling strength μ also increases.However, we show that this does not prevent our setting from providing improvements in fidelity.
In this case, we again consider each module as a 1D chain oriented in the x axis.However, in order to avoid spatial overlap between the physical qubit systems while having significantly large position fluctuations, in this case, we assume fluctuations along the y axis; see Fig. 3a. Figure 3b shows that the optimal infidelity is significantly improved for any value of ∆t when increasing the size of A and B. However, in this case, due to computational limitations, we are restricted to considering small system sizes.As a result, we are unable to observe a notable improvement in fidelity from optimizing the encoding.

VII. POSITION QUANTIZATION
In this last section, we look at fully quantized scenarios where the positions of the physical systems, ⃗ r and ⃗ q, are described by quantum operators.In general, knowing the mechanical properties of the physical systems and the trapping potential used to confine them one can define the "mechanical" Hamiltonian H m that governs their motion.This Hamiltonian can be diagonalized to define the mechanical eigenmodes associated to the wave function Φ k (⃗ r, ⃗ q) and energy E k .The full Hamiltonian is now given by the sum of the two terms, where H m does not act on the internal (qubit) degrees of freedom, and H zz is still given by Eq. ( 4) but with the positions ⃗ r i and ⃗ q j which are operators [e.g., When we restrict A and B into logical subspaces and use the basis {|E k ⟩} for the mechanical dof, we can write the different terms of Hzz as where Note that the self-interaction terms act trivially on the logical qubits; nevertheless, they induce transitions between mechanical eigenmodes contributing to the noise.
For simplicity, we assume the system is initialized in a state of the form ρ m ⊗ ρ, where ρ is an arbitrary state of the two logical qubits and is an arbitrary density operator commuting with H m .Then the evolution of the logical qubits is given by A. Non-degenerate case First, we discuss the case where H m is non-degenerate, and assume that there is a clear scale separation between the mechanical and the logical qubit interaction energies, i.e., |E k − E l | ≫ μab .We can then go to the interaction picture H ′ = i Ẇ W † + W HW † where W = e −iHmt and perform the rotating wave approximation.This results in neglecting the hopping between mechanical eigenstates induced by the interaction between logical qubits, i.e., the terms μab kl with k ̸ = l, and leads to the following Hamiltonian, where μk = μkk .Note that if we let the system evolve the logical qubits interact with a logical coupling strength that is a discrete stochastic variable distributed as μab ∼ {μ ab k , p k }; i.e., Eq. ( 10) becomes Therefore, the fidelity is given by Observe that in this case, the logical qubits are also insensitive to the self-interactions.

Hot 1D Paul trap
We now consider a particular example where the physical qubit systems are ions in a 1D Paul trap.The ions are assumed to be strongly bounded in the y and z directions but weakly trapped in a harmonic potential along the x axis.The ions also interact with each other with a Coulomb interaction that leads to collective dynamics within the trap.A treatment of the mechanical motion of the ions, which allows us to derive the mechanical eigenstates, can be found in Ref. [44] (see also Appendix E).In addition, we assume the system is in contact with a thermal bath at temperature T , and ρ m is given by a thermal state, i.e., , where ideally one should consider ξ → ∞.However, due to computation limitations, we are forced to consider a finite ξ, and p k = 0 for k > ξ.In particular, given 0 < ϵ < 1, we define ξ as Note that ξ depends on T but also on {E k }.In general, given a fixed ϵ, ξ increases with the total number of ions N A + N B , meaning that the amount of noise increases with the system size.
In Fig. 4 we show different settings based on the described trap.In Fig. 4a, we assume that module A consists of the first ⌈K/2⌉ ions of the chain while the rest constitute module B. In Fig. 4b, we consider each module to be in an independent trap.Module A is of an arbitrary size system, while B consists of a single ion.Such setting corresponds to the quantum analog of the cold mediating system described in Sec.IV, as the trap frequency (which characterizes the strength of the trapping potential) of A is chosen to be one hundred times larger than the frequency of trap B. Finally, in Fig. 4c we consider both modules to be of the same size and each of them is within an independent trap.In Figs.4d, 4e and 4f, we plot the optimal infidelity for the mentioned setting for different system sizes.For all cases, we obtain that increasing the number of ions within the traps leads to an enhancement of optimal fidelity for any time ∆t.However, similarly to the case analyzed in Sec.VI, for two independent traps to optimize the logical subspaces does not further enhance the fidelity significantly.

B. General case
In this section, we analyze a more general scenario where H cannot be approximated as diagonal in the basis {|E k ⟩ ⊗ | īj ⟩}.In this case, the position of the physical systems entangles with the logical qubits, which prevents one from interpreting the logical coupling strength as a stochastic variable.Instead, we need to explicitly compute the coherent evolution of the whole system; see Eq. (10).We analyze a particular example of a 2D lattice where each physical system is trapped in an independent harmonic potential, i.e., H m = K + V, where K is the kinetic energy of the physical systems and is the potential energy where ⃗ r 0 i = (0, i∆y) and ⃗ q 0 i = (∆x, i∆y) are the equilibrium positions of the physical systems and N = N A,B ; see Fig. 5a.This is a good model for the trapping of neutral atoms, which are not subject to the strong Coulomb interaction.
Due to computational limitations, we cannot consider the infinite spectrum of H m .Instead, we consider the mechanical degree of freedom of each particle to be a three-level system spanned by the ground and the first two excited states, i.e., the Hilbert space of the physical qubit systems positions is given by is the state of the kth particle at the m(n)th excited state in the x(y) direction, i.e., where Ψ ω n (x) is the wave function of the nth excited state of a quantum harmonic oscillator of frequency ω.
Figure 5b shows the infidelity for different system sizes using the trivial encoding, given by a = b = 1, and if we initialize the mechanical degree of freedom of the system in the maximally mixed state ρ m = 1/9 N .Due to numeric limitations, we cannot compute the optimal infidelity curve.However, we show that the trivial encoding already significantly enhances the reachable fidelity and implementation.

VIII. BACKGROUND NOISE
We now show that on top of the error mitigation capabilities against thermal fluctuations, one can also make the system insensitive to a noisy background field.So we consider an extra term in the Hamiltonian of the form where h k is the intensity of the external field at the position of the kth physical qubit system.If h k is unknown, where if p(θ) = N 0, σ 2 , it is equivalent to a phase flip channel, see Ref. [45].
However, we can easily make the system insensitive to such noise at a certain time τ by flipping all qubits at τ /2, i.e., X ⊗K e −i(Hzz+Hext)τ /2 X ⊗K e −i(Hzz+Hext)τ /2 = e −iHzzτ , where we used that X 1 X 2 e iθZ1Z2 X 1 X 2 = e iθZ1Z2 and X 1 X 2 e i(h1Z1+h2Z2) X 1 X 2 = e −i(h1Z1+h2Z2) .In this way, we can generate the required evolution e −iHzz .Then evolving the system under e −iHzz while performing fast flips at a specific time we can effectively generate the evolution with noninteger spin values, as we explain in former work in Ref. [40] Sec.3.6.

IX. CONCLUSION AND OUTLOOK
In this article, we introduced a technique to perform high-fidelity logical two-qubit gates where the constituents of the logical system are affected by thermal noise.In particular, we detailed alternative quantum computing architectures based on interconnected modules.We assume full control over the individual modules is given by not between them.To connect the modules one would use the physical interaction between their constituting qubits, which makes the scheme vulnerable to thermal noise.We considered different settings where position noise affects in different manners, including collective and individual noise or classical and fullyquantized qubit position treatments.Due to computational restrictions, we have been forced to simplify the models.However, even with these simplifications our models still resemble realistic setups and we compensate them by the large variety of treated examples.We showed that our method could make the schemes position-noise resilient by encoding logical qubits in the physical ones and using the logical encoding to mitigate the effects of position fluctuations.In particular, we show the fidelity of twoqubit gates can be enhanced by increasing the size of the logical systems.In addition, using logical qubits one can obtain enlarged interaction couplings that reduce the implementation time.
We also show that the setup can be totally protected from other kinds of noise such as background radiation without any extra cost in fidelity or resources.
The central ingredient enabling our approach is fixed distant-dependent Ising-type interactions between physical qubit systems.While such interactions are present to some extent in various systems [10-12, 14, 18-20, 32, 33], the question of whether they can be used to realize the proposed methods in given setups is left for future work.where ω is the trap frequency, and χ > 0 is a constant related to the Coulomb interaction and the ionization of the ions.
The equilibrium positions, x 0 = (x 0 1 , . . ., x 0 K ), are such that fulfill .Therefore, given any ω and χ we can find the equilibrium positions as x 0 i = L x0 i .If the ions are cold enough to assume small displacements around the equilibrium positions, one can perform a Taylor expansion of the potential around x 0 up to the second order and obtain the following approximation of the Hamiltonian where δx = x − x 0 i collects the displacement from the equilibrium position of the ions and V ′′ = 1 ω 2 ∂ 2 V/(∂x i ∂x j ) x 0 is a parameter-independent matrix, i.e., independent of ω and χ.Note V ′′ is symmetric, and hence its eigenvectors form an orthonormal basis; i.e., there exists a set of vectors v (m) such that V ′′ • v (m) = λ m v (m) and v (m) • v (n) = δ mn .Therefore, one can write δx as a linear combination of the eigenvectors, i.e., where u m = v (m) • δx, and write the Hamiltonian in the following coordinates Therefore, in the new coordinates {u m } K m=1 , e.g., for K = 3

Fig. 1 .
Fig. 1.(a) The data qubits are moved close to the mediator module, which mediates an effective interaction between them.The data qubits are affected by position noise.(b,c,d) Each module encodes a logical system and they couple with each other via the inherent interaction between the physical systems.(b) The positions of the physical qubit systems fluctuate collectively.(c) The position of each physical qubit system fluctuates independently.(d) Within each module, the position of each physical qubit system is quantized and correlated with the others.

Fig. 3 .
Fig. 3. (a)The setting consists of two 1D chains oriented along the x axis, where each system A and B corresponds to one of the chains.The positions of qubits Ai and Bj are given by ⃗ ri = (i∆x, ∆y + riy) and ⃗ qj = (j∆x, q yj ), respectively, where rxi and q yj ∈ {−δy, 0, δy}, with p(±δy) = 1/4 and p(0) = 1/2.(b) Optimal infidelity of the implementation of U = e −i π 4 ZZ as a function of the implementation time ∆t for different systems sizes for the setting described in (a), with ∆x = 2, ∆y = 4, δy = 1, γ = 1, and J = 1.

Fig. 4 .
Fig. 4. (a,b,c) Different settings consisting of 1D Paul traps.(d,e,f) Optimal infidelity of the implementation of U = e −i 4 ZZ as a function of the implementation time ∆ for different system sizes, NA and NB, with γ = 3 and J = 1 for each of the settings."t.t.b." means "top to bottom".(a,d) A 1D chain of ions in a harmonic potential with a Coulomb interaction can be written in terms of the normal modes.System A consists of the first half of the chain and system B of the rest of the ions, with ω = 1, L = 4.78, T = 1.3, and ϵ = 0.07.(b,e) Systems A and B are in parallel independent traps with NB = 1, ωA = 100 ωB = 1, ∆y = 20, L = 15.97,T = 0.1, and ϵ = 0.05.(c,f) Systems A and B are in parallel independent traps with NA = NB, ωA = 3 ωB = 1, LA = LB = 8.31, ∆y = 2, T = 0.2, and ϵ = 0.01.

E1) for 1 ≤
i ≤ K.Note if one writes Eq. (E1) in terms of the dimensionless position coordinates given by xi = x i /L where L 3 = χ/ω 2 , then in Eq. (E1) the only parameter left is K, e.g., for K = 3 one obtains x0

Fig. 7 .
Fig. 7. (a) Optimal logical subspace a for t = 0.9, for the scheme details in Fig. 2a in the main text.The ith bar of the histogram corresponds to the value of ai.(b) Optimal logical subspace a for t = 0.5, for the scheme details in Fig. 2d in the main text.The ith bar of the histogram corresponds to the value of ai.
is the Choi (pure) state of the target gate U , where |Φ⟩ = 1 2 1 i,j=0 |ij⟩ |ij⟩.In the case of the ZZ -damping channel, one can see that the fidelity is given by