Introduction

Topological spin textures in magnets are versatile objects that can be used to facilitate many magnetic and spintronic applications1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18. The basic topological spin textures in magnets with Dzyaloshinskii-Moriya (DM) interactions are called magnetic skyrmions19, which have been created experimentally20,21,22,23,24,25,26,27,28,29,30,31,32 and suggested for use in spintronic functional devices, including memories33,34,35,36,37,38,39,40,41, logic computing gates42,43,44,45,46,47, field-effect transistors48,49,50, memristors51,52, and other novel applications53,54,55,56,57,58,59,60.

Toward the realization of device applications based on skyrmions, a number of theoretical and experimental works have been devoted to the studies of statics and dynamics of skyrmions1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18. In particular, the skyrmion texture is found to have several degrees of freedom that, in principle, could carry useful information and could be controlled and manipulated independently. For example, the position of a skyrmion can be manipulated by a spin current25,26,31,33,34,35,36,37,38,39,40,61,62,63,64,65,66; the size of a skyrmion can be controlled by an out-of-plane magnetic field26,27,28,67; the topological charge of a skyrmion can be changed by a vertical spin current68; the polarity of a skyrmion can be switched by magnetic fields and spin currents69,70,71,72; the helicity of a skyrmion in frustrated magnets can be manipulated by a spin current73,74,75,76,77,78.

Typically, an isolated skyrmion stabilized by the DM interaction shows a circular shape19,67. Recently, skyrmions with different shapes have been realized79,80,81,82,83,84,85,86. For example, a square lattice of square-shaped skyrmions was discovered by Khanh et al.80 in a centrosymmetric tetragonal magnet, of which the origin was theoretically investigated by Hayami and Motome81. A square lattice of square-shaped antiskyrmions was also observed experimentally by Peng et al.82 in a noncentrosymmetric magnet. Besides, it is found that skyrmions and antiskyrmions can show elliptical shapes in samples with anisotropic DM interactions83,84,85. The deformation of a skyrmion induced by external forces may also result in a non-circular shape31,65. All these findings on skyrmions showing different shapes reflect the importance of controlling the shape of a skyrmion, which may lead to novel spintronic applications based on topological spin textures with different shapes.

Recently, Juge et al.87 and Ohara et al.88 independently demonstrated the control of skyrmion position by locally modifying the magnetic properties. They experimentally realized the confinement of skyrmions in nanoscale tracks with modified magnetic properties on a large film. In particular, the local modification of perpendicular magnetic anisotropy (PMA) can result in an energy barrier, which plays a key role on the confinement and pinning of skyrmions. Therefore, by locally modifying PMA or other magnetic properties it is envisioned that one can fabricate different types of artificial pinning patterns on magnetic materials, such as parallel defect lines, grids, and square patterns18,86,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109. These artificial pinning patterns may lead to very special static and dynamic behaviors of topological spin textures interacting with them18,86,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109. For example, the skyrmion Hall effect can be controlled or reduced for skyrmions moving over two-dimensional periodic pinning arrays in certain cases91,105. Moreover, the artificial pinning patterns would also offer the possibility to study basic science issues since particles and quasi-particles (e.g., superconducting vortices and colloids) on periodic substrates is a wide-ranging problem18,110,111,112,113,114,115,116.

In this work, we report the properties of a skyrmion in a magnetic thin film with the square-grid pinning pattern formed by nanoscale orthogonal defect lines with reduced PMA. We show that the square grid leads to the formation of pixelated skyrmions, of which the position and area are quantized in the unit of the grid cell. We find that the position, size, and shape of a pixelated skyrmion can be manipulated precisely by a current pulse.

Results and discussion

Static properties of the square-shaped skyrmion

Figure 1 (a) depicts the simulation geometry. We consider a ferromagnetic (FM) thin layer attached to a heavy-metal layer, where the FM layer has certain PMA and interface-induced DM interaction. The FM layer thickness is fixed at 1 nm in all simulations. We assume that the square-grid pinning pattern in the FM layer is formed by orthogonal defect lines with reduced PMA, which can be realized in experiments by locally modifying the magnetic properties (i.e., using additional sputtered layers or ion irradiation)87,88,117. The width of each defect line is defined as w. The distance between two nearest-neighboring parallel defect lines is defined as l. The number of unit square patterns along the x or y directions is defined as n. Hence, the total side length of the FM layer is equal to nl + (n + 1)w [see Fig. 1(a)]. The magnetic parameters and other modeling details are given in the Methods.

Fig. 1: An ordinary magnetic skyrmion and a square-shaped magnetic skyrmion.
figure 1

a Top-view schematic of the simulation geometry. l denotes the spacing between two adjacent parallel defect lines. w denotes the width of the defect line. n denotes the number of unit square patterns along the x and y directions. The total side length of the ferromagnetic layer equals nl + (n + 1) w. K and Kd stand for the perpendicular magnetic anisotropy constants for the unmodified areas and defect lines, respectively. The defect lines with reduced Kd are indicated by yellow lines. The thickness of the ferromagnetic layer is fixed at 1 nm. b Illustration of a relaxed ordinary round-shaped skyrmion with the topological charge of Q = 1 at the center of a sample with Kd/K = 1. The side length of the sample equals 106 nm. The relaxed skyrmion diameter dsk equals 16 nm, which is indicated by the black line. The color scale represents the out-of-plane magnetization component mz, which has been used throughout the work. c Illustration of a relaxed square-shaped skyrmion with Q = 1 at the center of a sample with Kd/K = 0.2. Here, l = 30 nm, w = 4 nm, and n = 3. The side length of the sample equals 106 nm. The relaxed skyrmion diameter dsk equals 38 nm, as indicated by the black line. d Top view of the sample with Kd/K = 1, corresponding to (b). e Top view of the sample with Kd/K = 0.2, corresponding to (c).

We first study a static single isolated skyrmion in the sample with the square grid. At the initial state, a Néel-type skyrmion with a theoretical topological charge Q = 1 is placed at the sample center, which is relaxed to a stable or metastable state by the OOMMF conjugate gradient minimizer118. The topological charge Q is defined as \(Q=-\frac{1}{4\pi }\int {{{{{{{\boldsymbol{m}}}}}}}}\cdot (\frac{\partial {{{{{{{\boldsymbol{m}}}}}}}}}{\partial x}\times \frac{\partial {{{{{{{\boldsymbol{m}}}}}}}}}{\partial y})dxdy\) with m being the reduced magnetization. In this work, we assume that the initial skyrmion diameter is smaller than the defect-line spacing l. For example, the relaxed ordinary skyrmion has a diameter dsk of 16 nm in the sample with l = 30 nm, w = 4 nm, n = 3, and Kd/K = 1 [see Fig. 1(b)]. Kd/K = 1 means no square-grid pinning pattern exists in the sample. However, when Kd/K < 1, the initial skyrmion may relax to a square-shaped skyrmion with an enlarged size determined by the square-grid pinning pattern, as shown in Fig. 1(c). In particular, the diameter (i.e., the side length) of the square-shaped skyrmion dsk is found to be l + 2w. For example, in Fig. 1(c) the relaxed square-shaped skyrmion shows dsk = 38 nm in the sample with l = 30 nm, w = 4 nm, n = 3, and Kd/K = 0.2. We note that the square-shaped skyrmion with a larger size will be easier to be detected and observed. Once a square-shaped skyrmion is formed on the grid, its position and area are determined in the unit of the grid cell. As a minute grid cell is regarded as a pixel of the grid, the square-shaped skyrmion on the grid is seen as a pixelated skyrmion with quantized area.

Figure 1 (d),(e) show the top views of an ordinary skyrmion at Kd/K = 1 and a square-shaped skyrmion at Kd/K = 0.2, respectively. The formation of the square-shaped skyrmion on the grid with Kd/K < 1 is due to the fact that the defect line with reduced PMA attracts the domain wall or skyrmion near it88. The formation of the square-shaped skyrmion is favored by smaller Kd/K and wider defect lines provided that 0 ≤ Kd/K ≤ 1 and wdsk < l (see Supplementary Note 1). We note that the square-shaped skyrmion is formed on the grid in the absence of an out-of-plane magnetic field Bz. However, the size of the square-shaped skyrmion is adjusted by Bz when Kd is much smaller than K (see Supplementary Note 2).

Current-induced dynamics of the square-shaped skyrmion

We also study the current-induced dynamics of a square-shaped skyrmion on the grid (see Fig. 2). We consider a sample at Bz = 0 mT with l = 30 nm, w = 4 nm, and n = 11. The total side length of the sample is equal to 378 nm. At the initial state (i.e., t = 0 ps), we place a relaxed skyrmion with Q = 1 at the sample center. We first apply a single current pulse to drive the dynamics at a damping parameter of α = 0.3. The pulse length is fixed at τ = 400 ps. The current density is fixed at j = 100 MA cm−2. After the application of the pulse, the sample is relaxed for 600 ps. The total simulation time equals 1000 ps. Note that we only consider the damping-like spin-orbit torque generated by the current pulse (see Methods). The field-like torque contribution in our material system could be very small compared to the damping-like torque as our system does not have a large interfacial Rashba effect. Also, a large field-like torque usually leads to the deformation of a skyrmion65, which cannot provide a driving force.

Fig. 2: Current-induced dynamics of a square-shaped skyrmion on the grids.
figure 2

a Top views of the current-induced motion of an ordinary round-shaped skyrmion in a sample with Kd/K = 1 for different spin polarization direction p. K and Kd stand for the perpendicular magnetic anisotropy constants for the unmodified areas and defect lines, respectively. The side length of the sample equals 378 nm. An ordinary skyrmion with the topological charge of Q = 1 is relaxed at the sample center as the initial state at t = 0 ps. A 400-ps-long current pulse of j = 100 MA cm−2 is applied, and then the system is relaxed for 600 ps. Here the damping parameter α = 0.3. b Top views of the current-induced hopping motion of a square-shaped skyrmion in a sample with defect lines for different p. Here, l = 30 nm, w = 4 nm, n = 11, and Kd/K = 0.5. l denotes the spacing between two adjacent parallel defect lines. w denotes the width of the defect line. n denotes the number of unit square patterns along the x and y directions. The side length of the sample equals 378 nm. A square-shaped skyrmion with Q = 1 is relaxed at the sample center as the initial state at t = 0 ps. A 400-ps-long current pulse of j = 100 MA cm−2 is applied, and then the system is relaxed for 600 ps. The defect lines with reduced Kd are indicated by yellow lines. The motion route is denoted by the cyan arrow. c Top views of the current-induced deformation of a square-shaped skyrmion in a sample with defect lines for different p. Here Kd/K = 0.2. The other parameters are the same as those in (b).

As shown in Fig. 2(a), an ordinary skyrmion shows directional motion in the sample with Kd/K = 1 when a single current pulse is applied. The direction of motion depends on the spin polarization direction p, which is controlled by the current injection direction in experiments. When \({{{{{{{\boldsymbol{p}}}}}}}}=+\hat{x}\), the ordinary skyrmion moves smoothly toward the + y direction and shows an obvious transverse shift in the − x direction due to the skyrmion Hall effect64,65. The skyrmion stops when the current pulse is off at t = τ = 400 ps, and the final state obtained at t = 1000 ps shows that the skyrmion is closer to the upper left corner of the sample (see Supplementary Movie 1). The skyrmion moves closer to the lower left, lower right, and upper right corners driven by the current pulses with \({{{{{{{\boldsymbol{p}}}}}}}}=+\hat{y}\), \({{{{{{{\boldsymbol{p}}}}}}}}=-\hat{x}\), and \({{{{{{{\boldsymbol{p}}}}}}}}=-\hat{y}\), respectively.

When Kd/K < 1, we find that the square-shaped skyrmion shows very different current-induced dynamic behaviors, which depend on the value of Kd/K. In the sample with Kd/K = 0.5, the square-shaped skyrmion shows a hopping motion instead of a smooth motion [see Fig. 2(b)], which is caused by the pinning effect of the grid (see Supplementary Movie 2) The hopping motion toward the sample corner is a result of the skyrmion Hall effect. However, in the sample with Kd/K = 0.2, the square-shaped skyrmion shows directional elongation and deformation when the current pulse is applied [see Fig. 2(c)]. Due to the skyrmion Hall effect, the square-shaped skyrmion is transformed to a pixelated L-shaped skyrmion (see Supplementary Movie 3), which carries a theoretical topological charge of Q = 1. We find that depending on p, the position and orientation of the final L-shaped skyrmion can be controlled.

First, we review the results on an ordinary skyrmion with Kd/K = 1. mz slightly decreases to a stable value during the application of the current pulse, indicating the steady motion of the skyrmion with a slightly reduced size during the pulse application as shown in Fig. 3(a). The time-dependent total energy E is given in Fig. 3(d), which rapidly recovers to the initial-state value after the pulse application, suggesting that the initial and final states are the same. Figure 3(g) shows the time-dependent numerical topological charge Q, which slightly increases during the skyrmion motion. We note that the numerical Q is not exactly equal to 1 at the initial and final state. The non-integer value is caused by the discretized meshes and the current-induced deformation of the skyrmion. We have excluded the effect of tilted edge spins on the calculation of Q.

Fig. 3: Out-of-plane magnetization, energy, and topological charge of the current-driven square-shaped skyrmion.
figure 3

a Time-dependent out-of-plane magnetization mz corresponding to the current-induced motion of an ordinary round-shaped skyrmion in a sample with Kd/K = 1. K and Kd stand for the perpendicular magnetic anisotropy constants for the unmodified areas and defect lines, respectively. A 400-ps-long current pulse of j = 100 MA cm−2 and \({{{{{{{\boldsymbol{p}}}}}}}}=+\hat{x}\) is applied, and then the system is relaxed for 600 ps. b Time-dependent mz corresponding to the current-induced hopping motion of a square-shaped skyrmion in a sample with defect lines of Kd/K = 0.5. c Time-dependent mz corresponding to the current-induced deformation of a square-shaped skyrmion in a sample with defect lines of Kd/K = 0.2. d Time-dependent total energy E of the system corresponding to (a). e Time-dependent E corresponding to (b). f Time-dependent E corresponding to (c). g Time-dependent numerical topological charge Q of the system corresponding to (a). h Time-dependent numerical Q corresponding to (b). i Time-dependent numerical Q corresponding to (c). j Q density distribution of an ordinary skyrmion. k Q density distribution of a square-shaped skyrmion. l Q density distribution of an L-shaped skyrmion at the final state.

Next, we study the case with Kd/K = 0.5, where a square-shaped skyrmion shows a hopping motion. mz oscillates during the pulse application, which implies the oscillating changes of the skyrmion size and shape during its hops across square grid cells as shown in Fig. 3(b). The detailed process is shown in Fig. 4(c). After the pulse application, both mz and E are recovered to their initial-state values at t = 0 ps [see Fig. 3(e)], justifying that the initial and final skyrmion states are the same because of the translational symmetry of the square-shaped skyrmion. We note that the numerical Q oscillates during the pulse application [see Fig. 3(h)], which is caused by the oscillation of the square-shaped skyrmion.

Fig. 4: Effect of pulse length on the current-induced dynamics of a square-shaped skyrmion.
figure 4

a Top views of the hopping motion of a square-shaped skyrmion driven by a current pulse with the pulse length τ. Here, l = 30 nm, w = 4 nm, n = 11, Kd/K = 0.5, and the damping parameter α = 0.3. K and Kd stand for the perpendicular magnetic anisotropy constants for the unmodified areas and defect lines, respectively. l denotes the spacing between two adjacent parallel defect lines. w denotes the width of the defect line. n denotes the number of unit square patterns along the x and y directions. The side length of the sample equals 378 nm. A square-shaped skyrmion with the topological charge of Q = 1 is relaxed at the sample center as the initial state at t = 0 ps. A current pulse of j = 100 MA cm−2 and \({{{{{{{\boldsymbol{p}}}}}}}}=-\hat{y}\) is applied, and then the system is relaxed until t = 1000 ps. The defect lines with reduced Kd are indicated by yellow lines. The motion route is denoted by the cyan arrow. b Top views of the deformation of a square-shaped skyrmion driven by a current pulse with τ. Here Kd/K = 0.2. The other parameters are the same as those in (a). c Zoomed top views of the hopping motion of a square-shaped skyrmion driven by a 100-ps-long pulse of j = 100 MA cm−2. The other parameters are the same as those in (a). d Zoomed top views of the deformation of a square-shaped skyrmion driven by a 100-ps-long pulse of j = 100 MA cm−2. The other parameters are the same as those in (b).

Finally, we study the case with Kd/K = 0.2. As the square-shaped skyrmion is enlarged and deformed during the pulse application, mz significantly decreases during t = 0 − 400 ps and reaches a stable value at t = 500 ps. See Fig. 3(c). The detailed process is shown in Fig. 4(d). E increases and oscillates during the deformation [see Fig. 3(f)], indicating the deformation is produced by overcoming periodic energy barriers on the grid. The numerical Q oscillates and slightly decreases [see Fig. 3(i)], which result from the different sizes and shapes of the initial and final states. The distributions of local Q density for the ordinary, square-shaped, and L-shaped skyrmions are given in Fig. 3(j),(k),(l), respectively. We find that the local Q density is localized at the corners of pixelated skyrmions. Especially, the local Q density is negative for the 270 degree corner of the L-shaped skyrmion.

In Fig. 4, we continue to investigate the effect of the pulse length τ on the dynamics of a square-shaped skyrmion. At t = 0 ps, we place a relaxed square-shaped skyrmion with Q = 1 at the sample center. We focus on the dynamics induced by a single current pulse with j = 100 MA cm−2 and \({{{{{{{\boldsymbol{p}}}}}}}}=-\hat{y}\). As shown in Fig. 4(a), the square-shaped skyrmion in the sample with Kd/K = 0.5 hops from the grid cell at the sample center to the right nearest-neighboring grid cell after the pulse application with τ = 100 ps (see Supplementary Movie 4). It shows no transverse shift because that the applied current pulse is too short to activate the skyrmion Hall effect, as shown in Fig. 4(c). Therefore, by applying a sequence of 100-ps-long pulses with a pulse spacing of 900 ps, it is possible to drive the square-shaped skyrmion moves exactly toward the +x direction without showing the skyrmion Hall effect (see Supplementary Movie 5). When τ = 200 − 500 ps, the square-shaped skyrmion shows the skyrmion Hall effect during its hopping motion (see Supplementary Movie 6).

In Fig. 4(b), the square-shaped skyrmion in the sample with Kd/K = 0.2 elongates to a rectangle-shaped skyrmion after the pulse application with τ = 100 − 200 ps (see Supplementary Movie 7). As mentioned above, a part of the domain wall forming the skyrmion is pinned by the defect line. Hence, the square-shaped skyrmion is forced to deform along the +x direction when the skyrmion Hall effect is prohibited [see Fig. 4(d)]. However, under the pulse application with τ = 300 − 400 ps, the depinned domain wall tends to propagate in both the +x and +y directions due to the skyrmion Hall effect; therefore, the square-shaped skyrmion is deformed into an L-shaped skyrmion (see Supplementary Movie 8), which is regarded as an L-shaped skyrmion as it carries a theoretical Q = 1. When τ = 500 ps, the deformation is more remarkable and complex, leading to an abnormal L-shaped skyrmion.

In Fig. 5(a), we show the time-evolution of mz corresponding to the hopping motion for various τ with Kd/K = 0.5. mz oscillates with time upon the pulse application and recovers to its initial value soon after the pulse application. Such a feature of mz signal can be utilized to electrically detect the hopping motion of skyrmion. E increases and varies with time in a regular way during the pulse application [see Fig. 5(c)], implying the skyrmion moves regularly on the grid. The variation of the numerical Q is directly related to the skyrmion deformation [see Fig. 5(e)]. Next, we study the case with Kd/K = 0.2. Both mz and E are decreased after the pulse application [see Fig. 5(b) and (d)], which indicates the rectangle-shaped and L-shaped skyrmions are stabler. It is noteworthy that the topological nature of the skyrmion remains unchanged after its deformation [see Fig. 5(f)]. Since the area of a skyrmion on the grid is an integer multiple of the minimum grid cell area, the E distribution of all possible pixelated skyrmions on the grid is discontinuous.

Fig. 5: Out-of-plane magnetization, energy, and topological charge of the system driven by current pulses with different pulse lengths.
figure 5

a Time-dependent out-of-plane magnetization mz corresponding to the current-induced hopping motion of a square-shaped skyrmion in a sample with Kd/K = 0.5 for different pulse lengths τ. K and Kd stand for the perpendicular magnetic anisotropy constants for the unmodified areas and defect lines, respectively. A current pulse of j = 100 MA cm−2 and \({{{{{{{\boldsymbol{p}}}}}}}}=-\hat{y}\) is applied, and then the system is relaxed until t = 1000 ps. b Time-dependent out-of-plane magnetization mz corresponding to the current-induced deformation of a square-shaped skyrmion in a sample with Kd/K = 0.2 for different τ. c Time-dependent total energy E of the system corresponding to (a). (d) Time-dependent E corresponding to (b). e Time-dependent numerical topological charge Q of the system corresponding to (a). f Time-dependent numerical Q corresponding to (b).

We also study the effects of j and α on the dynamics of a square-shaped skyrmion (see Supplementary Note 3). The effect of j is similar to that of τ. A large α will reduce the skyrmion Hall effect for the skyrmion hop and deformation, which leads to the current-induced formation of the rectangle-shaped skyrmion. A basic phase diagram of the system transitions from the single skyrmion hopping to the skyrmion deformation is given in Fig. 6. We point out four possible cases induced by the current pulses with different pulse lengths. First, for the samples with relatively stronger pinning strengths (Kd/K < 0.5), a weak current pulse cannot drive the square-shaped skyrmion. Namely, the square-shaped skyrmion is pinned at its initial position during and after the pulse application. For a strong current pulse, the square-shaped skyrmion will be transformed to a rectangle-shaped skyrmion by the current pulse. Second, for the sample with a moderate pinning strength (Kd/K = 0.5), a weak current pulse cannot drive the square-shaped skyrmion, but a stronger current pulse may drive the square-shaped skyrmion into a hopping motion or shrinking. Third, for the sample with relatively weaker pinning strength (Kd/K > 0.5), the square-shaped skyrmion may not be stable on the square pinning pattern. Hence, once a current pulse is applied, the square-shaped skyrmion will first depin and then shrink to a smaller round-shaped skyrmion. Such a smaller round-shaped skyrmion could be pinned again on the defect line after the pulse application.

Fig. 6: A basic phase diagram of the system transitions from single skyrmion hopping to the skyrmion deformation.
figure 6

Deformation means the square-shaped skyrmion is deformed to a rectangle-shaped skyrmion after the pulse application. Hopping means the square-shaped skyrmion hops from the grid cell at the sample center to the right nearest-neighboring grid cell after the pulse application. Pinned means the square-shaped skyrmion is pinned by the grid cell at the sample center during and after the pulse application. Shrinking and pinned means the square-shaped skyrmion shrinks to a smaller round-shaped skyrmion and is pinned on the defect line after the pulse application. Here, l = 30 nm, w = 4 nm, n = 11, and the damping parameter α = 0.3. l denotes the spacing between two adjacent parallel defect lines. w denotes the width of the defect line. n denotes the number of unit square patterns along the x and y directions. The side length of the sample equals 378 nm. A square-shaped skyrmion with the topological charge of Q = 1 is relaxed at the sample center as the initial state at t = 0 ps. A current pulse of j = 100 MA cm−2 and \({{{{{{{\boldsymbol{p}}}}}}}}=-\hat{y}\) is applied, and then the system is relaxed until t = 1000 ps. The final states are confirmed at t = 1000 ps.

Conclusions

In conclusion, we have studied the statics and dynamics of configurable skyrmions on the grid formed by orthogonal defect lines with identical spacings and reduced PMA. We find that the grid results in the pixelation of skyrmions, leading to the square-shaped, rectangle-shaped, and L-shaped skyrmions. The position and area of the square-shaped skyrmion are quantized in the unit of the grid cell, which are different to ordinary skyrmions, of which the position and size change continuously.

We numerically demonstrate that the position, size, and shape of a square-shaped skyrmion on the grid are manipulated electrically, which depend on the pinning strength, the applied current pulse, and the damping parameter. In particular, we show that the square-shaped skyrmion hops on the grid with weak pinning, and its skyrmion Hall effect can be controlled by the current pulse. Especially, the skyrmion Hall effect of the square-shaped skyrmion is perfectly prohibited by appropriately tuning parameters. The straight hopping motion of skyrmion is vital for racetrack-type memory devices. The control of the skyrmion Hall effect using a preset sequence of current pulses provides the possibility to build a logic computing device based on the transport route of skyrmions. In addition, it is possible to reduce the width of a nanotrack as wide as three grid cells since the skyrmion Hall effect is suppressed. It is highly contrasted with the case of an ordinary skyrmion, where we need to use a wider nanotrack in order to keep away a skyrmion from an edge. It is possible to shift a skyrmion by N grid cells by applying N pulses since the skyrmion relaxes to the same structure only by changing its position after the pulse is over.

Besides, we find that the current pulse drives the square-shaped skyrmion to deform on the square grid with strong pinning, which transforms the square-shaped skyrmion to a rectangle-shaped or L-shaped skyrmion in a controlled manner. It can be utilized to build a multistate memory41 or an artificial synapse59 based on different metastable topological spin textures in one sample, where topological spin textures with different mz stand for different states that can be detected by measuring magnetoresistance. It is worth mentioning that a reset function, that is, a method to transform an L-shaped skyrmion to an original square-shaped skyrmion may be required for the multistate memory and artificial synapse applications. Such a reset function can be achieved by applying an out-of-plane magnetic field pulse in our system (see Supplementary Note 4). Indeed, one can also reset the system by erasing the entire state and then nucleate a square-shaped skyrmion.

Our results give a deeper understanding of the complex dynamics of a skyrmion on a nanoscale grid formed by defect lines with modified magnetic anisotropy. It will be straightforward to generalize our results to the systems with artificial nanoscale triangular and honeycomb grids. However, the square-grid pinning pattern is most efficient to prohibit the skyrmion Hall effect and easily manufacturable, which is due to the fact that a typical lithography scanner system works in a way that favors horizontal and vertical scanning directions. For this reason, the fabrication of the triangular or irregular shape may result in obvious polygon edges. Such an effect may significantly reduce the pinning pattern quality when the resolution goes down to a few nanometers. Hence, the square-grid pinning pattern and rectangle-grid pinning pattern (see Supplementary Note 5) may be the most reliable choices. Besides, the advantage of using the square-grid pinning pattern to guide the skyrmion motion is that the skyrmion can be delivered toward different directions by controlling the driving current direction, current density, and pulse length. Such a feature may not be possible on other pinning patterns such as the parallel defect lines.

On the other hand, we would like to point out that the square-grid pinning pattern could also serve as a platform for the study of multiple skyrmions interacting with a pinning landscape (see Supplementary Note 6), and a great many directions one could go with this system such as different kinds of driving forces18. Last, from the point of view of electronic device applications, future works on this topic may focus on the performance analysis, such as the energy expenditures of skyrmion hopping and square-to-L deformation. Our results may provide guidelines for building spintronic applications utilizing the interaction between topological spin textures and artificial pinning patterns.

Methods

Micromagnetic simulations

All spin relaxation and dynamics simulations are carried out by using the Object Oriented MicroMagnetic Framework (OOMMF) developed at NIST118. The three-dimensional spin dynamics in the FM sample is governed by the Landau-Lifshitz-Gilbert (LLG) equation augmented with the damping-like spin-orbit torque118

$$\frac{d{{{{{{{\boldsymbol{M}}}}}}}}}{dt}= -{\gamma }_{0}{{{{{{{\boldsymbol{M}}}}}}}}\times {{{{{{{{\boldsymbol{H}}}}}}}}}_{{{\mbox{eff}}}}+\frac{\alpha }{{M}_{{{\mbox{S}}}}}\left({{{{{{{\boldsymbol{M}}}}}}}}\times \frac{d{{{{{{{\boldsymbol{M}}}}}}}}}{dt}\right)\\ +\frac{u}{{M}_{{{\mbox{S}}}}}({{{{{{{\boldsymbol{M}}}}}}}}\times {{{{{{{\boldsymbol{p}}}}}}}}\times {{{{{{{\boldsymbol{M}}}}}}}}),$$
(1)

where the damping-like spin torque is generated through the spin Hall effect in the heavy-metal layer when an electric current is injected35. In Eq. (1), M is the magnetization, MS = M is the saturation magnetization, t is the time, γ0 is the absolute value of gyromagnetic ratio, α is the Gilbert damping parameter, and \({{{{{{{{\boldsymbol{H}}}}}}}}}_{{{\mbox{eff}}}}=-{\mu }_{0}^{-1}\partial \varepsilon /\partial {{{{{{{\boldsymbol{M}}}}}}}}\) is the effective field. u = (γ0)/(μ0e) (jθSH)/(2aMS) is the spin torque coefficient, p stands for the unit spin polarization direction, μ0 is the vacuum permeability constant, is the reduced Planck constant, e is the electron charge, j is the driving current density, and θSH is the spin Hall angle.

The average energy density ε contains the PMA, FM exchange, demagnetization, applied magnetic field, and interface-induced DM interaction energy terms, given as

$$\varepsilon = -K\frac{{({{{{{{{\boldsymbol{n}}}}}}}}\cdot {{{{{{{\boldsymbol{M}}}}}}}})}^{2}}{{M}_{\,{{\mbox{S}}}\,}^{2}}+A{\left[\nabla \left(\frac{{{{{{{{\boldsymbol{M}}}}}}}}}{{M}_{{{\mbox{S}}}}}\right)\right]}^{2}-\frac{{\mu }_{0}}{2}{{{{{{{\boldsymbol{M}}}}}}}}\cdot {{{{{{{{\boldsymbol{H}}}}}}}}}_{{{\mbox{d}}}}\\ -{{{{{{{\boldsymbol{M}}}}}}}}\cdot {{{{{{{\boldsymbol{B}}}}}}}}+\frac{D}{{M}_{\,{{\mbox{S}}}\,}^{2}}\left[{M}_{z}\left({{{{{{{\boldsymbol{M}}}}}}}}\cdot \nabla \right)-\left(\nabla \cdot {{{{{{{\boldsymbol{M}}}}}}}}\right){M}_{z}\right],$$
(2)

where K, A, and D are the PMA, FM exchange, and DM interaction energy constants, respectively. B is the applied magnetic field, and Hd is the demagnetization field. n is the unit surface normal vector. Mz is the out-of-plane component of M. The default parameters used in this work are34,35,38: γ0 = 2.211 × 105 m A−1 s−1, α = 0.05 ~ 0.5, MS = 580 kA m−1, K = 0.8 MJ m−3, A = 15 pJ m−1, D = 3 mJ m−2, and θSH = 0.2. The mesh size is set as 1 × 1 × 1 nm3 in all simulations, guaranteeing both accuracy and efficiency.