On the adiabaticity of emittance exchange due to crossing of the coupling resonance

In circular accelerators, crossing the linear coupling resonance induces the exchange of the transverse emittances, provided the process is adiabatic. This has been considered in some previous works, where the description of the phenomenon has been laid down, and, more recently, where a possible explanation of the numerical results has been proposed. In this paper, we introduce a theoretical framework to analyze the crossing process, based on the theory of adiabatic invariance for Hamiltonian mechanics, which explains in detail various features of the emittance exchange process.


Introduction
The impact of linear coupling on transverse betatron motion has been extensively studied, as it has a peculiar impact already on the linear dynamics. In 2001, the phenomenon of emittance exchange due to dynamic crossing of the difference coupling resonance was studied [1], with further results reported in 2007 [2], in which it is mentioned that the full emittance exchange happens if the resonance crossing is adiabatic and an adiabatic condition is given. This research has opened a new domain of investigations and a recent paper addressed the same topic with the goal to develop a complete theory to describe the emittance exchange process [3].
In recent years, there has been intense theoretical efforts to study in detail the phenomenon of resonance crossing in one degree-of-freedom (1DoF) Hamiltonian systems in view of devising novel beam manipulations [4,5,6,7,8,9]. This culminated with the proposal and final implementation of the CERN PS Multi-Turn Extraction (MTE) as an operational means to provide an optimized extraction technique based on nonlinear beam dynamics [10,11,12,13,14,15,16].
A natural extension of what was done with MTE is the analysis of a 2DoF nonlinear system that crosses a 2D nonlinear resonance. Inspired by Ref. [17], some very promising results have been obtained [18], which indicate that the adiabatic crossing of resonances can be an efficient means to manipulate the invariants of a Hamiltonian system. This effect gives the possibility of redistributing the transverse emittances between the transverse degrees of freedom. It is worth stressing that the mathematical framework for these studies is the theory of adiabatic invariance for Hamiltonian systems [19,20].
This framework provides also the natural way of addressing the analysis of the resonance crossing in the presence of linear coupling. In this paper, we show how all observations reported in previous works, such as [2,3], find a clear explanation using the results of adiabatic theory. Furthermore, we extend the analysis to the case in which nonlinear detuning with amplitude is present in the considered system. The plan of the paper is the following: in Section 2, the coupling Hamiltonian model is introduced and discussed in detail (Section 2.1), including an original view of the phase space on a sphere (Section 2.2). In Section 3, the same Hamiltonian system is analyzed using the normal modes and the main results on the properties of the dynamics are derived, whereas in Section 4, the analysis of the effect of detuning with amplitude on the original Hamiltonian is carried out. A digression is made in Section 5, where the problem of two-way crossing of the coupling resonance is considered. In Section 6, the map model is introduced and, in Section 7, the results of the numerical simulations are presented and discussed in detail. Finally, conclusions are drawn in Section 8, while some mathematical details are reported in the Appendices A, B, C, and D.

The Hamiltonian model and its dynamics
Following the treatment used in Refs. [21,22,17], we consider a Hamiltonian written in the following form H(p x , p y , x, y) = p 2 x + p 2 where q = − β x β yq , and the coefficientq is defined aŝ and represents the effect of a skew quadrupole on the betatron dynamics. In the following, the notation z will be used to denote either the coordinate x or y.

Analysis of the dynamics in the presence of a skew quadrupole
We consider the adiabatic crossing of the linear coupling resonance, namely ω x − ω y = 0, when the frequencies are slowly modulated, and we define δ(λ) = ω x (λ) − ω y (λ) with λ = t, 1, and is the adiabatic parameter that describes the resonance crossing process. Without loss of generality, δ(λ) is defined by a linear function that varies from positive to negative values (or vice versa) crossing zero.
The corresponding eigenvectors are v 1 (λ) = c 1 δ 2 (λ) + δ 2 2 (λ) + 4q 2 2 , q v 2 (λ) = c 2 −q, where c i are the normalising constants. Note that for q 1 and δ 2 (λ) > 0 one has v 1 → e x and v 2 → e y , where e x , e y are the unit vectors defining the horizontal and vertical planes. When δ 2 (λ) = 0, i.e. ω x (λ) = ω y (λ), then v 1 and v 2 define the two bisectors of the two angles defined by the horizontal axis and the positive vertical axis, whereas when |q| 1 and δ 2 (λ) < 0, then v 1 → e y and v 2 → −e x . Therefore, the passage through the resonance ω x − ω y implies an exchange of the direction of the eigenvectors.
The value of q is constrained by the conditions that ω 1,2 are both real, i.e.
otherwise the closed orbit, corresponding to the fixed point at the origin, becomes unstable.
It is also worth noting that the following relations hold from which one remarks that the difference resonance cannot be crossed by ω 1,2 as the eigenvalues cannot get closer than (ω 2 1 − ω 2 2 ) min = 2|q| as it is well-known (see, e.g. Refs. [2,3] and references therein). This observation leads to an essential conclusion: in the physical co-ordinates, the coupling resonance can be crossed, but the tunes are not the eigenvalues of the system. On the other hand, in the co-ordinate system of the eigenvalues the resonance cannot be crossed, although the eigenvalues are the proper quantities to describe the dynamics. For this reason, the term pseudo-resonance crossing will be also used in the following.
We introduce the linear normal form for the Hamiltonian (1) and the dependence of the symplectic transformation on time (via the parameter λ) introduces a further term in the original Hamiltonian. If we indicate with G(λ) the matrix of the transformation Z = z ω z (λ), it induces the transformation where X are the new co-ordinates. A generating function F 2 (x, P , λ) for the symplectic transformation can be written in the form and the new Hamiltonian reads where the last term is the time derivative of the generating function. The final form of the Hamiltonian reads where ω = dω/dλ. The linear action-angle variables (θ, I) can be used to recast the Hamiltonian (13) in the form We remark that the Hamiltonian dynamics is singular 2 at I x = I y = 0 and the frequencies ω x,y are not the linear frequencies around the elliptic fixed point due to the presence of the linear coupling term. Hence, the condition ω x (λ) = ω y (λ) is not a true dynamical resonance condition.
The Hamiltonian contains two small parameters, namely → 0 in the adiabatic limit and q that measures the strength of the linear coupling: the main issue is how to determine the interplay between the two small parameters in the limit → 0.
The introduction of a slow phase φ a = θ x − θ y using the generating function transforms the Hamiltonian to the form and since we focus on the analysis when δ(λ) → 0, it is possible to apply a perturbative approach averaging over the fast-evolving angle φ b to obtain the Hamiltonian Without any further assumption, it follows that J b is invariant up to an error O(q 2 ) + O( 2 ) for a time interval of order O( −1 ). The perturbative approach is possible only if this error is small, so that J b can be considered constant during the resonance-crossing process. In such a case, the action of the 1DoF Hamiltonian can be considered an adiabatic invariant up to an error O(q 2 −1 ) for a time interval O( −1 ), and we can study the change of J a when δ(λ) passes through zero. In the end, it is possible to restrict the problem of studying the resonancecrossing process for the original Hamiltonian (1) by considering the dynamics generated by H that can be recast in the following form where, without loss of generality, we have re-scaled the action according to J = J a /J b so that J = 0 and J = 1 are singular lines for the Hamiltonian (19), we also defined φ = φ a + π/2, and then replaced δ(λ) → δ(λ) ω x (λ)ω y (λ)/J b , which corresponds to a global re-scaling of the Hamiltonian. 2 Here and in the following, singular dynamics means that the corresponding equations of motion are singular.
Note that the Hamiltonian (19) has the form H(φ, J, λ) = tJ + q H 1 (J, φ) , (20) for which the equations of motion are By introducing a new timet = q t Eq. (21) can be recast in the following form Thus, the small parameter characterizing the adiabaticity is¯ = /q 2 , and the new slow time isλ = /q 2t . We remark that the reasoning can be extended to the case in which δ(λ) is a nonlinear function of λ, i.e. δ(λ) ≈ 1/(2n + 1) (λ − λ c ) 2n+1 , where λ c represents the time of the resonance crossing. This option might be useful in applications in order to improve the overall adiabaticity of the process. In this case, it is easy to show that the small parameter characterizing the adiabaticity is¯ = /q 2n+2 2n+1 , and the exponent tends to 1 when n → ∞.
The Hamiltonian (19) is symmetric with respect to the transformationJ = 1 − J andφ = −φ as indeed so that we have the same dynamics by reverting the time arrow and the behavior for J → 0 is the same as J → 1.
The level curve that reaches J = 1 at φ = 0 and φ = π is a critical one. It fulfills the equation id est q (1 − J)J sin φ − δ(λ)(1 − J) = 0 (25) and thus that shows how the level curve J(φ) is tangent to the J = 1 curve. It is worth stressing that, in spite of being a critical curve, this special level curve of the Hamiltonian H is not a singularity of the dynamics and, in particular, the time spent on this curve is finite (see Appendix A).
In Fig. 1, the phase-space portraits of the Hamiltonian (19) (assumed to be frozen, i.e. with λ constant) are shown in the first column, for q = 1 3 and three values of δ, namely 1, 0, −1 for the top, center, and bottom plot, respectively.
The red curves represent the critical curve, which is also called coupling arc in Refs. [22,17]. In the top plot (δ = 1), two separated islands are visible, whose areas increase as δ decreases to zero. Furthermore, there exists a region of separatrix curves around the islands, tangent to the singular lines J = 0 and J = 1. When δ = 0 (center plot), the islands have maximal area, with a sort of separatrix that connects the singular line through the vertical line φ = π. Finally, a symmetric situation when δ < 0 is visible in the bottom plot.
The dynamics can also be studied by using the variables so that the Hamiltonian reads as 3 The artificially large value of q, together with large values of δ and of the action, is used to make more visible the key features of the phase-space portrait. Figure 1: Phase-space portraits of the Hamiltonian (19) for q = 1 and δ = 1 (top), δ = 0 (center), and δ = −1 (bottom) in three different representations: action-angle co-ordinates (φ, J) on the left column, Cartesian co-ordinates (X = √ 2J sin φ, Y = √ 2J cos φ) in the central column, and on a spherical surface (as described in Section 2.2) on the right column, where the coordinate φ is the polar angle while the azimuthal angle is given by θ = asin(2J − 1). The red line represents the critical curve (the so-called coupling arc in Refs. [22,17]). The plots on the left column are the equirectangular projections of the spherical surface, the poles being represented by the J = 0 and J = 1 lines while the plots on the central column are the azimuthal representations centered around the south pole. Note that the artificially-large value of q, together with large values of δ and of J, is used to make more visible the key features of the phase-space portrait.
A limiting circle X 2 + Y 2 = 2 appears and the dynamics is confined within it, due to the presence of the square root. Moreover, the coupling arc is the solution of that separates the accessible domain of phase space into two regions of different size, depending on the value of δ(λ).
A sketch of the phase-space portrait is depicted in the central column of Fig. 1.

Visualization of the dynamics on a sphere
In the previous section, the dynamics of the Hamiltonian (19) has been analyzed by means of two different co-ordinate systems. However, the essential features of the dynamics can be best appreciated by looking at the dynamics generated on a sphere, since we have two singular lines, namely J = 0 and J = 1.
The north pole can be identified with J = 1 and the south pole with J = 0. Two charts have to be defined: one describing the southern and one the northern hemisphere, with a non-zero overlap at the equator to provide the necessary compatibility between the two charts. The co-ordinates (27) can be used to describe the chart of the northern hemisphere.
There are two symmetrically-located elliptic fixed points on the sphere, whereas the poles are singular lines, i.e. the phase dynamics φ(t) is not defined on the poles, but we observe that the phase velocityφ increases as one approaches the poles as 1/ (1 − J)J so that the time spent in the part of the energy-level curves near the lines J = 0 and J = 1 tends to 0. We remark that the level curves tend to be parallel to these singular lines, whereas the angle φ varies in a neighborhood of π/2 or 3π/2.
The level line H(X, Y, λ) = 0 close to the origin is given by where O(3) stands for third-order terms in X and Y . Such a curve is smooth and represents a circle passing through the origin. In the limit δ → 0, the radius of curvature diverges and the same is true near the south pole J = 1, where the variables are given byX

31) and the Hamiltonian is
Both Hamiltonians (28) and (32) are analytic at their origin, and they have a singularity at corresponding to the points J = 1 and J = 0, respectively. However, the singularity is not in the dynamics, but only in the co-ordinates. Hence, the dynamics on the sphere has no singularity, although it cannot be described by a single chart and this is an essential point for our analyses. The dynamics on the sphere is represented in the plots on third column of Fig. 1.
When the time dependence is considered, and in particular the limit δ(λ) → 0 is analyzed, then one can introduce the action-angle variables (θ, I) for each chart of the 1DoF frozen Hamiltonian (28).

Analysis of the pseudo-resonance-crossing process
Let us assume that The fixed points of the Hamiltonian (19) correspond to φ * x = π/2, 3π/2 and their action J * is given by where the plus sign refers to φ * = π/2.
The applicability of adiabatic theory at a resonance crossing relies on the control of a slow phase change during the variation of the parameter δ(λ). When λ = 0, J * = 1/2 and and this quantity has to be small, i.e. 1, to apply adiabatic theory.
The two fixed points move to opposite directions during the resonance-crossing stage, and the corresponding resonance islands have an amplitude estimated by ∆J(λ) is maximum when δ(λ) = 0, but at the boundary values, i.e. ±δ max , it can be small if δ max /q 1. In such a case, trapping inside the island can occur near one of the borders, whereas de-trapping occurs near the other one and such a phenomenon happens in a symmetric fashion with respect to the horizontal line 1/2, so that the values I x and I y (i.e. the Courant-Snyder invariants and then also the beam emittances) are exchanged by keeping approximately fixed their sum.
3 Analysis of the dynamics using the normal modes By following the approach described in detail in Appendix B, the prototype Hamiltonian to study the emittance exchange process can be written in the normal modes space in the following form where, without loss of generality, we assume J 2 = 1, so that J = 0 and J = 1 are singular lines for the Hamiltonian.
Although the geometrical properties of the dynamics generated by the Hamiltonian (37) coincide with those of (19), the two descriptions are carried out in different spaces, namely that of physical co-ordinates for Eq. (19) or that of the normal modes for Eq. (37). Hence, the exchange of the invariants occurs in different spaces.
The Hamiltonian (37) allows to study the effect of the adiabaticity in the frequency modulation on the preservation of the action variables (J 1 , J 2 ) and of their approximations (J a , J b ) in the physical planes.
The Hamiltonian (37), being of the same form as (19), has two elliptic fixed points at φ * = π/2, 3π/2 and so that if γ they are very close to boundaries J = 0 and J = 1, which means that the resonance trapping is not possible, and we have simply the invariance of J for → 0. The maximum resonance amplitude occurs at the minimum value of γ , then ∆J is negligible, which clearly describes the interplay between the two small parameters q and .
Even for q = O( ), I 1 and I 2 are adiabatic invariants, which are referred to the phase planes defined by the eigenvectors. At the beginning of the crossing process, given that q is small, the two planes are close to the original phase planes (X, P X ) and (Y, P Y ), and the same holds for the initial actions so that I 1 I x (0) and I 2 I y (0). With an error O(q), at the end of the process the two planes are exchanged, and the same is true for the emittances with the same approximation O(q). Hence, q defines the maximum possible emittance exchange whereas 1 allows a conservation of the adiabatic invariants.
Furthermore, the action-angle variables are analytic for γ(λ) → 0 and the Hamiltonian reduces to the form and is analytic on the sphere. It is then possible to apply the Theorem reported in Ref. [19] to the Hamiltonian H(φ, J, λ) to state that the change of the action for a given orbit of the system is exponentially-small, i.e. ∆J = O(exp(−c/ )) with c a positive constant, when λ varies, which corresponds to the crossing of the original difference resonance.
It is worth stressing that the same remarks made for the Hamiltonian (19) about the re-scaled adiabaticity parameter hold also for the Hamiltonian (37). Therefore, one can state that ∆J = O(exp −c q 2 / ) in case of a resonance crossing linear in λ, or ∆J = O(exp −cq 2n+2 2n+1 / ) in case of a nonlinear crossing of the resonance. Note that a nonlinear resonance crossing is more advantageous in terms of adiabaticity of the process with respect to a linear one.

Impact of detuning with amplitude
In the presence of detuning with amplitude generated by nonlinearities, the dynamics is governed by the Hamiltonian (1) plus the terms [21] H det (p x , p y , x, y) = α xx x 2 + p 2 Figure 2: Phase portraits of the Hamiltonian (54) with α aa = 1, α ab = 0, q = 0.25, This approach assumes that nonlinear resonances are not excited by the nonlinearities or that those resonances are far from the difference resonance we are considering. By performing the same substitutions that led to the Hamiltonian (19) starting from (1), H det becomes where a constant term in J b has been discarded as J b is a constant of motion and hence the constant term is irrelevant for the dynamics of J a and φ a , and and the complete Hamiltonian becomes It is obvious that α ab can be reabsorbed in the definition of δ, which effectively would correspond to shifting the resonant condition to ω x − ω y + α ab J b = 0 or, equivalently, to shifting the time at which the resonance is crossed. It is also evident that acting on the three physical quantities α xx , α xy , α yy it is possible to control the values of α aa and α ab independently on each other. As it was done for the Hamiltonian (19), it is possible to shift the phase of φ and set J b = 1 to cast (44) in the following form Whenever the analysis would be carried out in the normal modes' co-ordinates, then it would be immediate to find that the detuning with amplitude would lead to the following general Hamiltonian where also in this case γ(λ) incorporates a constant term α ab with respect to the original definition used in (37).
The parameter α(λ) (orα(λ)) has a fundamental impact on the phase-space topology as, when α = 0 the Hamiltonians (19) or (37) have only two elliptic fixed points, whereas when α = 0 an additional pair of one elliptic and one hyperbolic fixed point might be generated (see Ref. [21]). The conditions for the existence of these additional fixed points are discussed in Appendix C. Indeed, the presence of a hyperbolic fixed point implies the existence of a separatrix, which introduces a singularity in the phase-space structure and hence alters the character of the dynamics. Examples of phase-space portraits for different values of δ are shown in Fig. 2, and the hyperbolic fixed points are clearly visible.
In particular, the nice property about the exponentially-small change of J, linked to the analyticity of the dynamics of (37), is lost. From the discussion presented in the Appendix C it follows that when α aa is sufficiently small, no extra fixed point is present and the phase-space topology is unchanged with respect to (19) with no separatrix present and hence exponentially-small bound on the variation of the invariant change during the resonance-crossing process.
5 Digression: two-way crossing of the coupling resonance So far, the focus has been on the analysis of the adiabaticity properties of the crossing of the coupling resonance for a linear and nonlinear system. However, another process is possible and is interesting to consider, namely the two-way crossing of the resonance. Such a process would allow studying the reversibility of the resonance-crossing process and, in particular, the impact on the phase, as that on the action variable is already fully covered by the considerations made in the previous sections. The treatment proposed in [20] is used to deal with the two-way resonance crossing. The starting point is the Hamiltonian (46) in which the parameter γ(λ) is supposed to describe a closed curve when λ ∈ [0, 1], corresponding to t ∈ [0, 1/ ]. The change in the phase of the action-angle variables when the system moves along the closed curve can be evaluated by [20] where the three terms can be generically computed, assuming the Hamiltonian is given as H = H 0 (J, γ(τ )) + H 1 (φ, J, τ ), according to The first term, χ dyn , takes into account the dynamical change of the phase and is relevant in the adiabatic regime, i.e. when 1 and depends only on the form of H 0 . The second term, χ geom , depends on the angular average of H 1 and is the so-called Berry phase [23,24] or Hannay angle [25]. The third term, χ rem , is relevant in the non-adiabatic regime and depends only on H 1 .
These general definitions can be specialized to the case of the Hamiltonian (46) and one obtains where χ geom = 0 is due to the special form of H 1 , which is zero when averaged over the angle φ. Note that χ dyn is independent on the action variable, whereas it depends on . It is worth noting that geometrically, χ dyn represents the area enclosed by the closed curve described by γ(τ ), and such an area is zero in case resonance is crossed in the same way in each of the two directions. χ rem depends on the action-angle variables. This means that in the adiabatic regime the phase is affected by an -dependent shift, only, whereas in the non-adiabatic case the shift depends also on the action-angle variables. Therefore, in the adiabatic case the distribution of initial conditions is rigidly rotated, i.e. by an amplitude-independent angle, in a two-way crossing of the coupling resonance (the action variable being only very weakly affected), while in the non-adiabatic case the initial distribution undergoes a nonlinear deformation by a two-way resonance-crossing process.
It is worth stressing that the rigid rotation of the initial distribution in case of a two-way crossing of the coupling resonance in the adiabatic regime is a consequence of the special form of H 0 , which is linear in the action variable. Indeed, whenever detuning with amplitude is considered, H 0 is no longer a linear function of J and, hence, even in the adiabatic regime, the initial distribution will be rotated by an amplitude-dependent quantity. This means that a twoway crossing of the resonance is never a fully reversible process for a nonlinear system. Hence, a periodic crossing of the coupling resonance, even if it occurs adiabatically, will always distort the distribution, with an adverse effect on the preservation of the linear invariants. In physical terms, this is the situation for a circular accelerator operated with non-zero chromaticity and close to the coupling resonance, which can be crossed due to the tune modulation induced by the chromaticity.

The map model
A system made of a FODO cell and a skew quadrupole, which is interpolated by the phase flow of the Hamiltonian (1), is described by the one-turn map given by where Using the steps detailed in the Appendix D, it is possible to recast Eq. (50) as a Hénon-like map as and this is the map used in the numerical simulations presented in Section 7.
The analysis of the impact of the detuning with amplitude has been studied by modifying the map (52) including the effect of an octupole in the single-kick approximation [26], whose strength is defined as where B 0 ρ is magnetic rigidity, is the magnetic length, and B y is the vertical component of the magnetic field. The nonlinear kick generated by a single octupole can be easily determined [?, 5] in the co-ordinate system used to construct the transfer map and the final result reads where χ = β y /β x . Note that in all simulations the following has been chosen β x = β y = 1 = χ. The link between the map (54) and the parameters α xx , α xy , α yy can be established using Normal Forms [26] and it is possible to show that and this enables to build a perfect correspondence between the map and the Hamiltonian model.

Results of numerical simulations
Numerical simulations have been performed using both the Hamiltonian and the map models. However, based on the fact that the results obtained are the same, only those obtained with the map will be presented here.

Linear map model
As a first step, numerical simulations have been carried out to evaluate the dependence of the emittance-exchange phenomenon on the adiabaticity of the resonance-crossing process. In the simulations, ω y has been changed while keeping ω x constant. Thus, δ(λ) = ω x − ω y (λ) is changed from a negative to a positive value passing through zero. As a figure of merit, we used the function P na , introduced in [3], which is defined as where I z,i and I z,f are the initial and final linear action variables, respectively. Therefore, P na , is zero when a perfect exchange is attained and one when no exchange occurs.
The evolution of a set of initial conditions, representing a beam exponentially distributed in I x , i.e. ρ(I x ) = (N 0 / I x ) exp(−I x / I x ), has been computed by means of the map (52), while varying ω y in the fixed interval ω y,i = 2.5 and ω y,f = 2.7 over a given time interval N . According to the Hamiltonian theory presented in the previous sections, we expect that I x becomes I y after the resonance crossing. What we observe in Fig. 3 is a clear exponential dependence of P na as a function of 1/ , in evident agreement with the findings of Ref. [3], and also in perfect agreement with the discussion carried out previously.  The exponential behavior of P na features a clear dependence on q. However, an oscillatory behavior is also observed due to the neglected terms O(q 2 ). We have been studying this effect by means of dedicated numerical simulations, in which the evolution of P na at large number of turns has been probed. Figure 4 (top left) shows these oscillations, whose amplitude and frequency are shown in the top-right and center-left plots, respectively. The oscillations of P na are characterized by a frequency, which has been determined by using refined techniques based on FFT [27,28], that for small q-values is given by (ω y,f − ω x )/2. The sudden jump visible in the inset, is due to the q-value being too small for the -value used to preserve the resonance-crossing process. This is similar to what can be observed in the bottom-right plot of the same figure.
In the center-right part of Fig. 4 a zoom of the behavior of the average P na for small |q| values is shown and the characteristic scaling with q 2 is clearly visible, which is linked to the neglected terms that are affecting the preservation of the invariants. Note the rapid increase of P na towards 1 when |q| → 0, which originates from the linear coupling being too small for the exchange of the invariants to take place.
Another important point to stress is that these scaling laws are not connected with the features of the distribution of initial conditions, as the theoretical results clearly indicate that these properties are linked to the individual orbits of the Hamiltonian system. Indeed, this can be seen in Fig. 5.
In fact, when plotting J a,f as a function of J a,i (left), we observe a linear difference between (J b − J a,i ) and J a,f when the adiabatic parameter is very small. This difference decreases exponentially when we vary the adiabaticity of the resonance-crossing process (right), i.e. ∆J a = κ exp [−ξ(ω y,f − ω y,i )/ ]. Note that also in this case oscillations appear when decreases as the actions J a,b are not the correct adiabatic invariant due to the value of q used in the simulations.
The dependence of the exponential fit parameters κ and ξ can be fully determined by means of numerical simulations. If we perform the same analysis on different values of the initial action (using a set of initial conditions δ(J a − J a,i ) uniformly distributed w.r.t. the angular variable) and we apply the same exponential fit we see that κ ∝ J a,i whereas ξ remains constant (Fig. 6, left).
Therefore, the value of ξ = (1.9544 ± 0.0007) × 10 −4 (obtained by fitting the data with a constant) is independent on the initial radial distribution and is indeed retrieved in the fit of Fig. 3 for q = −0.005 where we get ξ = (1.9563 ± 0.0015) × 10 −4 . Finally, as predicted in Section 3, we observe (Fig. 6, right) that ξ depends quadratically on the linear coupling strength q, as found also in [3].
It is key to stress that the scaling law ∆J a = κ exp −ξ q 2 / , which has been justified theoretically in the previous sections, is essential in establishing a link between the two parameters q and that are governing the dynamics of the system under consideration. Indeed, whenever the following is satisfied the variation of J a is left unchanged. This means that when q is decreased, should be reduced even further to maintain the character of the dynamics unaffected. This aspect is clearly appreciated in Fig. 4 (center right) where the curves corresponding to two values of are shown: a reduction of allows moving forward the break down behavior observed. This phenomenon has been studied in detail, and the results are shown in the bottom plot of Fig. 4, where the relationship between the break-down value q and the corresponding value is shown. The points lie on a quadratic curve, in perfect agreement with the scaling law reported in Eq. (57). It is evident that in the case of a nonlinear crossing of the resonance, the relationship (57) reads where 2n + 1 is the power of λ with which the resonance is crossed.
The distribution of the action jumps during the resonance-crossing process for a set of initial conditions with the same value of J a,i and the phase uniformly distributed in [0, 2π], is shown in Fig. 7.
It is worth noting that when decreases the average of the jump of the invariant tends to zero and the extent of the support of the distribution of ∆J a shrinks. At the same time, the distribution becomes more symmetrical and it flattens out.

Nonlinear map model
As described in Section 4, we studied also the impact of detuning with amplitude on the adiabaticity of the emittance exchange using the map model given in (54), introducing a normal octupole with normalized strength k 3 = K 3 β 2 x /6, setting χ = 1, and simulating the resonance-crossing process in the same way as in absence of detuning.
For Gaussian distributions of initial conditions corresponding to different emittances in x and y, P na has been evaluated for different values of k 3 and the results are shown in Fig. 8 (top), whereas a zoom in is provided in the bottom plot.
Two behaviors, depending on the value and sign of k 3 , are clearly visible. For k 3 < 0 and k 3 small in absolute value, P na is essentially zero, which indicates that even when nonlinear effects are present, a perfect emittance exchange occurs. Such a behavior is hardly seen for k 3 > 0, even in the neighborhood of zero. Rather, a sharp rise of P na is visible. Globally, outside a small interval around zero for k 3 , P na is always different from zero, indicating that the emittance exchange is not perfect.
Note that the position of the new fixed points either on the right or on the left of the coupling arc is linked to the sign of k 3 . Therefore, the presence of the new detuning-related fixed points has different impact on the final distribution, and hence on the emittance exchange, depending on where they are located in phase space. In this specific case, when 0 < k 3 < 0.5 even if k 3 is positive the effect on P na is negligible: this is compatible with the theoretical predictions that small enough values of k 3 do not generate new fixed points and do not affect the emittance exchange.
The essential difference between the linear and nonlinear cases is clearly visible when investigating the dependence of P na on the adiabatic parameter . This is shown in Fig. 9 (top left). The exponential behavior is lost and is replaced by a power-law function for P na .
The two values of k 3 have been selected to provide cases in which more than two fixed points are present. The dependence on |k 3 | is shown in the top-right plot, where the dependence of the fit parameters is shown together with the behavior of the reduced χ 2 is also reported for the power-and exponential-law cases. The behavior of the reduced χ 2 for the two fit models shows clearly that while the exponential dependence is the most suitable one for k 3 close to zero, the power-law best describes the data outside this interval of k 3 . This is in full agreement with the theoretical discussion carried out in the previous section. Finally, the dependence is shown as a function of q in the bottom plots of Fig. 9 for some values of k 3 .
Also in presence of nonlinear detuning with amplitude, it is possible to devise a scaling law linking q and . It is very easy to conclude that P na is linked to the change of the invariants during the crossing process. Therefore, the scaling law P na = a b(k3,q) + c(k 3 , q), which has been analyzed in Fig. 9, gives rise to the following relationship which should be fulfilled in order to keep constant the change of the invariant. The essential difference with respect to what has been found in the absence of nonlinear detuning is apparent.
Finally, Fig. 10 shows the features of the distribution of the jumps of the invariants in the nonlinear case.
In the top-left plot, the distribution of J a , i.e. the difference between the observed and the expected value of J a,f , for k 3 1 for initial conditions at a given fixed J a,i and J b is shown for two values of . The distributions look completely different from the ones obtained in the linear case (see Fig. 7). In fact, although the distributions tend to be centered around zero as decreases, their standard deviation σ as a function of tends to a finite limit for → 0. This indicates that the invariant is indeed experiencing a finite jump even when the adiabatic regime is reached. This is a direct consequence of the presence of a separatrix linked with the additional fixed points, as found in [29,30]. The scaling law of σ is represented by a power-law dependence on , as shown in the top-right plot, whose parameters are functions of q, according to the functional behavior shown in the bottom plot of Fig. 10. We remark that such a behavior is model dependent.

Conclusions
In this paper, the Hamiltonian theory of the dynamic crossing of the coupling resonance has been presented and discussed in detail, considering not only the linear, but also the nonlinear case.
The main focus has been the analysis of the so-called emittance exchange process, which arises from the resonance crossing. The detail of the mechanism has been considered, both in standard phase space as well as considering the normal modes, which provide the correct description of the system behavior. In particular, this framework allows considering the interplay between the two small parameters of the problem, namely the adiabaticity parameter and the strength of the linear coupling. It is worth stressing that, while the true invariants are exactly exchanged, the linear actions feature only a partial exchange. This is because they are not the true invariants of the system and that a projection effect from the space of the invariants to the physical space has to be taken into account. All this should be carefully considered when translating these observations to circular accelerators, in which the physical planes are normally the reference concepts used to interpret the phenomena linked with the crossing of the coupling resonance. Otherwise, the system undergoes periodic variations of the transverse emittances as a function of −1 . This is the simple consequence of the fact that, whenever the coupling strength is not small, the uncoupled emittances are no longer the correct invariants of the system. Furthermore, it has been shown how the dynamical properties of the system under consideration can be best appreciated by looking at the dynamics on a sphere, rather than the standard flat phase space.
It has been discussed how the presence of a real separatrix in phase space is the key feature that distinguishes the behavior of the crossing of the coupling resonance for a linear and nonlinear system. The origin of such a difference is connected with the breaking down of the analytical properties of the dynamical system whenever a separatrix is present.
Detailed numerical simulations have been carried out to provide a full characterization of the rich spectrum of behaviors. It is worth stressing that the observed exponential dependence on the adiabaticity parameter of the emittance exchange is a natural consequence only of the analyticity properties of the system under consideration. To the best of our knowledge, for the first time, the behavior of a nonlinear system has been probed while crossing the coupling resonance and, in excellent agreement with the theory presented, a power law, instead of an exponential one, has been observed for the emittance exchange process.
A fundamental relationship between the key system parameters q and has been derived for the case with and without nonlinear detuning. Such a link describes how the crossing of the coupling resonance should be performed in order to keep it adiabatic as a function of the value of the linear coupling. It is evident that such a relationship is of paramount importance in applications and, to the best of our knowledge, it has been derived for the first time in this paper.
Finally, a digression has been made, considering the features of a two-way crossing of the coupling resonance. By applying the adiabatic theory it has been shown that reversibility of the resonance crossing process is not granted in the nonlinear case, even in the adiabatic limit. This is a rather interesting and thoughtful result for its implications in the domain of accelerator physics applications, e.g. in the case of periodic resonance crossing induced by finite chromaticity, for which a non-negligible impact on the beam distribution is to be expected, no matter the speed of the resonance crossing.   A Comments on the equations of motion of the hamiltonian (19) Let us consider a Hamiltonian H(φ, J) and the scaled HamiltonianH(φ, J) = λ(J)(H(φ, J) − E 0 ), where H(φ 0 , J 0 ) = E 0 . We explicitly compute (in this context stands for the derivative with respect to J) ∂H ∂φ so that given the initial conditions (φ 0 , J 0 ) and E 0 the solution of the Hamiltonian system with initial energyH(φ, J) = 0, we obtain the system 1 λ(J) and if we introduce the scaled time λ(J)dτ = dt, we recover the solution of the initial Hamiltonian. Of course, the phase-space structure of both Hamiltonian systems is the same.
Using this approach, the solutions of the equations of motion of the Hamiltonian (19) can be associated to those of the HamiltonianH in the scaled time (1 − J)Jdt = dτ , where E 0 is the value of the initial energy, namely (61) Therefore we consider the orbit with zero energy H = 0 and the equations of motion give the solution of the initial Hamiltonian system in the scaled time. But the phase space has the same structure for both Hamiltonians. In the Hamiltonian H , E 0 is a parameter.
Starting from the Hamiltonian (19) and using the expression given in Eq. (61) for E 0 we get the equation of motion (see [22])J that can be explicitly solved in the form of that is a sinusoidal function, whose period is given by and that is independent on the initial energy.

B Detail of the analysis of the dynamics using the normal modes
Let us start from the Hamiltonian (1) with the goal of considering the dynamics considering the normal modes. Let us denote ω = (ω 1 , ω 2 ) the vector of the normal modes and R(λ) the orthogonal matrix built using the components of the eigenvectors, then the normal variables X are defined A generating function for the transformation F 2 (x, P , λ) can be written in the form and the new Hamiltonian reads H(X, P , λ) = P 2 1 + P 2 where the last term is generated by the time derivative of the generating function. Furthermore, it can be verified that the matrix is anti-symmetric and has the form where and we obtain a term analogous to the Coriolis potential in the Hamiltonian. Note that ξ(λ) = 0 when δ (λ) = 0 and ξ(λ * ) ∝ −(2q) −1 1 when δ(λ * ) = 0, however, in this case δ (λ * ) = O(1).
Therefore g(δ) > 0 if − µ 1/4 q < δ < µ 1/4 q (92) and a fortiori it is positive in the interval [−q, q], which shows that on that interval f (α) = 0 has four real and distinct roots. It is easy to verify that an even number of roots can be negative and such a number does not depend on the sign of δ.
On the other hand, looking at the extrema of f (α), one finds three real and distinct extrema and the product of the values α i,ext , i = 1, 2, 3 for which the extremum is reached satisfies sgn(α 1,ext α 2,ext α 3,ext ) = −sgn(δ), which shows that for δ > 0 an odd number of extrema is negative, whereas for δ < 0 an even number is negative.
It is then clear that as the sign of the solutions of f (α) = 0 does not depend on the sign of δ while the sign of α i,ext does, only two solutions α i are positive and the number maxima with negative position varies from two for δ < 0 to one for δ > 0. In summary, the following holds if − q < δ < q then∆ > 0 hence f (α i ) = 0 i = 1, 2, 3, 4 α i ∈ R and α 1 < α 2 < 0 < α 3 < α 4 hence f (α) > 0 if α < α 1 or α 2 < α < α 3 or α > α 4 (93) and this shows that it is indeed possible to have only two fixed points in phase space with a non-zero detuning with amplitude.

D Detail of the computation of the map used in the numerical simulations
The matrix M FODO can be transformed in Jordan form via the transformation T , so that T −1 M FODO T = R(ω x , ω y ), where R(ω x , ω y ) is the 4D rotation matrix for the frequencies ω x and ω y , i.e.
where R(ω z ) is a standard 2D rotation matrix. This transformation induces a new set of co-ordinates X = (X, X , Y, Y ) defined as X = T −1 x where T is well-known and reads The map then reads whereM so that having defined Q z = q sin ω z 0 cos ω z 0 . (100)