Three-dimensional topological magnetic monopoles and their interactions in a ferromagnetic meta-lattice

Topological magnetic monopoles (TMMs), also known as hedgehogs or Bloch points, are three-dimensional (3D) non-local spin textures that are robust to thermal and quantum fluctuations due to the topology protection1–4. Although TMMs have been observed in skyrmion lattices1,5, spinor Bose–Einstein condensates6,7, chiral magnets8, vortex rings2,9 and vortex cores10, it has been difficult to directly measure the 3D magnetization vector field of TMMs and probe their interactions at the nanoscale. Here we report the creation of 138 stable TMMs at the specific sites of a ferromagnetic meta-lattice at room temperature. We further develop soft X-ray vector ptycho-tomography to determine the magnetization vector and emergent magnetic field of the TMMs with a 3D spatial resolution of 10 nm. This spatial resolution is comparable to the magnetic exchange length of transition metals11, enabling us to probe monopole–monopole interactions. We find that the TMM and anti-TMM pairs are separated by 18.3 ± 1.6 nm, while the TMM and TMM, and anti-TMM and anti-TMM pairs are stabilized at comparatively longer distances of 36.1 ± 2.4 nm and 43.1 ± 2.0 nm, respectively. We also observe virtual TMMs created by magnetic voids in the meta-lattice. This work demonstrates that ferromagnetic meta-lattices could be used as a platform to create and investigate the interactions and dynamics of TMMs. Furthermore, we expect that soft X-ray vector ptycho-tomography can be broadly applied to quantitatively image 3D vector fields in magnetic and anisotropic materials at the nanoscale. Topological magnetic monopoles are non-local spin textures that are robust to thermal and quantum fluctuations, but they are difficult to study at the nanoscale in real space. Now, soft X-ray vector ptycho-tomography is demonstrated to determine the three-dimensional magnetization vector and emergent magnetic field of such magnetic monopoles in a ferromagnetic meta-lattice.

Letter https://doi.org/10.1038/s41565-022-01311-0 and quantify the spatial resolution, we divided all the projections into two halves by choosing alternate projections and performed two independent 3D vector reconstructions. By calculating the Fourier shell correlation from the two independent reconstructions, we confirmed that a spatial resolution of 10 nm was achieved for the 3D vector reconstruction of the magnetization field (Methods and Extended Data Fig. 7).
Next, we analysed the experimental 3D magnetization vector field focusing on the topological aspects. We characterized TMMs in the ferromagnetic meta-lattice that are robust to thermal or quantum fluctuations due to the topological protection. In 3D magnetic systems, a TMM within a volume Ω follows the volume-surface relationship 4 (that is, the divergence theorem), where Q is the topological charge with the charge density ρ = 3 4π ∂ x n ⋅ (∂ y n × ∂ z n) , ∂Ω is the bounding surface, n is the normalized magnetization vector field, B i e = 1 8π ϵ ijk n ⋅ (∂ j n × ∂ k n) is the emergent magnetic field satisfying ∇ ⋅ B e = ρ, and ϵ ijk is the Levi-Civita symbol. B e exerts a Lorentz force on (quasi)particles, such as electrons and magnons, moving through the magnetic texture, as long as they carry a spin 3 , which has been previously investigated theoretically and experimentally 4,9,20,28 . The right-hand side of equation (1) is commonly used to evaluate the skyrmion number in a 2D plane 29,30 , but can be applied to any 3D embedded surface. When the magnetization vectors on the surface of a sphere enclosing a volume Ω covers the orientational parameter space exactly once, we have the topological charge Q = ±1, where +1 and −1 represent a TMM and an anti-TMM, respectively. It is important to note that skyrmions and TMMs are fundamentally different spin textures. Skyrmions are local textures and can be annihilated by shrinking their cores down to the lattice constant without affecting the spin states far away 29,30 . In contrast, TMMs are non-local spin textures and robust to local fluctuations [1][2][3][4] . They are topologically protected, that is, the volume-surface relationship of equation (1) holds even when the system is not well-ordered. TMMs can only be removed by the outflow of a topological current through the boundary or annihilated in oppositely charged pairs. metals 11 , which represents a significant advance of the resolution over previous soft and hard X-ray vector tomography methods 2,9,[19][20][21][22][23][24] . The experiment was conducted by focusing circularly polarized soft X-rays onto the ferromagnetic meta-lattice at room temperature (Fig. 1). The magnetic contrast of the sample was obtained by using X-ray magnetic circular dichroism 14,18,25 and tuning the X-ray energy to the L 3 edge of nickel 26 . To separate the magnetic contrast from the electron density, two independent measurements were made with leftand right-circularly polarized soft X-rays. In each measurement, three independent tilt series were acquired from the sample, corresponding to three in-plane rotation angles (0°, 120° and 240°) around the z axis ( Fig. 1 and Extended Data Fig. 2). Each tilt series was collected by rotating the sample around the x axis with a tilt range from −62° to +61°. At each tilt angle, a focused X-ray beam was scanned over the sample with partial overlap between adjacent scan positions and a far-field diffraction pattern was recorded by a charge-coupled device camera at each scan position (Methods). The full data set consists of six tilt series with a total of 796,485 diffraction patterns.
The diffraction patterns were reconstructed using a regularized ptychographic iterative engine 27 , where corrupted diffraction patterns were removed and phase unwrapping was implemented (Methods and Extended Data Fig. 3). Each pair of left-and right-circularly polarized projections was aligned and converted to the optical density for normalization. The sum of each pair of the oppositely polarized projections produced three independent tilt series corresponding to three in-plane rotation angles. The scalar tomographic reconstruction was performed from the three tilt series of 91 projections using a real space iterative algorithm (Methods), which can optimize the reconstruction by iteratively refining the spatial and angular alignment of the projections. Quantitative characterization of the reconstructed 3D electron density and a scanning transmission electron microscopy image of the sample indicates that, although there are some imperfections, the meta-lattice has an ordered fcc structure (Extended Data Figs. 4 and 5a,b). To determine the magnetization vector field, we took the difference of the left-and right-circularly polarized projections of the three tilt series (Extended Data Fig. 6). The 3D vector reconstruction was performed from 91 difference projections by least-squares optimization with gradient descent (Methods). Supplementary Video 1 shows the 3D electron density and magnetization vector field in the ferromagnetic meta-lattice. To validate the 3D vector reconstruction a L R y z x L R b Fig. 1 | Experimental schematic of soft X-ray vector ptycho-tomography. a, Left-and right-circularly polarized X-rays (blue and pink, respectively) were focused onto a ferromagnetic meta-lattice sample (centre), on which the green circles indicate the partially overlapped scan positions. The sample was titled around the x and z axes and diffraction patterns were collected by a detector. b, 3D electron density (green) and magnetization vector field (arrows) in the meta-lattice reconstructed from the diffraction patterns, where the colours of the arrows represent different orientations. A magnified magnetization vector field is shown in Supplementary Video 1.
Letter https://doi.org/10.1038/s41565-022-01311-0 Although we used the normalized magnetization vector field (n) in this study, equation (1) holds even when n varies in its magnitude 4 . To apply equation (1) to the ferromagnetic meta-lattice, we computed the local maxima and minima of the topological charge density within the volume of the sample. At each local extremum, we defined an enclosed surface and calculated the topological charge (Methods). Figure 2a and Supplementary Video 2 show the 3D spatial distribution of 68 TMMs (red dots) and 70 anti-TMMs (blue dots) in the meta-lattice. We observed that 90 TMMs and anti-TMMs are located in the octahedral sites, and 48 in the tetrahedral sites and the thin neck regions, which is probably due to the octahedral sites having a larger total volume than the tetrahedral sites. Figure 2b,d shows a representative TMM and anti-TMM located in an octahedral and tetrahedral site, respectively. Since their 3D spin textures exhibit a circulating configuration (Fig. 2c,e), the sign of the charge is not apparent from the 3D spin textures, but can be unambiguously observed from the emergent magnetic field (Extended Data Fig. 8a,b).
The existence of a large number of TMMs in the ferromagnetic meta-lattice allowed us to probe their interactions. According to monopole confinement theory 4 , the potential energy of a monopole pair with a positive and negative charge grows linearly with their separation when the exchange energy dominates, with all the emergent magnetic field lines emanating from the positive charge and ending at the negative charge. A non-negligible pair separation indicates the existence of other interactions competing with the exchange energy. Figure 3a shows a representative TMM and anti-TMM pair, where the emergent magnetic field lines were computed from the magnetization vector field using equation (1). We observed that only part of the magnetic flux emanating from the TMM terminates at the anti-TMM, indicating that the emergent magnetic field lines are not completely confined. In comparison, the emergent magnetic field lines in similarly charged pairs exhibit repulsive interactions (Fig. 3b,c). The distance of the TMM and anti-TMM pairs was fitted to be 18.3 ± 1.6 nm using a generalized extreme value distribution that accounts for the asymmetry in the measured distance distribution (Fig. 3d), while the TMM and TMM, anti-TMM and anti-TMM pairs were stabilized at longer distances of 36.1 ± 2.4 nm and 43.1 ± 2.0 nm (Fig. 3e,f), respectively. The statistically significant shorter distance of the TMM and anti-TMM pairs than the two other pair distances is consistent with theory 4 , indicating that the system is under near-equilibrium conditions.
To investigate the effects of the experimental errors and statistical fluctuations on the analysis of TMMs, we added random angular fluctuations to the experimentally measured magnetization vectors with a standard deviation of 2°, 15° and 20°. We then calculated the topological charges using equation (1). Extended Data Fig. 9a,b shows the histograms of the topological charge as a function of the random angular fluctuation, showing two sharp peaks with Q = ±1 due to the quantization of the topological charge. After applying an angular fluctuation of 2° to the magnetization vectors, we identified 68 TMMs and 69 anti-TMMs. With the increase of the angular fluctuation to 15° and 20°, the number of TMMs became 72 and 65, while the number of anti-TMMs was changed to 65 and 66, respectively. We also statistically calculated the nearest-neighbour distances of the TMM and anti-TMM, TMM and TMM, anti-TMM and anti-TMM pairs for the angular fluctuations of 2°, 15° and 20° (Extended Data Fig. 9d-l), which are consistent with those without the introduction of the angular fluctuation ( Fig.  3d-f). This analysis confirmed that our experimental observations are real and cannot be due to statistical fluctuations or noise. To examine if the imperfections in the sample affect the interactions of the TMMs, we chose a more ordered region in the meta-lattice and plotted the histogram of the nearest-neighbour distances between oppositely and similarly charged TMMs in the region (Extended Data Fig. 5), which agree with that obtained from a larger region including some imperfections ( Fig. 3d-f). The consistency of the two histograms corroborated that the structural imperfections in the meta-lattice do not play a significant role in influencing the interactions of the TMMs.
Due to the high surface-to-volume ratio of the meta-lattice, some TMMs and anti-TMMs could escape through the 3D internal surfaces of the magnetic voids created by the silica nanospheres. Because the topological charge is conserved, an escaped TMM or anti-TMM would produce a Q = +1 or −1 charge on an internal surface, respectively. To experimentally investigate this phenomenon, we performed a non-convex triangulation of the 3D internal surfaces in the meta-lattice. The resulting facets were grouped into individual void surfaces by a community-clustering technique used in network analysis 31 . As the majority of the magnetic voids are not fully closed due to the finite thickness of the sample, we defined any void surface with Q ≥ 0.9 as a virtual TMM and Q ≤ −0.9 as a virtual anti-TMM. Using equation (1), we found 8 virtual TMMs and 11 virtual anti-TMMs in the ferromagnetic meta-lattice ( Fig. 2a and Supplementary Video 2). Two representative virtual TMMs with Q = 1.01 and −1 are shown in Fig. 4a,b, respectively. The 3D magnetization vector field on the two magnetic voids was mapped onto a 2D plane to produce two stereographic projections, exhibiting skyrmion and anti-skyrmion configurations (Fig. 4c,d). Compared to materials systems that usually support topological defects, such as non-centrosymmetric lattices and magnetic/ heavy-metal multilayers 1,29,30 , the ferromagnetic meta-lattice studied does not possess strong anisotropy or the Dzyaloshinskii-Moriya interaction. However, surface curvature can stabilize magnetic solitons through the effective Dzyaloshinskii-Moriya interaction 32,33 . The complex 3D curved surface of the magnetic voids induces strong frustration in the ferromagnetic meta-lattice, which can stabilize TMMs at the octahedral and tetrahedral sites of the meta-lattice. Similar stable TMM and anti-TMM pairs with a nanometre distance have been reported in a frustrated ferrimagnet based on first-principles simulations 34 , although the frustration has a different origin from our system. Using our experimental data as direct input to atomistic simulations, we numerically demonstrated that TMMs can be stabilized by the boundary conditions (Methods). We extracted four 15 × 15 × 15 nm 3 volumes from the ferromagnetic meta-lattice, containing two TMMs and two anti-TMMs. The atomistic spins on the outer boundary of each volume were fixed, while all the other spins were allowed to relax to an equilibrium configuration. After 50 ps, a stable TMM or anti-TMM formed in each volume with a topological charge matching the experimental value (Extended Data Fig. 10a-d). We also observed that as long as the atomistic spins were fixed on four of the six surfaces of each volume, the TMM or anti-TMM remained stable inside the volume (Extended Data Fig. 10e-h). These results further confirmed that surface constraints can stabilize TMMs and anti-TMMs, although the detailed mechanism requires further investigation.
In conclusion, we have created and directly observed TMMs and their interactions in a ferromagnetic meta-lattice with a 3D spatial resolution of 10 nm. This work could open the door to use magnetically frustrated meta-lattices as a new platform to study the interactions, dynamics and confinement-deconfinement transition of TMMs 4 . Furthermore, as a powerful scanning coherent diffractive imaging method [35][36][37][38] , the 3D spatial resolution of soft X-ray vector ptycho-tomography can be improved by increasing the incident coherent flux or the data acquisition time. With the rapid development of advanced synchrotron radiation, X-ray-free electron lasers and high-harmonic-generation sources worldwide 36 , we expect that soft X-ray vector ptycho-tomography can find broad applications in the topological spin texture, nanomagnetism, and X-ray imaging fields.

Online content
Any methods, additional references, Nature Portfolio 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-022-01311-0.

Sample synthesis and preparation
The 3D ferromagnetic meta-lattice was synthesized by infiltrating interconnected voids of a silica nanoparticle template using confined chemical fluid deposition 13 . Monodisperse silica nanoparticles of 60 nm in diameter (standard deviation <5%) were synthesized using a liquid-phase method 39 . The evaporation-assisted vertical deposition technique was used to assemble these particles onto silicon substrate 40 . Briefly, 3 cm × 1 cm silicon wafers were placed at a ~30° angle in open plastic vials containing 10× dilute solution of the as-synthesized particles. The vials were left undisturbed for 2 weeks in an oven maintained at 40 °C at 80% relative humidity. The resulting films that were used as the template for nickel infiltration contained silica particles arranged in a fcc structure and had thicknesses ranging from 240 to 850 nm depending on the vertical position of the silicon substrate 41 .
The infiltration of nickel within the template voids was performed using confined chemical fluid deposition 13 . The template was spatially confined using a 250-µm-thick U-shaped titanium spacer and placed within a custom-built reactor made of parts from the High Pressure Equipment Company, McMaster and Swagelok. Bis(cyclopentadienyl) nickel(II) was loaded into the reactor in a Vacuum Atmospheres argon glovebox. The reactor was pressurized with Praxair 4.0 industrial-grade carbon dioxide using a custom-made manual pump and heated to 70 °C for 8 h at a pressure of around 13.8 MPa to dissolve the precursor powder into the supercritical carbon dioxide. A separate gas reservoir was loaded with Praxair 5.0 ultrahigh-purity hydrogen using a Newport Scientific two-stage 207 MPa diaphragm pump and was connected to the reactor. The hydrogen was added to the reactor to a final reactor pressure of 42.7 MPa and the deposition proceeded at 100 °C for 10 h. The interstitial voids between the nanospheres of the template were then infiltrated with nickel, forming a meta-lattice. An overfilled nickel film over the meta-lattice and template resulting from the deposition process was milled using a Leica EM TIC 3× argon ion beam milling system at 3° and 3 kV. The meta-lattice consists of octahedral and tetrahedral sites around 25 nm and 14 nm in size, respectively, which are interconnected by thin necks with a varying thickness as small as ~5 nm. The distance between two nearest octahedral sites is ~60 nm, between two nearest tetrahedral sites ~43 nm, and between two nearest octahedral and tetrahedral sites ~37 nm. The geometry of the meta-lattice with a detailed schematic can be found elsewhere 12 .
To prepare the meta-lattice sample for the vector ptycho-tomography experiment, we lifted out a portion of the sample from the bulk meta-lattice on a silicon substrate and thinned the sample using a focused ion beam (FIB; FEI Nova 600 NanoLab Dual-Beam), which was equipped with a field emission scanning electron microscope and a scanning gallium ion beam. The FIB-prepared sample was mounted on a 3 mm transmission electron microscopy (TEM) grid (Omniprobe, three-post copper lift-out grid), where the central post was also trimmed by FIB milling to increase the tilt range. The sample mounted on the TEM grid was examined by the scanning electron microscope and an optical microscope, and then manually glued on a 3 mm copper ring using a silver paste (Extended Data Fig. 2a-f). The sample fabricated by this process can be manually rotated in-plane for the vector ptycho-tomography experiment. To examine the surface oxidation of the sample, we conducted an X-ray absorption spectroscopy experiment of the nickel meta-lattice. By carefully analysing the X-ray absorption spectrum in comparison with that of a pure nickel film and a NiO film 42 (Extended Data Fig. 2g), we concluded that the surface oxide layer of the sample is very thin, which is consistent with the previous experimental measurements 43 .

The soft X-ray vector ptycho-tomography experiment
The experiment was conducted at the COSMIC beam line at the Advanced Light Source, Lawrence Berkeley National Laboratory 44 . Figure 1 shows an experimental schematic of the soft X-ray vector ptycho-tomography. An elliptical polarization undulator was used to generate circularly polarized X-rays of left and right helicity and to achieve differential contrast enhancement of the magnetic signal. The incident photon energy was tuned to 856 eV, slightly above the nickel L 3 edge, to obtain the magnetic contrast based on X-ray magnetic circular dichroism 17,18,25,26,45 . The polarized beam was focused onto the sample by a Fresnel zone plate with an outer width of 45 nm. A total of six tilt series with a tilt range from −62° to +61° were acquired from the sample with left-and right-circularly polarized X-rays at three in-plane rotation angles (0°, 120° and 240°). At each tilt angle, the focused beam was raster-scanned across the sample in 40 nm steps. Diffraction patterns were collected using both left-and right-circularly polarized X-rays. A charge-coupled device camera was used to record the diffraction patterns at each scan position. Initial reconstructions were performed on-site in real time using a GPU-based ptychography reconstruction algorithm 46 .

Data processing and ptychographic reconstructions
A very small number of corrupted diffraction patterns, most commonly caused by detector readout malfunction or unstable beam flux, resulted in a global degradation of the reconstruction through the coupling of the probe and object. We used the following procedure to automatically detect and remove the corrupted diffraction patterns to achieve a high-quality reconstruction. The high-angle diffraction intensity at each scan position was integrated to produce a low-resolution map at every ptychography scan. Local maxima in the magnitude of the gradient of this map were used to identify and remove bad frames (Extended Data Fig. 3a,b). The image reconstructions were performed by using the regularized ptychographic iterative engine 26 coupled with phase unwrapping for high tilt angles 47 (Extended Data Fig. 3c,d). Specifically, for the first ten iterations of the ptychographic reconstruction, no phase unwrapping was enforced. After that, phase unwrapping was applied to the object at every third iteration. The final reconstruction was obtained with a total of 500 iterations.
From the reconstructed complex-valued exit wave, the absorption component was used as the magnetic contrast 18,25 and the two oppositely polarized projections at each tilt angle were aligned using a feature-based image registration package in MATLAB. The projections were converted to the optical density 48 by taking the logarithm of the ratio of the signal to the mean of the background region (that is, outside the sample), which was used to normalize any small temporal and polarization-based fluctuations of the beam intensity. In each projection, background subtraction was performed by numerically evaluating Laplace's equation, where ∇ 2 = ∂ 2 ∂x 2 + ∂ 2 ∂y 2 is the 2D Laplace operator and φ represents the background of the projection. To determine φ, we solved equation (2) by using the region exterior to the sample as the boundary condition. The value at the boundary corresponds to the optical density in vacuum. Mathematically, the calculation of φ is equivalent to the determination of the geometry of a soap film from an enclosed boundary. We implemented this procedure by using a MATLAB function 'regionfill'. We found that this method outperforms simple constant background subtraction by taking into account the local variation of the background 49 .

The scalar tomography reconstruction
The relationship between charge and magnetic scattering 18,25,50 , was used to generate a set of scalar and vector projections corresponding to the charge and magnetic scattering, where f c and f m are the charge and magnetic scattering factor, respectively, ẑ is the X-ray propagation Letter https://doi.org/10.1038/s41565-022-01311-0 direction, and m is the magnetization vector. The sum of each pair of the oppositely polarized projections produced three independent tilt series corresponding to three in-plane rotation angles. The scalar projections of each tilt series were first roughly aligned with cross-correlation, then more accurately aligned using the centre-of-mass and common-line method 51,52 . The aligned tilt series was reconstructed by a real space iterative reconstruction (RESIRE) algorithm 49 , which was able to iteratively perform angular and spatial refinement to adjust any remaining small alignment errors 53,54 . From the three independent reconstructions, transformation matrices were computed to align the three tilt series to a global coordinate system. The three aligned tilt series were collectively reconstructed by RESIRE using the same angular and spatial refinement procedure, which produced the final scalar tomography reconstruction. The transformation matrices obtained from the scalar tomography were used for the vector tomography reconstruction.

The vector tomography reconstruction
The 3D magnetization vector field was reconstructed by taking the difference of the left-and right-circularly polarized projections of the six experimental tilt series, producing three independent tilt series with magnetic contrast. The vector tomography algorithm is modelled as a least-squares optimization problem and solved directly by gradient descent. The least-squares problem is given as, where O 1 , O 2 , O 3 are the three components of the vector field to be reconstructed, N is the number of the projections of the three tilt series, Π i is the projection operator with respect to the Euler angle set {ϕ i , θ i , ψ i }, and b i is the experimentally measured projection. {α i , β i , γ i } comprise the coefficient set with respect to the projection operator and are related to the corresponding Euler angle set by, The least-squares problem is solved via gradient descent and the gradients are computed by, .
where the superscript T indicates the transpose. The (j + 1)th iteration of the algorithm is updated as, where t is the step size. For a given tilt angle set {ϕ i , θ i , ψ i }, the forward projection of a 3D object is computed using the Fourier slice theorem, while the back projection is implemented by linear interpolation.
To validate the vector tomography reconstruction algorithm, we used a structural model consisting of TMMs/anti-TMMs and calculated their diffraction patterns based on the experimental parameters. After adding noise to the diffraction patterns, we performed ptychographic reconstructions to generate projections. Using the vector tomography reconstruction algorithm, we were able to reconstruct the 3D magnetization vector field of the majority of TMMs/anti-TMMs from the projections. After validating the vector tomography algorithm using model data, we applied it to reconstruct the 3D magnetization vector field of the ferromagnetic meta-lattice from the experimentally measured tilt series.

Quantification of the 3D spatial resolution
We quantified the spatial resolution using two independent methods. First, we divided the 91 projections of three tilt series into two halves by choosing alternate projections and conducted two independent 3D scalar reconstructions, from which two different supports were generated to separate the nickel from the silica region. We then performed two independent vector reconstructions from the two halves. After applying the support to exclude the silica region, we calculated the Fourier shell correlation (FSC) from the two 3D vector reconstructions. Extended Data Fig. 7a 55 , we characterized the 3D spatial resolution of the vector reconstruction to be 10 nm. We noted that the FSC values for |m z | are slightly smaller than 0.143 at some high spatial frequency (Extended Data Fig. 7c). This was because only a half of the projections were used to perform each 3D vector reconstruction. Compared to cryo-electron microscopy, which employs a large number of images for a 3D reconstruction 55 , the number of projections in our experiment is much smaller. Thus, when only a half of the projections were used for the vector reconstruction, the spatial resolution was reduced especially along the beam (z) direction. Second, we quantified three TMM and anti-TMM pairs distributed along the x, y and z axes in the 3D vector reconstruction (Extended Data Fig. 7g-o). The net topological charge of each TMM and anti-TMM pair was calculated to be Q = 0, while the topological charge of the TMM and anti-TMM in each pair was computed to be Q = +1 (red dot) and −1 (green dot), respectively. The distance between the red and green dot in each pair is 2 voxels with a voxel size of 5 nm, further demonstrating that a spatial resolution of 10 nm was achieved along the x, y and z axes.

Calculation of the TMM density and charge
We first calculated the topological charge density of every voxel (5 × 5 × 5 nm 3 ) within the volume of the meta-lattice by discretizing the expression ρ = 3 4π ∂ x n ⋅ (∂ y n × ∂ z n) on a cubic lattice, producing a 3D map of the local maxima (positive) and minima (negative) of the charge density. At each local extremum, we chose 3 × 3 × 3 vectors surrounding the local extremum. To compute the topological charge enclosed by these vectors, we triangulated the surface and calculated the solid angle (ω) of each triangle surface subtended by three vectors (n 1 , n 2 , n 3 ), tan ω 2 = n 1 ⋅ (n 2 × n 3 ) 1 + n 1 ⋅ n 2 + n 1 ⋅ n 3 + n 2 ⋅ n 3 .
The topological charge was evaluated by Q = surface is an integer number of 4π. We evaluated the topological charge of the magnetic voids using the same approach.

Atomistic simulations using the experimental data as direct input
Four 15 × 15 × 15 nm 3 volumes of the experimentally determined 3D magnetization vector field were extracted from the ferromagnetic meta-lattice as direct input to the atomistic simulations. The four volumes contain two TMMs and two anti-TMMs, each of which is located close to the centre of each volume. A nickel fcc lattice with a lattice constant of 3.524 Å was constructed for each volume and all atomic sites within each 5 × 5 × 5 nm 3 voxel were mapped to the same normalized magnetization vector determined from the experiment, yielding a total of 296,352 atomistic spins in each volume. The dynamics of the individual atomistic spins is described by the Landau-Lifshitz-Gilbert equation of motion 56 , where S i is a unit vector at atomistic site i, γ is the gyromagnetic ratio, λ is the phenomenological coupling constant (damping) and µ m is the magnetic moment. H i eff , given by equation (11), is the effective magnetic field at site i. The total energy of the system is represented by the following atomistic spin Hamiltonian, where the first term on the right-hand side is the exchange interaction between spins at sites i and j, the second is the uniaxial anisotropy term, and the third is the Zeeman term. The exchange constant (J) and the magnetic moment (µ m ) are 2.757 × 10 −21 J per link and 0.606 Bohr magnetons, respectively 57 . The anisotropy constant, k u , and the external field, B, were neglected in the simulations. The above Hamiltonian can be represented as an effective magnetic field for the spin at site i by taking the negative first derivative, Based on these equations, we performed atomistic simulations of each volume by fixing the spins on the outer boundary of the volume. All the other spins were allowed to relax to an equilibrium configuration. After 50 ps, a stable TMM or anti-TMM formed in each volume with a topological charge matching the experimental value (Extended Data Fig. 10a-d). Further simulations showed that if the atomistic spins on the outer boundary were fixed, any random spin configuration within each volume yielded identical results. We also conducted atomistic simulations to determine how much of the boundary can be relaxed before each TMM becomes unstable. We found that as long as the atomistic spins were fixed on four of the six surfaces of each volume, the TMM remained stable inside the volume (Extended Data Fig. 10e-h). All these atomistic simulation results confirm that surface constraints can stabilize TMMs.

Code availability
The MATLAB source codes for the scalar and vector tomography reconstruction algorithms and data analysis used in this work are available at https://doi.org/10.5281/zenodo.5450910. Letter https://doi.org/10.1038/s41565-022-01311-0 Extended Data Fig. 1 | Magnetic hysteresis measurements of a Ni meta-lattice and a Ni thin film. 5 T field sweep measurements of the hysteresis loops of the Ni meta-lattice and Ni thin film at 3 K and 305 K, where the inset shows the magnified hysteresis loops at 305 K. The experiments were performed with a Quantum Design MPMS SQUID magnetometer, and a diamagnetic background subtraction was implemented by subtracting off the average of two linear fits to the data at high positive and negative fields, beyond the saturation of the samples. The thickness of the meta-lattice varies from 400 to 450 nm, measured by a scanning electron microscope. As the meta-lattice has an fcc structure (Extended Data Fig.   6), the effective thickness of Ni in the meta-lattice was estimated to be 110.5 nm by considering the fcc packing efficiency of 74%. As a comparison, a pure Ni thin film of 200 nm thick was characterized by the same experimental procedure. The hysteresis loops of the Ni meta-lattice and the Ni thin film show similar remanent magnetization and saturation magnetization at both 3 K and 305 K. The slight differences of the remanent magnetization and saturation magnetization between the Ni meta-lattice and the Ni thin film are due to two factors: i) the thickness of the meta-lattice varies from 400 to 450 nm; and ii) the experimental packing efficiency of the sample may deviate from the theoretical value of 74%.
Letter https://doi.org/10.1038/s41565-022-01311-0 Extended Data Fig. 2 | Sample preparation. a, b, Optical microscopy images of the meta-lattice sample, prepared by FIB milling. The sample was mounted on a 3-mm transmission electron microscopy grid and glued on a copper ring (b). c-f, Scanning electron microscopy images of the sample. The mounting geometry of the sample is important for the soft x-ray vector ptycho-tomography experiment with three in-place rotation angles. The meta-lattice sample was thinned to 150 nm by a FIB (f), allowing the sample to be tilted to high angles. g, X-ray absorption spectroscopy of the Ni meta-lattice sample (red curve). For a comparison, the x-ray absorption spectra of a pure Ni film (blue curve) and a NiO film (green curve) are adapted from ref. 41 . The three grey arrows indicate that the L 3 peak position of the meta-lattice agrees well with that of pure Ni, while the NiO L 3 peak is shifted to a higher energy. The black arrow shows that the absorption coefficients of the meta-lattice are in good agreement with those of pure Ni in the energy range from 885 eV to 870 eVs, but NiO has smaller values due to sphybridization. The purple arrow indicates that the L 2 peak of the meta-lattice is more consistent with that of pure Ni than of NiO. Letter https://doi.org/10.1038/s41565-022-01311-0 Extended Data Fig. 5 | Structural characterization of the sample with scanning transmission electron microscopy (STEM). a, An annular darkfield STEM image of the meta-lattice, where the rectangle with dashed lines represents the reconstruction region by soft x-ray vector ptycho-tomography and the square with solid lines shows a more ordered region. The circle indicates some imperfections in the sample. Scale bar, 200 nm. b, 2D power spectrum of the STEM image, where the sharp Bragg peaks indicate that the meta-lattice is ordered. c, Histograms of the nearest-neighbour distances between the TMM and anti-TMM, TMM and TMM, anti-TMM and anti-TMM pairs in the more ordered region (square with solid lines in (a)), which is consistent with Fig. 3d-f, obtained from the region with some imperfections (rectangle with dashed lines in (a)).
Letter https://doi.org/10.1038/s41565-022-01311-0 Extended Data Fig. 7 | Quantification of the 3D spatial resolution of the vector reconstruction. a-f, FSC for |m x |, |m y |, |m z |, |m xy |, |m xz | and |m yz |, respectively, where m x , m y , and m z are the x-, y-, and z-component of the unnormalized magnetization vector field with |m xy | = √ m 2 x + m 2 y , |m xz | = √ m 2 x + m 2 z and |m yz | = √ m 2 y + m 2 z . The FSC curves were calculated from two independent vector reconstructions of the meta-lattice. According to the criterion of FSC = 0.143 (dashed lines), a 3D spatial resolution of 10 nm was achieved with soft x-ray vector ptycho-tomography, which corresponds to a spatial frequency of 0.1 nm −1 . The FSC values for |m z | are slightly smaller than 0.143 at some high spatial frequency because only a half of the projections were used to perform each 3D vector reconstruction (Methods). Three TMM and anti-TMM pairs distributed along the x-(g-i), y-(j-l) and z-axis (m-o) in the 3D vector reconstruction. The net topological charge of each pair was calculated to be Q = 0, while the topological charge of the TMM and anti-TMM in each pair was computed to be Q = +1 (red dot) and −1 (green dot), respectively. The distance between the red and green dot in each pair is 2 voxels with a voxel size of 5 nm, demonstrating that a spatial resolution of 10 nm was achieved along the x-, y-and z-axis.