{'fraction_non_alphanumeric': 0.025526086415141327, 'fraction_numerical': 0.007927613829743078, 'mean_word_length': 4.303543913713405, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Writing Skyrmions with a Magnetic Dipole

We demonstrate numerically on large spin lattices that one can write skyrmions in a thin magnetic film with a magnetic dipole of a few tens of nanometer in size. Nucleation of non-chiral skyrmions as well as chiral skyrmions formed by the Dzyaloshinskii-Moriya interaction has been investigated. Analytical model is developed that agrees with numerical results. It is shown that skyrmions can be written though a number of scenarios that depend on the experimental technique and parameters of the system. In one scenario, that branches into subscenarios of different topology, the magnetic dipole on approaching the film creates a skyrmion-antiskyrmion pair. As the dipole moves closer to the film it induces collapse of the antiskyrmion and creation of a non-zero topological charge due to the remaining skyrmion. In a different scenario the dipole moving parallel to the film nucleates a skyrmion at the boundary and then drags it inside the film. Possible implementations of these methods for writing topologically protected information in a magnetic film are discussed.

With an eye on a skyrmionic memory and data processing one of the most challenging tasks in this field is writing and manipulating skyrmions in a magnetic film. In a film with perpendicular anisotropy multiskyrmion topological structures randomly evolve from stripe domains on increasing the normal component of the magnetic field 20 . For practical applications one has to be able to generate and manipulate individual skyrmions. It has been demonstrated that skyrmions can be created, annihilated and moved by current-induced spinorbit torques 6,21,22 . Individual skyrmion bubbles can also be generated by pushing elongated magnetic domains through a constriction using an in-plane current 5,23 . Small skyrmions can be written and deleted in a controlled fashion with local spin-polarized currents from a scanning tunneling microscope 24 . It has been also shown that light-induced heat pulses of different duration and energy can write skyrmions in a magnetic film in a broad range of temperatures and magnetic fields 25 .
Recently, it has been experimentally demonstrated and confirmed through micromagnetic computations that stripe domains in a film can be cut into skyrmions by the Figure 1: Geometry of the problem studied in the paper: A magnetic dipole with the magnetic moment m approaches a film where the exchange-coupled spins are aligned perpendicular to the film by the external field B0. At some critical distance to the film, the dipole nucleates a skyrmion by inducing local reversal of the spin field. As will be seen in the computation, the initial bifurkation occurs with a conservation of the topological charge, Q = 0, by nucleating a skyrmion-antiskyrmion pair. By moving closer to the film the dipole forces the antiskyrmion to collapse, leaving behind a non-zero topological charge Q = 1 of the remaining skyrmion. magnetic field of the tip of a scanning magnetic force microscope (MFM) 26 . In this paper we are asking whether the field of a nanoscale magnetic dipole can nucleate a skyrmion in a controllable manner in a uniformly magnetized film, see Fig. 1. We find that it is definitely possible but, probably, not with the use of a typical MFM tip, which is too small to provide enough Zeeman energy to nucleate a skyrmion in a typical ferromagnetic film.
Instead one should use greater-size magnetic nanoparticles of the kind used in nanocantilevers for mechanical magnetometry 27 .
For a rough estimate, consider a magnetic dipole of the average size R at a distance h R from a 2D film when it will generate the highest field in the film. Let 2E Z be the gain in the Zeeman energy per spin of the film due to the local reversal of the spin-field by the field of the dipole. That reversal would generally occur in the area of linear size R, providing the total energy gain of order 4πE Z (R/a) 2 , where a is the lattice constant. To nucleate a skymion the gain in the Zeeman energy must overcome the ground state exchange energy of the skyrmion, 4πJ, where J is the exchange energy per spin of the film. Equating the two energies one obtains R/a ∼ J/E Z . The ratio J/E Z would typically be in the ballpark of 10 4 − 10 6 . Thus the required size of the dipole is likely to be over 30nm, that is, greater than the typical curvature radius of a modern MFM tip.
The above estimate is confirmed by our simulations and analytical results presented below. However, the manner in which skyrmions are nucleated by the magnetic dipole turns out to be more complicated than a simple reversal of the spin-field in a finite area of the film. The complification is due to the fact that the topological charge of the spin-field cannot be trivially changed from Q = 0 in the uniformly magnetized film to Q = 1 in the presence of the skyrmion. Consequently, as is seen in our numerical experiment, nucleation of the skyrmion goes through a few non-trivial stages. In the first stage the magnetic dipole, on approaching the film, nucleates a skyrmion-antiskyrmion pair with zero topological charge. Depending on parameters the pair can be either separated in space or the antiskyrmion can be centered inside the skyrmion in a donut-like structure. In the second stage, as the dipole continues to approach the film, the antiskyrmion collapses (or is pushed out of the donut and then collapses), leaving behind the non-zero topological charge of the skyrmion.
It is important to emphasize that the above dynamics of the nucleation of a skyrmion by the magnetic dipole with the change of topology would not exist within continuous 2D spin-field exchange model that conserves topological charge. For that reason, instead of using micromagnetic theory, our simulations have been done by minimizing the energy of interacting spins in a large square lattice. In this case, which resembles experiments with real materials, the presence of the finite lattice spacing, a, breaks the scale invariance of the 2D exchange interaction that is responsible for the conservation of the topological charge 28 . Still the topological charge remains conserved with good accuracy for spin structures that are large compared to the lattice spacing, which corresponds to the continuous limit. By looking how the structures evolve down to the lattice scale we have been able to observe the abrupt change of the topological charge from zero to one when the collapsing antiskyrmion reaches the atomic size. This paper is organized as follows. The model and numerical method are explained in Section II. Numerical results on the creation of skyrmions in non-chiral films are presented in Section III. In Section IV we consider creation of skyrmions by the magnetic dipole at the boundary of the film. Nucleation of skyrmions by a magnetic dipole in a chiral system with the DMI is discussed in Section V. Analytical model that agrees with numerical results is presented in Section VI. Our results, numbers, and suggestions for experiments are discussed in Section VII.

We consider the Hamiltonian
where the first term represents spin-spin interactions in a 2D lattice and the second term represents Zeeman interaction of the spins with the magnetic field. The latter consists of a constant external transverse field, b 0 , and the field of the magnetic dipole, b d , with B 0 = gµ B Sb 0 and B d = gµ B Sb d being the corresponding Zeeman energies per spin S of the unit cell of the film and g being the gyromagnetic factor associated with S. We approximate the magnetic dipole by a point magnetic moment, m = me z , positioned at the distance h below the film and directed opposite to the magnetization of the film, see Fig. 1. The field of the dipole is given by where r is the radius-vector originating at the dipole. Writing for the points of the film r = (x, y, h), with r = ρ 2 + h 2 and ρ = (x, y), one has for the components of the dipole field in the film We used discretized version of these expressions to obtain B di acting on the i-th spin in the film. The field of the dipole at the closest point in the film, r = (0, 0, h), that equals has been used to form a dimensionless parameter B h /(JS 2 ). Its value at a fixed h depends on the magnetic moment, m, of the dipole. At a given h and B 0 we find the critical values of B h /(JS 2 ) that correspond to each stage of the nucleation of the skyrmion. Our numerical method, that is described in detail in Ref. 29, consists of the minimization of the total energy of interacting spins in a square latice of size up to 500 × 500. It involves successive rotations of spins at lattice sites i in the direction of the effective field H eff,i = −δH/δS i (with H being the Hamiltonian of the system) with the probability α and overrelaxation (i.e., flipping spins around H eff,i ) with the probability 1 − α. The first operation reduces the energy of the system while the second serves to better explore the phase space of the system via conservative pseudo-dynamics, with α playing the role of the relaxation constant. The fastest energy minimization towards the deepest minimum is achieved for α 1. We use α = 0.01. Together with computing the spin configuration that minimizes the energy, we also compute topological charge by using discretized form of the expression Skyrmions have Q = 1 while antiskyrmions have Q = −1. The skyrmion size λ has been extracted from the numerical data as 28 with s iz = −1 in the background and s iz = 1 at the center of the skyrmion. For Belavin-Polyakov skyrmions 30 one has λ m = λ for any m. We used λ eff = λ 4 to represent skyrmion size computed numerically.

III. NUCLEATION OF NON-CHIRAL SKYRMIONS BY A MAGNETIC DIPOLE
In this section we consider the simplest case of the spin Hamiltonian, where J ij is the nearest-neighbor exchange interaction with the coupling constant J. In numerical work we use s = 1 and incorporate the spin of the lattice site S into the exchange constant JS 2 → J.
In the computations, a downward stabilizing field B 0 J was applied, so that s z ∼ = −1 far from the magnetic dipole, the distance h was fixed and B h was increased in small steps starting from zero, at each step minimizing the energy of the system. The maximum value of s z was monitored. The value of B h at which s z,max became positive was recorded as B h,1 . Also the value s z = s z,center at ρ = 0 (just above the magnetic dipole) was monitored. The value of B h at which s z,center became positive was recorded as B h,2 . The value of B h at which Q = 0 changed to Q = 1 (creation of a skyrmion) was recorded as B h,Q .
The computations could also be done by approaching the magnetic dipole to the film, i.e., keeping m = const and decreasing the distance h that also leads to the increasing of B h . This would better reflect real experi-ments but the method described above is more convenient numerically as the region of the film influenced by the magnetic dipole is constant. The phase diagram of critical parameters at which the skyrmion is created can be recomputed in any desirable form for a concrete experiment.
In the first scenario illustrated in Fig. 2, at a certain value of B h the instability of the spin configuration in which all spins look down is observed: The magnetization of the film becomes inverted near ρ = 0 with a formation of the asymmetric skyrmion-antiskyrmion pair. In this scenario B h,1 = B h,2 . Further increase of B h leads to the collapse of the antiskyrmion and the abrupt change of the topological charge from 0 to 1 at B h = B h,Q . In the second scenario, a cylindrically symmetric donut with Q = 0, containing an antiskyrmion inside a skyrmion, see Fig. 3, is formed via continuous rotation of the spins at ρ ∼ h under the combined influence of the vertical and in-plane components of the magnetic field created by the magnetic dipole (see Fig. 1). For the donut one still has s z,center ∼ = −1, thus B h,1 < B h < B h,2 . Upon further increasing B h , the outer radius of the donut increases while its inner radius representing the size of the antiskyrmion decreases. At some B h = B h2 = B h,Q , the antiskyrmion collapses leaving only a skyrmion with Q = 1 in the film.
The skyrmion-nucleation phase diagram containing critical branches of B h (h) (multiplied by h/a for better presentation) is shown in Fig. 4. The first scenario is realized for smaller h while the second scenario is realized for larger h. There is a relatively narrow region of h in which a combined scenario with B h,1 < B h,2 < B h,Q is realized. Here, first a donut is created and then it loses its symmetry via expulsion of the antiskyrmion to the periphery of the skyrmion, where it collapses upon further increase of B h . All scenarios are shown schematically near the bottom of the figure.
The same data are represented in Fig. 5 in the form of the dependence of h Q (the distance at which the skyrmion is created) on B h / JS 2 (h/a) 3 = gSµ 0 µ B m/ 2πa 3 JS 2 ∝ m, see Eq. (6). This figure corresponds to the experimental situation in which a magnetic dipole of a fixed strenth m is approaching the film.

IV. NUCLEATION OF SKYRMIONS AT THE EDGE OF THE FILM
Here we study the nucleation of the skyrmion by the magnetic dipole moving parallel to the film and crossing its boundary from outside, starting at x < 0 at a distance satisfying |x| h. This method is more efficient than the method considered above as it requires a smaller dipole field B h for the skyrmion nucleation. As the magnetic dipole is approaching the edge of the film and crossing it at x = 0, the topological charge Q is gradually increasing from zero (see Fig. 6). Due to the boundary, close to it Q is not quantized and can take any value 0 ≤ Q ≤ 1. At x ∼ h, there is a bifurcation: If B h is too weak, the skyrmion is not created and Q quickly returns to zero. When B h exceeds a certain threshold, the skyrmion is created and Q approaches 1 as the magnetic dipole continues to move above the film. The bifurcation value of B h is recorded as B h,Q .
The resulting values of B h,Q (multiplied by h/a) are represented in Fig. 7 together with the data obtained in the previous section by increasing B h . One can see that in terms of the required magnetic moment the method  based upon driving the dipole over the edge parallel to the film is more efficient than the method based upon moving the dipole in the direction normal to the film far from edges.

V. NUCLEATION OF CHIRAL SKYRMIONS BY A MAGNETIC DIPOLE
In this section we consider a film with the Dzyaloshinskii-Moriya interaction (DMI) and add (10) to the exchange interaction. This Hamiltonian describes Bloch-type DMI of strength A in a non-centrosymmetric crystal 4 . For the Néel-type DMI it should be replaced The spinfields in the Néel-type (γ = 0) and Bloch-type (γ = π/2) skyrmions are shown in Fig. 8.
In the case of A J, the DMI only insignificantly changes the skyrmion nucleation condition. For stronger DMI, there is a difference for different types of the DMI, Bloch or Néel, and for different signs of A in the Néel case. In the geometry shown in Fig. 1, the magnetic dipole creates the Néel-type skyrmion with an outward looking spin-field. Consequently, the Néel-type DMI with A > 0 helps the skyrmion nucleation, thus the corresponding values of B h are lower than in the pure-exchange model. On the contrary, for A < 0, the DMI works against the magnetic dipole and a greater B h is required to nucleate a skyrmion. For the Bloch-type DMI, the initial instability happens early, so that B h,1 is lower than in the pure-exchange model. However, it is difficult to finish the process and create a skyrmion because B h,Q is significantly higher than in the pure-exchange model. Thus, a strong Bloch-type DMI is undesirable for the skyrmion creation by the magnetic dipole.
Notice that in the absence of the stabilizing field B 0 the DMI favors a laminar domain structure even in the absence of the DDI. Thus, the stronger DMI, the stronger B 0 is required to create a uniformly magnetized state. This, in turn, requires a stronger magnetic dipole to nucleate a skyrmion, making strong DMI of any type unfavorable for this purpose. A special case is when B 0 is chosen such that the uniform state is on the verge of stability. However, in a sample of finite dimensions the loss of stability of the uniformly magnetized film on decreasing B 0 always occurs at the edges of the film, while in the middle the uniform state remains rather stable. Driving the magnetic dipole parallel to the film and crossing its boundary, that worked well for the pure-exchange model, may be also problematic for a strong DMI. When the uniform state was on the verge of breaking into domains, the moving magnetic dipole in our simulation was creating a trailing finger domain instead of a skyrmion.

VI. ANALYTICAL MODEL
In this section we develop analytical model of the instability of the uniform state in the presence of the uniform stabilizing field B 0 and the opposite field of the magnetic dipole that explains quantitatively our findings for a non-chiral film. This instability is due to the normal component of the dipole's field, so we discard the inplane components. Using a continuous spin-field model obtained by replacing i ⇒´d 2 ρ/a 2 and writing one obtains the Zeeman energy due to the dipole as while Zeeman energy due to the external field is The continuous counterpart of the exchange energy due to the development of the tranverse components of the spin field is One kind of instability observed in numerical experiment consists of tilting the spins in the vicinity of the dipole, all in one direction. Without limiting generality, one can consider the x-axis to be the direction of the tilt, i.e., s y = 0, s x = f (ρ), where f (ρ) is a trial function that we choose in the form with α being an unknown exponent to be determined. This results in the following expressions for the above energies: Instability occurs when with the instability threshold given by the equal sign. It provides the critical value of the dipole's field B h (h, α) that has to be minimized with respect to α. The analysis is facilitated by the reduced variables ForB 0 1, one has α close to 1/2 that simplifies the analytics. In this region one obtains In the opposite limitB 0 1, one has α 1 and the minimization simplifies again, leading tõ The two limiting formulas above can be combined into one formulã that is practically indistinguishable from the result of the numerical minimization of B h (h, α). Eq. (23) has been used to plot theoretical solid lines in Fig. 4. They are in a very good accord with the numerical result for B h,1 .
The region on the right in Fig. 4 described by Eq. (22) forB 0 1 is the most important one because B 0 must be sufficiently large to prevent the magnetization of the film from breaking into magnetic domains and because of the limitation on the value of the magnetic moment of the dipole that requires h/a 1. Critical fields corresponding to other stages of the nucleation process, that occur in a strongly non-uniform magnetization phase, are more difficult to obtain analytically, although by order of magnitude they are in the same ballpark as the first critical field. The model with the DMI turns out to be more challenging than the nonchiral model. Contributions from the DMI from the trial function of Eq. (15) vanish, pointing to a more complex instability mode.

VII. DISCUSSION
One necessary condition of nucleating a skyrmion is that the field of the dipole exceeds the external field stabilizing the uniform state, see Eq. (22). In the numerical and analytical work we treated the magnetic dipole at a distance h from the film as a point particle. It is clear, however, that by order of magnitude all our results must be correct for a dipole of size R ∼ h. In fact h ∼ R would be best for providing the highest field of the dipole in the film. Skyrmion nucleated by such a dipole must be of a size λ ∼ h ∼ R.
To estimate the dimensions of skyrmions that can be nucleated in a 2D film by a magnetic dipole one has to equate B h determined by Eqs. (21) or (22) to the field of the dipole given by Eq. (6). In both cases one obtains h/a ∼ λ/a ∼ (JS 2 /B h ) 1/2 . In accordance with the qualitative reasoning presented in the Introduction, JS 2 /B h is the ratio of the exchange energy and Zeeman energy of the dipole per spin of the film, which is typically in the ballpark of 10 4 − 10 6 . This gives λ/a ∼ 10 2 − 10 3 . It does not mean, however, that a skyrmion of that size will remain in the film after the dipole is moved away. The skyrmion created by the dipole will either collapse or evolve towards a certain equilibrium size depending on whether skyrmions of a stable size exist due to all interactions present in the film.
Note that in the numerical work we studied B h /(JS 2 ) and B 0 /(JS 2 ) greater than the ratios typically achieved in real experiments unless one works with a low exchange system at low temperatures. For the reason explained above the smaller values of these ratios would generate larger skyrmions whose study would require computation on spin lattices of impractically large size. This, however, in no away reduces the applicability of our numerical results to real experiments because the latter would follow the same instability patterns and the same scaling with parameters. Analytical formulas provided in the paper, which agree well with numerical results, provide guidance for experiments with real films and real dipoles.
In our treatment we neglected a number of interactions that could be important for stabilizing skyrmions nucleated by a magnetic dipole but which play lesser role in the nucleation process. Among them are dipole-dipole interaction (DDI) and magnetic anisotropy (crystal field). In the first approximation the omission of the DDI is justified by the necessity to apply an external field that prevents the system from breaking into magnetic domains. Such a field, by definition, must be greater than dipolar fields in the film and so should be the field of the magnetic dipole used. We also have assumed that the magnetic anisotropy field is small compared to the external field. Generalization that takes into account the omitted interactions is straightforward but it would make the problem much messier because the nucleation threshold would depend on a greater number of parameters. For simplicity we talked about a single atomic layer of spins. The generalization to n atomic layers consists of replacing the exchange constant J with Jn as long as the condition an < h is satisfied.
Besides the principle possibility of writing and manipulating skyrmions with a magnetic dipole, our other interesting finding is the manner in which skyrmions are nucleated by the magnetic dipole. Stages of this nontrivial process are governed by topology that prohibits the change of the topological charge of the spin-field that is a smooth function of coordinates. The latter is dictated by the exchange interaction, which is the dominant interaction in the system. To change the topology one needs to reverse a single spin with respect to its neighbors, which costs large exchange energy. This is observed in the numerical experiment. It shows that the instability begins with the formation of the skyrmion-antiskyrmion pair carrying zero topological charge. On further approaching the film the dipole forces the antiskyrmion to collapse, abruptly changing the topological charge from zero to one due to the remaining skyrmion.
The method of writing skyrmions proposed in this paper should not be difficult to test in real experiments if one chooses parameters right in accordance with our suggestions. Besides its potential for applications, it must be also interesting to observe the non-trivial stages of skyrmion nucleation by the magnetic dipole seen in numerical experiments.

VIII. ACKNOWLEDGEMENTS
This work has been supported by the grant No. OSR-2016-CRG5-2977 from King Abdullah University of Science and Technology.