TBA for non-perturbative moduli spaces

Recently, an exact description of instanton corrections to the moduli spaces of 4d N=2 supersymmetric gauge theories compactified on a circle and Calabi-Yau compactifications of Type II superstring theories was found. The equations determining the instanton contributions turn out to have the form of Thermodynamic Bethe Ansatz. We explore further this relation and, in particular, we identify the contact potential of quaternionic string moduli space with the free energy of the integrable system and the Kahler potential of the gauge theory moduli space with the Yang-Yang functional. We also show that the corresponding S-matrix satisfies all usual constraints of 2d integrable models, including crossing and bootstrap, and derive the associated Y-system. Surprisingly, in the simplest case the Y-system is described by the MacMahon function relevant for crystal melting and topological strings.


Introduction
The last years have marked a remarkable manifestation of integrability and in particular of (Thermodynamic) Bethe Ansatz in description of dynamics of gauge and string theories. A prominent example is the calculation of the spectrum of conformal dimensions in N = 4 super Yang-Mills theory [1] and the exact solution of its AdS/CFT dual given by a non-linear σ-model [2,3]. Nowadays this is a wide area of research where the integrability in the form of spin chain models and Bethe Ansatz plays the crucial role. However, during the last year several new connections to the integrable world have emerged.
First, Nekrasov and Shatashvili discovered [4,5] that N = 2 supersymmetric gauge theories are in one to one correspondence with integrable Hamiltonian systems in such a way that the supersymmetric vacua of gauge theories are mapped to Bethe states of the integrable models. Thus, their identification heavily relies on Bethe Ansatz and its appearance in the description of BPS vacua. Another interesting development has been done by Alday, Gaiotto and Tachikawa [6] who related the instanton partition functions of certain N = 2 SCFTs to conformal blocks of Liouville theory. As was recently demonstrated in [7], the latter duality is actually closely related to the former one.
On top of that, it was realized in [8] (see also [9,10]) that the classical problem of determining the minimal area surface in AdS 5 ending on a null polygonal contour, which provides the strong coupling limit of gluon scattering amplitudes in N = 4 super Yang-Mills [11], has a solution in terms of Thermodynamic Bethe Ansatz (TBA) [12]. The TBA free energy then gives the area encoding the scattering amplitudes.
Here we consider another example of the unexpected interplay between gauge/string theory and integrability whose physical explanation is still lacking. Namely, it was noticed in [13] (see also [14]) that equations describing the exact moduli space of 4d N = 2 supersymmetric gauge theory compactified on a circle coincide with the equations of TBA. Moreover, exactly the same equations appear also in the twistor description of D-instanton corrected moduli space of Type II string theory compactified on a Calabi-Yau (CY) threefold [15,16]. Due to this one may hope that the elaborated machinery of integrable systems will give new insights for these research areas as it did in the above mentioned situations. However, for this one needs to extend the correspondence beyond just the level of equations to some interesting physical quantities as well as to understand better the integrable structure behind this TBA.
In this paper we try to fulfil this goal by pushing forward the relation between TBA and the instanton corrections to the moduli spaces. In particular, we identify the TBA free energy with the instanton contribution to the so called contact potential governing the quaternion-Kähler geometry of the string moduli space. In the gauge theory context the analogous quantity is the Kähler potential. We show that its most non-trivial part turns out to be encoded by the Yang-Yang functional [17] of the associated integrable system.
To uncover the integrable structure, we study the S-matrix which can be found from the TBA equations. Although it is not unitary [13], we show that it satisfies all standard constraints usually imposed on factorizable S-matrices of integrable systems. They include Lorentz invariance, crossing symmetry, Yang-Baxter equation and bootstrap identity. Finally, we derive the Y-system following from our TBA equations.
The paper is organized as follows. In the next section we review the twistor description of hyperkähler and quaternion-Kähler spaces which is crucial for introducing general instanton corrections to the moduli spaces. These instanton corrections are further described in section 2.2 where we present the equations determining the non-perturbative geometry of the moduli spaces and the results for the contact and Kähler potentials. To our knowledge, the last quantity given in (2.31) was not known before. The equations (2.25) represent our main starting point and the reader not interested in their origin can pass directly to them. In section 3 we establish the relation of (2.25) to TBA and express the contact and Kähler potentials in terms of the free energy and Yang-Yang functional, respectively. After that in section 4 we investigate the S-matrix associated to our problem, derive the Y-system and comment on the conformal limit of our TBA. In section 5 we conclude with a discussion and some open questions. In appendix A we provide some details about evaluation and symplectic invariance of the Kähler potential. Finally, appendix B is devoted to a particular case of rigid CY where we observe the appearance of the MacMahon function [18].
2. Non-perturbative moduli spaces in gauge and string theories

Twistor description of HK and QK spaces
The moduli spaces of compactified gauge and string theories with N = 2 supersymmetry are examples of manifolds with a quaternionic structure. The supersymmetry restricts the moduli space to be hyperkähler (HK) in gauge theory [19] and its hypermultiplet sector to be quaternion-Kähler (QK) in string theory [20]. In both cases the geometry of these moduli spaces gets perturbative and non-perturbative contributions and, of course, it is extremely difficult to describe them explicitly as corrections to the metric. It would be much more convenient to have at our disposal some kind of prepotential, which can encode all quantum corrections in a systematic way, similarly as does the holomorphic prepotential F (X) for the vector multiplet moduli space. Thus, we are confronted with the problem of parametrizing quaternionic geometries. This problem is solved by considering the twistor space Z M of a quaternionic manifold M, which is a CP 1 bundle over M and provides its very efficient description. In particular, it allows to encode all geometric information in a set of holomorphic functions playing the role of prepotentials we were asking for. Here we briefly review the corresponding construction and refer to [21,22] for more details.
The twistor description is so powerful because of the existence of a certain holomorphic structure on Z M . In the HK and QK cases, these structures are represented locally by holomorphic forms, a 2-form Ω and a 1-form X , respectively. The former defines a symplectic structure on each fiber of the bundle π : Z M → CP 1 , and the latter produces a contact structure on Z M . As usual, locally it is always possible to choose Darboux coordinates where these forms take a standard form. In other words, the twistor space can be covered by a set of open patches U i such that in each patch one has HK : ) form a set of holomorphic Darboux coordinates in the patch U i of the twistor space of HK (respectively, QK) manifold. Here ζ is a complex coordinate on CP 1 (also in the QK case) and we will use the notation x µ to parameterize the base quaternionic manifold M.
In addition to this holomorphic structure, the twistor space carries a real structure defined in term of the antipodal map τ acting on CP 1 as τ : ζ → −1/ζ. To express the compatibility of the two structures, we assume that the antipodal map sends U i to Uī. Then the holomorphic forms should satisfy the reality constraint so that the Darboux coordinates may be chosen to satisfy similar relations, all with sign plus, under the combined action of the complex conjugation and the antipodal map. Something non-trivial appears when one considers the overlap of two patches U i ∩ U j . In this region the holomorphic forms defined in different patches must be related as where f ij are (fixed and simple) transition functions of the O(1) bundle on CP 1 , whereasf ij are fixed later. This implies that the local Darboux coordinates are related by symplectic and contact transformations, respectively. Such transformations are generated by holomorphic functions on Z M , which we call transition functions H [ij] . It is these functions that play the role of the prepotentials. They establish relations between Darboux coordinates in different patches, which together with the reality constraints and suitable boundary conditions allow to find these coordinates as functions of ζ and x µ . These solutions, called twistor lines, contain all geometric information and are the starting point to find the metrics on M and its twistor space.
In the following we restrict our attention only to those transition functions which in the QK case are independent on the coordinates α [i] . Physically, for the hypermultiplet moduli space of compactified Type II string theory this means that we ignore the contributions due to NS5-brane instantons [23]. Such restriction brings great simplifications. In particular, the coefficientsf ij left undetermined above are actually given bŷ and thus reduce to 1 in this case. What is important for us is that given this restriction the equations determining the twistor lines in HK and QK cases become equivalent. Indeed, in the QK case for α-independent H [ij] they look as whereas in the HK case they are the same provided one replaces ξ Λ Λ . Here the index + refers to some fixed patch U + which we choose to be the one around the north pole ζ = 0. The coincidence of the equations allows us to consider the HK and QK cases simultaneously. The notations mostly used in the following correspond to the QK case.
The gluing conditions (2.5) for the twistor lines can be rewritten in a form more convenient for a perturbative treatment as the following integral equations [16] where ζ ∈ U i , C j is the contour surrounding U j in the counterclockwise direction, whereas complex Y Λ and real A Λ , B Λ are free parameters playing the role of coordinates on M. 2 The sum in (2.6) goes over all patches including those which do not intersect with U i . In that case the transition functions are defined by the cocycle condition and by analytic continuation [21]. 1 Comparing to [13,15], we changed some normalizations to avoid some numerical factors and to make the symplectic invariance more explicit. In particular, X , µ Λ ,ξ Λ , α and H [ij] are renormalized by factor −2i, Ω, e φ by 2, and ν Λ by i. 2 Actually in the QK case the phase of Y 0 can be absorbed into ζ so that it becomes real. The missing coordinate is provided by the real part of the constant coefficient B α in the expansion of α [+] , which we do not write here explicitly.
Once these integral equations are solved, there is a straightforward procedure to extract the metric [22,15]. On this way the prominent role is played by the Kähler potential K M in the HK case and the so called contact potential Φ [i] in the QK case, which provides a Kähler potential for the metric on the twistor space Z M The contact potential appears as a certain coefficient in the expansion of the contact one-form where p is the SU(2) part of the Levi-Civita connection on M, and generically it is a function Φ [i] (x µ , ζ) holomorphic on the CP 1 fiber, but defined only locally what is reflected by the patch index. However, in the case under consideration when the transition functions are α-independent, it becomes real, globally defined and independent on ζ, The remaining function on the base manifold is given by where c α is a constant called anomalous dimension, which encodes a boundary condition for the twistor line α [+] . In the HK case the Kähler potential can also be expressed as an integral of transition functions. In our notations the representation found in [16] can be summarized as (2.10) By simple manipulations using the integral equations (2.6), it can be rewritten in the following form This shows that in the physically important case of transition functions homogeneous of degree one, relevant when the HK space is the hyperkähler cone of a QK space [24,22], the Kähler potential essentially coincides with the contact potential (2.9). We close this subsection by noting that although all integration contours C j appearing in the formulae above are closed since they surround open patches, under some conditions it is possible to generalize these results to include also open contours. Typically, such open contours can be viewed as a leftover of some discontinuity cuts in transition functions of a "more fundamental" construction using only open patches and closed contours. The former arises from the latter when one shrinks the contour surrounding the cut so that its contribution reduces to an integral of the discontinuity of the initial integrand. Such description in terms of open contours turns out to be relevant in the discussion of the instanton corrected moduli spaces in the next subsection.

Instanton contributions to the moduli spaces
The low energy dynamics of N = 2 supersymmetric gauge and string theories is completely determined by the geometry of their moduli spaces. For a 4d N = 2 gauge theory with the gauge group G of rank d, which is compactified on a circle of radius R, the moduli space is parameterized by complex scalars z Λ from the vector multiplet and by Wilson lines of the gauge potential around the circle, which have "electric" ζ Λ and "magnetic" componentsζ Λ and are all periodic. 3 It is a hyperkähler manifold whose perturbative metric follows from the simple 3d truncation of the 4d vector multiplet Lagrangian and thus is completely defined by the holomorphic prepotential F (z). However, it gets instanton contributions from the massive spectrum due to BPS particles going around the compactification circle. For large R these contributions are exponentially suppressed since for a particle of charge γ = (q Λ , p Λ ) they are weighted by e −2πR|Zγ | where is the central charge function giving the mass of the BPS particle. The low energy physics of Type IIA string theory compactified on a CY threefold X is a bit different. Its complete moduli space is factorized to the moduli spaces of vector and hypermultiplets. The former is tree level exact so that our interest is concentrated on the hypermultiplet sector. It comprises d = h 2,1 (X) + 1 hypermultiplets, which include the complex structure moduli X Λ = γ Λ Ω, F Λ = γ Λ Ω, the RR scalars ζ Λ ,ζ Λ representing the RR three-form integrated along a symplectic basis (γ Λ , γ Λ ) of A and B cycles in H 3 (X, Z), the four-dimensional dilaton e φ = 1/g 2 (4) and the Neveu-Schwarz (NS) axion σ, dual to the NS two-form B in four dimensions. Whereas X Λ provide a set of homogeneous coordinates for complex structure deformations, they may be traded for the inhomogeneous coordinates z a = X a /X 0 . As we mentioned above, this moduli space is a quaternionic-Kähler manifold. Its tree level metric is determined by the holomorphic prepotential F (z) as in gauge theory and receives one-loop [25,26] and instanton corrections [23]. The latter arise either from D2-branes wrapping nontrivial 3-dimensional cycles of X or from the NS5-brane wrapping the whole Calabi-Yau. In this work we ignore the second type of instantons so that we remain only with membrane contributions. Since cycles in H 3 (X, Z) are parameterized by the symplectic vector γ = (q Λ , p Λ ) and the weight of the corresponding instanton is determined by the same function (2.12) (with z 0 ≡ 1), one may expect that the D-instanton corrected hypermultiplet moduli space and the exact gauge theory moduli space from above have a similar description.
This indeed turns out to be the case. Such description is provided by the twistor formalism from the previous subsection, which as we have seen works in the same way for HK and QK spaces. Below we review the corresponding construction for the gauge and string moduli spaces [13,15]. It essentially amounts to provide a covering of CP 1 and a set of transition functions. First, we present it for the moduli spaces at the perturbative level and then show how the instantons are included.
To construct the perturbative moduli space, let us cover the Riemann sphere by the following three patches: the first patch U + surrounds the north pole, the second patch U − surrounds the south pole and the rest is covered by U 0 (see Fig. 1a). There are two non-trivial transition functions associated with such covering.
As usual, in the gauge theory case one should replace ξ [i] by η [i] . 4 On the other hand, in the string theory case one should add information about the anomalous dimension c α (see (2.9)). It turns out to be determined by the Euler number of CY, c α = χ X /(96π), and incorporates the one-loop correction [22]. Then the equations (2.6) provide an explicit representation for the twistor lines. Identifying properly the abstract coordinates Z Λ , A Λ , B Λ of the twistor approach with the physical fields, in the patch U 0 (in string notations) one finds where R = R/2 in the gauge theory case and can be expressed through the dilaton, using , in string theory. Remarkably, the contact potential (2.9) turns out to coincide with the dilaton, which is in turn related to the four-dimensional string coupling g (4) . On the other hand, R is inversely proportional to the ten-dimensional string coupling g (10) . These identifications will survive the instanton corrections. Altogether the above results are sufficient to extract the metric in a straightforward way [22]. Let us include the instanton contributions from a set of 2N BPS particles (or D2-branes) with charges {γ a } 2N a=1 . The number of particles is taken even because every particle is accompanied by its antiparticle with the opposite charge. Eventually we are interested in the limit N → ∞. We assume that the charges are ordered in accordance with decreasing of the phase of Z γ (2.12) and that these phases for the charges γ a which are not mutually local, i.e. for those which have non-vanishing symplectic invariant scalar product In fact, in the gauge theory case the holomorphic prepotential contains a logarithmic term and thus it is only a quasi-homogeneous function of second degree where Q ΛΣ is a matrix constructed from charges of hypermultiplets whose explicit form will not be important in the following. On the other hand, the tree level transition functions should not contain logarithmic singularities. Due to this, the functions (2.13) should be actually replaced by are all different. For mutually local charges with coinciding phases of Z γ the order is not important. Each charge vector γ defines a "BPS ray" ℓ γ on CP 1 going between the north and south poles as These rays split the patch U 0 into 2N sectors which we call U a , so that the covering of CP 1 consists now of these connected parts divided by the contours ℓ γa and the usual patches U ± (see Fig. 1b).
What we have to provide is the transition function through the BPS ray associated with a charge γ a . For that purpose we define Then the transition function through the BPS ray is [16] H γa is defined in term of the dilogarithm function as (2.22) The coefficient n γ encodes the spectrum of the gauge theory or carries a topological information about Calabi-Yau. In the former case it was identified with the second helicity supertrace in [13] and in general it can be related to the generalized Donaldson-Thomas invariants introduced in [27]. For us two facts are important: n γ are integer numbers and do not depend on the sign of the charge, n γ = n −γ . The presence of the second (non-symplectic invariant) term in (2.21) is related to the fact that the arguments of transition functions should be Darboux coordinates from different patches. Therefore, the r.h.s. of (2.21) should be expressed throughξ To complete the construction we need also to provide H [±a] . They are given by (2.13) plus instanton contributions which are known but quite complicated. We refer to [16] for their explicit expressions. Note that this construction realizes the option mentioned in the end of the previous subsection. Namely, the transition functions (2.21) are to be integrated along open contours given by the BPS rays. There exists also a version with closed contours [15], which however does not bring anything new.
Another useful comment is that this picture gives an interesting geometric interpretation of the wall crossing phenomenon. The lines of marginal stability where it takes place arise at the moduli configurations where the phases of the central charge (2.12) of two BPS states align. This happens precisely when the two BPS rays (2.19) cross each other. Since in general different order of BPS rays leads to inequivalent constructions, this is a clear origin of discontinuities. On the other hand, crossing a line of marginal stability, the BPS spectrum, encoded in the coefficients n γ , also changes discontinuously. A formula recently found by Kontsevich and Soibelman [27] ensures that the two effects compensate each other and the resulting metric is continuous [13].
Although the presented construction uniquely defines the twistor space and the underlying quaternionic manifold, to actually compute the metric one needs to solve the integral equations (2.6) for the twistor lines. In our case, they can be reduced to the following system 5 These equations encode all non-trivialities of the problem. For large R (large circle radius or small 10d string coupling), they can be analyzed perturbatively and their solution, represented by the set of variables Ξ γa (ζ), contains all orders of the instanton expansion. Note that due to the reality conditions on twistor lines and the fact that Uā is the patch associated with the 5 Here we ignore an additional issue of sign in front of the exponent in the logarithm appearing in the gauge theory context. It is related to some subtleties in the fermion number of bound states and can be taken into account by the so called "quadratic refinement" [13]. It affects the solution in a simple way and is not important for our discussion. charge γā = −γ a , the functions Ξ γa (ζ) satisfy (2.27) Once the functions Ξ γa (ζ) are known, the twistor lines easily follow as [16] ξ where ζ ∈ U a and The general formula for the contact potential (2.9) gives the following result and can be used to trade R for the dilaton. Similarly, one can get an explicit expression for the Kähler potential (2.11), which to our knowledge did not appear so far in the literature. Some details of its derivation can be found in Appendix A. Here we just present the final result 6 where we abbreviated As we shall see, both quantities, (2.30) and (2.31), appear naturally also in the context of TBA in the next section. Besides, note that since Ξ γa is symplectic invariant, the twistor lines (2.28) form a vector under symplectic transformations, the contact potential is invariant, whereas the Kähler potential can be shown to be invariant up to a Kähler transformation (see Appendix A). Thus, the whole construction respects the symplectic symmetry.

Relation to TBA
As was noticed in [13] (Appendix E of the revised version), the equations (2.25), which encode the geometry of the instanton corrected moduli space, turn out to coincide with the equations of TBA. These are equations for an integrable system of particles in 1 + 1 dimensions. The particles are characterized by spectral densities ǫ a (θ) considered as functions of the rapidity parameter θ which defines their two-dimensional momentum. TBA imposes the following nonlinear integral equations on the spectral densities [12]: where β is the inverse temperature, m a are mass parameters for the particles of type a, µ a are their chemical potentials, and φ ab (θ) = −i ∂ log S ab ∂θ is defined by the two-particle S-matrix S ab (θ). To establish a relation between (2.25) and (3.1), we set where ψ a = arg Z γa . This implies that for every charge one changes the coordinate on CP 1 as ζ = ie iψa+θ so that the BPS ray ℓ γa is mapped to the real axis. Then plugging these changes into (2.25), one obtains where Ψ ab = e i(ψ b −ψa) . Comparing (3.3) with (3.1), one finds that they have the same form if one identifies whereas the additional factor n γ b in the sum is considered as a weight of the particles of type b.

Potentials, free energy and Yang-Yang functional
The curious relation observed in [13] and presented in the previous subsection can be deepen by considering some quantities playing an important role in TBA and comparing them with potentials of quaternionic geometries of the moduli spaces, the contact potential (2.30) and the Kähler potential (2.31). First, the most important quantity, which is usually considered in the context of TBA, is the free energy of the integrable system. It is given by dθ cosh θ log 1 + e βµa−ǫa(θ) .

(3.5)
It is straightforward to check that it coincides with the instanton part of the contact potential so that one has the following relation On the other hand, the Kähler potential of the gauge theory turns out to be related to the so called Yang-Yang functional [17]. This is a functional which generates the action principle for the Bethe equations following from it by varying with respect to the spectral densities. It can be conveniently written as [5] (3.7) Here ϕ a (θ) is the interacting part of the spectral density and λ a (θ) encodes its free part together with the chemical potential Varying (3.7) with respect to ϕ a and ρ a and using (3.8), one indeed gets the equations of TBA (3.1). The critical value of the Yang-Yang functional is then given by (3.9) Comparison of this expression with the exact Kähler potential (2.31) of the gauge theory moduli space reveals that it reproduces two instanton symplectic invariant terms of the latter. Thus, one has the following relation 10) where N ΛΣ is the inverse of N ΛΣ = −2 Im F ΛΣ , Q ab is constructed in terms of charges as and we used the holomorphic coordinates w Λ defined in (A.10). Although we found that the Yang-Yang functional does not coincide with the full instanton contribution to K M , it captures the most non-trivial part of the Kähler potential. In general, since K M is subject to Kähler transformations, the exact equality should not be expected and the appearance of the additional terms is not surprising.

Integrable structure of instanton contributions 4.1 The S-matrix
The S-matrix corresponding to TBA (3.3) can be easily obtained by integrating φ ab (θ) from (3.4). In this way, one finds where C ab is an integration constant. As was noticed in [13], this S-matrix is non-unitary. However, it is not necessarily a problem since nowadays there are many non-unitary integrable models. On the other hand, integrability and consistent physical interpretation require the S-matrix to satisfy a set of severe conditions. In this section we show that our S-matrix (4.1) fulfils all of them. Checking these properties, it will be important that the angles ψā associated to antiparticles differ from the particle angles as ψā = ψ a ± π. This relation is clear from Fig.  1b.
The conditions imposed on a two-particle S-matrix include (see, for example, [28,29]): • Lorentz invariance -It simply means that the S-matrix depends on the rapidity difference of two particles θ = θ a − θ b , what is clearly true in our case.
• Zamolodchikov algebra -It means that the particle creation operators must satisfy . Applying this identity twice, one gets the following restriction on the S-matrix S ab (θ)S ba (−θ) = 1. In the case of unitary theories, this relation can be seen as a combination of two conditions: unitarity and Hermitian analyticity [29]. As easy to see, our S-matrix satisfies only the combination (4.2) as soon as the integration constants are chosen so that • Crossing symmetry -It relates the scattering in the s-and t-channels and requires that Again the matrix (4.1) fulfils this constraint if • Yang-Baxter equation -It means that the order in which the particles are scattered does not matter and can be depicted as follows d • Bootstrap identity -This is the most non-trivial requirement on the S-matrix which relates its singularity structure to the spectrum. Namely, it demands that if S ab (θ) has a pole 7 in the physical strip, i.e., at θ = iu c ab where u c ab ∈ (0, π), then the spectrum should contain the bound statec with the mass appearing in the fusing process a + b →c. The crossing symmetry then leads to the existence of other two fusing processes, b + c →ā and c + a →b, with the fusing angles satisfying u c ab + u a bc + u b ca = 2π. (4.8) But the most important condition is that it does not matter whether an additional particle, say d, scatters with the bound statec or consequently with the two particles a, b t t t t ) ) r r r r r r r r r j r r r r r r r r r j In our case the poles of the S-matrix (4.1) correspond to The condition that the pole is on the physical strip is equivalent to sin u c ab > 0. The mass formula (4.7) together with its expression (3.4) in terms of the central charge Z γ yields βmc = 4πR|Z γa+γ b |, (4.11) so that we deduce that the bound statec has the charge γ a + γ b consistently with the physical interpretation. Moreover, since γ b , γ c = γ c , γ a = γ a , γ b , the S-matrix elements S bc and S ca have poles of the same degree as in S ab . By simple manipulations one finds that the corresponding fusing angles 8 u a bc = ψ c − ψ b , u b ca = ψ a − ψ c + 2π also belong to the physical strip due to and satisfy the constraint (4.8). This means that the other two fusing processes obtained by crossing also exist. Finally, it is straightforward to check that the bootstrap identity (4.9) does hold provided The three conditions (4.3), (4.5) and (4.13) on the integration constants fix them to be C ab = σ ab C γa,γ b where σ ab is a Z 2 -valued function on the square of the charge lattice satisfying the same conditions (4.3), (4.5) and (4.13). Given a polarization into electric and magnetic charges, it can be chosen, for example, as σ ab = (−1) q a,Λ p Λ b . It reminds a lot the quadratic refinement introduced in [13] and mentioned in footnote 5.
Thus, our S-matrix (4.1) satisfies all necessary requirements of an integrable model in 1 + 1 dimensions.

Y-system
Y-system [31,32] is a system of functional algebraic relations on the exponentials of the spectral densities which, although equivalent to the integral equations of TBA, play an important role in the analysis of integrable models. In particular, it may be viewed as an intermediate step between TBA and the transfer matrix approach. Therefore, it would be nice to have such relations at our disposal.
Let us introduce the Y-functions as 9 Y a (θ) = −e βµa−ǫa(θ) . (4.14) Using ψā = ψ a + π and Θā = −Θ a , it is easy to check that (3.3) leads to the following relations This is our Y-system. Of course, for a general configuration of charges, it is extremely complicated. We would like to point out however a few unusual features of this Y-system (4.15) comparing to the standard Y-systems appearing in the literature on integrable models: • First, on the l.h.s. of (4.15) one multiplies functions associated with a particle and its antiparticle, whereas usually one has only one function. This feature is related to the absence of the parity symmetry in our case and to the unusual reality conditions. Notice that the reality conditions (2.27) in terms of the spectral densities and the Y-functions readǭ a (θ) = ǫā(−θ),Ȳ a (θ) = Yā(−θ). (4.16) As a result, the Y-functions are not necessarily real on the real axis of the spectral parameter. Neither is the combination on the l.h.s. of (4.15).
• Second, on the r.h.s. the Y-functions are all evaluated at different points, whereas usually their arguments do not contain any shifts. Moreover, usually the fusing angles and the only shifts appearing in functional relations are rational multiples of π. Here they are completely arbitrary and vary continuously with the moduli z Λ . 10 • Third, usually the power of each element of the product on the r.h.s is related to the incidence matrix of a graph which structure is severely constrained by the periodicity of the Y-system [32,33]. This incidence matrix is equivalently described by the matrix N ab = +∞ −∞ φ ab (θ)dθ. In our case it is just not defined because the kernel is not integrable. However, this describes only a particular class of the Y-systems which are known nowadays. It is known that the general mathematical structure which lies behind Y-systems is related to cluster algebras [34,35]. Such general Y-systems are defined by skew-symmetrizable matrices having to satisfy some mutation identities. Our matrix n γ b γ a , γ b is also skew-symmetrizable and originates in some mathematical structures also having relations with cluster transformations [27]. Therefore, it would be quite interesting to understand what is the precise connection between cluster algebras and the Y-system appearing in our case.

Remarks on the strong coupling limit
Usually, TBA is a very effective tool to get the conformal or high temperature limit of the integrable model. This is a limit where the parameter β (3.1) goes to zero. Given the identification (3.4), this is equivalent to vanishing of the parameter R, which means either the small radius limit in gauge theory, where it becomes effectively three-dimensional, or the strong coupling limit in string theory, where the ten-dimensional string coupling becomes large.
The standard derivation tells us that in this limit the Y-functions become constant and real for a wide range of the rapidity parameter θ [12]. The values of these functions can then be easily found from the Y-system which reduces to a system of algebraic equations. Finally, there is a nice formula which gives the free energy in terms of these constant values, where L is the Rogers dilogarithm defined by L(x) = Li 2 (x) + 1 2 log(x) log(1 − x). Thus, if the same story was valid in our case, we 10 It is interesting that there is a case where many of these complications disappear. We present it in appendix B. This is probably one of the simplest possible examples of the TBA systems of the type considered in this paper. could hope to find the strong coupling limit of, for example, the contact potential in an easy way.
However, the TBA (3.3) has several features which distinguish it from the usual integrable models and make the story much more complicated. In particular, one has: • more complicated reality conditions (4.16) than the ones appearing usually, • the kernel φ ab (θ) (3.4) is not decaying at infinity, • the system is supplied by arbitrary imaginary chemical potentials µ a .
On the other hand, the standard derivation of the free energy in the conformal limit relies on the absence of these features. In fact, it can be extended to include some of them. For example, [36] gave a generalization for non-vanishing chemical potentials leading to the same formula (4.17) with a simple modification of the Rodgers function L: in log Y a in the second term one should subtract the contribution of the chemical potential, i.e., it can be replaced by −ǫ a . But altogether the above features give rise to the appearance of new phenomena. Most importantly is that the Y-functions are not constant anymore in this limit. This can be seen analytically and has been also verified by a numerical analysis of the simplest example proposed in appendix B. As a result, the derivation of the free energy must be seriously reconsidered and we leave the detailed investigation of this issue for a future work.
There is also another problem to handle in order to find the strong coupling limit of the free energy, which comes from the fact that the lattice of charges is infinite. Indeed, the formula (4.17) gives the free energy as a sum over all particles in the spectrum so that we will have to sum over all charges. This sum is usually divergent and requires a certain resummation [37]. But the resummation should be performed before the limit since these two procedures are not commuting.
This issue can easily be exemplified if one considers the contributions of only D(-1)instantons to the hypermultiplet moduli space of string theory. In this case TBA can be solved exactly since the scalar product of two charges is always vanishing leaving us with ǫ q (θ) = 4πR|q| cosh θ. (4.18) Then plugging this result into (3.5) and extracting the limit or using (4.17) with Y q = e −2πiqζ 0 , one finds (with n q = χ X ) which is clearly divergent. On the other hand, the same limit can be found by a Poisson resummation of the initial expression obtained by taking the integral in (3.5) explicitly in terms of Bessel functions [38,15]. This leads to [39] F where we identified β with R. The leading contribution has a different scaling in β than the one of the usual result (4.17) and reflects the divergence of the latter. Thus, the study of the strong coupling limit is supplied here with two problems: first, our TBA is much more general than one usually considers and, second, the infinite spectrum requires a resummation technique to be applied.

Discussion
In this paper we demonstrated that the relation noticed in [13] between the equations describing the non-perturbative geometry of moduli spaces and the equations of TBA goes beyond the formal analogy. To this end, we provided an identification of the physically relevant quantities at the two sides of the correspondence, showed that the S-matrix underlying this TBA fulfills all usual constraints imposed by integrability, and derived the associated Y-system.
Of course, these results are only a first small step towards a deeper understanding of this relation. However, already at this point we seem to open new interesting connections with other developments. First, quite similar TBA equations and Y-systems to those considered in this paper appear in the context of minimal area surfaces in AdS 5 [9,10]. In fact, the TBA for the full AdS 5 problem found in [9] possesses all features listed in section 4.3 which complicate the evaluation of the conformal limit. Nevertheless, it has been successfully computed in [9]. This was possible due to an additional Z 4 symmetry, which considerably simplifies the corresponding Y-systems, and additional restrictions on the chemical potentials. The TBA with generic chemical potential seems to experience the same phenomena which were mentioned in section 4.3 and thus requires much more care.
Second, the Yang-Yang functional, providing for us the Kähler potential on the gauge theory moduli space, plays also a prominent role in the relation of BPS vacua of certain N = 2 gauge theories to Bethe states of integrable models [5]. In that correspondence it has been identified with the twisted effective superpotential of the low energy effective theory. Since the context of the two stories is very similar, it is tempting to assume that the Kahler potential and the twisted effective superpotential are also related.
Besides, a somewhat intriguing observation is that the Y-system presented in appendix B leads to the MacMahon function, the generating function of 3d partitions. This hints that there might be a relation with the beautiful duality between melting crystals and topological strings [18].
A set of interesting questions arises if one tries to draw physical consequences from the fact that the S-matrix (4.1) is consistent with the bootstrap. Usually, the latter can be used to generate the complete spectrum out of some "elementary" particles. Can it be used in the same way, for example, for gauge theory? Which singularities of the S-matrix should be taken into account, all or only those which belong to the physical strip, as in the main text? Do zeros of the S-matrix play some role?
The last two questions become especially relevant, if one remarks that there are actually two versions of TBA, for fermionic and bosonic particles. Here we used the fermionic version. The bosonic equations differ only by two signs: one should flip the sign in front of the integral in (3.1) and the sign in the logarithm inside the integral. This does not change much. The second sign leads to disappearance of the shift by πi in the chemical potential µ a (3.4). But the first sign gives the S-matrix which is the inverse of (4.1). As a result, the zeros and poles are exchanged between each other. What version of TBA is relevant for our problem? Is it related to the signs of the invariants n γ or to the quadratic refinement of [13]? Is it important at all? These are just few questions which arise naturally.

A.2 Symplectic invariance
The Kähler potential on the moduli space is expected to respect the symplectic invariance of the gauge theory. However, the potential (2.31) is clearly not invariant under symplectic transformations. This is true already at the tree level. This phenomenon was explained in [40] where it was shown that K M is actually invariant up to a Kähler transformation so that the moduli space metric does not change. Here we would like to generalize this result to the non-perturbative level.
To this end, let us review how the symplectic transformations affect various quantities [41,40]. These transformations are represented by 2d × 2d matrices acting on the symplectic vectors as whose blocks satisfy It is convenient to introduce the holomorphic matrices The nice feature of the matrix Z is that it is symmetric whereas S encodes transformation properties of various quantities such as (A.8) Using these results, one can show that the variation of the Kähler potential (2.31) under a finite symplectic transformation is given by together with z Λ = −iν Λ [+] | ζ=0 provide the complex coordinates on the moduli space M. This demonstrates that the change of K M is described by a Kähler transformation in agreement with symplectic invariance.

B. Example: rigid Calabi-Yau
Let us consider a particular simple case of a compactification on a rigid Calabi-Yau X with the vanishing Hodge number h 2,1 (X). Then the hypermultiplet sector consists only from one hypermultiplet known as the universal hypermultiplet. As a result, the lattice of charges is twodimensional, γ = (q, p). In addition, the holomorphic prepotential is simply F (X) = − τ 2 X 2 where τ is a fixed complex coefficient determined by the holomorphic 3-form of the Calabi-Yau [42]. As a result, the central charge function becomes Z γ = q + τ p. (B.1) Let us restrict ourselves only to the two sets of charges: pure "electric" (q, 0) and pure "magnetic" (0, p). In other words, we ignore all possible "dyons" with both electric and magnetic charges non-vanishing. From (B.1) it is clear that in this case there are only four sets of angles in the game (q, p > 0) 11 ψ (q,0) = 0, ψ (0,p) = ψ τ , ψ (−q,0) = π, ψ (0,−p) = ψ τ + π, (B.2) where ψ τ = arg τ . Since Y q,0 = Y q 1,0 and Y 0,p = Y p 0,1 , in fact one has only two unknown functions. As a result, in this sector the TBA equations read as follows 4πR cosh θ + 2πiζ = − log Y 1,0 (θ) 4πR cosh θ − 2πiζ = − log Y 0,1 (θ) where we defined τ ′ = e iψτ . The corresponding Y-system (4.15) takes in this case the following form Especially simple the above equations become when the parameter τ is pure imaginary, i.e., ψ τ = π/2. Then, all angles (B.2) are multiples of π/2 and all fusing angles are multiples of π and moduli independent, as in the usual integrable models! Moreover, in this case the Y-system loses one of its unusual features. Namely, in (B.4), as in the standard Y-systems, all functions on the r.h.s. appear without any shifts in the arguments.
To analyze the resulting Y-system, it is useful to take into account that n q,0 = χ X [15]. One may assume that n 0,p is also p-independent. Then the r.h.s. of (B.4) is described by the MacMahon function 12 S(y) = ∞ n=1 1 (1 − y n ) n .
(B.5) This is the generating function of plane partitions which describes also the large volume limit of the topological string partition function as Z(g s ) = [S(e −gs )] χ X /2 [43]. This fact played the prominent role in the duality between topological strings and melting crystals [18]. Remarkably, in our example not only this function appears, but even the power is also given by the Euler characteristic of the Calabi-Yau. This suggests that there might be a deep interplay between our story on one side and random partitions and topological strings on the other. To exemplify some properties of the TBA systems introduced in this paper, it might be useful to consider a further truncation of this example, where one drops the sum over the infinite set of charges and considers, for example, only charges with q = ±1 or p = ±1. Such a truncated system is particularly suitable for numerical analysis, but still possesses most of the non-trivial features of the full problem such as non-decaying kernels, arbitrary chemical potentials, non-trivial reality conditions, etc.