Quantum spectral curve for arbitrary state/operator in AdS$_5$/CFT$_4$

We give a derivation of quantum spectral curve (QSC) - a finite set of Riemann-Hilbert equations for exact spectrum of planar N=4 SYM theory proposed in our recent paper Phys.Rev.Lett. 112 (2014). We also generalize this construction to all local single trace operators of the theory, in contrast to the TBA-like approaches worked out only for a limited class of states. We reveal a rich algebraic and analytic structure of the QSC in terms of a so called Q-system -- a finite set of Baxter-like Q-functions. This new point of view on the finite size spectral problem is shown to be completely compatible, though in a far from trivial way, with already known exact equations (analytic Y-system/TBA, or FiNLIE). We use the knowledge of this underlying Q-system to demonstrate how the classical finite gap solutions and the asymptotic Bethe ansatz emerge from our formalism in appropriate limits.


Introduction
The discovery and exploration of integrability in the planar AdS/CFT correspondence has a long and largely successful history [1]. In the two most advanced examples of 4-dimensional N = 4 SYM and 3dimensional ABJM model it became possible [2] to study the planar spectrum of anomalous dimensions of some simple but non-protected single trace operators at any 't Hooft coupling λ. The computations were efficiently done in various limits and also numerically, with sufficiently high precision [3][4][5], by means of an explicit but immensely complicated Thermodynamic Bethe Ansatz (TBA) formalism [6][7][8].
One should admit that the complexity of the TBA-like equations appeared to be in a stark contradiction with the elegant integrability concept for the spectrum of these beautiful maximally super-symmetric gauge theories. Fortunately, the situation was not hopeless as some signs of hidden simplicity started to emerge here and there. The system of integral nonlinear TBA equations was known to have a reformulation in terms of a simple and universal Y-system [2,6] supplied by a relatively simple analytic data [9]. Furthermore, the Y-system, an infinite system of nonlinear functional equations is equivalent to the integrable Hirota bilinear equation (T-system) [2] which by itself was known to be integrable. The integrability of the latter would imply that it can be rewritten in terms of a finite number of Q-functions of the spectral parameter -analogues of the Baxter polynomials in the studies of integrable spin chains [10,11]. This venue was explored in our paper [12] where, using this discrete classical integrability and an important analyticity input, a finite system of non-linear integral equations (FiNLIE), somewhat reminding in spirit the Destri-De Vega equations, was formulated and successfully tested numerically.
But even this finite FiNLIE system, which allowed for some numerical tests and even for the calculation of 8 loop Konishi anomalous dimension [13,14], was still quite complicated and tricky for the practical use, though already conceptually simpler then the infinite system of TBA equations. It was clear that behind all these quite mysterious analytic structures a much simpler truth should be hidden. In our opinion, to a great extent this truth was unveiled in [15] where we proposed a simple finite set of non-linear Riemann-Hilbert equations which we called the quantum spectral curve (QSC) of the AdS/CFT correspondence. Due to their simplicity, the equations have found numerous applications in the practical calculations: They were successfully applied to the analysis of weak coupling expansion in the sl(2) sector (Konishi up to 9 loops!) [16,17] as well as at strong coupling [15], for the slope and curvature functions for twist-2 operators at any coupling and pomeron intercept at strong coupling [18]. Recently, the QSC was also found for the ABJM model in [19], which was used [20] to make a well-grounded conjecture for the interpolation function h(λ) entering numerous physically relevant quantities such as cusp anomalous dimension and magnon dispersion relation in this theory.
The name QSC is justified by the fact that this system of equations reveals a natural generalization of the classical spectral curve of superstring sigma model on AdS 5 ×S 5 background [21] -the AdS counterpart of the N = 4 SYM. Namely, the 8 basic Q-functions Q j (u) entering the QSC equations should be closely related to the exact wave function of the theory (in separated variables). in particular in the quasi-classical regime they take a familiar quantum mechanical form Q j (u) e i u pj (u)du where the roles of the momentum and of the coordinate are played by the quasi-momenta p j (u) and the spectral parameter u, respectively. Notably, the exact quantum Q j 's have an analytic structure which, on their defining Riemann sheet, is very similar to their classical counterparts: there are only two branch points at u = ± √ λ 2π forming a cut (that we will call Zhukovsky cut) which can be uniformized by Zhukovsky map u = √ λ 4π (x + 1 x ) -an important element of the whole construction.
One of our main findings is that their analytic continuation to another sheet is governed by the mondromy matrices µ or ω which are entangled into a closed system with Q j themselves. This system takes a form of very concise and elegant Riemann-Hilbert type equations containing all the necessary dynamical information for the spectral problem. Depending on the choice of basic Q-functions within the construction we call such closed system of equations as Pµor Qω-system. To uncover the complete algebraic and analytic structure of the AdS/CFT spectral problem we discuss the so called Q-system -the full set of 256 Q-functions of the problem being Plücker coordinates for a set of Grassmanians in C 8 and thus related to each other by the Plücker bilinear identities (which are often called QQ-relations). Plücker identities allow one to express all the Q-functions Q I|J , where I, J ⊂ {1, 2, 3, 4} are two ordered subsets of indices, through the basis of 8 one-index Q j -functions. In that sense, the analytic structure of all Q-functions is completely fixed by the basic ones, having only a single Zhukovsky cut on a certain, defining sheet. The multi-index Q-functions already have infinite sequences of Zhukovsky cuts, spaced by i, on all sheets, as a result of solution of these Plücker relations. In this language, the Pµ-system (or Qω-system) is reformulated as a certain symmetry, or rather a morphism mapping the Q-functions analytic in the upper half-plane (i.e. having there no Zhukovsky cuts) to the other ones analytic in the lower half-plane. One can even invert the logic and (almost) completely fix the Riemann-Hilbert equations defining QSC by the requirement of existence of such symmetry. Such a Q-system supplied by the analyticity structure will be called the analytic Q-system, and it should be considered as a rightful successor of the analytic Y-system. In other words, our present paper in addition to a firm closed Pµ-system (or Qω-system) presents a new point of view on the AdS/CFT spectral problem: the quantum integrability amounts to reducing the whole problem to the construction of a Q-system with certain rather remarkable analytic properties.
The claims of this paper are based of course on solid derivations from TBA and analytic Y-system. For that purpose, we derived in section 3 from the analytic Y-system the existence of 8 one-index Q-functions having only one Zhukovsky cut on the defining sheet. The monodromy equations allowing the analytic continuation of various Q-functions through Zhukovsky cuts are also induced from the analytic Y-system. The emergence of the Q-system with the announced analyticity properties is thus explicitly demonstrated. This section already contains the full set of QSC equations.
In section 4 we take an opposite point of view: we first formulate the (4|4) graded Q-system and identify there the relevant Q-functions with the quantities obtained from the analytic Y-system in section 3. The correspondence appears to be perfect. At the end of section 4, the exact finite size Bethe ansatz equations for zeros of the Q-functions are derived.
The Bethe equations simplify in the large volume limit to the well-known Asymptotic Bethe Ansatz (ABA) equations of [22,23], as we demonstrate in section 5.
In section 6 we derive the classical limit of the quantum spectral curve and even, partially, the quasiclassical corrections, in full agreement with the known results for the classical algebraic curve.
The section 7 is devoted to the conclusions and prospects. Some technical details are discussed in appendices.

Spectral parameter and Riemann sheets
In this article, we will use functions of the spectral parameter u, and denote Many such functions will actually be multi-valued analytic functions, and we will refer to the two specific arrangements of branch cuts as to the "mirror" and the "physical" kinematics. In general, functions will have branch points at positions ±2g + i n 2 , n ∈ Z, where g = √ λ 4π . Each function can have many branch points 1 corresponding to different values of n. The branch points will be connected by cuts parallel to the real axis, which will either be "short", i.e. of the form [−2g + i n 2 , 2g + i n 2 ], or "long", i.e. of the form ] − ∞ + i n 2 , −2g + i n 2 ] ∪ [2g + i n 2 , ∞ + i n 2 [. The mirror sheet of a function denoted asF is a sheet where all cuts will be long, whereas the physical sheet denoted asF is a sheet where all cuts will be short. 2 We will sometimes somewhat abusively write equalities between functions which do not have the same cut structure. In that case, we mean that equalities hold slightly above the real axis, i.e. when 0 < Im(u) < 1/2. For instance we can define the functionsx(u) = u 2g + i 1 − u 2 4g 2 and x(u) = u 2g + u 2g − 1 u 2g − 1 which have a cut on the real axis. By our convention, when Im(u) > 0 one hasx(u) =x(u), whereas when Im(u) < 0 one hasx(u) = 1/x(u). We will hence writě x =x ,x − = 1/x − . (2. 2) The analytic continuation 3 of a function F around the branch point at position ±2g is denoted as F . For instance, x(u) = u 2g − i 1 − u 2 4g 2 = 1/x(u). Note that for example x [+2] =x [+2] because x [+2] has no branch points at position ±2g (it only has branch points at position ±2g − i).
The discontinuity of a function on its cut on the real axis will be denoted as disc (F ) ≡ F −F . As an illustration of the above notations, one can consider a function f which will appear in appendix 5.2.1. It is one of the functions having the most complicated analyticity properties: it is analytic in the upper half-plane, and has infinitely many Zhukovsky cuts in the lower half-plane. We will conventionally denote this function as f ≡f , which means that we use the physical kinematics if no check symbol is explicitly written. Some Riemann sheets of this function are illustrated in the physical kinematics (see figure 1(a)) and in the mirror kinematics (see figure 1(b)). Notice thatf coincides with f if Im(u) > 0, and thatf coincides withf if −1 < Im(u) < 0. In this figure, the "tilde" transformation, i.e. the analytic continuation around the branch point, is illustrated by the path along the red line.
We will often use the abbreviations for some functions and even for Q-systems of functions: UHPA and LHPA, which means upper half-plane analytic and lower half-plane analytic, respectively.

Multi-indices and sum conventions
In this article, we will use tensor objects with upper and lower indices taking values in {1, 2, 3, 4}. We use Einstein's sum convention, i.e. we sum over repeated indices. For instance we have µ a,b P b ≡ 4 b=1 µ a,b P b .
We will use the Levi-Civita tensors, i.e. the completely antisymmetric tensors abcd and ab such that 1234 = 1 and 12 = 1.
We call "multi-index" an ordered set of indices for various Q-functions. It will be denoted by a capital letter. We will use the same sum convention for multi-indices. For instance 4 we have AB µ B ≡ 1≤c,d≤4 Acd µ cd . In this expression, if A = (a, b), then Acd simply denotes abcd . If the indices are not summed over, they will be denoted as a 0 , b 0 , etc, as in equation (3.68). Similarly, if a multi-indexed is not summed over, it will be denoted as A , B , etc, as in equation (4.13).
In the rest of this article, we will sometimes use the following matrices: 3 Quantum Spectral Curve from Analytic Y-system 3.1 Inspiration from TBA Y-system and TBA equations have played an important role for the comprehensive resolution of the spectral problem of the planar AdS 5 /CFT 4 correspondence. We will relate this old formulation of the spectral problem to our language of Quantum Spectral Curve (QSC). In this section we summarize the main steps leading to the Pµ-system, which is one of the ways to define the QSC, leaving the details for the appendix B.3. Then we depart from the Pµ-system and derive an alternative description -Qω-system. The role of this section is to demonstrate, in somewhat schematic but hopefully inspiring way, the origins of our QSC approach. In the next section, we will reveal a more general underlying algebraic and analytic structure of QSC in terms of the analytic Q-system.

TBA equations as a set of functional equations
TBA equations were written as an infinite set of nonlinear integral equations on Y-functions with rather complicated kernels. Despite its complexity they were suitable for the first numerical analysis of the spectrum for short operators in the work [3]. However, these equations look extremely complicated for analytic study. The Y-system, conjectured even before TBA [2] as the solution of spectral AdS/CFT problem, already points out the possibility of considerable simplifications of TBA. It states that the Y-functions, the same as those entering the TBA, satisfy the specific functional equations in a special, T-hook domain, shown in figure 2. This Y-system reads as follows Y a,s (u + i/2)Y a,s (u − i/2) = (1 + Y a,s+1 (u))(1 + Y a,s−1 (u)) (1 + 1/Y a+1,s (u))(1 + 1/Y a−1,s (u)) . (3.1) Although equations (3.1) already contain a big part of the information about the spectrum, one should supplement them with an extra input to establish the full equivalence with TBA. The Y-functions have infinitely many cuts (−∞, −2g + in/2] ∪ [2g + in/2, +∞) for some integers n. And this missing part of the information concerns the behaviour of the Y-functions w.r.t. the analytic continuation under these cuts. The analytic continuation properties can be summarized in three discontinuity relations [9,24]. As an example, one of these relations simply states that disc log Y where disc denotes a discontinuity on such cut i.e. disc f ≡ f (u + i0) − f (u − i0). The Y-system together with these analyticity relations can be called analytic Y-system. It was noticed in [12] that these relations can be further simplified by introducing T-functions related to Y-functions as follows Y a,s = T a,s+1 T a,s−1 T a+1,s T a−1,s . T + a,s T − a,s = T a+1,s T a−1,s + T a,s+1 T a,s−1 . (3.4) which is the so-called discrete Hirota equation. But most importantly, the discontinuity relations of [9] turn out to be very simple statements about the analyticity of T-functions. In particular, as was shown in [12], (3.2) is equivalent to a statement of existence of a special gauge choice for T-functions, denoted as T in [12], such that T a−1,0 , T a,±1 , T a+1,±2 have no cuts inside the strip |Im u| < a 2 (3.5) which additionally obey the "group theoretical" constraints 5 Similarly, the meaning of the two remaining discontinuity relations of [9] becomes clear in another choice of the gauge of T-functions which we denote T, defined through the previous one as Firstly, it is obvious from the definition that T 0,s = 1. Secondly, the discontinuity relations strongly suggest to choose a Riemann sheet with short branch cuts [−2g +in/2, 2g +in /2] in T-functions instead of the initial long cuts. With this choiceT 1,s have only two short cuts for |s| > 0! To distinguish between different choices of the cuts we will put the hat over the functions which we choose to have short cuts. Thirdly, in this gaugeT 2,±s =T [+s] 1,±1T [−s] 1,±1 for |s| ≥ 2. In the next subsection we will see that these rather simple properties of T-functions can be taken into account all together by a particular parameterization of T-functions in terms of a few Q-functions entering the Pµ-system.

Emergence of Pµ-system
We show in this subsection that it is possible to parameterize the T-functions in a particularly nice way so that all analyticity properties deduced from TBA and described in the previous section are easily satisfied. We start from the right band of the T-hook i.e. s ≥ a. We know that T 1,s should have only two short cuts. This fact can be reflected by the following parameterization T 1,s = P , s ≥ 1 (3.8) where each P a has only one short cut on the real axis. It is easy to convince oneself that together with T 0,s = 1 andT 2,±s =T where we introduced a pair P 3 , P 4 with upper indices, also having a single short Zhukovsky cut on the real axis. These T-functions alone do not allow to reconstruct all T-functions. In fact we will need 5 In the classical limit, the T-functions reduce to characters of the psu(2, 2|4) symmetry algebra [10,11], and the integers a and s label certain representations of psu(2, 2|4). In this limit, the conditions (3.6) reduce to group-theoretical statements about these representations [12].
In the general case, although the interpretation in terms of representations is much less clear than in the classical limit, (3.6) provides the generalization, in terms of T-functions, of the properties of PSU(2, 2|2) characters. 6 Note that we introduce here the "contravariant" upper indices 3, 4 in contrast to the "covariant" indices 1, 2 of the first two P-functions. The meaning of it, and its relation to the whole system of Q-functions formally solving the T-system (3.4) in the T-hook [10], will be clear later.
only one additional quantity to build a complete parameterization of the T-hook. Let us introduce a notation µ 12 ≡ (T 0,1 ) which is i-periodic due to (3.6) on the sheet with long cuts: The claim is that any T-function (and hence any Y-function) can be written in terms of 5 functions P 1 , P 2 , P 3 , P 4 and µ 12 . Indeed, one simply has to use Hirota equation to find, one-by-one, all Tfunctions. To exemplify the procedure let us find T 2,1 . For that we write the Hirota equation (3.4) at (a, s) = (2, 2): which holds in mirror kinematics (i.e. for long cuts). Next, we can replace in the vicinity of the real axis T 2,3 byT 1,1 , T 2,1 is the same as T 2,1 and due to the condition T 2,3 = T 3,2 we have T 3,2 = T 2,3 µ 12 . The first term in the r.h.s. should be treated with some care: we should use (3.9) 1,1 , but we should remember thatT 2,2 and T 2,2 coincide only inside the analyticity strip −1/2 < Im u < 1/2. To avoid ambiguities we always assume that the argument has a small positive imaginary part which means that T + 2,2 is outside the analyticity strip and is not equal toT + 2,2 but to its analytic continuation T + 2,2 = T + 2,2 =T [+3] 1,1 T − 1,1 , which results in: where we will always denote by tilde the analytic continuation of a function around the branch point In the same way we find T 2,−1 in terms of P 3 , P 4 and µ 12 . Next, using Hirota at (a, s) = (1, 1) one finds T 1,0 , after that T 2,0 , etc. The complexity of expressions grows fast, but it is important to stress that in principle one can explicitly recover all Tand Y-functions in terms of P 1 , P 2 , P 3 , P 4 , µ 12 and their analytic continuations through the cuts. In the appendix A.1 we wrote a simple Mathematica code which allows to automatize this procedure.
So far our parameterization ensures all the nice properties of the right and of the left bands of T-hook, but can we guarantee the correct analytic properties of the upper band? Namely, we have to ensure that the analyticity strips of T are such as dictated by (3.5). In particular, it must be that T 2,1 has no cut on the real axis or, in other words, that the analytic continuation around the point u = 2g is trivial T 2,1 −T 2,1 = 0. This can be written from (3.15) as The first multiplier is T 1,2 which cannot be zero, so we must require that Assuming (3.17), it is easy to see that T 1,0 is analytic on the real axis as it is given by As we shall soon see, another restriction on P's and µ 12 comes from equations on T 2,0 and T 3,1 . At this point, for a better transparency we will first consider an important particular case of the left-right (LR) symmetric states Y a,s = Y a,−s and later generalize it to all states. Since T 1,s = T 1,−s in this case, we can make the identification P 4 = P 1 and P 3 = −P 2 which is used in the next subsection.

Pµ-system in Left-Right-symmetric case
To illustrate what could come out from this LR-symmetry condition let us write down T 20 explicitly T + 20 =µ 2 12 + µ 12 −P 1 P 2 +P 2 P 1 −P We observe the appearance of a new type of objectsP [2] a which means that we first go under the cut 7 to getP a and then analytically continue further shifting the argument by +i. Even though on its main defining sheet P a had only one single short cut, on the next sheet there will be a "ladder" of infinitely many cuts with branch points at any ±2g + in, n ∈ Z. But, nevertheless, the analyticity properties (3.5) require that T + 20 does not have a cut on the real axis, so that The r.h.s. the above equation will contain P [2] 1 and P [2] 2 in addition to the usual terms. Schematically we can write (3.20) a ,P [2] a and µ 12 . Analyticity condition on T + 31 also has a very similar structure, which schematically can be written as B 1 P [2] 1 + B 2 P [2] 2 = B 0 . Thus the analyticity conditions for T + 20 and T + 31 can be considered as a system of two linear equations on two unknowns P [2] 1 and P [2] 2 . The solution of this system is simpler than one would expect: where n = 1, and a similar expression for P [2n] 2 obtained by interchanging the indices 1 ↔ 2 and changing the sign µ 12 → −µ 12 . Amazingly, repeating this procedure for T [2] 30 and T [2] 41 and requiring their analyticity at the real axis we find again (3.21), with n = 2 this time. It is of course very appealing to assume that this condition must hold for any integer n ≥ 1 to ensure the required analyticity of T a,s in the upper band (see appendix B.3 for a formal proof of this fact). Thus the equation (3.21) is all we need to close our system of spectral equations! In the rest of this section we will try to find an aesthetically more attractive form of the equation (3.21). For that we will need to introduce a few new objects. First, we introduce two auxiliary functions P 3 and P 4

22)
7 By contrast P [2] a is simply equal to P [2] a because P [2] a has no cut on the real axis. 8 One should be careful not to confuse the new functions P 3 and P 4 with the functions P 3 , P 4 of the left band which carry the upper indices.
where µ 14 , µ 13 , µ 24 , µ 23 are some new i-periodic functions with long cuts. Let us show that, with a convenient choice of functions µ 13 , µ 14 , µ 23 and µ 24 , the equation (3.21) is nothing but the condition of analyticity of P 3 in the upper half-plane. Indeed, the analyticity condition for P 3 reads as they have no cuts except for the real axis. We see that if we choose µ 14 and µ 13 so that = 0 by setting and then we see that we can set µ 23 = µ 14 .
We have to justify the strange way the periodic coefficients µ ab where introduced in (3.22). First, we can use (3.24a) and (3.17) to get Next, from (3.22) we can expressP 3 andP 4 , then by excluding from themμ ab with the use of (3.25) we findP 3 = 1 µ 12 P 1 +P 2 µ 13 −P 1 µ 14 ,P 4 = 1 µ 12 P 2 +P 2 µ 23 − P 1 µ 24 (3.26) from where, together with (3.22), it is easy to see that (3.25) reduces tõ Acting similarly for the other µ ab we find a universal relatioñ µ ab = µ ab + P aPb − P bPa (3.28) which generalizes our previous relation for µ 12 (3.17)! So far we had only µ ab with a < b, we can define µ ba = −µ ab . The only missing µ 34 is then defined by so that it also satisfies (3.28), as one can check by using (3.22) and (3.26). Finally, we can excludeP 1 andP 2 from (3.26) which then becomes: which also appears to be on equal footing with a similar equation for P 1 and P 2 (3.22).
To write these identities compactly in the matrix form we introduce a matrix Notice that by contracting the last equation with χ ad P d , we set the r.h.s. to zero because µ is antisymmetric and obtainP a χ ad P d = −P 1 P 4 +P 2 P 3 −P 3 P 2 +P 4 P 1 = 0, as expected from (3.28) and from the equality µ 23 = µ 14 .
With the help of χ, one can also write (3.29) in a covariant way as

Pµ-system: General case
For the general non-left-right symmetric case we proceed in exactly the same way. This time T 2,−1 = T 2,1 and thus in principle we can get some new condition from its analyticity at the real axis. In addition to (3.17) coming from analyticity of T 2,1 we find which implies thatP's are not all linearly independent At the next step we require analyticity of T + 3,1 , T + 2,0 and T + 3,−1 . This gives us 3 linear equations on P [2] 1 , P [ . Solving this linear system we get a generalization of (3.21) Again, to solve the equation (3.36) at once for all n > 0 we introduce new auxiliary functions P 1 , P 2 and P 3 , P 4 (3.37) Provided that the i-periodic functions µ ab obey the relations the equations (3.36) are equivalent to the analyticity of the newly defined P 1 , P 2 , P 3 , P 4 . We also define µ 34 in the same way as it was defined before in (3.29) for the symmetric case. At this moment, we can already state that we found a full system of equations solving the spectral problem. There is however a further simplification expected, like in the symmetric case. We notice that, using (3.37), (3.34), (3.29) and (3.35), the equation (3.38) can be equivalently written in a more covariant form, similar to (3.28) and (3.32) of the left-right symmetric case: where Pf(µ) ≡ µ 12 µ 34 + µ 23 µ 14 − µ 13 µ 24 is the Pfaffian of the matrix µ ab . The equations (3.39) represent a complete set of spectral equations of planar N = 4 SYM for any local single-trace operator. In the next section we will describe in all details how the global symmetry charges enter into the asymptotics of these functions, to completely fix the rules of the game.
A few comments are in order. Firstly, it is obvious, by the left-right symmetry of the T-system equations (not solutions!) that there should exist a supplementary system of equations, by the exchange of the lower and upper indices. Such system can be deduced immediately from (3.39) by introducing µ ab µ bc = δ c a and it has the form Secondly, this formulation of the spectral problem, is rather appropriate for the description of the degrees of freedom in the left and right bands of the T-hook (which can be related to the S 5 degrees of freedom of the string). In this description, the formalism becomes very complicated (although valid of course!) once one tries to go to the upper band (i.e. AdS 5 part). Thus one may expect that there is an alternative description which treats AdS 5 in a way similar to S 5 giving the analogue of the Pµ-system for the AdS 5 degrees of freedom. In the next sections we will formulate such a system of equations called the Qω-system.

Qω-system
In this section we build an alternative set of spectral equations which we call Qω-system. As we will discuss in section 6, P-functions are quantum analogs of the quasi-momenta in S 5 , whereas the new Q-functions correspond to the quasi-momenta in AdS 5 . We shall construct Q-functions from P-functions in the following way: first we have to find a solution of the finite difference equation for a 4-vector X a We can construct 4 solutions to this equation in the form of a formal infinite product 10 This shows that it is always possible to construct 4 linearly independent solutions which are analytic in the upper half-plane. We define these linearly independent analytic solutions as X a = Q a|i where To define Q's for Im u < 0 one has to do an analytic continuation. This definition has very intriguing feature which one can explore with our knowledge of the properties of P's (3.39): if we consider Q's as the functions with long cuts, then these functions have only one cut on their first sheet, which nicely complements the property of P's who are considered as functions with short cuts and have only one cut on their first sheet. We will now derive this feature. An immediate consequence of the definitions (3.41) and (3.42) is an important formula We can also introduce the matrix V = U −1 , and note that due to P a P a = 0 this inverse matrix is simply V a b = δ b a − P a P b . From the equations (3.39) or (3.40), it is then easy to derive some useful identities for the U -matrixŨ Where the superscript t denotes the transposed matrix and −t transposed and inverted. We show now that Q i defined in this way should have only one long cut on the real axis (−∞, −2g] ∪ [+2g, +∞). First, we see that Q i is analytic by construction in the upper half-plane. We define Q i on the sheet with long cuts. To analytically continue under the real axis in the definition (3.42) we have to go under the cut of P a : In this form, it is not hard to see that the monodromy around the branchpoint −i ± 2g is trivial. Indeed, we have and using (3.46) and the fact that P d|i are regular on the real axis we see that Q . This procedure can be easily continued further and it is not hard to prove by induction that there are no cuts in the lower half-plane. For that let us show (by induction) that the general expression for the analytic continuation of Q is given by: and then rewrite it equivalently using the equation for Q (3.41): At n = 1 the equations (3.49) are nothing but the relation (3.47), and to go to the next strip −n > Im u > −n − 1 we have to go under the cut of U [+2n] in (3.49b), replacing it byŨ [+2n] . Using (3.44) we convert it into µV t µ and get (3.49a) in the next strip (i.e. at level n + 1), which also gives (3.49b) in the next strip. This proves the general formula (3.49b,3.49a). Next, we have to show that there is no branch cut at Im u = −n, n > 0. This is again obvious due to (3.46) which tells that the combination µU has a trivial monodromy and all the other factors are explicitly regular.
Defining ω We define ω as a counterpart of µ for Q, i.e. it should appear in the relation forQ: where one can note that the sign of the shift in Q ± a|i is irrelevant due to (3.43) 12 . To close the Qω-system we have to define Q i with upper indices in the same way 13 as Q i i.e.
This new Q a|i satisfies a similar equation Q a|i− = V b a (Q b|i ) + and, as a consequence, Q i has the same analyticity properties as Q i . One consequence of (3.51) is P a = −Q i Q ± a|i . Using these identities we can get rid of P in (3.50) and getQ Solving the last relation for µ ab we obtain: We can now show that ω is i-periodic with short cuts: and also it has a very similar discontinuity relatioñ Finally we have to show that the Pfaffian of ω can be set to 1. For that we notice that detU = 1 − P a P a = 1, which implies that detQ + = detQ − i.e. detQ is a periodic function. We also know that Q is analytic in the upper half-plane which implies that due to the periodicity detQ could not 12 Indeed, we haveP a (Q + a|i − Q − a|i ) =P a PaQ i = (Paµ ab P b )Q i where Paµ ab P b vanishes due to the antisymmetry of µ. 13 It may seem unnatural to choose the sign in (3.51) opposite to the sign in (3.42). We actually see in section 4.2 that these relations can be interpreted in the setup of the Q-system where such a choice of signs looks natural.
(a) Pµ-system (b) Qω-system Figure 3. Cuts structure of the Pµ and the Qω-system: the functions Pa (resp Qj) are analytic except on a short (resp long) Zhukovsky cut on the real axis. By contrast, µ ab has infinite ladder of cuts and is i-periodic in the mirror kinematics (hence it obeysμ ab = µ a,b in the physical kinematics). Similarly, ω jk is periodic in the physical kinematics.
have cuts. Thus we can always normalize it to be 1 (by rescaling Q a|i and hence Q i ) without any effect for our construction. In this normalization we thus must have det ω = det µ = 1 which also ensures, due to the manifest anti-symmetry of ω, that up to an irrelevant sign Pf(ω) = 1. We finally can summarize the complete set of Qω-equations (3.57) and a similar system obtained from here by exchange of lower and upper indices: and following from the these two sets of equations. We also note that, by an obvious help of the above equations, one has the following orthogonality properties In the next subsection we will show how the global charges of the theory enter into the construction.

Regularity
So far we only discussed the structure of Zhukovsky cuts of the Pµand Qω-functions, and we did not yet discuss a possible presence of other singularities, such as poles 14 . What we observed from the TBA equations on particular examples is that it is possible to construct these functions so that they have no poles anywhere on their Riemann surfaces. Of course, we hope that our construction has a broader applicability domain than the TBA equations known only for a very limited set of states. Thus we conjecture that in general Pµ-functions have no poles for any state/operator , this will be referred to as the regularity requirement. The only additional singularity could be at infinity, and this we consider in detail in the next sections. We found that the behavior at infinity is governed by the global symmetry changes of the state.
Note that it is enough to ensure regularity of P's and µ's on their main sheet, because analytic continuation to the next sheets can be re-expressed as algebraic non-singular combinations of these functions on their main sheets via (3.39). Also, inverse of µ encountered in (3.40) does not lead to possible singularities because the Pf(µ) = 1 condition implies µ ab = − 1 2 abcd µ cd . The regularity requirement in a sense is very similar to those of Q-functions of the spin chains. For the su(n) Heisenberg spin chain the spectral problem can be reformulated as the polynomiality, in particular absence of poles, requirement of n Q-functions (n independent solutions of the Baxter equations).
The regularity of P's and µ's also ensures the absence of poles in Q's and ω's. Then it follows that our requirement will be also true in a broader context of all Q-functions in the Q-system defined in the next section.

Asymptotics at large u
Recall that the TBA approach, in its current state, is mostly restricted to the states of the rank-1 sector of the theory. The generalization to other states is a hard and generally unsolved problem. Our current approach gives a natural and concise generalization of spectral equations to all local operators of the theory. In our formalism such a generalization is very simple -we only have to generalize a possible large u behavior of Pµ and Qω-functions! At the same time in the TBA formulation consideration of general states require a complicated modification by the extra "driving" terms, whose structure is not known in general even for sl (2) states. On the contrary, in our formalism this generalization is effortless. 15 In this section we conjecture that the behavior at u → ∞ of all considered Pand Q-functions is governed by the global symmetry charges. The situation is very similar to the classical spectral curve, formed by a set of 4 + 4 functions, called quasi-momenta, (p 1 (u),p 2 (u),p 3 (u),p 4 (u)|p 1 (u),p 2 (u),p 3 (u), p 4 (u)). At large u the quasi-momenta contain the information about global charges of the classical solution so that 16 In the section 6 we discuss in detail the classical limit of our system, but the output is very simple This simple insight tells us that the large u asymptotic of P and Q-functions should contain the global charges in a very specific way 17 The shifts of powers by −1 are of course not detectable in the classical limit, but they can be seen at weak coupling when the Asymptotic Bethe Ansatz (ABA) is applicable. The origin of shifts is similar to the known phenomena of length changing under duality transformations in ABA. We explain how to fully derive (3.64) first at weak and then at finite coupling in section 5.4. From the equation (3.43), replacing the ± i 2 shifts by 1 ± i 2 ∂ u at large u, we obtain The constants A a and B i are explicitly expressed through theM a andM j . The fastest way to find them is to plug the corresponding asymptotic expressions into (3.42) and get in this way a set of Ma−Mj which defines A a0 A a0 for each a 0 ∈ {1, 2, 3, 4}. In the same way we compute B j0 B j0 . The final result is (with no summation over a 0 or j 0 in l.h.s.!). For completeness, let us also discuss the asymptotics of µ and ω. Our main assumption is that they have power-like asymptotic at infinity. 18 First, ω on the sheet with short cuts must be also periodic at large u. The only power-like periodic function is a constant. Thus ω ij at infinity becomes an antisymmetric matrix with the unit Pfaffian. By making the appropriate choice of the Q i basis or, in other words, by the choice of Q a|i we can always choose it to be at u → +∞ of the form Curiously at u → −∞ one can find where γ = ∆ − ∆ 0 is the anomalous dimension. It will be shown in section 4.4.1.
Finally, knowing the asymptotics of Q a|i we then define the asymptotics of µ ab through the identities (3.53) and (3.59) 4 Quantum Spectral Curve as an Analytic Q-system In the previous section, we sketched out the derivation of the Pµ and Qω-systems. Either of these systems defines the quantum spectral curve of AdS 5 ×S 5 duality generalising the classical algebraic curve of the Metsayev-Tseytlin string sigma model [21]. We departed from a well established and tested formalism based on the AdS/CFT Y-system supplied with the analyticity constraints following from the TBA and reduced it to a significantly simpler set of Riemann-Hilbert equations on a finite number of functions of spectral parameter, P a , and µ ab (and a similar set on Q i and ω ij ) which turn out to have very transparent analytic properties. Some of these functions, like P 1 , P 2 and ω ab , were already familiar from our previous, FiNLIE construction of [12], whereas the others, like P 3 , P 4 , Q i and µ ab , seem to be new and somewhat mysterious. In this section, we will reveal a nice mathematical structure emerging behind the Riemann-Hilbert equations allowing to interpret the Pµ and Qω-systems as parts of a broader, Grassmannian object which we call the Q-system 19 . This Q-system obeys some generic, model independent algebraic properties which are well known from the analytic Bethe ansatz for the Heisenberg gl(n|m) spin chains. In the context of our current spectral problem, it is applicable in a domain of the complex plane which is free from branch points, which is true in our construction for a sufficiently large (but finite) imaginary part of the spectral parameter. We describe the setup for this Q-system for the case of interest, the gl(4|4) algebra, in subsection 4.1 of this section. In subsection 4.2, we complement this algebraic construction by analytic properties of the underlying Q-functions which are specific to the AdS/CFT integrability. They will allow us to embed the Pµ and Qω-systems into the full Q-system.

Q-system -general algebraic description
In the Heisenberg spin chains the Q-system appears as a set of Q-operators, or their eigenvalues -Q-functions, satisfying the Baxter-type functional equations appearing on various stages of Bäcklund reduction (or equivalently, the nesting procedure [28][29][30]) of the corresponding T-system [31][32][33]. It was pointed out in [31] that, for a system with su(n) symmetry, the set of all 2 n Q-functions can be identified with Plücker coordinates on finite-dimensional Grassmanians G k n , k = 0, 1, . . . , n, where each G k n is a collection of all k-dimensional linear subspaces of the vector space C n . This Grassmanian construction can be also adopted to the case of superalgebras. We exploit this fact to build a comprehensive algebraic description of the Q-system. We will focus on the case of gl(4|4) relevant for the AdS 5 /CFT 4 integrability 20 .
As everywhere in this article, we use the standard notations for the shifts in the imaginary direction: 1. Defining Plücker's QQ-relations. The Q-system can be defined by a set of so-called Plücker's QQ-relations [11,32] (see also [36,37]), which is a set of bilinear constraints on various Q-s: (4.1c) The first two exchange two indices of the same type (of grading) and they are usually called bsonic QQ-relations [37,38]. The last one exchanges two indices of different types and usually is called fermionic QQ-relation [32,36]. They naturally appeared in the chain of Bäcklund transformations for the integrable Heisenberg gl(n|m) spin chains [32] 21 . All other relations among Q-functions follow from these QQ-relations. In this sense we will call them the defining relations.
The defining QQ-relations enjoy the gauge symmetry 22 which we fix in this article by imposing the overall normalization of the Q-system as follows Two explicit examples of relations (4.1) are If we replace i → ∅ in the r.h.s. of the second one the reader may recognize in it the Wronskian of the Baxter equation for homogeneous su(2) spin chain where Q 12|∅ = u L . The Bethe equations follow from it simply by imposing the polynomiality of all Q-functions entering there.

A Complete Basis for Parameterization of All Q-functions
Due to the QQ-relations (4.1a)-(4.1c), all multi-index Q-functions can be expressed through a basis of 8 (rank of the superalgebra) Q-functions. A natural basis is given by the single-indexed Q-functions Q a|∅ , Q ∅|i . 21 They arise very naturally in the context of interpretation of Q-functions as components of exterior forms. This point of view, together with the proofs of various relations given in this section, will be developed in the forthcoming publication of 3 of the current authors [34]. 22 It induces a particular case of the gauge transformations (B.2) of the related T-system which will be defined in appendix B.2.

Determinant relations in components
With the normalization (4.3), all the Q-functions with only one type of indices can be reduced in a simple way to the Q-functions with one index using defining QQ-relations. These identities have the following determinant form: where [. . . ] stands for the standard anti-symmetrization of the indices. Furthermore when the number of fermionic and bosonic indices is the same we can again write the corresponding Q-function as a determinant of Q i|j which is a simple consequence of the QQ-relations (4.1) [34,35]: This suggests that any Q-function can be expressed explicitly (i.e. without infinite sums) in terms of Q a|∅ , Q ∅|i , and Q a|i . Indeed such relations are known 23 : For example, of a particular importance for us are the relations We will see that the functions Q a|∅ , Q ∅|i , and Q i|j play an important role and they will be extensively used in the following. They will be identified with the Q-functions with similar notations from the previous section 3. Note, however, that Q a|i are not independent and satisfy the QQ-relation (4.4a): which can be formally solved by where P is an i-periodic function 24 . One should also properly regularise the above sum which is in general divergent. For instance, one can differentiate it a sufficient number of times to make it convergent, and then integrate the result of summation back. Since we have to satisfy (4.9) at the end, the only arising ambiguity in this procedure is fully accounted by P which is so far arbitrary. One can restrict P by requiring a certain asymptotics at infinity. In particular, the polynomial behaviour 23 Again, this is very easy to check starting from (4.1). For general gl(n|m) case, the formal proof will be given in [34] (these relations can be recognised also inside sparse determinants used in [35]). 24 Alternatively, the relation (4.10) can be solved as restricts P to be a constant, and if Q a|i should decrease, one can put P = 0 in the appropriate regularisation. Later we will encounter other self-consistency requirements which will allow one to fix P for all Q a|i . We see that all the Q-functions can be found if 8 one-indexed Q-functions are known. 25 Hasse diagram. It is instructive to demonstrate the relations between Q-functions in a graphical way, using the Hasse diagram of the figure 4, originally proposed in [39] for 2 m+n Q-functions of gl(m|n) spin chains.

Symmetries a) Gauge symmetry
In the previous section, a gauge symmetry (4.2) was used to enforce the condition Q ∅ = 1. Actually, there remains only one more independent gauge symmetry 26 : We will see that this freedom is important in ensuring analytic properties in the construction of Tand Q-functions.
b) Hodge transformation. In the case of AdS/CFT Y-system the left and right wings of the T-hook look symmetric. In the language of the Q-system the interchange of the wings is a nontrivial symmetry transformation which, in particular, replaces Q functions by their Hodge-dual Q-functions. 25 It is known [11] that there are other choices of the basis of 8 Q-functions from which all other Q-functions can be restored in terms of determinants, with no need to solve any difference equation like (4.9). 26 Whereas Hirota equation has 4 gauge symmetries, only T-functions in certain gauges can be expressed in terms of Q-functions, see appendix B.2.1. On the level of Q-functions, only two gauge symmetries are possible.
We define the Hodge-dual of the Q-functions as where is a 4D Levi-Civita symbol. In particular, the Hodge dual of Q ∅|∅ is Q ∅|∅ = Q∅ |∅ ≡ Q 1234|1234 .
In the case of AdS 5 /CFT 4 spectral problem, one can impose Q 1234|1234 = 1, and we believe that this possibility reflects the unimodularity of the symmetry algebra psu(2, 2|4) 27 . From now on, we assume this restriction, which simplifies many relations, and otherwise continue our general consideration of the algebraic properties of Q-system. With this definition the Hodge-dual Q-functions satisfy exactly the same QQ-relations (4.1) and (4.5) with all indices raised. Moreover, the following formulae hold: Furthermore, as a consequence of QQ-relations and of the condition Q 1234|1234 = 1, one can demonstrate the following orthogonality relations as well as c) H-symmetry. Let us finally discuss some useful residual symmetries of the algebraic relations defined above. These relations are invariant under a Gl(4) × Gl(4) symmetry of the Q-system, where H is an arbitrary i-periodic matrix. The notation H I J with multi-indices I, J means the tensor product of 4 × 4 matrices H, explicitly: This interpretation follows closely the argument of [12]: the combination Q − ∅|∅ /Q + ∅|∅ is a "quantum determinant" of the monodromy matrix. Classically it is equal to 1 due to the unimodularity. At the quantum level it can be also shown to be 1 from TBA, it is essentially the consequence of (B.11). This implies that Q∅ |∅ is a periodic function. Since we are building the Q-system so that Q-functions are analytic sufficiently high above the real axis and have power-like asymptotics, we conclude that Q∅ |∅ is a constant which can be always scaled to 1.

Q-system and AdS/CFT spectral problem
Above we discussed the general properties of Q-systems. In this section we will demonstrate how the construction of section 3 finds its natural description in terms of the Q-system. We will first identify various objects in the Q-system language and then discuss their properties from this new point of view.

P and Q as Q-functions
Despite their simplicity, Pµand Qω-systems may look rather mysterious. In particular, their derivation in section 3.1 contained a number of surprises on the way and it looked to some extend like a magic trick. The Q-system described in the previous subsection allows to unveil this mystery and inscribe the Pµand Qω-systems into a mathematical framework related to the classical integrability. Our claim is that P's and Q's naturally can be embedded into a Q-system described above in the following way The second of the above constraints, as we already mentioned, has in fact a natural interpretation as a quantum unimodularity condition. This identification provides us with a set of 2 8 Q-functions, with very particular analyticity properties, constitute what we call the fundamental AdS 5 /CFT 4 Q-system 28 . To distinguish it from the generic Q-functions we denote the fundamental Q-system by the calligraphic font Q.
In this identification one should remember about one important subtlety. The QQ-relations are the finite difference relations and thus they may have a tricky meaning when the functions are not single valued. To avoid this complication we first note that our P's and Q's are free from branch points above the real axis. We use this property to define all Q-functions in terms of P a , Q a in the upper half of the complex plane. More precisely, we first find Q a|b recursively from (4.9), which becomes so that it is analytic above the real axis. This can be formally done by taking (4.10) with P being some (generically infinite) constant. Next, we define all Q-functions explicitly in terms of Q's, P's and Q a|b via identities (4.5). This ensures that all Q-functions are analytic and that the QQ-relations are satisfied sufficiently far above the real axis.
Giving this construction we can start recognizing various object defined in section 3. We can already see that (4.22) is exactly the equation (3.43) from section 3.2.1. Furthermore, the general identities (4.14a) and (4.15) related to Hodge duality are the same as (3.42) and (3.51)! What remains perhaps unclear is the role of µ and ω in the Q-system picture. At the same time it looks unnatural that in the above construction we gave a preference to the analyticity in the upper half of the complex plane w.r.t. the lower half. As we shell see later these two problems are tightly related.

µ and ω as linear combinations of Q-functions
The identification (4.20) also allows to give an interesting interpretation to µ and ω as a certain combination of Q-functions. To see this we start from (3.54) and rewrite it, using (4.8) and the antisymmetry of ω ij , as Q ab|ij satisfies a curious relation which is a consequence of QQ-relations: It follows from a similar relation for Q a|i (following from (3.42) and (3.43)) and from the fact that Q ab|ij can be built out of these two-index Q-functions via the determinant (4.8).
Due to the i-periodicity ofω this identity allows to translate (4.23) into a similar relation for µ ab : The last relation can be also understood solely within the Pµ-system as a combination of mirror i-periodicity (with long cuts) and the discontinuity property of µ ab [15]: A possible interpretation of these identities is the following: µ ab solves the finite difference matrix equation of the first order on 6 functions (4.26). The finite difference equation (4.26) in general has 6 linear independent solutions. (4.24) tells us that these 6 independent solutions could be packed into an antisymmetric tensor which is nothing but Q ab|ij (where the blind indices i, j simply label 6 different solutions)! Thus µ ab , as a particular solution, must be a linear combination of these 6 solutions with some i-periodic coefficients. These coefficients are precisely the matrix elements of ω ij . Let us also note that (4.23) can be inverted using (3.60), and we can write which shows that ω ij is also a linear combination of Q-functions with periodic coefficients µ ab . But now these coefficients are periodic on the Riemann sheet with long cuts.

µ and ω as symmetry generators of Q-system
Apart of being, in a sense, Q-functions, as suggested by (4.23) and (4.28), µ and ω have another interesting role in the analytic structure of the fundamental Q-system: they appear to be certain symmetries, or rather morphisms. Moreover, the very existence of these symmetries almost completely determines the QSC itself! We derive this point of view in this subsection, and elaborate on its interpretation in section 4.3.
Let us summarize the logic we followed starting from section 3.2. One takes P a , P a of the Pµsystem and then defines Q a|i as four independent solutions of (4.25). If we identify Q a|∅ = P a and Q a|i with the appropriate Q-functions of a gl(4|4) Q-system with Q ∅|∅ = 1 then we can fully reconstruct all the other Q-functions and prove that the obtained Q-system has nice analytic properties. In particular, a|i has a single long cut, etc. This Q-system can be also generated from P a and Q i alone, using the formulae of subsection 4.1.2.
One of the advantages of this construction was the fact that all Q's of this Q-system were analytic in the upper half-plane (we will abbreviate it as UHPA Q-system, contrary to the lower half-plane analyticity LHPA). We strove for this analyticity to avoid the problem of discussing various branches of the Riemann surface when solving QQ-relations. The UHPA was achieved by taking solutions Q a|i of (4.25) that are analytic in the upper half-plane including the real axis.
But obviously, one could instead generate a solution of (4.25) so as to make it LHPA. Such a possibility can be easily seen by a slight modification of arguments in section 3.2. In Q a|i , the index i labels different solutions of (4.25) which are analytic in the upper half-plane. Let us label the new-type solutions, which are analytic in the lower half-plane, as Q a | i : By repeating the same steps, one generates from here a new, LHPA Q-system, denoted in what follows by objects Q A | I . 29 All other analytic properties for this new Q-system are as nice as for the original, UHPA Q-system. If the Q-system plays a fundamental role in our formalism, the two Q-systems should be related by some symmetry. As one can see from (4.25) and (4.29)Q a|i andQ a | i are two complete sets of solutions of the same functional equation if considered in the physical kinematics, with short cuts, and thus should be linear combinations of each other with i-periodic coefficients. We actually have already one i-periodic 4 × 4 matrix in the physical kinematics -ω. And, remarkably enough we can always chooseQ a | i such that More precisely, let us show that (Q a | i ) defined by (4.30) is analytic for Im (u) < 1/2. First, using (4.25) we rewrite (4.30) slightly above the real axis as The discontinuity of the r.h.s. vanishes where on the last step we use (4.14b) which gives P a = −Q j Q + a|j andP a = −Q j Q + a|j (the second function is analytic on R). Hence disc (Q a | i ) − = 0.
Further on, using the periodicity of ω, one has (slightly above real axis) One can analytically continue this equation to the lower half-plane by avoiding short cuts, to get The last equality, given that P a and Q i are analytic in the lower half-plane, proves by recursion the desired analyticity for Q a | i . But more than that, it is an analog of (4.4a). Hence it tells us that we should identify Q ∅ | i = Q i in the lower half-plane. Therefore, the LHPA Q-system can be thought of as generated by a pair of LHPA single-indexed Q-functions P a , Q i . At this stage, the reason for notation Q A | I becomes clear. Consider the H-rotation of fermionic indices by a constant H-matrix with det H = 1.
Since we want to preserve the relation (4.30), the H-rotation can be applied to both UHPA and LHPA Q-systems to transform one into another: we use the position of the indices to keep track of the appropriate covariance.
Generically, ω defines an H-rotation in the physical kinematics (short cuts) that relates two systemŝ To complete the description of the symmetry exchanging UHPA and LHPA Q-systems we define the Hodge-dual Note that the ordering II in II is opposite to (4.13) which reflects the change of the covariance of the object. It is immediate to see that in the lower half-plane Q a | ∅ = P a and, after a short computation, that Q ∅ | i = Q i . Hence we see that exactly the same main objects, P and Q, are used to construct both Q A|J and Q A | J . However, they are combined differently, both analytically (in the upper half-plane versus the lower half-plane) and algebraically (generated from P a with Q i versus P a with Q i ).
One may easily guess now that the µ-function defines the H-rotation relating two systems throughout the mirror (long cuts) kinematics: Hence we arrived at a new interpretation of µ and ω as H-transformations from one Q-system to another.

A different point of view: from analytic Q-system to QSC
The derivation of QSC presented in this paper has an advantage of being based on a relatively solid and well tested ground of TBA, or equivalently, of analytic Y-and T-systems. But a nice form of Figure 5. UHPA and LHPA Q-systems: in their main Riemann sheet in the physical kinematics, the functions Pa are analytic except on a short Zhukovsky cut on the real axis. There are two ways to define a mirror-Q-system from these functions: one option is to identify them with Q-functions on the upper half plane (for instance Q a|∅ = Pa on the upper half plane, hence Q a|∅ =Pa on the lower half plane). The other option is to identify them on the lower half plane (for instance Qa| ∅ = Pa on the lower half plane). The first option defines the UHPA Q-system, while the second one defines the LHPA Q-system. the resulting Pµ or Qω equations defining the QSC and a relatively simple analytic structure of the functions entering there hint on the existence of a more general structure which might eventually lead to a simpler derivation based on a few physically transparent assumptions (a-la Zamolodchikovs S-matrix bootstrap) and certain symmetries, like those described earlier in this section. Such a point of view on the QSC should be based on a good understanding of analyticity and symmetry properties of the underlying Q-system.
Here we first summarize the main properties of QSC and then speculate how they might be viewed as a beginning of such simplified derivation.
The fundamental Q-system can be recast into four different Q-bases which we denote by Q A|I , Q A|I , Q A | I , Q A | I . Although all of them describe the same QSC we will colloquially name them as 4 different Q-systems. Each of them has the same algebraic structure, i.e. the same QQ relations are satisfied, but the Q-functions with similar sets of indices are differently labeled and they have different analyticity properties (different positions of branch-points and different large u asymptotics). The first two Q-systems are UHPA and the last two are LHPA. All of them are pairwise related to each other: • Q A|I is a Hodge dual of Q A|I (4.13), and Q A | I is a Hodge dual of Q A | I (4.36).
• In the mirror kinematics: Q A | I is the H-rotation of Q A|I , which explicitly means the following: consider Q A|I as functions with long cuts, rotate them using µ −1 , as in (4.37), and analytically continue to the lower half-plane. The result will be Q A | I .
The H-rotation in the mirror kinematics also relates Q A | I and Q A|I . But, in accordance with the position of upper and lower indices, this rotation is done with µ instead of µ −1 .
As a shorthand notation we write these relations as where the symbol A reminds us that these equalities include the analytic continuation between upper and lower half-planes.
• In the physical kinematics: Q A | I is the H-rotation of Q A|I (4.35), with ω −1 ; and Q A | I is the H-rotation of Q A|I , with ω. The short-hand notation is These relations can be nicely summarized as in figure 6. In particular, they imply the pairwise relations between the single-indexed functions. Depending on the choice of the pair and of the kinematics, the relation can be a direct identification via analytic continuation, or a simple relation involving µ and ω: The single-indexed functions play a special role in this construction, we have even assigned a special notation for them, P and Q. For one thing, they have the simplest analytic properties among all Q-functions: • On the Riemann sheets, where the identifications (4.40) are made, P's have only one short cut and Q's have only one long cut.
From this property it is clear that equations (4.41) are of course the same as the basic equations of Pµ and Qω systems of section 3, namelyP a = µ ab P b andQ i = ω ij Q j . Note that on all other sheets P's and Q's have an infinite ladder of Zhukovsky cuts along the imaginary axis spaced by i, as any generic function of spectral parameter in the AdS/CFT spectral problem.
Furthermore, the single-indexed functions define µ and ω through their discontinuities: The antisymmetry of disc µ ab and disc ω ij strongly suggests that µ ab and ω ij are antisymmetric themselves and this is indeed the case.
Other important and natural properties of the Q-system are: • Q∅ |∅ = 1, which is a quantum version of unimodularity of the superconformal group. We chose to normalize µ and ω to Pf(ω) = Pf(µ) = 1 and, as a consequence, we also get Q∅|∅ = Q∅|∅ = Q∅ |∅ = 1 as well.
• Absence of poles for all Q-functions, anywhere on their Riemann surfaces except possibly at u = ∞; • The asymptotic behavior of Q-functions at u → ∞ should be power-like. The powers are fixed by 6 Cartan charges of the superconformal symmetry, as is given by (3.64). Each solution for QSC obtained on the basis of this data should correspond to a physical observable. This construction should describe all single trace local operators.
The listed properties fully determine the QSC. And in fact, this list is slightly over-complete. For example, we can check that the relations for discontinuities of µ and ω written above follow from the other outlined properties, etc. Below we propose a possible point of view on the construction with less amount of assumptions and we will try to give first hints how it can emerge from a certain bootstrap strategy. Let us start a derivation of QSC by assuming that there are certain "first principles" which imply the existence of a gl(4|4) Q-system. Such existence should be a reflection of the (widely believed) quantum integrability and the psu(2, 2|4) symmetry, although the physical origins of Q-system in integrable sigma models are still unclear and the "first principles" are yet to be identified.
We will need to know only a limited set of statements about this Q-system to restore it in full. Assume that the basic Q-functions with one index have simple analytic properties: Q a|∅ have only one short cut, and Q ∅|i have only one long cut on its defining Riemann sheet. We can use these 8 oneindexed Q-functions to generate all the Q-functions, by solving the QQ-relations, and we can choose to solve the QQ-relations so as to make all Q-functions analytic in a half-plane. There is a simple test to uniquely decide whether to generate the UHPA or the LHPA Q-system from the one-indexed Q's: we demand that Q∅ |∅ = 1 (the property of quantum unimodularity, as we mentioned already). Consider the large-u behaviour of Q-functions and check whether it is compatible with Q∅ |∅ = 1 property. Since Q ∅|i are the functions with long cuts and they do not have the same large-u behaviour in different half-planes, it is unlikely that compatibility with Q∅ |∅ = 1 will be realized simultaneously in both UHPA and LHPA cases. For definiteness, let us assume that we construct the UHPA Q-system with Q∅ |∅ = 1.
On the other hand, such UHPA Q-system constructed from the "first principles", is unlikely to have any fundamental reason to be preferred to the similar LHPA Q-system which can be constructed from similar principles. It is expected that a conjugated construction exists which results in the LHPA and a certain symmetry should connect the two cases. But the only symmetries of the Q-system, apart from the gauge adjustment, are H-rotations and Hodge duality. Hence we will rely on them. Since Hodge operation only relabels the objects, we can always choose a notation for a LHPA system in which it is related to the UHPA system only by the H-rotation, i.e. by A(ω) or A(µ), where ω and µ are so far arbitrary 4 × 4 matrices which are periodic, respectively, in physical and mirror kinematics.
We choose to denote UHPA Q-functions by Q A|I , the LHPA functions obtained by A(ω) as Q A | I and the LHPA functions obtained by A(µ) as Q A | I , so that the H-transformations are explicitly realized as in (4.35) and (4.37). Note that Q∅|∅ = det ω −1 Q∅ |∅ = det ω −1 . Since Q∅|∅ is analytic in the lower half-plane and det ω −1 is periodic, the equality between them is only possible if both functions are analytic everywhere. Therefore, we can always normalize Q∅|∅ = det ω = 1 without altering the cut structure of the LHPA Q-system. By the same argument, we normalize Q∅|∅ = det µ = 1.
At this stage there is no established algebraic relation between Q A | I and Q A | I . Consider the following composite operation: A −1 (µ)A(ω). By the symmetry argument, it should produce an UHPA Q-system, not necessarily identical to the original one but with the basic Q-functions having only one cut. Now we demand that this new UHPA Q-system and the original one are also related by the symmetry. Since both systems are analytic in the same half-plane, the H-matrices relating them can be only constants, hence they can be absorbed in the redefinition of µ and ω. Therefore we have only two options: either these two systems are equal or Hodge-dual to one another.
The situation which realizes in our physical system is of course the Hodge-duality, so explicitly we have: where * denotes taking the Hodge dual. Note that this automatically implies that Q a|∅ and Q ∅|i have only one cut, which is not necessary to assume originally as an axiom. We also self-consistently get that Q ∅|∅ = 1, as follows on the one hand from the definition of A −1 (µ)A(ω) and on the other hand as the Hodge dual of Q∅ |∅ = 1 which is our original assumption. One can also deduce that Q A | I and Q A | I are Hodge-dual to one another and this explains our choice of notations. It is now easy to restore all the arrows in figure 6. The relation (4.42) is remarkable in many ways. First, loosely speaking, it tells us that, up to H-rotations, the Hodge duality transformation is a monodromy around the branch point:Q = * Q. Then, we can derive (A −1 (µ) · A(ω)) 2 = 1 reflecting the square root nature of the branch point. The equation (4.42) is reminiscent to the crossing symmetry and we can show that it is nothing but a summary of Z 4 symmetry properties from [12]. We believe it originates from a symmetry under the group of outer automorphisms of psu(2, 2|4) which is Z 2 Z 4 /Z 2 . The relation to outer automorphisms is clear at strong coupling, see section 6 and appendix A of [12], while the finite coupling derivation still awaits to be done.
At this stage, we got a closed system of symmetry transformations between Q-systems related by analytic continuation. And, to our satisfaction, these symmetries encode all the monodromy data of the QSC! Indeed, let us show how the Qω-system follows from this relation between UHPA and LHPA Q-systems. Equation (4.42) explicitly gives for Q i the monodromyQ i = ω ij Q j . The equation for the discontinuity of ω comes from the request that in (4.30), Q a | i is LHPA and and Q a|j is UHPA. Indeed, (Q a | i ) − is analytic on the real axis only if (4.32) is satisfied, and the latter is satisfied only if ω ij −ω ij = Q iQj − Q jQi , so that this last relation of the Qω-system is also a consequence of (4.42). The equivalent arguments are applicable for the Pµ-system, with just replacing the long cuts by short ones.
From the discontinuity relation, we constrain µ and ω to be antisymmetric matrices 30 and as we learned before we can always normalize them to Pf(µ) = Pf(ω) = 1. The inverse of any 4 × 4 antisymmetric matrix with the unite Pfaffian is (minus) the Hodge dual of the original matrix, e.g.
for µ: and similarly for ω. The role of n = m = 4 in gl(n|m) is therefore very important, allowing us to keep the QSC equations linear in the components of µ and ω. It allows one to pass from the formulae likeP a = µ ab P b to the ones like µ abP b = P a by a simple linear transformation which is rising and lowering the indices, in perfect harmony with the Hodge duality transformation as well. This hints on the exceptional role of the superconformal psu(2, 2|4) symmetry in the entire construction.
Finally, if we add a typical for integrability request of absence of poles and the power-like behaviour at infinity, we will focus on the physical solutions for the quantum spectral curve. As is pointed out in appendix C.2, the analytic properties impose constraints on the large u behaviour of the Q-functions which can be identified with the unitarity constraints on the weights of typical representations of the psu(2, 2|4) algebra, suggesting to identify the powers in the large u behavior of Q's with particular linear combinations of global charges. The energy of a state can thus be read off from the large u asymptotics and the formula for this energy thus follows from the analyticity of the Q-system.

Conventions about the choice of the basis and asymptotics of ω ij
The algebraic and analytic structure of the fundamental Q-system is invariant under any H-rotations with constant H-matrices from GL(4) × GL(4), assuming that µ and ω are also transformed in the covariant way. One can partially use this symmetry to introduce several convenient constraints on the QSC functions as we discuss here.

Orderings conventions and asymptotics of ω
We partially use the freedom of H-rotations to insure that all P's (and Q's) have different asymptotics at u → ∞. Moreover we choose to arrange the order of magnitudes for these functions according to the rule 1 and Im (u) > 0 , which is the most convenient for comparison with representation theory in appendix C.2. This is the same ordering as in (3.64). After the magnitude ordering was fixed, we still have a freedom in adding smaller Q-functions to larger ones, by means of H-rotations. For Q's, we will use it to constrain the behaviour of ω at infinity. First we note that ω should approach a constant matrix at u → ±∞ because it is periodic and cannot increase exponentially fast, as this will lead to non-power like asymptotics of various Q-functions. Next, once the choice (4.44) is done we use the residual H-transformation to bring the asymptotic of ω to our favorite form. For that we need some minor analytic input to fix the physical solutions of QSC. For example, we can easily deduce from TBA (see appendix C.3) that asymptotically µ 12 ∼ u ∆−J1 . This behaviour is however only possible if ω 12 = −ω 34 is nonzero asymptotically. Assuming that ω 34 = 0 asymptotically one can prove that the residual H-transformations allows us to set to zero ω 13 , ω 14 , ω 23 and ω 24 and also set ω 34 to our favorite non-zero value at infinity. The remaining components are fixed uniquely by antisymmetry of ω and by Pf(ω) = 1. A possible choice is ω 34 = 1 and hence ω 12 = 1 which leads to (3.69).
Curiously, once the asymptotics of ω ab is fixed at u → +∞ it gets also fixed at −∞, but to the values differ by a phase factor. To see this we write (for short cuts!): and compare its asymptotics at u → +∞ and u → −∞. At u → +∞, we see from (3.64) that Q i ∼ uM i−1 which implies, due to (4.45) and (3.69), thatQ i ∼ η ij uM j −1 . Next, we use the fact that Q j is analytic in the upper half-plane so that its u → −∞ asymptotics is determined by the analytic continuation from positive u along a big upper semi-circle, and sinceQ i is analytic in the lower halfplane, its u → −∞ behavior is determined by the analytic continuation along the lower semi-circle. As the result, at minus infinity we get an extra phases in (4.45) which must be compensated by extra phase in ω. More precisely at u → −∞ Plugging these asymptotics into the eq.(4.45) we obtain: and S 1 and S 2 are integer charges we indeed reproduce (3.70).
We also note that for non-even integer charges there could be an additional sign ambiguity due to a branch cut at infinity (see [18] for some examples).

Complex Conjugation and Reality
It is expected that the energy value for a generic state in AdS/CFT is real. Even more, at the level of TBA equations not only the energy is real but also the Y-functions. Hence the complex conjugation at the level of Q-system should not change the physical content of a particular QSC solution and thus it is expected to be equivalent to a symmetry transformation of section 4.1.3. Note that the complex conjugation affects the signs in QQ relations (4.1a)-(4.1c), so to make it a true symmetry of the Q-system one should supplement the complex conjugation by the following sign change When discussing the complex conjugation for the functions with possible cuts on the real axis one should consistently fix the conventions for the cuts. For definiteness we consider the choice of physical kinematics when all Zhukovsky cuts are short. Then, we use that the T-functions are real and conclude from (3.8) and (3.10) that the complex conjugation does not raise the indices of Q-functions (i.e. does not exchange the wings of the T-hook). Hence, Hodge transformation should be excluded from our consideration and we are left only with H-transformations to describe the conjugation properties of the Q-system.
Conjugation and reality of P and µ. As we agreed to work in the physical kinematics, we have one short cut after conjugation of P a and thus the H-transformation could only be given by a constant matrix, to preserve the power-like asymptotics of P's. Furthermore, due to the ordering (4.44) it should be a triangular matrix. In particular, P 1 after conjugation, as the smallest of P a 's, could only mix with itself, etc. This gives: We note that the constant matrix H b should have the property H bHb = 1, which is derived by applying complex conjugation once more to (4.49). This immediately implies that the diagonal elements of H b must be pure phases. Let us show now that, as a consequence of existence of (H b ) a b , there exists another H-transformation which makes all P a real. We can easily see that H 1/2 b will work as required, indeed is well defined. We thus have shown that without the loss of generality we can assume all P to be real. It is however more common to takē which can be easily achieved by the transformation One can deduce the conjugation property of P a . Under H-rotations, this object should transform contravariantly to P a . Also, since P a is a Q-function with 3 bosonic and 4 fermionic covariant (lower) indices, one acquires an extra sign factor, according to (4.48). Therefore the complex conjugation for the convention (4.51).
To justify the choice of (4.51) we note that it leads to real T a,s as one can easily see from (3.8) and (3.10).
Let us now find the conjugation property of µ ab . For that we first observe that the complex conjugation and tilde commute with one another:P =P. A simple way to see this feature is to think about P as a function of Zhukovsky variablex(u) defined with short cuts. Sincex(u) is a real function of u andx = 1 x , one hasP(u) =P[x(u)] = P[1/x(u)] =P(u), which proves the suggested commutativity. Therefore,P a andP a obey the same conjugation rule as in (4.51) and (4.52), correspondingly. Then, fromμ ab − µ ab = P aPb − P bPa andP a =μ ab P b we see thať Note that we derived the conjugation property of µ as a function with long cuts. We can consider (4.53) slightly below real axis and rewrite it for µ as a function with short cuts:μ ab = −(−1) a+bμ ab . But we also know thatμ =μ [2] , therefore one hasμ ab = −(−1) a+bμ [2] ab or Conjugation and reality of Q and ω. In a similar way, we can deal with the "fermionic" counterpart of the QSC, i.e. with Q i and Q i . Again, the complex conjugation must be equivalent to an H-transformation with a sign adjustment (4.48), but we have to use its fermionic counterpart governed by a periodic matrix (Ĥ f ) i j , such that det H f = 1, with short cuts (as we decided to consider short cuts for Q-functions in this section): Note that as a function with short cuts Q i has an infinite ladder of cuts in the lower half-plane. As a result its complex conjugate is analytic below the real axis, but has a ladder of cuts above it.
Consequently, H f cannot be simply a constant matrix as it was the case of P's. A little trick is in order here: we define a new periodic matrix h such that H f = h ω −1 . Then we get Now we see that the matrix h entanglesQ i andQ k which are both analytic in the lower half-plane, and thus, like for the case with P's, h is simply a constant matrix. From Im u < 0 we can pass to the long-cut version of (4.56), which is more natural for fermionic Q-functionsQ (4.57) We should haveh = h T for self-consistency, hence h is a Hermitian matrix. The explicit form of h can be partially fixed from the large-u asymptotic of Q i and ω ij . For that we use the first equality in (4.56) for large u: where we have used the large u asymptotics (3.69) of ω. The situation here is very similar to the one with P: taking into account the ordering (4.44) we see thatQ 2 is the smallest one and thus the terms with other Q's in the r.h.s. could not appear. This type of reasoning constrains h to the following where * represent some arbitrary coefficients and ψ i should be real for the same reason as for the reality of φ i in (4.49). Since h must be a Hermitian matrix we should have ψ 2 = −ψ 1 and ψ 4 = −ψ 3 and where r 1 and r 2 are real. We argue now that by doing a suitable H-transformation with constant H we can bring h to some standard form. We have the following transformation rules and we would like to keep asymptotics of ω ∼ η, which constrains H to obey η = H η H T . It is easy to see that the following H sets r 1 = r 2 = 0 and ψ 1 = ψ 3 = 0: Therefore, without loss of generality we can always choose the following conjugation property which is valid in the mirror kinematics. This conjugation property also implies thatω = |η|ω −1 |η| i.e.
which is valid in the physical kinematics.
It is instructive to discuss the difference between (4.51),(4.52) and (4.63). Complex conjugation maps the upper half-plane to the lower half-plane, and it also preserves the magnitude of functions. As bosons are naturally analytic in the physical kinematics, their analytic continuation from the upper to the lower half-plane does not change their magnitude at large u, hence we can choose P's to be real (up to a constant phase) functions. The fermions, on the contrary, are naturally analytic in the mirror kinematics. Their analytic continuation from the upper to the lower half-plane, avoiding long cuts, changes their magnitude. Moreover, with our prescription of ω(±∞), the functions Q 3 , Q 4 which are small in the upper half-plane become large in the lower half-plane, and the opposite happens with Q 1 , Q 2 . Hence fermions should come in the conjugated pairs, and this happens indeed.
Complex conjugation of arbitrary Q-functions. Complex conjugation of any Q-function which is analytic in the upper half-plane produces a function which is analytic in the lower half-plane. Hence, it is clear that it should relate UHPA and LHPA Q-systems. From the explicit conjugation rules for P's and Q's and recalling that complex conjugation results in an H-rotation plus a sign adjustment (4.48), we easily restore the general conjugation rule which is valid as written in the lower half-plane.

Particular case of the Left-Right symmetric states
The left-right (LR) symmetry transformation corresponds to the exchange of the left and right su(2|2) subalgebras of the full superconformal symmetry psu(2, 2|4). The LR-symmetric operators/states are characterized on the level of mirror Y-system by the condition Y a,−s = Y a,s , and they include such important examples as twist-L operators of the type tr(Z L−1 ∇ S + Z) + . . . from the sl(2) sector of the theory. For T-functions the condition of LR symmetry depends on the gauge, but for the distinguished T-gauge it is simply T a,−s = T a,s . We also have T 1,s = T 1,−s , hence one can always put P 4 = P 1 and P 3 = −P 2 . Then the following relations hold: (4.66) The anti-symmetric matrix χ can be viewed as a symplectic metric on C 4 rising or lowering both bosonic and fermionic indices of Q-functions in the case of a LR-symmetric state. So for a general LR-symmetric Q-function we have (4.67) Let us note that even in the case when LR-symmetry is absent, the transformation being a combination of Hodge-duality and the special H-rotation, still preserves all algebraic and analytic relations of the fundamental Q-system. It is therefore always a symmetry of the equations (not the functions though), and this is the precise meaning of how the Hodge-transformation is interpreted as the LR-transformation. Obviously, on the level of T-functions, this transformation acts as LR : T a,s → T a,−s .

Exact Bethe Equations
The Asymptotic Bethe Ansatz (ABA) of Beisert-Eden-Staudacher [22,23] is a well-known and efficient approach for computing the spectrum at weak coupling and also for asymptotically large J 1 ≡ L. The ABA is a set of algebraic equations on a set of complex numbers, or Bethe roots, which then give directly the anomalous dimensions in this approximation. In this section we go beyond this asymptotic regime and discuss the role of Bethe roots and Bethe equations in our new formalism, at finite coupling and J 1 . We will see that there is a natural definition of the exact Bethe roots which however do not play the same crucial role as in the asymptotic case. The situation we observe is in a strict analogy with the Baxter equation formulation of the XXX Heisenberg spin chain spectral problem, where the Bethe ansatz equation is replaced by an analyticity requirement. The Baxter equation for the sl(2) spin chain of the length L reads where the analyticity requirement states that T and Q are polynomials. The degree of the polynomial Q is the spin of the state. For a given spin, this analyticity requirement has a finite number of solutions corresponding to the highest weight states of the spin chain. When a solution of (4.69) is found, the Bethe roots can be defined as the roots of Q, which can also be shown to satisfy the Bethe equations as a consequence of (4.69): Curiously, (4.69) is precisely what the QSC reduces to at weak coupling in the sl(2) sector where the role of Q(u) is played byμ 12 (u + i/2), which also becomes a polynomial at weak coupling [15]. Notably, the conditionμ 12 (u 4,j + i/2) = 0 also gives exact Bethe roots defined in the TBA formalism as we are going to show now. In the case of TBA equations one defines the exact Bethe roots as Y * 1,0 (u 4,j ) + 1 = 0, where the star denotes the physical branch of the Y-function defined as an analytic continuation through the first branch cut at −i/2, see e.g. [3] 31 . To show that the zeros of µ + 12 produce the zeros of Y * 1,0 + 1 we write, for short cuts, where we use (3.7-3.10) and (3.18) to express T a,s explicitly in terms of P and µ. We have to analytically continue Y 1,0 under the cut at −i/2. Using the explicit expression (4.71) it is trivial to perform such continuation to get (4.72) 31 Note that not all the roots of Y * 1,0 (u) + 1 give the Bethe roots. To identify correctly the right zeros one should follow them starting from the weak coupling limit, controlled by the ABA.
Note that ( μ −− 12 ) + is not singular as a consequence of our assumption of QSC regularity: all Qfunctions and also µ ab have no poles on any sheet of their Riemann surface. Assuming also that the denominator does not go to zero, which can be verified at weak coupling, we see that the condition µ 12 (u 4,j + i/2) = 0 indeed implies Y * 1,0 (u 4,j ) = −1 exactly at any coupling.
Auxiliary Bethe roots. There exists no good definition within the TBA formalism for the auxiliary Bethe roots (i.e. those which are not momentum carrying). But in the formalism of QSC we can develop a further analogy with the spin chains. For generalized su(n) Heisenberg spin chains one defines 2 n different Q-polynomials. Their polynomiality and the QQ-relations imposed on them generalize the Baxter equation (4.69) and also give a discrete set of solutions, corresponding to the states of the spin chain. The Bethe roots are again zeros of these Q-functions, which can be shown to satisfy some Bethe ansatz equations, as a consequence of the polynomiality and the QQ-relations. Acting in the same way for the QSC at any coupling, we define a set of exact Bethe equations which, as we will see in section 5, coincide in the asymptotic limit with the familiar BES Bethe roots 32 . For instance, let us first take the fermionic QQ-relation (4.1c). Considering it at zeros of Q Aa|I and requiring the absence of poles in Q A|Ii one gets Applying the same logic as around equations (5.53) and (5.54), but now for arbitrary A, I, i, j of (4.1b), one gets For the success of this procedure, it is important that Q

[±2]
A|Ij is regular at zeros of Q A|Ii . This equation and the regularity property are trivial consequences of our present formalism, however, in our previous FiNLIE description [12] of the spectrum it was far from being obvious and for a particular case Q A|Ii = Q 12|12 it was observed in [14] for an explicit perturbative solution.
For the spin chain case one can determine Q-functions simply by knowing their zeros. For instance, for the compact rational case, the Q-functions are simply polynomials. Hence solving the Bethe equations for the zeros of Q-functions is equivalent to finding the Q-system. One typically chooses a nesting path connecting Q ∅ and Q∅ on the Hasse diagram (which also defines a Dynkin diagram) and consider only the Bethe equations that involve the Q-functions on this path. This allows one to fix enough Q-functions to restore other ones by QQ-relations.
In the present case the sole knowledge of the roots of Q-functions does not allow for a complete description as our Q-functions also have a complicated cut structure and thus the exact Bethe roots defined here are in general much less restrictive for the exact solutions. Nevertheless, they could be important to identify particular solutions of QSC, for the numerical calculations and their comparison with the ABA formalism at weak coupling. They could also help with the classification of all physical solutions of QSC.
It is quite interesting that, at least in principle, we can choose virtually any paths on the Hasse diagram, not only those giving a "Zhukovsky-polynomial" solution of Beisert-Staudacher in the large volume limit. It could happen that these Q-functions become polynomial in some other physically interesting regimes.
Let us emphasize that the definition of exact Bethe roots as zeros of Q-functions is not universal. For example, the exact momentum carrying Bethe roots can be alternatively defined as zeros of Q 12|12 , as suggests the logic of writing Bethe equations along a Hasse diagram. This definition coincides with the TBA motivated definition through zeros of µ + 12 only asymptotically, but differ from the latter when the finite size effects are included, which was confirmed by the explicit computation in [14]. The possibility for alternative and inequivalent definitions demonstrates the fact that at the finite coupling the relevance of the Bethe roots is diminishing.

Large Volume Limit
In this section we will establish the large length/charge Asymptotic Bethe Ansatz (ABA) limit of the quantum spectral curve. We will establish the quantities entering the QSC equations in this limit and restore the Beisert-Staudacher ABA equations.

Conventions
We should expect significant simplifications in the asymptotic limit of large length L of operators. It is known that in this, particularly important, limit the spectral problem is governed by a system of algebraic Beisert-Staudacher equations (ABA) [23] which describe the spectrum with exponential precision in L ≡ J 1 ∼ ∆.
To understand the correct scaling of various QSC quantities in the asymptotic limit, we can look at their large u asymptotics. We see for example that P 1 scales as u −L/2 which becomes exponentially small in L for large enough u (or x(u)). At the same time P 4 scales as u L/2 and thus becomes exponentially large. To keep track of this scaling we introduce a formal expansion parameter ∼ u −L/2 ∼ u −∆/2 and we assign a particular scaling guided by the large u asymptotics, as follows: where α = 1, 2 andα = 3, 4. Similarly for β = 1, 2 andβ = 3, 4. And following the same principle we assume ω ij ∼ ω ij ∼ 1.
To see from where the main simplification comes we also have to deduce the scaling of Q a|i from its asymptotics, or simply from (3.43): Then from (3.54) we simply have i.e. only the term with ω 12 in the r.h.s. survives in this limit. ForP a we have in this asymptotic limit a similar simplification: Also, we should consider the reality of µ in the physical kinematics (4.54): The conjugation condition for fermionic Q's should be also considered with short cuts, i.e. we consider (4.56) which simplifies in the asymptotic limit to prescription. This relation implies Finally, it will be convenient to introduce a notation "∝", where f 1 ∝ f 2 means that f 1 /f 2 is an irrelevant constant multiplier.
Let us point out an important subtlety. In general the analytic continuation and the expansion in are not expected to commute. A simple example of the phenomenon is the function 1 + 1/x L which with our precision is simply 1. However, its analytic continuation to the second sheet is 1 + x L which is x L with exponential precision. Nevertheless, we see that such non-commutativity implies a drastic modification of analytic properties of the function on another sheet -namely we should hide extra L poles on the second sheet (including the poles are at infinity of the second sheet). If the singularity structures of the expanded continuation and the continuation of expansion coincide there should not be any problem with non-commutativity. In such a case it should be safe to do such analytic continuation provided the analytic properties are well controlled. We will see some explicit examples below. Using the above simplified relations, we now find the explicit form of µ 12 and ω 12 . For that we introduce more of new notations. First, we label the zeros of µ + 12 on the physical sheet as u j : µ 12 (u j + i/2) = 0 , j = 1, . . . , N . (5.10) We will see that µ 12 and ω 12 can be expressed in terms of u j . Furthermore, these zeros are the exact Bethe roots for the central node of TBA (Y phys 10 (u j + i/2) = 0), as is discussed in section 4.5. However, we do not yet have to assign any physical meaning to u j .
Since µ + 12 is a real function, its zeros must be either real or come in complex conjugated pairs, which then implies that the Baxter polynomial is also real. At the same time we see from (5.9) that ω 12 cannot have zeros as they would inevitably generate poles in the complex conjugate points, which contradicts the regularity of ω 12 .
Next, we define a function F by with the choice of sign F (+∞) = +1. As we see it is defined in such a way that there are no poles or zeros on its defining sheet. We note that even without the large volume approximation we have directly from the definition of F Furthermore, in the large volume limit we can show that the discontinuities on all cuts are exponentially small, except for the cut on the real axis. Indeed, using (5.4) we rewrite F 2 in terms of ω 12 , which cancels due to periodicity (5.14) As Q − 12|12 is analytic everywhere in the upper half-plane we know that F 2 is also analytic there. Moreover, due to the reality of Q and µ + we see thatF = 1/F which implies the absence of cuts below the real axis as well. We thus see that F is a double valued function, which tends to 1 at infinities and satisfies (5.13) with no poles or zeros on the main sheet. Thus we can take log of (5.13) and find F by Hilbert transformation 33 where the argument of the log in the r.h.s. is a rational function of the Zhukovsky variable x The normalization factor Knowing F we can reconstruct µ 12 . We should also remember that µ + 12 is real and it asymptotics is polynomial which uniquely fixes the solution of the first order finite difference equation on µ 12 .

(5.18)
It is convenient to introduce a notation:  , where e i 2 p = N k=1 This extra phase insures F (+∞) = 1. As eventually we will identify u k with asymptotic Bethe roots, and derive the cyclicity condition (5.59), we know that e ip = 1, hence e i We assume that the infinite product is regularized in some way (for example by imposing f (0) = 1). Alternatively, one can think of f as a solution of which is analytic in the upper half-plane and which is normalised, for example, by f (0) = 1. Next, we use (5.14) to find Q 12|12 by finding a solution, analytic in the upper half-plane, which is uniquely given by This allows us to find ω 12 from (5.4). We summarize the main asymptotic relations from this section as follows In conclusion we note again that zeros of Q 12|12 and that of µ 12 coincide in the large volume limit as was already mentioned in the section 4.5.

Finding P α
The strategy here is essentially the same as before: We build a function which becomes double-valued in our approximation and then fix it by zeros and poles. Before that let us define a real function σ with only one short cut on the defining sheet and with no poles or zeros there, such that Then, we introduce g α ≡ P α /σ .

(5.24)
We check now that this g α is a double valued function, i.e it has a double-sheeted Riemann surface, with two sheets connected through a single cut. First, it is obvious that on the upper, defining sheet there are no other cuts except the one on the real axis. To get to the next sheet we use (5.5) from where we see that f [+2] cancels and all other factors in the r.h.s. are regular in the upper halfplane. As also from (4.52)ḡ α = ±g α , we see that there could not be any cuts or poles in the lower half-plane either. Thus we conclude that g α is simply a regular function of x(u) for all finite u. As, moreover, P α (u) is decaying at infinity roughly as u −L/2 we can only have a pole at x = 0, so the most general expression is where R 1|∅ , R 2|∅ are some real polynomials in x containing zeros only outside the unit circle, and B 1|12 , B 2|12 are real polynomials containing zeros only inside the unit circle, similar to those defined in (5.17). Their indices label the nodes on Hasse diagram to which correspond the auxiliary Bethe roots defined by their zeros. L can be though of as an arbitrary number so far, but it will be eventually identified as L ≡ J 1 , i.e. that it defines the length of the spin chain at weak coupling.
For P α and Q α|12 , equation (5.26) gives Finally, let us give an explicit form of the function σ by relating it to the dressing phase of Beisert-Eden-Staudacher [22,41]. We can recognise in (5.23) an analytic continuation [42] of the crossing equation [43], hence we can immediately write the solution: where sign conventions for σ BES are the same as in [44].

Finding Q α|β
Recall that Q + a|j ω jk = −(Q a | k ) + belongs to the Q-system analytic in the lower half-plane, as is discussed in section 4.2.3. In our scaling only one term with ω 12 survives and thus the following functions should be analytic in the lower half-plane Q + a|1 ω 12 , Q + a|2 ω 21 , a = 1, . . . , 4, (5.29) As Q − a|α themselves are analytic in the upper half-plane we conclude that any ratio Q a|α /Q b|β for arbitrary a, b = 1, . . . , 4 and α, β = 1, 2 has no cuts on the whole complex plane and thus is simply a rational function of u, which allows for the following parameterization where Q a|β are polynomials of u and q is a so far unknown function analytic above the real axis. We find q by comparison to (5.4) and

Finding Q α
We introduce r ≡ Q1 Q2 which by the UHPA construction has no short cuts above the real axis, and furthermore it is purely imaginary due to (5.8): which implies that it has only one short cut on the defining sheet. The reality property automatically propagates to the next Riemann sheet. But this ratio has no cuts there in the lower half-plane, because Q α has the only cut in the mirror kinematics. Hence, because of these analyticity and reality properties,r has no cuts in the upper half-plane as well. So r is a rational function of x, similarly to F . We split its zeros and poles into those inside and outside of the unit circle and denote where R ∅|1 , R ∅|2 are real polynomials in x containing zeros outside the unit circle, and B 12|1 , B 12|2 are real polynomials containing zeros inside the unit circle, similar to those defined in (5.17). In order to have these polynomial well defined from their ratio, we demand that R ∅|1 and B 12|1 have the same zeros as Q 1 on the corresponding sheets, and that correspondingly R ∅|2 and B 12|2 have the same zeros as Q 2 . The notations of indices suggest the place of these functions, and their zeros -auxiliary Bethe roots, in the asymptotic Q-system (i.e. in Hasse diagram). Equation (5.35) suggests the following parameterization: where d α is a numerical constant. The factor f [+2] /B (−) can be absorbed into redefinition of S but it is convenient to keep it. Indeed, due to this factorS = S as one can see from (5.8). Thus again S has only one cut.
Fixing S We will use QQ-relations to deduce S. Starting from (3.43) we get in the scaling limit We see from the last identity that the combination Sσ must be a rational function of x. The potential poles of this function could occur only due to the zeros of B α|12 and B 12|β , since on the main sheet there are for sure no poles, because of (5.36) and the definition of σ. We will show now that the poles are also impossible at zeros of B α|12 and B 12|β . First, suppose there is a pole in S, on the second sheet, from a zero of B 12|β . But than this pole and zero will simply cancel each other in (5.36). Hence Q β has no zero at the root of B 12|β , which contradicts the very definition of B 12|β .
Second, suppose there is a pole from a zero of B α|12 . In subsection (5.3.2) we will construct Q 12|α . From the way it is constructed it is clear that it is proportional to R 12|αS , and these two terms are the only ones that can lead to zeros and poles of Q 12|α . Hence such a pole in S becomes a pole of a Q-function on the main sheet, which is impossible by our regularity assumption.
Thus Sσ could only have singularities at infinity which we can fix from the asymptotics to be

Exploring the results
In the previous section we have found various Q-functions with one common property -they are all of the form Q A|I where A, I are multi-indices from {1, 2}, hence these Q-functions form an su(2|2) Q-system. The distinguished role of the su(2|2) sub-algebra in the asymptotic limit of the AdS/CFT spectrum is well-known; for instance, it was extensively used in the approach of factorized scattering and nested Bethe ansatz [45,46]. In this subsection, we complete the derivation of all still missing asymptotic su(2|2) Q-functions, in addition to those derived above, and demonstrate the dualities between them based on QQ-relations. Then we restore the whole set of BES ABA equations together with the expression for the energy of a state and the cyclicity condition.

su(2|2) Q-functions explicitly
We summarize the derived explicit QSC solution and also add the missing su(2|2) Q-functions Q 12|α : There is also the second (left) su(2|2) Q-system which is treated absolutely in the same way and can be written in the full analogy in the Hodge-dual notations. Forα,β ∈ {3, 4}: one has The two su(2|2) Q-systems are actually interrelated through the central Q-function:

QQ-relations and dualities
The Q-functions should satisfy various QQ relations which impose constraints on possible zeros of Zhukovsky-Baxter polynomials R, B, and Q. In the context of ABA, these constraints are also known as dualities among the Bethe roots. Let us demonstrate how to use these dualities to fix both the structure of Q 12|α and the position of its zeros. Consider the defining fermionic QQ-relation (3.43) written for two particular instances:  [22,37,38] some of them are depicted on the picture. In the classical limit each of these possibilities corresponds to a particular ordering of the sheets denoted by 1, 2 for the sheets in S 5 and1,2 for the sheets in AdS5.
The first of these relations leads to (5.38) which can be written as The second one leads to where we used explicit expressions from (5. 40) . Now we note that the tilde applied to the l.h.s. of (5.45) produces the l.h.s. of (5.46). Hence the same should be true for the r.h.s. of these equations, which defines for us Q 12|α precisely as in (5.40).
The equation (5.45), together with its tilde, (5.46), is nothing but the fermionic duality relation [23]. The dualities F 1 and F 2 in figure 7 are two examples of it.

Asymptotic Bethe Ansatz Equations
Asymptotic Bethe Ansatz equations are algebraic equations on zeros of Baxter polynomials. An important feature of ABA equations is that they contain explicitly only those Baxter polynomials which belong to a given path on the Hasse diagram. Each path is in one-to-one correspondence with the ordering of sheets of the classical algebraic curve. There are 4 sheets in AdS 5 which we denote by numbers1,2,3,4 and another 4 sheets in S 5 denoted as 1, 2, 3, 4. From the point of view of representation theory, it is possible to choose different Borel subalgebras to describe the same highest weight representation. The orderings of sheets which do not spoil the polynomial (apart from the dressing factor) nature of Beisert-Staudacher equations, are those where 1, 2,1,2 are ordered before 3, 4,3,4; moreover, only the following two patterns are allowed * * * * or * * * * for the first 4 and for the last 4 sheets. In total there are 64 possibilities and, correspondingly, there are 64 versions of ABA equations related to each other via duality transformations. We discussed these duality transformations in the previous section, and here we pick one canonical choice 11223344. It corresponds to the ABA-type Kac-Dynkin-Vogan diagram in figure 14 of appendix C and to the standard, with respect to this diagram, choice of the Borel subalgebra.
We will obtain the set of nested Bethe ansatz equations from the QQ-relations, in a way similar to the case of Heisenberg super-spin chains [32], using certain analytic properties of the involved Q-functions: in this case it will be their polynomiality (or sometimes "Zhukovsky polynomiality" in the current model, apart from σ and f ). The choice 11223344 means that we have to relate to each other only the Q-functions corresponding to this specific path on the Hasse diagram. These relevant Q-functions are We see from here that we have to relate by Bethe equations the following Baxter-Zhukovsky polynomials Let us denote the corresponding roots as u 1,k , u 2,k , . . . , u 7,k . Note that u 4,k = u k , this is however true only in the asymptotic limit. We start by taking (5.45) for α = 1, β = 1, and setting u = u ∅|1 k which will set to zero the r.h.s., and we get Similarly, we analytically continue (5.45) for A = 1, B = 1 to another sheet, by replacing R ↔ B and evaluate it at u = u 12|1 k so that again the r.h.s. vanishes and we get To get an equation for u 2,k we use (5.47) with α = 1. Evaluating first at u = u 2,k − i 2 we get rid of the first term as Q 1|1 (u 2,k ) ≡ 0. Dividing the result by the same equation evaluated at u = u 2,k + i 2 we get the following Bethe equation , ∀k .

(5.52)
Middle node equation. This equation explicitly contains x L and thus its derivation might require the knowledge of the next order in expansion. Fortunately, we can avoid this difficulty. Consider a special instance of the exact QQ relation (4.1b): Note now that Q 12|123 = Q 34|4 , so the only function that we do not know in the large volume approximation is Q 12|13 . We, however, do not need to know it explicitly. Similar to derivation of (5.52), we rewrite (5.53) twice, shifted by +i/2 and −i/2, and evaluate each of the equations at u = u j , so that the terms proportional to Q 12|12 cancel out. Then we divide the obtained results to get for u = u j . It remains to substitute the explicit expression for Q-functions in the asymptotic limit and to use the properties of σ and f to get 56) which is the middle-node Beisert-Staudacher equation with the BES dressing phase.
Already at this stage we can immediately identify L = J 1 . In section 5.4 we give a more systematic view on this identification.

Equation for the Energy and Cyclicity Condition
The simplest way to deduce the energy is from the asymptotics of µ 12 ∼ u ∆−J1 , or even better, using log µ [+2] 12 The first term must be zero, which gives the trace cyclicity (zero total momentum) condition (5.60)

Numbers of Roots and the Conserved Global Charges
It is explicitly known how the number of Bethe roots is related to the global charges [23]. Hence, comparison with the Beisert-Staudacher equations is the best way to determine the large u behaviour of Q's in terms of global charges and to confirm our conjecture formulated in section 3.2.3. Although this is a confirmation only in the large volume/weak coupling approximation, we will give simple arguments why the formulae (3.64) should hold even at finite coupling.
The necessary background about the representation theory and explanations about notations we use is given in appendix C.
Denote by K α the number of Bethe roots u α,k for α = 1, 2, . . . , 7. From [23], formula (5.3) there, the explicit relation to the su(2, 2) and su(4) Dynkin labels is known. Respectively: x − k , and We used that our choice of Kac-Dynkin-Vogan diagram corresponds to η 1 = η 2 = −1 in [23]. Now, on the one hand, the large-u behaviour of Q-functions can be written in terms of K i and γ. As a preparatory work, one should find the large u expansion of f . Given that f f [2] = from where one finds f u γ/2 . On the other hand, we can recall that, in notations (C.10), P a ∼ u −λa , Q i ∼ u −νi−1 , P a ∼ uλ a −1 , Q i ∼ uν i , and asymptotics for all other Q-functions follow from the QQ relations. Hence we can write the large-u behaviour of Q-functions in terms ofλ's andν's.
Therefore we can compare the two ways of computing the large-u behaviour and fix in this way, using also (5.61) and (5.62), the values ofλ's andν's in terms of Dynkin labels. To that end, we compute the large-u behaviour of Q-functions along the Hasse diagram, i.e. those listed in (5.48): On the l.h.s. we wrote the powers of large-u asymptotics of Q-functions as it follows from (3.64),(3.66). On the r.h.s. we wrote the same powers as it follows from the explicit solution (5.40). Expressingλ andν (shifted weights) in terms of λ and ν (ordinary weights) according to (C.14), and using (5.64) to determine K i , we arrive at conclusion that r i = λ i − λ i+1 and q i = ν i − ν i+1 , as expected. To get this conclusion, we also used the zero charge condition λ i +ν i = 0. All the weights can be expressed through 6 Cartan charges (J 1 , J 2 , J 3 |S 1 , S 2 , ∆) of psu(2, 2|4) by the formulae (C.10). Hence we confirmed that the large-u asymptotic of Q-functions is defined by the global charges, based on the comparison with ABA. This comparison is valid only at sufficiently small coupling constant. For the finite coupling case, our arguments are as follows. In the representation theory, the charges J 1 , J 2 , J 3 , S 1 , S 2 are quantized and hence do not depend on the coupling constant. In appendix C.2 we prove, using only analytic properties of QSC, that the corresponding powers in the large-u asymptotics of Q-functions are also quantized and hence also do not depend on the coupling constant. Therefore, the established equivalence for these 5 charges is exact. For the remaining charge, the conformal dimension ∆, we are able to show that this quantity, when defined from µ 12 ∼ u ∆−J1 , is the same as the one defined in TBA. This is done in appendix C.3, which accomplishes our proof for identification of the global charges and large-u asymptotics of Q-functions at finite coupling.
Also, let us note that global charges should satisfy the unitarity constraints. In appendix C we show that these constraints follow mostly from the analytic structure of QSC, which is another solid support for the proposed link between the asymptotics of Q-functions and the group-theoretical data.

Quasi-classical Approximation
In this section we discuss the classical limit of our construction. We compute various quantities in this limit and speculate about their physical meaning. We also establish various links to some results known in the literature.
The quasi-classical approximation in Quantum Mechanics applies in the limit → 0 when the quantum numbers of the state are large and scale as 1/ . In this case one can approximate the wave function ψ(x) by where p cl (z) is the classical momentum of the particle as a function of its coordinate. Very similarly, in the Metsaev-Tseytlin sigma model the role of is played by 1/g and, as we argue in this section, the role of the wave function in the above example is played by P a and Q i . More precisely, we will see that where pã and pî are the classical quasimomenta which are defined so that (e ip1 , . . . , e ip4 |e ip1 , . . . , e ip4 ) are eigenvalues of the classical (4 + 4) × (4 + 4) monodromy super-matrix. We also defined finite pre-exponents P a|∅ (u) and P ∅|i (u) as we are going to reconstruct some partial information about them soon. To see where (6.2) comes from one can simply use our results in the large L asymptotic (ABA) limit from section 5. It is known that the ABA correctly reproduces the classical limit, as the wrapping corrections, not captured by ABA, become relevant only at one loop. Thus simply taking (5.36) we find where H a andH a are resolvents and Q 2 34 is a local conserved charge (energy) defined in terms of the Bethe roots by The last equality in (6.3) is obtained by comparing with the expressions for the classical quasimomenta in terms of the Bethe roots known from [23].

not to be confused with Q-functions
The natural variable for the classical limit is z = u/g. Taking log of (6.3) and expanding the l.h.s. in g → ∞ limit (with z fixed) we get i g ∂ z log Q 1 = ip1 (6.5) which leads to one of the relations (6.2). The rest of them can be obtained similarly, thus confirming the quasi-classical approximation (6.2). In the following, we will discuss several properties and extend our intuition about QSC to the quasi-classical limit. We will show how the monodromy data of the QSC naturally fits the analytic continuation of the quasi-momenta, and hence the Z 4 symmetry of the coset sigma-model. We will also derive the expressions for T-functions in the character limit which are already known in the literature [48]. For that, in particular, we will get further information about the pre-exponents P and hence gain a certain bit of knowledge about QSC at one loop.

Constraining Pre-exponents
To constrain the pre-exponents we use like before the fact that P a and Q j are not completely independent, but rather related to each other by Q a|j defined by (3.43). From that equation we see that Q a|j in our limit should scale as ∼ P a Q j so we define Next, we relate P a|j (u) to P ∅|j (u) and P a|∅ (u) using (3.43). For that we have to find the difference Q + a|j − Q − a|j which can be easily evaluated for large g to be It is convenient to introduce notation x a ≡ e −ipã , y i ≡ e −ipî . Next, comparing with the r.h.s. of (3.43) we see that At the same time, from (3.42) and (3.51): from where we see that in analogy with (6.2) we should have for the upper indices P a = P a|∅ (u) exp +g In addition, due to (6.9) the pre-exponents are constrained by In combination with (6.8) this gives These equations, considered as a set of linear equations on P a0|∅ P a0|∅ and P ∅|i0 P ∅|i0 give , a 0 =1, . . . , 4 , (6.13a) where we use the unimodularity condition of the classical monodromy matrix which in our notations reads as 4 a=1 xa ya = 1. We can also check that due to (6.13) one has a P a|∅ P a|∅ = i P ∅|i P ∅|i = 0 as it should be from P a P a = Q i Q i = 0 (see (3.57),(3.39)).

Quasi-Classical limit of the discontinuity relations
Here we briefly discuss the classical limit of the discontinuity relations (3.39) and their relation to the Z 4 symmetry of the coset model. To that end, consider µ ab . In terms of z the branch points are fixed at ±2 + n/g and, quasi-classically, all of them are squeezed to the points ±2. At the same time, µ ab (z) is a periodic function with i/g period which goes to zero. Assuming µ ab has a sensible quasi-classical limit we see that in the domain −2g < Re u < 2g µ ab must be simply a constant. This simple observation leads to the essential simplification of the discontinuity relation of P a (3.39), which we repeat here for convenience:P 1 = µ 12 P 2 + µ 13 P 3 + µ 14 P 4 , (6.14) P 2 = µ 21 P 1 + µ 23 P 3 + µ 24 P 4 . (6.15) We note that P 3 and P 4 are exponentially small compared to P 2 , so, assuming µ's are all of the same order we get simplyP 1 = +µ 12 P 2 ,P 2 = −µ 12 P 1 where µ 12 is in this limit is just a constant which we set to −1 by a suitable rescaling of P's. Thus we simply should havẽ P 1 = −P 2 ,P 2 = P 1 . (6.16) We can see that this equation is perfectly consistent with (6.2) and (6.10). Indeed, to analytically continue (6.2) under the cut we will have to integrate pã(u) around the cut and then under the cut, as illustrated in figure 8. An important property of the classical curve, which is related to Z 4 automorphism of psu(2, 2|4) algebra is that the analytic continuation of the quasi-momenta p 1 (u) (or p 2 (u)) is −p 2 (u) (or −p 1 (u)). In particular We see that, as a consequence of the Z 4 symmetry of the classical theory reflected in this specific property of the quasi-momenta, we indeed reproduce correctly the nontrivial leading exponential factor in the discontinuity relation coming from the QSC.

Quasi-Classical limit of T-functions and Characters of Monodromy Matrix
In this section we establish a link between the quasi-classical limit of P functions, found in this section, and the quasi-classical limit of T-functions used earlier for one-loop test of TBA/Y-system equations in [10,48]. More precisely, we show that the quasi-classical limit of T-functions defined in (3.8),(3.9) as coincides with the psu(2, 2|4) characters of the classical monodromy Matrix in "rectangular" unitary representations, characterized by two labels (a, s) (see [10]). The characters are explicit functions of eigenvalues of the monodromy Matrix i.e. x a and y a [10]: . (6.20) According to [10] the characters in (6.20) should match the corresponding T-functions in the domain of the spectral parameter −2 < Re z < +2 because the initial T-system is formulated in the mirror kinematics. Hence all cuts should be taken to be long. In the classical limit the cuts merge together (as they are separated by ∼ i/g) and make the limit much more complicated outside the region −2 < Re z < +2, where we have to use different analytic expressions. In addition for definiteness we take z slightly above the real axis or Im u = A such that g A 1 ∼ s. This means that P 2 (u − is/2) gets analytically continued under its single cuť which due to (6.16) becomeš Using (6.2) and (6.10) we have P a (u + is/2) = P a (u + i0)x s/2 a and P a (u + is/2) = P a (u + i0)x −s/2 a so that quasi-classicallyŤ 1,+s (u) = x s 1 P 1 P 1 + x s 2 P 2 P 2 . (6.23) We know explicitly the combinations P 1 P 1 in terms of x a , y i from (6.13). Plugging these expressions into the last equation we indeed reproduce precisely the character −χ 1,s 35 . Similarly, we treat T 2,+s 35 The minus sign could is due to our gauge choice.
-52 -asŤ 2,+s = P which together with (6.13) gives precisely the character χ 2,s . Finally, we recall that it is enough to know T 1,±s , T 2,±s and µ 12 to restore the whole T-hook, as was discussed in section 3.1.2. One can find µ 12 from the fact that T 0,s = (µ [s+1] 12 ) 2 1 in the character limit since T 0,s should be the character of the trivial representation. Hence, µ 12 = ±1, which coincides with the normalisation introduced previously in this section. Therefore, by verifying the expressions for T 1,±s , T 2,±s , and T 0,s = 1, which we did, we confirm that the whole T-hook is reproduced from the QSC in the quasi-classical approximation.

Conclusions and discussion
In this paper we achieved the long-standing goal of formulation of a concise and mathematically transparent system of Riemann-Hilbert equations for anomalous dimensions of an arbitrary local operator in planar N = 4 SYM theory or, alternatively, for the energy of the dual closed superstring state. The equations generalize the classical spectral curve represented by a specific Riemann surface [21], to the full quantum case, describing the spectrum for arbitrary value of the 't Hooft coupling λ = 16π 2 g 2 .
A particularly important set of functions in this construction are 4+4 functions of a natural spectral parameter u, having only a single Zhukovsky cut with the branch points at ±2g on the real axis of their defining sheet: P a (u), a = 1, 2, 3, 4 having a short cut and Q j (u), j = 1, 2, 3, 4 having a long cut. These functions with simple and neat analytic properties happened to be deeply hidden inside the AdS/CFT TBA/Y-system. Remarkably, not only they lead to much simpler than TBA and analytically transparent Riemann-Hilbert-type equations, but they also allow to describe the planar spectrum in complete generality, overcoming a well known problem of TBA/Y-system formulation, limited mainly to the simplest states obeying certain additional symmetries (such as Konishi-like states). On the other hand, these fundamental functions also have a very intuitive physical meaning. For example, in the semi-classical limit of the underlying superstring sigma model [21] we find P a ∼ exp −g u/g dzp a (z) , Q j ∼ exp +g u/g dzp j (z) related to the quasi-momenta (p 1 ,p 2 ,p 3 ,p 4 |p 1 ,p 2 ,p 3 ,p 4 ) of the classical spectral curve, also having only one pair of fixed branch points on their defining sheets. This formula is of course familiar as a quasi-classical limit of a wave function in a one dimensional quantum mechanics! This striking analogy suggests that these objects should be also building blocks for an exact wave function in separated Sklyanin variables. We also have identified the weak coupling limit of these functions where they happen to be simply related to Baxter Q-functions of the psu(2, 2|4) XXX Heisenberg spin chain. This identification allows for a concrete classification of physical solutions of the QSC based on the analytic continuation in g from weak coupling where the Riemann-Hilbert-type equations reduce to a system of algebraic equations. At the same time, Q i , P a give rise to a powerful integrability setting -the Q-system of 256 various Q-functions representing Grassmannians' coordinates with an additional self-consistent and intriguing analyticity structure described in section 4. The analytic continuation of various Q-functions under their Zhukovsky-type cuts can be described in terms of a certain isomorphism of the Q-system relating the upper-half-plane and lower-half-plane analytic Q-functions. One can even inverse the logic here and derive the QSC from the requirement of existence of such an isomorphism. This observation reveals a remarkable mathematical beauty of the spectral problem, not immediately seen from its former formulations. This combination of the algebraic, grassmanian construction of the Q-system with the underlying analytic structure w.r.t. spectral parameter can be called the analytic Q-system.
The actual method, first announced by the authors in [15] and presented in detail in the current paper, has already found a few powerful applications. It was used to get the most accurate perturbative calculation at weak [16,17] and at strong coupling in [18,20], where also a pomeron intercept was found up to the 6-th order. The method was proven to be very powerful for exact analytic nonperturbative calculations for the generalized cusp anomalous dimension [15,49,50], for slope and curvature function [18,20]. Recently, following our methods, the QSC was also build in the ABJM theory [19,[51][52][53]. Exact slope function in ABJM theory computed using the QSC methods has lead to a well justified conjecture for the interpolation function h(λ), entering into all integrability based calculations in this theory [20]. Further development of our methods should also allow for a comprehensive description of the open strings spectrum with various types of integrable boundary conditions, which cover such physically relevant cases as quark-anti-quark potential [25,26], DD-systems [27]. Also the QSC approach may help to scan for all possible integrable boundary conditions and may even lead to their complete classification. Even more straightforward generalizations are β, γ, η−deformed theories [54,55]. Finally, we hope that some dualities of AdS 3 /CFT 2 type [56,57] could be studied by our exact methods.
The QSC equations presented here seem to be an ideal approach for attacking a set of longstanding complicated problems. In particular the BFKL pomeron spectrum seems already to be within the reach of our methods.
More speculative possible domains of application of QSC are the calculations of form-factors and correlation functions. Indeed, as we discussed it is very appealing to associate Q s and P s with the wave functions which thus could be very useful building blocks for the exact formulae for these more general observables in the theory [58].
It would be interesting to construct a similar analytic Q-system in other integrable quantum sigma models, such as the principal chiral field or the Gross-Neveu model. Apart from a deeper understanding of related mathematical structures of integrable finite volume 2d QFT's, it could help to clarify various unsolved problems, such as the description and classification of various excited states in these models. 36 It would be good to work out a physical bootstrap procedure, generalizing the Zamolodchikovs' Smatrix bootstrap to the finite volume case, which leads directly to the corresponding Y-system, or Qsystem, omitting the TBA procedure. Indeed, as it is done in this paper -through the TBA procedure for the mirror theory, starting from the S-matrix bootstrap -seems to be way too complicated regarding the simplicity and naturalness of the final equations based on Y-system or Q-system.
Another important open problem which is left to solve is the operatorial formulation of the Qsystem. At weak coupling a locality makes the problem well posed and solvable. It reduces to the one for a non-compact supersymmetric Heisenberg spin chain. Q-operators are well understood and explained for non-compact [61][62][63][64] and supersymmetric [63,65]. Even though it is clear that at a finite coupling this problem literally is not very well posed due to a scheme dependence, in a relevant formulation, it still should contain a certain rational bit of information. A possible way to it might be similar to the one applied for the twisted spin chains in [66,67] where the operatorial form of Q-functions was constructed by application to characters of co-derivatives w.r.t. twists [66,67]. This approach may also shed some light on the meaning of Q-functions from the gauge theory point of view.
A Mathematica code to check derivations Details of derivation for sec.2 All the steps in section 2 can be done by hands, but to avoid needless waste of time we suggest to follow elementary steps using Mathematica.
First we enter the definition of the T -functions (denoted by t) in terms of P a 's (denoted as P[a]) and P a 's (denoted as P[-a]). µ 1,2 is denoted as µ [1,2], but for the simplicity of notation, when the notation µ [1,2] is used in an expression involving P-functions with odd shift, µ [1,2] denotes µ + 1,2 ; by contrast, when it appears in an expression involving P-functions with even shifts, it denotes µ 1,2 . We also define T and denote it by T. Next, we will have to be able to find others T using Hirota identity. For that we should remember that the shift operator in the Hirota identity is defined with long cuts, whereas P are the functions with short cuts. To correctly deal with this situation we introduce up and dn operations which are compositions of the shift and analytic continuation toPtilde. We also define a function Disc which computes discontinuity After that we are ready to use Hirota to derive one by one all necessary T functions: We are now almost ready to check equations such as (4.14): the only missing thing is that the equations (4.14) assume that Q ∅|∅ = Q ∅|∅ = 1. While the above definitions rely on (4.3-4.7,4.9), which ensures that Q ∅|∅ = 1, the condition Q ∅|∅ = 1 has to be specifically enforced by thefunction Qforced (below) which uses these relations to express Q 4|4 and Q ∅|4 :

B Details of the relations between the Q-, T-and Y-systems
Historically, development of the finite size AdS/CFT spectrum solution roughly followed the left-toright direction in the following diagram.
The algebraic Y-T-Q equivalence was realized quite a while ago: both Y-and T-systems were written down already in the work [2], and soon after that the Wronskian solution for T's in terms of Q's was proposed [11]. This algebraic representation took a good deal of inspiration from the similar constructions in integrable quantum spin chains with su(n) symmetry [31] (see also [68] for a similar, even operatorial construction for an su(n) CFT) and turned out to be a natural generalization to the non-compact and super-symmetric case. The analytic structure, at the contrary, turned out to be very specific to this particular integrable model. Although the basic features of this structure were already sketched out in [2] it took a long effort to properly understand it. Originally it was encoded through the TBA equations [6][7][8] and then, step by step it reduced to the analytic Y-system [9,24], a distinguished T-gauge [12], and to the mixture of T-and Q-functions in the FiNLIE formulation [12]. While moving from left to right on the diagram (B.1), the analytic structure was becoming more and more transparent. The AdS/CFT quantum spectral curve, which can be also called the analytic Q-system, proposed in the current paper (see also the already published short version [15]) gives the clearest, and in many respects the ultimate insight into the analytic structure of the underlying Q-functions.
Of course, it is important to demonstrate explicitly that this QSC -the analytic Q-systemis equivalent to the original TBA equations, at least for certain well-understood cases. Section 3.1 already contains the basic ideas of this equivalence. But to keep things short there, we omitted some important steps of the proof which might make this construction looking mysterious. The goal of this appendix is to systematically review the Y-T-Q equivalence which greatly relies on the classical integrability of the Hirota dynamics and hence on the machinery of the Q-system.
The due remark is that we cannot fully rigorously demonstrate the equivalence with TBA for arbitrary state of the AdS/CFT spectrum. The back-up of our analysis is in our explicit studies of the sl(2) sector that were thoroughly done up to, and including the double wrapping orders at weak coupling [14,69] and non-perturbatively, in the small S regime [18,49,50] as well as in a few examples of numerical solution of TBA equations. Though the derivations below are written as if for generic state, they might have unaccounted subtleties in each particular case due to state-dependent singularities, typically in the Y-functions. We have enough evidence, however, to believe that the main discontinuity properties of the Y-, T-, Q-functions are not sensible to these potential subtleties.
Also, the reader should understand that a state-by-state comparison with TBA is impossible and in principle impractical because the TBA equations are not even written explicitly for an arbitrary state. Even for the known cases, these equations are only conjectured and based on the contour deformation trick [70], still unproven even for simpler sigma-models. The QSC has its own universal requirement addressing the arbitrary state -the condition of absence of poles which, for instance, can be immediately recast into the exact Bethe equations along Hasse diagram as discussed in section 4.5. Hence, as concerns arbitrary state, we believe that QSC should be thought of as a framework for multiple approaches to the AdS/CFT spectral problem. We demonstrated its viability by deriving the asymptotic Bethe equations in the large volume approximation, see section 5. The section B.1 discusses the relation Y T in (B.1). It discusses the properties of the fundamental T-system, which is equivalent to the TBA and the discontinuity relations of [9,24]. This equivalence was demonstrated in [12] for LR-symmetric case and we generalize it for arbitrary state.
The next step is to relate analytic properties of T-and Q-functions in appropriate gauges. First, section B.2 describes the direction Q → T, and shows how to construct the T-system from the fundamental Q-system. For the reader familiar with Wronskian ansatz, we emphasize right away that a bold application of this ansatz to the fundamental Q-system will not immediately reproduce the mirror T-and Y-systems. The proper course of action also requires understanding of the available symmetries and proper usage of them.
Finally, the opposite direction T → Q is discussed in section B.3, where we show how to derive the full QSC from the analytic properties of the T-functions.

B.1 Y↔ T
The equivalence between TBA equations and the Y-system with extra analyticity constraints (analytic Y-system) was successfully demonstrated in [9,24], and we will assume it as the established one. Our goal would be to translate the analyticity constraints on Y's to the language of T-functions. This exercise is however not immediate because T's are not uniquely defined objects. Indeed, the relation Y a,s = Ta,s+1Ta,s−1 Ta+1,sTa−1,s defines T's only up to the gauge transformation T a,s → g which is also a symmetry of the Hirota bilinear identities (3.4) constraining T's. An achievement of [12] was to demonstrate the existence, for the case of left-right (LR) symmetric solutions, of a special gauge T in which the analyticity of T-functions can be clearly formulated and has a natural physical interpretation. Here we will proceed in a similar way but the T-gauge will be this time extended to the case of non-LR-symmetric states, i.e we will no longer use the condition Y a,−s = Y a,s . A priori, one could expect two different "distinguished" gauges, left and right. This is actually not the case and the right and left part of the T-hook have the same special gauge, due to the property as will be shown below. The property (B.3) is true even for the case without LR-symmetry and can be immediately deduced from the TBA equations (e.g. in [71]). In later sections, (B.3) will propagate to the "quantum unimodularity" of the QSC.
Our derivation extensively uses the appendix C of [12] and in the cases when the proof goes without modification we simply refer to the corresponding place in [12]. Finally let us note that the derivation of the T-gauge can be done directly from TBA using the "telescoping" procedure [12] and the backwards compatibility from the T-gauge analyticity to the analytic Y-system and TBA is straightforward, as explained in [12]. This will prove the equivalences of TBA ↔ Y ↔ T. The T-gauge can be rightfully called "physical" as it was done in [12], however to avoid confusion with the physical kinematics we will refer to it as to the "distinguished" one 40 . In addition, we conjecture the following property: Property (regularity): T 0,0 has no poles and it has a power-like behaviour at infinity.
Although we gathered a significant evidence for the regularity of T 0,0 , we could not complete a proof of the absence of poles for a generic state. It is quite clear that the regularity is directly linked to the exact Bethe equations, see section 4.5. In this appendix, we will only use the regularity to prove the following 38 See comments on the notations in the rest of this subsection. 39 The sign in equation (B.4b) differs from the sign in [12], but this corresponds to the irrelevant ambiguity in the choice of a sign in the definition F ≡ T 0,0 . 40 We did not have enough of evidence in [12] to call this kinematics as physical, instead it was called "magic". In this work we got a convincing demonstration of it by deriving the asymptotic Bethe ansatz. Statement (uniqueness): If T 0,0 satisfies the regularity conjecture, the distinguished gauge is unique up to an overall normalization 41 and up to an overall functional rescaling where Λ is some constant.
Notations: In this section, all functions without explicit hat are defined in the mirror kinematics (long cuts) because the original Y-system equations are valid only there. In particular, the reality properties are defined in the mirror kinematics. Only the functions with explicit hat, likeT and T, are defined in the physical kinematics (short cuts). In agreement with section 2.1, the analytic continuation between mirror and physical is done slightly above the real axis. The notation f ∈ A n means that the function f (u) has no cuts for −n/2 < Im (u) < n/2. One says, with some abuse of terminology, that f is analytic in this domain, although it might have poles there. If we want to emphasize in addition that f has no poles, we say that f is regular. The notation Z s denotes the support of a short Zhukovsky cut at [−2g + is/2, +2g + is/2], and the notationŽ s denotes the support of long Zhukovsky cut at In (B.4a), the relation T + 0,0 = T − 0,0 means that T 0,0 is i-periodic in the mirror kinematics. It appears that T 0,0 has only double zeroes, therefore F = T 0,0 does not produce new branch points. Moreover, F is also real. By analyzing the T-system at weak coupling one concludes that but not F + = −F − as it could have happened in principle when taking square root. Throughout this appendix, we will refer to the domain a ≥ |s| as to the "upper band" (see figure 9), and similarly the domain s ≥ a (resp s ≤ −a) will be called the right band (resp the left band) of the T-hook.
In (B.4a), we use an additional object denoted as T c a,s : we define T c a,s ≡ T a,s if a ≥ |s|, whereas elsewhere T c a,s is defined as the analytic continuation of T a,s in a from a ≥ |s| to negative a at fixed u 42 . Note that T c a,s does not coincide with the actual T-function T a,s of the T-hook for a < |s|. One should also clearly distinguish two different cases: notation T c means that u is fixed with |Re (u)| < 2g when analytically continuing in a, while notationT c means that u is fixed with |Re (u)| > 2g. Generically, T c andT c are not related by any analytic continuation in u. For instance,T c 0,±1 = 0 according to Z 4 symmetry, but T c 0,±1 = 0. In the same way, one defines T cr a,s as the analytic continuation in s from the right band of the T-hook, so that T cr a,s = T a,s for s ≥ a. Similarly, T c l a,s is the analytic continuation in s from the left band, so that T cr a,s = T a,s for s ≤ −a. For instance, generically all three functions T 2,0 , T cr 2,0 , T c l 2,0 41 We call "overall normalization" a redefinition of normalization of the T-functions which leaves the Hirota equation trivially invariant. An example is the transformation Ta,s const × (−1) a+s Ta,s. 42 One way to define an analytic continuation from integer values of the parameter a is through the Wronskian solution, i.e. using the second line of (B.27) disregarding a ≥ |s| constraint. The Wronskian solution operates with such objects as Q [a] = Q(u + i a 2 ), so it explicitly depends on a in a continuous way. It is also possible to define this analytic continuation without reference to Q-functions: as a solution of the Hirota equation in the su(4) band {(a, s)|a ∈ Z, s ∈ [−4, 4] ∪ Z}, see Fig. 7 in [12]. To be fully accurate, Hirota equation is not sufficient to uniquely defineT c −2,±1 becauseT c 0,±1 = 0. So we should restrict the Z 4 symmetry relationT c a,s = (−1) sTc −a,s to the cases of T a,±2 , T 0,s , T ±1,s , T ±2,0 . This restriction, however, does not weaken our constraints, they still fully determine the T-gauge [12]. are different. And again, one should distinguish the cases T c andT c . The Z 4 symmetry in (B.4c) is realized forT cr andT c l .

B.1.2 Proof of uniqueness of the distinguished gauge
The proof is given for the sake of completeness. It does not contain insights needed to understand the fundamental Q-system. The reader may skip it if he or she understands the statements in (B.4) and (B.5).
Group-theoretical constraints plus analyticity. The departing point is to ensure that there exists a gauge T with real T's having a proper analyticity strips in the upper band. The most straightforward way to prove its existence is to use a gauge freedom and fix T a,±2 = 1 for a ≥ 2 and Ta,s+1Ta,s−1 separately for each given value of a using analyticity and reality of Y-functions, as was done in [24]. The analyticity strips and reality of Y-functions are obvious from the TBA equations.
For any analytic gauge T , the discontinuity relation (1.7) of [9] is reduced to the statement that is analytic in the upper half-plane, see appendix C.2 of [12]. Already at this stage it is crucial to use (B.3), so that B is the same for the right and the left part of the T-hook.
Consider now an arbitrary gauge transformation which preserves reality: We would also like to preserve analyticity, so we restrict ourselves to transformations such that f − 1 and f − 2 are analytic in the upper half-plane. Firstly, we constrain the product f 1 and f 2 by the requirement: This requirement implies that, from (B.7), (B.8) and Y a,s = Ta,s+1Ta,s−1 Ta+1,sTa−1,s , we have and, by taking complex conjugation and using reality of T's and Y's, One immediate consequence is Secondly, let us constrain the ratio of f 1 and f 2 by imposing Such constraint is possible to satisfy. Indeed, one has to solve (f1/f2) − is analytic in the upper half-plane and its complex conjugate is analytic in the lower half-plane. Any real function can be decomposed as a product of two complex-conjugated functions analytic in the upper and lower half-planes, respectively, so this equation always has a solution.
We therefore can always find f 1 and f 2 such that T-gauge is real, having proper analyticity strips in the upper band (a ≥ |s|) and satisfying T 0,1 = T 0,−1 , T + 0,0 = T − 0,0 . Using the Hirota equation at the boundary T + 0,s T − 0,s = T 0,s+1 T 0,s−1 and (B.11), (B.12), one concludes then that From (B.10) we can now conclude This derivation almost coincides with the construction of a gauge solvable by Wronskian ansatz [11,35]. Two things are added: first, an extra property Y 1,1 Y 2,2 = Y 1,−1 Y 2,−2 was needed to derive F + = F − of (B.14), which is not necessarily true for an arbitrary T-system. Second, we managed to preserve the analyticity strips and the reality of T-functions while constructing this gauge.
Z 4 symmetry of the right/left bands. Consider only the right band (s ≥ a) for a moment. In the same way as above, one can show the existence of a gauge T where the T-functions are real and have proper analyticity strips in the right band (s ≥ a). In any such gauge the conditionT cr 1,0 = 0 is satisfied and its derivation from TBA is explained in appendix C.1 of [12].
To demonstrate the full Z 4 symmetry of (B.4c), one should show that it is possible to perform a gauge transformation from the gauge T to a new gauge T − → 43 that preserves reality and analyticity, but also ensures T − → 0,s = 1 andT − → The gauge transformation which we use to define the gauge T − → has to preserve the reality, hence it has to be of the form with g 1 and g 2 analytic above real axis. On the lower boundary, one has T 0,s = 1. Hence we impose g 1 g ++ 2 = 1 to also have T − → 0,s = 1 . To proceed further, we write the Z 4 condition which we wish to achieve: Similarly to (B.13), (B.17) has a solution giving us the product g 1 g 2 . By knowing g 1 g 2 and g 1 g ++ 2 we restore g 1 and g 2 . Hence we can always find a T − → -gauge which has all the Z 4 properties and the proper analyticity in the right band.
We do the same procedure in the left band (s ≤ −a) and construct a T ← − -gauge there. A priory, the gauges T − → and T ← − constructed for the right and the left bands are different. But below we will show that one can choose the unique T-gauge for both bands. This will be possible due to a freedom remaining in the choice of g's.
Relation between T-and T-gauges First, we will show that the gauge T a,s = (−1) a s Ta,s (F [a+s] ) 2−a has proper analyticity strips in both right and left bands. For this we use the following analyticity condition coming from the discontinuity condition (F.5) of [9] (see appendix C.2 of [12]): is analytic in the upper half-plane. (B.18) By using the first equality in (B.10a) and Y 2,2 = T2,1 T1,2 we conclude that also is analytic in the upper half-plane. The gauge transformation between T-s and T − → -s is of the form (B.16) because we know that both gauges are real, but g 1 and g 2 might not have nice analytic properties. Now we put restrictions on g-s. First, since T 0,s = T − → 0,s = 1, one gets g 1 g ++ 2 = 1 . Then, since both T 2,s = T 2,s = T s,2 and T − → 2,s belong to the class A s−1 , the ratio g is analytic in the upper half-plane. Finally, from analyticity of D in the upper half-plane one gets analyticity of in the upper half-plane. Hence is analytic in the upper half-plane. Therefore, since we conclude that T 1,s has proper analyticity strips in the right band. By repeating the same argument with the gauge T ← − , we conclude that T 1,s has proper analyticity strips in the left band as well. Now we have to show thatT cr 1,−1 = −T 1,+1 (respT 1,−1 = −T c l 1,+1 ), which will finally mean that T is indeed a Z 4 -symmetric gauge for the right (resp left) band. For this it is enough to show thatT 1,1 andT 1,−1 have only two cuts,Ẑ ±1 , because then we can use the logic of appendix C.4 in [12] which proves both the Z 4 -symmetry of T in the upper band and the Z 4 symmetry of T-s in the right and left bands. To this end, we use the fact that the discontinuity condition (1.6) of [9] is equivalent to the statement that the productT has only two cutsẐ ±1 (this is obtained by straightforward generalization of the logic in C.3 of [12] for non LR-symmetric cases).
We can forceT 1,1 andT 1,−1 to separately have only two cuts. For this we notice that the so far derived group-theoretical constraints on the T-gauge (B.4a) do not not constrain fully the gauge freedom but the following gauge transformation is still possible To also preserve reality and analyticity, φ should be a mirror-real function with only one long cutŽ 0 . We can use this function to change T 1,1 : Hence, to enforceT 1,1 to have only two short cuts, we require that Then φ is a function with one mirror cut which is a solution of the Riemann-Hilbert problem Note thatê is magic-real by construction, hence φ will be mirror-real, as it should. Finally note that the solution of (B.26) is fixed up to a term δφ = Λ log x which is responsible for the remaining functional rescaling symmetry (B.5). Hence, by adjusting φ, we can forceT 1,1 to have only two cuts, and then, due to (B.21),T 1,−1 has only two cuts. Now by repeating the logic of C.4 in [12] we conclude that all the properties of the T-gauge listed in the statement are satisfied even if there is no LR symmetry.
Uniqueness. The proof of uniqueness is already contained in the derivation above, we need only to summarize it. By demanding the group-theoretical constraints we fixed all but one gauge freedom. The remaining one (B.22) is determined by the function φ which should preserve analyticity in the mirror kinematics and also analyticity in the physical kinematics (which exists in the right and left bands due to Z 4 symmetry). The only transformation preserving these analyticities is (B.5). Note that in the LR-symmetric case we demand T a,s = T a,−s and even the transformation (B.5) is forbidden.
Finally, there is always a gauge freedom in multiplication by an i-periodic function. But such a function should not have branch points to preserve analyticity and, due to conjecture of regularity, it should also preserve the condition of absence of poles and of a polynomial behaviour at infinity. Hence it should be a constant.
The presented proof is a constructive one. It shows us how to build the T-gauge starting from any analytic gauges T and T r , T l in the corresponding bands. This construction was practically used in the derivation of the FiNLIE [12] for LR-symmetric states. The generalization presented here allows, in principle, to repeat the logic of [12] and to derive the FiNLIE for arbitrary state, departing from the proper T -and T -gauges that are suitably parameterized in terms of resolvents.

.1 Wronskian parameterization
The Hirota bilinear relations (3.4) are an infinite system of equations for an infinite set of functions T a,s . This system appears to be integrable and the net result of this integrability is that T-functions can be expressed from determinants of a finite set of Q-functions. This is the so-called Wronskian parameterization. For the AdS/CFT case, it was written in [11] and is constructed as follows: consider gl(4|4) Q-functions satisfying algebraic relations from section 4.1.1. We demand Q ∅|∅ = 1 but we impose no restrictions on Q∅ for the moment. Let us split bosonic indices {1, 2, 3, 4} into two sets: the "right" set {1, 2}, its elements to be labeled by α, and the "left" set {3, 4}, its elements to be labeled byα. T-functions that are expressed as automatically satisfy Hirota equations [11,34,35]. The Wronskain parameterization constructs T-functions in a gauge with T n,±2 = T 2,±n , n ≥ 2 and T 0,s = f [−s] . Any solution of Hirota equation can be brought to a gauge of this type, construction of the T-gauge is a good example. Moreover, it is possible to show that any "smooth enough" solution in this gauge class has a Wronskian parameterization.
The goal of this section is to depart from the fundamental Q-system and to construct the Qfunctions that reproduce, through the Wronskian parameterization, all the above-described analytic properties of the T-gauge and hence the T-gauge itself, due to its uniqueness property. We stress that the fundamental Q-system may not be boldly substituted into (B.27) for achieving this goal, but it will become clear very soon what is the correct procedure.

B.2.2 Mirror Q-system
Splitting of bosonic indices between two sets (right and left) in (B.27) brakes the GL(4) symmetry (4.17) of bosonic H-rotations to GL(2) ⊗ GL (2). It is certainly important which bosonic Q's will be called Q 1|∅ and Q 2|∅ and which will be called Q 3|∅ , Q 4|∅ : for instance the analyticity strips of the T-functions will follow from the analyticity of Q 1|∅ and Q 2|∅ in the upper half-plane (because these Q-functions appear with a positive shift in (B.27)) and from the analyticity of Q 3|∅ and Q 4|∅ in the lower half-plane. Hence, we have to choose a proper basis in the Q-system (the Q-basis) prior to constructing the Wronskian solution.
The AdS/CFT Y-system is defined in the mirror kinematics (long cuts), hence the Q-functions that solve it should obey QQ-relations in the mirror kinematics. On the other hand, we have the fundamental Q-system from section 4.2 at our disposal, with QQ-relations defined in the upper halfplane. Hence we continue these QQ-relations to the mirror kinematics from the upper half-plane and restrict ourselves to this kinematics. Now we can do H-rotations from the fundamental Q-system, keeping in mind that the rotations should be i-periodic in the mirror kinematics and due to the possible cuts they might be not periodic in the physical kinematics. We pose the following question: How to lift the ambiguity in choosing of the Q-basis and fix the right one, by the appropriate mirror H-rotations, so as to reproduce the T-gauge?
This correct Q-basis will be called mirror and denoted by the bold font Q, to reflect that it should reproduce the mirror T-system in the distinguished gauge T. For the fermionic Q's, there is no subtlety in choosing the mirror Q-basis because the whole construction is invariant under H-rotations of fermions. It is particularly nice to keep the fundamental Q ∅|i as the basis functions since they already have simple analyticity in the mirror kinematics. Hence we just choose Q ∅|i = Q ∅|i and also use simplified notations Q i ≡ Q ∅|i which explains our notation choice for Q's in the Qω-system.
For bosonic Q's, we will use the notations Qǎ ≡ Q a|∅ . We recall that the mirror T-functions have certain analyticity strips according to (B.4a), and hence, for the right band, Q1, Q2 are expected to be analytic in the upper half-plane. Clearly, they should be identified with P's. But how to choose among possible P's? There is one distinguished choice: P 1 and P 2 are smaller in magnitude than P 3 , P 4 at large u, see section 3.2.3, and in this sense they are defined unambiguously. So we will identify Similarly, for the left band, Q3, Q4 are expected to be analytic in the lower half-plane. On the other hand, they should be a certain mirror H-rotation of P a 's. This hints us to use P a 's to define Q3, Q4 because they can be considered as LHPA objects obtained from UHPA P a 's through a rotation with H = µ, see section 4.2.3. P 3 , P 4 are the two smallest functions among P's with upper indices and in this sense they are also unique. Hence we will identify: the sign choice is for further convenience. Equation (B.29) is written as follows for Im (u) > 0: Q3 =P 4 = µ 4a P a , Q4 = −P 3 = −µ 3a P a , so, in summary, the desired mirror H-transformation from the fundamental to the mirror Q-system is where the check on top of P's reminds us that in this particular formula P's are considered in the mirror kinematics and are defined by analytic continuation from the upper half-plane where they are free from cuts.
More generally, the functions Q A|I and Q A|I are related by the transformation (4.17) where H f = 1 and where H b is the matrix of equation (B.30). This matrix has the determinant µ 2 12 , hence , we recover, by comparing with (B.14), F = µ + 12 . Since Q∅ = 1, one cannot treat Hodge-dual Q-functions defined by (4.13) on the equal footing with the original functions. However, we can improve situation by adjusting the definition of Hodge-dual to the case Q∅ = 1: One should update correspondingly the normalization in (4.14a) and (4.15) but the other properties of the Q-system remain the same.
In this way one has again Q ∅|∅ = 1 and Hodge-duality remains indeed the symmetry of the system. In particular, one can deduce that, in full analogy with the lower-index formulae, Q i = Q ∅|i and which can be rewritten also as We can now write down T-functions more explicitly, with the help of Hodge-dual Q's: It is straightforward to check that T-functions constructed from the mirror Q-system satisfy all the properties of the distinguished T-gauge. Indeed, analyticity is immediate from the half-plane analyticities of the Q-functions. Reality comes from conjugation properties of Q's given in section 4.4.2. Absence of poles and power-like asymptotics is a property of fundamental Q's, hence of mirror Q's, and hence of T's. Finally, for Z 4 symmetry it is enough to demonstrate it for T-functions, as the Z 4 symmetry for the T-functions follows from it [12]. Since F = µ + 12 , we can write down which is nothing but (3.8) and which is explicitly Z 4 -symmetric.
To conclude, we demonstrated how to reconstruct the T-functions in the T-gauge from the fundamental Q-system. A non-trivial step was to first perform the H-rotation in the mirror kinematics so as to map fundamental Q's to the mirror Q's. It is crucial to apply the Wronskian ansatz to the latter ones but not to the fundamental Q's. Hence the procedure can be summarized as the Q → Q → T mappings.

B.3 T → Q → Q
In this section we derive the fundamental Q-system from the distinguished T-gauge. The overall logic is the opposite to the previous section, i.e. we will first derive the properties of the mirror Q-basis and then explain how one could "guess" the existence of the fundamental basis. In this section, the properties of neither mirror nor fundamental Q-system are assumed to be known. Note that decoding analyticity of Q-functions from T's is a daunting task as opposed to the Q → T direction. It will take us quite an effort to perform it.
First we note that since T 0,s = Q and, on the other hand, one has (B.14), we should identify Q∅ = F 2 . Therefore, it is advantageous to normalize Hodge-dual functions as in (B.32). Then the Wronskian parameterization (B.38) only flips left and right wings of the T-hook when exchanging Q-functions with their Hodge duals. Hence, Hodge-dual objects should enter in a symmetric way in the whole construction.
Let us remind that the T-gauge is fully constrained, up to a minor (B.5). However, Q-functions of the Wronskian parameterization are not firmly fixed by the choice of the gauge. One can still perform H-rotations. Our first step is to find, by performing H-rotations, a Q-basis with as simple as possible analytic properties of Q's solving the Hirota equations. In performing this step, we will heavily use the results of [12], in particular of appendix D there, and generalize it to the non LR symmetric case. However, some conceptually new findings will be presented as well.

B.3.1 Analyticity of Q-functions in the mirror basis
Most of the basic analytic structure can be read off from [12]. Indeed, the Wronskian solution was already studied in detail in that paper, but separately for the left/right and the upper bands of the Thook solvable by gl(2)and gl(4)-symmetric Wronskian ansätze, correspondingly. In the distinguished gauge these solutions are allowed to be glued together into (B.38) since both conditions T 2,±n = T n,±2 and T 0,s = T [−s] 0,0 are satisfied. So at this point we just have to compare the notations of [12] and of the current paper.
One cut for bosonic Q's. It was proved in [12] that one can always find a Q-basis, by means of H-rotation, which solves the right and left bands in the following way 44,45 .  And we arrive to the following essential conclusions. Firstly,Qǐ and Qǐ have only one short cut, see figure 10. We should not forget that Q's without hat are functions in the mirror kinematics. They are analytic only in a half-plane but connected to the physical kinematics with one-cut structure by the continuation from a natural domain of analyticity. Both properties do not follow solely from the Wronskian solution but essentially rely on Z 4 symmetry.
One cut for fermonic Q's. In [12], the upper band was solved with the help of Q-functions q and p: The multi-indexed q's and p's are expressed as combination of q i , p i and q ∅ , p ∅ as follows and the same for p. The relations (B.44) are nothing but the determinant QQ-relation (4.5a) adjusted to the case Q ∅ = 1.
In contradistinction toQ-functions having one cut only, q i and p i are only analytic in a halfplane, both in the physical and mirror kinematics. One can even show that a better than half-plane analyticity would render Y-system trivial [12]. The precise statement is: we can only achieve the following domains of analyticity by choosing a proper basis via certain H-rotation: • q ∅ and q 1234 are analytic (have no cuts) for Im (u) > 1/2, q i and q ijk are analytic for Im (u) > 0, q ij are analytic for Im (u) > −1/2, • p ∅ and p 1234 are analytic for Im (u) < −1/2, p i and p ijk are analytic for Im (u) < 0, p ij are analytic for Im (u) < 1/2, these properties are depicted in figure 11. The proof is based on the TQ-relations and it is given in appendix D.6 of [12]. For non LRsymmetric case the proof requires slight generalization which is however obvious and we leave it as an exercise for a curious reader.
Note the following nontrivial property: from the determinant expression (B.44) for q ijk , one would naively expect that q ijk has "less analyticity" than q i , because q is analytic only for Im (u) > 1 whereas q i is analytic for Im (u) > 0. However, a certain cancellation of cuts happens and eventually q ijk and q i have the same analyticity half-plane: Im u > 0. This a direct consequence of the T-gauge being the same for the left and right parts of the T-hook. Here we see that the most analytic Q-basis is also universal, there is no separately "left" and "right" most analytic bases. It will be eventually crucial in the derivation of the quantum spectral curve.
At this point we should ask: why the analyticity of the upper band of the T-hook is "worse" than the one from the right/left bands? The answer is impressively simple but at the same time it was not understood before: because qand p-functions are composite objects! We have to just compare (B.43) and (B.27) (or equivalently (B.38e)-(B.38g)) to conclude Figure 11. Domains of analyticity of various Q-functions. White region is the place where a function is analytic. Above each figure we denoted corresponding p's and q's in the notations of [12]. Below each figure we denoted some of Q's in the mirror basis with the same analyticity. Dotted line addresses Q's only. It denotes the mirror cut which is possible in principle if only algebraic QQ-relations are used. However, with the help of Z4 symmetry we show that this cut is actually absent.
We know that for instance Q 12|I is derivable from the basic one-indexed Q-functions Q i|∅ and Q ∅|i . The properties of the bosonic Q i|∅ were identified above, and they are simple. So our next goal is to dig up the properties of Q ∅|i . Will they be simple as well?
To approach the answer, we will use QQ-relations (4.1) to systematically reduce the number of indices, as outlined in figure 12. Our first step is to compute the Q-functions with two indices, for {a, b} = {1, 2}. Analytic properties of Qfunctions in the r.h.s. of (B.46) were already identified. Using them, we deduce that Q a|i is analytic in the upper half-plane for Im u > 1/2. But analyticity seems to be even better than that! A determinant of Q a|i , has a bigger analyticity domain, Im u > −1/2. Can it be that the upper cut of Q a|i is absent, i.e. that Q a|i is analytic for Im u > −1/2, exactly like the combination Q 12|ij ? The answer is positive, however the reason is more sophisticated than an extra analyticity of (B.47).
The proof is given below. It is technical and can be harmlessly skipped by the reader.
and similarly we compute as requested. Since the denominator in f ai is analytic on the real axis, we have actually shown that So, if the discontinuity of any non-trivial linear combination of Q + a|i is 0, so will be the discontinuity of all Q + a|i . Let us consider the following combination 46 34|jkl . (B.52) The fact that C is non-trivial for the purpose of computing discontinuity is confirmed by the property disc (C) = T 1,2 T 2,1 , so that disc (C) = 0 is only possible if disc (Q + 1|1 ) = 0. Rewrite now C in terms of T-and Y-functions and show that it has no cut on the real axis. Slightly above real axis, we get Here we used the explicit Wronskian parameterization (B.38), the relation Y 2,2 = T2,1 T1,2 , and relation (B.4b) between T-s and T-s. 46 The idea of constructing C is to supplement Q a|i with additional Q-functions having enough indices to contract them with Levi-Civita symbols. In this way we ensure that C is easily related to T-functions for which we know the analytic properties in detail. The supplementary (shifted) Q-functions should be analytic on the real axis since we want to prove analyticity of Q + a|i there. Then we tinker with several variations of this construction until we find C that produces the desired proof.

Now we compute
where we used that T 2,1 is analytic on the real axis and thatỸ 2,2 = Y −1 1,1 . The combination on the r.h.s. is equal to 1, because the second term, known as the magic ratio, is the inverse of the first term [12]. Hence disc C = 0 which proves that disc Q + a|i = 0.
In the proof above we did use the extra analyticity of the combination (B.47) but also we heavily used Z 4 symmetry.
Our output is that Q 1|i and Q 2|i are analytic for Im (u) > −1/2 and similarly one can show that Q 3|i and Q 4|i are analytic for Im (u) < 1/2, see figure 11.
We can continue with further reduction of the number of indices. The next and the final step is to write down If a = 1 or 2, we conclude that Q i is analytic for Im (u) > 0. But taking a = 3 and 4 implies that Q i is analytic Im (u) < 0. So Q i is analytic everywhere except on the real axis where, being a function in the mirror kinematics, it can have only the long mirror cut! Exactly the same chain of arguments applies for Q i . Indeed, we can solve the T-hook by Hodgedual objects exactly in the same manner as we did with the lower-index ones. Both solutions are algebraically equivalent. What is the most important, we do not need to change the Q-basis to engineer Hodge-dual Q-functions with the maximal possible analyticity. The mirror basis is universal! For the left and right bands it is obvious, see (B.41). For the upper band the observation follows from simultaneous analyticity of q ijk and q i for Im (u) > 0 (and p ijk and p i for Im (u) < 0), the non-triviality of this property was discussed shortly after (B.44). Qi and Q i have only one long cut. Now we can formulate the main conclusion of this subsection: Q ∅|i and Q ∅|i have only one long cut, see figure 13, so the mystery of "less analyticity" of the upper band is resolved. We see a very nice interplay in comparison with bosonicQ's which have only one short cut. An interesting question is why one has short cuts in the one case and long cuts in the other. Apparently, this cut structure is intimately connected to the representation theory as is discussed in appendix C.2.2.

B.3.2 Qω-system
A sharp reader might have noticed that the analogy between bosons and fermions is not complete. Apart from having a simple cut structure, we know from (B.42) that bosonic Q's are related to one another through the physical kinematics. We can also rephrase (B.42) for the functions in the mirror kinematics:Qǎ = η ab Qb . (B.56) Is there an analog of (B.56) for fermions? The answer was almost given in [12] as we explain below, however it should be decoded for the case of one-indexed Q's. As we now understand, this decoding is likely to simplify the formulae. From the Z 4 propertyT c 0,1 = 0 and (B.43) it followsq i = αp [2] i + βp i + γp , where the coefficients α, β, γ are some functions of the spectral parameter which are the same for all i ∈ {1, 2, 3, 4}. Equivalently, fromT c 0,−1 = 0, we see thatp i = α q [2] i + β q i + γ q . By constructing certain determinants, similarly to how it was done in equations (D.2) of [12], we can identify all the coefficients α, . . . , γ with T-functions, so that the linear dependence between shifted q i and p i reads explicitly in a Baxter-like form:q iT c 1,−2 +p iT2,−1 =p These relations are written in the physical kinematics. We should recall the following useful relation before proceeding 47 Should the p-term be absent in (B.57b), it would be the standard Baxter equation, a functional equation of the second order. For such equations we know that the following Wronskian combination of any two solutions q i and q j is i-periodic: 1 Fq ij , where we used relations summarized after (B.58).
Should the q-term be absent in (B.57a), it would be another standard Baxter equation, with the Wronskian i-periodic combination 1 Fp ij . When both equations (B.57) are considered in the full generality, the following Wronskian-type combination 48 49 turns out to be periodic in the physical kinematics. By default, ω is considered as a function in the physical kinematics, hence we do not write an explicit hat on top of it. There are 4 linearly independent solutions to (B.57), hence ω is a 4 × 4 antisymmetric matrix. Existence of periodic ω is a result of [12]. We have only generalized it to the non LR symmetric case. The proof of periodicity is rather standard. In the expression below we substitute q [2] and p [2] with the linear combinations dictated by (B.57), and several cancellations occur. We explicitly show 47 It is derived as follows. Since T a,2 = T 2,a for a ≥ 2, T 2,s = T 2,s =T  48 We shifted the definition of ω by i/2 and flipped its sign in comparison with [12]. 49 In the case of LR symmetry another i-periodic combination χ is possible, see section 4.4.3. only the cancellation coming fromT c 1,±2 terms: where on the last two steps we used (B.58) and T 1,±1 = F T 1,±1 . Now we rewrite ω in terms of Q's: In this form it is especially simple to demonstrate that Pf(ω) = 1: The last equality implies the following one ω ij ≡ (ω −1 ) ij = − 1 2 ijkl ω kl . ω is known to relateq's andp's in the physical kinematics [12], which in our new interpretation means for certain functions that it relatesQ and Hodge-dual Q in the mirror, precisely in the spirit of (B.56)! It is the simplest to demonstrate the statement for Q a|j . Consider the following relations where we used (B.34). It is tempting to transfer (B.63) to the mirror kinematics. The answer depends for which value of the spectral parameter we will write it. Consider α ∈ {1, 2}, then slightly below real axis one has where we used the analyticity structure of Q α|j , see figure 11. To proceed further, one can write the difference of the two equations in (B.64) and use the defining QQ relation Q + α|i − Q − α|i = QαQ i : for the current value of α and the spectral parameter it reads Q + α|i −Q − α|i =QαQ i . The bosonic Qα will conveniently cancel out due to (B.56) and we get This is precisely like (B.56), except for the restriction u ∈ R − i 0. But, in fact, this restriction is not needed, and the analogy is complete. Indeed, one should considerα ∈ {3, 4} and perform a similar analysis to getQ as desired.
At this point, the reader may wonder how (B.65a) and (B.65b) can simultaneously hold. (B.65a) tells us thatQ i =ω ij Q j for u ∈ R + i 0, because ω is the function in the physical kinematics as opposed to Q's. Hence the only possibility for (B.65b) to hold is (ω ij −ω ij )Q j = 0. Let us check whether this is indeed so by computing disc ω ij . To this end, introduceω, the function in the mirror kinematics, and note that slightly above the real axis: the first one is just the definition of connection of mirror and physical kinematics, the second one should be clear from the diagram The jump of ω across the cut is computed as follows Hence we see that and since Q i Q i = 0 (QQ relation (4.16)) andQ i Q i = 0 (follows from e.g. (B.65a)), we conclude that indeed (ω ij −ω ij )Q j = 0. By now we actually derived all the properties of the Qω system (3.57). ω appears here with one more interesting interpretation -as a Wronskian of certain Baxter-type equations, and this is how ω was first discovered historically.

B.3.3 Deeper look into analytic structure.
We will now make the final step prior to building the fundamental Q-system. In the previous sections we stressed several times that considering either Q's or their Hodge-duals are two equivalent ways to solve the T-hook. Even more than that, taking Hodge-dual does not require adjusting the mirror Q-basis by some H-rotations. All Q-functions have their best analyticity in the very same basis. It imposes further interesting constraints on the Q-functions beyond their natural domains of analyticity. The archetypal example is the relation The l.h.s. is a determinant object from functions analytic in the upper half-plane, hence it is also analytic there, and more precisely for Im (u) > 1. By contrast, the analyticity of the r.h.s. is far from being trivial. Indeed, explicitly (B.70) The last column is not analytic in the upper half-plane as neither Q3 nor F are analytic there. But, since the full determinant is analytic, the discontinuity of the last column should be a linear combination of the first two columns: where δ-s are some functions of the spectral parameter. By induction, δ ij (n) do not depend on n.
Another interesting example is the second orthogonality condition in (B.34) which can be written as Let us show that γ's also do not depend on n, by taking the difference of (B.73) at two adjacent values of n: Each of the square brackets should vanish separately because their multipliers depend on i which can be arbitrary. First, we conclude that γ is indeed independent of n. And second, by recalling (B.71) we see that actually γ = δ.
To our surprise, we instantaneously get control on the all semi-infinite ladder of cuts of the Qfunctions. Indeed, the discontinuity at the leading cut is determined by (B.56), and all the rest are known if δ is known! It will be very interesting indeed to find explicitly δ's. To compute say δ 41 , we multiply (B.73) at n = 1 by (Q 2|j ) + (and antisymmetrize over i ↔ j) and get (B.75) Since Q + 2|j is analytic on the real axis, one has disc Q + 23|ij = , therefore ( disc Q + 23|ij )Q iQj = 0, so we can perform a projection: , one can compute the discontinuity 50 of F + : Using Z 4 symmetry in the form (B.56), we get disc (Q1Q1) = − disc (Q1Q2). For the future relations, it will be also useful to derive disc F + departing from Q 3|i Q 3|i = −F. In summary, we find On the other hand, Q + 12|ij Q iQj = disc (Q1Q2) = − disc F + and Q + 23|ij Q iQj = disc (Q 2Q3 ) = disc (Q1Q4). Therefore Independence of δ of n allows us to restate (B.71) in a very appealing form where Ω is a mirror i-periodic function defined by its discontinuity 51 , and where A 4 is a function analytic in the upper half-plane for Im (u) > 0. Clearly, the same type of reasoning can be applied for all Qǎ and Qǎ. The general statement is the following: given the mirror i-periodic functions Ω ab = −Ω ba defined by their discontinuities disc Ω ab = disc (QǎQb) so that Ω 12 = −Ω 34 = 1/F + , and Ω ab ≡ η ac η bd Ω cd 52 , the following combinations are analytic in a half-plane. Explicitly, A 1 , A 2 , A 3 and A 4 are analytic in the lower half-plane, whereas A 3 , A 4 , A 1 and A 2 are analytic in the upper half-plane. And correspondingly, by considering (B.73) we see that 50 To get the second line of (B.77), we use the relation Q1 = Q i (Q 1|i ) ± obtained from (4.14b). This equation is not affected by the normalization (B.32), unlike equation (4.14a) which had to be modified to (B.33). 51 The ambiguity of defining Ω by its discontinuity amounts in adding Q1 and Q2 to A 4 and does not spoil its analyticity. 52 Note that in this case, Ω cd = Ω −1 cd , by contrast with the definition of upper indices for other matrices. However, the antisymmetry of the matrix Ω ensures Ω ab Ω bd = Pf(Ω)δa d .
are analytic in half-planes precisely where, correspondingly, Q a|i and Q a|i are analytic.
Finally, let us computeÃ then. Because of (B.81),Ω ab Qb = Ω ab Qb, thereforẽ which is an absolute equivalent of (B.56) showing thatÂ a = −η abÂ b , hence A-s have only one cut! Hence A is the full analog of bosonic Q. It is tempting to write down A a = ±Qǎ but we checked on explicit example that this is not the case. Hence A presents an extra hidden structure of the Q-system.

B.3.4 Fundamental Q-system
Fermionic one-indexed Q-functions have only one cut in the mirror kinematics. If they are continued through the long cut, the result is controlled by the physical i-periodic matrix ω:Q i = ω ij Q j . Bosonic one-indexed Q-functions have only one cut in the physical kinematics. In this kinematics they obey the relationQǎ = η abQb with explicitly known constant matrix, so there are actually 8/2 = 4 bosonic Qfunctions, a half of the number of fermionic ones. AmongÂ a andÂ a there are also only 4 independent functions, so in fact an ensemble ofÂ a 's andQǎ's is a proper counterpart of fermionic Q a .
The properties of fermions and bosons are not fully symmetric because the QQ-relations are consistently defined only in the mirror kinematics, as dictated by the T-hook, thus treating bosons and fermions differently. To reach the full symmetry, it would be ideal to have a Q-system which is equally good in mirror and physical kinematics. And in fact this is possible. All our single-index functions are analytic in a half-plane, and we can define the QQ-relations in either upper or lower half-plane. To achieve this goal, we have to rotate the bosonic functions. For the choice of the upper half-plane, the rotated basisP a = H a b Q b is explicitly given by and for the Hodge-dual quantities one has Check over P-s reminds us that equations are written in the mirror kinematics. All P-s are equal to such bosonic Q's or A's that they are analytic in the upper half-plane, and from there they are continued to physical kinematics where they have only one cut. The convention is that P-s without check are defined in the physical kinematics: P ≡P.
In general, the above-defined matrix H rotates the full mirror Q-basis to a new Q-basis which we call fundamental: in particular P a = Q a|∅ and Q i = Q ∅|i = Q ∅|i . We can check that definitions (B.86) and P a ≡ Q a|∅ produce the transform (B.85b), so H is indeed a consistently defined H-transformation. It remains to assure that all Q's are analytic in the upper half-plane as intended. For single-indexed Q's this is so by construction. We should check only Q a|i , the analyticity of other Q-functions follows automatically through determinant QQ-relations. For α = {1, 2} one has Q α|i = Q α|i which is known to be analytic. Then we use Q 3|i = A 4 | i and Q 4|i = −A 3 | i and recall analyticity of the corresponding A's discussed in the previous subsection. Therefore we conclude that all Q a|i are analytic in the upper half-plane, for Im (u) > −1/2.
Quite remarkably, we achieve as well Q∅ = 1 in the fundamental basis, since det H = F −2 . Though it was implicit, the property Ω 12 = −Ω 34 was used which follow from (B.78) and originally from (B.3).
From monodromies of Q-s and A-s, it is now easy to compute the monodromies of P-s: From these definitions of µ it follows that Pf(µ) = 1 and then µ ab = (µ −1 ) ab = − 1 2 abcd µ cd . Finally, we compute disc µ. The easiest way to do it is to notice that from (B.87) it follows that disc (µ) ∝ P ∧P. The coefficient of proportionality is restored from disc (µ 12 ) = disc (F − ) = disc (Q 1 Q 2 ) = disc (P 1 P 2 ) and similarly disc (µ 34 ) = − disc (P 3 P 4 ) . So finally disc (µ ij ) = disc (P i P j ) disc (µ ij ) = − disc (P i P j ) . (B.88) The properties (B.87) and (B.88), together with periodicity of µ is precisely the Pµ system. The orthogonality P i P i = 0 is just a QQ-relation. Therefore, we accomplished derivation of the fundamental Q-system and its main subsystems: Pµ and Qω and hence gave a total account of the path T → Q → Q.

B.4 Conclusions
In this appendix we demonstrated that analytic structures of the analytic Y-system and the quantum spectral curve follow from one another, and in this sense the two systems are equivalent.
The first milestone of establishing the equivalence was to realize that there exist the unique gauge T and the unique mirror Q-basis, despite the absence of LR symmetry. We showed that one-indexed Q i|∅ ,Q i|∅ have only one short cut while one-indexed Q ∅|i , Q ∅|i have only one long cut. The periodic matrix ω naturally appeared as a Wronskian of certain Baxter-type relations.
The second milestone was to recognize that it is possible to rotate the mirror Q-basis so as to make all Q-functions analytic in the upper half-plane. The possibility of this rotation is due to the hidden analyticity which was decoded from the universality of the mirror Q-basis. At this point the reader can recognize an ad-hoc ansatz (3.22) as the rotation (B.85a).
Our choice of the upper half-plane was random. It is of course possible to choose the lower halfplane and the corresponding H-rotation instead. Two choices are related by a certain H-rotation, and it is simple to deduce from section B.3.4 that this rotation is defined by µ! Another way to relate upper and lower half-plane choices is to use ω as a fermionic H-rotation through the physical kinematics. This is a subject of section 4.2.3.
Apart of analytic structure we should also relate reality, regularity, and asymptotics at infinity of two systems. The question of reality was clarified: conjugation properties were traced for the relations Y ↔ T and Q → T in this appendix, whereas the direction T → Q is presented in section 4.4.2.
As was mentioned, we cannot fully derive the regularity of the quantum spectral curve from TBA, nevertheless we assume it based on a solid evidence from a handful of explicit examples. We discuss a link of regularity to the exact Bethe equations in section 4.5. Finally, asymptotics at infinity is tightly related to the global charges, hence this aspect of the TBA ↔ QSC relation will be discussed in the next appendix devoted to the QSC from the point of view of the representation theory. For the ABA-diagram diagram, the weights with respect to bosonic subalgebra are shown: when acting on the highest weight, the generators of u(4)'s Cartan subalgebra, E22, E33, E66, E77, have the eigenvalues respectively λ1, λ2, λ3, λ4, whereas the generators of u(2, 2)'s Cartan subalgebra, E11, E44, E55, E88, have the eigenvalues respectively ν1, ν2, ν3, ν4.
figure 14 54 . For the ABA-diagram case, the asymptotic Bethe equations can be written in terms of rational (apart from the dressing phase) functions of Zhukovsky variables [23]. With discovery of QSC, one can in principle write Bethe equations, exact and asymptotic, for other choices of p-gradings, see section 4.5. However, these equations are not written in terms of rational functions and hence seem to be of less significance, at least for as what concerns the large volume regime. Any unitary representations of any real form of gl(n|m)-type superalgebras are of a highest-weight type 55 , and precisely these representations should be addressed by the quantum spectral curve. The highest weight |Ω is defined by condition E ij |Ω = 0 for i < j.
There are two common ways to parameterize a highest weight representation of psu(2, 2|4). The first one is by a set of 7 Dynkin labels which are the eigenvalues of h i 's on the |Ω . For the beauty diagram, they are denoted as [q 1 , ω − , r 1 , r 2 , r 3 , ω + , q 3 ] with ω ± corresponding to p-odd roots. Because of the zero charge constraint, which reads there are only 6 independent parameters. The second way explicitly operates with 6 parameters: 3 Dynkin labels [r 1 , r 2 , r 3 ] of the su(4) subalgebra together with 3 Dynkin labels [q 1 , q 2 , q 3 ] of the su(2, 2), defined with respect to the highest weight of the supermultiplet. One has q 2 = ω − − ω + − r 1 − r 2 − r 3 . We also commonly use λ's and ν's which are defined by Due to the zero charge condition one should request whereas the overall shift λ → λ+Λ, ν → ν −Λ is physically inessential. We will see that it corresponds to a residual gauge symmetry of the quantum spectral curve (C.24). The Lorenz spins s 1 , s 2 of su(2, 2) are nothing but s 1 = q 1 /2 and s 2 = q 3 /2. The conformal dimension ∆ and L, the angular momentum on S 5 interpreted as the spin chain's length at weak coupling, are given by ∆ = −(q 2 + 1 2 (q 1 + q 3 )) , L = r 2 + 1 2 (r 1 + r 3 ) . (C.8) The other charges of so(2, 4) su(2, 2) and so(6) su(4) are given by so that L = J 1 . For convenience of the reader, we summarize various transition formulae

C.1.2 Long multiplets (typical representations)
As demonstrated above, the same super-algebra admits different choices of a Kac-Dynkin-Vogan diagram. The weights of a representation do depend on this choice. In particular, su(4) and su(2, 2) charges do depend on this choice. Indeed, a supermultiplet is a collection of several bosonic multiplets. Depending on the choice of the Kac-Dynkin-Vogan diagram, the highest weight vector changes and it may become a part of a different bosonic multiplet, hence the weights λ and ν will change by an integer amount.
The proper invariant objects are the so called shifted weights which we denote byλ andν. Already in the purely bosonic case, they play a significant role, in particular Casimirs of the representation are symmetric polynomials in them [77]. A similar statement holds also for the supersymmetric case, but only for the case of long multiplets [78]: the Casimirs of a typical representation are supersymmetric polynomials inλ andν.
Long multiplets are characterized by a property that for any vector |v of the representation module and for any p-odd generator E ij either E ij |v or E * ij |v is non-zero. In this case, ordinary weights transform according to the rule λ ν λ+1 ν-1 (C. 12) when changing from one Kac-Dynkin-Vogan diagram to another 56 .
Relation (C.12) shows us how the shifted weight is defined. Roughly,λ = λ+horizontal displacement from the square's diagonal in figure 14 andν = ν+vertical displacement from the square's diagonal in figure 14.
The unitarity constraint for long multiplets is the easiest to formulate in terms of Dynkin labels for the beauty diagram. It states that q 1 , q 3 , r 1 , r 2 , r 3 are non-negative integers satisfying the inequalities ω − < −1 − q 1 , ω + > +1 + q 3 .
(C.15) When the equality is reached in (C.15), the long multiplet becomes reducible containing short multiplets as its irreducible part. This should happen only at zero 't Hooft coupling when all charges, including the eigenvalue ∆ of the dilatation operator become integers. We can rewrite these unitarity constraints as the constraints on bosonic Dynkin labels and with respect to ABA-diagram: all Dynkin labels except q 2 are integers satisfying q 1 ≥ 2 q 3 ≥ 2 , r 1 ≥ 0, r 2 ≥ 2 , r 3 ≥ 0 , ABA − diagram (C. 16) while generically non-integer q 2 satisfies The last one looks as follows in terms of so(2, 4) and so(6) charges ∆ ≥ L + J 2 + S 1 + |J 3 − S 2 | . ABA − diagram (C. 18) We provide the data for the important case of sl(2) sector. In ABA-diagram description it is characterized by S 2 = J 2 = J 3 = 0 and S 1 = S is then just the Lorentz spin. One immediately gets from (C.16) that L ≥ 2 and S ≥ 2. The case when the equalities are reached corresponds to Konishi operator Tr Z D 2 Z. The most nontrivial unitarity constraint (C.17) is written as ∆ > L + S, and the equality is reached at zero coupling when ∆ becomes an integer engineering dimension. It is a matter of simple algebra to formulate the unitarity constraints in terms of invariant shifted weights:λ andν 1 −ν 4 +λ 1 −λ 4 + |λ 1 +λ 4 +ν 1 +ν 4 | ≤ 0 . ↔ν 1 +λ 1 ≤ 0,ν 4 +λ 4 ≥ 0 .
(C. 21) Recall also that the zero charge condition (C.7) should be respected.

C.1.3 Short multiplets (atypical representations)
Short multiplets are realized when one or more of the following conditions hold: ω − = −1 − q 1 , ω − = q 1 = 0, ω + = 1 + q 2 , ω + = q 3 = 0. We remind that shifted weights are not invariant objects in this case since the transformation rule (C.12) generically does not hold. The only atypical representation realized in planar N = 4 SYM's spin chains at finite coupling is the 1/2 BPS multiplet generated from the BMN vacuum Tr Z L . It can be considered as a state in the sl(2) sector with S = 0 with protected conformal dimension ∆ = L. The corresponding QSC solution was found in [18] and it appears to be a degenerate one, for instance P i = P i = 0. The solution has also other nonstandard features, in particular µ 24 has no longer a polynomial asymptotics. This is related to the need to analytically continue from unitarity region for S ≥ 2 to an isolated point S = 0 through non-integer values of S.
All other short multiplets exist only at zero coupling. At finite coupling they combine into long multiplets and become non-protected ones. This phenomenon is captured by the Beisert-Staudacher equations [23] and hence by the quantum spectral curve, since the former is derived from the latter in section 5.

C.2 Unitarity constraints from analyticity of QSC
The information about the representation of a particular physical state is encoded in the large u asymptotic of the quantum spectral curve in the upper half-plane (3.64). In this appendix we use notationsλ a ≡M a , andν i ≡ −M i , so that (3.64) reads: P a A a u −λa , Qî B i u −νi−1 , P a A a uλ a −1 , Q i B i uν i , u → ±∞ + i 0 .
(C. 22) After the discussion in section C.1.3, it is not surprising now that the asymptotics is given in terms of the invariant quantities -shifted weights. Relation (C.22) is derived in section 5.4. It is one of the main goals of this appendix to provide the necessary technical background for section 5.4. Relation (C.22) is also in the full agreement with the quasi-classical approximation discussed in section 6. We can use (C.22) to impose unitarity restrictions (C. 19),(C.20) and (C.21) on the possible solutions of the QSC. However, we can also consider a different approach. Suppose that we do not know about connection to representation theory but try to answer the question what generic restrictions can be imposed on the asymptotics of Q-functions solely from the analytic structure of QSC. We will answer this question below, derive in this way (C. 19),(C.20), (C.21) and hence demonstrate that analyticity of QSC naturally encodes the unitarity constraints. While the quantization conditions (C. 19),(C.20) will be demonstrated from scratch, for (C.21) we will need certain bits of information from the large volume approximation and then use the continuity argument.
Therefore, our departing assumption is that we know all the properties of QSC but we do not know the physical interpretation of its large-u asymptotics. For this asymptotics, we will only assume that it is power-like. One additional assumption is that no P's coincide and no Q's coincide.
The first thing to do, is to use invariance of the fundamental Q-system with respect to H-rotations to choose a convenient basis for P's and Q's . If one wants to preserve analyticity in the upper half-plane, the H-matrices can be only constants. By performing constant H-transformations we can always achieve that no pair of P-functions scale with the same power at infinity and the same for Q-functions. We parameterize the asymptotic behaviour in such a basis by (C.22), whereλ's andν's, following the logic of this section, are just some numbers. It is also our free choice to prescribe the ordering of magnitudes ofλ's andν's, and we make a choice as in (4.44) which we repeat here for clarity:λ 1 >λ 2 >λ 3 >λ 4 andν 3 >ν 4 >ν 1 >ν 2 .
(C. 23) In the following we will work only in such a basis.

C.2.1 Unimodularity and projectivity
Unimodularity and projectivity are firmly encoded in the fundamental Q-system. The Hodge-symmetry is possible in principle only when Q∅ is at least periodic, the property which has an interpretation of quantum unimodularity [12]. Since Q∅ should be free of cuts in the upper half-plane and of poles, it can be only a constant which we normalize to Q∅ = 1. The latter equality and Q∅ = det 1≤i,j≤4 Q i|j force us to have 4 n=1 (λ n +ν n ) = 0 which is the zero charge constraint, i.e. the projectivity (p of psu(2, 2|4)) is respected. Projectivity of the representation manifests itself also in the following way. The gauge transformation (4.12) is a symmetry of the quantum spectral curve. If one wants to respect the analyticity of the latter, this symmetry is however significantly constrained. It reduces to a one-parameter family of x-rescalings: which translates into redefinitionsλ a →λ a + Λ,ν i →ν i − Λ. Since these shifts by Λ originate from the symmetry of QSC, they should not affect physical quantities, in complete agreement with (C.6) and (C.7). Note that (C.24) reads on the level of T-functions as (B.5). Figure 15. Left: Monodromy of P around u = ∞ should be trivial because P has only one cut. Right: Monodromy of Q around u = ∞ is not trivial because in the set up when Q's have short cuts, there are infinitely many of them. However, Q1/Q2 and Q3/Q4 are more regular at u → −i∞ than one would naively expect, so eventually the mondromy of these combinations is also trivial.

C.2.2 Quantization of charges
The first, rather straightforward, observation is that P's have only one cut, hence they should have trivial monodromy around infinity, and hence theλ's in (C.22) should be integer 57 , see figure 15. Hence, in the ordering prescription (C.23), we immediately get the unitarity constraint (C.19)! Quantization ofλ's reflects the compactness of su(4) algebra which is an R-symmetry of N = 4 SYM.
Unlike this simple observation about quantization of asymptotics of P's, we should generically expect for Q's that their asymptotics is not quantized. Indeed, they have only a long cut on the distinguished sheet, and the analytic continuation around infinity necessarily crosses it. As the number of branch points is infinite on the other Riemann sheets, see figure 15, we should generically expect a non-trivial monodromy and hence the absence of charge quantization. On the one hand, it is fully acceptable, and even plausible, because the asymptotic of Q's should reflect, after all, the representation of non-compact conformal symmetry algebra su(2, 2), in particular it should contain a non-integer conformal dimension. More than that: unlike the rational spin chains where Hamiltonian commutes with the symmetry algebra, the very fact that the AdS/CFT integrability includes energy as one of the symmetry charges imposes on us to consider Q-functions with infinitely many branch points.
On the other hand, the two other AdS charges, S 1 and S 2 are expected to be quantized. We will indeed confirm now this quantization from analyticity of QSC.
Consider the quantity Q 1 /Q 2 and consider its analytic continuation around a clockwise contour of very large radius, starting from Im (u) > 0 domain, see figure 15. First, when we cross the real line from above for u > 0, we should apply analytic continuation formula:Q 1 /Q 2 = (ω 1j Q j )/(ω 2j Q j ) and, since our contour is very far from the origin, we can use the magnitude ordering (4.44) and approximate this ratio by −(ω 12 Q 2 )/(ω 12 Q 1 ) or simply by −Q 2 /Q 1 . We see that ω ij cancelled out from this ratio in the large-u approximation which works in particular for u → −i∞. Hence, whilẽ Q i has a semi-infinite ladder of cuts in the lower half-plane, these cuts are suppressed asymptotically in the combinationQ 1 /Q 2 . Hence, we can proceed with our analytic continuation through negative 57 Sometimes it is convenient to use x-rescalings (C.24) to impose λ a = ν i = 0, for instance this is the choice for the LR symmetric case, cf. [15]. In this normalization λ's can become fractional for certain states but their difference is still integer. imaginary axis and then up to negative real axis. Finally, when crossing the negative real axis, we recover back Q 1 /Q 2 using the analytic continuation formula.
In conclusion, the leading term in large u expansion of Q 1 /Q 2 has a trivial monodromy, hencê ν 1 −ν 2 should be integer. By applying the same argument to Q 3 /Q 4 we show thatν 3 −ν 4 is also integer. Then, using the ordering of magnitudes (C.23), we recover the expected quantization (C.20).
The same logic cannot be applied to the ratio Q 2 /Q 3 . Indeed,Q 2 /Q 3 = (ω 2j Q j )/(ω 3j Q j ) ω 12 /ω 13 for u → −i∞, hence the infinite ladder of cuts is not suppressed and the monodromy is not expected to be trivial. As we discussed above, this is a healthy sign becauseq 2 =ν 2 −ν 3 is directly related to ∆ and should not be integer.
At weak coupling, the discussion of section 5 is expected to be applicable. One of the results of this discussion is (5.32) which reads Q a|α Q a|α f + , where Q a|α is a polynomial of u and f is a function which has the large-u asymptotics u γ/2 with γ = N k=1 The asymptotics of Q a|α reads Q a|α ∝ u −(λa+να) , hence the smallest among Q a|α at large u is Q 1|1 . If Q 1|1 is a non-trivial polynomial (not constant) then one concludes thatλ 1 +ν 1 < 0 at sufficiently small coupling. If Q 1|1 is a constant then the sign ofλ 1 +ν 1 will be the opposite to the sign of γ.
In this case, we should rely on an explicit Bethe ansatz solution to determine the sign of γ and we expect, though cannot prove in full generality, that γ > 0 and henceλ 1 +ν 1 < 0. At least this is so in the sl(2) sector and other cases when all the Bethe roots are real. By the same reasoning one getŝ λ 4 +ν 4 > 0.
Hence we reproduced the inequalities (C.21), at least for many interesting states described asymptotically by real Bethe roots and for any states for which Q 1|1 and Q 4|4 are non-trivial polynomials.
Hence we showed that all unitarity constraints follow from analytic properties of the QSC, inequality (C.21) is obtained however with certain assumptions. In the derivation, we did not used any reference to representation theory of psu(2, 2|4). We of course used that the Q-system is of gl(4|4) type, but neither real form of gl(4|4) was specified nor any Verma module was introduced. Besides using the parts of this result in deriving asymptotics of Q-functions, we can think about it as another strong justification for the overall viability of the QSC approach.

C.3 Proof of exact ∆-dependence of asymptotics of Q-functions
In TBA, the energy E = ∆ − J 1 is given by the expression where a = a + 2ig , see for instance [6]. In [12], section 3.7, it was shown that the energy defines the asymptotic behaviour of the Y 11 Y 22 . Indeed, the latter product satisfies the TBA equation 2πi Z a * log(1 + Y a,0 ) , (C. 26) where the only thing we need to know about Z a is that the large u expansion of (C.26) results in log Y 11 Y 22 ∼ i E u with E given precisely by (C.25). It is a standard assumption that for considering various excited states one should perform the contour deformation trick, in particular the driving term in (C.25) can be included into the integral if one deforms the contour of integration to surround points u j on a Riemann sheet where Y a,0 (u j ) = −1. It is also a common prescription to choose the same contour of integration both in (C. 25 µ12 , and therefore it is clear that E is the same quantity both in TBA and QSC, independently of the physical state in question.