3D printed magnets for neutron spin manipulation

Devices for manipulation of the neutron spin are vital for experiments in neutron optics such as neutron interferometry. Here we introduce a new type of such devices which are based on a magnetic material that can be 3D printed in complex shapes. We have constructed a spin flipper wherein the angle of spin rotation can be adjusted by variation of the distance between magnetized pieces. As the device does not contain any heat dissipating coils we expect interferometric measurements to become more stable and hence more accurate. Results of an experiment using polarized neutrons verify the device’s functionality, and indicate the potential of the new method. A second experiment for demonstration of the 4π spinor symmetry of fermionic wave functions is in progress.


Introduction
Experiments in neutron interferometry rely on the manipulation of the neutron's spin [1,2]. A frequently needed class of devices are spin rotators or "flippers" relying on Larmor precession in a homogeneous magnetic field. They are inserted into the beam inside of the interferometer and critically affect the overall performance. Small coils, usually in the Helmholtz configuration, are the state of the art for these components [3]. During operation the electric current in these coils generates heat, and therefore the spin manipulators have to be water cooled in order to keep the temperature in the interferometer stable. Nonetheless, residual thermal gradients may always produce errors in such experiments. Figure 1 shows a typical temperature dependence of the interferometric phase induced by a water-cooled coil inserted in the interferometer. Successful physics experiments require a phase stability of at least a few degrees [2] which thus puts severe limits on the temperature stability.
Here we present an implementation of a new type of spin flipping device. Based on a geometry of permanent magnets that is variable in-situ, it allows for adjustment of the spin precession angle without any heat dissipating coils. One may thus expect interferometric measurements to become more stable and hence more accurate. An important engineering constraint was the requirement that the precession angle of thermal neutrons shall be freely selectable from a continuous range of values. In our technical solution this is achieved by setting the distance of a pair of permanent magnets from the beam, using a special holding apparatus designed for a reproducible precision of ±0.05 mm.
Key ingredient for the manufacture of the spin flipper is a magnetic polymer that can be 3D printed (see Sect. 2) [4]. The printing technique, described in Sect. 3, enables a e-mail: richard.wagner@tuwien.ac.at complex magnet shapes as needed for our device, which were designed using Finite Element Methods (FEM) [5]. The experiments to test the spin flipper's performance are described in Sect. 4.

Base material for 3D printing
Thermoplastic feedstock, in the form of a wire filament, is a common base material for 3D printing. Such filaments are available with different properties that require appropriate printer parameters (like temperature or printing speed). Commercial filaments are available with diameters of 1.75 and 2.85 mm (see e.g., Innofil3D 1 , a subsidiary company of BASF).
Filaments with permanent magnetic properties are currently not commercially available. Therefore, the prefabricated compound material Neofer 25/60p from Magnetfabrik Bonn GmbH was used to develop a new printing material. This polymer-bonded magnetic compound consists of a polyamide matrix (PA11) and the magnetically isotropic NdFeB powder MQP-S-11-9 from Magnequench Corporation. It is processed into printable filaments with the powder making up 85% of the final product by weight [4].
These magnetic filaments can be printed using a low-cost Fusing Deposition Modeling (FDM) 3D printer. A maximum printing temperature of 260 • C, and a nozzle diameter of 0.4 mm are used. Structures with layer heights between 0.05 and 0.3 mm are printable with our setup, allowing us to manufacture polymerbonded rare-earth magnets with complex shapes [6]. Figure 2 shows a photograph of the printer and a scanning electron microscope (SEM) image of a filament. Detailed investigations of the magnetic properties of the material used can be found in [4].

Magnet design and 3D printing technique
Shapes for spin flipper magnets were designed with the help of FEM methods, including in particular an inverse stray field computation and topology optimization [5,6]. This work uses a density method with the material distribution ρ as a variable to solve the topology optimization. At each point in space, material is either present, indicated by a 1, or absent, indicated by a 0. This leads to one optimization variable per spatial cell [7].
For the design of a configuration of magnetic field sources, with the goal to generate a homogeneous field in the desired region of space, we define the objective function To fullfill the criteria of homogeneity the gradients of B x and B y must be zero, while for the B z only the derivatives along x and y must vanish. The algorithm implemented minimizes the objective function J (ρ), and hence all undesired field gradients, for best homogeneity of the magnetic field density in the design domain f (see    3). Outside f the influence of the magnets on the neutron phase is negligible. This optimization technique is implemented in the FEM library FEniCS [8] and dolfinadjoint [9].
The primary goal is to produce a field geometry for which the spin precession angle is the same for all neutrons in the beam passing through the spin flipper. The device adds a local field B z parallel to a guide field oriented in z direction, about which the neutron spins precess in the xy plane. The rotation angle in a spatially homogeneous field is given by where µ n = −9.6623647 × 10 −27 J/T is the magnetic moment of a neutron, and l is the length over which the field acts. A rotation by π for thermal neutrons with velocity v ∼ 2200 m/s thus requires a field integral of B z l ∼ 35 mT mm. The lateral dimensions of the field box with size 7 × 7 × 40 mm 3 (a × a × L) define the maximum size of the neutron beam traveling through f . To parametrize the magnetic field dependence of the phase accumulated by the neutrons in presence of slight inhomogeneities, we define a quantity which we refer to as the magnetic action: For a homogeneous field, κ = B z l. Figure 4 shows the magnets as fabricated after the optimization process sketched above. A remanence field of B r = 61 mT of the segments generates an action of κ = 35 mT mm for a gap of z = 2.25 mm. Due to a linear correlation between the magnetic action and small changes in the gap distance, κ is adjustable. Figure 5 shows how κ can be varied over a wide range and still perform comparably to a Helmholtz coil.
To compare both designs the relative error, defined as the deviation from the field generated by the either configuration divided by our design goal, the magnetic action of the field box f (in our case a homogeneous field): has been calculated from the simulation and optimization results for different gap sizes z. J is defined by the functional of Eq. (1). For the Helmholtz coil geometry the relative error is independent of κ. Note that in the range from κ = 30-40 mT mm, the topology optimized version shows an even better performance than the Helmholtz coil design. The 3D printed polymer-bonded magnets are not magnetized during the printing process. This is done in a final step inside an electromagnet, where flux densities up to 1.9 T can be achieved, and wherein the segments are placed with the necessary orientation using a plastic holder. They are first exposed to a low value of external magnetic field for 2 seconds. Then the field is switched off, and the magnetic flux density B z due to the partially magnetized segments is measured using a 3-axis Hall probe. In subsequent steps the same is done, each time with an incrementally increased field value. The process was stopped after application of 220 mT, after which we obtained B z = 1.18 mT in the center. This is the value which, according to the FEM simulation, corresponds to the desired action κ. The experiments described in the next section demonstrate that with this approach the remanence B r could be adjusted with sufficient accuracy.

Experimental tests of performance
Neutron experiments to test the performance of the 3D printed spin flipper were performed at the TRIGA MARK-II reactor at the Atominstitut, Vienna.

Spin-Flip verification tests
The first experiment was carried out at a polarimeter beamline. The goal was to demonstrate that polarized neutron spins can be flipped using the 3D printed device. Figure 6 shows a schematic of the setup used. To control the position of the magnets relative to the beam, they were put in a specially designed holder that was 3D printed using a commercial synthetic polymer filament (Ultimaker ABS Acrylonitrile butadiene styrene, 2.85 mm). The distance z between the two pairs of magnets (compare Fig. 3 and Fig. 6) was adjusted using an Arduinodriven stepper motor.
The incoming neutrons were polarized along the y-axis (flight direction) and precessed in the guide field of 1.3 mT in z direction (not shown in the schematics) that was applied to the whole installation and defines the quantization axis for the polarizer and the analyzer. A DC coil in front of the polarizing supermirror of the analyzer rotates the neutron spin by π/2 about the x-axis. The phase of the neutron spin in the xy plane thus becomes encoded as a polarization in z direction. By varying the distance of the DC coil to the spin flipper, different total precession angles are selected. A modulation of neutron intensity in the detector is observed as a function of this distance.
With the correct separation z of the magnets, one can shift this modulation by π , as shown in Fig. 7. The relative phase is extracted from the results of a least-squares fit to a cosine function for each curve (solid lines).
A figure of merit for the quality of the spin-flipping process is the spin contrast C S where I π−flip (I no flip ) is the neutron intensity at the detector measured after a π -flip (no flip). Here we achieved C S > 95%, with gap size of z = 2.25 mm. This is comparable to the performance of conventional spin manipulators used inside interferometers [10].

Demonstrating 4π spinor symmetry of the wave function
After testing the new spin-flipper with the polarimeter, we evaluated its performance in a perfect-crystal neutron interferometer. The experiment we chose was the demonstration of the 4π (spinor) symmetry of the neutron's wave function [11]. The wave function acquires a minus sign after collecting a phase shift χ of 2π , and  Interferograms are be recorded as a function of an additional phase difference between the two paths, induced by rotating the phase shifter.
returns to its initial form only after another 2π phase shift: The experimental setup is shown in Fig. 8. An unpolarized neutron beam with a cross section of 10 × 10 mm 2 is split in paths I and II after the first of four plates of a skew-symmetric interferometer. An additional 7 × 7 mm 2 aperture made of cadmium is placed in front of the magnets to restrict the neutron beam to the field box f . A phase shifter plate made of aluminum can be rotated to create a phase difference χ between the two paths. The 3D printed spin flipper with variable z is placed in path II. At the last interferometer plate, the two paths are recombined and leave the interferometer in two separate beams: the O beam in the forward direction, and the reflected H beam. The O beam intensity I O of an empty interferometer as a function of χ can be written as [1]: where A serves for normalization, and C is an interferometer-dependent contrast. This relation produces a periodic intensity modulation when the phase χ is varied. The contrast is a value between 0 and 1, defined as the ratio between a measured interferogram's amplitude and mean.
A value of C = 1 is also referred to as a "perfect" contrast of 100%. A phase shift and a spin rotation in one of the beam paths can be described by the unitary operator [12]: with σ the Pauli spin vector and α = αα the vector describing a rotation around the unit vectorα by an angle α. For unpolarized incident neutrons, as in this experiment, the intensity of the outgoing beam is then found to be [12]: where C O is the contrast for the forward neutron beam from an empty interferometer (i.e., without spin-flipper). By comparing Eqs. (7) and (9), and considering the fact that the contrast can only have positive values, we find the following relation between α and the contrast: We see that if α equals (2n + 1)π , where n is an integer, the contrast vanishes. The rotation angle α depends on the gap size between the magnets, through the corresponding variation in κ. The 4π symmetry can be deduced from relating the periodic modulation of the interferometric contrast with relative phase of the interferograms under variation of α. We recorded a series of interferograms I O (χ ) for different values of z. Figure 9 shows the observed variation of contrast which follows the dependence expressed in Eq. (10). In our measurement we see the contrast vanish for a gap z of 2.5 mm. For this measurement campaign the magnets had been magnetized to a remanence B r of 122 mT to have a longer range of adjustable field strengths. The point where the contrast vanishes corresponds to α = 3π (n = 1). At a gap distance of 8 mm the limit of the sample holder was reached. To continue with measurements beyond the range of this PPNS 2018 campaign, the magnets had to be re-magnetized to stronger or weaker external fields. The results of this procedure and a more detailed analysis are presented in [13].

Conclusion
We have successfully realized a new type of a spin flipper that can be 3D printed using custom magnetic filaments. First measurements with a neutron polarimeter verified its functionality. As a first application, proof-of-principle experiments on a neutron interferometer were performed, demonstrating the well-known 4π symmetry of spinor wave functions.
With these tools (the FEM methods for magnet design, and the 3D printable material) other designs for spin flippers could also be envisaged. Possibilities for neutron spin manipulation could be further expanded using non-homogeneous field configurations. Our new type of devices may be particularly useful wherever the effects of heating or inductance from conventional magnet coils are undesirable.