Switching of spins and entanglement in surface-supported antiferromagnetic chains

Previous experimental studies discovered universal growth of chains and nanowires of various chemical elements on a corrugated molecular network of Cu3N on the Cu(110). Herein, performing combined ab initio and quantum Hamiltonian studies we demonstrate that such chains can be used for a fast spin switching and entanglement generation by locally applied magnetic pulses. As an example, we show that in antiferromagnetic Co chains a strong entanglement between ends of chains occurs during spin switching. A novel parity effect in spin dynamics is reported. Even-numbered chains are found to exhibit significantly faster spin switching than odd-numbered counterparts. Moreover, at certain parameters of the system the dimerization effect in the spin dynamics of the chains was found. Our studies give a clear evidence that tailoring spin dynamics and entanglement can be achieved by magnetic fields and by tuning exchange interactions in supported chains.

The emerging field of quantum engineering has the potential to create new quantum technologies. Quantum entanglement between spins is considered as a key resource for such future applications 1 . Spin chains are promising candidates for the generation of entanglement and qubit teleportation [2][3][4][5][6][7][8] , The transfer of a classical information along a quantum spin chain has been found to strongly depend on the quantum magnetic phases in the chain which can be tuned by the transverse magnetic field 9 . Antiferromagnetic spin chains can exhibit entanglement over long distances 10,11 , The entanglement in antiferromagnetic chains can be increased by increasing the temperature or the external field 12 . Several experiments have shown that entanglement in atomic-scale nanostructures on surfaces can survive at low temperatures even in the presence of decoherence caused by the environment [13][14][15] , To reduce the decoherence insulating substrates can be used 16 . For example, thin insulating layers, specifically CuN 2 on Cu(001) surface, provide significant decoupling between spins in surface-supported nanostructures and the bulk electrons in the metal below, resulting in relatively long-lived spin states 17,14 , Yan et al 17 . have observed very long lifetimes in the case of antiferromagnetic Fe 3 chains on CuN 2 . Gauyacq and Lorrente 18 have shown that decay from one state to another in such system strongly depends on the degree of entanglement of the local spins in the chain. Recent experiments on engineered small magnetic units on CuN 2 have demonstrated the possibility to study and control their spin states which is a very significant step towards atomic-scale memories [19][20][21][22]15 , Moreover, it has been 19 shown that data can be stored in antiferromagnetic atomic-scale structures on CuN 2 allowing to achieve data storage densities that are about 100 times higher than those in modern hard drives 22 . In very recent remarkable experiments of Choi et al 13 . the possibility to tune entanglement in chains of magnetic adatoms on a CuN 2 /Cu(001) surface was demonstrated. Spin chains with defined entanglement can be produced by changing the composition and coupling within the chains.
In all above mentioned experiments, spin chains on CuN 2 were created in control way by atomic manipulation with scanning tunnelling microscopy (STM). Besides, there is another copper nitride insulating layer studied by STM -a self-corrugated Cu 3 N nitride phase on a Cu(110) surface, which forms a covalently polar bonded molecular network similar to the copper nitride (CuN 2 ) on a Cu(001) surface 23 . This Cu 3 N network served as a perfect template for universal growth of atomic nanowires with uniform width and height among various transition metal elements. Moreover, the structure information, obtained by STM at the initial stage of epitaxial growth, revealed the universal growth of small linear chains distributed randomly at the bumping area within a trough of a self-corrugated Cu 3 N network (see Fig. 1 and 2 for more details). Our recent ab initio and quantum spin Hamiltonian studies have predicted that these antiferromagnetically coupled spin chains on Cu 3 N can exhibit the quantum entanglement up to rather high temperature (20-100 K) 2 . Therefore, we believe that such a built spin chains on Cu 3 N are a new playground for exploring quantum magnetic phenomena at the atomic scale.
Here, combining ab initio and quantum spin Hamiltonian studies, we demonstrate that antiferromagnetically coupled Co n chains of various lengths (n -number of cobalt atoms) on a Cu 3 N/Cu(110) can be used for a fast spin switching and generation of entanglement by the external magnetic pulses. In particular, the emergence of strong entanglement during spin switching is revealed. It is shown that propagation of this entanglement through cobalt chains can be tailored effectively by magnetic pulses and by tuning the exchange interactions between atomic spins. We have also found that for small exchange interactions the dimerization effect in the spin dynamics could be observed. Our results indicate that engineering of spin switching and entanglement in atom-by-atom fashion can be achieved by exploiting the parity effect of an even-and odd-numbered Co n chains, which exhibit significantly different quantum states. Our results offer a promising way to design spin-information transfer and entanglement of spin qubits based on atomic spin chains on insulating supports.

Parity effect and spin dynamics
To study the quantum spin dynamics of the finite Co n chains on a Cu 3 N/Cu(110) surface (to be referenced further as Cu 3 N in this paper), we performed ab initio calculations of the chains up to seven cobalt atoms (n = 2.7) placed in the hollow sites of the bumping area of self-corrugated copper nitride surface layer aligned along [110] (or Z axis in our case) direction and repeated periodically by means of a supercell approach (see the Methods and Fig. 1 for details). The arrangement of Co n chains on a Cu 3 N surface leads to the separation of their nearest neighbors within a chain with a distance of about 5 Å, while the next-nearest neighbors are far apart with a distance more than 10 Å. Such large separation results in a substantial decay of the exchange interaction for the next-nearest neighbors, which becomes almost negligible. We therefore constrained ourselves here for treatment of only the nearest neighbors exchange interactions in Co chains. In previous work 2 we showed, that intrachain exchange interaction is mediated by the nitrogen atoms interposing from the underlying Cu 3 N network and thereby exhibits a superexchange-like character. It is giving rise to a strong antiferromagnetic coupling of atomic spins with antiparallel alignment along the chain. The non-collinear calculations, including spin-orbital correction, allowed us to estimate quantitatively the strength of this exchange coupling (J = −0.352 meV) together with uniaxial (D = −0.352 meV) and transverse (E = 0.069 meV) anisotropies. Having received these values, we can make a setup to spin dynamics simulations of cobalt chains on a Cu 3 N surface in the framework of our model spin Hamiltonian. The step-like reversible field B z is determined by amplitude B z 0 and ascribed by a center of filed ′ t 0 (set at 30 ps) with a half-width ′ T w (set at 10 ps), whereas Gaussian-like pulse B x (t) is determined by amplitude B x 0 (set at 0.5 T) and ascribed by a shift of the pulse t 0 (set at 100 ps) with a half-width T w (set at 10 ps). Lower inset: Schematic view of a finite cobalt chain (Co 5 ) placed on a self-corrugated Cu 3 N/Cu(110) surface. The red (large dark) spheres indicate the Co atoms, the green (small dark) spheres indicate the N atoms, and the turquoise (light) ones indicate the Cu atoms, respectively. The exchange parameter J indicates spin coupling between cobalt atoms in neighboring sites.
However, in order to trigger the spin relaxation process, we have perturbed a spin state of an edge atom in the cobalt chain by applying an effective external magnetic field, which, for instance, occurs in close proximity of spin-polarized STM tip 17 or neighboring small cluster 24 . Such a magnetic field can probe locally a spin on the atomic scale and can cause a time evolution of a spin state propagating across the cobalt chain 25 . To achieve that we have applied to the edge atom the time-dependent external magnetic field B z (t) ascribed by step-like function (see inset in Fig. 1) with a reversible magnetization from B z 0 to − B z 0 along Z direction (along easy magnetization direction of a chain). Besides, due to the high symmetry of a spin structure along Z direction, we have applied also a short Gaussian magnetic pulse along X direction in order to break such symmetry and to accelerate a time evolution of the spins for the considered chains (see inset in Fig. 1). The amplitude of B x pulse and its width used in the present work are available with a current technology 26,27 , Such pulse can correspond to the magnetic component of THz radiation. Strong (a few T) and very short (2-4 ps) magnetic pulses can also be generated using relativistic electron bunches 28,29 , We reverse the direction of B z (Fig. 1) over timescale of picoseconds. In future experiments it could be possible using ultrafast optical manipulation of magnetic states 30 .
To sum up, we can write the total Hamiltonian of the system as: here → S i is the spin operator on the i th site in the chain (has spin magnitude S = 3/2 for Co), whereas g is the Landé factor (with free-electron value g = 2.00) and μ B is the Bohr magneton. The choice of the Co spin quantum number S = 3/2 is justified by the fact that ab initio calculations show a total spin on cobalt atom and ligand atoms to be close to 3/2, which is in agreement with an experimental Kondo-effect observed on cobalt atom 31 .
One should note that the ground state of the even-numbered antiferromagnetic chains is the singlet with S = 0, characterized by a wave function in which all spins populate opposing spin states equally [32][33][34]22 . Neel states are broken-symmetry solution of the Heisenberg Hamiltonian (HH) (Eq. (1)), i.e. the Neel state is not the ground state of the antiferromagnetic HH 33 . A small perturbation acting on one of the spin of the chain is enough to split the ground states into two Neel-like states. This perturbation can be of various origins (small inhomogeneities of a surface, external magnetic field induced by the spin-polarized tip etc.). The emergence of the Neel state from the ground AF state caused by measurements has been revealed in theoretical studies 33,34 . The presence of a decoherence makes also the two Neel states the equilibrium states of the system 32,22,35 . In the absence of decoherence(free chains) (or at extremely low temperatures if decoherence becomes negligible) the Rabi oscillations between two Neel states occur 32 . In our case the perturbation of the system is governed by external magnetic field which is applied only to the first spin. This field breaks the symmetry of the system and leads to the existence of Neel-like states.
Now we turn to the discussion of the time evolution of magnetization in cobalt chains. First, in Fig. 2 we present the relaxation time of atomic spins caused by a magnetic field with a reversible amplitude B z 0 = 2 T and demonstrate its evolution as a function of this amplitude for 5-and 6-atomic chains, as a particular example. The relaxation time has been determined as a time when a spin structure of the system reaches a nearly equilibrium state with a deviation of the total energy from the initial one less than 1%. As clearly seen in inset of Fig. 2, the relaxation time significantly differs for the chains with even and odd numbers of spins, which decreases for higher fields and saturates to less than a half of the value for the low fields. In Fig. 2 we plotted, as an illustration, the corresponding curves with asymptotical limits around ~350 ps and ~100 ps obtained for 5-and 6-atomic chains, respectively. To gain insight into such dynamical behavior of the even-and odd-numbered chains (so-called parity effect) we explored the peculiarities of their ground state. As it was mentioned above, an even-numbered antiferromagnetic chain has zero total spin and a singlet ground state, while an odd-numbered antiferromagnetic chain in general has non-zero total spin and, therefore, degenerate ground state. This degeneracy can be removed by applying external magnetic field leading to the spin arrangement in the system 22 . Thereby, when the magnetic field with a reversible magnetization is applied to an odd-numbered chain, the chain undergoes the transition between spin states triggered by field switching from + Z to − Z direction. Therefore the matrix element of the perturbed Hamiltonian between these states , and transition can occur only due to the relaxation term (see Eq. (2) in the Methods). If the damping constant λ is small (in our case λ = 0.05), then the relaxation time is quite large (about several hundreds picoseconds). For the case of an even-numbered chain, the same external magnetic field can only slightly modifies a singlet ground state, which is fully entangled and with the matrix element . To confirm these statements we perform at the end of this paper (see the Methods) an analytical description of parity effect for model 2-and 3-atomic chains with spin S = 1/2, as for the simplest representatives of even-and odd-numbered chains.
Finally, we comment on the importance of B x . As our calculation shows, B x -time t 0 (see Fig. 1) with respect to the B z -time ′ t 0 influences on the behavior of the odd-numbered chains: the closer t 0 to ′ t 0 , the earlier the chain flips (see Supplementary information, Fig. S1). At the same time B x gives no effects for the even-numbered chains since the switch occurs almost at the time of the switch of B z due to a fast tunnelling between |Ψ B↑ 〉 and |Ψ B↓ 〉 states (as it is mentioned above).
Entanglement and magnetic field dependence. Recent theoretical 2 and experimental 13 studies assigned the existence of the quantum entanglement of the spins among antiferromagnetic 3d chains on a copper nitride surfaces for realistic conditions. We demonstrate here how the parity effect can affect this entanglement for the considered cobalt chains. First of all, in Fig. 3 we present the time evolution of <S z > spin components and the single-particle Von Neumann entropies (see Eq. (4) in the Methods) obtained for each atomic spins within 5-and 6-atomic cobalt chains, and for the field = B T 2 z 0 . It is well seen, that a single-particle entropy of each atomic spin is rather small before and after the time of the spin-flip (Fig. 3(c,d)). Furthermore, during the spin-flip transition all <S z > spin components are passing through zero. We established in this case that the expectation value of the total spin < > S 2 ( → = ∑ → =Ŝ S i n i 1 ) is negligible and, thereby, we concluded that both chains should exhibit a high entangled spin states 6 . This conclusion is corroborated by enhancement of entropies observed for both chains during the spin-flip transition (Fig. 3(c,d)), which is related directly to quantum entanglement of spins. This quantum behavior of spins becomes quite interesting, if we increase the magnitude of the magnetic field B z 0 . In Fig. 4 we present results of our calculations, which demonstrate the dependence of a spin-flip time (when <S z > changes its sign) on B z 0 obtained for each spin within 5-and 6-atomic chains as a function of the magnetic field magnitude. One can see, that below some "critical" magnetic field B z c (3 T and 6 T for 5-and 6-atomic chains, respectively) the spins flip practically simultaneously (see also Fig. 3), while above this field the spins have different switching times. In another words, for magnetic fields less then the critical B z c one can speak about fast spin switching. Analysis of spin dynamics among cobalt chains revealed a strong oscillations of <S z > spin components. These oscillations exhibit the asynchronous time evolution observed for the magnetic fields B z 0 > B z c , that signifies obviously the impact of the field on the dynamical correlations within spin chains. To get a quantitative confirmation of this conclusion, we performed the calculations of the two-particle mutual information (related to two-particle Von Neumann entropies, see Eq. (6) in the Methods) of the chain edge atoms, as a particular example, for the small and large fields. This information allows one to evaluate a strength of a quantum correlation between the spins at the edges during propagation of a spin-flip signal along the chain. The calculations of the mutual information for the edge atoms in both considered chains clearly show that for large magnetic fields (B z 0 > B z c = 11 T) the correlation is much less than for small fields (B z 0 < B z c = 2 T) (see insets in Fig. 4) and zero before and after the switching. It means that the large magnetic field weakens spin correlation between edge atoms and, consequently, decreases entanglement of their spins. It is important to note that in our case in the ground state for the even numbered chains total magnetization is zero, but <S z > component on each  spin is not zero. As it is seen in Fig. 3(b) this is described by the fact that before and after the switching the chain forms Neel-like state with a small onsite Von-Neumann entropy. However during the switching process a strong enhancement of the entanglement and edge-to-edge mutual information is observed for moderate magnetic fields (see Figs 4 and S4). In this case the Neel-like state is lost and all spins are in highly-entangled states.
Finally, we examine how the coupling strength between spins can effect the quantum entanglement in chains. It was shown by recent STM study 13 , that the coupling strength and its ratio with the magnetic anisotropy energy (J/|D|), can be the dominant features responsible for existence of spin entanglement in the antiferromagnetic chains on a copper nitride surface. Therefore, we carried out the series of spin dynamics simulations by decreasing the exchange parameter (J) value with respect to the values of anisotropy constants (D and E). Here, we followed the approach provided by recent STM studies of Fe and Co spin chains on a Cu 2 N surface, where the authors were able to tune the strength of the exchange interaction within a chain by adjusting the relative position and orientation of the individual atoms on the underlying surface layer 36,16,37,20 , In Fig. 5 we present the results obtained for spin dynamics of 5-and 6-atomic cobalt chains with parameter J = −0.1 meV. We treat here only this exchange interaction, because it corresponds to the available experimental data established for interacting spins with a large separations 16 . It can be used without limiting the generality of obtained results and conclusions, since, having changed the exchange parameter within the same order of magnitude, we didn't observe any qualitative differences in spin dynamics among considered chains. Figure 5(a,b) shows the time evolution of a spin reversal within cobalt chains for a set of applied magnetic fields. Our key finding here is that during spin dynamics the chains are dimerized through formation of spin pairs (such as S1-S2, S3-S4, and S5-S6). It is well seen, that spin switching of atoms in chain occurs at substantially different timescales: it occurs with a significant time delay between neighboring pairs of spins, but almost simultaneously within each spin pair. Note, that the critical field B z c is strongly reduced by comparing the results presented in Fig. 4. The decreasing of the exchange coupling J between spins weakens their entanglement 13 . The quantum entanglement of AFM spin chains is decreased by the increasing of the external magnetic field B at zero temperature 12 . Therefore, the notable reduction of a critical field B z c for smaller J is mainly caused by the decreasing of entanglement in the considered chains.
To gain insight into the origin of such a strongly non-equilibrium spin dynamics, we examine the time evolution of the <S z > spin components (Fig. 5(c)) and the single-particle Von Neumann entropies (Fig. 5(d)) for 6-atomic chain under external magnetic field B = 4 T. Here, one can see that the spin components and the entropy are evolving by pairs. Moreover, a careful look at Fig. 5(c) reveals an unexpected scenario of spin switching between these pairs. We found that, owing to the substantially different timescales, the spin-flip transition of neighboring spins between spin pairs occurs by a way of a transient ferromagnetic-like state. This transient state is emerging through a temporary parallel alignment of spins, in spite of their antiferromagnetic coupling in ground state (Fig. 6(a)). Remarkably, the time required for the disappearance of this non-equilibrium ferromagnetic state is rather large for considered cobalt chains. In particular, using the spin dynamics simulations with adjusted damping constant λ (see Eq. (2) in the Methods), we found this time to be ~25 ps and ~20 ps for S2-S3 and S4-S5 interacted spins, respectively. Note that a similar transient regime of the spin dynamics was observed experimentally during ultrafast reversal of antiferromagnetically coupled spins within two magnetic sublattices in Gd-Fe-Co system 38 . However, the lifetime of the transient state in this case is significantly smaller than in our chains due to larger exchange interactions in bulk systems. This observation supports our own findings and indicates an existence of a strong spin correlations inside the spin system. To prove this statement we calculated two-particle mutual informations, which are responsible for quantum entanglement between two spins within chain, respectively. As shown in Fig. 6(b), the calculated two-particle mutual information exhibits a large entanglement between paired spins (S1 − S2, S3 − S4, S5 − S6), but drops it gradually in between these spin pairs, when transient ferromagnetic-like state mediates spin reversal of neighboring spins (S2 − S3, S4 − S5) within chain. It is noteworthy that such a remarkable dynamical propagation of entanglement through spin pairs was already predicted theoretically for model antiferromagnetic spin chains 6 . Thus, it is reasonable to conclude that dimerization of spins reported here is an intrinsic property of the antiferromagnetically coupled spin chains. Besides, our simulations predict that mutual information for paired and unpaired spins increases rapidly during a propagation of entanglement through the spin chain. This result seems to be very attractive, since it could give a credit for supported antiferromagnetic spin chains, as a prototype N-spin system, for the relevant technological implementations, such as quantum computation or teleportation 39 . Key challenges related to this process are the thermal instability and quantum decoherence governing the entanglement propagation in the N-spin system at large scale 40,41 , However, if entanglement propagates sufficiently fast, then decoherence doesn't have enough time to act 42 . Furthermore, entanglement in antiferromagtic spin chains was found to be less sensitive to the temperature than in ferromagnetic ones and thermally more stable, if it is generated for spins at large separations 6,40 , As it was shown, entanglement in this case exhibits an exponential decay with decoherence, which is much slower than in ferromagnetically coupled spins.
To conclude, our findings unveil a new insight into spin dynamics of cobalt chains antiferromagnetically coupled on insulating layer of a Cu 3 N/Cu(110) surface. It is shown that even-and odd-numbered chains exhibit spin reversal at substantially different timescales (parity effect), owing to the significantly different spin ground states. Even-numbered chains reveal much faster spin switching, than odd-numbered counterparts under the external magnetic field. Besides, the emergence of strong spin correlations and entanglement within chains is established during spin switching. Considering much weaker interaction of the spins within chains, an unexpected scenario of spin switching is observed. In this case the spin chains are dimerized through the formation of spin pairs and spin switching between them is mediated by a transient ferromagnetic-like state, in spite of antiferromagnetic spin coupling in the ground state. We believe that tapping into this quantum behavior of spin chains is very important for the understanding of both the fundamental physics and the atomic-scale limits for quantum information processing.

Details of ab initio calculations of Co n chains on a Cu 3 N/Cu(110) surface.
To examine the structural and magnetic properties of the considered cobalt chains we carried out an ab initio molecular dynamics calculations based on density functional theory (DFT) as it is implemented in VASP code 43 . The VASP code was used to solve the Kohn-Sham equations with periodic boundary conditions and a plane-wave basis set. An all-electron projector augmented wave (PAW) method was employed within this code for calculations of total energy and forces 44 . The electron exchange and correlation effects were taken into account using generalized gradient approximation (GGA) 45 . We used a maximal kinetic energy cutoff of 400 eV which converged iteratively the total energy of the considered systems to within 1 meV/atom. The integration over the Brillouin zone (BZ) was performed on a well converged k-point mesh 6x6x1, using the tetrahedron method with Blöchl corrections 46 . More technical details of the calculations one can find in our previous work 2 .

Details of the spin dynamics simulations.
To carry out spin dynamics simulations of the magnetic Co n chains on a Cu 3 N surface, we used the Heisenberg-Dirac-Van Vleck quantum spin Hamiltonian (Eq. (1)) within the irreducible tensor operator technique 47,48 , Also, the calculations were repeated using the direct product states basis. The single-site values of an effective exchange coupling (J) and magnetic anisotropy constants (D and E) were received directly from our ab initio calculations of total energies within the DFT approach.
The time evolution of the magnetization in supported magnetic cobalt chains was studied via the method proposed in ref. 49 where the time-dependent Schrödinger equation is solved together with a damping term as an analog to the Landau-Lifshitz equation 50 for classical magnetic dynamics. All the calculations were performed using home-made code and repeated in the Mathematica package. According to the ref. 49 one can write the time-dependent Schrödinger equation with a relaxation term as t where 〈H〉 t is the energy of the system at time t. It was shown 49 , that for the Heisenberg systems this equation can be reduced to the Landau-Lifshitz equation. In our case we will use an analogy of the Landau-Lifshitz-Gilbert Numerically this equation was solved by Runge-Kutta method.
As a quantity of the entanglement degree of a single particle in a many-body system one can use the Von Neumann entropy, which is calculated as here ρˆ1 is a reduced density matrix of 1st particle and λ m1 is its m 1 eigenvalue. The reduced density matrix is calculated from the total density matrix of a pure state taking a trace over the indices of the other particles ρ ψ ψ ρ = = .
... ...T r t t Tr ( ( ) ( ) ) ( ) with J < 0 for antiferromagnetic exchange coupling and under external magnetic field B. When the field is absent (B = 0), a singlet ground state of the system is ascribed by Then it can be easily shown in the framework of the perturbation theory that the ground states for B z > 0 and B z < 0 look like . Consequently, one can conclude that the switching of the magnetization in even-numbered chains should proceed much faster than in odd-numbered counterparts. Data Availability. The datasets generated and analysed during the current study are available from the corresponding author on reasonable request.