Skyrmions-based logic gates in one single nanotrack completely reconstructed via chirality barrier

Abstract Logic gates based on magnetic elements are promising candidates for logic-in-memory applications with non-volatile data retention, near-zero leakage and scalability. In such spin-based logic devices, however, the multi-strip structure and fewer functions are obstacles to improving integration and reducing energy consumption. Here we propose a skyrmions-based single-nanotrack logic family including AND, OR, NOT, NAND, NOR, XOR and XNOR that can be implemented and reconstructed by building and switching the Dzyaloshinskii–Moriya interaction (DMI) chirality barrier on a racetrack memory. Besides the pinning effect of the DMI chirality barrier on skyrmions, the annihilation, fusion and shunting of two skyrmions with opposite chirality are also achieved and demonstrated via local reversal of the DMI, which are necessary for the design of an engineer programmable logic nanotrack, transistor and complementary racetrack memory.


INTRODUCTION
Magnetic skyrmions are non-trivial spin structures with topological protection [1][2][3] that exhibit many desirable features, such as nanoscale size, remarkable stability and low driving threshold current [4][5][6][7][8][9][10]. These characteristics make them suitable for the design of non-volatile, low-power spin-logic gates that can be integrated with memory [11][12][13][14][15][16][17][18][19][20][21][22][23][24]. Since the realization of two or more spin-based logic functions in such architectures usually requires the combination of multiple strips or the cascade of simple operations, multifunctional spin-logic devices have more room for simplification to improve the integration and reduce energy consumption of integrated circuits. A possibility of switching Dzyaloshinskii-Moriya interaction (DMI), a crucial ingredient for the formation of exotic chiral magnetic states [25,26], represents a very attractive direction and an important challenge [27][28][29][30][31][32]. By reconstructing different chirality barriers (i.e. the energy boundary between states of opposite DMI chirality proposed in this work) using an electric field pulse, one can effectively control the dynamics of skyrmions, thereby establishing an additional degree of manipulation for the programmable skyrmions-based logic devices.
Logic gates usually consist of two inputs and one output. Considering the very simple structure of one single nanotrack, we propose to create magnetic skyrmions at both ends of it via a magnetic tunnel junction (input-MTJ) as inputs [19,23,33] and set up an output-MTJ in the middle area to detect the presence or absence of a magnetic skyrmion as output. The design of reconfigurable single-nanotrack logic gates needs to solve two problems. The first one is controlling the relative motion of two magnetic skyrmions serving as the inputs in order to make them meet at the output. Second, logic gates with various functions need different output responses to the same input, which requires the ability to switch between different skyrmion dynamics by external stimuli to realize the reconstruction of logic gates. The emergence of the DMI chirality barrier considered in this work can effectively solve these problems. For instance, it enables skyrmions with opposite chirality to meet and interact by locally reversing the DMI chirality in a nanotrack as shown in Figs 1a and 2a. The distribution and number of chirality barriers can be changed by an electric field pulse or other methods that can control the DMI [27][28][29][30][31][34][35][36] and the resulting various magnetic skyrmion dynamic effects will allow different logic operations Natl Sci Rev, 2022, Vol. 9, nwac021 ) (a) Figure 1. Schematic of the logic device and the evolution of the motion of four skyrmions driven by the same in-plane current. (a) A skyrmion-based single-nanotrack logic device with two inputs at both ends and one output in the middle. In the middle area of the nanostrip, a chirality barrier is formed by a DMI with the opposite sign. The skyrmions in (b), (c), (d) and (e) form four different dynamic modes starting from the center of the magnetoelectric multiferroics with a side length of 100 nm. The skyrmions in (c), (d) and (e) can be obtained from that in (b) by applying a corresponding electric field ε or magnetic field H . The oblique dotted lines are their respective trajectories driven by the same current. The color scale indicates the out-of-plane component of the magnetization and has been used throughout this paper.
to be performed efficiently within one single nanotrack.
In this work, besides the pinning effect of the DMI chirality barrier on magnetic skyrmions, the annihilation, fusion and shunting of a skyrmionskyrmion pair with opposite chirality are also realized by switching the type of barrier (single and double barriers). Then, the completely reconfigurable logic family including AND, OR, NOT, NAND, NOR, XOR and XNOR are implemented based on the proposed skyrmion dynamics in one single nanotrack. Such a simple single-nanotrack skyrmionsbased logic device can realize all logic calculation functions and switch from one operation to another without the superposition of logic gates, which is more suitable for device integration. By controlling the local chirality of the DMI in a racetrack memory, we also demonstrate the application of the DMI chirality barrier in the skyrmion transistor and the reset process of skyrmion bits.

Model and skyrmion motion phase diagram
We consider a CrN multiferroic monolayer as an example but are not limited to it. The energy density E of our magnetic system can be written as: with each term representing the exchange coupling, perpendicular magnetic anisotropy (PMA), demagnetization and DMI energy terms, respectively. As shown in our recent work [31], the PMA here is strong enough, so the above energy density E allows the existence of a ∼10-nm isolated metastable skyrmion without an external magnetic field. The topological property of a skyrmion can be described by the topological charge Q and helicity γ (γ = 0, ±π /2 and π ) [2]. When an external vertical electric field ε is applied on the multiferroic monolayer to alter the direction of electrical polarization P ( Supplementary Fig. S1a) [31], the DMI also switches its sign and causes a consequence of skyrmion diameter d variation ( Supplementary Fig. S1b). Accordingly, the helicity of the skyrmion switches from γ = 0 (π ) to γ = π (0) within a period T = 400 ps as shown in Supplementary Fig. S1c.
Since there are four different skyrmion states described by the chirality and polarity, a current applied in the same direction can induce four different skyrmion motion modes as shown in Fig. 1b-e. The topological charge sign switching induced by a magnetic field can only lead to the reversal of a transverse velocity (perpendicular to the driving current direction) [37]; however, the chirality switching induced by an electric field can lead to the reversal of both transverse and horizontal velocities (parallel or antiparallel to the driving current direction). This mechanism can be demonstrated by a modified Thiele equation derived from the Landau-Lifshitz-Gilbert (LLG) equation by considering an isolated skyrmion as a rigid point-like particle [38][39][40] (see Methods and Supplementary Materials). This allows us to explore the interaction of magnetic skyrmions with different chirality in one single nanotrack driven by the same current as shown in Fig. 1a.

Skyrmion-skyrmion pair annihilation, pinning and fusion
To explore the interaction between skyrmions with different chirality, we designed a nanotrack comprising two parts with opposite DMI chirality separated by a constructed hereby non-volatile DMI chirality barrier as shown in Fig. 2a. On both sides of the nanotrack with opposite DMI, two skyrmions with different helicity (γ = 0 and γ = π ) are excited simultaneously. The two skyrmions will move towards each other driven by a current via spin-orbit torque (SOT) and eventually collide in the middle area of the strip. Similar to two particles with positive and negative charges, the two skyrmions with opposite chirality can also attract each other. Since the pinning force of the chirality barrier on the two skyrmions is less than the attractive force between them, they finally annihilate on the upper and lower sides of the track within 0.88 ns as shown in Fig. 2b (left panel). However, when two skyrmions cannot reach the DMI chirality barrier at the same time, the first skyrmion will be blocked by the barrier until another skyrmion with opposite chirality arrives, resulting in a similar skyrmion-skyrmion pair annihilation process ( Fig. 2b; Supplementary Video S1, 1.3-1.7 ns). The pinning effect on the skyrmion due to the DMI chirality barrier can be observed more clearly in Fig. 2b (right panel) and Supplementary Video S1 (1.7-2.7 ns). Figure 3a shows the schematic diagram of double DMI chirality barriers. A positive electric field pulse can switch the negative DMI chirality of the brown area to positive one and form chirality barriers in the middle of the strip, while a negative one can eliminate the chirality barriers. Compared to the chirality barrier in Fig. 2a, the double barriers in Fig. 3 also have a pinning effect on a single magnetic skyrmion, but the dynamics of skyrmions with opposite chirality will depend on both the attractive and pinning forces. When the double barriers are too narrow (<6 nm) and the attractive force is stronger than the pinning one, the magnetic skyrmions will attract each other and annihilate together near the barrier. When the two magnetic skyrmions with opposite chirality approach each other in double barriers wider than 6 nm but in the skyrmions' interaction range, the pinning force will balance the attractive force, forming a non-trivial particle with topological charge Q = 1.87 ( Fig. 3b; Supplementary Fig. S2). The topological charge Q will be affected by the width of the barrier. When the barrier is narrower, the magnetic skyrmions with opposite chirality will fuse more closely and the topological charge will be close to 1, otherwise it will be close to 2.
Due to the strong magnetic anisotropy in the CrN monolayer, the driving current density used in our logic operation is 28 MA/cm 2 , which is nearly twice the current density used by other logic devices based on magnetic skyrmions [19]. A larger current density can further increase the attractive force between magnetic skyrmions with opposite chirality and accelerate their annihilation or conversion process. However, an excessive current will annihilate them near the chirality barrier as shown in Supplementary Fig. S3. The Curie temperature of CrN is 805 K [41]. The simulated results have proved that neither thermal disturbances at room temperature nor the internal defects can affect the skyrmion dynamics. Moreover, it is shown that the dynamics of the pinning, annihilation and fusion of skyrmions will not be affected in the strip with a 12-nm transition region as shown in Supplementary Videos S2 and S3 for a single (double) barrier. The magnetic skyrmion dynamics mentioned in this article are not limited to a CrN monolayer; other structures with controllable DMI chirality can also  realize similar skyrmion dynamics. The narrower chiral transition area and the larger skyrmion size can make the skyrmion dynamics more stable.
The number and distribution of the DMI chirality barriers can be adjusted by an electric field, which can realize the annihilation, pinning and fusion of skyrmion-skyrmion pairs with opposite chirality in a single nanotrack, thus providing a method for realizing skyrmion-based single-nanotrack logic gates.

Reconfigurable single-nanotrack skyrmion logic gates
Based on the proposed skyrmion-skyrmion pair annihilation and pinning effects, we can employ the electric field pulse to reconstruct a non-volatile DMI chirality barrier in magnetoelectric multiferroics and transform a single racetrack memory into any logic gates, realizing a complete logic family as displayed in Fig. 4. It is worth noting that here we realize one of the most challenging logic gates, the XOR, in one single nanotrack, which is usually implemented by combining the AND and the OR gates. In the proposed structure shown in Fig. 4a, we simply reverse the DMI chirality of the left or right part of a monolayer racetrack memory to form a DMI chirality barrier (vacant a bidirectional switch) and then successfully implement a logic XOR gate. For this logic application, two inputs are placed on the left and right sides, while an output is placed in the middle area (see red box area in Fig. 4a).
Here we define that the presence (resp. absence) of a skyrmion corresponds to the '1' (resp. '0') state. When only one of the two inputs is in the '1' state, the skyrmion corresponding to this '1' state will be blocked in the red box area by the DMI chirality barrier resulting in the '1' output state. When both inputs are in '1' states, two skyrmions with different chirality meet and annihilate at the DMI chirality barrier yielding a '0' state output. Thus we realize the XOR gate function with only one single nanotrack ( Fig. 4a; Supplementary Video S4). Next, in the positive DMI region, we can use a downward electric field pulse to invert the DMI chirality to negative within a narrow area in the red output box (switch on position 1) and the XOR logic gate will be transformed into an OR gate. When two skyrmions with opposite chirality meet in the double barriers, they will not be annihilated, but will transform into a topological non-trivial particle in which two skyrmions with opposite chirality merge together as shown in Figs 3b and 4b, then the output signal is in the '1' state (cf. also Supplementary Video S5). The logic NAND gate requires both inputs to be in the '0' state while the output is in the '1' state. To realize the NAND gate, we turn the switch to 2 to obtain wider DMI barriers as shown in Fig. 4c and set two opposite chiral skyrmions in the middle area. Because the skyrmions with opposite chirality move backwards under the in-plane current, they will not meet and annihilate. In view of this, the input operations are similar to other logic gates and the NAND function is hereby implemented (Fig. 4c; Supplementary Video S6). The difference between the NAND and the OR gates is the width of the DMI barriers-the latter is much thinner. In order to make the two skyrmions with opposite chirality attract each other and effectively fuse, our simulations show that the width should not be >26 nm, which is the critical width for designing OR gates. When the barrier is >26 nm, magnetic skyrmions with opposite chirality will be isolated on both sides of the barrier and we can implement NAND logic operation.
In the design of the above reconfigurable logic nanotrack, a magnetic tunnel junction (output-MTJ) structure is used to read skyrmions [42]. The bottom multiferroics adjacent to the heavy metal (HM) layer works as the free layer of the MTJ. The top ferromagnetic (FM) layer acts as the fixed layer ( Supplementary Fig. S4). When a skyrmion reaches the bottom layer of the output-MTJ under the driving current, the polarity direction of the skyrmion will be opposite to the magnetization of the fixed layer and the output-MTJ will be in a high-resistance state resulting in a high voltage. If the magnetization of the fixed layer is switched, the output-MTJ will  be in a low-resistance state when a skyrmion is detected, giving a low voltage as an output. In addition, when the MTJ is in a low-resistance state, it can also realize the reconstruction of logic gates in the chirality switching of multiferroics. Therefore, based on the XOR, OR and NAND designed above, XNOR, NOR and AND functions can be similarly realized by switching the magnetization of MTJ. Using only one of the left and right parts of the NAND gate, it is also possible to implement the NOT gate [11]. It is worth noting that after each logic operation, the logic gate needs to be restored. The usual practice is to increase significantly the driving current in order to annihilate topological magnetic particles as shown in the simulation results in Supplementary Fig. S3. Alternatively, here we reintroduce (re-input) a skyrmion with opposite chirality in the opposite direction to perform the so-called erasing (reset) operation, which is more energy-efficient but needs the feedback from the previous logic operation. The detailed process is displayed in the corresponding video for each logic gate. In the initial state for the NAND operation, we need to set two magnetic skyrmions in the middle of the nanotrack. The chirality of the two magnetic skyrmions is opposite. The two skyrmions can be introduced through MTJs at the two ends of the nanotrack and then transported to the target position by the current to perform logic operations and output information in the middle of the nanotrack. The operating speed of the logic device depends on the moving speed of the magnetic skyrmion(s). According to the simulation of skyrmion dynamics in Fig. 2, the time required for each logic operation is ∼1 ns. The logic operations in this study are completely implemented in a nanotrack and thus the logic device can be connected to a skyrmion-based memory, thereby integrating logic and storage functions.
Considering the applications of the energy barrier in manipulating magnetic skyrmion dynamics [19,23,[43][44][45], the pinning and depinning effects of the DMI chirality barrier on magnetic skyrmions can also be employed in other devices, e.g. the design of transistors to switch on/off circuits (Supplementary Fig. S5a and Video S7). It is worth noting that the magnetic skyrmions can be recycled after each operation to reduce energy consumption as shown in Supplementary Fig. S6. In practical applications of the skyrmion racetrack memory, the speed of the skyrmion motion will be affected by temperature and material defects, resulting in possible bit misalignment. Here, we propose to adjust the position of the skyrmion by constructing DMI chirality barriers as shown in Supplementary Fig. S5b, where the bits can be reset and the reading error of the skyrmion can be avoided. The barriers used in our logic devices have chiral characteristics that are different from those of the other ones, such as magnetic anisotropy barriers [44]. Due to the DMI signs in both sides being opposite, magnetic skyrmions will not cross this barrier unless the chirality of the magnetic skyrmion is reversed and the chirality barrier can quickly brake the skyrmion even under a large driving current.

Skyrmions shunting
The spin-polarized current can create an isolated skyrmion in a nanotrack and the DMI chirality of the magnetic film determines the chirality of the skyrmion. The skyrmions with opposite chirality can be driven in different directions by the same current via SOT [46,47]. This gives a way to the realization of skyrmion shunting in different states by switching the DMI chirality with an electric field pulse. Using a single nanotrack as shown in Fig. 5a, an applied electric field can control the chirality of a skyrmion excited by the spin-polarized current in the middle area of the nanotrack. When the electric Natl Sci Rev, 2022, Vol. 9, nwac021 field pulse points downward, the DMI chirality of the middle area matches that of the right area, causing the skyrmion with helicity γ = 0 to move to the right driven by an in-plane current (Fig. 5b, 0-0.35 ns). However, when the direction of the electric field pulse points upward, the DMI chirality in the middle area becomes the same as that of the left area, causing the excited skyrmion with opposite helicity (γ = π ) moving to the left (Fig. 5b, 0.37-0.72 ns). Using magnetic skyrmions or other non-trivial particles with different topological properties to encode bits is an attractive direction for possible practical applications [48][49][50][51][52]. Here, we use skyrmions with opposite chirality as information carriers to improve the robustness of the data. Folding the nanotrack (Supplementary Fig. S7) from the middle results in the left (resp. right) half being on the upper (resp. lower) level. There will be only one skyrmion in the upper or lower channel, i.e. if a skyrmion exists as a bit in the upper (lower) nanotrack, there will be no skyrmion in the lower (upper) nanotrack. In addition, the skyrmions in the upper or lower channel will move in opposite directions under the same current. This effect will lead to an excited skyrmion in the middle area only being able to choose one direction to move. Once the direction is determined, the corresponding area in the other direction will show a vacant state, thus a so-called natural complementary racetrack memory is constructed.

CONCLUSION
We demonstrate that skyrmion chirality switching, pinning, pairwise annihilation, fusion and shunting can be achieved and switched by an electric field pulse in magnetoelectric multiferroics. By locally controlling the DMI chirality, we can reconstruct the non-volatile DMI chirality barrier to switch the above-mentioned various magnetic skyrmion dynamic phenomena, allowing the implementation and reconfiguration of logic functions including AND, OR, NOT, NAND, NOR, XOR and XNOR. Compared to other reconfigurable logic gates requiring a combination of multiple strips or a cascade of simple functions to perform two or more logic operations, we realize the implementation of the complete logic functions into one single nanotrack, thereby further simplifying the design of the spinbased logic device. Moreover, we also realize the 'on' and 'off' states of a skyrmion transistor and skyrmion bit reset via the pinning and depinning functions of non-volatile DMI chirality barriers. Any two of aforementioned functions or operations can be easily transformed from one to another by switching the sign of the DMI chirality barrier and skyrmions can be recycled after each operation. The study paves the way towards energy-efficient, high-density spinbased logic devices, illustrating the potential for using skyrmions for logic-in-memory applications.

METHODS
To investigate the dynamics of skyrmions, we performed finite-difference simulations using the LLG equation with a damping-like torque: where m indicates the magnetization unit vector, H eff is the effective field that is defined as ∂ m with the following terms: exchange field H exch , PMA field H anis , demagnetization field H d and DMI field H DMI . p stands for the spin polarization unit direction, γ 0 and α represent the gyromagnetic ratio and the Gilbert damping coefficient, respectively. u = | γ 0 μ 0 e | j θ SH 2M s indicates the spin torque coefficient, with j being the current flowing in the heavy metal (HM) layer. θ SH , and e indicate the spin Hall angle, the reduced Planck constant and the electron charge, respectively.
In the present study, the material parameters for the CrN monolayer are chosen based on firstprinciples calculations in the absence of an electric field: exchange constant A = 13.2 pJ/m, saturation magnetization M s = 1289 kA/m, magnetocrystalline anisotropy K uz = 1992 kJ/m 3 and DMI energy constant D = ±3.5 mJ/m 2 . The calculated material parameters with out-of-plane electric field ε sweeping from −0.5 V/Å to 0.5 V/Å can be referred to Ref. [31]. We performed micromagnetic simulations in a sample with a side length of 100 nm and a thickness of a = 0.2 nm. The mesh size is set to 1 × 1 × 0.2 nm 3 , which is sufficiently small compared to the typical exchange length and the 10-nm skyrmion. In addition, the width of the logic device is 30 nm and the length is eight times the width. Our simulation results indicate that the width of the nanotrack should be <40 nm so that the distance between the magnetic skyrmions with opposite chirality is small enough for them to interact. The main function of the current in this study is to drive magnetic skyrmions towards the middle area of the nanotrack for logic operations and the driving current density should be >10 MA/cm 2 to drive the skyrmions effectively. In order to prevent skyrmions from annihilating at the boundary of the nanotrack, however, the driving current density should not exceed 35 MA/cm 2 .
It is worth noting that the construction of the DMI chirality barrier and the resulting physical conclusions can be realized in structures of multi-layer or 2D magnetoelectric multiferroics in which the DMI chirality is electrically switchable, which is not limited to a CrN monolayer. When the magnetic parameters (exchange interaction, PMA and DMI) meet the generation conditions for magnetic skyrmions, other structures or materials with a reduced switchable DMI can also be employed for the implementation and realization of logical operations. In order to verify that the logic device still works with a reduced DMI value, we decrease the intensity of PMA and DMI to K uz = 170 kJ/m 3 and D = ±1 mJ/m 2 , respectively, to maintain the stable existence of the magnetic skyrmion. The simulation results show that the chirality barrier can still control the magnetic skyrmion dynamics including pinning, annihilation and fusion similar to those in Figs 2 and 3, and has no influence on the implementation of logic operations.

SUPPLEMENTARY DATA
Supplementary data are available at NSR online.