Evolutionary Algorithm Optimization of Zeeman Deceleration: Is It Worthwhile for Longer Decelerators?

In Zeeman deceleration, only a small subset of low-field-seeking particles in the incoming beam possess initial velocities and positions that place them within the phase-space acceptance of the device. In order to maximize the number of particles that are successfully decelerated to a selected final velocity, we seek to optimize the phase-space acceptance of the decelerator. Three-dimensional particle trajectory simulations are employed to investigate the potential benefits of using a covariance matrix adaptation evolutionary strategy (CMA-ES) optimization method for decelerators longer than 12 stages and for decelerating species other than H atoms. In all scenarios considered, the evolutionary algorithm-optimized sequences yield vastly more particles within the target velocity range. This is particularly evident in scenarios where standard sequences are known to perform poorly; simulations show that CMA-ES optimization of a standard sequence decelerating H atoms from an initial velocity of 500 ms–1 down to a final velocity of 200 ms–1 in a 24-stage decelerator produces a considerable 5921% (or 60-fold) increase in the number of successfully decelerated particles. Particle losses that occur with standard pulse sequences—for example, arising from the coupling of longitudinal and transverse motion—are overcome in the CMA-ES optimization process as the passage of all particles through the decelerator is explicitly considered and focusing effects are accounted for in the optimization process.


■ INTRODUCTION
In order to investigate the role that collision energy and internal energy play on the outcome of a reactive collision, one requires the ability to control these parameters. In a supersonic expansion, where the mean free path of the particles becomes smaller than the orifice from which they are escaping, particles collide frequently and adiabatic cooling occurs, generating an internally cold beam. The decrease in rotational energy (and, to a lesser extent, vibrational energy) is compensated for by the increased kinetic energy of the beam in the laboratory frame. 1−3 Several methods have been adopted to mitigate the high forward velocities of supersonic beams to facilitate the study of reactions at low collision energies. One such approach involves the crossing of two supersonic beams at very shallow angles, such that the relative velocity of each beam is minimized; the velocity matching and merging of two beams at a zero crossing angle has been successfully demonstrated by several groups. 4−8 An alternative approach to merging two velocity-matched beams is to remove kinetic energy from a single supersonic beam before it encounters a target of trapped reactants. 9 In Stark 10 and Zeeman 11,12 decelerators, particles in low-fieldseeking (LFS) quantum states are repeatedly obliged to travel through regions of a positive electric or magnetic field gradient, so that their forward velocity is progressively diminished. Typically, only a small fraction of LFS particles in the beam are successfully decelerated; only a subset of particleswith favorable initial positions and velocitiesfollow stable trajectories through the decelerator. The region of phase space covering these favorable combinations of initial positions and velocities is referred to as the phase-space acceptance of the decelerator. For our purposesthe study of collisions between decelerated neutral particles and trapped ionsa large phasespace acceptance is desirable as it maximizes the number of decelerated particles that are produced. For other purposes, such as high-resolution spectroscopic studies or crossed beam experiments, it may be experimentally advantageous to optimize the number density, or to minimize the velocity spread, of the decelerated beam.
The periodic longitudinal (axial) deceleration experienced by the particles inside of a Zeeman decelerator is accompanied by periodic transverse (radial) focusing and defocusing 13,14 (see Figure 1). The interaction between the particles' longitudinal and transverse motion can lead to particle loss and thus reduce the phase-space acceptance of the decelerator, hindering the efficiency of the deceleration process. 13,15,16 Moving magnetic trap (or traveling wave) decelerators 17,18 have overcome particle loss arising from strong transverse focusing at low velocities (below 100 ms −1 ) by confining and transporting particles within a three-dimensional traveling potential well. In a new design of Zeeman decelerator, 22,23 the same problem is addressed by alternating solenoid coils for deceleration with magnetic hexapoles that focus the beam radially. The use of nonstandard modes of operation with conventional decelerators has also achieved decoupling of the longitudinal and transverse motion of the particles. Such nonstandard approaches include adopting the s = 3 mode (i.e., using every third stage for deceleration while the remaining stages focus the beam) 19,20 or reversing the current direction in a mid-decelerator coil to create a quadrupolar field that transversely refocuses the particles halfway through the deceleration process. 21 However, sacrificing decelerator stages to focus the beam, rather than decelerate the particles, means that far less kinetic energy can be removed.
In this work, we seek to establish the extent to which the phase-space acceptance of a 24-stage Zeeman decelerator can be optimized using evolutionary algorithm (EA) strategies alone, without sacrificing decelerator coils for focusing and without incorporating additional hexapole focusing elements into the decelerator beamline. We have previously demonstrated that for a short 12-stage Zeeman decelerator EA-optimized sequences yield 40% more decelerated hydrogen atoms compared to standard sequences (for the same final velocity), in addition to being able to remove significantly more kinetic energy from the beam (operating under the same experimental constraints). 24 Here, we explore the significance of EA strategies in optimizing the deceleration of hydrogen atoms by a 24-stage Zeeman decelerator, evaluating their performance using three-dimensional particle trajectory simulations. We also consider the importance of EA strategies when decelerating deuterium atoms to probe how beneficial EA optimization is when applied to the Zeeman deceleration of species other than H atoms. Previous studies have employed a similar EA approach to optimize the operation of Stark 25 and Zeeman 13 decelerators, seeking to maximize the number of decelerated species able to be loaded into a trap. In both cases, an increase in the number of decelerated particles was reported following EA optimization. Our ultimate goal is to use the Zeeman decelerator for collision studies, as opposed to trapping. Detailed simulations of a 24stage Zeeman decelerator are presented, demonstrating a significant increase in the number of particles that are successfully decelerated. As such, we find that the many benefits of employing EA optimization strategies are not confined to short decelerators nor are they limited to H atoms as the target particle.
■ THEORY Generation and Optimization of Sequences. Threedimensional particle trajectory simulations are performed to guide the selection of current switching sequences for the solenoid coils of a Zeeman decelerator and to evaluate the performance of these sequences. The Oxford Zeeman decelerator (upon which the simulations are based) has been described previously 21 and is composed of a series of solenoid coils to which a current of 243 A is applied when they are pulsed (i.e., switched on), generating a maximum on-axis magnetic field of up to 1.8 T at the center of each coil. It should be noted that, in contrast to previous work conducted on a 12-stage decelerator, the decelerator simulated here has 24 solenoid coils. Each of these coils has an inner diameter of 7 mm, outer diameter of 10.6 mm, and length of 8.5 mm. The center-to-center distance between neighboring coils is 10.7 mm, and the magnetic field produced when current is applied to each coil is calculated using the analytical solution for a current loop. 26 The initial velocities and positions of the simulated particles are drawn from normal distributions, based on the experimental conditions. A velocity Verlet algorithm 27 integrates Newton's equations of motion every 100 ns, with acceleration forces calculated considering the quantum state of the particle and the magnetic field at the particle's position. When particles encounter a surface (such as the skimmer or a decelerator coil), they are removed from the simulation. As in previous work, 24 the detection laser is aligned with the x axis (perpendicular to the direction of propagation of the decelerated beam) and is represented as a Gaussian along the z and y axes. Particles only contribute to the simulated signal if they pass through the detection region, corresponding to the region illuminated by the detection laser in the experimental apparatus. For both hydrogen and deuterium atoms, the most LFS Zeeman state of the electronic 2 S 1/2 ground state is simulated, i.e., M F = 1 and 3/2, respectively (where M F is the projection of the total angular momentum F onto the local magnetic field direction). Simulations are carried out for 100 000 particles, unless otherwise specified.
The amount of kinetic energy removed per Zeeman decelerator stage depends on the magnetic moment of the quantum state that is addressed and on the effective phase angle, ϕ 0 . The latter indicates the position of the particles inside of a solenoid coil when the current applied to that coil reaches zero after being switched off. The relative position of a given particle with respect to the center of the nearest coil is termed the phase angle, ϕ, which is 90°at the center of a coil and 0°between two coils. Each coil of the decelerator removes an amount of kinetic energy (ideally) equal to the Zeeman energy of the quantum state, given the specific magnetic field at the position of the particle when the coil is switched off. Maximum deceleration is achieved with ϕ 0 = 90°. A lower ϕ 0 value leads to less kinetic energy being removed at each stage and therefore higher final velocities; ϕ 0 > 90°leads to re-acceleration of the particles. Thus, by applying a precisely timed switching sequence to the coils of a Zeeman decelerator, one can (in theory) slow a packet of quantum-state-selected particles to any final velocity, subject to the number of deceleration stages available. In reality, experimental limitations tend to restrict the range of final velocities that can be achieved; as applying high currents to the solenoid coils generates a significant amount of heat, each coil can be "on" for only a limited length of time. Furthermore, the number of decelerated particles transmitted as a function of phase angle is not constant; it is governed by the complex interplay between longitudinal and transverse focusing of the particles within the decelerator. Indeed, the magnetic field at the entrance of a coil is concave in the radial direction, and therefore, the particles are transversely defocused at low ϕ 0 values (see Figure 1. Magnetic field (in Tesla) generated by one solenoid coil as a function of the longitudinal (z) and transverse (r) distance from the center of the coil (r = z = 0 mm). The two red lines highlight the concave (defocusing) transverse magnetic field turning convex (focusing) toward the coil center.
The Journal of Physical Chemistry A Article Figure 1). Increasing ϕ 0 toward 90°allows the particles to travel further inside of the coil before the magnetic field is switched off, where they experience transverse focusing due to the radial field becoming convex. The enhanced transverse focusing at large ϕ 0 values is counterbalanced by the longitudinal defocusing due to the loss of particles that travel past ϕ 0 = 90°and get accelerated and transverse overfocusing. Hence, the number of successfully decelerated particles is typically maximized at "intermediate" values of ϕ 0 ≈ 50°. 13 Yet, operating a "short" decelerator (i.e., one with only 10−20 stages) at an intermediate effective phase angle significantly reduces the amount of kinetic energy that can be removed from the beam.
Standard deceleration sequences are obtained by simulating an idealized "synchronous" particle that travels along the decelerator axis with a selected initial forward velocity, v z initial .
As the synchronous particle travels through each coil, it gets decelerated until the current is switched off, which is when the particle reaches the position inside of the coil corresponding to the selected phase angle ϕ 0 . The time at which the particle reaches ϕ 0 within each of the coils of the decelerator is recorded and used to construct a standard switching sequence. This standard switching sequence consists of a series of switching times and pulse durations for each of the coils and is calculated such that there is a temporal overlap of 6 μs between the pulses applied to neighboring coils (to maintain a nonzero quantization magnetic field along the decelerator beamline to avoid spin− flips). 28 Standard sequences are optimized using a covariance matrix adaptation evolutionary strategy (CMA-ES) 29 that adjusts the duration of the current pulses applied to each of the coils in order to maximize the number of particles decelerated to a selected final velocity, v z final . The optimization begins from an input deceleration sequence (a standard sequence) from which the pulse durations for each of the coils are extracted. For each coil, a multivariate normal distribution is created, with the mean corresponding to the pulse duration of the coil in the input sequence and a standard deviation of 10 μs. A set of λ durations are randomly drawn from each distribution; when a duration that is below (or above) the permitted pulse length range is drawn, it is replaced with the minimum (maximum) permitted value. As with the standard sequences, the current pulses applied to each coil must be between 12 and 60 μs in length, with the minimum "on" time set by the finite rise and fall times of the pulses and the maximum arising from the limited cooling efficiency of the solenoid coils. The first generation of λ candidate sequences is created from the randomly drawn pulse durations. Each trial sequence is evaluated and ranked based on the number of particles with a final velocity that falls within the target velocity range. To evaluate each trial sequence, the passage of a beam of 50 000 particles through the decelerator is simulated, and the fraction of particles that reach the detection region with a longitudinal velocity within the selected target range is recorded. After ranking the trial sequences, the worstperforming sequences are discarded, while the durations from the best-performing sequences are used to update the multivariate distributions of durations for each coil. λ new durations are drawn from these updated distributions to create a second generation of trial sequences, which are again evaluated and ranked. The iterative optimization process ends when the overall best-performing sequence has not been updated for 50 000 generations. In this way, EA optimization strategies maximize the phase-space acceptance of the decelerator, thereby max-imizing the number of decelerated particles obtained for a given final velocity.

■ RESULTS AND DISCUSSION
In a previous study, we compared the performance of a standard sequence with an EA-optimized sequence using a 12-stage Zeeman decelerator. 24 From the same initial velocity distribution (v z initial = 500 ms −1 for the synchronous particle in the standard sequence) and a comparable final velocity (v z final = 205 ms −1 for the standard sequence and v z final = 200 ms −1 for the EA sequence), the EA-optimized sequence yielded 40% more decelerated H atoms than the standard sequence. This increase in signal was confirmed experimentally and was attributed to an improved "two-stage" deceleration mechanism, whereby a broader range of the initial phase-space distribution was able to be captured. Faster-moving particles from the incoming beam were found to be targeted in the "first stage" (corresponding to coils 1−5), with the initially slower-moving particles addressed in the "second stage" (corresponding to coils 6−12). As the EA approach included all components of the incoming beam, instead of one synchronous particle (as in the standard sequences), the optimization process automatically considered focusing effects as the particles traveled through the decelerator. In this way, a large number of particleswith a range of initial velocities and positionswere able to be decelerated using the EA-optimized sequences as the phase-space acceptance of the decelerator was maximized. The benefits of adopting EA optimization strategies have thus been clearly demonstrated for H atoms in a 12-stage Zeeman decelerator, with significant increases in both the number of decelerated particles and the amount of deceleration achievable. Questions remained, however, as to how beneficial EA optimization would be for a longer decelerator, where phase-space stability is more crucial, or for species other than H atoms. Here, we extend our simulations to consider a 24-stage Zeeman decelerator in a bid to quantify the potential benefits of using a CMA-ES method to optimize pulse sequences for a range of scenarios.
Comparison between Standard Sequences and EA-Optimized Sequences for a 24-Stage Decelerator. H atoms are flown through a 24-stage decelerator, with the experimental restrictions on pulse length (set out above) observed and adopting the same incoming beam parameters as in the 12-stage decelerator study. 24 The standard sequence decelerates the synchronous particle from v z initial = 500 ms −1 to v z final = 203 ms −1 , using a phase angle of ϕ 0 = 24°. The phase angle is lower than that in the 12-stage study as, with more solenoid coils in the 24-stage decelerator, less kinetic energy needs to be removed per stage. As in the 12-stage study, the CMA-ES method is employed to optimize the number of H atoms reaching the end of the 24-stage decelerator with v z final = 200 ± 10 ms −1 .
At low phase angles, as employed for the standard sequence with ϕ 0 = 24°, the longitudinal and transverse oscillation frequencies of the decelerated particles become comparable, and parametric amplification leads to particle loss. 13,15 This manifests as an empty region of phase space inside of the separatrix (i.e., the region of stable trajectories), as can be seen in the phase-space distribution plots in Figure 2a. Relatively few particles are successfully decelerated from v z initial = 500 ms −1 to v z final = 203 ms −1 using the standard sequence in the simulated 24coil decelerator. Performing a CMA-ES optimization of the switching sequences, as described above, yields a huge 60-fold increase in the number of particles successfully decelerated to The Journal of Physical Chemistry A Article the target velocity range (v z final = 200 ± 10 ms −1 ) compared to the standard sequence (with v z final = 203 ± 10 ms −1 ). The EAoptimized sequence also achieves a higher density of particles compared to the standard sequence. Considering the maximum number of particles in an 8 mm 3 volume (2 × 2 × 2 mm cube, relevant for crossed beam studies), the EA-optimized sequence gives a particle density 15 times higher than that produced by the standard sequence. This result is achieved without the inclusion of any particle density optimization criteria in the EA. EA optimization thus yields a vastly more efficient outcome than the standard sequence approach when operating a 24-stage decelerator at a low phase angle.
As is evident from inspection of Figure 2, the phase-space acceptance of the EA-optimized solution is fundamentally different than that achieved by the standard sequence. The EAoptimized phase-space plots are also different from the result expected when decelerating using the s = 3 approach: when operating with the s = 3 configuration, the separatrix is typically completely and uniformly filled, with all evidence of parametric amplification lost. 13,15,16 While there is uniform density inside of the phase-stable region for the EA-optimized sequence, the shape of this region is distinctly different from that of the standard sequence. This arises because EA optimization strategies do not explicitly seek to fill the separatrix (as the s = 3 approach does). Instead, the total number of decelerated particles within the target velocity range is maximized. As a result, a different region of phase space is stable compared to the standard sequences, whether in the conventional or in the s = 3 mode of operation. It may be possible to further increase the number of particles decelerated by optimizing the properties of the incoming beam, for example, by adjusting the length or diameter of the capillary attached to the face plate of the pulsed valve or by altering the length of the pulse generated by the valve. As Figure 2b (left panel) shows, the EA-optimized sequence preferentially targets particles located in the front half of the incoming beam (high z values). Amending the z-axis spread of the incoming beam could potentially increase the number of particles falling within this phase-space acceptance region. Alternatively, a different EA-optimized solution might be identified for an incoming beam with a broader (or narrower) spread of velocities or z-axis distributions. Simulations that consider a range of incoming beam distributions are ongoing.
As previously mentioned, maximum deceleration is achieved when a phase angle of ϕ 0 = 90°is adopted. Operating the 24stage decelerator with ϕ 0 = 90°enables particles to be decelerated from an initial velocity of v z initial = 640 ms −1 down to v z final = 81 ms −1 (using the same incoming beam of H atoms as in the ϕ 0 = 24°simulations). EA optimization of the switching sequence for a final velocity of v z final = 80 ms −1 produces 4.6 times as many particles within ±10 ms −1 of the target velocity as the standard sequencea significant increase. The evolution of the decelerated bunch as it travels through the coils of the decelerator is shown in Figure 3. The spread in v z and z is clearly different for the two switching sequences, both as the bunches traverse the decelerator and in the z-axis spread of the decelerated particles as they reach the detection region. Overall, EA optimization appears to be even more beneficial when optimizing standard sequences at low ϕ 0 compared to high ϕ 0 . This could be due to the significant particle loss observed at low ϕ 0 for standard sequences, 13,15 which is overcome by taking into account focusing effects during the optimization process. A key benefit of using EA optimization strategies is that any parameter can (in theory) be optimized for; should one wish to minimize the z-axis spread of the output, as may be desirable for trapping experiments, then the relevant criterion can be added to the optimization process.
Comparison between EA-Optimized Sequences for a 12-Stage and 24-Stage Decelerator. There is clear evidence that EA optimization of switching sequences is beneficial for both 12-stage and 24-stage Zeeman decelerators. This is particularly obvious for the 24-stage decelerator operated at a low phase angle, where the EA-optimized sequence generates 60 The trajectories of 1 000 000 particles are simulated. Note that only particles that are successfully decelerated to final velocities within the target ranges are shown: particles decelerated to within ±10 ms −1 of the target velocity are plotted in red (a) and blue (b) for the standard and EA-optimized sequences, respectively. A wider contour of particles decelerated to the target velocity ±100 ms −1 is also shown for reference, in orange (a) and light blue (b). The dashed parallel lines in the lefthand-side panels represent the boundaries of the initial phase-space distribution of the incoming beam. The Journal of Physical Chemistry A Article times as many particles in the target velocity range as the standard sequence. In fact, we find that the improvements in the number of decelerated particles with EA-optimized sequences over standard sequences (even when operating with a phase angle of ϕ 0 = 90°) in a 24-stage decelerator are even greater than what was observed with the shorter 12-stage decelerator. 24 It is interesting to compare the EA-optimized switching sequences generated for the 12-stage and 24-stage decelerators with the same final target velocity (v z final = 200 ms −1 ). While the same incoming beam is employed in both cases, the initial velocity spread of the targeted particles is quite different. This is because the 24-stage decelerator has more coils to play with and therefore does not need to preferentially select slow-moving particles from the initial distribution. Yet, as Figure 4 illustrates, the deceleration mechanism is similar in both cases: the first stages serve to decelerate the initially faster-moving particles in the bunch until all particles have a velocity centered at around 420 ms −1 , after which all particles are progressively decelerated as they travel through the later stages of the decelerator. Comparing the length of time that current pulses are applied to the coils in the EA-optimized switching sequences, it can be seen (in Figure 5) that the pulse durations for the final 9 stages follow a similar pattern in both the 12-stage and 24-stage sequences.
Decelerating Deuterium Atoms. Hydrogen atoms represent something of a special case as their magneticmoment-to-mass ratio makes them particularly amenable to Zeeman deceleration. In order to assess the usefulness of EA optimization strategies when addressing species other than H atoms, we simulate the deceleration of deuterium (D) atoms through the 24-stage decelerator. All other parameters, including the properties of the incoming beam and limitations placed on pulse duration, are unchanged from those of the H atom studies (as set out above). At a phase angle of ϕ 0 = 90°, standard sequences decelerate D atoms from v z initial = 500 ms −1 to v z final = 207 ms −1 over the 24 stages. The EA-optimized sequence for a comparable final velocity of v z final = 200 ms −1 produces 2.6 times as many particles in the target velocity range (within ±10 ms −1 of v z final ) than the standard sequence (see Figure 6), confirming that the advantages of employing EA optimization strategies extend to species other than H atoms.
The deceleration mechanism adopted by the EA-optimized switching sequence to decelerate D atoms down to v z final = 200 ms −1 over 24 stages (see Figure 7b) shares several key features with the deceleration mechanisms observed with EA-optimized switching sequences for decelerating H atoms to the same final velocity over 12 and 24 stages (see Figure 4a,b). In all cases, the first several coils preferentially decelerate the faster-moving particles from the incoming beam, until there is "bunching" of the velocity distribution. The final several coils then serve to decelerate all particles until the target final velocity is reached. However, when compared to the H atom switching sequences, there is more pronounced deceleration of the slower-moving particles from the incoming beam over the first few coils with the EA-optimized D atom sequences.
As was seen with the deceleration of H atoms over 24 stages, the benefits of EA optimization become even more pronounced   The Journal of Physical Chemistry A Article when decelerating D atoms at lower phase angles. Operating with a phase angle of ϕ 0 = 57°, standard sequences can decelerate D atoms from v z initial = 500 ms −1 down to v z final = 300 ms −1 but with missing density in the separatrix arising from transverse defocusing effects. Again, EA optimization strategies overcome these issues as they consider the passage of all particles through the 24 coils, meaning that coils need not be sacrificed for focusing as required by nonconventional modes of operation (such as using a mid-decelerator coil for focusing or adopting an s = 3 approach). Indeed, the EA-optimized sequence for decelerating D atoms to the same final velocity yields 6.7 times the number of decelerated particles with v z final = 300 ± 10 ms −1 .

■ CONCLUSIONS
In summary, detailed three-dimensional trajectory simulations of a 24-stage Zeeman decelerator provide compelling evidence in favor of adopting EA optimization strategies when using longer Zeeman decelerators. Previous work on a 12-stage decelerator highlighted the benefits of using CMA-ES optimization for the deceleration of H atoms in a short Zeeman decelerator. 24 Here, we clearly demonstrate that the same principles can be applied to longer Zeeman decelerators and to species other than H atoms. The benefits of using EA-optimized switching sequences are found to be even more pronounced in the 24-stage decelerator simulations than was seen with a 12stage decelerator. This is attributed to the increased importance of maximizing the phase-space acceptance of the decelerator when there are more stages for the particles to negotiate. Under all of the conditions considered in this workencompassing the deceleration of H atoms to final velocities of 200 and 80 ms −1 and the deceleration of D atoms to final velocities of 300 and 200 ms −1 EA-optimized sequences outperform standard sequences. The benefits of EA optimization strategies are particularly evident when compared to standard sequences with low phase angles, where there are known issues with particle losses. We plan to extend the simulations to consider even longer decelerators, lower final velocities, and more complex radical species in the near future. As these findings illustrate, CMA-ES methods are both powerful and versatile when applied to the optimization of Zeeman decelerator pulse sequences. One can achieve significant increases in the number of particles decelerated to a selected velocity when compared to standard sequences, circumventing the need for nonconventional modes of operation and allowing all stages to be utilized for deceleration.