Aberration Corrected Emittance Exchange

Full exploitation of emittance exchange (EEX) requires aberration-free performance of a complex imaging system including active radio-frequency (RF) elements which can add temporal distortions. We investigate the performance of an EEX line where the exchange occurs between two dimensions with normalized emittances which differ by multiple orders of magnitude. The transverse emittance is exchanged into the longitudinal dimension using a double dog-leg emittance exchange setup with a five cell RF deflector cavity. Aberration correction is performed on the four most dominant aberrations. These include temporal aberrations that are corrected with higher order magnetic optical elements located where longitudinal and transverse emittance are coupled. We demonstrate aberration-free performance of an EEX line with emittances differing by four orders of magnitude, \textit{i.e.} an initial transverse emittance of 1~pm-rad is exchanged with a longitudinal emittance of 10~nm-rad.

Full exploitation of emittance exchange (EEX) requires aberration-free performance of a complex imaging system including active radio-frequency (RF) elements which can add temporal distortions. We investigate the performance of an EEX line where the exchange occurs between two dimensions with normalized emittances which differ by multiple orders of magnitude. The transverse emittance is exchanged into the longitudinal dimension using a double dog-leg emittance exchange setup with a five cell RF deflector cavity. Aberration correction is performed on the four most dominant aberrations. These include temporal aberrations that are corrected with higher order magnetic optical elements located where longitudinal and transverse emittance are coupled. We demonstrate aberration-free performance of an EEX line with emittances differing by four orders of magnitude, i.e. an initial transverse emittance of 1 pm-rad is exchanged with a longitudinal emittance of 10 nm-rad.

I. INTRODUCTION
Emittance exchange (EEX) [1][2][3][4] is the process by which the emittance (phase-space) of an electron bunch in two dimensions is fully coupled and exchanged. Potential applications include bunch compressors [3], phase space manipulations for x-ray free electron lasers (FEL) [4] and current profile shaping for plasma or dielectric wakefield acceleration [5][6][7][8]. Additionally, this innovative geometry led to the proposed exchange of a transversely modulated electron beam for the use of x-ray generation via coherent inverse Compton scattering [9,10] or by seeding a FEL [11]. On the mm scale this transverse modulation can be imparted by a slotted mask [2,11] and can be used for a THz radiation source [5]. On the nanometer scale, the production of coherent x-ray beams has been proposed by transferring a spatial electron modulation from a nanocathode [9] into a temporal modulation using emittance exchange.
Inherently, most applications desire the EEX line to exchange a relatively large emittance with a small one. The exchange of transversely patterned beams into a longitudinal nanobunching is an excellent example of the extreme mismatch in emittance between the initial transverse emittance of one nanobunch compared to its longitudinal emittance. For the modulation period required for coherent x-ray generation this ratio approaches 10 4 . Each nanobunch originates within a small fraction of the total beam, therefore it has a small fraction of the total emittance, yet that small emittance must be fully exchanged with (nearly) the total emittance in the longitudinal plane. Residual coupling with the original dimension, resulting in incomplete exchange and subsequently emittance growth, limits the performance of the EEX line. Detailed first order analysis has led to EEX configurations that can fully exchange the emittance in two dimensions when considering first order analytical treatments [4,5]. However, there has been no detailed analysis of the aberrations present in the system which re-sult in emittance growth and set the ratio of emittances which can be exchanged. Additionally, aberration corrected imaging has not been implemented to improve the performance of EEX. Aberration correction in low energy electron optics has been driven by the quest to image individual atoms using electron microscopes, where sub-angstrom resolution [12] has been achieved. In electron microscopes, optics are typically limited to systems with no temporal dependence due to the low currents and lack of time varying electromagnetic fields. In EEX, the optics include temporal aberrations which we find can be corrected with higher order magnetic optical elements located where longitudinal and transverse emittance are coupled.
In this paper we present the aberration corrected geometry for an EEX beamline and demonstrate exchange of transverse and longitudinal emittances which differ by four orders of magnitude. This extreme difference between transverse and longitudinal emittance is representative of a single nanobunch in a transversely modulated beam. We only consider aberrations from externally applied fields such as quadrupole magnets and radiofrequency (RF) deflecting cavities. The beam's space charge field may also result in phase space distortions and emittance growth, but these effects depend on the particular beam being considered and require numerical studies beyond the scope of the present work. Section II details the general first order theory for an EEX beamline and the matching conditions required at its input to produce an electron bunch that is uncorrelated in time and energy at its output. A comparison between the analytical and numerical performance for an EEX beamline is discussed in Section III. Section IV explains the dominant sources of aberrations in the EEX beamline and the placement of aberration-correcting magnetic elements. Numerical simulations are shown in Section V for the performance of the EEX line using an electron bunch with and without the presence of aberration-correcting elements. Concluding remarks are given in Section VI.

II. EMITTANCE EXCHANGE BEAM DYNAMICS
In the present discussion, the EEX line consists of two doglegs separated by a transverse deflecting cavity and a longitudinally accelerating cavity. We examine the case where the EEX line is used to transform a small portion of the transverse beam distribution (beamlet) into an upright ellipse (i.e. with no time-energy correlation) in the z-dimension at the exit of the EEX. At the input of the EEX line the beamlet's transverse emittance in the x-dimension, in x , is much less than its longitudinal emittance in z . Each particle passing through the setup can be described by its 6D phase-space coordinates X T = x x y y z ∆p/p (1) where all terms are defined with respect to a reference particle, x and y are the transverse coordinates of the particle, x and y are the transverse angular divergence, z = βct is the longitudinal position, p = βγm e c is the momentum, c is the speed of light, β = v/c, v is the electron velocity, m e is the electron mass and γ = 1/ (1 − v 2 /c 2 ) is the Lorentz factor. We define a first order transfer matrix R for the EEX line given by the transfer matrices of the subcomponents X out = RX in = R d R a R k R d X in [13]. The primary components of the EEX line consist of two translating sections or doglegs (R d ) composed of opposite polarity dipoles and a drift space, separated by a transverse deflecting cavity (R k ) and an accelerating cavity (R a ) which are both operated at zero crossing RF phase. At zero crossing the reference particle receives no net deflection or acceleration. A schematic with a layout of the principal components of the EEX line is shown in Fig. 1. The doglegs and the deflecting cavity both provide a strong transverse-longitudinal coupling. As will be shown below, with the appropriate dispersion and deflector strength we achieve complete exchange of the longitudinal and transverse emittance. The only function of the accelerating cavity is to remove the temporal energy chirp induced by the deflector. The discussion of higher order effects due to aberrations and their mitigation with the use of sextupoles and an octupole (shown in Fig. 1) are presented in Section IV. The EEX occurs between the x-z dimensions only; ideally the y-dimension is uncoupled. In a practical case the coupling to the y-dimension must be minimized. For clarity, the analytical expression for the transfer matrix and our discussion will be limited to the x-z dimensions so that rows 3 and 4 and columns 3 and 4 will not be shown for the general 6 × 6 transfer matrix. Considering only the x-z dimensions that are exchanged, matrix transport describing the EEX line is given by the 4 × 4 matrix R = A B C D consisting of 2 × 2 submatrices A, B, C and D. In most beamlines there is no coupling between the transverse and longitudinal phase space dimensions so that B = C = 0 0 0 0 . However the EEX line is designed to exactly exchange phase space dimensions so that now the components of B and C are nonzero but the components of submatrices A = D = 0 0 0 0 . For the ideal case the transfer matrix of the dogleg is where L d is the drift length, η is the horizontal dispersion and ζ is the longitudinal dispersion. The drift length is the horizontal dispersion is and the longitudinal dispersion is where θ is the bend angle, L D is the distance between dipoles in each dogleg, L M is the length of the dipoles and L drift is the distance between the dipole and the RF cavities. These terms closely follow the derivation in [3] with the important difference of the added last term in Eq. (5) that measures momentum dependent path length. This term becomes important for electrons that are only moderately relativistic. It describes the path length difference ∆z = 1/(γ 2 β 2 )(∆p/p) due to velocity differences and is critical to account for when attempting to use an EEX line at energies of a few MeV to tens of MeV with small emittance beams. For the deflector where k is related to the change in transverse momentum of the particle and D is the length of the deflector. Emittance exchange requires the RF deflector cavity strength to scale inversely with horizontal In order to correct for R k 65 we add an accelerating cavity operated at zero crossing [14] with the transfer matrix where χ = 2π λ |e|V pc , V is the integrated accelerating voltage, λ is the RF wavelength and d is the length of the accelerating cavity. If we set the strength of the accelerating cavity such that χ = − k 2 D 6 then the combined cavities have a transfer matrix For the ideal case, the deflector strength k = −1/η which results in complete emittance exchange. The transfer matrix of the full EEX line is where L = L d + D/2. Transport through the EEX line for the entire electron bunch can be represented in matrix notation as Here the incoming transverse-beam phase-space ellipse, Σ x , at the first EEX dipole is where α x , β x and γ x = 1+(αx) 2 βx are the Twiss parameters. Σ x is transformed into the final upright longitudinal beam ellipse containing no time-energy correlation To find the incoming α x and β x required to match β z , Eq. (10) is inverted Using det(B) = det(C) = 1 and solving for the elements of interest where the dropped terms are negligible. From Eq. (14) it is seen that the incoming beta function scales with R 2 52 which in turn is dominated by the velocity dependent longitudinal dispersion term of Eq. (5) for electron beams of a few tens of MeV energy. This dispersion scales linearly with beamline length thus it is important to minimize the total length of the EEX line in order to control the incoming beta function. Under the stated condition in x in z , it is critical for the values in the lower right quadrant of R to be nearly zero. An approximate requirement on the first order transport matrix of the EEX line can be determined by considering the output particle distribution in the longitudinal dimension which is given by In order for out z ≈ in x , the contribution to the longitudinal dimensions must satisfy D x . Without considering a specific particle distribution, but rather the ratio of emittances that must be exchanged we find the approximate requirement This important result is the guiding design principle for optimizing the transport through the EEX.

III. FIRST ORDER PERFORMANCE
Given the ideal performance for the EEX line and its subcomponents presented in Section II, it is important to asses a realistic layout for the EEX line. We must also incorporate the impact of additional couplings due to weak thick lens effects that were disregarded in Section II. These could have a significant impact when considering emittances which differ by orders of magnitude.
In particular, the expected result A = D = 0 0 0 0 is not strictly true, leading to emittance growth for the electron bunch primarily in the dimension of interest, out z . The nominal design parameters of the EEX line were selected for generation of coherent current modulation at a few tens of MeV keeping in mind the overall size, requirements for RF power and input electron bunch parameters. The full parameters of the EEX line elements are summarized in Table I. These design choices and linear performance will be discussed in the following subsections.
The first order performance for each subcomponent is determined by solving the linear system of equations X out n = RX in n for the transport matrix R, where n is the particle index for the electron bunch, X in n is the input particle phase-space distribution, and X out n is the output distribution generated by tracking ensembles of particles through the beamline elements with the simulation program parmela. This overdetermined linear system, where n 6 × 6, is conveniently solved by Matlab functions that minimize the Frobenius norm residual.

A. Dogleg
It was shown in Eq. (14) that the incoming beta function scales with R 2 52 and that this dispersion scales lin-early with beamline length. The two doglegs are the dominant contributors to size in the system. From Eq. (4) the dispersion can be adjusted by varying the bend angle θ and dipole-dipole drift length L D . Keeping the drift short and the bend angle modest, the desired dispersion is achieved with a bend angle of θ = 10 degrees and drift length L D = 1 m. The analytical and numerical transfer matrix for the dogleg is shown in Table III.

B. RF Structures
A 5 cell deflector cavity with a standing wave mode to minimize the required RF power was designed for use in the EEX line. Due to the low-energy electron beam, unique design features were included in the deflector to minimize the transverse offset at zero crossing. Additionally, the cavity was optimized to operate over the 2-25 MeV range accessible by a compact linac. The TM 110 mode is excited by two couplers located in the center cell. The transverse shunt impedance [15], defined as where B x and E y are the transverse magnetic and electric fields in the cavity and P is the power coupled into the cavity, determines the the maximum deflecting voltage for a given input power. The design parameters for the deflector are shown in Table II. For EEX the deflector cavity operates at zero crossing imparting opposite kicks to the leading and trailing particles. Under a thin lens approximation the deflector cavity does not produce a transverse offset for the reference particle at zero crossing. However, due to the finite length of the cavity the reference particle would traverse the deflector cavity with a non-zero mean transverse momentum [16], resulting in a transverse offset. In order to mitigate this each of the cavity end cells provides half the kick of a full cell. This effectively results in a zero mean transverse momentum for a single optimized energy. In Fig. 2 the transverse particle momentum and offset are shown for the reference particle at three energies (2, 10, 20 MeV) covering the full range of interest. The final transverse momentum for all three cases is zero due to proper phasing of the reference particle. However, the mean transverse offset is non-zero for the 2 and 20 MeV case. This is demonstrated by the non-zero transverse offset for the particle at the exit of the cavity. For the EEX parameters listed in Table I with a dispersion of η = 18.97 cm and a 22.5 MeV beam, the RF power required for the deflector is 150 kW. The accelerating cavity is a standard 3 cell TM 01 standing-wave structure operated at the zero crossing. The RF frequency is 9300 MHz and the full structure length is 5.64 cm. The drive power for the cavity is just 265 W and the shunt impedance is 208 MΩ/m. The analytical and numerical transfer matrices for both the deflector and the accelerating cavity are shown in Table III.

C. Full EEX Line
Combining all the elements of the EEX line we find the analytical and numerical performance in Table III. The transfer matrix contains some residual self coupling for both the transverse and longitudinal dimension. The performance of the EEX line was optimized to minimize the residual self coupling in the longitudinal dimension, D ⇒ 0 0 0 0 , as this dimension will contain the small final emittance. We previously stated an approximate requirement in Eq. (17) that determines the maximum emittance ratio which can be exchanged and we find that this requirement is generally met for an exchange ratio of four orders of magnitude. As we will see in Section V, full numerical simulations for the electron bunch will demonstrate this large exchange in emittance and validate the strict requirement given in Eq. (16) which also considers the electron bunch distribution for exchange without emittance growth.

IV. ABERRATIONS AND THEIR CORRECTIONS
While the linear performance of the EEX line demonstrates an excellent ability to exchange emittances which differ by moderate ratios, higher-order couplings eventually lead to emittance growth that limits the achievable ratio. The first order matrix formalism applied in Section II to analyze the performance of the EEX line can be expanded to include 2 nd and 3 rd order transfer matrices in order to analyze the coupling of aberrations into the output emittance and determine the placement of corrective higher-order optics. Particle trajectories in 6D phase space can be described as where T and M are the 2 nd and 3 rd order matrices respectively. These higher order terms may be treated as an error in the linear transport with terms given by Given the large ratio of emittances and the significant coupling between the x-z dimension throughout the EEX line, it is difficult to observe small aberrations that only produce measurable errors when the full emittance exchange occurs after the final dipole. To increase the visibility of these higher-order couplings, the performance of the EEX line was analyzed by producing artificial electron bunches with a distribution of particles that has finite width in only one dimension, and zero width in the others. This allows us to observe the initial appearance of higher-order couplings due to aberrations, how these errors propagate through the EEX optics and their impact on the final emittance. After identifying the source of the aberrations and placing correcting optics, we then return to using the nominal electron bunch at the entrance of the EEX line.
The dominant aberrations in the EEX line are related to the temporal field variation of the deflector cavity. Due to the low energy and finite length of the electron bunch and the alternating fields in the deflector cavity, quadratic and cubic errors appear in the transfer matrix. Due to the coupling of the transverse and longitudinal emittance in the EEX line it is possible to correct these errors without additional time-dependent electron optics. This is achieved with the use of sextupoles and octupoles placed where the quadratic or cubic dependence of the static magnetic element in the transverse dimension can compensate for the corresponding aberration. A similar approach with the placement of sextupoles in highly dispersive regions was used in [17] to correct for energy spread induced aberrations in dispersionless translating sections. However, in that case the aberrations were the result of static magnetic optics as opposed to dynamic electromagnetic structures. Sextupoles and octupoles are a natural choice for correcting aberrations because their lowest order transport, 2 nd and 3 rd order respectively, contain only geometric terms allowing coupling between longitudinal and transverse dimensions via horizontal dispersion and avoiding additional 2 nd and 3 rd order chromatic aberrations, respectively.
The strongest of the aberrations that appears in the deflector cavity is the quadratic dependence on energy due to the length of the bunch, ∆p/p = T k 655 z 2 k . Here we use superscripts on transfer matrix elements (e.g. k, d,...) and subscripts on particle coordinates to identify the relevant component or location in the system. This quadratic aberration results in emittance growth for the output beam out z because it is coupled through the dogleg into the temporal dimension, z error out = R d 56 T k 655 z 2 k . We can correct this error with a sextupole (S1) placed between the two bending magnets of the second dogleg. The sextupole will create a quadratic coupling between the transverse extent of the beam and the divergence, x = T S1 211 x 2 S1 . This quadratic dependence can create a correcting term in the temporal dimension, z correction out = R dipole 52 T S1 211 x 2 S1 . However, we must show that the dimension x at the sextupole is correlated with the temporal dimension z at the deflector. Following the transfer matrix from the deflector we find the dominant correlation to be z correction out = R dipole 52 T S1 211 (L prop R k 25 ) 2 z 2 k where L prop is the total distance between the end of the deflector and the sextupole location. Therefore, to remove the aberration we set We place the sextupole immediately prior to the final dipole which minimizes the magnetic field strength needed to correct for the aberration. Through a nearly identical argument we are also able to correct the cubic non-linearity in the deflector cavity, ∆p/p = M k 6555 z 3 k , with the placement of an octupole prior  to the final dipole and setting the strength of the octupole to equal The second quadratic temporal aberration of the deflector cavity that we will address is the T k 255 . This aberration results in an error at the output due to its coupling to the z-dimension through the second dogleg z error out = R d 52 T k 255 z 2 k . We can correct for this aberration with a sextupole (S2) placed after the accelerating cavity, z correction out = R d 52 T s 211 x 2 S2 . This placement avoids 3 rd order chromatic effects because the accelerating cavity removes the z-dependent chirp on the electron bunch. At this location the transverse extent of the beam, x S2 = (R k 15 + L prop2 R k 25 )z k , is linearly correlated to the longitudinal dimension at the entrance of the deflector. L prop2 is the distance from the end of the deflector cavity to the sextupole S2. This gives the matching condition for removing the aberration. The third sextupole in the system accounts for aberrations related to the finite transverse size of the electron bunch that is due to the initial transverse emittance and the finite energy spread of the beam. The transverse beam size after the first dogleg and at the entrance of the third sextupole is x S3 = x in + R d 12 x in + R d 16 ∆p in /p. At this point we note that several downstream elements result in quadratic correlations between x S3 and the transverse divergence. These elements are the deflector and both sextupoles placed to correct temporal aberrations. The impact of these elements depends strongly on the transverse size of the beam at each individual element's location and the strength of each element. As was shown previously, the effects of each element are cumulative, noting that the quadratic correlations produced by these elements alter the z-dimension at the output. We can refer to this aberration as T eff 211 and correct it with the placement of a sextupole at the entrance of the deflector and setting the strength to T eff 211 = −T S3 211 . The physical placement of the sextupoles and octupoles is shown in Fig. 1 and the location and strength of each element for our design is given in Table IV, where the position of each element is given as the distance from its end to the start of the subsequent downstream element. The length of the sextupoles and the octupole are 1 cm each.

V. ABERRATION CORRECTED PERFORMANCE
To test the EEX line we use an electron bunch with an initial transverse emittance of x = 1 pm-rad and longitudinal emittance of z = 10 nm-rad. The mean energy of the electron bunch is 22.5 MeV. The normalized transverse emittance in the y-dimension is y = 10 nm-rad. These electron beam parameters are consistent with a nanobunch generated to produce coherent soft x-ray radiation [9,18]. The electron beam properties at the input of the EEX line are summarized in Table V and the input  emittances and Twiss parameters are listed in Table VI. We show the particle phase space at the input of the EEX line for the two dimensions of interest in Fig. 3. A randomly populated square distribution in phase-space is chosen to ease the visualization of aberrations in the electron bunch.
We begin the analysis of the performance for the full EEX line without correcting for aberrations by zeroing the 3 sextupoles and the octupole. Fig. 4 shows the particle phase space at the output of the EEX line for the two dimensions of interest. The emittance and Twiss parameters for the output electron bunch are shown in Table VI. We note that without aberration correction the EEX line is unable to preserve the initial emittance in x , resulting in a final emittance out z that is a factor of 5.5 larger. The emittance growth is dominated by the T k 655 and the T k 255 aberrations. This quadratic aberration is shown in Fig. 5 where the particle position at the output of the EEX line with respect to the longitudinal position at the entrance of the deflector is shown in color-coded scatter plots.
We now include all the aberration correcting sextupoles and octupole in the EEX line with the particle phase space at the output for the two dimensions of interest shown in Fig. 6. The emittance and Twiss parameters for the output electron bunch are shown in Table VI. The EEX line performs exceptionally well when considering the final z emittance, which now shows zero emittance growth. The RMS length, σ z , of the beam at the output is only 1.5 nm which is four orders of magnitude shorter than the input electron beamlet.

VI. CONCLUSIONS
We have presented the design and simulation of a compact emittance exchange line capable of transforming emittance ratios as large as 10,000 between the transverse and longitudinal dimensions of an electron beam. The exchange of such large ratios is a necessary step toward periodic nanobunching of an electron beam at low energy. Such an approach will enable the efficient generation of coherent FEL-like radiation at much lower energies than traditional approaches, reducing the size and cost of future light sources while improving their output radiation properties.  Successful emittance exchange requires optimization of the linear transport, especially the time-varying fields of the RF deflector cavity. We have shown that aberrations due primarily to these time varying fields ultimately limit the ability to exchange arbitrarily large ratios of emittance, and that these aberrations may be mitigated through the use of higher order static sextupole and octupole magnets correctly positioned to take advantage of the coupling among multiple dimensions in the EEX.
In this analysis only the dominant aberrations were discussed and corrected with the use of static magnetic elements. However, given different objectives for the EEX line or different electron beam parameters other aberra- tions can play an equal or more significant role. In particular we note that doglegs can introduce quadratic aberrations in the longitudinal position as a function of energy and in x as function of x . Both of these aberrations can be corrected with the placement of sextupoles in the doglegs. Additionally, x-y coupling in higher-order optical elements may also present itself as a source of emittance growth and should be mitigated with the choice β y in these elements or with additional corrective optics prior to the EEX line.
The end result is successful emittance exchange and thus the ability to generate nanoscale bunches with achievable electron beam parameters.