Complex free-space magnetic field textures induced by three-dimensional magnetic nanostructures

The design of complex, competing effects in magnetic systems—be it via the introduction of nonlinear interactions1–4, or the patterning of three-dimensional geometries5,6—is an emerging route to achieve new functionalities. In particular, through the design of three-dimensional geometries and curvature, intrastructure properties such as anisotropy and chirality, both geometry-induced and intrinsic, can be directly controlled, leading to a host of new physics and functionalities, such as three-dimensional chiral spin states7, ultrafast chiral domain wall dynamics8–10 and spin textures with new spin topologies7,11. Here, we advance beyond the control of intrastructure properties in three dimensions and tailor the magnetostatic coupling of neighbouring magnetic structures, an interstructure property that allows us to generate complex textures in the magnetic stray field. For this, we harness direct write nanofabrication techniques, creating intertwined nanomagnetic cobalt double helices, where curvature, torsion, chirality and magnetic coupling are jointly exploited. By reconstructing the three-dimensional vectorial magnetic state of the double helices with soft-X-ray magnetic laminography12,13, we identify the presence of a regular array of highly coupled locked domain wall pairs in neighbouring helices. Micromagnetic simulations reveal that the magnetization configuration leads to the formation of an array of complex textures in the magnetic induction, consisting of vortices in the magnetization and antivortices in free space, which together form an effective B field cross-tie wall14. The design and creation of complex three-dimensional magnetic field nanotextures opens new possibilities for smart materials15, unconventional computing2,16, particle trapping17,18 and magnetic imaging19.

a period, leading to a constant interhelix separation along the length of the system. We fabricate the system of two intertwined cobalt nanohelices with focused electron beam induced deposition 23 . Scanning electron microscope (SEM) images of two nanoscale double helices are presented in Fig. 1: the first (double helix A, Fig. 1c) with lower pitch and higher radius, the second (double helix B, Fig.  1d) more elongated with higher pitch and lower radius (geometries defined in Table 1). Both double helices have a nanowire diameter of approximately 70-80 nm with an interhelix distance of ~50-70 nm and therefore exhibit strong magnetostatic coupling.
To probe the magnetic state of these complex three-dimensional magnetic nanostructures, we employ scanning transmission X-ray microscopy (STXM, Fig. 1e). By tuning the X-ray energy to the Co L 2 edge (796 eV) and measuring images with circular polarization, we exploit X-ray magnetic circular dichroism (XMCD) to obtain a high-spatial-resolution projection of the magnetization parallel to the X-ray beam (Fig. 1f). We first probe the as-grown state of the two magnetic double helices in Fig. 1f,g, where we can see that in both XMCD images the double helices are composed of a dark and a bright helix, which corresponds to the individual helices being in antiparallel-magnetized single-domain states with a quasi-tangential magnetization distribution. This is expected due to the radii of curvature and torsion (defined in Table 1) being much larger than both the exchange length (4-6 nm) and the diameter of the nanowires 20 . These two antiparallel double-helix states (magnetizations of helices A and B either positive and negative or negative and positive, respectively) represent the degenerate ground states of the system (Methods), and are a result of the fabrication sequence of the helices, which are grown in parallel: at the start of the growth when the helices are small, the magnetic moments reorient to minimize the magnetostatic energy, aligning antiparallel to one another. This antiparallel state is maintained as the helices are grown, leading to the formation of these single-domain, micrometrelength structures 7 .
Although the two double-helix systems form similar antiparallel states in their as-grown configuration, they exhibit very different configurations following the application of a magnetic field perpendicular to the long axis of the helix. The XMCD projection of double helix A again reveals a pair of dark and bright helices, indi-Letters NaTurE NaNoTEcHNology cating the return to an antiparallel state (specifically the opposite antiparallel state, Fig. 1h). However, the XMCD projection of double helix B is different, with alternating regions of dark and bright contrast within individual helices (Fig. 1i), indicating the formation of a multidomain state with a regular array of domain walls. With both double-helix systems composed of the same material and exposed to the same external magnetic field, we attribute this difference in behaviour to their different curvatures, torsions and interhelix couplings.
To elucidate the influence of the three-dimensional geometry on the remanent magnetic configuration, we simulate the magnetic configuration formed after the application of a saturating transverse magnetic field for a variety of helix pitches and radii using finite-element micromagnetic simulations 24 . We identify three remanent magnetic configurations. The first is the antiparallel state (Fig. 2a, left), as observed experimentally for double helix A (Fig. 1f). The second is an unlocked domain wall state (Fig. 2a, centre), in which the transverse domain walls are aligned in the direction of the applied magnetic field. This unidirectional state is characterized by having the net magnetic surface charge of the walls located at the outer curved section of the wires 25,26 , as favoured by the curvature-induced anisotropy and the curvature-induced Dzyaloshinskii-Moriya interaction (DMI), which promote a particular domain wall chirality 25 . This state is consistent with the equivalent magnetic configurations of planar magnetic nanowires 27 . For geometries that host the unlocked state at remanence, the curvature-induced effects dominate over the interstructure magnetostatic interaction. We also observe a third, unconventional domain wall configuration (Fig. 2a, right), in which the domain walls fully reverse with respect to both the direction of the applied magnetic field and the curvature-induced DMI, becoming locked in place due to the strong interhelix interaction, as shown schematically in Fig. 2b.
To determine whether the locked domain wall state is present in double helix B, we perform soft-X-ray magnetic laminography 12,13,28,29 (Fig. 1e) to map its three-dimensional magnetization vector field with nanoscale resolution The reconstructed magnetization is given by arrows in Fig. 2d, where a reversal of the direction of the magnetization within the magnetic domain walls can be observed, consistent with the locked domain wall state. An additional representation of the magnetization with streamlines (Fig. 2e) reveals a distinctive figure-of-eight structure in the reconstructed magnetization. When compared with micromagnetic simulations in Fig. 2f,g (see also Extended Data Fig. 1), the figure-of-eight    The formation of these different remanent states-the antiparallel state and locked domain wall state for double helices A and B, respectively-occurs due to the geometry of the double helices strongly affecting the competing interactions. Specifically, the higher torsion:curvature ratio of double helix B, associated with its higher helix pitch and lower helix radius, promotes the formation of a stable array of locked domain walls. After the formation of the unlocked domain walls following transverse saturation, the domain walls reorient owing to the magnetostatic interaction overcoming the curvature-induced DMI of the domain wall. In particular, the higher torsion:curvature ratio decreases the distance between the helices, increasing the magnetostatic interaction between them, while at the same time decreasing the curvature-induced DMI, promoting the rotation of the domain walls to the locked state (Methods). This reorientation creates a more confined magnetic flux, reducing the magnetostatic energy, as shown schematically in Fig. 2b. In contrast, the antiparallel state observed in double helix A forms due to the higher curvature and lower torsion. Specifically, as the interdomain wall distance in different helices increases, the coupling between domain walls in different helices decreases, and the distance between domain walls within a single helix is reduced. Both effects favour the annihilation of neighbouring domain wall pairs and the formation of the antiparallel state. This geometry-dependent behaviour in intertwined double helices is confirmed both by mapping the phase diagram of this system with micromagnetic simulations and by an analytical model (Methods and Supporting Sections I and II), confirming that the locked domain wall state forms as a result of the influence of the geometry on these competing effects.
The locked domain wall state observed here occurs due to the balance between intrahelix properties and interhelix coupling. While it is known that curvature and torsion influence intrananowire

NaTurE NaNoTEcHNology
properties such as anisotropies and chirality 5,[20][21][22]30 , their influence on internanostructure coupling-that is, the magnetic stray field generated by neighbouring three-dimensional structures-remains unexplored. To elucidate the influence of the three-dimensional geometry on the magnetostatic coupling, we calculate the magnetic induction B = μ 0 (H + M) in the whole space (including both the magnetic material and free space) by taking the magnetization configuration M of the locked domain wall state from micromagnetic simulations and computing its stray field (H). We first consider the overall structure of B within the helix: the formation of the regular array of domain walls results in the double helix being split into two main domains, as shown in Fig. 3a, where on the left the magnetization points down along −x (blue), and on the right the magnetization points up along +x (red). This asymmetry in B within the double helix results in a similar asymmetry in B in free space, seen by considering the variation in the stray field surrounding the domain walls. While the highest magnitude stray fields in free space (B = μ 0 H > 0.3μ 0 Ms) are found to mostly align horizontally (ŷ) between the domain wall pairs (left panel of Fig. 3b), as lower-magnitude stray fields are considered (middle and right panels of Fig. 3b) we observe a growing component of the stray field in the plane of the domain wall cross-section (x-z plane), which becomes more noticeable when weaker stray fields of magnitude >0.1 M s are plotted. In fact, the stray field is seen to rotate asymmetrically into the x-z plane to channel the magnetic flux of magnetic domains of the same direction in the two different helices (Fig. 3c): on one side the stray field develops a (blue) negative vertical x component to channel the flux of the (blue) negative m x domains, while on the other side the stray field tilts into the (red) positive x direction to connect domains of (red) positive m x , indicated by blue and red arrows in Fig. 3c. The formation of these asymmetric magnetic flux channels not only results in a deviation from the direct horizontal coupling of the domain walls but also induces a distinctive asymmetric structure into the magnetic induction itself. Indeed, when the magnetic induction is projected onto the x-z plane perpendicular to the direction of the domain walls (indicated in Fig. 4a), the asymmetric x components of the induction caused by the flux channels result

NaTurE NaNoTEcHNology
in the formation of a saddle-like structure surrounding the domain wall pair that resembles an antivortex quadrupole structure 31 (Fig. 4b). We confirm the presence of antivortices in the magnetic induction by calculating the winding number of the normalized components of the induction in the x-z plane to be −1. These tex-tures are of interest not only for their topological nature, but also for the type of magnetic force that could be generated. Indeed, the non-trivial in-plane structure exhibits well defined gradients in the x-z plane components of the magnetic field, offering a new route to the design of nanoscale gradients in the magnetic induction.

NaTurE NaNoTEcHNology
Due to the periodic geometry of the double helix, the in-plane antivortices are not isolated objects: the regular array of locked domain walls leads to an array of effective antivortices in the magnetic stray field (Fig. 4b). In addition, the magnetization configuration of the locked domain wall state in the chiral double helix forms an array of vortices of constant chirality in B (with winding number +1), which is defined by the chiral geometry. The combination of the alternating chiral vortices and antivortices in B is reminiscent of the cross-tie wall in planar magnetic elements 14,32 (Fig. 4c), where the continuity of the magnetization requires the presence of a crossing of the magnetization between like-handed vortices 33 . Here, we observe this contained effective cross-tie B field domain wall-like structure composed of vortices in the magnetization and antivortices in the B field in free space.
To confirm the role of the chirality of the helix in the formation of these complex B field textures, we consider the equivalent domain wall configuration in a non-helical, achiral geometry composed of straight nanowires. To remove the helical geometry, we perform additional simulations after applying a coordinate transformation to the locked domain configuration, effectively unwinding the helices to form a pair of straight nanowires (Methods) and removing the influence of the three-dimensional chiral geometry of the helices and the associated curvilinear effects. Following the relaxation of the magnetization from the locked state under this new geometry (Fig. 4d), we observe no vertical component of the stray field coupling domains of the same direction in different nanowires (Fig. 4e), indicating that no flux channelling (as observed in the double helix, Fig. 3c) occurs. Due to the absence of flux channelling, no antivortex textures are observed in the stray field, confirming that the stray field textures observed surrounding the locked domain wall state are a direct consequence of the twisting of the chiral helix structure.
We have demonstrated that the three-dimensional geometry not only can alter intrastructure properties, but also offers an opportunity to tailor the magnetic field itself. This is showcased in our double-helix system, where the three-dimensional geometry results in highly stable and robust locked domain wall pairs, with prospects for robust domain wall motion and synchronous dynamics 34,35 in three-dimensional interconnectors, key to the realization of spin logic in large-scale integrated three-dimensional circuits. These phenomena are of great interest for domain wall conduit-based information processing 36 , which includes emerging applications such as reservoir computing 2,37 where the strong interaction between neighbouring magnetic textures and the controlled reconfigurability that these systems present is of key importance. In particular, the introduction of nonlinear interactions into a system provides the opportunity for the combination of information transmission and processing, and the possibility to go beyond von Neumann computing architectures. Moreover, the creation of an array of planar antivortices in the magnetic field in free space sets a precedent for the creation of topological magnetic field textures with complex nanoscale field gradients using three-dimensional magnetic nanostructures. The design of controlled gradients in the magnetic field is key for applications such as particle 18 and cold-atom 17 trapping, while the ability to define complex nanotextures in the magnetic field has important implications for imaging 19,38,39 and magnetic field manipulation 40 . While emergent topological features in the magnetic stray field have previously been found to result in chiral behaviour in frustrated nanomagnet arrays 41 , here three-dimensional nanopatterning results in the controlled creation of well localized magnetic field antivortices. These results demonstrate that the properties of a three-dimensional system can not only be used to tailor the material internal spin states but also play a key role in defining the magnetic stray field, and thus the interaction of neighbouring features in the magnetization.

online content
Any methods, additional references, Nature Research reporting summaries, source data, extended data, supplementary information, acknowledgements, peer review information; details of author contributions and competing interests; and statements of data and code availability are available at https://doi.org/10.1038/ s41565-021-01027-7.

Three-dimensional geometrical parameters of the cobalt double helices.
In curved three-dimensional systems, it is useful to define the geometrical properties in terms of the κ and τ of the system, which are defined as κ = rH r 2 H + P 2 , τ = CP r 2 H + P 2 where P = p H /2π, C is the chirality and the radii of curvature and torsion are defined as κ −1 and τ −1 , respectively. It has been shown analytically that the radii of curvature and torsion determine the effective anisotropy and spin wave dynamics of a single magnetic helix 20 . The helices investigated experimentally in this work have the geometrical parameters defined in Table 1.
Fabrication. The three-dimensional cobalt double helices were fabricated using focused electron beam induced deposition combined with a program compatible with computer-aided design software that allows for the deposition of three-dimensional architectures. Specifically, a single-pixel double-helix model was designed using the open-source program FreeCAD. Following the growth of calibration structures to account for the growth rate of the cobalt precursor according to ref. 23 , a stream file to direct the scanning electron beam was created.
The double helices were fabricated on Omniprobe transmission electron microscopy sample holders, which were premilled with the focused ion beam to prevent shadowing of the sample holder during the laminography scan. Both the focused ion beam milling and focused electron beam induced deposition were performed in a Helios 660 NanoLab focused ion beam microscope at the Kelvin Nanocharacterisation Centre of the University of Glasgow. Specifically, for the growth of the three-dimensional magnetic nanostructures, an acceleration voltage of 5 kV and a current of 86 pA were used, in combination with the precursor Co 2 (CO) 8 . The growth times varied between 20 and 30 min per double-helix structure.
Following the deposition, the samples were annealed for 40 min at 250 °C, which results in an increase in the spontaneous magnetization of the cobalt, without a large increase of crystalline size or texture formation 42,43 . In particular, the annealing leads to a nanocrystalline microstructure, a cobalt composition of ~80 at.% and a saturation magnetization of 800-900 kA m −1 . This treatment also leads to the formation of a protective carbon shell around the surface of the three-dimensional structure. The annealing procedure has the additional advantage of reducing carbon deposition-and in turn any deformation of the structure-during the X-ray imaging experiments.

X-ray magnetic laminography.
Soft-X-ray magnetic laminography was performed at the PolLux beamline at the Swiss Light Source, Switzerland 13 . X-ray magnetic laminography is a recently developed three-dimensional imaging technique, which involves the measurement of projections of the magnetization of a sample for many different orientations of the sample with respect to an X-ray beam 12 .
Sensitivity to the magnetization is obtained by probing the XMCD. In this measurement, the XMCD was probed at the Co L 2 edge with a photon energy of 796 eV. Although the XMCD contrast is weaker at the L 2 edge than at the L 3 edge, measurements were performed at the L 2 edge due to the high absorption of the double helices, providing a balance between the transmission and magnetic contrast to optimize image quality. We note that, due to the higher curvature of helix A, the effective thickness of the nanowire probed by the X-rays is higher, leading to a lower signal to noise ratio in the image compared with helix B under otherwise equal imaging conditions. For each orientation, XMCD images were measured by measuring STXM images with C+, C− and linear (horizontal) polarization. To obtain a quantitative measure of the projection of the magnetization, so-called 'dark-field' signal originating from leakage of the centre stop of the zone plate and from the higher-order light diffracted by the monochromator was removed from the projections by applying the following normalization procedure: where T is the normalized transmitted intensity, I is the nominal transmitted intensity, I 0 is the intensity incident on the sample obtained from an empty region of the image and DF is the dark-field signal, which is estimated from regions of the image where the incident beam is blocked. The linear light projections were used to cross-check the removal of the unfocused and higher-energy light. In this way, quantitative projections of the magnetization were obtained, which were used to obtain a correct reconstruction of the three-dimensional magnetization. For the two-dimensional imaging of the helices shown in Fig. 1 before and after the application of a transverse magnetic field, the samples were mounted in the laminography stage, and aligned such that the X-rays were aligned with the direction of the long axis of the helix, resulting in an incident angle of the X-rays and long axis of the helix of 45°, providing sensitivity to the component of the magnetization parallel to the long axis of the helix. The images in Fig. 1f,h,g,i were measured with eight, two, nine and four averages, respectively, leading to slight changes in the noise level of the individual images.
For the three-dimensional imaging, the X-ray laminography set-up consisted of a rotation stage whose rotation axis is oriented at 45° to the X-ray beam. Projections were measured with an angular separation of 10°. In laminography, the number N of projections measured over 360° required to achieve a spatial resolution Δr is defined as 44 . N = π t Δr tan θL, where t is the thickness of the sample and θ L is the laminography angle, which defines the angle between the X-ray beam and the rotation axis-in this case 45°.
In this measurement, projections of the structure with a field of view of 3 × 3 μm 2 and a pixel size of 25 nm were measured around 360° with an angular separation of 10°. For each angle, an average of two XMCD projections was measured to increase the signal to noise ratio. The angular separation of 10° corresponds to a nominal Δr of less than 20 nm. In reality, the spatial resolution of the final reconstruction was limited by the signal to noise ratio of the XMCD projections. Of the 36 projections, it was only possible to measure 27 because of shadowing of the X-ray beam due to the sample holder. Simulations of magnetic laminography revealed that, although this led to an asymmetry in the reconstructed magnetization, it does not prevent the identification of the locked domain wall state.
The three-dimensional magnetic configuration was then reconstructed using a graphics processing unit implementation of an arbitrary projection reconstruction algorithm developed in ref. 29 and used in refs. 12,13 .
The three-dimensional magnetization structure was visualized with ParaView 5.5.0.

Magnetic laminography reconstruction.
The reconstructed m x , m y and m z components of the magnetic configuration are presented in Extended Data Fig. 1ac, respectively, and are directly compared with the micromagnetic simulation of the locked domain wall state in Extended Data Fig. 1d-f. The multidomain structure is confirmed by the m x component, which reveals positive and negative domains on the upper and lower halves of the helix, respectively. However, it is only with the transverse components of the magnetization, m y and m z , that the type of domain wall pair state can be identified: both the m y and m z components exhibit an alternating contrast (Extended Data Fig. 1b,c), consistent with the locked domain wall state (Extended Data Fig. 1e,f), and not with the more standard unlocked domain wall pair configuration previously observed in planar systems.

Micromagnetic simulations.
Finite-element meshes were created by first creating STL files corresponding to three-dimensional double helices of different parameters using the open-source program FreeCAD. For all simulations, the nanowire diameter was kept constant at 50 nm, while the helix radii and pitches were varied. The meshes were created with a mesh size of 5 nm using the program Gmsh 45 .
To map the phase diagram of the stable state after transverse saturation of the magnetization, micromagnetic simulations were performed using the program magnum.fe, which employs finite-element micromagnetics with a hybrid finite-element/boundary-element method for the magnetostatic field computation and a preconditioned implicit time integration scheme for the Landau-Lifshitz-Gilbert equation 46 . The spontaneous magnetization of the material was fixed to M s = 8 × 10 5 A m −1 . The magnetization was initialized in the transverse direction, assuming full saturation, and then the relaxation calculated using the Landau-Lifshitz-Gilbert equation with a damping parameter α = 1.
To calculate the stray field around the final magnetization state, the double-helix mesh was embedded within a boxed mesh using the program Gmsh, and the stray field calculated at each position using the magnum.fe solver.
To compare the helix configuration with that of a straight nanowire, a coordinate transformation was applied to the relaxed locked domain wall configuration result using ParaView, and the magnetization transformed accordingly. Following the unwinding of the magnetic state, the configuration was once more allowed to relax using magnum.fe to reach a stable configuration. The micromagnetic simulations presented in Figs. 3 and 4 of the main text correspond to a helix pitch of 500 nm, a helix radius of 30 nm and a nanowire diameter of 50 nm.

Data availability
All data associated with this manuscript are available on the Zenodo repository at https://doi.org/10.5281/zenodo.5657298.

Code availability
All analysis code and reconstruction algorithms associated with the work of this manuscript are available on the Zenodo repository at https://doi.org/10.5281/ zenodo.5657298.