Spacetime magnetic hopﬁons: from internal excitations and braiding of skyrmions

Spatial topology endows topological solitons, such as skyrmions and hopﬁons, with fascinating dynamics. However, the temporal dimension has so far provided a passive stage on which topological solitons evolve. Here we construct spacetime magnetic hopﬁons: magnetic textures in two spatial dimensions that when excited by a time-periodic drive develop spacetime topology. We uncover two complementary construction routes using skyrmions by braiding their center of mass position and by controlling their internal low-energy excitations. Spacetime magnetic hopﬁons can be realized in nanopatterned grids to braid skyrmions and in frustrated magnets under an applied AC electric ﬁeld. Their topological invariant, the spacetime Hopf index, can be tuned by the applied electric ﬁeld as demonstrated by our collective coordinate modeling and micromagnetic simulations. The principles we have introduced to actively control spacetime topology are not limited to magnetic solitons, opening avenues to explore spacetime topology of general order parameters and ﬁelds.


I. INTRODUCTION
Topological solitons are robust localized structures actively studied by disciplines ranging from cosmology [1,2] and particle physics [3][4][5][6] to optics [7][8][9][10] and condensed matter [11][12][13].Despite the differences across the many systems where they form, topological solitons exhibit enhanced stability which is due to the nontrivial topology of their structure in space.In contrast, the temporal dimension does not play a role in defining soliton topology.
Topological solitons in magnets include skyrmions and hopfions [14][15][16][17][18][19].The skyrmion topology is determined by the number of times the magnetization wraps the unit sphere.On the other hand, the hopfion structure rests on curves in space where the magnetization points in the same direction, its preimages [20][21][22][23][24]. How often any two preimages wind around each other is counted by the Hopf index [20], the invariant that characterizes hopfion topology.Although skyrmions and hopfions exhibit fascinating dynamics, it is rooted exclusively in their spatial topology, a property of their spatial structure that they carry as they evolve in time.However, robust structures in time, including spacetime crystals in magnets, have been recently reported [25][26][27][28][29].These reports motivate the question on the existence of topological solitons with time involved fundamentally and inextricably.Here we turn to magnetic textures in two spatial dimensions and their time evolution to construct topological magnetic solitons in spacetime.Since their nontrivial spacetime topology is characterized by an extension of the Hopf index, we name them spacetime magnetic hopfions.

A. Spacetime topology construction
To construct spacetime magnetic hopfions we exploit the topology of regular hopfions.
A hopfion in three spatial dimensions results from the following sequence of operations on a single skyrmion in two spatial dimensions.Stack copies of the skyrmion to form a straight skyrmion tube.Keeping one end of the tube fixed, twist the top end by an angle of 2π about the tube axis which modifies the internal structure of the skyrmion along the tube.The ends of the twisted tube are identical.Therefore, they can be identified by bending the tube and gluing together the matching ends.A three-dimensional hopfion has been formed.If the tube had been twisted n times by 2π, the resulting hopfion would have had a Hopf index equal to nQ, where Q is the topological charge of the starting skyrmion.
In the preceding abstract construction, the skyrmion tube was built by stacking skyrmion copies.It might as well have been generated from a skyrmion in two spatial dimensions whose texture is twisted as it evolved in time (see Fig. 1a).Moreover, such time evolution must be periodic so the temporal dimension, as implied by the gluing of the tube ends, has the topology of a circle (S 1 ).Equivalently, we require a skyrmion whose helicity, namely, the angle between the radial and the in-plane magnetization direction, periodically rotates in time.Therefore, to construct a spacetime magnetic hopfion we need a two-dimensional skyrmion with a timeperiodic rotating helicity.
There is an alternative route to construct spacetime magnetic hopfions.Instead of one, it requires (at least) two spatially separated skyrmions.By braiding the skyrmions' center of mass positions we induce timeperiodicity.Note that over the span of one period the skyrmions swap positions (see Fig. 1b).After identifying the swapped and initial skyrmion configurations, the resulting spacetime structure is topologically equivalent to a 2π-twisted skyrmion tube with its ends identified, and therefore to a spacetime magnetic hopfion.Spacetime magnetic hopfions constructed from timeperiodic, two-dimensional skyrmionic textures, as described above, have nontrivial spacetime topology.The topological invariant suitable for their characterization is the spacetime Hopf index where A e is the emergent gauge field satisfying B e = ∇ × A e , B e is the emergent magnetic field given by , with m the normalized magnetization, and i, j, k ∈ {x, y, t}.While the spatial integration is over the entire x-y plane, time is integrated over one period T .
In the following, we discuss how to concretely realize both routes to construct spacetime magnetic hopfions: by controlling the internal low-energy excitations (rotating helicity) of a single skyrmion, and by braiding the center of mass positions of multiple skyrmions.

B. Route 1: single skyrmion internal excitations
One route to construct spacetime magnetic hopfions relies on making the skyrmion helicity η time-periodic, i.e., η(t) = η(t + T ), where T is the period.However, the skyrmion-hosting magnetic material typically fixes the helicity at a value that is energetically favorable.Therefore, we first need to inject energy into the system, which will activate the internal excitations of the skyrmion and perhaps provide a way of controlling the helicity.These internal excitations might introduce unwanted multiplyperiodic time dependence or, even worse, destabilize and eventually destroy the skyrmion itself.A more targeted strategy is to identify a class of skyrmion-hosting materials where the helicity is among the lowest-energy excitations.Even better, the lowest-energy one with vanishing excitation energy: a Goldstone mode.
The skyrmion helicity is known to be a Goldstone mode in frustrated magnets [30][31][32][33].Therefore, in the absence of energy injection and dissipation, energy conservation enforces the skyrmion size to remain constant while allowing the helicity to rotate at a constant angular frequency.Another crucial property of frustrated magnets is that noncollinear magnetic textures, such as skyrmions, induce electric polarization P [33][34][35].An applied electric field E couples to the electric polarization as E • P .This coupling provides a convenient, energyefficient way to use a time-dependent applied electric field to control the magnetic skyrmion and hence, as we show below, its helicity.Aiming to describe a broad class of frustrated magnets, we use the following rescaled micromagnetic energy functional with adimensionalized external magnetic and electric fields B and E (see Methods).In the following, we set B = ẑ and assume a thin film sample geometry.The interplay of the quadratic and quartic exchange terms captures the details of the competing microscopic exchange interactions.The competing exchange terms give rise to a length scale, which, in the presence of a moderate outof-plane magnetic field, stabilizes skyrmions [31].Noncollinear magnetic textures, e.g.skyrmions, induce the electric polarization which couples to the applied electric field.The coupling has the form of an effective Dzyaloshinskii-Moriya interaction (DMI): Thus, the electric field allows the direct manipulation of the strength and sign of the effective DMI.For an electric field applied along the direction perpendicular to the thin film, the E • P coupling breaks rotational symmetry and provides control over the skyrmion helicity.Thus, this coupling allows an AC electric field to drive the frustrated magnet's magnetization dynamics and activate the helicity mode.
To model the electric-field-driven magnetization dynamics of a skyrmion we utilize two complementary approaches: micromagnetic simulations and collective coordinates.Our micromagnetic simulations employ the above micromagnetic energy functional, Eq. ( 2), together with the Landau-Lifshitz-Gilbert (LLG) equation (see Methods).In the collective coordinate modeling we focus on the two most relevant degrees of freedom: the skyrmion helicity η and, as a proxy for its canonically conjugate variable, the radius R. We derive their generalized Thiele equations, two coupled first-order nonlinear differential equations, which govern the joint skyrmion helicity and radius-driven dynamics, and we solve them numerically (see Methods).Both modeling approaches allow us to include energy injection from the driving AC electric field and energy dissipation from Gilbert damping, as expected in magnetic materials.Below, we show how to construct a spacetime magnetic hopfion by controlling the skyrmion dynamics driven by an alternating electric field.
An applied AC electric field E(t) = E 0 cos(ωt)ẑ drives the skyrmion dynamics.In this case, the electric field coupling induces a cosine helicity dependence, i.e.E•P ∝ cos η.After the initial transient, the skyrmion dynamics reaches a time-periodic steady state with the same period T = 2π/ω of the driving AC electric field.The top row in Fig. 2 shows selected snapshots of the skyrmion texture during such a steady state obtained from micromagnetic simulations.The helicity executes a full rotation during one period of the applied AC electric field signaling the formation of a spacetime magnetic hopfion.
Further understanding of the driven helicity rotation follows from the micromagnetic energy, Eq. ( 2), depicted in the bottom row of Fig. 2 as a function of the collective coordinates, i.e. the skyrmion radius R and the helicity η.We find it convenient to plot the energy on the R cos η − R sin η plane as it reflects the rotational invariance of the system in the absence of the electric field.The energy increases as the skyrmion shrinks below its equilibrium radius due to the quartic exchange interaction.In the presented collective coordinate model this yields an unphysical "horn"-shaped divergence at R = 0, which is an artifact of our skyrmion profile approximation for small radii.As the skyrmion expands beyond its equilibrium radius, the energy also increases due to the Zeeman term: −B • m.Thus, there results an energy minimum "trough."During one period the energy landscape rocks back and forth about the R cos η = 0 line, such that the global energy minimum is at η = π (η = 0) for E 0 > 0 (E 0 < 0).The amount of tilting is proportional to the electric field strength.The skyrmion's collective coordinates temporal evolution is represented by the green dot.The direction of the helicity rotation is uniquely defined by the applied drive, a feature that can be understood from the Thiele equations (see Methods for details) where α is the damping parameter and the functions c 1 , . . ., c 5 depend on the collective coordinates.η0 (R) is the helicity rotation speed in the limit of E 0 = 0 and zero damping.In this limit, the magnetic energy U does not depend explicitly on the helicity (it is a Goldstone mode), and attains its minimum at the critical radius R * .Therefore, the Thiele equations decouple and reduce to Ṙ = 0 while η = η0 (R) becomes only a function of R and swaps sign at a critical skyrmion radius R * .For R < R * , the helicity evolves clockwise (decreases, η0 < 0), while for R > R * , it evolves counterclockwise (increases, η0 > 0), see Supplementary Information.In the presence of small damping and for E 0 = 0 the radius decreases to R * and the speed of the helicity rotation decreases to zero.The electric field drives the helicity rotation actively and compensates for the damping.
To investigate the conditions for helicity rotation required for a spacetime magnetic hopfion, we solved the Thiele equations for a range of electric field amplitudes E 0 and frequencies ω.From the steady-state solutions we built the phase diagram in Fig. 3a.In dark pink (dark green), we show solutions for which the skyrmion helicity rotates monotonically clockwise (counterclockwise), and in light pink (light green) the solutions for which the skyrmion helicity performs a non-monotonic but overall clockwise (counterclockwise) rotation.Below the pink region, the electric field amplitude is too low to induce a helicity rotation, while between the pink and dark green regions, the dynamics of the system is complex, and the helicity rotations do not synchronize with the electric field oscillation frequency.Helicity rotation solutions, the colored regions, cluster around two "lobes." In the leftmost lobe, dominated by counterclockwise helicity evolution (dark and light green regions), the Thiele equations predict the formation of spacetime magnetic hopfions with spacetime Hopf index H = −1.They form in the vicinity of the Kittel resonance frequency ω res .Since our model does not include dipolar interactions, ω res ∝ B z ; in dimensionless units, having set B z = 1, ω res = 1.Around the Kittel resonance frequency and for high E 0 energy injection supersedes dissipation.This imbalance is reflected in Thiele equations solutions with unphysically diverging skyrmion radii, signaling that the collective coordinate model is no longer adequate in this resonance region.While micromagnetic simulations of skyrmions in this region do not show diverging radii, they reveal spin wave emission and more complex skyrmion distortions.Even though the skyrmion helicity remains time-periodic, the resonance effects tend to disrupt the time periodicity of the skyrmion profile and thus the spacetime magnetic hopfion formation in this region.Nevertheless, in the rest of the leftmost lobe, the Thiele equations and micromagnetic simulations are in good agreement, as exemplified by the (solid and dashed) dark green trajectories in Figs.3b, d, and e.We conclude that in the leftmost lobe a low electric field amplitude E 0 and ω sufficiently far from ω res ensure a moderate energy injection-dissipation imbalance and thus guarantee the formation of spacetime magnetic hopfions with H = −1.
The rightmost lobe comprises only clockwise helicity evolution (dark and light pink regions) corresponding to spacetime magnetic hopfions with spacetime Hopf index H = +1.Here, resonance effects are absent, so the Thiele equations solutions and micromagnetic simulations are in good agreement, see e.g. the (solid and dashed) dark pink trajectories in Figs. 3 c,d, and e. Animations of the motion of the collective coordinates and the energy landscape, as well as the micromagnetics simulations, for both selected points shown in Fig. 3, are shown in the supple-mentary movies.The energy injection rate is balanced by or slightly below the dissipation rate.Therefore, due to the balanced injection-dissipation ratio (see Supplementary Information), the absence of resonant effects, and a sizeable range of electric field amplitude and frequency, the rightmost lobe is an attractive region for the experimental realization of spacetime magnetic hopfions with H = +1.A noteworthy feature of the right lobe is that the regions where the helicity evolution is monotonic (dark pink) and non-monotonic (pink) are separated by a straight line.This straight line coincides with Thiele equations solutions for which the maximum radius attained during a helicity rotation cycle equals R * (see Supplementary Information).Therefore, for values of E 0 and ω in the pink region, the skyrmion radius crosses R = R * causing the helicity to reverse direction, thus becoming non-monotonic.
The trajectories in the R cos η − R sin η plane of two selected points on the phase diagram, depicted in Figs.3b,c, have an elliptical shape.They reflect the coupled collective coordinate dynamics; helicity rotations are accompanied by skyrmion breathing, i.e. radial oscillations.When the radius is larger (smaller) than R * , Fig. 3d, the helicity increases (decreases), Fig. 3e, which corresponds to counterclockwise (clockwise) rotations.For trajectories belonging to the phase diagram's leftmost (green) lobe, as in Fig. 3b, the radius attains its maxima at η = 0, π and minima at η = π/2, 3π/2.The opposite holds for trajectories from the rightmost (pink) lobe, as in Fig. 3c, whose radius maxima are at η = π/2, 3π/2 and minima at η = 0, π.Since the helicity dependence of the micromagnetic energy comes solely from the coupling E •P ∝ cos η, the rocking of the energy landscape (see Fig. 2b) gives trajectories with R > R * access to larger values of R along the R cos η than the R sin η axis.The situation reverses for trajectories with R < R * .Therefore, the difference between these two elliptical trajectories boils down to the size of R relative to R * .
The above results confirm that spacetime magnetic hopfions are not rare and isolated, on the contrary, they can be constructed over a large range of frequencies and amplitudes of the driving electric field.Furthermore, the phase diagram in Fig. 3 provides a guide to tune between spacetime magnetic hopfions with opposite spacetime Hopf indices.

C. Route 2: multiple skyrmion braiding
An alternative construction route of spacetime magnetic hopfions follows from multiple skyrmion braiding.Braiding skyrmions requires exchanging their center of mass positions (see Fig. 1b).Controlling the position of skyrmions is crucial to many data storage and computing applications [36,37].For instance, braiding skyrmions is at the core of a recent proposal for a topological quantum computing platform [38].Therefore, the manipulation of skyrmion positions has rapidly developed and it is currently technologically advanced [14,39].
Instead of simulating the dynamics of a particular model, here we focus on characterizing the spacetime topology arising from skyrmion braiding.We designed the magnetic texture of two skyrmions whose positions orbit each other (counterclockwise and clockwise) periodically over time.The period is defined by the time it takes the skyrmions to swap their positions.We then numerically computed their spacetime Hopf index.We find that for a counterclockwise swap (as in Fig. 1b) the Hopf index is H = +1, while for a clockwise swap H = −1.
It is conceptually straightforward to generalize the above construction to accommodate an arbitrary number of skyrmions.They could be assembled into skyrmion crystals, skyrmion bags [51,52], or engineered arrangements in nanopatterned substrates [38,53].Braiding multiple skyrmions would result in spacetime magnetic hopfions with high spacetime Hopf indices.

D. Discussion
The two spacetime magnetic hopfion construction routes we have presented can be experimentally realized in various material platforms.Skyrmion braiding (construction route 2) requires controlling the skyrmion positions; this can be achieved by exploiting the experimentally reported skyrmion motion in the metallic chiral magnet FeGe [54,55], the insulating chiral magnet Cu 2 OSeO 3 [56][57][58], the van der Waals ferromagnet Fe 3 GeTe 2 [59], and in magnetic multilayers [60,61].The rotation of the skyrmion helicity (construction route 1) is expected in frustrated magnets such as the skyrmionhosting materials Gd 2 PdSi 3 [62], and GdRu 2 Si 2 [63].Alternatively, we expect it to appear in skyrmion-hosting systems with tunable or weak DMI and for dynamically stabilized skyrmions where the helicity can be actively tuned [64,65].
Our spacetime magnetic hopfion constructions rely on magnetic textures whose spatial extension is twodimensional; good approximations to this limit are the commonly fabricated thin films.Therefore, our modeling and simulations of frustrated magnets assume a thin film sample geometry, where (nonlocal) dipolar interactions, in the zero thickness limit, are well approximated by a (local) uniaxial magnetic anisotropy [66,67].Aim-ing at a simple and universal description, we have neglected anisotropies and dipolar interactions.
In frustrated magnets and multiferroics [68][69][70] it is possible that the the noncollinear magnetic texture of a single skyrmion induces electric polarization whose divergence is proportional to the bound electric charge density.While an axially symmetric skyrmion induces no net charge, it produces a spatial rearrangement of bound charge highly localized at the skyrmion core.The oscillating radius of a breathing skyrmion would make its attached bound charge oscillate and hence radiate electromagnetic waves.Consequently, measuring this electromagnetic radiation could serve as a mechanism of indirect skyrmion breathing detection.
Direct detection of spacetime magnetic hopfions calls for measuring and tracking over time skyrmion magnetic textures; suitable for this purpose are Lorentz transmission electron microscopy (TEM) [71] and electron holography [72].If the stability and time-periodic evolution of skyrmions in a particular system has already been established, it could be sufficient to just measure the helicity (construction route 1) or position (construction route 2).The skyrmion helicity can be extracted from Lorentz TEM measurements [73], and in the case of crystals or disordered ensembles of skyrmions, it can be measured using circularly polarized resonant elastic x-ray scattering [74].Skyrmion position measurements have been reported using scanning transmission X-ray microscopy (STXM) [61,75,76], magneto-optical Kerr effect (MOKE) microscopy [60,[77][78][79], and magnetic force microscopy (MFM) [80][81][82][83].

III. CONCLUSION
We have constructed spacetime magnetic hopfions.They are magnetic solitons whose spacetime structure, characterized by the spacetime Hopf index, carries nontrivial spacetime topology.We have shown two complementary construction routes that leverage the spatial topology of two-dimensional skyrmionic textures and a time-periodic drive: by skyrmion helicity rotation and by braiding skyrmions.Readily available experimental platforms to realize these construction routes of spacetime magnetic hopfions are frustrated magnets under an applied AC electric field, and chiral magnets or magnetic multilayers driven by an applied AC magnetic field.The principles we have used to construct spacetime magnetic hopfions can be applied beyond hopfions and magnetism.Other systems, where topological solitons also emerge, might include liquid crystals, superfluids, superconductors, and electromagnetic fields.We envisage the timeperiodic manipulation of solitons with low-dimensional spatial topology as a versatile method to develop highdimensional spacetime topology.This method can become a tool for the active control of spacetime topology of general order parameters and fields.
The physical constants by which our dimensionless quantities must be multiplied by to obtain their values in SI units.

IV. METHODS
The spacetime magnetic hopfions and, in particular, the electric-field-driven magnetization dynamics of a skyrmion considered in this work are modeled by the Landau-Lifshitz-Gilbert (LLG) equation [84,85] where γ is the electron gyromagnetic ratio, α is the Gilbert damping constant, and B eff = −M −1 s δU/δm is the effective magnetic field with the saturation magnetization M s .
The dimensionful energy functional is given by where I 1 and I 2 are strengths of the quadratic and quartic exchange interactions, respectively, and B (E) is the externally applied magnetic (electric) field.Noncollinear magnetic textures induce the electric polarization where a is the lattice constant and P E is the polarization density, which couples to the applied electric field.
Rescaling physical quantities as summarized in Table I leaves the theory with three parameters, the rescaled dimensionless externally applied fields and the Gilbert damping parameter, α = 0.01 in this work.Moreover, Eqs. ( 6) and ( 7) translate into Eqs.( 2) and (3) in the main text.We have solved the skyrmion dynamics subjected to a periodic electric field using two complementary approaches: micromagnetic simulations and collective coordinates.

A. Micromagnetic Simulations
For our micromagnetic simulations, we use the opensource micromagnetics simulation package MuMax3 [86] with self-written extensions for the quartic exchange interaction and the electric field term.We neglect the effects of the demagnetizing field in our simulations for consistency with the collective coordinate modeling.
We consider a single-cell thin-film sample with N = 128 cells in x and y directions.Our system is discretized in cubic cells with edge length ∆ = 0.3 I 2 /I 1 .To suppress the reflection of spin waves from the thin film edges, we set α = 1 over an area bordering the edges and extending up to 5 simulation cells into the sample.
We initialize our simulations with a skyrmion texture embedded in a ferromagnetic background and relax the system using the Minimize() function.
For the results shown in Figs. 2 and 3 we used α = 0.01, I 1 = 10 −12 J m −1 , I 2 = 10 −29 J m and M s = 10 6 A m −1 .For these parameter choices we obtain, for example, a magnetic field of 100 mT = 1.0I 2 1 /M s I 2 and a typical length scale of 31.6 nm ≈ 10 I 2 /I 1 ) for a dimensionless magnetic field of 1.0 and a dimensionless length of 10.By micromagnetic simulations, we have also confirmed that we get the same results when we rescale the parameters according to Table I.
To calculate the radii of the skyrmions, we extract the contour for which m z = 0 using the scikit-image library [87], and calculate the mean of the displacements from the center of the contour.To compute the helicities, we extract the average helicity of the points on the m z = 0 contour.

B. Collective Coordinates
In the collective coordinate modeling [88,89] of the skyrmion, we employed rescaled units.We focus on the temporal dynamics of the two most relevant degrees of freedom: the helicity η(t) and, as a proxy for its canonically conjugate variable, the radius R(t) [64].
Representing the magnetization by spherical angles, m = (cos φ sin θ, sin φ sin θ, cos θ), a rotationally invariant skyrmion texture centered at the origin of the xy plane is parametrized by its in-plane angle φ = φ(η(t)) and its profile function θ = θ(R(t)) which depend only on the skyrmion's helicity and radius, respectively.We assume that the film thickness d is sufficiently small such that magnetic textures can be considered uniform in the z-direction.
In this case, the effective equations of motions of the collective coordinate vector ξ = (R, η) read G ij ξj − αΓ ij ξj + F i = 0 with the elements of gyrotropic G and dissipative Γ tensors, and generalized force F given by Only the generalized forces depend directly on the applied electric and magnetic fields.For symmetry reasons, the antisymmetric gyrotropic tensor has only one independent non-vanishing tensor element, i.e.G Rη = −G ηR and G RR = G ηη = 0, and the dissipative tensor is diagonal, i.e.Γ ηR = Γ Rη = 0.The effective equations of motion for the skyrmions radial's and helicity's temporal evolution become To solve Eq. ( 9) we use the following ansatz [90,91] for the skyrmion's in-plane angle φ and its profile function where ρ = x 2 + y 2 and ψ = arctan(y/x) are the radial and angular polar coordinates, respectively.The skyrmion vorticity m is taken to be 1 in this work, and w characterizes the domain wall width of the skyrmion's profile.We find that for a domain wall width of w = 1.4,this ansatz approximates well the skyrmion obtained by micromagnetic simulations for both cases: in the relaxed state when the electric field is absent, as well as for excited skyrmions upon stimulation with the electric field.Using this ansatz, the remaining tensor elements are independent of the skyrmion's helicity and depend only on its radius R The generalized forces contain the information about the electric field breaking the rotational symmetry, which is why the electric field amplitude appears in combination with η: where ] dρ is the exchange interaction part of Eq. (2).Terms in F R that are independent of E 0 depend only on R.
We numerically integrate the collective coordinates up to a dimensionless time of 1000 with an adaptive time step size.In obtaining the phase diagram in Fig. 3a, we took values in 0 ≤ E 0 ≤ 2 and 0 ≤ ω ≤ 4 using meshes with step sizes of 0.05 and 0.02, respectively.To obtain the number of helicity rotations per electric field cycle, we integrated the changes of the helicity angles and averaged them over all periods for 500 ≤ t ≤ 1000, neglecting the initial transient dynamics.Numerically, we classified a counterclockwise (clockwise) rotation as the average helicity rotation being greater than 0.9 * 2π (less than −0.9 * 2π).To perform the many numerical time integrations of R(t) and η(t) efficiently, we use the multiprocessing Python package and the Radau IIA integrator supplied by SciPy [92].As initial conditions, we used the values of R and η that minimize the total energy Eq. ( 2) at t = 0.
To avoid the computationally intensive evaluation of the integrals over the radial coordinate at each time integration step in G Rη , Γ RR , Γ ηη , F R , and F η , we employed fit functions of the corresponding integrals in the range 0 ≤ R ≤ 10.We verified that the error due to fitting the integrals was negligible.In particular, we found good agreement for cases where R 50.
We have confirmed that an externally applied magnetic field with B z = 2 leads to qualitatively the same results shown in Fig. 3a: with two lobes determining counterclockwise and clockwise helicity rotations and the resonance frequency being shifted to ω = 2, as expected.

V. DATA AVAILABILITY
The corresponding collective coordinate evolution and micromagnetic simulation data, along with analysis scripts, are available upon reasonable request.

VI. ACKNOWLEDGEMENTS
Appendix A: Goldstone mode limit Figure 4 summarizes the solutions of the Thiele equations in the limit of zero damping and absence of an externally applied electric field, i.e.E 0 = α = 0.In this limit, the Thiele equations decouple and energy is conserved.Therefore the radius remains constant for any initial skyrmion ansatz.For the critical radius of R = R * , the skyrmion has its minimal energy.In contrast, the helicity is a Goldstone mode and η depends only on the skyrmion radius.Moreover, η swaps sign at R = R * , where for R < R * (R > R * ) the skyrmion's helicity rotation evolves monotonically clockwise (counterclockwise).In the phase diagram shown in Fig. 3a of the main text, the regions of monotonic (dark pink) and non-monotonic (light pink) helicity evolution are separated by a straight line.To elucidate its meaning, in Fig. 5a we show R max , the maximum value attained by the radius in the longtime limit of the Thiele equations solution, as a function of E 0 and ω.Since R max becomes large in the Kittel resonance region and makes it hard to observe features elsewhere, in Fig. 5b we plot R max − R * (R * is the re-laxed skyrmion radius in the absence of electric field) and restrict its range of values to [−0.1, 0.1] to enhance features away from resonance.The white straight line in Fig. 5b corresponds to solutions with R max ≈ R * and coincides with the straight line in Fig. 3a.Note that R max > R * above the white straight line.Additionally, our analysis of the Thiele equations shows that when R > R * (R < R * ) the helicity increases (decreases).Therefore, for values of E 0 and ω in the phase diagram's light pink region, the skyrmion radius crosses R = R * causing the helicity to reverse direction, thus becoming non-monotonic.
The construction of a spacetime magnetic hopfion hinges upon the skyrmion dynamics settling into a timeperiodic steady state.In our construction route 1, we activate the helicity rotation by an AC electric field that injects energy while being counteracted by Gilbert damping dissipation.Figure 6 shows the time-average of the energy of a driven skyrmion U with the energy of a relaxed skyrmion in the absence of the electric field U * subtracted.Upon comparison with the phase diagram in Fig. 3a, we conclude that the sought-after time-periodic steady state where the helicity rotates establishes for values of E 0 and ω where U ≈ U * , namely, where energy injection and dissipation balance each other out on average.

FIG. 1 .
FIG. 1. Spacetime magnetic hopfions-two construction routes based on skyrmion textures evolving periodically in time.a) Helicity rotation: the helicity of a skyrmion rotates by 2π.b) Skyrmion braiding: two skyrmions swap positions.Preimages (colored curves) trace four selected magnetization directions throughout one period T .Identifying the magnetic textures, and their corresponding preimages, at t = 0 and t = T , reveals their nontrivial spacetime topology.The preimages of the identified textures (insets) are linked, both corresponding to an H = +1 spacetime Hopf index.

FIG. 2 .
FIG. 2. Time evolution of a skyrmion in a frustrated magnet driven by an AC electric field: activating helicity rotation.The skyrmion dynamics reaches a time-periodic steady state synchronizing to the driving electric field's period T .a) Skyrmion texture snapshots, at T /4 intervals, from micromagnetic simulations confirm the T -periodic evolution.b) Energy landscape snapshots as functions of the skyrmion collective coordinates, helicity η and radius R, shown in the R cos η − R sin η plane with ∆U = U + d 3 r B • ẑ and sample thickness d.During one period, the energy landscape rocks back and forth about the R cos η = 0 line as indicated by the orange arrow.The green dot represents the skyrmion collective coordinates time evolution.The direction of the helicity rotation (grey curved arrow) is uniquely defined by the driving electric field.Activating the T -periodic helicity rotation forms a spacetime magnetic hopfion.Parameters: E0 = 0.20, ω = 2π/T = 1.18, t0 is deep in the steady state and η(t0) = 0 (mod 2π); more details in Methods.

FIG. 3 .
FIG. 3. Roadmap to construct spacetime magnetic hopfions by electric-field-driven helicity rotation.a) Phase diagram of the long-term helicity dynamics, built from collective coordinate modeling with Gilbert damping α = 0.01, of a skyrmion driven by an AC electric field with amplitude E0 and frequency ω.The helicity rotates clockwise (counterclockwise) in the pink (green) regions leading to nonzero spacetime Hopf indices as indicated by the linked preimages of two selected points: b (c) with H = −1 (H = +1).b), c) Trajectories in the R cos η − R sin η plane of the selected points from a) with parameters E0 = 0.25, ω = 0.72 in b); and E0 = 0.20, ω = 1.18 in c).The trajectories are elliptical due to the skyrmion radius oscillations (breathing) shown in d).When the radius is larger (smaller) than R * , the helicity increases (decreases) e), i.e., it rotates counterclockwise (clockwise).

FIG. 4 .
FIG. 4. Collective coordinate dynamics in the limit E0 = α = 0. a) Phase portrait of Thiele equation solutions.In this limit all the trajectories are parallel to the η axis and, given the helicity's S 1 topology, they describe helicity rotations at a constant radius.The arrows indicate the direction of helicity rotation (clockwise for R < R * and counterclockwise for R > R * ) while the trajectories' thickness is proportional to the value of η, which vanishes at R = R * .For two selected trajectories (R = R * − 0.25 in green and R = R * + 0.25 in orange) we plot the time evolution of their radius b) and helicity c).

10 R
FIG. 5. a) Maximal skyrmion radius Rmax and b) difference between the maximal and the relaxed skyrmion radii Rmax − R * , as functions of E0 and ω obtained from Thiele equations solutions.Note that the plotted range of Rmax −R * is restricted to [−0.1, 0.1], thus the divergence of Rmax at the Kittel resonance frequency seen in a) is not shown.

4 (
FIG. 6. Time-average of the energy of a driven skyrmion U over one period of the driving electric field.The energy of a relaxed skyrmion with no electric field U * has been subtracted.For values of E0 and ω where U = U * the energy injected by the driving AC electric field is on average balanced out by Gilbert damping dissipation.