Exact quantization conditions for the elliptic Ruijsenaars-Schneider model

We propose and test exact quantization conditions for the $N$-particle quantum elliptic Ruijsenaars-Schneider integrable system, as well as its Calogero-Moser limit, based on the conjectural correspondence to the five-dimensional $\mathcal{N} = 1$ $SU(N)$ gauge theory in the Nekrasov-Shatashvili limit. We discuss two natural sets of quantization conditions, related by the electro-magnetic duality, and the importance of non-perturbative corrections in the Planck constant. We also comment on the eigenfunction problem, by reinterpreting the Separation of Variables approach in gauge theory terms.

its analytic solution is not known if not for very special cases. The situation is even worse if we consider its relativistic generalization, also known as N -particle elliptic Ruijsenaars-Schneider system [2][3][4][5]: in that case not only the analytic solution is not known, but also determining its Hilbert integrability (i.e. its domain of self-adjointness) is a rather nontrivial problem since the Hamiltonian is not a differential but a finite-difference operator [5][6][7]. It would therefore be quite helpful to develop new techniques to approach these elliptic problems.
As it became clear recently, supersymmetric gauge theories and topological string theory can provide an alternative, non-conventional framework to study quantum integrable systems. This was first pointed out in [8], where it was conjectured that all-orders WKB quantization conditions and energy spectrum for a particular class of integrable systems (such as closed Toda chains, elliptic Calogero-Moser and their relativistic versions) can be obtained by considering certain observables in Ω-background deformed four or fivedimensional gauge theories with at least eight supercharges and unitary gauge group, in a special limit known as Nekrasov-Shatashvili (NS) limit. In this limit only one (say, 1 ) of the two Ω-background parameters 1 and 2 is kept, and plays the role of the Planck constant ̵ h of the quantum integrable system; other gauge theory parameters can also be identified with parameters of the quantum Hamiltonians. The most important advantage of the gauge theory approach is that it naturally gives exact WKB quantization conditions and energy spectrum expressed not as an asymptotic series in ̵ h, but as a convergent power series in an auxiliary parameter (the instanton counting parameter Q, associated to some parameter in the Hamiltonians) whose coefficients are exact in ̵ h. The conjecture by [8] was tested in [9][10][11] for the case of the N -particle closed Toda chain, associated to four-dimensional N = 2 pure SU (N ) super Yang-Mills theory in the NS limit, and was shown to reproduce the known Toda solution studied in [12][13][14][15][16][17][18]. More recently other tests were performed in [19] for the case of the N -particle relativistic closed Toda chain [20], associated to the NS limit of five-dimensional N = 1 pure SU (N ) super Yang-Mills theory compactified on a circle, and in [21] for the case of other relativistic quantum integrable systems of cluster type [22], which in general can only be associated to a topological string theory on a local toric Calabi-Yau 3-fold (or (p, q)-brane web) rather than a five-dimensional gauge theory. Quite interestingly, the conjecture by [8] turns out to be inconsistent for all the relativistic systems considered in [19,21]: this is because even if the exact WKB quantization conditions obtained from gauge theory/topological string theory are exact in ̵ h and convergent as a series in Q, they present an infinitely dense set of poles as functions of ̵ h, which is inconsistent with the fact that the quantum integrable systems are perfectly well-defined for any ̵ h ∈ R + . This is however not too surprising: in principle in any quantum mechanical system complex instantons may generate important non-perturbative contributions in ̵ h, but these will be missed if we only consider the WKB solution. One can therefore imagine that inconsistencies of the conjecture by [8] are due to the fact that complex instantons are present in all relativistic integrable systems, but the gauge theory approach does not take them into account. We thus expect the poles in ̵ h should disappear when non-perturbative effects are considered. This is indeed what seems to happen: as conjectured and tested in [19,21], if we add the relevant non-perturbative contributions to the exact WKB quantization conditions we obtain pole-free quantization conditions for relativistic Toda chains and relativistic cluster integrable systems, and the resulting energy spectrum matches the one we can compute numerically by standard quantum mechanical arguments.
Of course, the biggest problem is to precisely determine the non-perturbative contributions. In [19,21] (based on previous works [23][24][25][26][27][28][29][30]) it is suggested that these are completely fixed by requiring the full (WKB + non-perturbative) exact quantization conditions to be invariant under the exchange ̵ h ↔ 4π 2 ̵ h. Although the effectiveness of such a simple proposal may seem surprising at first, this is not completely unexpected, being in line with the quantum group and modular double structure underlying the relativistic Toda chain [31] and, more in general, any relativistic cluster integrable system [22].
The purpose of the present work is to further test the conjecture by [8], or its nonperturbative refinement à la [19,21], in the case of N -particle elliptic quantum integrable systems of Calogero-Moser and Ruijsenaars-Schneider type, related to four-dimensional N = 2 * SU (N ) and five-dimensional N = 1 * SU (N ) gauge theories respectively, mostly focussing on the 2-particle case for simplicity. In order to test these conjectures against numerical results, we will restrict our attention to the region in parameter space for which the elliptic quantum integrable systems admit a discrete set of energy levels.
As we will see, the situation is pretty much similar to what happens for the closed Toda chain, relativistic and not: the exact WKB quantization conditions conjectured by [8] seem to be sufficient to reproduce the Calogero-Moser spectrum, while in the Ruijsenaars-Schneider case we also need to include non-perturbative corrections, fixed by the requirement of invariance under ̵ h ↔ 4π 2 ̵ h along the lines of [19,21]. It is important to remark that although the elliptic Ruijsenaars-Schneider system is not of cluster type, i.e. it is not related to a toric Calabi-Yau 3-fold, the ̵ h ↔ 4π 2 ̵ h symmetry is still expected due to its underlying modular double structure [5][6][7]. 1 There is however a new ingredient to the story, which is special to elliptic system. When the potential is doubly-periodic with real and imaginary periods (2ω, 2ω ′ ), we can either consider the L 2 ([0, 2ω] N −1 ) quantum mechanical problem relative to the real period or the L 2 ([0, 2ω ′ ] N −1 ) one relative to the imaginary period. Clearly the two problems are the same since they are simply related by the exchange ω ↔ ω ′ , but as already pointed out in [8] the gauge theory approach treats them differently: quantization conditions for the first and second case correspond to quantize the 1 -deformed Seiberg-Witten periods a j or the 1 -deformed dual periods a D,j respectively. This is not unexpected: since the complex structure τ = ω ′ ω of the torus is identified with the complexified gauge coupling, exchanging ω ↔ ω ′ corresponds to electro-magnetic duality, which leads to the exchange a ↔ a D . When 1 = 0 this was already made clear in [32] using the fact that a, a D are related by the Seiberg-Witten prepotential; we will see that this remains true even at 1 ≠ 0 if we replace the Seiberg-Witten prepotential by its appropriate 1 -deformed version (usually 1 Because of different conventions for the parameters, in this work the ̵ h ↔ 4π 2 ̵ h invariance will be replaced by invariance under ̵ h ↔ 2ω with 2ω real period of the torus on which the integrable system is defined. called twisted effective superpotential), which however in the five-dimensional case needs to include contributions which are non-perturbative in 1 ∼ ̵ h as we already discussed: we therefore conclude that away from the Seiberg-Witten limit, realizing electro-magnetic duality in five dimensions can only be achieved by also considering non-perturbative effects in the Omega background parameters.
The plan of the paper is as follows. Section 2 will be dedicated to studying the 2-particle elliptic Calogero-Moser system. We first introduce the system as well as its trigonometric and hyperbolic limits. After review what is known about its analytic solution, both in these special limits and in general, we explain how to study the problem numerically; we then move to discuss how gauge theory can be used to determine the energy spectrum analytically. Finally, we comment on what gauge theory can tell us about the problem of constructing eigenfunctions. Section 3 will follow the same steps, but for the 2-particle elliptic Ruijsenaars-Schneider system; Section 4 instead is devoted to the study of the Nparticle case. Useful formulae are collected in Appendices A, B.

2-particle systems of Calogero-Moser type
Let us consider a complex coordinate z = x + iy (x, y ∈ R) on a rectangular torus of halfperiods (ω, ω ′ ) with ω ∈ R + , ω ′ ∈ iR + ; this means that x ∼ x + 2ω, y ∼ y + 2 ω ′ . (2.1) With gauge theory applications in mind, we will sometimes find it more convenient to reparametrize the periods as (2ω, 2ω ′ ) = (2ω, −i ω π ln Q 4d ), (2.2) where Q 4d = e 2πiτ , τ = ω ′ ω . (2. 3) The 2-particle elliptic Calogero-Moser system (2-eCM) Hamiltonian is given by the secondorder ordinary differential equation (see Appendix A.1 for our conventions on elliptic functions) Here all parameters z, ̵ h, g, E ∈ C. One possible problem one could study is to look for the two linearly independent solutions to this equation for generic complex values of the parameters. We are however interested in quantum mechanical applications of (2.4), so we should only be considering values of parameters for which (2.4) realizes a well-defined quantum mechanical problem with self-adjoint Hamiltonian. Among various other possibilities, 2 this happens in the following two cases: B-model: Focussing on the real slice z = x ∈ R and requiring ̵ h = ̵ h x ∈ R + , g = g x ∈ R + , E = E (B) ∈ R + the Hamiltonian (2.4) reduces to −∂ 2 x + ( (2.5) or alternatively, by introducing the sometimes more familiar parameter α x = gx ̵ hx + 1 2 , For g x ⩾ ̵ hx 2 (or α x ⩾ 1) the potential is confining, and (2.5) defines a quantum mechanical problem on L 2 x ([0, 2ω]) whose energy spectrum is real and discrete; we will refer to (2.5) as the B-type 2-particle elliptic Calogero-Moser quantum integrable system (2-eCM B ).
In the limit ω ′ → i∞ (i.e. Q 4d → 0) this reduces (modulo constants) to the 2-particle trigonometric Calogero-Moser quantum integrable system (2-tCM) this is still a quantum mechanical problem on L 2 x ([0, 2ω]) with a discrete set of energy levels for g x ⩾ ̵ hx 2 , and its solution is known analytically.
A-model: Focussing instead on the slice z = iy ∈ iR and requiring ̵ 8) or alternatively, by introducing the parameter α y = gy ̵ hy + 1 2 , For g y ⩾ ̵ hy 2 (or α y ⩾ 1) the potential is confining, and (2.8) defines a quantum mechanical problem on L 2 y ([0, 2 ω ′ ]) with energy spectrum real and discrete; we will refer to (2.8) as the A-type 2-particle elliptic Calogero-Moser quantum integrable system (2-eCM A ).
In the limit ω ′ → i∞ (i.e. Q 4d → 0) this reduces (modulo constants) to the 2-particle hyperbolic Calogero-Moser quantum integrable system (2-hCM) this is still a well-defined quantum mechanical problem for y ∈ (0, ∞) and g y ⩾ ̵ hy 2 whose solution is known analytically, however its energy spectrum is continuous. Although we introduced them as different, it is important to remark that the two problems 2-eCM B and 2-eCM A are actually the same: in fact since [37] ℘(iy ω, ω ′ ) = −℘(y − iω, −iω ′ ) = −℘(y − iω ′ , iω), . (2.12) Despite this fact, we prefer to keep distinguishing them in order to facilitate later comparison with gauge theory. In fact, we will see that the gauge theory approach treats B-and Amodel differently; verifying that these different treatments respect (2.12) will therefore be a non-trivial consistency check for the validity of the gauge theory approach.

Trigonometric and hyperbolic cases
Before discussing the 2-eCM B and 2-eCM A systems, we will first review the known analytic solution to their trigonometric (2-tCM) and hyperbolic  limits. This will be of help later in Section 2.2 to understand how to numerically evaluate the spectrum of the elliptic system.

Trigonometric case
Let us start by considering the 2-tCM system. For generic half-period ω, the 2-tCM problem readsĤ where for later convenience we reparametrized the energy E (T) in terms of an auxiliary variable a ∈ R as (2.14) Equation (2.13) will in general have two linearly independent solutions; however, since we will ultimately be interested in L 2 ([0, 2ω]) eigenfunctions, we start by considering only a particular linear combination of them which vanishes at x = 0, given by (modulo normalization factors) is actually a solution only in the interval x ∈ [0, ω]; from the symmetry of the problem, the solution in the remaining interval x ∈ [ω, 2ω] should be of the same form of (2.15), possibly up to an overall sign. However, the x ∈ [0, ω] and x ∈ [ω, 2ω] solutions are not connected smoothly at x = ω for generic values of a (or, equivalently, E (T) ). In order for them to be smoothly connected, i.e. for the total solution to be in L 2 ([0, 2ω]), we have to tune a (i.e. the energy E (T) ) carefully; this is why the energy spectrum of the 2-tCM system is quantized. More concretely, the smoothness conditions we must impose are (2.16) these conditions determine the only allowed values a n and E (T) n = E (T) (a n ) (n = 0, 1, . . .), which are simply Quantization conditions (2.17) give rise to parity-even (with respect to x = ω) or parity-odd n (x) for n even or odd respectively: , n = 2m + 1.
(2.18) By using the identity these (unnormalized) eigenfunctions can be rewritten in the more compact form where C α n (z) are the Gegenbauer polynomials Thanks to the orthogonality properties of the Gegenbauer polynomials we can then construct a normalized basis of 2-tCM eigenfunctions which satisfy the orthonormality condition We may also replace n by a n via (2.17) and write (2.24) We have thus completely determined the normalized L 2 ([0, 2ω]) 2-tCM eigenfunctions (2.22) and its discrete energy levels E (T) n

Hyperbolic case
Let us now briefly discuss the 2-hCM problem where again we reparametrized the energy E (H) in terms of a ∈ R as Clearly, the 2-hCM problem can be obtained from the 2-tCM one (2.13) by sending x → iy, , y ∈ (0, ∞).
(2.27) Let us stress again that in principle there are two linearly independent solutions to (2.25), but since we are interested in solutions vanishing at y = 0 (due to the divergence of the potential) we only consider their particular linear combination (2.27). Since this combination also vanishes fast enough at y = +∞, (2.27) is actually the complete y ∈ (0, ∞) solution to the 2-hCM system; given that there is no need to impose further conditions on the solution, the energy (2.26) is continuous and positive.

Elliptic case: B-model
We are now ready to consider the 2-eCM B quantum mechanical problem, defined aŝ (2.28) where for convenience we made the explicit dependence on Q 4d , that is on (ω, ω ′ ), of the eigenfunction ψ (B) (x, Q 4d ) (which of course also depends on all the other parameters of the problem). This problem can be studied either analytically as a perturbation series in Q 4d or numerically, as we are going to illustrate now.

Analytical study
In order to solve the 2-eCM B problem analytically on L 2 ([0, 2ω]) we can use perturbation theory around Q 4d = 0 (or ω ′ → i∞), that is around the trigonometric limit. 3 We will therefore consider the Q 4d -series expansion of the Hamiltonian The discrete energy levels and eigenfunctions will admit similar expansions: where clearly with a n as in (2.17), while ψ (0) n (x) will be the normalized 2-tCM eigenfunction (2.22) With these considerations, we can now look for a solution to the 2-eCM B problem order by order in the Q 4d expansion. This can be done if we further consider expanding all coefficients ψ (l) where the coefficients c n ⟩ = 1. By doing this we find for example as well as where c (1) given more explicitly by (2.39) Similar results can be obtained for higher orders in the Q 4d expansion.
To compute the higher order corrections more efficiently, one can use the idea in [39]. The perturbative expansion of the wave function takes the following form: 40) where N n is an irrelevant normalization constant. The important point is that the functions

Numerical study
The 2-eCM B problem (2.28) can also be studied numerically. For doing so, we simply have to numerically diagonalize the matrix constructed out of the matrix elements n (x) = n⟩ (2.22) to perform diagonalization. Clearly, this procedure would in principle require diagonalizing an ∞ × ∞ matrix; at the practical level what we do instead is to compute the eigenvalues of a truncated version of this matrix, and then check convergence of the eigenvalues as we increase the matrix size. In this way we can obtain both the numerical spectrum and the numerical eigenfunctions of the 2-eCM B system.

Elliptic case: A-model
Let us finally comment on the 2-eCM A quantum mechanical problem (2.42) Trying to solve this problem analytically on L 2 ([0, 2 ω ′ ]) = L 2 ([0, − ω π ln Q 4d ]) in terms of perturbation theory around Q 4d = 0 (or ω ′ → i∞) appears to be more complicated than in the 2-eCM B case: this is because in the Q 4d = 0 limit we reduce to the 2-hCM system, which has continuous spectrum and eigenfunctions in y ∈ (0, ∞) rather than L 2 ([0, 2 ω ′ ]). It should however be possible to do so, by using the quantum Separation of Variables approach which involves the construction of entire solutions to the associated Baxter equation. 4 We will outline this procedure, reinterpreted in gauge theory language, in Section 2.5.
For our purposes, it will however be sufficient to study the solution to (2.42) numerically. As for the case of the B-model, we just have to diagonalize the matrix constructed out of the matrix elements at fixed g y > ̵ hy 2 and Q 4d , where this time diagonalization is performed by using the L 2 ([0, 2 ω ′ ]) orthonormal basis ψ (T) n (y) = n⟩ with half-period ω ′ = − π 2ω ln Q 4d rather than ω. Clearly, because of (2.12) diagonalizingĤ A with half-periods (ω, ω ′ ) is equivalent to diagonalizingĤ B with half-periods (−iω ′ , iω) and parameters g x = g y , ̵ h x = ̵ h y , that is In fact, as we already mentioned the 2-eCM A and 2-eCM B problems are related by S-duality (in τ ), i.e. by the exchange of half-periods ω, ω ′ , which also implies the exchange An alternative option to compute the 2-eCM A spectrum would therefore be to study the 2-eCM A problem in terms of perturbation theory around Q (D) 4d = 0 (or ω → ∞), i.e. around the 2-tCM system of period 2 ω ′ , along the lines of what we did in Section 2.2.

A special case with analytic solution
We should also mention that there are special values of the parameter g for which the solution to the 2-eCM B and 2-eCM A problems is known analytically. This happens for example when g ̵ h = 3 2 , in which case the generic elliptic problem (2.4) reduces to then the linear combination is a formal solution to (2.46) vanishing at z = 0. Requiring this to also vanish at z = 2ω or z = 2ω ′ , i.e. requiring the solution to be in L 2 ([0, 2ω]) or L 2 ([0, 2 ω ′ ]), imposes restrictions on the values of the energy, which in turn determine the discrete spectrum of the 2-eCM B and 2-eCM A system respectively. More in general, analytic solutions exist for g ̵ h = 1 2 + n with n ∈ N, see [1,41].

Calogero-Moser energy spectrum from gauge theory
Up until now we have been discussing how to solve (analytically or numerically) the 2-eCM B and 2-eCM A problems, as well as their trigonometric and hyperbolic limit, only relying on standard quantum mechanics techniques. We now want to discuss how the same results can be obtained from gauge theory considerations, at least for what the energy spectrum is concerned.
The idea, first suggested in [8], is that it should possible to recover the discrete spectrum of both 2-eCM B and 2-eCM A (as well as their eigenfunctions) by computing the vacuum expectation value of certain observables in the N = 2 * SU (2) supersymmetric gauge theory on R 4 1 , 2 , in the particular limit (usually referred to as NS limit) in which 2 → 0. Here 1 and 2 are the Omega background parameters used to regularize the infinite volume of R 4 ; additional gauge theory parameters are the complex mass m of the adjoint N = 2 hypermultiplet, the complex VEV a of the scalar field in the N = 2 vector multiplet, and the instanton counting parameter Q 4d = e 2πiτ with τ complexified gauge coupling. The dictionary between gauge theory parameters and 2-eCM B , 2-eCM A parameters is provided in Table 1: here ω should be thought as an overall scale, while as we will see a is just another way of parametrizing the energy (similarly to (2.14) and (2.26)) which appears to be more natural from the gauge theory point of view.
Let us illustrate the proposal by [8] (and subsequent works) in some more detail. The idea is to proceed in two steps: Step I: general analysis First, we would need to construct two (generically) linearly independent formal solutions ψ (i) (z, g, ̵ h, a, ω, ω ′ ), i = 1, 2 to the complex 2-particle elliptic Calogero-Moser system (2.4), such that Gauge theory provides explicit, convergent Q 4d -series expressions both for the energy and the formal solutions as functions of a; these in fact coincide with the NS limit of VEVs of certain codimension four and two defects, if we identify ̵ h = 1 and g = m as in Table 1: The codimension two defects of interest are monodromy (or Gukov-Witten) defects [42][43][44], whose interpretation as formal solutions to (2.49) has been discussed in a number of papers [43,45]; since we will not need them for our purposes, we refer to these works for further details. 5 The codimension four defect corresponding to the energy is instead a local observable which basically coincides with ⟨Trφ 2 ⟩, where φ is the scalar field in the N = 2 vector multiplet; explicitly, the gauge theory expression for the energy reads 4d, inst (a, 1 , m, Q 4d ) 4d, inst is the instanton part of the twisted effective superpotential for the SU (2) N = 2 * theory (with a 1 = −a 2 = a) defined as 4d, inst as in Appendix B. The function E 2 (Q) is the quasi-modular form, defined in (A.7). For the reader's convenience, we report here the first few terms in the Q 4d expansion: (2.53) 5 Although most works focus on checking that these monodromy defects satisfy (2.49) order by order in Q 4d , this can actually be proven at all orders via qq-characters technology [46][47][48][49][50].    Step II: Hilbert integrability Once we have determined the formal solution to the generic complex 2-eCM system (2.49) from gauge theory, we can study Hilbert integrability: that is, we want to understand if this formal eigenfunction can belong to the Hilbert space of a quantum mechanical system with self-adjoint Hamiltonian, for example 2-eCM B or 2-eCM A . Usually, for generic values of a (or, equivalently, the energy) this is not the case; however, the conjecture by [8] states that Hilbert integrability should emerge in the following two special situations: 2-eCM B model:  ̵ h y . The spectrum is the same as the one in Table 2.
The spectrum is the same as the one in Table 3. when considering more and more instanton corrections. Finally, it correctly reduces to the known 2-tCM energy spectrum in the trigonometric limit Q 4d → 0. It is also interesting to notice that the B-type quantization conditions for 2-eCM B (2.54) actually coincide with the quantization conditions for 2-tCM (2.17), i.e. they do not receive corrections in Q 4d .  Tables 4 and 5 the gauge theory results seem to be in agreement with the energy spectrum computed numerically (or exactly for g y = 3 2 ̵ h y ). A-type quantization conditions (2.55) can be thought as an S-dual (electro-magnetic dual) version of the B-type conditions (2.54), where we quantize a D rather than a. These two variables are related by

2-eCM
is the full twisted effective superpotential containing both the instanton and the classical + 1-loop part. This is nothing else but the 1 -deformed version of the Seiberg-Witten relation between a and a D , in which the Seiberg-Witten prepotential is replaced by W . We will later see in Section 2.5 how A-type quantization conditions may arise from the quantum Separation of Variables approach to the 2-eCM A problem.
To sum up, the conjecture by [8] seems to work nicely in the 2-eCM case: the discrete energy levels for the two quantum mechanical systems 2-eCM B and 2-eCM A can indeed be obtained from the same expression for the energy (2.51) by quantizing a in two different ways, related by S-duality/electro-magnetic duality τ ↔ − 1 τ . S-duality is also reflected in the relations (2.12) and (2.44), whose realization in gauge theory is evident from comparing Tables 2, 4 or Tables 3, 5.

Comments on Baxter equation and quantum Separation of Variables
As we mentioned in Section 2.4, formal solutions to the complex 2-eCM problem can be computed in gauge theory by considering codimension two defects of monodromy type in four-dimensional N = 2 * SU (2) theory. Conjecturally, these formal solutions should reduce to true eigenfunctions of the 2-eCM B and 2-eCM A systems when imposing B-type (2.54) or A-type (2.55) quantization conditions, and the resulting B-type and A-type eigenfunctions should be related by S-duality τ ↔ − 1 τ . In this Section we would like to elaborate, without any pretence of rigorousness, about a different way of constructing eigenfunctions for the 2-eCM A system, based on a gauge theory reinterpretation of the quantum Separation of Variables approach. As we remarked in Section 2.3, it is hard to study 2-eCM A eigenfunctions analytically in terms of perturbation theory around Q 4d = 0, i.e. around the hyperbolic limit, since the 2-eCM A and 2-hCM problems have different Hilbert spaces and in addition 2-hCM eigenfunctions are not bound states. Quantum Separation of Variables was developed as a general framework to overcome these and other similar difficulties, and it was successfully applied to the N -particle Toda chain (open and closed) [15][16][17], the N -particle hyperbolic Calogero-Moser system [40], as well as the relativistic version of the open Toda chain [31] and the hyperbolic Ruijsenaars-Schneider system [51,52]. 6 Roughly, the idea of the quantum Separation of Variables approach is to construct the N -particle elliptic Calogero-Moser (of type A) eigenfunction by means of a particular integral transformation which involves the eigenfunction of the N − 1-particle hyperbolic Calogero-Moser system (with center of mass not decoupled) as well as an appropriate entire, fast-decaying solution to an auxiliary 1-dimensional problem known as Baxter equation, which can also be thought of as a quantized version of the spectral curve of the classical integrable system. Since the 1-particle hCM system is just a free system, its eigenfunction will be a plane wave, and as a consequence the 2-eCM A eigenfunction will simply be obtained from the solution to the Baxter equation via Fourier transformation.
Let us try to be more quantitative. First of all we need to consider the Baxter equation associated to the 2-eCM A system: as we said, this arises from quantization of the classical spectral curve, which for the model at hand was constructed in [56]. From the gauge theory point of view, the 2-eCM A spectral curve is nothing but the Seiberg-Witten curve for the four-dimensional N = 2 * SU (2) theory as originally studied in [57,58]. It will however be more useful for our purposes to consider the novel approach by [59,60] to Seiberg-Witten curves and their quantum version. In this approach, the Seiberg-Witten curve for a theory can be constructed from the VEV of a particular observable ⟨χ 4d (σ, ⃗ a, 1 , 2 , m, Q 4d )⟩, usually known as (fundamental) qq-character [46], in the "classical" or Seiberg-Witten limit 1,2 → 0, while the quantum version of the curve (or Baxter equation in the integrable system language) is constructed out of the NS limit 2 → 0 of the qq-character. The NS limit ⟨χ (2) qq-character can be explicitly computed in gauge theory with the formulae given in Appendix B: this is a polynomial in an auxiliary variable σ of degree N = 2 given by (for As we can see, E ′ (a, 1 , m, Q 4d ) is closely related to the gauge theory expression for the complex 2-eCM system (2.51): (2.59) From (2.57), by following [60], specializing to 1 = i ̵ h y , m = ig y as from Table 1 and restricting to σ ∈ R, we obtain the 2-eCM A Baxter equation or 4d N = 2 * SU (2) quantum Seiberg-Witten curve As we can see, our Baxter equation is a rather complicated infinite-order finite-difference operator on R. Two (generically) linearly independent functions h y , g y , Q 4d ) formally satisfying (2.60) can be obtained by considering the NS limit of the VEVs of other codimension two defects, different from the monodromy one considered in (2.50): these correspond to coupling the four-dimensional theory to two free for the N = 2 * U (1) theory.
"fundamental" (f ) or "antifundamental" (af ) two-dimensional N = (2, 2) * hypermultiplets, 8 whose SU (2) part of the flavour symmetry is gauged and coincides with the SU (2) gauge symmetry of the four-dimensional theory under exam [61][62][63]. Schematically, these two functions can be written as (2.61) Here 4d,inst (σ, a, ̵ h y , g y , Q 4d )⟩ NS contain the Q 4d instanton corrections: these can be computed with the formulae collected in Appendix B, however already at one instanton the result is too lengthy to be reported here and we will therefore just mention that Clearly, chosen any constant ξ ∈ C the linear combination formally satisfies (2.60), that is (2.65) It is important at this moment to point out that both functions Q (f ) (σ, a, ̵ h y , g y , Q 4d ), Q (af ) (σ, a, ̵ h y , g y , Q 4d ) are not entire in σ, but seem to have two infinite sets of simple poles at σ = ±a + in ̵ h y , n ∈ Z; for example, Q (f ) (σ, a, ̵ h y , g y Q 4d ) has poles at σ = ±a − in ̵ h y , n ⩾ 0 coming from the Gamma functions in (2.62) and poles at σ = ±a + in ̵ h y , n ⩾ 1 coming from the instanton corrections, 9 and viceversa for Q (af ) (σ, a, ̵ h y , g y , Q 4d ). What is interesting is that all these simple poles seem to cancel each other in the linear combination (2.64) at those very special values of ξ and a satisfying the A-type quantization conditions (2.55). More precisely, if ξ and a are such that These are hypermultiplet in the two-dimensional N = (4, 4) sense; "fundamental" or "antifundamental" is related to their charge under a U (1)σ flavour symmetry which is not gauged. 9 We do not have a proof of this fact: it just comes as an observation from explicit computation of the first few instanton corrections. In addition, instanton corrections for, say, Q (f ) (σ, a, ̵ hy, gy, Q 4d ) seem to have additional simple poles at σ = ±a − igy − i ̵ hy which appears to be equivalent to the A-type quantization conditions This would then imply that the linear combination (2.64) is free of poles and entire in σ for these particular values of ξ and a satisfying the A-type quantization conditions (2.66) (at the end we would expect ξ = −(−1) n for some positive integer n because of the symmetry of our problem). Although we cannot make any rigorous statement due to the lack of information about the analytic structure of the instanton corrections in (2.61), it is still quite remarkable to find that our gauge theory analysis of the 2-eCM A Baxter equation involves exactly the same requirements and mechanisms at work in the quantum Separation of Variables treatment of the Baxter equation for the similar case of the 2-particle closed Toda chain [11][12][13][14][15][16][17][18]64]. We are therefore encouraged to proceed along the lines of the quantum Separation of Variables approach, reinterpreted in gauge theory language. The next step would then be to consider the Fourier transform of (2.64); more precisely, let us consider the Fourier transform multiplied by a prefactor depending on θ(x, Q 4d ) defined in (A.13), that is 10 If we only focus on the values of ξ and a = a n for which Q(σ, a n , ̵ h y , g y , Q 4d ) is an entire function, and assuming Q(σ, a n , ̵ h y , g y , Q 4d ) decays fast enough at σ = ±∞, we can bring y-derivatives inside the integral and shift the contour of integration; using these facts and (2.65) one can then show that (2.71) 10 The additional theta function factor may be interpreted as dividing by a codimension two defect of monodromy type for an N = 2 * U (1) theory.
Using the identities collected in Appendix A.1, this equation can be recast in the more familiar form which is nothing else but the 2-eCM A quantum mechanical problem. Although once again we cannot make any rigorous statement, the expectation is that (2.70) will be the correct L 2 ([0, 2 ω ′ ]) 2-eCM A eigenfunction for a = a n satisfying A-type quantization conditions (2.66), as it should follow from entirety and decay properties at σ = ±∞ of the solution to the Baxter equation (2.64) at the values a = a n . A similar procedure should work for the N -particle eCM A system, although for N > 2 the integral transformation involved will be more complicated than a Fourier transform.

Hyperbolic limit
In the limit Q 4d → 0 the Baxter solution (2.64) reduces to Q (f ) 0 (σ, a, ̵ h y , g y ) only, and the Baxter equation (2.65) becomes (2.73) It is easy to verify that this equation is indeed satisfied. Assuming y > 0, 11 the Fourier transform (multiplied by a prefactor) ψ(y, a, ̵ ψ(y, a, ̵ h y , g y ) = π 2 ω 2 a 2 ψ(y, a, ̵ h y , g y ). (2.75) It is important to notice that in this case a, and therefore the 2-hCM energy, is a continuous variable: there is no need to impose quantization conditions, nor to require entirety of the solution to the Baxter equation, since Q (f ) 0 (σ, a, ̵ h y , g y ) already possesses the correct decay properties at infinity and we are also free to shift the integration contour in the upper half σ-plane due to the absence of poles. In the special case g y = 0, our solution (2.74) reduces to the one constructed via the same quantum Separation of Variables approach in [40]; more in general, for g y > ̵ hy 2 we find (after evaluating the integral) (2.76) which is nothing but the previously discussed 2-hCM eigenfunction (2.27).

2-particle systems of Ruijsenaars-Schneider type
Similarly to what is done in Section 2, let us consider a complex coordinate z = x + iy (x, y ∈ R) on a rectangular torus of half-periods (ω,ω ′ ) 12 withω ∈ R + ,ω ′ ∈ iR + so that Also, for gauge theory applications we will sometimes reparametrize the periods as 3) The 2-particle elliptic Ruijsenaars-Schneider system (2-eRS) Hamiltonian is given by the second-order finite-difference equation The elliptic functions appearing in this section are defined in Appendix A.1. Although this is the standard form of the complex 2-eRS Hamiltonian, we can also work with the slightly different Hamiltonian this differs from (3.5) only by an overall multiplicative constant: We can therefore alternatively study the problem withĤ ′ eRS given by (3.6). As for the Calogero-Moser case, one possible question would be to construct two linearly independent solutions to this finite-difference equation for generic complex values of the parameters. Since we are however interested in quantum mechanical applications, we should only be considering values of parameters for which (3.4), (3.8) realize a well-defined quantum mechanical problem. Among various possibilities, this happens in the following two cases: (3.10) (3.9) and (3.10) should define quantum mechanical problems on L 2 x ([0, 2ω]) whose energy spectrum is real and discrete [5][6][7]; we will refer to (3.9) (or equivalently (3.10)) as the B-type 2-particle elliptic Ruijsenaars-Schneider quantum integrable system (2-eRS B ).
A-model: Restricting instead to the slice z = iy ∈ iR and requiring ̵
In the limitω ′ → i∞ (i.e. Q 5d → 0), (3.13) reduces to the 2-particle hyperbolic Ruijsenaars-Schneider quantum integrable system (2-hRS) (3.14) this is still a quantum mechanical problem, with continuous spectrum, for y ∈ (0, ∞) and 0 ⩽ g y ⩽ ̵ h y + 2ω [65], whose analytic solution was studied in [51,52]. Similarly to what we saw happening for the elliptic Calogero-Moser case, the two problems 2-eRS B and 2-eRS A are actually related: in fact, since [37] σ(iy ω,ω ′ ) = iσ(y − iω ′ , iω), as a consequence, We however prefer to keep problems B and A distinguished, since the gauge theory approach treats them differently; verifying that gauge theory results respect (3.17) will therefore be a non-trivial consistency check for the validity of the proposed gauge theory solution.

Non-relativistic limit
Before moving to the study of the various models, let us quickly mention that the various Ruijsenaars-Schneider systems can be reduced to their Calogero-Moser analogues by taking the "non-relativistic" limitω → ∞,ω ′ → i∞ while keeping w = ω ω z andτ constant (so that τ → τ , Q 5d → Q 4d ). For example, the complex 2-eRS Hamiltonian (3.5) reduces to the complex 2-eCM one:

Trigonometric and hyperbolic cases
Before discussing the 2-eRS B and 2-eRS A systems of interest, let us first collect a few known facts about the analytic solution to their trigonometric (2-tRS) and hyperbolic  limits. This will be of particular importance in Section 3.2, where we will show how to numerically evaluate the energy spectrum of the elliptic systems.

Trigonometric case
Let us start by reviewing the known analytic solution to the 2-tRS system, along the same lines of Section 2.1. For generic half-periodω the 2-tRS Hamiltonian readŝ also representable as the basic hypergeometric series notice that we can move from q −1 < 1 to q −1 > 1 thanks to These orthogonal polynomials play the same role for 2-tRS of the Gegenbauer polynomials for 2-tCM. The Rogers polynomials are known to satisfy the finite-difference equation [67] (for q = e π ̵ hx hx ω ).

(3.25)
Therefore, if we multiply them by the square root w(x) of an appropriate weight function (which is actually the orthogonality measure for the Rogers polynomials) which satisfies it is easy to realize that is an L 2 ([0, 2ω]) eigenfunction of the 2-tRS system with eigenvalue ; (3.29) in fact Moreover, if we introduce the normalized Rogers polynomials then the normalized eigenfunctions satisfy the orthonormality condition hx ω ) = δ m,n . = E (T) (a n ), i.e. as coming from (3.21) for a = a n satisfying the quantization conditions a n = ±(g x + n ̵ h x ), n ∈ N; (3.34) these are the same quantization conditions we previously found for 2-tCM (2.17), modulo having redefined a → a 2 and shifted g x by ̵ h x 2.

Hyperbolic case
Let us now shortly comment on the 2-hRS system, whose Hamiltonian readŝ where we again reparameterized the energy E (H) in terms of an auxiliary variable a as This Hamiltonian can clearly be obtained from (3.20) by sending x → iy, g x → ig y , ̵ h x → i ̵ h y . However, it is not possible to recover the 2-hRS solution from the "off-shell" (generic a) solution of 2-tRS (as we did instead in the Calogero-Moser case, Section 2.1). This is because the 2-hRS Hamiltonian is a finite-difference equation rather than a differential one, therefore any possible formal solution to (3.35) will be ambiguous: in fact if we multiply a formal solution by any i ̵ h y -periodic function (usually referred to as "quasi-constant"), this will still be a formal solution. Of course, this would in principle be a problem also for the 2-tRS system; however, while such quasi-constants cannot be present for 2-tRS since they will spoil the polynomial nature of the eigenfunction, they may affect the 2-hRS solution which doesn't need to be polynomial [65].
From the works [51,52,65], it appears that the proper way to fix these quasi-constant ambiguities is to study the modular double version of the problem, similarly to what happens for the relativistic open Toda chain [31]; that is, we should require ψ (H) (y) to be a solution not only of the original 2-hRS HamiltonianĤ (H) (3.35), but also of a "modular dual" 2-hRS HamiltonianĤ (H) , related to the original one by the exchange 2ω ←→ ̵ h y : is also related to the original one (3.36) by the exchange 2ω ←→ ̵ h y . SinceĤ (H) is a finite-difference equation in 2ω, requiring (3.37) in addition to (3.35) will completely fix the quasi-constant ambiguity of the solution ψ (H) (y), which should then be 2ω ←→ ̵ h y symmetric [51,52]. We will later see how modular duality plays an important role also for the 2-eRS A system.

Elliptic case: B-model
We are finally ready to study the 2-eRS B quantum mechanical problem, which in the form (3.10) readŝ where we made explicit the dependence on Q 5d of the eigenfunction ψ (B) (x, Q 5d ) (which will depend also on the other parameters of the model). As for the 2-eCM B case, also this problem can be studied both analytically as a perturbation series in Q 5d and numerically.

Analytical study
To solve the 2-eRS B problem analytically on L 2 ([0, 2ω]) we may use perturbation theory around Q 5d = 0 (orω ′ → i∞), i.e. around the trigonometric limit. For this purpose it will be more convenient to rewrite the Hamiltonian operatorĤ ′ B in a form better suited to study the small Q 5d limit. To do this we factorize (in analogy with (3.32)) if now we introduce the elliptic Gamma function then by choosing which is such that where the transformed Hamiltonian We can now consider the small Q 5d expansion of the transformed HamiltonianĤ ′′ B : wherê The discrete energy levels and eigenfunctions will admit similar expansions: (3.49) We already know from Section 3.1 that with a n as in (3.34), while Φ n (x) will be the normalized Rogers polynomial (3.31): What we have to do then is to solve the transformed 2-eRS B problem order by order in the Q 5d expansion. This can be done if we further consider expanding all Φ (l) where at the practical level the summation range can be truncated to 0 ⩽ m ⩽ n + 2l because of the properties ofĤ ′′ B (l) . In this way we find for example 13 Higher order terms in the Q 5d expansion can easily be obtained with the help of some computer program, at least for the lowest energy states (lowest values of n).

Numerical study
In those cases for which studying this problem analytically requires too much computational power, we can still compute the 2-eRS B spectrum numerically. For numerical computations it may be easier to work withĤ B (3.9) rather thanĤ ′ B (orĤ ′′ B ), due to the properties of the Weierstrass σ-function. In this case we need to diagonalize the matrix (truncated to some finite size) constructed out of the matrix elements at fixed 0 < g x < ̵ h x + 2ω and Q 5d . Here we are using the L 2 ([0, 2ω]) 2-tRS orthonormal basis ψ (T) n (x) = n⟩ (3.32) to perform diagonalization. The expectation is that by increasing the size of the matrix, the numerical eigenvalues will converge to the actual energies of the 2-eRS B system; in this way we can compute both the numerical spectrum and the numerical eigenfunctions of the 2-eRS B system.

Elliptic case: A-model
Lastly, let us comment on the 2-eRS A quantum mechanical problem in the form (3.13), i.e. (3.56) For the same reasons of its 2-eCM A counterpart, it seems quite complicated to solve this problem analytically on L 2 ([0, 2 ω ′ ]) in terms of perturbation theory around Q 5d = 0 (or 13 Computing E ′(l) n for generic n as we did in Section 2.2 would require the knowledge of a set of identities between Φ (0) n (x ± i ̵ hx) and Φ n (x) which we are not aware of. Table 6: Map of 5d SU (2) N = 1 * gauge theory and 2-eRS B , 2-eRS A parameters.

Gauge theory (NS) 2-eRS model (complex) 2-eRS B model 2-eRS
ω ′ → i∞); in addition, already the solution to the 2-hRS system is not entirely understood. It may however be possible to construct eigenfunctions using the quantum Separation of Variables approach, which involves the study of entire solutions to the associated Baxter equation; we will sketch how gauge theory would suggest us to proceed in Section 3.5.
Fortunately, for our purposes it will be sufficient to study the 2-eRS A problem numerically. In order to perform numerical diagonalization, it will again be more convenient to work with the HamiltonianĤ A (3.12) rather thanĤ ′ A . In fact, according to what we discussed around (3.16) We can therefore apply the same procedure described in Section 3.2 to compute the spectrum E (A) of the 2-eRS A modelĤ A numerically, although we will need to use the L 2 ([0, 2 ω ′ ]) orthonormal basis n⟩ = ψ (T) n (y) (3.32) with half-period ω ′ = − 1 2 π ω ln Q 5d rather thanω to perform diagonalization.

Ruijsenaars-Schneider energy spectrum from gauge theory
We have seen in the previous Sections how the 2-eRS B and 2-eRS A problems, as well as their 2-tRS and 2-hRS limits, can be solved (analytically or numerically) with the standard tools of quantum mechanics. We now want to understand if it is possible to reproduce the same results from gauge theory arguments, at least at the level of energy spectrum.
As we mentioned in the Introduction, it should be possible to do so by considering five-dimensional gauge theories or topological string theory quantities in the NS limit [8], although for relativistic quantum integrable systems non-perturbative contributions in ̵ h are also expected [19,21]. Based on the proposal by [8] and the analogy with the 2-eCM case, the 2-eRS B and 2-eRS A systems are expected to be related to the N = 1 * SU (2) supersymmetric gauge theory on R 4 1 , 2 × S 1 R , always in the NS limit 2 → 0. The dictionary between gauge theory and 2-eRS B , 2-eRS A models is given in Table 6, where in particular R is the radius of the S 1 R circle while Q 5d = e 2πiτ is the instanton counting parameter (with τ inverse gauge coupling); the real VEV a of the scalar field in the N = 1 vector multiplet will also play a role in what follows as a different way of parametrizing the energy.
As in Section 2.4, we should proceed in two steps: Step I: general analysis First, we would need to construct two (generically) linearly independent formal solutions ψ (i) (z, a, ̵ h, g,ω,ω ′ ), i = 1, 2 to the complex 2-particle elliptic Ruijsenaars-Schneider system H eRS (3.5), such that for any generic z, a, ̵ h, g ∈ C; clearly these will also solvê withĤ ′ eRS as in (3.6) and As for the elliptic Calogero-Moser case, five-dimensional gauge theory provides explicit, convergent Q 5d -series expressions for the energy and the formal solutions as functions of a; these again coincide with the NS limit of VEVs of codimension four and two defects with (a, 1 , m, R, Q 5d )⟩ NS , ψ (i) (z, a, ̵ h, g,ω,ω ′ ) ⇐⇒ codim. 2 defect (monodromy, NS). (3.61) The relevant codimension two defects are still of monodromy (or Gukov-Witten) type: their explicit computation can be found for example in [62], where it was also checked that such defects satisfy (3.59) at the first few orders in Q 5d . The codimension four defect associated to the energy is instead a line observable, and more precisely corresponds to the Wilson loop in the fundamental representation 2 of SU (2) wrapping S 1 R , again as explained in [62]: its first few orders in the Q 5d expansion are (from the formulae in Appendix B) This gauge theory expression for the energy enjoys many symmetries, in particular it is invariant under the simultaneous exchange (q 1 , µ) ↔ (q −1 1 , µ −1 ) as well as under α ↔ α −1 . Gauge Gauge  Step II: Hilbert integrability Having constructed the formal solution to the generic complex 2-eRS system (3.59) from gauge theory, we can start discussing about Hilbert integrability. For generic values of a (i.e. of the energy), our formal solution is not expected to belong to any Hilbert space of some quantum mechanical system, such as 2-eRS B or 2-eRS A ; however, as for the 2-eCM case, according to [8] Hilbert integrability should emerge in two special cases: 2-eRS B model: the gauge theory expression (3.62) is conjecturally expected to reproduce the discrete energy levels for the 2-eRS B modelĤ ′ B (3.10) with Hilbert space L 2 ([0, 2ω]). This can indeed be checked analytically, for example by comparing (3.62) with (3.64) imposed against our previous computations (3.54). We can also perform some numerical test: remarkably enough, as we can see from Tables 7 and 8 our gauge theory results seem to converge to the nu-merical ones when adding more and more instanton corrections. 14 It is also important to remark that the gauge theory proposal correctly reproduces the known 2-tRS energy spectrum (3.29) in the trigonometric limit Q 5d → 0, and that B-type quantization conditions for 2-eRS B (3.64) coincide with the 2-tCM quantization conditions (3.34), i.e. they do not receive corrections in Q 5d .
2-eRS A model: Fixing 1 = i ̵ h y and m = ig y with ̵ h y , g y ∈ R + , the conjecture by [8] states that if a satisfies the A-type quantization conditions . What enters in the A-type quantization conditions is the total (classical + 1-loop + instanton) twisted effective superpotential of the five-dimensional N = 1 * SU (2) theory on flat space R 4 1 , 2 × S 1 R , whose instanton part defined as (see Appendix B) admits a Q 5d expansion whose first orders are with parameters as in (3.63). Despite not having analytic results for 2-eRS A , we can still test whether the gauge theory conjecture by [8] makes sense by checking it against the energy spectrum computed numerically: however, even if it seems to work for the special case g y = 2 ̵ h y 15 considered in Table 9, its validity seems to break down in more generic cases such as the one considered in Table 10, in which the gauge theory energies tend to converge to a value which does not correspond to the numerical one. However, this is not completely unexpected. As we mentioned in the Introduction, we already know that for "relativistic" integrable systems such as relativistic Toda chains [19] and relativistic cluster integrable systems [21], the naïve all-order WKB quantization 14 In the Tables we compute the numerical energy values E for the model (3.9) starting from E ′ given by the gauge theory Wilson loop (3.62) and using the relation (3.60). 15 This is also the special case discussed in [6].
Gauge  Table 9: Gauge theory energies for the 2-eRS A model (3.12) at g y = 2, ̵ h y = 1 obtained from the naïve WKB quantization conditions (3.65).  conditions obtained by the proposal of [8] are ill-defined and need to be corrected by nonperturbative terms in ̵ h y . Exactly the same situation arises in our case: indeed the naïve WKB quantization conditions (3.65) are ill-defined for ̵ hy 2ω ∈ Q, as we can see by noticing that at those values they develop poles. In order to fix this problem we can proceed as in [19,21], where it was pointed out that the poles at ̵ hy 2ω ∈ Q disappear if we complete (3.65) by adding non-perturbative contributions in ̵ h y ; these can be completely determined by requiring the full (WKB + non-perturbative) exact quantization conditions to be invariant under "modular duality", i.e. under the exchange ̵ h y ↔ 2ω. For the cases considered in [19,21] modular duality is encoded in the quantum group structure underlying the relativistic integrable system; in our 2-eRS case such modular duality also appears, and was already noticed in a number of papers [5][6][7].
According to this prescription therefore the full A-type quantization conditions for 2-eRS A should be given by where the symmetry under exchange ̵ h y ↔ 2ω is manifest. Poles at ̵ hy 2ω ∈ Q disappear in these exact quantization conditions almost by construction, as one can show by following the same arguments used in [19,21]. 16 Having such well-defined quantization conditions, we can now check if a "non-perturbatively corrected" version of the proposal by [8] can be valid: that is, if the values of a satisfying (3.68) reproduce the 2-eRS A numerical spectrum when inserted in the gauge theory expression for the energy. Quite remarkably, this indeed seems to be the case. This can be seen from the example in Table 11: differently from the previous version of this example (Table 10) in which we were using the naïve WKB quantization conditions, it is now evident that the gauge theory results approach the numerical ones by increasing the number of instanton corrections considered. Notice also that nothing changes for the example of Table 9, since we can easily see that non-perturbative corrections vanish when g y = k ̵ h y with k ∈ N. Finally, let us mention that we can also think of the exact A-type quantization conditions (3.68) as an S-dual (electro-magnetic dual) version of the B-type conditions (3.64) where we quantize a D instead of a, with a D , a related as is the full, non-perturbatively corrected twisted effective superpotential which contains also classical and 1-loop part. Equation (3.69) can be interpreted as an 1 -deformed version of the Seiberg-Witten relation between a and a D : however, differently from the analogue formula (2.56) valid for four-dimensional theories, in the five-dimensional case nonperturbative corrections in 1 are essential in order to restore S-duality when the Omega background is turned on. We will see in Section 3.5 how exact A-type quantization conditions may arise from a quantum Separation of Variables approach to the 2-eRS A problem. 16 In [19,21] in order to ensure poles cancellation one sometimes needs to shift a, or the Kähler parameters, by a constant B-field. For the N -particle relativistic closed Toda chain, the B-field is only needed for N odd; in our elliptic systems instead it seems that the B-field is not needed for any N . To summarize, we have seen that although the conjecture by [8] seems to work nicely for the 2-eRS B system, it is not consistent in the 2-eRS A case: first of all the conjectural quantization conditions are ill-defined, that is have poles for ̵ hy 2ω ∈ Q, and even if we consider them for non-singular values of ̵ h y the gauge theory results are in disagreement with the 2-eRS A numerical spectrum. This happens because the proposal by [8] does not take into account possible non-perturbative contributions in ̵ h y ; in fact once these are properly taken into account, in a way dictated by modular duality [19,21], we obtain pole-free quantization conditions which moreover seem to reproduce the 2-eRS A numerical spectrum. Therefore, similarly to what happened for the 2-eCM system, also in this case the discrete energy levels for 2-eRS B and 2-eRS A can be obtained from the same gauge theory expression for the energy (3.62) by quantizing a in two different ways related by S-dualityτ ↔ − 1 τ , where however this time the S-duality relation involves non-perturbative corrections in 1 . Sduality is also reflected in (3.17), which is indeed realized in gauge theory as evident from comparing Tables 7, 9 or Tables 8, 11 (rather than Tables 8, 10).

Comments on Baxter equation and quantum Separation of Variables
For the sake of completeness, in this Section we would like to comment on the possibility of constructing L 2 ([0, 2 ω ′ ]) eigenfunctions for the 2-eRS A system via the quantum Separation of Variables approach, appropriately reinterpreted in gauge theory language; we will follow the same line of reasoning as in Section 2.5, again without any pretence of rigorousness.
The starting point in the quantum Separation of Variables approach is to consider the Baxter equation associated to our system: as we already mentioned, this is an auxiliary 1-dimensional problem which can be thought as a quantum version of the spectral/Seiberg-Witten curve. Following [59,60] we can construct the Baxter equation for the 2-eRS A system from gauge theory by considering the NS limit of the VEV of the five-dimensional N = 1 * SU (2) fundamental qq-character ⟨χ SU (2) 5d (σ, a, 1 , m, R, Q 5d )⟩ NS [46,68,69]. Introducing for later convenience the variables (σ ∈ R) from the formulae in Appendix B we find where E ′ = E ′ (a, i ̵ h y , ig y ,ω,ω ′ ) is the VEV of the fundamental Wilson loop in the NS limit given in (3.62). 17 The Baxter equation is then obtained as in (2.60); in a more compact form, using the θ(X, Q) function defined in (A.14) we get which again is a complicated infinite-order finite-difference operator on R. However, we already know from previous examples [31,[51][52][53][54][55]70] that when the integrable system is relativistic and has an underlying "modular double" structure, we should in addition consider a "modular dual" Baxter equatioñ and look for two generically linearly independent functions Q (f ) (σ, a, ̵ h y , g y ,ω,ω ′ ) and Q (af ) (σ, a, ̵ h y , g y ,ω,ω ′ ) formally satisfying both (3.72) and (3.73) simultaneously. 18 Similarly to Section 2.5, such formal solutions can conjecturally be obtained by considering the NS limit of the VEVs of codimension two defects corresponding to coupling the fivedimensional theory to two free three-dimensional N = 2 * hypermultiplets, whose SU (2) part of the flavour symmetry is gauged and identified with the five-dimensional gauge group [61][62][63]. Schematically, these two functions can be written as The fundamental qq-character for five-dimensional theories can indeed be interpreted as the generating function of Wilson loops in all possible antisymmetric representations [68,69]. 18 This was also suggested in [71,72] in the context of open topological strings in the NS limit.
where the double sine function is defined in Appendix A.2, while the instanton corrections contained in ⟨Q 5d,inst (σ, a, 1 , m, R, Q 5d )⟩ NS and their dual can be computed with the formulae in Appendix B. We will not try to report here their explicit expression since they are rather complicated already at one instanton, but we will just mention that, apart from their a ↔ −a symmetry, they satisfy as well as Assuming that (3.75) indeed satisfy both Baxter equations, then for any constant ξ ∈ C the linear combination formally satisfies Exactly as in Section 2.5, also in this case (3.79) is not entire in σ for generic values of a, ξ, since by studying the denominator structure of their first instanton corrections it appears that (3.75) have simple poles at σ = ± a 2 + ik ̵ h y + in2ω and σ = ± a 2 + ig y + ik ̵ h y + in2ω for k, n ∈ Z. We notice however that requiring the poles at σ = ± a 2 to vanish, i.e. requiring ξ = Res σ=a 2 Q (af ) (σ, a, ̵ h y , g y ,ω,ω ′ ) seems to be equivalent to imposing the full A-type quantization conditions (3.68); it would therefore be natural, although highly non-trivial, to expect that all simple poles will cancel in the linear combination (3.79) for the values of a, ξ satisfying full A-type quantization conditions, in which case our solution (3.79) to the two Baxter equations would be entire in σ.
Of course, all we said insofar is highly conjectural and we do not see any easy way to make it even slightly more rigorous. Let us however push this line of reasoning a bit further. Let us assume that (3.79) is indeed an entire solution to the two 2-eRS A Baxter equations for the values of a, ξ satisfying (3.81), and let us also assume it decays rapidly enough at infinity. We could then consider its Fourier transform 2ω ̵ hy Q(σ, a, ̵ h y , g y ,ω,ω ′ ); (3.82) this will satisfy the modular double pair of equations (3.83) If we now proceed as indicated in [73] and multiply Φ a (y, ̵ h y , g y ,ω,ω ′ ) by an appropriate weight function w(y) involving the elliptic Gamma function, the combination should provide the desired (unnormalized) eigenfunction for the 2-eRS A Quantum Mechanical problem (3.56) on the appropriate L 2 ([0, 2ω ′ ]) Hilbert space, thanks to the analytic properties of the Baxter solution Q(σ, a, ̵ h y , g y ,ω,ω ′ ). Eigenfunctions for the 2-hRS systems are then recovered in the limitω ′ → i∞.

N -particle systems of Ruijsenaars-Schneider type
Up until now we restricted our attention to quantum elliptic integrable systems involving only two particles: these are the easiest ones one can study, since they are described by a single Hamiltonian which moreover reduces to a one-dimensional problem after decoupling the center of mass of the system. In the present Section we will consider instead Nparticle systems; here we only focus on the elliptic Ruijsenaars-Schneider model, since the Calogero-Moser one and the various trigonometric/hyperbolic versions can be obtained as special limits of it. The complex N -particle elliptic Ruijsenaars-Schneider system (N -eRS) is defined on a torus of half-periods (ω,ω ′ ) and describes the motion of N particles at positions z j , dictated by the finite-difference equationĤ eRS ψ(⃗ z, Q 5d ) = Eψ(⃗ z, Q 5d ), where the Hamiltonian is given by [5] and all parameters z i , ̵ h, g, E ∈ C. The HamiltonianĤ eRS =Ĥ 1 is actually part of a set of N commuting linearly independent operatorsĤ l , which are such that (renaming E = E 1 ) H l ψ(⃗ z, Q 5d ) = E l ψ(⃗ z, Q 5d ) , l = 1, . . . , N ; (4.5) we will however mostly focus only on the first HamiltonianĤ eRS and the associated equation (4.1). As in Section 3, we can also equivalently study the problem where the new HamiltonianĤ is related to the previous one bŷ As we did for the 2-particle case, by restricting the values of the parameters in (4.2), (4.7) to some real slice we can define the N -eRS B and N -eRS A quantum mechanical problems: . (4.11) For 0 < g x < ̵ h x + 2 ω ′ and decoupling the center of mass of the system, (4.10) should define the N -eRS B quantum mechanical problem on L 2 x ([0, 2ω] N −1 ) whose energy spectrum (as well as the eigenvalues of the other commuting operatorsĤ 2 , . . . ,Ĥ N ) is real and discrete [5][6][7].
In the limitω ′ → i∞ (i.e. Q 5d → 0) the second line of (4.10) reduces to the N -particle trigonometric Ruijsenaars-Schneider quantum integrable system (N -tRS) (4.12) which is again a quantum mechanical problem on L 2 x ([0, 2ω] N −1 ) with discrete energy levels and known analytic solution.
A-model: Restricting instead on the slice z j = iy j ∈ iR and requiring ̵ h = i ̵ h y ∈ iR + , g = ig y ∈ iR + , E = E (A) ∈ R + problems (4.1), (4.6) reduce tô . (4.14) For 0 ⩽ g y ⩽ ̵ h y + 2ω and decoupling the center of mass of the system, (4.13) should define the N -eRS A quantum mechanical problem on L 2 y ([0, 2 ω ′ ] N −1 ) whose energy spectrum is real and discrete.
In the limitω ′ → i∞ (i.e. Q 5d → 0) the second line of (4.13) reduces to the N -particle hyperbolic Ruijsenaars-Schneider quantum integrable system (N -hRS) (4.15) this is still a quantum mechanical problem, although with continuous spectrum, whose analytic solution was partially studied in [51,52] for the lowest values of N . Exacly as in the 2-particle case, the two problems N -eRS B and N -eRS A are related aŝ which implies The gauge theory approach will again treat problems B and A differently, however the different treatments should be such that (4.17) is respected.

Elliptic case: B-and A-models
As for the 2-particle case discussed in Section 3.2, we can in principle study the N -eRS B quantum mechanical problem both numerically and analytically in terms of a convergent perturbation series in small Q 5d ; the energy levels for the N -eRS A model will then be obtained by using the relation (4.17). In order to do this it is however necessary to know the analytic solution to the N -particle trigonometric Ruijsenaars-Schneider model, which we review next.
these can be shown to be eigenfunctions of the quantum mechanical problem [74] with eigenvalue 25) which implies that the functions satisfy the N -tRS problem (4.18) with eigenvalue (4.25) for Let us also point out that because of the "normalization" performed in (4.23), sometimes different partitions are associated to the same eigenfunction: more precisely Among other things, this means that we can limit ourselves to consider partitions with λ N = 0. In the N = 2 case we are therefore left with partitions λ = (n, 0) with n ⩾ 0, and the associated functions This relabelling will be helpful in making contact with the gauge theory approach to the problem.

Elliptic case
We can now consider the N -eRS B quantum mechanical problem, for example in the form with . (4.31) The spectrum of this operator can always be evaluated numerically, by diagonalizing it in terms of the L 2 ([0, 2ω] N −1 ) N -tRS basis constructed out of Macdonald polynomials, similarly to what we did in previous cases. This procedure however appears to be quite time consuming for generic N ; trying to solve this problem analytically as a series in Q 5d instead appears to be a more efficient way to proceed. To this purpose it is more convenient to consider the transformed operator and study the problemĤ order by order in Q 5d . We can now proceed exactly as in Section 3.2, the only difference being that the discrete set of eigenvalues and eigenfunctions will be labelled by a partition λ = (λ 1 , . . . , λ N −1 , λ N ) (or, equivalently, by a set of N − 1 integers ⃗ n = (n 1 , . . . , n N −1 ) (4.29) if we fix λ N = 0) rather than a single integer n (or its associated partition (n, 0)): we will then haveĤ as in (4.24) we can immediately conclude that By further expanding all Φ (l) 38) and noticing that at the practical level the summation can be truncated to those λ ′ such that 21 λ ′ = λ +N l because of the properties ofĤ ′′ B (l) , we can completely solve the problem 21 Here we are having in mind to consider partitions λ ′ with λ ′ N not restricted to zero.
(4.34) at each order in the Q 5d expansion. In this way we find, for example for N = 3: (2,1,0) = . . . , (4.39) where q, µ are as defined in (4.19). Higher order corrections are too lengthy to be reported here, but can be computed straightforwardly with the help of some computer program; the same procedure also applies for higher N .

Energy spectrum from gauge theory
Having discussed how to compute, both numerically and analytically, the energy levels of the N -eRS B and N -eRS A problems, let us try to reproduce the same results from N = 1 * SU (N ) gauge theory quantities, following what we did in Section 3.4 for the 2-particle case and what was done in [19] for the similar case of the N -particle relativistic Toda chain.
The first thing we should do is to look for a basis of linearly independent formal solutions ψ (i) (⃗ z, ⃗ a, ̵ h, g,ω,ω ′ ) to the complex N -particle elliptic Ruijsenaars-Schneider problem (4.1) or (4.6) for generic ⃗ z, ⃗ a, ̵ h, g ∈ C, such that where as follows from (4.9). Both the energy and the formal solutions can be computed from gauge theory as convergent power series in Q 5d with coefficients depending on the set of auxiliary variables ⃗ a = (a 1 , . . . , a N ) satisfying ∑ N l=1 a l = 0 (which parametrize the VEV of the scalar field in the vector supermultiplet). As in the 2-particle case previously discussed, these correspond to the NS limit of VEVs of certain codimension four and two defects; more precisely the energy E ′ will be given by the Wilson loop in the fundamental representation N of SU (N ), while the formal solutions are associated to full monodromy defects [62]: codim. 2 defect (full monodromy, NS). (4.42) Although we will not be interested in them, let us mention that these formal solutions actually also satisfy the finite-difference equations (4.5) associated to the whole set of N commuting operatorsĤ l , with the various energies E l corresponding to Wilson loops in the rank l antisymmetric representation of SU (N ); both the fundamental and the various antisymmetric Wilson loops can be computed via the formulae collected in Appendix B.
Once we have a formal solution to the complex N -eRS system, we can restrict ourselves to consider only those values of parameters associated to quantum mechanical problems with discrete energy spectrum, such as N -eRS B or N -eRS A . Let us discuss these two cases separately.
N -eRS B model: After fixing 1 = ̵ h x ∈ R + and m = g x ∈ R + , conjecturally when the parameters ⃗ a satisfy the B-type quantization conditions N -eRS A model: After fixing 1 = i ̵ h y and m = ig y (for ̵ h y , g y ∈ R + ), based on what we understood from the 2-particle case studied in Section 3.4 and from the relativistic Toda chain case analysed in [19], we conjecturally expect that if the parameters ⃗ a satisfy the A-type quantization conditions (⃗ a, ̵ h y , g y ,ω,ω ′ ) instead is the full, non-perturbatively corrected twisted effective superpotential for the N = 1 * SU (N ) theory, free of poles at ̵ hy 2ω ∈ Q 22 and symmetric under the exchange ̵ h y ↔ 2ω. In order to compute this function we will follow the approach suggested in [30,53]: that is, we start by considering the integrand Z int S 5 of the partition function on the squashed 5-sphere S 5 ω 1 ,ω 2 ,ω 3 for the N = 1 * SU (N ) theory, which factorizes into a perturbative (classical + 1-loop) and instanton part [75][76][77][78][79][80][81][82] and we define the exact twisted effective superpotential by taking the "NS limit" ω 3 → 0 on The perturbative part of Z int S 5 admits an expression in terms of triple sine functions (see Appendix A.2) as , (4.47) where we identify ω 1 = ̵ h y , ω 2 = 2ω and define ω = ω 1 + ω 2 + ω 3 . The instanton part instead is often assumed to factorize into three copies of the instanton partition function on R 4 1 , 2 × S 1 R , where the identification between ω 1 , ω 2 , ω 3 with 1 , 2 , R is different for each of the copies; in the "NS limit" ω 3 → 0 this contributes to the full twisted effective superpotential as 5d,inst the instanton part of the twisted effective superpotential for the theory on

An example: the 3-particle case
Although it may be hard to prove the conjectures stated in Section 4.2, we can still test them against numerical or analytical results (obtained as discussed in Section 4.1): let us do this explicitly for the 3-particle case.
The main quantity we should consider is the NS limit of the Wilson loop in the fundamental representation 3 of SU (3), which should correspond to the energy of the complex 3-eRS system for generic complex values of the parameters. From the formulae in Appendix B we find E ′ (a 12 , a 23 , ̵ h, g,ω,ω ′ ) = ⟨W    where similarly to (3.63) we defined (in terms of the variables a 12 = a 1 − a 2 , a 23 = a 2 − a 3 ) 24 α 12 = e 2πRa 12 = e According to the general discussion in Section 4.2, the gauge theory Wilson loop (4.49) should reproduce the 3-eRS B energy levels once we restrict to 1 = ̵ h x ∈ R + , m = g x ∈ R + and impose the B-type quantization conditions (4.43), which in our case simply reduce to more precisely, a state labelled by (n 1 , n 2 ) should correspond to a state labelled by the partition (λ 1 , λ 2 , 0) via n 1 = λ 1 − λ 2 , n 2 = λ 2 , as dictated by (4.29). This can be easily checked analytically, for example by noticing that our Wilson loop indeed reproduces the energy levels we previously computed in (4.39) when the B-type quantization conditions are imposed. Tests against numerical results can also be performed (see for example Table  12), which further confirm the validity of the gauge theory prescription. 24 When needed we use a1 = 2a 12 3 + a 23 3 , a2 = − a 12 3 + a 23 3 , a3 = − a 12 3 − 2a 23 3 .
For what the 3-eRS A model is concerned instead, in addition to the energy (4.49) and the requirement 1 = i ̵ h y ∈ iR + , m = ig y ∈ iR + we also need the explicit expression for the A-type quantization conditions (4.44), which for the case at hand are given by exact (a 12 , a 23 , ̵ h y , g y ,ω,ω ′ ) = 2πn 2 , ). (4.53) Conjecturally, at fixed n 1 , n 2 the values of a 12 , a 23 satisfying (4.52) should reproduce the 3-eRS A energy levels when inserted in (4.49). This is indeed what seems to happen, as can be seen for example from Table 13; as for the 2-particle case, in order to achieve agreement with numerical results and to satisfy the S-duality relation (4.17) it was crucial to take into account non-perturbative corrections to the A-type quantization conditions, in a way dictated by the modular double symmetry ̵ h y ↔ 2ω.

Conclusions
In this paper we proposed and tested full, non-perturbatively corrected quantization conditions for the N -particle elliptic Ruijsenaars-Schneider system, inspired by previous results on relativistic quantum integrable systems of cluster type [19,21], and we also checked the validity of the elliptic Calogero-Moser quantization conditions proposed by [8]. Furthermore, we gave a few comments on how gauge theory could help us constructing entire solutions to the Baxter equation of these quantum integrable systems, which after taking an appropriate integral transformation produce the normalizable eigenfunctions for the systems in the spirit of quantum Separation of Variables.
Among the many open problems, the main one would be to provide a rigorous proof of our conjectural full quantization conditions, which at the moment can only be tested against numerical computations. Another interesting question concerns the problem of constructing eigenfunctions for the elliptic Calogero-Moser or Ruijsenaars-Schneider systems: in particular it would be nice to be able to make more rigorous our sketchy derivation based on the quantum Separation of Variables approach.
Finally, it may be interesting to look at the N -particle elliptic Ruijsenaars-Schneider quantum spectral curve from the point of view of [26,29] (concering the energy spectrum) and [85][86][87] (concerning the eigenfunctions). From this point of view the quantum spectral curve is not interpreted as the Baxter equation associated to a quantum integrable system, but is regarded instead as a quantum mechanical operator on L 2 (R); as such, boundary conditions for its eigenfunctions will in general be different from the ones required for the solution to the Baxter equation (unless N = 2). Clearly this quantum mechanical problem is more general than the one associated to the underlying integrable system, but should be equivalent to the latter at those special values of energies corresponding to quantum integrability: this is indeed what seems to happen for relativistic cluster integrable systems, and can also be seen in the enhanced decay properties of the eigenfunction [86]. We expect similar structures will appear when studying the N -particle elliptic Ruijsenaars-Schneider quantum spectral curve as a quantum mechanical operator.
Always according to [88], the first Jacobi theta function θ 1 (x, q) is defined as (x ∈ C) From the Jacobi theta we can construct the Weierstrass sigma function where q is related to (ω, ω ′ ) as in (A.1) and for notational convenience we will sometimes write this last factor in terms of the quasimodular form E 2 (Q) as The logarithm of the sigma function therefore is x 2 +ln(−iq 1 4 )+i πx 2ω +ln n∈Z (−1) n q n(n−1) e − iπnx ω , (A.8) and its second x derivative is related to the Weierstrass elliptic function ℘(x ω, ω ′ ) of halfperiods (ω, ω ′ ) as , (A.9) which in the limit q → 0 (i.e. ω ′ → i∞) behaves as It may also be useful to consider the Weierstrass invariants which are such that Finally, we sometimes use in the main text the functions θ(x, Q) and θ(X, Q) defined as where the infinite q-Pochhammer symbol is

B.1 Four dimensional case
The instanton part of the partition function for an N = 2 * U (N ) theory on R 4 1 , 2 is given by the Q 4d -series Here we are using the short-hand notation + = 1 + with (i, j) position of a box in the l-th Young tableau Y l . When in the main text we refer to SU (N ) quantities, we simply mean that we impose ∑ N l=1 a l = 0: for example, we define SU (2) quantities as the U (2) ones with a 1 = −a 2 = a. In the NS limit, the instanton partition function reduces to the instanton part of the twisted effective superpotential defined as this is the quantity entering in the A-type quantization conditions for the N -particle elliptic Calogero-Moser system of type A.

(B.9)
Being a string theory observable defined as a system of two stacks of branes intersecting on a point, its natural normalization involves the partition function of the theory living on both stacks, that is [90] ⟨χ U (N ) 4d which is part of the solution to the Baxter equation of the N -particle elliptic Calogero-Moser system of type A.

B.2 Five dimensional case
The instanton part of the partition function for an N = 1 * U (N ) theory on R 4 1 , 2 × S 1 R is given by the Q 5d -series with ⃗ ϕ = (ϕ 1 , . . . , ϕ k ) integration variables (related to the 4d ones by ϕ s = e 2πRφs ) and with (i, j) position of a box in the l-th Young tableau Y l . As for the four-dimensional case, when in the main text we refer to SU (N ) quantities we simply mean to impose ∑ N l=1 a l = 0: in particular, we define SU (2) quantities as the U (2) ones with a 1 = −a 2 = a 2 . From the NS limit of the instanton partition function we obtain the instanton part of the twisted effective superpotential defined as this is the quantity entering in the A-type quantization conditions for the N -particle elliptic Ruijsenaars-Schneider system of type A.
The instanton corrections to fundamental qq-character, whose NS limit contains the energies of the N -particle elliptic Ruijsenaars-Schneider system, are similarly given by can be used both to construct the Baxter equation for the N -particle elliptic Ruijsenaars-Schneider system of type A and to compute its energies: for example in the SU (2) case we have (3.71) where the energy is nothing but the NS limit of the fundamental Wilson loop To conclude, the instanton corrections to the partition function coupled to an N -plet of three-dimensional free hypermultiplets is which is part of the solution to the Baxter equation of the N -particle elliptic Ruijsenaars-Schneider system of type A.