T-system on T-hook: Grassmannian Solution and Twisted Quantum Spectral Curve

We propose an efficient grassmannian formalism for solution of bi-linear finite-difference Hirota equation (T-system) on T-shaped lattices related to the space of highest weight representations of $gl(K_1,K_2|M)$ superalgebra. The formalism is inspired by the quantum fusion procedure known from the integrable spin chains and is based on exterior forms of Baxter-like Q-functions. We find a few new interesting relations among the exterior forms of Q-functions and reproduce, using our new formalism, the Wronskian determinant solutions of Hirota equations known in the literature. Then we generalize this construction to the twisted Q-functions and demonstrate the subtleties of untwisting procedure on the examples of rational quantum spin chains with twisted boundary conditions. Using these observations, we generalize the recently discovered, in our paper with N. Gromov, AdS/CFT Quantum Spectral Curve for exact planar spectrum of AdS/CFT duality to the case of arbitrary Cartan twisting of AdS$_5\times$S$^5$ string sigma model. Finally, we successfully probe this formalism by reproducing the energy of gamma-twisted BMN vacuum at single-wrapping orders of weak coupling expansion.

Abstract: We propose an efficient grassmannian formalism for solution of bi-linear finite-difference Hirota equation (T-system) on T-shaped lattices related to the space of highest weight representations of gl(K 1 , K 2 M ) superalgebra. The formalism is inspired by the quantum fusion procedure known from the integrable spin chains and is based on exterior forms of Baxter-like Q-functions. We find a few new interesting relations among the exterior forms of Q-functions and reproduce, using our new formalism, the Wronskian determinant solutions of Hirota equations known in the literature. Then we generalize this construction to the twisted Q-functions and demonstrate the subtleties of untwisting procedure on the examples of rational quantum spin chains with twisted boundary conditions. Using these observations, we generalize the recently discovered, in our paper with N. Gromov, AdS/CFT Quantum Spectral Curve for exact planar spectrum of AdS/CFT duality to the case of arbitrary Cartan twisting of AdS 5 ×S 5 string sigma model. Finally, we successfully probe this formalism by reproducing the energy of gammatwisted BMN vacuum at single-wrapping orders of weak coupling expansion.

Introduction
In 1931, Hans Bethe analysed the very first example of a quantum integrable model -Heisenberg SU(2) XXX spin chain -and showed that it can be reduced to algebraic equations which now bear his name [1]. The roots of these equations, called Bethe roots, enter the observable quantities only through their symmetric combinations. This is one of many reasons to work with the Baxter Q-polynomial -a polynomial with zeros at Bethe roots, Q(u) = ∏ L k=1 (u − u k ). Later, several different techniques have been developed to determine Q(u). For instance, instead of the Bethe equations one can use the Baxter equation and search for such solutions that Q(u) and T (u) are both polynomials. Another reformulation of the same problem is to demand the Wronskian identity to be satisfied. Indeed, it is easy to show that for any two solutions Q 1 (u), Q 2 (u) of the Baxter equation the Wronskian combination W is an i-periodic function. We can further normalize the solutions so as to put W = 1, resulting in (1.2). Then it is enough to demand that both Q 1 and Q 2 solving (1.2) are polynomials to get solutions equivalent to the polynomial solutions of (1.1). On this example we see that there are actually two Q-functions appearing.
The Wronskian condition (1.2) can be interpreted in a natural geometric way. Consider Multiplication by Q (1) defines an embedding of the complex line C into C 2 with image V (1) ≡ {λ Q (1) λ ∈ C} ⊂ C 2 . This image can be characterized as the set of points x satisfying 1 Q (1) ∧ x = 0. In this context, Q i play the role of Plücker coordinates. The Wronskian condition can be written as First, it implies that the lines V (1) (u + i 2 ) and V (1) (u − i 2 ) are not collinear. Second, we demand that the embedding is polynomial (i.e. realised by Plücker coordinates being polynomial functions of u) and, as a consequence, φ(u) in (1.4) is a polynomial which we denote as φ(u) = ∏ L k=1 (u − θ k ). We are ready to establish the following map: to each polynomial embedding V 1 (u), such that V 1 (u+ i 2 )∩V 1 (u− i 2 ) = {0} should correspond an eigenstate of the SU(2) XXX spin chain Figure 1. Q-functions define a fibration of grassmannians over the Riemann surface of the spectral parameter u. Relation between grassmannians of different rank is restricted by (1.5).
of length L in the fundamental representation with inhomogeneities θ 1 , θ 2 , . . . , θ L . The correspondence is established after factoring out elementary symmetry transformations, as it will be described in the text.
In this way, we reformulated the solution of XXX spin chain in a geometric fashion. This point of view can be generalised to integrable systems with a higher rank symmetry algebras of gl type as follows. Denote by V (n) an n-dimensional linear subspace of C N , i.e. a point in the Grassmannian G n N . V (n) (u) is a function of the spectral parameter u. Consider a collection V (0) (u) , V (1) (u) , . . . , V (N ) (u) of all possible subspaces and demand the property V (n) (u + i 2) ∩ V (n) (u − i 2) = V (n−1) (u) , ∀n ∈ {1, 2, . . . , N − 1} (1.5) to hold for any u save a discrete number of points, see Fig. 1. We will advocate in this article that solving equation (1.5) supplemented with appropriate analytic constraints is equivalent to finding the spectrum of certain integrable models. For the case of compact rational spin chains equation (1.5) is an analog of fusion procedure and the analytic constraints are reduced to the demand that Q-functions, which are defined as Plücker coordinates for V (n) , are polynomials in u. However, this example is not unique. Equation (1.5) appears to be generic and applies to many quantum integrable systems, including (1+1)-dimensional QFT's, with gl(N ) symmetry or gl(k N − k) super-symmetry, or even for non-compact (super)algebras su(K 1 , K 2 M ). It is closely related to the fact that the transfer-matrices and their eigenvalues, such as the T-function of eq.(1.1), satisfy the so-called Hirota bi-linear finite-difference equation (2.1) which, as we will see later, can be solved in terms of Wronskian expressions through a finite number of Q-functions. The Q-functions are not obliged to be polynomials, as it is the case in integrable non-compact spin chains and (1+1)-dimensional QFT's. Moreover, there are situations when an approach similar to the coordinate or algebraic Bethe ansatz is not known, and yet the equation (1.5) holds.
Moreover, the equation (1.5) is also central to the spectral problem of integrable twodimensional quantum field theories, and in particular sigma-models. It even allows for a concise and efficient description for exact spectrum of energies (anomalous dimensions) of AdS 5 CF T 4 duality. It is because the quantum spectral curve (QSC) of the model, describing the dynamics of quantum conservation laws, is most adequately formulated in terms of the Q-system based on equation (1.5) and related to psu(2, 2 4) superconformal symmetry algebra [2,3].
Since (1.5) is such a generic equation expected to appear in virtually all quantum integrable models its properties deserve to be studied in detail, which is one of the main goals of this paper.
One should always bear in mind that Q-functions is a way to introduce a coordinate system, hence they are not defined uniquely. For instance, we can replace Q 2 → Q 2 + const Q 1 without any consequence for the Wronskian condition (1.2), and the possible linear transformations are not exhausted by this example. In addition, the overall rescaling of all Q-functions by any function of u does not affect the embeddings V (n) . In section 2 we will construct the T-functions as determinants of Q-functions; T (u) in the Baxter equation (1.1) is one of them: T (u)ζ 1 ∧ζ 2 = Q (1) (u+i)∧Q (1) (u−i). T-functions should be thought as certain volume elements in C N , i.e. they are represented by a full form. They are invariant under rotation of the basis but still transform under rescalings. The fully invariant objects are Y-functions which are certain ratios of T-functions. Although the description in terms of Y's is a more invariant way to parameterise the system, the description in terms of V n (u) has an important advantage since usually the analytic properties of Q-functions, directly related to T-and Y-functions by Wronskian solutions, are significantly simpler than the ones of T's or Y's.
In this article we discuss the following applications of the proposed approach. In section 2.6 we show how the Hirota equation (T-system) for integrable systems with gl(N ) type of symmetry is solved in terms of Q-functions and also discuss how the Wronskian-type formulation (1.5) is related to higher-rank Baxter equations. This is a quite well established topic in the literature, in particular its geometric interpretation can be easily spotted from discussion in [4]. We include it into the paper as a simple example which contains the guiding lines useful for the further generalizations to supergroups and noncompact representations.
Then, in section 2.8, we generalise the gl(N ) solution and show how to get from our formalism the generic Wronskian solution of Hirota equation with the boundary conditions of the "T-hook" type, describing the weight space of highest weight non-compact representations appearing in integrable models with su(K 1 , K 2 M ) symmetry. Note that the T-hook itself was first proposed as a formulation of AdS 5 /CFT 4 Y-system [5] with superconformal psu(2, 2 4) symmetry. The generic symmetry algebra su(K 1 , K 2 M ) also includes two interesting particular cases: the compact supersymmetric algebra su(K M ) and the non-compact one su(K 1 , K 2 ), the latter should be relevant for Toda-like systems. We emphasize here a remarkable fact that the supersymmetric generalization still relies on the same equation (1.5), with N = K 1 + K 2 + M . However, a convenient way to properly treat it is to choose a subspace C M in C N and work with Q-functions in specially re-labeled Figure 2. Deformation of the fibration by introducing a connection. This connection "rotates" the spaces V (n) via the parallel transport from point u ± i 2 to point u where the equation (1.5) can be used.
Grassmannian coordinates obtained by a Hodge-duality transformation in C M .
The Wronskian solution of Hirota equations on "T-hook" was given for the most interesting case of psu(2, 2 4) symmetry by Gromov, two of the authors, and Tsuboi in [6], and then it was presented for the generic case in the work of Tsuboi [7]. We believe that the formalism of exterior forms developed here presents these results in a much more concise and geometrically transparent way. We also establish several interesting new relations among the Q-functions, especially elegantly written in terms of the exterior forms. Some of them have been extensively used in the study of the Q-system emerging in AdS/CFT integrability case [2,3].
In section 3 we discuss how the construction can be amended to include the case of integrable spin chains with twisted boundary conditions. It happens in a very natural way: One should gauge the global rotational GL(N ) symmetry w.r.t. the space of spectral parameter, making it local and hence introducing a new object: a holomorphic connection A. The non-local relation (1.5) is modified by inserting a parallel transport P exp ∫ of the plane V (n) (u − i 2), so that the intersection in (1.5) naturally happens at the same point (see fig. 2). This parallel transport precisely realizes the twisting.
The new properties emerging in the twisted case are thoroughly studied, mainly on the examples of rational spin chains. Especial attention is paid to the untwisting limit which is singular and quite non-trivial. In particular, we give a detailed description how relation between the asymptotics at infinity and the representation theory depends on the presence or absence of particular twists.
The Wronskian solution of Hirota equation (2.1) in the case of super-conformal algebra su(2, 2 4) and the grassmannian structure of the underlying Q-system have played an important role in the discovery of the most advanced version of equations for the exact spectrum of anomalous dimensions in planar N = 4 SYM theory -the quantum spectral curve (QSC) [2,3]. In fact, many of the relations discussed and re-derived in the present paper in terms of the very efficient formalism of exterior forms have been already present in [3] in the coordinate form. As an interesting generalization of the QSC, we will present in section 4 its twisted version, in the presence of all (3+3) angles describing the gamma deformation and a non-commutativity deformation of the original N = 4 SYM theory [8][9][10]. The corresponding P − µ and Q − ω equations of [2,3], as well as all Plücker QQ-relations, will be essentially unchanged and the whole difference with the untwisted case will reside in the large u asymptotics of Q-functions with respect to the spectral parameter u, which are modified due to the presence of twists by certain exponential factors. This is the only change in the analytic properties of QSC due to the twisting. The algebraic part of the twisted QSC formulation will be simply a particular (2 4 2) case of the twisted version of the general (K 1 M K 2 ) Q-system presented in this paper.
Finally, in section 5 we probe our conjectures for twisted QSC on an interesting case of γ-deformed BMN vacuum of this AdS/CFT duality. For a particular case, β-deformation, the Y-system and T-system for the twisted case were formulated and tested in [11,12] (see also [13,14] at the level of the S-matrix). We reproduce by our method the one-wrapping terms in the energy of this state, known by direct solution of TBA equations [15,16], which was also known by the direct perturbation theory computation [17]. A potential advantage of our method is the possibility to find the next corrections to this state on a regular basis, by the methods similar to [18,19] as well as application of the efficient numerical procedure of [20], but this is beyond the scope of the current paper.

Algebraic properties of Q-system and solution of Hirota equations
In this section we show how the Q-system is used to solve Hirota equations on (K 1 M K 2 ) T-hooks. We also establish notations and algebraic properties of the Q-system. Although this solution was already presented in the literature [7], we take a look on it from a different, more geometric point of view, and we believe it will be a useful contribution to the subject as the technicality of the involved formulae is significantly reduced and the solution itself is made more transparent.

Hirota equation in historical perspective
The bi-linear discrete Hirota equation, sometimes also called the Hirota-Miwa equation [21][22][23] T a,s (u + i 2 )T a,s (u − i 2 ) = T a+1,s (u)T a−1,s (u) + T a,s+1 (u)T a,s−1 (u) (2.1) appears in numerous quantum and classical integrable systems. In these notations, typically used in the context of quantum integrable spin chains and sigma-models, T a,s (u) are complex-valued functions of two integer indices a and s parameterising a Z 2 lattice, and of a parameter u ∈ C usually called spectral parameter. Although the parameter u enters the equation only with discrete shifts and hence can be treated as another discrete variable, the analytic dependence of T a,s on u is an important piece of information used to specify the physical model. We will exploit this analytic dependence starting from section 3.
In integrable quantum spin chains with gl(N ) symmetry, T a,s appears to be the transfer matrix in the representation s a , with the a × s rectangular Young diagram, as shown in   fig.(a), of width N on infinite representational (a, s)-lattice. The vertices within this strip are in one-to-one correspondence with rectangular Young tableux of size a × s, as depicted on fig.(b), as well as with corresponding characters or T-functions. Fig. 3(b), while u plays the role of the spectral parameter. Equation (2.1) describes the fusion procedure among these transfer-matrices [4,[24][25][26][27]. The statement generalises to supersymmetric case [28][29][30][31] and, with a particular modification of (2.1), to other semisimple Lie algebras, see [4,23,26,27] and the references therein. In integrable 2d CFT's at finite size or finite temperature, and in particular in 2d sigma-models, this Hirota equation first appeared in relation to quantum KdV [32] and more recently it was successfully used for the finite size analysis, including excited states, for the SU(N ) × SU(N ) principal chiral field (PCF) and some related models [33,34]. It was also proposed as a version of the AdS/CFT Y-system [35] appearing in the spectral problem of the planar N = 4 SYM theory and it was successfully exploited there for extracting many non-trivial results at arbitrary strength of the 't Hooft coupling and in various physically interesting limits [36]. The finite-difference Hirota equation (2.1) is also related in different way to the classical integrability, besides the standard classical limit ̵ h → 0 of the original quantum system. It can be obtained from the canonical Hirota equation for τ -function of classical integrable hierarchies of PDE's by introduction of discrete Miwa variables [22]. And in particular, a generating series of transfer-matrices of gl(N ) quantum Heisenberg spin chains can be interpreted as a τ -function of the mKP hierarchy [37].
As was shown in the past, Hirota equation admits general and exact solutions for specific boundary conditions on the Z 2 lattice. In particular, if one demands T a<0,s = 0 then all T-functions can be expressed explicitly in terms of T 0,s and T 1,s by T a,s (u) = det 1≤i,j≤a which is a particular case of the Cherednik-Bazhanov-Reshetikhin (CBR) determinant [30,34,38,39] formulae. This determinant relation is a generic solution of the Hirota equation in the sense it can be proven recursively in a assuming T a≥0,s ≠ 0; if T a,s = 0 for some positive a then (2.2) may be violated, however in practice this affects only T's which do  Table 1. Expression of the GL(N ) characters and their generalization to T-functions. Representations are labeled by Young diagrams λ = (λ 1 , λ 2 , . . . , λ λ ), and λ ′ denotes λ 1 . Characters χ λ (g) are written in terms of the eigenvalues (x 1 , x 2 , . . . , x N ) of a group element g. The CBR formula and Wronskian expression of T-functions are written in this table under specific gauge constraint. In other gauges they hold up to division by T (0) or Q ∅ , cf. (2.2) and (2.36), the normalisation is clarified in section 2.6.1.
not have an explicit physical interpretation, and we choose to define these T's such that (2.2) holds.
If we impose a more severe restriction on T's and demand them to be non-zero only in the black nodes of Fig. 3(a) (i.e. for s = 0 or a ≥ 0 or s > 0, N ≥ a ≥ 0) then we get the Hirota equation appearing in integrable models with gl(N ) symmetry and related to the compact representations of the latter. For such boundaries, we can recognise in CBR determinants a quantum generalisation of standard Gambelli-Jacobi-Trudi formulae for characters of gl(N ) irreps. The analog of (2.2) looks especially simple where G = {x 1 , . . . , x N } is a Cartan subgroup element. This character satisfies the simplified Hirota equation 2 χ a,s (G)χ a,s (G) = χ a+s,s (G)χ a−1,s (G) + χ a,s+1 (G)χ a,s−1 (G) ; (2.4) it can be derived directly from (2.5) due to the Jacobi relation for determinants (see e.g. the appendix of [30]). In the case of characters, we know that there exists a more explicit, Weyl formula expressing the character as a determinant involving the Cartan elements: It is sometimes called the Q-system in the mathematical literature. We will avoid this in order ot to confuse it with the Baxter's Q-functions Q I (u) which we use all over the paper. We rather call the collection of these Q-functions as the Q-system.  It is clear that it should be possible to generalize the Weyl formula from characters to T-functions. Such a quantum generalization was known since quite a while [4] in terms of the Wronskian-type determinant: It gives, up to rescaling of T-functions, the general solution of Hirota equation for a halfstrip boundary conditions of fig. 3 in terms of N independent Q-functions Q 1 (u), . . . , Q N (u). More precisely, it applies for the semi-infinite rectangular domain s ≥ 0, N ≥ a ≥ 0; the rest of non-zero T-functions, corresponding to the black nodes of fig. 3, a = 0, s < 0 and s = 0, a > N are easily restored 3 . The parallels between character formulae and T-functions (or, when meaningful, transfer matrices) extend beyond the rectangular representations s a , the equivalent formulae for arbitrary finite-dimensional representations of gl(N ) algebra are summarised in table 1.
The Gambelli-Jacobi-Trudi-type formulae (2.3) and their quantum counterpart (2.2) remain unchanged if one generalises the symmetry to the case of superalgebras of gl (or rather sl) type, including the non-compact cases. They are used, however, under different boundary conditions outlined in figure 4.
The super-analogues of Weyl-type formulae are not obtained by a straightforward generalisation, yet they are also known. For the compact case su(K M ) the determinant expressions for characters were established in [40]. In the non-compact case su(K 1 , K 2 M ) certain expression for characters were given in [41] and their determinant version for the case of rectangular representations 4 was elaborated in [42]. The generalization to the quantum case was first presented for finite-dimensional irreps of su(K M ) in [31], then for su(2, 2 4) in [6] (this is the most interesting case for physics as it is realised in the context of AdS/CFT integrability, see a review [36] for introduction into the subject) and finally generalized to any su(K 1 , K 2 M ) in [7]. In the case of rectangular s a irrep, the formulae of [7] give the generic (up to a gauge transformation, as explained below) Wronskian solution of Hirota equation (2.1) within the (K 1 M K 2 )-hook presented in fig. 4(b) (which was also called T-hook due to its shape). The so-called fat hook of the fig. 4(a), which we also call L-hook, is a particular case K 2 = 0 of su(K 1 , K 2 M ) corresponding to the compact representations of su(K M ).
In [7], the Weyl-type solution of Hirota equation is presented in terms of an explicit finite determinant and it summarises the whole progress achieved in this field. However, the corresponding expressions are extremely bulky which somewhat obscures their nice geometric and algebraic properties. The main aim of this section is to present a more concise and more intuitive formalism, based on the exterior forms of Baxter-type Q-functions. It will clarify the Grassmannian nature of Wronskian solutions for T-functions on supergroups and allow simple and general proofs for these formulae. We will re-derive several relations already proven in [7] in this new language and present some new useful relations.

Notations
The Wronskian solution of Hirota equation (2.1) with boundary conditions shown in figures 3(a) and 4 will be written in subsequent sections in terms of a set of Q-functions Q b 1 b 2 ... which are labeled by several indices b k and which are antisymmetric under permutations of these indices. There exist relations between the Q-functions, and there are two equivalent ways to formulate them: either as an algebraic statement -the "QQ-relations" -or as a geometric statement -in terms of the intersection property (1.5).
Algebraically, the QQ-relations read (in the non-super-symmetric case of section 2.6) [43][44][45][46][47][48] All other QQ-relations derived below ultimately follow from (2.7), hence we will pause for a while to accurately introduce the notational conventions related to (2.7) and to Q-system in general. The Q-functions are functions of the spectral parameter u. This dependence is typically assumed implicitly, and the shifts of u are denoted following the convention The indices b, c in (2.7) take value in the "bosonic" set B = {1, 2, . . . , N }. The multiindex A of the bosonic set can for instance contain one single index a ∈ B, or no index at all (it is then denoted as A = ∅), or all indices (which is denoted as A = B =∅), etc. The multi-index 2, 1 is different from the multi-index 1, 2 (one has Q 2,1 = −Q 1,2 ), and we will say that the multi-index A = a 1 a 2 . . . a n is sorted if ∀k < n, a k < a k+1 . The sum over all sorted multi-indices of length n is denoted by ∑ A =n .
There are 2 N different Q-functions corresponding to the different subsets of B. They can be arranged as a Hasse diagram forming an N-dimensional hypercube, see figure 5. Each facet of the Hasse diagram is associated with a QQ-relation: for instance the bottom facet in figure 5 is associated to the relation . Given a basis of N independent elements ζ 1 , ζ 2 , . . . , ζ N and an associative antisymmetric bilinear product "∧", we also introduce the n-form With explicit indices, (2.10) reads: We also introduce the Hodge dual ⋆ω of an arbitrary n-form ω as the linear transformation such that ⋆ζ A = AĀ ζĀ , (2.11) where b 1 b 2 ...b N is the completely antisymmetric tensor with the sign choice 12...N = 1. For instance this definition gives ⋆ζ 13 = −ζ 2,4,5,⋯,N . The Hodge-dual Q-functions are denoted using the super-script labelling: The sign convention for the completely antisymmetric tensor b 1 b 2 ...b N is also 12...N = 1. We will interchangeably use upper-and lower-indexed to emphasise the covariance in relations.
Note that the inverse Hodge-dual operation given by has certain difference in signs compared to (2.12). 5 More precisely, (2.7) gives the relation Q2Q213 = Q + 21 Q − 23 − Q − 21 Q + 23 , which is equivalent due to the antisymmetry.
Plücker identity. Throughout this text, we will frequently use Plücker identities. The simplest one is where the Hodge operation "⋆" simply transforms each product More generally, one has x i,j ζ j and y i = ∑ N j=1 y i,j ζ j are arbitrary sets of vectors.
Asymptotics. The asymptotic behavior of functions at large u will have some importance later on in this article. We will then use the notation f ≃ g to say that lim u →∞ f g = 1 and f ∼ g to say that there exists α ∈ C × such that lim

QQ-relations and flags of C N
The geometric counterpart of the algebraic relation (2.7) is the intersection condition (1.5). Our nearest goal is to justify this statement. The functions Q A with A = n should be thought as Plücker coordinates of the hyperplane V (n) ; they define V (n) as the collection of points x that satisfy Q (n) ∧ x = 0. Note that for a generic n-form ω n the condition ω ∧x = 0 does not define an n-dimensional hyperplane (for instance if ω = ζ 1 ∧ ζ 2 + ζ 3 ∧ ζ 4 , the condition is satisfied only by x = 0). However, as it will become clear in this subsection, the relation (2.7) insures that the Q A are indeed the Plücker coordinates of n-dimensional hyperplanes.
To derive (2.7) from the intersection condition (1.5) we note that the latter can be equivalently reformulated as the following union property which implies, in particular, that the sequence (N ) ≡ C N is a maximal flag of C N . The union property should hold for almost all values of the spectral parameter save a discrete set of points.
Since V (1) is a line there exists a one-form This defines Q (1) up to a normalisation, i.e. up to the transformation Q (1) where f is a C-valued function of u. Next, one can immediately see from (2.16) that We can therefore define the forms Q (n) by the relation where f n (u) is a normalisation freedom that we will have to fix. The definition (2.20) enforces the coordinates Q A to obey the relation for some function g. Note that (2.7) can be modified if one decides to use a different prescription for f n ; equation (2.21) is an invariant version of (2.7). Still, we stick to the normalisation choice of (2.7) in this paper, this is also a common choice in the literature.
Plugging the expression f n = g [+n −1] g [1−n] into (2.20) and using g − g + = f 0 ≡ Q ∅ , we finally get (2.22) or equivalently, when written in terms of coordinates, (2.23) It is easy to see that the above expression is the general solution to QQ-relation (2.7) 6 , which proves that the geometric statement (1.5) is equivalent to QQ-relation (2.7).
In what precedes, we defined the Q-system by a very simple 3-terms bilinear relation (2.7). It implies many other, in general multilinear, equations relating Q-functions. Equation (2.23) is one example of such a relation and a few other relations are given throughout the text and in appendix A.3. 6 The statement is true if there is no A such that Q A = 0. For instance, if N = 4, and Q∅ = 1,

Hodge duality map
Whereas the form Q (n) defines a plane V (n) of dimension n in C N , it can be also used to define a plane of dimension N − n in the dual space. It is easy to see that the intersection condition (1.5) and the union condition (2.16) exchange their roles in the dual space and, hence, we can devise a Q-system for the dual geometric construction which, quite naturally, is simply given by Hodge-dual Q-functions (2.12). In practice, this means that Q-functions with upper indices obey exactly the same algebraic relations as the Q-functions with lower indices. For instance, one can derive etc. Note that, technically speaking, Hodge duality is not a symmetry of a given Q-system, in the sense that it relates Q-functions with different set of indices. We can think about it as a map, a natural way to construct another collection of Q-functions obeying (2.7) -i.e. another Q-system -differing from the original one by a relabelling of the Q-functions.

Symmetry transformations on Q-systems
In this section we discuss other symmetries of the equation (2.7). Like the Hodge transformation, they map a given set of Q-functions (Q-system) to another Q-system. By contrast with the Hodge transformation, which maps the spaces V (n) to the dual space, the transformations we will consider essentially leave the spaces V (n) invariant.
We have seen that the QQ-relations is a way to rewrite the geometric intersection property in a coordinate form. But any coordinatisation is sensible to a choice of basis, hence there exist transformations which change a basis but do not affect the relation (2.7) itself. These basis-changing transformations of Q-system are of two types: rescalings and rotations.

Rescalings (gauge transformations)
Plücker coordinates are projective: rescaling them does not change the point in Grasmannian that they define. Hence the transformation Q A → g A Q A is a symmetry of the QQ-relation (2.7). As we saw in the last section, this rescaling, defined by arbitrary N + 1 functions g 0 (u), g 1 (u), . . . , g N (u), modifies f i in (2.21). As we agreed to work in the normalisation compatible with (2.7), only 2 out of N + 1 functions remain independent. We can summarize the admissible rescalings that preserve (2.7) in a compact form as where g (±) are certain combinations of g i . These rescaling transformations are also known as gauge symmetries of the Q-system. Indeed, they are local transformations because g (±) depend on u.

Rotations
One can also rotate 7 the basis frame, that is to choose different basis vectors ζ 1 , . . . , ζ N . However we cannot rotate the frames independently at different values of the spectral parameter as the QQ-relations are non-local. Therefore, the following transformatioñ of single-indexed Q-functions together with the transformatioñ of multi-indexed Q-functions is a symmetry of the QQ-relation (2.7) if h bc are i-periodic functions of u: The transformations (2.26) will be called H-transformations [49] or simply rotations. Note that the case h bc = h δ bc can be viewed as a particular case of the rescaling symmetry with g (+) g (−) = 1 and g + (+) g − (−) = h. Hence one may restrict to the case of unimodular H-transformations: det 1≤b,c≤N h bc = 1. (2.28) In contrast to two local rescaling symmetries, rotations should be thought as a global symmetry. Indeed, periodic functions, e.g. (2.27), in the case of finite-difference equations play the same role as constants in the case of differential equations. Eventually, we will gauge the rotational symmetry, in order to formulate a twisted Q-system in section 3. But until then, this symmetry will remain global.

Solution of Hirota equation on a strip
This section is devoted to solving the Hirota equation (2.1) on a strip. One case of our interest is the semi-infinite strip of figure 3 which corresponds to compact representations of gl(N ). We remind that in this figure T-functions are identically zero outside the nodes denoted by black dots. The solution for these boundary conditions had been already written in [4] and then analysed in a handful of follow-up works. We revise this case as a warm-up for our subsequent studies of T-systems related to non-compact supergroups.
The semi-infinite strip should be thought as a special reduction 8 of an infinite horizontal strip shown in figure 6, i.e. related to the solution such that T a,s is identically zero outside the band 0 ≤ a ≤ N . We write down the generic solution for this case as well. It was already successfully used in [33,34,50] for the study of TBA and physical Y-system for the spectrum of principal chiral field (PCF) model at finite space circle. By letters P and Q we denote two independent sets of Q-functions, each of them expressed through (2.22) 10 .
On the semi-infinite strip of figure 3(a), a solution to the Hirota equation is given by: when s ≥ 0 and 0 ≤ a ≤ N (2.30) In components, the last relation becomes The solution (2.30) has to be supplemented with T 0,s = T + 0,s+1 T − 0,s+1 T 0,s+2 = ⋆Q for s < 0 and T a, for a > N . We will now discuss what are the symmetry transformations of Hirota equation and of formulae (2.29) and (2.30), then we will give a proof that (2.29) and (2.30) are indeed the generic solution of the Hirota equation on the corresponding strips.
10 This means in particular that P (n) = One can reformulate the Hirota equation (2.1) as a Y-system: If the gauge functions g (±±) are i-periodic, i.e. if they obey g + = g − , then the gauge transformation is the multiplication of T a,s (u) with a single i-periodic function. Such transformation will be called a normalization. For instance 11 , the prefactor (−1) a(N −a) in (2.31) can be removed by an appropriate normalisation.
As T-functions are determinants of Q-functions, unimodular rotations of the Q-basis have no effect on T-functions. By contrast, the rescaling gauge transformation of Q-system precisely generates gauge transformations of the T-functions. Indeed, one can spot from (2.29) that the rescaling induces the following gauge transformation 12 In a more restrictive case of (2.30), the rescaling of Q-functions generates only two gauge transformations: In fact, the solution (2.30) is written in a specific so-called Wronskian gauge in which T 1,0 = T 0,−1 and T N +1,0 = T N,1 . In arbitrary gauge, the the semi-infinite strip solution should be written as when s ≥ 0 and 0 ≤ a ≤ N , (2.36) where f 1 and f 2 are two additional arbitrary functions of the spectral parameter u.
. One should note that in this example of normalization, the functions g (±±) are not all periodic, but their product is. 12 This transformation clearly matches (2.32) up to relabeling the functions g and their shifts. where , Q , . . . , Q ) , , P , . . . , P ) , , Q , . . . , Q ) , , P , . . . , P ) . (2.41) We can use (2.15), and notice that N − 2 terms of the sum in the r.h.s. vanish because they contain a factor x k ∧ y k+1 (which is zero if k ≠ a). This gives T − a,s T + a,s = T a+1,s T a−1,s + T a,s−1 T a,s+1 , (2. 43) which proves that the Hirota equation (2.1) is then satisfied for 0 < a < N . Also, the Hirota equation reduces to T + a,s T − a,s = T a,s+1 T a,s−1 (resp 0 = 0) if a = 0 or a = N (resp a < 0 or a > N ), so that it is clearly satisfied at the boundaries of the strip as well.
It is also clear that the T-functions given by (2.30) obey the Hirota equation for s > 0, since they are a particular case of (2.29). At the line s = 0, the Hirota equation reduces (if a > 0) to T + a,0 T − a,0 = T a+1,0 T a−1,0 , and it indeed holds because T a,0 = Q . Similarly it holds on the line a = 0 (arbitrary s), explicit formulae are given after (2.31). Now it is immediate to see that it holds if we put T a,s = 0 outside the black dots of figure 3.

Proof B: uniqueness of the solution to Hirota equation
We showed above that if T-functions are expressed by the Wronskian ansatz (2.29) (resp (2.30)) then they obey the Hirota equation. We now focus on the opposite question: given a solution of the Hirota equation, does there exist Q-functions such that (2.29) (resp (2.30)) holds?
The answer is generically yes, as one can convince oneself by a simple counting argument: If the functions T a,s are non-zero within the infinite strip of figure 6 then a solution of the Hirota equation is characterized by the 2N + 2 independent functions T a,0 and T a,1 (where 0 ≤ a ≤ N ), whereas the T-functions written in (2.29) are characterized by the 2N +2 independent function Q ∅ , Q 1 , Q 2 , . . ., Q N , P ∅ , P 1 , P 2 , . . ., P N . Similarly in the case of the semi-infinite strip of figure 3(a), the solution of the Hirota equation is characterized by the N + 3 independent functions T 0,0 , T 1,0 and T a,1 , whereas the T-functions written in (2.36) are characterized by the N + 3 independent function f 1 , f 2 , Q ∅ , Q 1 , Q 2 , . . ., Q N .
In this subsection, we however provide a constructive proof that Q-functions exist for a generic solution of Hirota equation. We will focus on the case of the infinite strip, whereas the generalization to the semi-infinite strip is done in appendix A.2.
Furthermore, there exist degenerate solutions of the Hirota equation, for which some T-functions are identically zero, which cannot be expressed in terms of Q-functions by the Wronskian expression (2.29). An example of this is given in appendix A.4.
Construction of the Q-functions Let us first notice that if T a,s is given by (2.29), then the single-indexed Q-functions are solutions of the following finite-difference "Baxter equation" [4] (see explainations below): for any s 0 ∈ Z, where ψ 0 , ψ 1 , . . ., ψ N are a set of variables such that the antisymmetric product ψ 0 ∧ ψ 1 ∧ ⋅ ⋅ ⋅ ∧ ψ N does not vanish. For instance, if N = 2, this equation takes the form To this end, we assume that for a given value of s 0 the Baxter equation (2.44) has N independent solutions Q 1 , Q 2 , . . . Q N . We also assume that for this value of s 0 , the vectors 1,s 0 +r+k ψ r (where k = 0, 1, . . . , N − 1) are independent. 13 Then the equation ψ r belong to the N -dimensionnal space spanned by the vectors ⃗ T k , which implies that the ⃗ T k are linear combinations of them, i.e. there exists functions 13 While we use the forms notation (2.10) for combinations of the basis elements ζ A , we use the arrow for combinations of the variables ψ k .
One can see that the coefficients α a,k are not independent: for any k ≥ 1 (and any We therefore define Q ∅ , P ∅ and the functions P a (where 1 ≤ a ≤ N ) as follows 14 : . (2.48) One defines the Q-and P-functions for arbitrary multi-indices by (2.23) and by applying (2.24) for the functions P . Then the functionsT a,s = ⋆ Q It is then easy to see that one can iteratively show thatT a,s = T a,s using the Hirota equation (assuming that T a,s is generic, i.e. T a,s ≠ 0 for all a, s inside the infinite strip). This concludes the proof that, with the functions P and Q defined above, T a,s is given by the relation (2.29).

On finite-difference (Baxter) equation and Bäcklund transforms
In the previous sections, we reproduced the previously-known generic solution [4] of Hirota equation, using fact that this solution is of a Wronskian type.
There exists also an interpretation of the Q-functions from a Bäcklund flow [4,[51][52][53]. Here we remind the main points of this construction, as it gives an intersting point of view on the Wronskian solution. In particular, we will relate it to the known method of "variation of constants", a standard trick used in the resolution of differential or difference equation.
In the proof for wronskian relation T → Q above, the existence of finite-difference equation ( 14 The existence of two functions Q∅ and P ∅ such that T0,s = Q Suppose we know one solution of (2.49), say Q 1 . What simplification in the search for other solutions could we made? The standard trick (known as "variation of the constant") is to write the ansatz Q = Ψ Q 1 and to derive the equation on Ψ. After simple manipulations, this new equation can be written as an equation of degree N − 1 for the function . Obviously, the argument is repeated recursively. If we happened to find one solution for W , say Q + 12 , we can further reduce the degree of equation by one and get the equation which is solved by Q [2] 123 , Q [2] 124 , . . . , Q   following gauge conditions on T , and see that they automatically propagate to F (due to (2.54)): One can then iterate this procedure: a Bäcklund transform of F is a solution of Hirota equation on the gl(N − 2)-strip. The simplest example of a sequence of Bäcklund transformations is given by characters , i.e. for the case when T a,s (u) = χ a,s (G) for some G ∈ GL(N ). We can denote by G (b 1 ,b 2 ,...,bn) ∈ GL(n) a matrix with eigenvalues x b 1 , x b 2 , . . . x bn (where x 1 , x 2 , . . . x N are the eigenvalues of G), and for any multi-index A ⊂ {1, .., N } denoting the nesting path, we set Then each function T (A) is a Bäcklund transform of T (Ab) (for any b ∉ {A}). These successive Bäcklund transforms, labeled by a multi-index A ⊂ {1, .., N } can be represented by Hasse diagram (see figure 7) [31]. From this example, as well as from the boundary condition in (a, s) space, we see that each Bäcklund transform can be viewed as a decrease by one of the rank of the symmetry group, as one might already guess from the "variation of constants" method described above which decreases the degree of the finite-difference equation by one at each step as well.
Since the Bäcklund transform of T-functions fits into the same Hasse diagram as for these characters, one can define Q-functions as Let us now call nesting path a sequence of Bäcklund transforms from T (∅) to T (∅) (e.g. such as the green sequence of arrows on figure 7). Each nesting path is associated to a sequence of multi-indices A 0 , A 1 , . . ., A N , where such that A n = n: For instance the green nesting path of figure 7 is associated to A 0 = ∅, 1,s e i s ∂u = Q where e i∂u f (u) = f (u + i)e i∂u and where (1 − f e i∂u ) −1 = 1 + f e i∂u + f e i∂u f e i∂u + . . .. One can then show (see [6,54]) that the QQ-relation (2.7) arises 16 from the constraint W Aab;Aa W Aa;A = W Aab;Ab W Ab;A , i.e. the statement that two sequences of Bäcklund transformations having the same starting point and the same endpoint in the Hasse diagram (e.g. the red and blue arrows in figure 7) should give rise to the same T-functions. Moreover, one can show that each function T (A) is then given by Another interesting remark is that Bäcklund flow suggests a different way to generate the Baxter equation: . We present the proof in appendix A.5. Note that equations (2.62) and (2.44) do not coincide literally. We need to extensively exploit the Hirota equation to show their equivalence.
Although the Bäcklund flow was introduced for the case of Hirota equation on semiinfinite strip, the logic survives if we consider the case of the infinite strip of figure 6. For instance, (2.62) holds in either of cases.

Bijection between supersymmetric and non-supersymmetric Q-systems
In this section we will describe quite a remarkable fact: one does not need to change the geometric description to accommodate the Q-system for integrable systems with gl(K M ) supersymmetry. One can still use the same Q-system as was used for gl(K + M ) case. I.e. one still considers u-dependent hyperplanes of C N and imposes the same intersection property (1.5), however one needs to introduce a different set of coordinates to parameterise it.

Consider a decomposition
and choose coordinate vectors ξ 1 , . . . , ξ N of C N such that first K of them span C K and the latter span C M . Correspondingly, we introduce a set of "bosonic" indices B = {1, 2, ⋯, K} and a set of "fermionic" ones F = {K + 1, K + 2, . . . , N }. Since we will see that in most setups, there is no risk of confusion 17 between "bosonic" and "fermionic" indices, one may also label the latter as F = {1, 2, . . . , M }. The Q-functions which were used in previous paragraphs will be denoted here by small q to avoid a clash with notations introduced below. The labelling of q's is done according to the decomposition (2.63), i.e. q AI , where A is a multi-index from B and I is a multi-index from F, denote the components of the (p;q)-form The sum of (n − k; k)-forms is nothing but the n-form (2.10) which defines the hyperplane V (n) obeying (1.5).
We define the Q-functions Q A I , which form what will be called the supersymmetric gl(K M ) Q-system, by a simple relation 18 i.e., it is a simple relabeling of the purely bosonic Q-functions. In geometric terms, the supersymmetric Q-system is obtained by the partial Hodge transformation along C M direction of C N of the non-supersymmetric Q-system. This partial Hodge transformation can also be viewed as a rotation of the Hasse diagram, see section 3.1 and figure 9.
The supersymmetric Q-system of gl(K M )-type was introduced in [52](see also [29,31]. In [6], it was observed that the inverse of relation (2.66) can be used to map from gl(K M ) to gl(N ) system and it was named "bosonisation" (or "fermionisation") trick. We extensively rely on this mapping in various places of the paper.
As should be clear from (2.66), Q a 1 ...ap i 1 ...iq is antisymmetric under a permutation of bosonic a-indices and under a permutation of fermionic i-indices. Correspondingly, the graded Q-forms are defined by 67) 17 We should still view the two symbols 1 ∈ B and 1 ∈ F as two distinct objects, but the context will allow to know which of them is referred to when we use the symbol 1. 18 No summation overĪ where ζ's are some anti-commuting variables independent of ξ (ζ's and ξ ′ s are defined to anti-commute between them as well). For the following discussions, it would be convenient to introduce the Hodge duality map. It is induced from (2.11) which can be written more explicitly as ⋆ζ AI = AIĀĪ ξĀĪ ≡ (−1) I Ā AĀ IĪ ξĀĪ . One deduces that the hodge-dual Q-functions should be defined by: Finally, for the sake of notational simplicity, we will also sometimes denote Q A ≡ Q A ∅ and Q ∅ ≡ Q ∅ ∅ (and the same for Q-functions with upper indices).
The bijection between supersymmetric and non-supersymmetric Q-systems is quite a remarkable property; we spend the remainder of this subsection discussing it. One thing to note is a possibility to rewrite the Hodge transformation as a Grassmannian Fourier transform. Namely, introduce the sums Then they are related by the Grassmann integral This representation suggests adopting a Dirac sea point of view on the bijection transformation. Whereas the description in terms of q's corresponds to "excitations" of the "bare vacuum", description in terms of Q's corresponds to "excitations" of the "sea" created by filling the bare vacuum with all the excitations from the set F. Such an interpretation has a close relation to the Grassmannian construction in the works of Jimbo and Miwa [22]. A similar relation exists between the characters of gl(K M ) and gl(N ) algebras. The characters of compact representations are, correspondingly, the Schur symmetric polynomials s λ (x) and Schur supersymmetric polynomials s λ (x y), where λ is a Young diagram, see e.g. [55]. Schur polynomials form a ring where c ν λµ are the Littlewood-Richardson coefficients which are the same for the ordinary and supersymmetric cases. Hence, in the limiting case of M → ∞ and K → ∞ when none of s λ is zero due to the bound on a group rank, the rings of ordinary and supersymmetric Schur polynomials are isomorphic. It is not difficult to construct the isomorphism mapping explicitly. We can do this by exploiting the 2 nd Weyl formula from table 1, the reader may also focus on the most important case of rectangular representations when the Weyl formula reduces to (2.3) and can be derived directly from the simplified Hirota equation (2.4). The 2 nd Weyl formula expresses all the characters through χ 1,s -the characters for the representation λ = (s, 0, 0 . . .). On the other hand, the generating function for χ 1,s (x y) of gl(K M ) is known: Hence the map between supersymmetric and non-supersymmetric characters is induced by the replacements in the generating function. The mapping becomes an isomorphism in the limit when the numbers of y's and x's are infinite. This relation can be thought of as a statement (equivalent to the partial Hodge transformation) that "adding a fermionic index" is the same as "removing a bosonic index". Indeed, adding a fermionic index or removing a bosonic index is realised by multiplication of the generating function by a factor 1 + α (where α is either −y or x). See also section 2.8.5 for a motivation of this principle in terms of Bäcklund transforms.

QQ-relations with a grading
As explained in the previous section, the supersymmetric Q-system is obtained by a simple relabelling of ordinary Q-functions: we just use Q A I instead of q AĪ . Therefore, all the QQ-relations in the supersymmetric basis would be, eventually, an algebraic consequence of (2.7). Nevertheless, despite the simplicity of (2.7), the emergent algebraic structure turns out to be very rich.
First of all, the original QQ-relation (2.7) splits into three equations due to possibility of multiplying Q-functions with different gradings [46,48,52,53,56,57] It is easy to see how they correspond to (2.7), especially if to note the general rule that adding a fermionic index in Q A I is equivalent to removing this index from q AĪ . Now, we present a handful of algebraic relations which all follow from (2.74). Their derivation is given in appendix A.6.
Firstly, we have the obvious relations (2.75) which are identical to the relations of section 2.6 because they do not mix "bosonic" and "fermionic" indices. Secondly, the following expressions give all Q-functions in terms of Q ∅ , Q (1 0) , Q (0 1) and Q (1 1) 19 : These expressions were already implicitly incorporated into sparce determinants of [31], and rewritten in terms of forms in [3] for the psu(2, 2 4) case without proofs. These relations can be recast into equations for the components Q A I of these forms: the relation (2.76) becomes whereas the equation (2.77) (resp (2.78)) states that if A = n, and I = p with n ≥ p (resp n ≤ p), then for any t ∈ { n − p , n − p − 2, . . . , − n − p } we have Note that the role of e.g. δ BC A in (2.80) is to anti-symmetrise the index BC. Another interesting class of relations is obtained by using both Q-functions and their 19 One should note that Q∅, Q (1 0) , Q (0,1) and Q (1 1) are not independent: they are related by (2.74b), Hodge duals: and t ∈ {−n, −n + 2, . . . , n − 2, n} , (2.83) Similarly, one can take the Hodge dual of each relation, i.e. perform the substitutions when n = B − F + J ≥ 0 and t ∈ {−n, −n + 2, . . . , n − 2, n} , (2.90) where the sign (−1) n F is obtained by simplifying the expression (−1) n J + A Ā obtained from the substitution (2.89).
Examples. It turned out [3] that in the case of AdS/CFT (where T-hook in figure 8 has and Q ∅ ∅ = Q∅ ∅ = 1), the above-listed relations are very useful. We give below some of them specified to this particular case: • Setting J = 1 or A = 1 in (2.83,2.84), one gets two interesting relations which correspond to (4.14a1)-(4.14b1) in [3]. The other relations (4.14) are obtained by Hodge duality (2.89).
We did not describe all possible relations in this section. For instance, another interesting class worth mentioning involves equations of finite difference type of order ≥ 2. Such kind of Baxter-type relations were exploited for instance in [49]. Very recently, the fourthorder equation having Q ∅ i as four solutions played the decicive role in the derivation of the BFKL equation from the AdS/CFT integrability [58].
We see that the algebra of Q-functions is indeed very rich. We should think about these relations as an opportunity for discovering short-cuts through the Q-system that link the physically most-improtant Q-functions for practical problems to solve. For each particular problem or calculation, one should look for a specific, most convenient subset of these relations.

Expression for T-functions in a T-hook
At the level of Q-functions, we have seen that it was necessary to introduce two different sets of indices, which we called "bosonic" and "fermionic", and which are distinguished in the QQ-relations (2.74). If we denote by K (resp M ) the number B (resp F ) of bosonic (resp fermionic) labels, then the Q-functions are related to the algebra gl(K M ).
At the level of T-functions which obey the Hirota equation (2.1) on a generic T-hook fig.8, one should also specify a real form: It is su(K 1 , K 2 M ) in the most general case, with K 1 + K 2 = K). As a consequence, the set B of bosonic indices should be split into a union of two non-intersecting sets B 1 and B 2 : With these two sets, we introduce graded and ungraded forms in the same way as in, respectively, (2.67) and (2.64): With these notations, the Hirota equation on the (K 1 M 1 + M 2 K 2 ) T-hook has the following solution The practical meaning of these notations is: (s 0 , a 0 ) is the coordinate of the intersection of the diagonals on figure 8, and (s,ã) are the coordinates, with respect to this point, of an arbitrary node on the T-hook. The proof that (2.95) indeed solve the Hirota equation is given in appendix A.7. There we use, in particular, a possibility to represent the solution in terms of the bosonised functions (2.94).
The semi-infinite strip of figure 3(a) is the case In this case, the above expressions of T-functions match the expressions of section 2.6 up to an overall redefinition of the (shift of the) Q-functions: (2.97) which obviously leaves all QQ-relations invariant.
Other interesting special cases of the Wronskian solution (2.95) include: the compact real form su(M K 2 ) corresponding to B 1 = ∅ and L-hook shape of non-zero T-functions shown in figure 4(a); the compact real form su(K 1 , M ) corresponding to B 2 = ∅ and a mirror-reflected L-hook 20 ; and, finally the non-compact and non-supersymmetric case su(K 1 , K 2 ) which corresponds to F = ∅ and the "slim-hook" shape first discussed in [42] (see e.g. figure 1b in [59]). The slim-hook is solved using purely bosonic Q-system constructed on C K 1 +K 2 . We expect that Hirota equation on such a hook will appear in affine Toda integrable models.

Symmetries
Similarly to its bosonic version, the graded Q-system has rotational and rescaling symmetry. 20 For real forms we use notations of [59], a more detailed exposition is planned in [60]. Although the real form su(K1, M ) is isomorphic to su(K1 M ) and hence comma is usually not written, we should distinguish the case with comma and without when su(K1, M ) and su(M K2) are simultaneously subalgebras of a bigger non-compact algebra su(K, M K).
Gauge transformations. It is suitable to parameterise two available rescalings (gauge transformations) by which replaces (2.25). This transformation generates the following two gauge transformation of T-functions: Another two gauge degrees of freedom of T-functions (cf. (2.32)) are actually fixed for what concerns the solution (2.95). This solution was specially written to satisfy the Wronskian gauge: which immediately implies, by virtue of Hirota equation, and reflects the fact that the corresponding characters are equal: The signs ε r , ε u , and ε l in (2.95) were chosen, in particular, to ensure the Wronskian gauge condition (2.100). Hence, as in the case of semi-infinite strip, we understand that (2.95) is a general solution modulo two gauge transformations. Furthermore, the T-functions of T-hook are invariant only under unimodular rotations from GL(K 1 ) × GL(K 2 ) × GL(M ) which preserve the grading of the forms (2.93). It is important to realise that prior to constructing a T-hook, one has to agree how to decompose indices into sets B 1 , B 2 , and F and then stick to the bases which respect such a decomposition. Also, it is possible to exchange the role of bosonic and fermionic indices and, in particular, decompose into sets B, F 1 , F 2 . The choice of a basis and decomposition into sets depends on a real form one wishes to associate to T-hook and how this real form is related to analytic properties of Q-functions. From the same GL(K M )-system we can construct different T-hooks. It is an additional question to justify which of the T-hooks (maybe several) are physically meaningful in a given explicit problem and what is their physical interpretation.

Bäcklund flow in supersymmetric case
One can also introduce Q-functions from a sequence of Bäcklund transformations. It was demonstrated already for the bosonic case in section 2.7, and we saw that QQ-relations can be interpreted as the fact that different paths on the Hasse diagram (see figure 7) correspond to the same transformation.
This approach can be generalized to the super-symmetric case, i.e. for L-hook [52] and T-hook [61]. The relation to Wronskian determinants was shown in [7]. We remind the arguments for the L-hook case only. Consider the Lax pair condition (2.54) near the internal boundary of the hook, namely set (a, s) = (K − 1, M ) in (2.54a) and (a, s) = (K, M − 1)) in (2.54b). One can see that if T obeys the Hirota equation on a (K M ) fat hook, then F can obey it on a (K − 1 M ) or a (K M + 1) fat hook. The transformation from a (K M ) to a (K − 1 M ) fat hook is the exact analog of the Bäcklund transformation of section 2.7, and corresponds to the removal of a "bosonic" index from the Q-and T-functions. By contrast, it is the inverse of the transformation from a (K M ) to a (K M + 1) fat hook which can be regarded as a Bäcklund transformation removing a "fermionic" index; in this case, the function T of (2.54) is the Bäcklund transform of the function F . Hence we see that the same transformation "adds a fermionic index" or "removes a bosonic index", justifying the partial Hodge transformation (2.66), and the analogous observation (2.73) at the level of characters. Furthermore, one finds out from the linear system (2.54) and the definition (2.57) that the generating series (2.59) can be generalized to the L-hook. To this end, we encode a nesting path as a sequence of labels which are included into each other and obey A n + I n = n. Each step n of the nesting path is a Bäcklund transform which can be either associated to a "bosonic" index (then A n+1 = A n + 1 and I n+1 = I n ) or a "fermionic" index (then A n+1 = A n and I n+1 = I n + 1). Then, the generalization of the generating series (2.59) is As an illustration (which will be used in the next section), the coefficient of e i ∂u gives The QQ-relations (2.74) can be easily deduced 16 from this generating series [6] (see also [54]). All T-functions can be expressed from (2.103) and (2.2), and the result which comes out coincides with the Wronskian expressions (2.95).

Polynomiality and twist.
In the previous sections, in our study of general Wronskian solutions of Hirota functional equations with particular "hook" boundary conditions, as well as the QQ-relations, we had no need to precise the analyticity properties of the functions of spectral parameter u. If we now try to do it, generically it will impose severe restrictions on the analyticity properties of the whole ensemble of these functions. For instance if they are assumed to be polynomial or meromorphic functions, or having a given set of singularities we will have rather strong restrictions on the type and position of the singularities and zeros due to the Hirota and QQ functional relations. It turns out that the analyticity of the T-and Q-functions is an extremely important ingredient to characterise a given physical model. In this section, we discuss a well-known example of rational spin chains which correspond, in the case of compact representations, to polynomial T-functions, with polynomial Qfunctions. In particular, we discuss the effect of the twist on polynomiality conditions. In the section 4, we will consider the AdS/CFT Q-system which corresponds to multivalued analytic Q-functions with specific monodromy properties.

Polynomiality and spin chains
The spectra of periodic rational spin chains in compact representations of su(K M ) with integer fermionic Dynkin label are encoded in the polynomial solutions of the QQ-relations, with certain constraints on the polynomials that precise the details of the spin chain considered (length, representation, inhomogeneities). There are various ways to establish the correspondence between the spectrum of a spin chain and the QQ-relations, probably the most direct one is to construct the Q-operators acting in the quantum space of the spin chain (several constructions are available in the literature [37,48,[62][63][64]) and identify Q-functions with the eigenvalues of these operators.
In appendix C, we list the required constraints on the polynomials for a generic case 21 . In this section, we discuss one of the most simple and probably the most important examples -a homogeneous rational spin chain of length L in the defining representation. For this spin chain one imposes where s 0 = M −K 2 . It is remarkable that, algebraically, the Q-system is the same for all symmetry algebras su(K M ) with given value of K + M . The difference appears only in how the constraints (3.1) appear on the Hasse diagram. This phenomenon is illustrated in figure 9, where we see that the "bosonization trick" (2.66) amounts to a rotation of the Hasse diagram.
Note also how the Hodge duality map acts. It flips the Hasse diagram (upside-down), hence the boundary conditions (3.1) change to Q    Although there are no other constraints than (3.1) on the structure of the polynomial Q-functions, the QQ-relations themselves strongly constrain possible polynomials, and one ends up with only a discrete set of possibilities. All of them can be found by solving Bethe equations for super-symmetric rational spin chains [65,66] which are a set of algebraic equations for the roots of the polynomials.
The QQ-relations directly imply the Bethe equations as follows [52]: If Q Aa I has a zero at position u = θ, then equation (2.74a) implies that θ is also a zero of Q + Aa I , and we get the equation This equation involves the Q-functions corresponding to two successive "bosonic" Bäcklund transformations along the nesting path (2.102). If one has two subsequent "fermionic" Bäcklund transformations, we get analogously Finally, one also derives if a "fermionic" Bäcklund transformation is followed by a "bosonic" one (case Q Aa I (θ) = 0) or if a "bosonic" Bäcklund transformation is followed by a "fermionic" one (case Q A Ii (θ) = 0). There is a special case when all there terms of (2.74a) (or (2.74b), or (2.74c)) become zero at some u = θ. Such zero can be an "exceptional" root of Bethe equations which was accidentally trapped into a singular point, we can resolve this singularity by introducing a twist, see (3.7). Another possibility, which is not realised for defining representation but is possible for other cases, is that such zero is not demanded to be a solution of Bethe equation; instead, it belongs to a source term thus specifying the type of a spin chain, see appendix C for further details.
When exceptional Bethe roots are properly accounted, a solution of the Bethe equations allows to restore the Q-functions and vice versa, hence the Q-system and the Bethe equations encode the same information. This is another way to see that the polynomial ansatz with boundary conditions of type (3.1) indeed corresponds to a rational spin chain, as there is a handful of ways to derive Bethe equations, including those not relying on construction of Q-operators or even T-operators.
Each eigenspace of the spin chain which forms an irrep of su(K M ) symmetry algebra corresponds to a solution of the QQ-relations. For our particular example of the homogeneous spin chain in the defining representation, the commuting family of operators that act diagonally on the discussed eigenspaces includes the operator with only nearest-neighbour interactions of the spin chain sites: where P is a permutation operator. It is usually interpreted, up to an addition or multiplication by a constant, as the physical Hamiltonian of the system. For an eigenstate characterized by a given solution of the QQ-relations, the eigenvalue (energy) is given by In the expression (2.105) for T 1,1 , we see that due to the factor Q where ± denotes ε K+M , the grading of the first Bäcklund transform of the nesting path, and Q = Q Formulae of type (3.6) is an extra information one needs to introduce, apart from finding a solution of a QQ-relations, for computing the spectrum of rational spin chains. By contrast, in the case of the AdS/CFT integrable system, the Hamiltonian is part of the symmetry algebra charges that define the large-u asymptotic of Q-functions (4.5). One can derive the formulae like (3.6), at least in the asymptotic Bethe Ansatz limit [3], but now as a non-trivial consequence of analytic properties of Q-functions rather than an independent input.

Twisted spin chains and Q-system
Spin chains can be deformed by the introduction of a "twist", which changes the periodicity condition 22 . For rational spin chains, this twist G can be chosen diagonal without a loss of generality, and we denote its eigenvalues as x 1 , . . . , x K , y 1 , . . . , y M .
It is known that in the presence of a twist, the Bethe equations of the rational spin chain are deformed and become which constrains the roots of the polynomials Q A I . Hence these polynomial Q-functions do not obey the same QQ-relations (2.74) as in the absence of twist. There exist two equivalent ways to describe this situation: one can either add an exponential prefactor which breaks the polynomiality of Q-functions, or deform the QQ-relations.

Twist as an exponential prefactor
One possibility is to consider Q-functions which are not polynomials anymore. More precisely, Q A I is the product of the exponential prefactor ∏ a∈A xa and of a polynomial function denoted by the letter Q: then it is immediate to see that (3.2-3.4) for Q becomes (3.7a-3.7c) for Q, whereas it is a bit less trivial to see that (3.6) is not modified 23 In (3.8), the symbol "∝" denotes an arbitrary normalization for the polynomial Q A I (for instance the coefficient of the leading power can be set to one). This normalization is not very relevant, as it cancels out in (3.2-3.4) and (3.6). 22 More explicitely the Hamiltonian becomes H = ∑ This is not the case as the expression (3.5) holds in a gauge where T1,1 is polynomial, i.e. one has to divide the expression (2.105) by (sdet u) −i u .
In this setup, the simplest character solution of the QQ-relations (2.74) when the twist has pairwise-distinct eigenvalues is the following: .
It is obtained by solving the QQ-relation when The corresponding T-function, obtained by plugging (3.9) into (2.95), is related to the characters χ a,s (G) as follows: is just a u-independent normalization (in particular, it is equal to the Vandermonde determinant in the bosonic case and the Cauchy double alternant in the SL(M M ) case).
In more general situation, one can see that the T-functions are polynomial functions of u if G ∈ SL(K M ) 24 . By contrast, unlike the untwisted case, their Bäcklund transforms are in general not polynomial functions of u.

Twist as a holomorphic connection
A more geometric approach consists in adding to the fiber bundle described in section 2.3 a holomorphic GL(N ) connection A. In other words, one gauges the global rotational GL(N ) symmetry making it local.
In this setup, we slightly deform the definition (2.19) of Plücker coordinates of V (n) : we now introduce the coordinates of V (n) as forms Q (n) such that where the path-ordered integral P e ∫ v u A(v)dv is the parallel transport from spectral parameter u to v, and the shift i n−1 2 was introduced arbitrarily in (3.12) to simplify upcoming expressions. To obtain (3.11)-(3.12), one naturally chooses (as a generalization of (2.22)): While the A = 0 case corresponds to the non-twisted case of the previous sections, the twist corresponds to constant A: indeed, if A is a constant diagonal matrix and we denote diag(x 1 , . . . , x K , y 1 , . . . , y M ) = G = e A then we get (at the price of repeating the bosonization trick in the supersymmetric case) These relations imply the Bethe equations (3.7). Obviously, this approach is equivalent to the approach of section 3.2.1, and the twisted QQ-relations (3.14) are equivalent to the standard QQ-relations (2.74) up to the change of variables This change of variable corresponds to which is a simple parallel transport to the origin. One easily checks (for instance by use of the mapping (3.15) to the non-twisted case (2.75-2.78)) that the QQ-relations (3.14) are solved in a gauge where Q ∅ = 1 25 , similarly to the untwisted case, by where the twist appears only in the non-local relations (3.17a-3.17c). Similarly, one can write the T-functions in terms of Q-functions instead of Q-functions as in (2.95). To this end, one should just substitute (3.15) into (2.95). We do not repeat here these expressions, which become slightly less compact than in the non-twisted case (2.95) (see [31] for similar formulae). Quite curiously, the holomorphic connection point of view allows constructing Qsystems with arbitrary value of A, not only a constant one which we consider in this 25 In a gauge where Q∅ is not equal to one, the relations (3.17) still hold up to a denominator, as in article. The non-constant value of A produces a Q-system which we cannot identify with systems studied in the literature. It would be indeed very interesting to explore this new case.
Remark: Bäcklund flow If we use these twisted QQ-relations, we can also understand the Q-functions in terms of Bäcklund transformations [52,53], as in section 2.7, with the slight difference that the Lax Pair (2.54) has to be replaced with In this expression, g α denotes an eigenvalue of the twist (either x α if α is a bosonic index or y α otherwise) and its index α is the index which is removed by the Bäcklund transform, in the notations of figure 7.

Dependence on twist and the untwisting limit: illustration on examples
The dependence of a Q-system on twist can be quite non-trivial. For instance, the behaviour of the Q-functions is singular when two eigenvalues of the twist matrix tend to become equal. We can see it already on the example of the 1-st Weyl formula in the table 1 where both the numerator and denominator become zero in this limit. If we focus on the QQrelation (3.14a), then we see that if the Q-functions are polynomial (consider the case of compact spin chains), then their degrees obey For instance, in the case of the su(2) Heisenberg spin chain of length L, we have deg Q 12 = L and deg Q ∅ = 0, which means that the degree of the polynomial Q 1 Q 2 increases by one in the limit x 1 − x 2 → 0. This seemingly harmless change in the degree leads, as we shall see, to a significant reorganisation of the Q-system. Let us consider a more general picture now. The space of all possible diagonal twists is the projective space We can study how a Q-system changes upon analytic continuation in this space. We then face several different effects when performing such a study: • Untwisting limit. The limiting points on hyperplanes x a = x b , x a = y i , or y i = y j are quite singular as we explained above. This type of limit receives the most of attention in this section, a special emphasis is put on the fully untwisted case when the twist matrix G becomes the identity. In general, the result of the limit G → I may depend on how the identity is approached. We discuss only the limit G = I + g 0 with → 0 and assume g 0 being in generic position.
• Degeneration of solutions. Singular points on CP N −1 of other type live on hyperplanes x a = 0 or y i = 0. Space of solutions to QQ-relations degenerates there, and analytic continuation around such hyperplanes has a non-trivial monodromy.
• Borel ambiguities. Generic points on CP N −1 also have certain interest. We included an example of a non-compact rational spin chain into this section. The definition of the associated Q-system for such a chain suffers from Borel-type ambiguities, with position of Borel singularities being dependent on the value of the twist.
• Relation to representation theory of gl(K M ). In the presence of generic twist, Cartan sub-algebra of gl(K M ) is the only remaining symmetry 26 of a spin chain. However, the full gl(K M ) symmetry is restored in the untwisting limit; this is another way to see why this limit is singular. Certain properties of irreducible representations (irreps) find their counterpart in analytic structure of Q-systems.
In this section, we will discuss several explicit examples based on small-rank algebras to illustrate the mentioned effects, the gained experience is then summarised in section 3.4. The generalisation from the explicit examples to an arbitrary rank is also done, but only for the question of untwisting limit and for the case of finite-dimensional irreps. We hope to study other phenomena beyond small-rank cases in future works.
We explore the above-mentioned properties purely assuming existence of a Q-system with certain analytic properties (mostly polynomiality), without questioning its origin. This approach is conceptually important because there are situations, e.g. the AdS/CFT, where the existence of a Q-system is known although there is presently no operatorial construction, beyond the leading order in the perturbation theory, of a Hamiltonian and T-(hence Q-)operators. However, we should note that for the spin chains discussed in this section, all analytic properties follow from operatorial constructions [62-64, 67, 68]. We explicitly demonstrate this link in subsection 3.3.4.
In the discussion of irreps, we use the following notations (with more details given in appendix C). The vector of an irrep is characterised by its fundamental weight 27 where λ's and ν's are eigenvalues of the corresponding Cartan generators. In physical jargon, λ a is called the "number of spin d.o.f.", or "number of spins" in short 28 in direction a; and νî is the "number of spins" in directionî. Indeed, in the case of spin chains with sites in the defining representation, the weight of any eigenstate comprises non-negative integers which sum up to the number of sites, ∑ a λ a + ∑ i ν i = L, each site is being thought of as a spin degree of freedom. An irrep can be labelled by the weight of its lowest weight vector. We emphasise that the definition of the latter is not universal as it depends on a total order imposed on the set of indices {1, . . . , K,1, . . . ,M }, see appendix C. The corresponding ambiguity finds its counterpart in the untwisting limit of a Q-system. However, quite expectedly, more invariant objects -T-functions -do not depend on the choice of order.

su(2): untwisting should be supplemented with a rotation
The simplest example to commence with is the su(2) XXX spin chain in the defining representation. The twist-related effects were studied probably the most on this example, quite a detailed and illuminating analysis was presented in [62], including explicit examples of construction of Q-operators . We will partially repeat the known statements, but also complement this discussion, in the next subsection, with novel observations about analytic dependence of the Q-functions on the twist. In particular, we remark that the famous umbrella-shaped configurations of Bethe roots are well-approximated by zeros of Laguerre polynomials.
In this example, the only non-trivial QQ-relation is It is explicitly realised as 29 where Q a are polynomials defined modulo an overall normalisation, and where we defined z ≡ x 2 x 1 . According to (3.21), the degree of the polynomial Q 1 Q 2 should be L if z ≠ 1 and L + 1 if z = 1. But any limit of a degree L polynomial cannot have a higher degree than L! Hence something non-trivial should happen in the limit z → 1. Let us find the explicit solutions of (3.21) for L = 2 to clarify the situation. One can do this study analytically, but numerical solution already suffices to demonstrate the effect. The Hilbert space is 4-dimensional, hence one should find 4 solutions. Moreover, one expects appearance of spin-1 and spin-0 irreps at the point z = 1. We find for z = e − 2π i 100 which is sufficiently close to 1: • Solutions describing the triplet when z → 1: • Solution describing the singlet when z → 1: where M 1 is the degree of Q 1 . 29 We drop the offset [s0] from the further discussion.
The small in magnitude numbers will become identically zero in the limit z = 1. We see that the degree of Q 1 Q 2 actually drops, or it remains the same at most. Furthermore, both Q-functions approach the same value, lim hence there is no way to normalise this Wronskian combination to u L in (3.21) without going to its subleading in (z − 1) terms.
The su(K) generalisation of the observed phenomenon is the following one: In the untwisting limit, all polynomials Q A with the same value of the number of indices A tend to the same Q-functions which can be denoted as Q ← A : (3.23) We understand G → I as G = I + g 0 with → 0; the equality (3.23) should hold for all but finite number of the limiting directions on the group given by g 0 . Furthermore we understand that Q A is normalised to be neither infinite nor zero in the G → I limit. That is we consider some value u = u 0 at which Q A (u 0 ) ≠ 0 for G sufficiently close to the identity matrix (e.g. u = 0 for triplet solution in the example above), and normalise Q A (u 0 ) = 1.
For example, in this convention Q A = 1 + u z−1 would produce ∝ u in the untwisting limit z → 1.
Equation (3.23) means that, when one takes the direct untwisting limit, one formally obtains only N + 1 non-equal Q-functions Q ← A , with A = 0, 1, 2, . . . , N, out of 2 N Qfunctions of the twisted system.
The functions Q ← A are quite special. First, we can obtain all these functions from Q-functions on a nesting path (2.58), hence the corresponding Bethe equations (3.2) would be well defined. Second, the energy of a state can be still computed using (3.6), with Q = Q ←K−1 . Hence, in principle, the emerging functions Q ← A contain all necessary information. Moreover, it is known (see appendix C) that where [λ 1 λ 2 . . . λ N ] is the the lowest weight of an irreducible multiplet associated to the (remnant of) Q-system in the full untwisting point.
On the other hand, it is quite dissatisfying that other 2 N − (N + 1) Q-functions seem to be lost in the untwisting procedure. The art of obtaining these other Q-functions is to take the untwisting limit simultaneously with rotating the Q-system, e.g. to consider combinations of the type (3.25) In the limit x 1 = x 2 for su(2) case, this sample combination becomes a polynomial, and its degree can be larger than the degree of Q 1 or Q 2 , due to the expansion It is quite clear that Q-functions defined in such a way satisfy the desired QQ-relation In section 3.3.4 we explicit another example of implementation of rotation of the type (3.25), and we describe a general strategy of defining the untwisting limit alongside with rotation in appendix B.2.

su(2): analytic continuation in twist meets representation theory
One can pose a question: what should be known about twisted Q-functions to predict the Q-system emerging in the untwisting limit? For instance, can we predict the values of λ b in the large-u behaviour (3.24)? The first, naive expectation is that if we know the large-u behaviour of twisted Q-functions, e.g. in the su(2) case with M 1 + M 2 = L then we can deduce the large-u behaviour in the limit z = 1. This expectation is wrong as we can see from our explicit numerical example. Generically, both powers M 1 and M 2 will drop in the direct untwisting limit (without rotations), and one cannot predict by what amount without a more detailed information about the structure of Q-functions. One however understands that degree of a polynomial drops if some of its zeros go to ∞. We can find approximate analytic solution describing the structure of these large zeros. As is derived in appendix B.1, all twisted Q-functions Q 1 , Q 2 which tend to a polynomial Q of degree L 2 − s, have the following structure when z → 1: m (x) are associated Laguerre polynomials, see an example in figure 10(a).
From the point of view of representation theory, solution Q with deg Q = L 2 − s corresponds to a spin-s multiplet. The multiplet consists of 2s + 1 states and we can observe these states as coming from precisely 2s + 1 solutions (3.28) of the twisted Q-system. Note M a is the eigenvalue of the Cartan generator E aa (3.29) in the twisted case. The eigenstate remains of the same weight at any value of twist, even at point z = 1. However, the relation between the weight and the powers M 1 = deg Q 1 and M 2 = deg Q 2 does not work at the point z = 1, due to the above-discussed power drop and degeneration effects 30 . Moreover, the powers M a are even not uniquely defined when z = 1. Indeed, for generic twist, one sees that for every a, the relation between degrees and charges associates Q a with the Cartan generator E aa and with the eigenvalue x a of the twist -the labelling of Q-functions is then unambigously identified to the labeling of eigenstates of the twist, cf. (3.8). By contrast, in the G → I limit, different labelings of Q-function are possible since one can always rotate them. Similarly to the labelling of Q-functions, their asymptotic behavior is ambiguous in the G → I limit, since it is not rotation-invariant. The result about 2s + 1 being the number of solutions (3.28) is obtained solely by analytic analysis of the QQ-relation (3.21), but it is, de-facto, in agreement with representation theory of su (2). It would be interesting to generalise this analysis to higher ranks and to derive in this way a rich set of representation theory properties solely from analytic structure imposed by QQ-relations.
Approximation (3.28) is valid only in proximity to z = 1. If we are far from this point, can we still predict what would happen with Q-functions in the untwisting limit? In fact, the result of the untwisting procedure depends on a path which connects a point z ≠ 1 to z = 1. Hence, twisted Q-functions are not assigned a-priory to some particular multiplet at z = 1. There is a non-trivial monodromy around z = 0, ∞ which allows to jump from one multiplet to another.
Consider for instance the vicinity of z = 0. At the leading order of small-z expansion one has i.e. all solutions with given weight [M 1 M 2 ] degenerate to the solution (3.30). It is then well-expected that these solutions will mix when one performs an analytic continuation around the point z = 0. 30 When z = 1, a link to the representation theory is realised by (3.24).
At the subleading order, the QQ-relation can be written as The polynomial on the r.h.s. has roots at positions an example is shown in figure 10(b). We have to assign these L distinct zeros to either Q + 1 or Q − 2 , and there are L M 1 ways of doing this. Since M 1 can range from 0 to L, we conclude that there are precisely 2 L solutions of the QQ-relations (3.21), which is precisely the dimension of the Hilbert space of the length-L XXX Heisenberg spin chain. We emphasise that this enumeration result was obtained solely by analysing (3.21), no connection with XXX spin chain was exploited. Historically, enumeration of solutions to Bethe equations was a non-trivial issue [1] which relied on the string hypothesis about the patterns of Bethe roots. This hypothesis is known to be, strictly speaking, wrong. In the above-proposed approach, enumeration becomes indeed simple, at a suitable value of the twist parameter z = 0, and it does not require any assumptions. We can look on this result also from the other side: In operatorial derivation of Q-system, we do know that Q-functions -the eigenvalues of Q-operatorsare polynomials in u and that QQ-relations are satisfied. However, it requires an extra analysis to show that all polynomial solutions of the QQ-relations are indeed eigenvalues of Q-operators. The obtained enumeration result is a way to resolve this issue. Analytic continuation produces a cyclic permutation of the Bethe roots (3.32) and hence induces nontrivial monodromy on solutions of the Q-system. For instance, the singlet state from our numerical example is exchanged with a vector in the triplet state that has the same weight, upon the analytic continuation.
We saw that analytic continuation in twist is a useful tool allowing one to better control combinatorial and group-theoretical aspects of the Q-system. It can potentially have other interesting applications, one of them is analysing the above-mentioned string hypothesis, see appendix A of [59].

gl(1 1): lowest weight depends on a nesting path
We consider the gl case, assuming that x y ≠ 1, otherwise we won't be able to introduce a non-trivial twist. In higher-rank generalisations one can restrict to sl case only.
For a spin chain of length L, one has Q ∅ ∅ = 1 and Q 1 1 = u L , thus the only non-trivial where z ≡ y x.
Since the l.h.s. is a polynomial of degree L, we can distribute zeros of this polynomial between Q 1 ∅ and Q ∅ 1 in 2 L ways, thus correctly reproducing the dimension of the Hilbert space.
In the untwisting limit, there is precisely one Bethe root going to infinity, and either from Q 1 ∅ or from Q ∅ 1 . Hence, if we define the non-twisted Q-functions by The situation becomes clearer with generalisation to higher ranks. In general, one can expect that untwisting without rotations of an su(K M ) Q-system generates a set of (K + 1) × (M + 1) functions Q described in [52] Q ←k m ∝ lim where the limit is understood in the same sense as in (3.23).
In supersymmetric algebras, lowest weights are not invariant objects 31 . We, however, can associate the unique notion of lowest weight to the choice of the nesting path (2.102). It is done as follows: For certain K + M + 1 functions Q which are the untwisting limit The formula (3.36) applies without any subtleties if the multiplet in question is long. If the multiplet is short, and there are plenty of them in su(K M ) spin chains, we need to provide a further analysis. 31 To be more strict, we can change the lowest weight vector in non-supersymmetric case as well, by choosing a different Borel decomposition, but its weight would be just the same after we apply the automorphism E ab ↦ E σ(a)σ(b) , where σ is a permutation such that E σ(a)σ(b) lowest weight⟩ = 0 for a > b. This "cure" by an automorphism cannot be done in supersymmetric case.

su(2 1): states in short representations involve zero Q-functions
The K + M + 1 functions Q ← obtained from K + M + 1 functions Q A J along certain nesting path contain, in principle, all the information about the untwisted Q-system. In this sense, the situation is exactly the same as with K + 1 functions Q ← in su(K) case. However, the direct untwisting limit generates more than K + M + 1 distinct functions, see (3.35). In this respect, the situation differs from the su(K) case where other Q-functions are accessible only if the untwisting is supplemented with a rotation. It is a priory not obvious that Q-functions generated by (3.35) will be consistent with QQ-relations. One can see that [52]  We illustrate this issue on a very explicit and relatively simple case of the su(2 1) spin chain with two sites (L = 2) in the defining representation. We will further strengthen our claim that Q-systems can involve zero Q-functions and yet describe physical states by explicitly realising all Q-functions as eigenvalues of the Q-operators. This example is also rich enough to illustrate certain other twist-dependent effects introduced in previous sections. First, we list below all possible polynomial solutions of the su(2 1) QQ-relations without twist with the boundary conditions Q ∅ ∅ = 1 and Q 12 1 = u 2 . These solutions can be quickly found by brute force. There is one solution with non-zero Q-functions: where cst denotes an irrelevant constant which originates from the GL(2) H-symmetry rotating bosonic indices. There are also two solutions which contain zero Q-functions: where R is an arbitrary polynomial and Ψ(u 2 R) is a polynomial that satisfies Ψ(u 2 R) − Ψ ++ (u 2 R) = u 2 R. Second, we assign the irreps in the Hilbert space to the presented solutions. The Hilbert space is 9-dimensional and it decomposes into two irreps of su (2 1 The choice of the ordering 1 < 2 <1, 1 <1 < 2, or1 < 1 < 2 is in one-to-one correspondence with the preferred choice of the nesting path. For instance 1 <1 < 2 corresponds to (∅ ∅) ⊂ (1 ∅) ⊂ (1 1) ⊂ (12 1). We can use (3.36) to identify Q-systems with corresponding irreps. We see that the four-dimensional representation corresponds to the Q-system (3.38). A less obvious claim is that both Q-systems (3.39) correspond to the five-dimensional representation. To perform identification of weights, we should choose a nesting path which avoids zero Q-functions: (3.39a) is used with the ordering1 < 1 < 2 while (3.39b) is used with the orderings 1 < 2 <1 or 1 <1 < 2. The reader can check correctness of (3.36) when we choose R ∝ 1.
The five-dimensional representation is an example of short, or atypical representation. Such a representation is characterised by a property that some of states are annihilated by more than a half of fermionic generators. Hence, these states can be highest-or lowestweight ones for more than one index ordering. The practical output that we rely on is a possibility to realise condition λ a + ν i = 0 for a highest or lowest weight if one choose an appropriate ordering for which a and i are the neighbours in this ordering sequence. In compact rational spin chains all weights are non-negative integers. Hence λ a +ν i = 0 implies λ a = ν i = 0. Then condition of being lowest weight implies λ b = 0 for b ≤ a and ν j = 0 for j ≤ i. This significantly restricts the possible Q-systems describing short representations, it also explains why we chose R ∝ 1 above 32 .
The choice R ∝ 1 seems to be natural for the purpose of correct weight counting. And it also stems from the operatorial construction given below. However, quite remarkably, such invariant quantities as T-functions or energy do not depend on the choice of R. We can even put R = 0 and get that the two solutions (3.39a) and (3.39b) coincide! To say more, many T-functions computed for the states in short representations are identically 0, the non-zero ones live on a smaller L-hook. The observed phenomena are present in supersymmetric Q-and T-systems of any rank. In fact, in the case of character solution (3.9), we can recognise in these effects one of the defining properties of supersymmetric Schur polynomials. We discuss this question in detail in appendix B.4.
Finally, we support the observations made above by explicit analysis of operatorsQ acting on the Hilbert space. These operators are constructed according to the procedure of [64], and the presence of twist is essential, see appendix B.3 for details. The explicit expressions obtained in the basis ↑↑⟩ , ↑↓⟩ , ↑θ⟩ , ↓↑⟩ , ↓↓⟩ , ↓θ⟩ , θ ↑⟩ , θ ↓⟩ , θθ⟩ arê The presented 5 operators mutually commute. The Q-functions are their eigenvalues. The operatorsQ 1 1 ,Q 2 1 , andQ 2 1 were not shown explicitly. They are also polynomials in u and rational functions in twist variables and they can be easily restored using the QQ-relations.
Eigenstate ↑↑⟩. The most intriguing is to look on a state which becomes a member of atypical representation in the untwisting limit. We will concentrate on ↑↑⟩, it is already an eigenstate ofQ-operators. After the change of variables (3.15), we obtain the following eigenvalues: .
For instance, one can compute the energy 33 of this state which turns out to be 2, as can be seen in (3.6) where r = 0 (Q 1 has no roots). If we perform a straightforward untwisting limit in the style of (3.23) and (3.35) we will find that all Q-functions are proportional to identity, except for Q ←2 0 ∝ u and Q ←2 1 ∝ u 2 . Such set of Q-functions does not satisfy the relation (3.37).
A sober way to proceed is to perform a rotation which will produce Q-functions that have an explicitly regular limit G → I (for almost any direction) but, however, may become also zero. Then we guarantee that QQ-relations would survive the limit.
On one hand, one can use the rotation (2.26) with the matrix where α is an arbitrary (but non-zero) constant. More precisely α is independent of u, and it may be a function of G such that ≪ α when G = I + g 0 → I. Then, one finds that the Q-functions obtained after the rotation have a G → I limit given by (3.39a), with R = lim G→I α. The choice R = 0 can be obtained in several ways, for instance one can put α = √ x 2 − y. On the other hand, one can use the rotation (2.26) with the matrix 42b) 33 We remind that the present convention for the Hamiltonian is H = ∑ (with the same condition on α as before), and produce Q-functions with a G → I limit given by (3.39b), with R = lim G→I α. It is manifest that the two rotations differ by slight normalisations only, and the choice α = √ x 2 − y makes them coincide. The procedure to construct these rotations is the following one: the diagonal entries are designed to make Q-functions along a chosen nesting path regular and non-zero in the untwisting limit 34 , i.e. we perform the limit of type (3.35) on the chosen K + M + 1 Q-functions. The off-diagonal entries are introduced to reproduce all Q-functions of the untwisted Q-system, they execute the idea (3.25). If we are interested only in Q-functions of type Q ← then we can skip constructing off-diagonal terms. Note that in the presence of the off-diagonal terms, e.g. rotated Q 2 ∅ is not a product of polynomial and exponential prefactor. Such a mixture allows to get polynomials of higher degree in the untwisted limit, the off-diagonal terms are fine-tuned to achieve this goal. A generic algorithm to construct rotations is explained in appendix B.2.
Eigenstate ↓↓⟩. This one also has the energy equal to 2. It is analysed in full analogy to ↑↑⟩. Two rotational matrices yielding (3.39) in the untwisting limit are Eigenstate θθ⟩. The energy of this state is −2. One can use the rotation to repreduce (3.38) in the untwisting limit. As this eigenstate is not cluttered with effects related to atypical representation, it is the simplest example to observe how off-diagonal elements of the rotation matrix allow to increase the degree of a polynomial. Indeed Q 1 ∅ = Q 1 ∅ = 1 on this state, however Other eigenstates. The remaining 6 eigenstates are obtained by diagonalizing three 2 × 2 blocks in matrices (3.40). These states and their energies read as follows 45) and the reader can straightforwardly construct rotations which provide a smooth G → I limit, following the lines of appendix B.2. These states are examples demonstrating a non-trivial monodromy around co-dimension one hyperplanes x 1 = 0 etc, where the twist matrix G becomes degenerate, cf. (3.30). Going around the degeneration points changes the branch of the corresponding square root. On the branch were √ 1 = 1, the sign "+" in (3.45) corresponds to the states which become a part of the atypical (five-dimensional) representation in the untwisting limit (hence Qfunctions have the limit (3.39)), whereas sign "−" corresponds to the states which become a part of the typical (four-dimensional) representation (i.e. Q-functions have the limit (3.38)).

sl(2): non-compactness leads to Stokes phenomena
Finally, we will consider the XXX spin chain in a non-compact representation. Such a spin chain is not described by entirely polynomial Q-functions, but it is still based on rational R-matrix, hence it is natural to consider it in the same section. Understanding certain features of such a system is quite important for further study of the AdS/CFT integrability which is also based on a non-compact algebra.
The non-compactness is distinguished by appearance of a certain singularity, a pole in the rational case: Q 12 = u −L , so the QQ-relation to solve is One further demands that Q 1 will be a polynomial. Let us denote its degree deg Q 1 = M 1 .
On the other hand, Q 2 cannot be a polynomial as Q 2 ∼ u −L−M 1 at large u.
Similarly to the compact case, the degree of the polynomial function Q 1 can drop in untwisting limit, and we can find the following analytic approximating solution The main difference with (3.28) is the change in sign of s, so now one has −2s−1 ≥ L−1 ≥ 0. As a consequence, we have no upper bound on the value of m, i.e. m ∈ Z ≥0 . This labelling by m enumerates the eigenstates of an infinite-dimensional lowest-weight representation of sl(2), with spin s. Another consequence of −2s − 1 ≥ 0 is that all zeros of the associated Laguerre polynomial are real. The polynomial Q(u) satisfies untwisted Bethe equations, it is known to have real Bethe roots as well.
Unlike the compact case, the limits of Q 1 and Q 2 are two independent functions which we denote as Q ∝ lim z→1 Q 1 and Q ′ ∝ lim z→1 Q 2 . The degree 35 of Q ′ , deg Q ′ = − L 2 +s+1 is negative but it is larger than that of Q 2 . It is indeed possible that the degree of a non-polynomial function increases in certain limits, a simple example is lim Another interesting question to discuss is the interplay between dominant and subdominant solutions. Think of Q 1 , Q 2 , the Q-functions of the untwisted Q-system, as of two solutions of the Baxter equation (1.1). In the compact su(2) case, the function Q 1 = Q ←1 is obtained by the direct untwisting limit (3.23), whereas the function Q 2 is obtained with the help of a rotation. Apart from this difference related to untwisting limit, Q 1 can be also singled out as the sub-dominant solution of the Baxter equation at large u. Q 2 is a dominant solution and hence it is not defined uniquely: any combination of the type Q 2 + const Q 1 would still qualify as a dominant solution. The transformation Q 2 ↦ Q 2 + const Q 1 is a residual H-rotation which respects the ordering in degree of Q-functions.
In the non-compact sl(2) case, the situation appears to be contr-intuitive if one uses ordering in degree as a way to select "distinguished" Q-functions. The two Q-functions Q 1 ≡ Q and Q 2 ≡ Q ′ also satisfy the Baxter equation (1.1), but now with φ = u −L . Q 1 seems now to be a dominant one, nevertheless Q 1 is defined uniquely because this is the only polynomial solution. At first glance, Q 2 is sub-dominant and hence it should be defined uniquely. Alas, it is not. We are going to investigate this subtlety.
As we shall see, the subtlety is also present in the twisted case: the function Q 1 is uniquely determined from the fact that it is a polynomial, whereas it is less elementary to give a unique prescription for Q 2 .
We will reconstruct Q 2 from the fact that it satisfies (3.46). We introduce an operator Ψ z which satisfies the property Then, the most general expression for Q 2 can be written in the form where P(u) is an i-periodic function. Ψ z is not defined by (3.48) uniquely. We further narrow the ambiguities in its definition by the requirement that Ψ z (f ) is regular if f is regular and that the large-u asymptotic expansion of Ψ z (f ) is related to the large-u expansion of f by For instance, these constraints on Ψ z (f ) imply that Ψ z (f ) is a polynomial if f is a polynomial. Already from (3.50) we see that z = 1 is quite special. Large-u expansion should be re-summed, we refer to [18] for a discussion of properties of Ψ ≡ Ψ z=1 in the case z = 1. 35 We define degree of a non-polynomial function the value of its exponent when u → ∞ As we seek for Q 2 with power-like asymptotics, the term with z i u factor should be discarded. Furthermore, one can always write a solution using the following ansatz (cf. [18]) where coefficients c k are defined by the small-u expansion is a polynomial of degree L−1 which is uniquely fixed by requirement to cancel all positive powers in u in the large-u expansion of (3.51).
Hence we can focus on studying Ψ z 1 u k which coincides, after an appropriate rescaling of parameters, with the Lerch transcendent. We can immediately write down its integral representation by rewriting a symbolic expression (3.52) The announced ambiguity in construction of Q 2 can be explicitly seen here: the direction of integration is chosen to make the integral convergent, it is correlated with the direction in which (3.50) is chosen to hold and the analytic function defined by the integral does depend on the choice of direction. A different perspective on this effect is to note that the expansion (3.50) produces asymptotic non-convergent series. Their Borel resummation leads to (3.52) which has Borel ambiguities at the poles t n = −i log z + 2π n , n ∈ Z . (3.53) The resulting ambiguity in the definition of Q 2 is δ n Q 2 ∝ Q 1 (u) z i u e −2π n u , which has the form of the second term in (3.49) that we attempted to discard. But, as n ∈ Z, one can always find Borel ambiguities which are exponentially suppressed in u. Due to this exponential suppression they are sub-dominant compared to the first term in (3.49) and we cannot discard such terms based on the large-u behaviour argument. Hence Q 2 cannot be defined uniquely. We observed here a qualitative distinction between differential and finite-difference equations: In the case of differential equations, the dominance of a solution is decided by analysing its large-u asymptotic. In the case of finite-difference equations, solutions can be summed with periodic coefficients, not only constants, to produce a new solution; and it can happen that periodic coefficients themselves decide the dominance of different terms in the sum. This effect becomes visible in a non-compact case. Indeed, we can forbid non-constant periodic functions as coefficients in the compact case, by requiring polynomiality of the solutions. However, in the non-compact case, we cannot forbid periodic functions completely. Although we can require power-like behaviour when u → ∞, at least in certain directions, periodic functions will still appear as subdominant terms due to Borel ambiguities.  For any value of twist z, except the cases 0 ≤ z < 1 and z > 1, there are two distinguished choices for Ψ z .
The first one, upper half-plane analytic (UHPA), is denoted by Ψ ↑ z and is defined as solution having large-u expansion (3.50) valid in the largest possible cone containing u → +i ∞ . It can be defined by integration over t in (3.52) from 0 to −i ∞ for Im(u) > 0 and then by analytic continuation. For z ≤ 1, this solution can be represented as a convergent series 36 (3.54) Note that in the case of z ≤ 1 the sector of applicability of (3.50) (Stokes sector) is any direction save u → −i ∞. The sector becomes smaller if z > 1 but it still includes both u → +∞ and u → −∞ directions, except when z > 1; example is shown in figure 11. For z > 1 the UHPA solution is not defined uniquely as there are two solutions which have Stokes sector of equal size. The second one, the lower half-plane analytic (LHPA), is denoted by Ψ ↓ z and is defined as solution having large-u expansion (3.50) valid in the largest possible sector containing u → −i ∞ . Correspondingly, the integration in (3.52) is from 0 to +i ∞ for Im(u) < 0, and Ψ ↓ z is defined by analytic continuation if Im(u) > 0. The corresponding series is convergent for z ≥ 1. LHPA is not defined uniquely for 0 ≤ z < 1. 36 For z = 1, the sum is marginally divergent when k = 1. We define such a sum assuming the same regularisation as for the case of digamma function, see [18].
The difference between two solutions can be found explicitly by computing the emering integral by residues: . (3.56) We see that this difference indeed produces the term of a type P(u)z i u Q 1 (u) in (3.49), and this term is exponentially suppressed in u in the region where large-u asymptotic expansion is applicable simultaneously for both UHPA and LHPA solutions. The distinction between UPHA and LHPA Q-functions is paramount for the case of AdS/CFT quantum spectral curve, one could even understand the Riemann-Hilbert conditions of the spectral curve as a way to build UPHA system from LHPA and vice-versa [3]. However, we see now that the phenomenon appears already in rational non-compact spin chains.
Although the presence of twist is not an absolute requirement for the presented analysis, the twisted case illuminates and enriches the emergent Stokes effects. First, quite convenient series (3.54) and (3.55) cease to converge simultaneously if z ≠ 1 and one start to look for a more universal integral definition (3.52) which clearly suffers from Borel ambiguities. Second, the Borel poles depend on twist, and the definition of UPHA and LHPA, which relies on position of these poles, is not smooth in z. Consider for instance UPHA solutions. Crossing the z > 1 line in z-plane requires to pick up a Borel pole in t-plane thus generating solution which is no longer an UPHA. We hence perceive the line 1 < z < ∞ as a branch cut. Its branch points are of infinite degree. Indeed, the discontinuity Ψ ↑ z+i 0 − Ψ ↑ z−i 0 across the cut involves log z.

Dependence on twist and the untwisting limit: general picture
Back in section 2.3, we understood that Q-system realises a maximal flag in C N whose u-dependence is constrained by the intersection property (1.5). Since then, we observed two conceptually different ways to parameterise this flag using N Q-functions (in the gauge Q ∅ = 1). We list the essential properties of these two parameterisations (su(N ) case is kept in mind, but most of the statements can be generalised to supersymmetric and noncompact cases): Covariant parameterisation: It can be geometrically thought as a map Σ → CP N −1 , where Σ is the space of spectral parameter u.
-Is not invariant (but co-variant) under H-symmetry transformations. Hence, a choice of a particular basis (3.57) fixes the H-symmetry freedom.
-All other Q-functions are restored straightforwardly and uniquely by the determinant relation (2.23).
-The physical constraint Q∅ = u L (see figure 9) is a highly non-local equation in the u-plane.
Nested parameterisation: -Uses Q-functions along a nesting path, e.g. -All other Q-functions are restored by a systematic usage of the QQ-relation (2.7); the explicit computation requires to solve linear first-order finite-difference equations, and the Q-functions are found not uniquely but modulo the Borel subgroup of Hrotations.
-The constraint Q∅ = u L is imposed naturally.
The nesting path parameterisation behaves smoothly in the untwisting limit in the sense that its limit can be used to parameterise an untwisted Q-system. In fact, a safe way to realise the untwisting limit of the whole Q-system is to choose the set of nested Q-functions Q ← A ≡ Q A , A belongs to a chosen nesting path, (3.59) normalise them to be non-singular and non-zero in the untwisting limit, take the limit only of these functions 38 , and then restore all other Q-functions using QQ-relations. Note that Q ← A are always non-zero by construction, and one can construct a meaningful Q-system from any nested set of non-zero Q-functions. On the other hand, the covariant parameterisation is quite singular: the set functions (3.57) degenerates upon direct untwisting limit and we cannot use it anymore to parameterise a Q-system. The problem with covariant parameterization is that it defines a meaningful Q-system only if the basis Q-functions have a non-vanishing determinant: Q ≠ 0. The latter property can be violated when certain limits are taken, in particular this happens to be the case in the untwisting limit. 37 More accurately, diagonal H-matrices still affect the overall normalisation of Q-functions. The overall normalisation is, however, not essential for our discussion. 38 We use font Q to label a Q-system without twist.
We can give a symmetry argument why the covariant parameterisation behaves badly in the untwisting limit. Imposing the gauge-fixing condition that the twist is diagonal essentially brakes the H-symmetry. In the untwisting limit, the gauge-fixing condition is no longer required, hence the (global) H-symmetry is restored. Any choice of a covariant basis would spontaneously brake the restored symmetry, but there is no preferred way to do this choice by performing the untwisting limit. So, instead of having a meaningful limit, the covariant parameterisation degenerates when G → I.
We can choose, by hands, how to brake the symmetry, by performing twist-dependent H-rotations, e.g. (3.20), and in this way to define a smooth limit of a covariant basis. It can be summarised by a formula where h is a twist-dependent rotation matrix which should be fine-tuned to remove degeneracy from the limiting system. Finding h is equivalent in complexity to solving QQ-relations. Nested parameterisation is invariant enough under H-transformation to have a smooth limit. It is, however, not fully invariant, and the choice of a nesting path plays a certain role which we will now discuss.
We need to precise how the Q-functions are labeled. In the diagonal twist gauge, we follow the following rule: The function Q A with index A is the one with the exponential prefactor ∏ a∈A x −i u a in the large-u asymptotics. In the non-twisted case, the labelling is more subtle, but there still exists a natural choice. First, one rotates the basis such that all one-indexed Q-functions have a distinct degree, and then, among all Q-functions Q A with A = n, we assign the label Q 12...n to the polynomial of the lowest degree.
In principle, there are N ! choices of nesting paths, or, equivalently of the total order in the set {1, 2, . . . , N }. In the twisted case all of the choices enter indeed on the same footing. However, in the non-twisted case, the order 1 < 2 < . . . < N in the above-introduced labelling scheme, used as an example in (3.58), is distinguished for three reasons: -the Q-functions of the distinguished nesting can be uniquely defined as sub-dominant solutions of the corresponding Baxter equations.
-these nested Q-functions emerge from any nested set in the untwisting limit. I.e. if Q ←n = lim G→I Q ←n then Q ←n = Q 12...n independently of how Q ←n = Q a 1 ...an was chosen.
-The large-u behaviour correctly reproduces the weights of the representation according to (3.24); note that the statement (3.24) is formulated following the distinguished nested path.
The present discussion can be generalised to su(K 1 , K 2 M ) case. The full H-symmetry is broken to GL(K 1 ) × GL(K 2 ) × GL(M ) by analytic and boundary requirements on the solution. However the full H-symmetry is not broken on the level of QQ-relations, and it re-emerges partially producing some interesting ambiguities.
The Q-functions of the twisted Q-system have a natural labelling Q A 1 ,A 2 J , where I.e (K 1 + K 2 + M )! different nesting paths degenerate into (K 1 +K 2 +M )! K 1 !K 2 !M ! paths by taking the untwisting limit. We further prefer to constrain to the paths which contain only rational Q-functions, hence we limit ourselves to K 1 !K 2 ! (K 1 +K 2 )! (K 1 + K 2 + M )! possibilities in the twisted case and (K 1 +K 2 +M )! (K 1 +K 2 )!M ! possibilities in the untwisted case. Defining all Q-functions with distinguished order using (3.62) may lead to contradictions in QQ-relations, e.g. (3.37) might be violated. Hence we follow the above-outlined strategy: to choose one unique path, perform the limit for Q-functions along this path and then restore the other Q-functions using QQ-relations. Note that the strategy with the use of rotation matrix (3.61) also requires to choose a nesting path to decide which functions to only regularise/make non-zero, and which to rotate. The result of untwisting can indeed depend on the nesting choice, cf. (3.39a) vs. (3.39b) (this is another place where the broken H-symmetry re-emerges). However, the ambiguity proves to be unphysical as explained in appendix B.4. The untwisted result should also comply with weights expected from representation theory, according to (3.36), with k = k 1 + k 2 . To get the agreement, the lowest weight should be defined by the same total order that defines the nesting path.

Twisted Quantum Spectral Curve
The AdS 5 /CFT 4 system represents the most emblematic example of AdS/CFT duality between the Green-Schwarz-Metsaev-Tseytlin superstring sigma model on AdS 5 × S 5 background on the string side of the duality, and N = 4 SYM theory on the CFT side. It was realized that, at least in the planar sector, this system is integrable [36]. Recently, 39 The statement was made by inspecting the structure of Bethe equations for arbitrary highest-weight representation written in appendix C. Intrinsic Q-system study has still to be performed; it might show that a weaker constraint on the order suffices. 40 This is a conjecture which we believe should be true in a general position. The main argument is that each QQ-relation (2.7) has a potentially singular dependence only on one twist ratio xa x b , yi yj, or xa yj. Hence, in general position we can essentially analyse each QQ-relation separately, and hence apply our detailed knowledge of rank-1 examples.
the integrability equations, originally discovered as the AdS/CFT Y-system [5], and later brought into a TBA form [35,[69][70][71] were recast by the present authors together with N.Gromov into a concise and elegant finite system of Riemann-Hilbert equations -the Quantum Spectral Curve (QSC) [2,3]. The QSC approach has shown its efficiency and universality in the recent papers [18-20, 58, 72] and has been then successfully applied to the AdS 4 /CFT 3 duality [73][74][75].
In this section, we will generalise the AdS 5 /CFT 4 QSC construction to the case of arbitrary diagonal twist which corresponds, in several subcases, to a handful of integrable modifications of N = 4 SYM (see e.g. [10]). In e.g. rational spin chains, the twist is a particular deformation of the spin chain boundary conditions. We saw in section 3 that such a deformation amounts to the introduction of a constant connection A. In the AdS 5 /CFT 4 case, a description on the level of spin chains or other explicit physical model is not available at arbitrary coupling. Hence the twist of QSC is understood solely as the introduction of a constant connection A, we denote the eigenvalues of e A as x a and y i . The use of the terminology "twist" is justified at weak and strong coupling where the introduced twist can be indeed given its more standard physical meaning.
As we discussed in section 3, there is a mapping between the twist parameters and the charges. For spin chain, the twist matrix G = e A does not only execute H-rotations, but also it can be thought as an element of the Cartan subgroup of the symmetry group. Such a mapping also manifests itself in the large-u asymptotics: a multi-index function Q A I has where [λ λ λ; ν ν ν] is the weight of state (3.20), and the numbers α a , β i , n depend on the indices A I but do not depend on the state considered.
By analogy, we think about twist parameters as group elements also in the case of the AdS 5 /CFT 4 . There are actually six twist parameters: where the two constraints are due to super-unimodularity and projectivity of PSU(2, 2 4) group.
Explicitly the charges λ a and ν i associated correspondingly to x a and 1 y i read as follows: To avoid confusion, let us stress that twists do not define the value of charges. We just say that twists and (exponentiation of charges) are elements of the same group.
One introduces a freedom of speech and says that we twist a given symmetry if the value of the twist in the direction of the corresponding Cartan elements is different from one. For instance, we say that x-twists realise the twisting of su(4) ≃ so(6) R-symmetry and that ytwists twist the su(2, 2) ≃ so(2, 4) conformal symmetry of N = 4 SYM. Note that a twisted model is generically no longer invariant under the original symmetry transformations, only invariance under the Cartan subalgebra action remains. In particular, unless x a = y i for some a, i, the supersymmetry is fully broken in the presence of twist.
For what concerns twisting the charges, one can make a curious remark. It was noticed in [47], in the approximation of the twisted ABA equations 41 , that where P is the total momentum of a state. The identities (4.3) are also true beyond the ABA approximation The first one is a trivial consequence of (4.1) and the second one is a dynamical consequence of the QSC equations. On the other hand, the combination x 1 x 2 y 1 y 2 twists the charge E = ∆ − J 1 which is nothing but the energy of a state. Hence the total momentum P plays a role of twist for the AdS time τ AdS .
On the CFT side of duality, e.g. from the point of view of asymptotic Bethe ansatz, the deformed theory represents a non-local spin chain with twisted periodic boundary conditions. The corresponding SYM action is not known for a general twisting. However, for some particular twistings such SYM theories were conjectured and successfully tested. Such is the case of the so-called γ-deformation, when y-twists are absent and x-twists are pure phase factors. The corresponding γ-deformed, N = 0 SYM action has three exactly marginal deformations of scalar-scalar and fermion-scalar interactions: the commutators of scalar fields with themselves and with the fermions should be replaced by the deformed q-commutators [10]. It is believed that this γ-deformed theory is non-conformal anymore at finite N c but it still preserves its conformality at N c = ∞. 42 On the string side, the γdeformed coset has been known already since long [78] and the corresponding string sigma model appears to be integrable. This AdS/CFT-correspondence was successfully tested by comparing the results of Lüscher correction from TBA on the string side [15,16] with the leading order weak coupling correction on the Yang-Mills side [17,76] for the BMN vacuum. We will reproduce this result in the next section for testing the twisted QSC.
For a particular one-parametric case of gamma twisting, the β-deformation (when all γ j = β) the corresponding CFT dual is identified with a particular case of Leigh-Strassler N = 1 SYM theory [79]. The β-deformation of the AdS 5 × S 5 string sigma model was proposed in [80,81] and it is related to Lunin-Maldacena background [8] on the string side of duality.
The y-twists describe the deformations of AdS 5 . They presumably correspond to the introduction of a non-commutativity of space-time coordinates in the dual deformed SYM 41 The dictionary between our twist notations and the angles of [47] in the sl(2) favored grading is: In the SU (2) favored grading, one has to exchange xj ↔ yj. 42 At finite Nc the γ-deformed theory is non-conformal, and even at infinite Nc certain operators of small length, such as trZ 2 , have a divergent dimension and demand the addition of double trace counterterms in the action, leading to the running coupling [76,77]. The theory then runs in into the β-deformed N = 1 SYM. This is always the case at finite Nc. However, in the 't Hooft limit Nc → ∞ we expect that these short operators can be decoupled from OPE's and most of the correlators will take the conformal form.
In that sense, both conformality and integrability of γ-deformed SYM theory are restored in the 't Hooft limit.
theory [10]. Generically, three y-twists (the condition (4.1) always imposed) break the conformal group SU(2, 2) to the remaining U (1) × U (1) × R subgroup, where the line R corresponds to the action of the dilatation operator D related to the non-compact translational isometry of the conformal group.
In this section, we first introduce the most general twisting of QSC, and then show how one can reduce the number of twists and consider some examples of partial twisting which correspond to preserving certain, generically non-abelian subalgefbras of the full psu (2, 2 4). The untwisting procedure is far from trivial (it is already rather subtle for the spin chains, as we have seen in the previous section) and it can drastically modify the analyticity conditions of QSC system.
In the next section, we will demonstrate how one can work with twisted QSC by reproducing the known result for the anomalous dimension of the BMN vacuum at single wrapping orders.

Twisting of Quantum Spectral Curve
Now we will give the twisted version of QSC formulation of the AdS/CFT spectral problem. We will proceed with the generic twisting keeping all 6 independent twist variables as arbitrary complex numbers. Recall [3] that the QSC is essentially characterized by certain of Riemann-Hilbert type conditions imposed on a set of 2 8 = 256 Baxter's Qfunctions Q A I (u), which depend on the spectral parameter u and on two sets of indices, A ⊂ {1, 2, 3, 4}, I ⊂ {1, 2, 3, 4}, and the dependence is antisymmetric with respect to permutations of the indices inside each of these sets A and I. These Q-functions obey the QQ-relations (2.74). In the AdS/CFT context, and in a specific, most natural gauge, the following constraints hold: The first condition is a simple normalization, whereas the second one is non-trivial and should be interpreted as following from the quantum analog of unimodularity [6]. Indeed, We notice that the twisting of spin chains, as it was done in the previous section by (3.8), only modifies the analyticity of Q-functions, in particular, adding the exponential asymptotics at u → ∞ without changing the Baxter relations and QQ relations. We will follow this inspiration in the case of the AdS/CFT QSC and assume that the QQ-relations and the Riemann-Hilbert relations remain intact after twisting. Hence we will modify the u → ∞ asymptotics of Q-functions by exponential factors defined by twists. The consequent modification of analytic properties will be however greatly constrained by the structure of QSC equations.
In what follows, we use the notations of [3]: namely, the Q-functions P a (resp Q j ) denote the functions Q a ∅ (resp Q ∅ j ) in a specific gauge, discussed in detail in [3] and used through the whole present section. The functions P a and Q j are their Hodge dual: P a ≡ Q a ∅ = (−1) a Qā 1234 and Q j ≡ Q ∅ j = (−1) j Q 1234 j -wheren denotes the sorted multi-index which forms the complement of n in {1, 2, 3, 4} (for instance3 = 124). The Riemann-Hilbert relations, in a particular form of Pµ and Qω systems will be detailed further in section 4.2.
A natural ansatz for the large u asymptotics of QSC, generalizing the formulae of the paper [3] (section 3.2.3) to the twisted case, when all 6 twists are turned on, is where A a , A a , B j and B j are constant prefactors and the powers of u are given, for the generic twisting, by equation (4.2). This ansatz will be further justified in section 4.3, where we will show that in general, setting a part of twists to zero (or to one, in terms of x and y variables) leads to certain shifts by integers in powers of certain Q-functions with respect to the fully twisted case (4.5). We will compute the coefficients of asymptotics of various Q-functions for various configurations of partial twisting. In particular, we will express in terms of Cartan charges and twist variables the following eight invariant products of single-indexed Q-functions: These formulae appeared to be extremely useful for various applications of the QSC, for example for recovering the weak coupling limit [2] or the BFKL limit [58] of twist-2 operators. We will generalize here these results to an arbitrary configurations of twists.
The amount of conserved supersymmetry depends on the number of pairs (a, j) of equal twists x a = y j (each of twists enters only once into this counting).
To motivate a bit our prescription (4.5), we note that using the quasiclassical correspondence [3] we obtain from here and (4.5) the large u asymptotics of twisted quasimomenta for generic twist: Generalizing what was noticed in section 3 (equation (3.10)) for an L-hook, one can show that if we neglect, at large u, the exponentials in (4.5) and keep only the twists, then we can insert (4.5) into (2.95a)-(2.95c), and reproduce the SU(2, 2 4) characters of rectangular irreps given by (2.19) of [42]. As an even stronger motivation of our twisting ansatz, we could also reproduce the twisted asymptotic Bethe ansatz of [10,47] following the guidelines of a similar calculation for the untwisted case done in [3].

Twisted Pµ and Qω systems
The Pµ and Qω systems were formulated in [2,3] as a particular, and currently intensively used in the literature, incarnation of the QSC. 43 Recall that P a and P a have a single "short" Zhukovsky cut along the interval [−2g, 2g] at the real axis on their defining (physical) sheets, whereas Q j and Q j have a single "long" Zhukovsky cut along the infinite "interval" [2g, +∞[∪]−∞, −2g] with the same branch points, as shown in Fig. 12. The main ingredient of the Pµ and Qω systems is the relations describing the monodromy around these branch points. Using the notationf to denote the analytic continuation of a function f (u) around the branch point at u = ±2g, we can formulate the Pµ and Qω systems as relations between the original P and Q functions and their analytic continuationsP andQ. These relations essentially follow from the equivalence of choosing functions analytic either in the upperhalf plane Im(u) > 0 (a standard choice for P and Q functions), or in the lower-half plane when Im(u) < 0 (then corresponding toP andQ). This equivalence means there is an H-rotation transformingP a andQ i into the Hodge duals P a and Q j . In the twisted case, these main Pµ and Qω relations remain unchanged with respect to the untwisted case of [3]:Q j = ω jk Q k , (4.9) where µ ab is i-periodic on a sheet with long cuts, i.e. it has an infinite sequence of long Zhukovsky cuts at u ∈ ([2g, +∞[ ∪ ] − ∞, −2g]) + iZ}, whereas ω jk is i-periodic on a sheet with short cuts u ∈ {[−2g, −2g] + iZ} (see Fig. 12 and [3] for more details). Both matrices µ ab and ω jk turn out to be antisymmetric and one can consistently normalise them to have unit Pfaffian, hence They are related in the same way as in the untwisted case [3]: so that, on the sheet with short cuts (denoted by "hat"), µ ab can be viewed as a linear combination of 4-index functions Q ab jk with i-periodic coefficients ω jk , and vice versa for ω with long cuts (denoted by "check"). Let us also remind the obvious quasi-periodicity relations:μ ab =μ ++ ab ,ω jk =ω jk (4.13) Another important set of equations defining the monodromies ofμ ab follows from directly from certain QQ-relations [3]. Namely, we have (for short cuts) 44 µ ++ ab − µ ab = P aPb − P bPa = (4.14) and a similar equation for ω in terms of Q (for long cuts): We also have various orthogonality relations following from the algebraic properties of this Q-system (see section 2.8.2): The only difference between untwisted Pµ and Qω system and the twisted ones, with various full or partial twistings, resides in the large u asymptotics of functions entering these Pµ and Qω systems. We know already from (4.5) the asymptotics of twisted P a and Q j . For the efficient applications of Pµ and Qω systems, we can also calculate the leading asymptotics for µ ab on the sheet with short cuts assuming that ω jk is a finite i-periodic function on that sheet.
In what follows, we will work out the asymptotics of P a and Q j , as well as of some other Q-functions, in various cases of particular twisting. 44 Throughout the text, the "hat" and "check" symbols will be removed, and the choice of cuts (usually "short" cuts) will be specified in the context. 45 The present Q-functions have a non-polynomial asymptotic behavior and correspond to the functions denoted as Q in section 3, hence the obey the QQ-relation (2.74). By contrast, Q-functions obeying the modified QQ-relation (3.14) would have a polynomial asymptotics.

Asymptotics of Q-functions for full and partial twistings
In the degenerate case when some eigenvalues are equal whereas others are distinct, it is also possible to express the asymptotics of the different Q-functions. One can define x a , y i , λ a andν i such that where we assume without loss of generality that when x a = x b thenλ a ≠λ b . Indeed, if x a = x b then we can H-rotate these 4-vectors (take linear combinations of Q a and Q b ) so as to ensure thatλ a ≠λ b . Similarly, we can assume without loss of generality that if y i = y j then we can always choose a basis with ν j ≠ ν i . Finally, if x a = y i then we also assume a generic situation whenλ a +ν i − 1 ≠ 0. The equalityλ a +ν i − 1 = 0 corresponds to the multiplet shortening effect. If it holds at arbitrary coupling then the energy would be a protected quantity, but QSC is precisely devised to consider the non-protected case.
From the QQ-relations (2.74), it follows that all functions ∏ a∈A xa ∏ i∈I y i −i u Q A I have a power-like asymptotics; more precisely (2.74) gives where the ≃ symbol denotes the equivalent of u → ∞ asymptotics (see the end of section 2.2). Indeed, we deduce (4.24) using that if f ≃ A f x −iu f u p f and g ≃ A g x −iu g u pg then Applying the recurrence over the number of indices, starting from (4.23) and Q ∅ = 1, we derive the large-u asymptotics for an arbitrary Q-function: In addition, one should consider the constraint Q∅ = 1, which implies As particular cases of (4.26), the Hodge duals of P a and Q i , given by P a = P a Q∅ ≃ where we introduce A a and B i defined by (no sum over a, i) (4.29) and use the notation , Obviously, z ai and z ij are defined similarly, by f ai = z ai u −δx ayi and f ij = z ij u −δy i y j .
Relation to Cartan charges and Dynkin labels One can now understand how the powersλ a andν i are related to the SO(6) × SO(2, 4) Cartan charges {J 1 , J 2 , J 3 ∆, S 1 , S 2 } or, equivalently, to the corresponding SU (4) × SU (2, 2) weights written for the Kac-Dynkin-Vogan diagram which corresponds to the sl 2 ABA diagram. We associate to this diagram the orderinĝ where the "hat" symbol is used to recognize fermionic indices -denoted by the letters i, j, etc, as opposed to the "bosonic" indices denoted by the letters a, b, etc. The ordering (4.33) simply corresponds to the order in which the indices are added to the Q-functions in (4.32). As explained in appendix C, the asymptotics of the Q-functions along this diagram are given by (omitting the constant prefactor) By comparison with (4.26), we get 46 46 We notice that, as a consequence of ∑ a λa = 0 = ∑ i νi, the condition (4.27) is satisfied by the expression (4.35).
Inserting these expressions into the equations (4.23) and (4.28) we obtain (4.36c) For future sections, the asymptotics (4.36) will be summarized as whereλ a andν i are given by (4.35), whereasλ ⋆ a andν ⋆ i are given bŷ This terminates the description of the calculation of asymptotics of Q-functions, including the constant factors, powers in terms of Cartan charges and exponential factors defined by twists. Let us consider now some particular cases of the full or partial untwisting.

Particular cases of twisting
In this subsection we will consider some simplest and/or physically most interesting cases of full and partial twisting and give the results for the leading asymptotics of the most important Q-functions.
As particular important examples, we give the results for the fully twisted case, as well as for the β-and γ-deformations. The latter case will be used and tested in the next section for the computation of energy of the BMN vacuum in the weak coupling appropximation. The asymptotics of some other cases of twisting can be found in appendix D. In addition, appendix D.1 provides a computer implementation of the formulae of section 4.3 which can be used in particular to obtain the formulae of the present subsection.

Leading asymptotics for fully twisted case
As we already mentioned, the supersymmetry in this case is completely broken leaving only a bosonic U(1) 5 × R subgroup of the full PSU(2, 2 4).
As was mentioned in (4.5) in this case we have the asymptotics (4.37) with the powers given bŷ We can also express it through charges by the use of (4.31). For the 8 products A a A a and B j B j of the asymptotic factors we obtain from the general formula (4.36b): Notice also that from the general formula (4.26) we get and where the coefficients A a and B j are given by (4.40).
In view of equation (4.12), this allows to control the asymptotics ofμ ab : indeedμ ab is the linear combination of Q ab jk with coefficientsω jk , and these coefficients are i-periodic with constant asymptotics at large u, hence they are constant.

γ-deformation
If we denote all three angles of S 5 corresponding to the generators {J 1 , J 2 , J 3 } by {e iΦ 1 = x 1 x 2 , e iΦ 2 = x 1 x 3 , e iΦ 3 = x 2 x 3 } the γ-deformation is given by the following choice of twists 47 47 our γj as well as β of the next subsection, coincide with [17,76] but they are 2π times bigger than those of [82].
with real γ's and y 1 = y 2 = y 3 = y 4 = 1. This means a choice of the S 5 twists which obeys the two conditions ⎧ ⎪ ⎪ ⎨ ⎪ ⎪ ⎩ (4.45) Again, using the general formulae 48 eqs.(4.23)-(4.35) we get for it the asymptotics (4.37) with the powers given bŷ The existence of shifts in someλ a ,ν i ,λ ⋆ a and/orν ⋆ i arises as soon as several eigenvalues are equal. It comes from δ symbols in (4.35) and (4.38) and can be seen as originating from the shift +1 in the r.h.s. of (3.19).
For the 8 products A a A a and B j B j of the asymptotic factors in γ deformed theory we obtain from the general formula (4.36b): The supersymmetry is completely broken for the generic γ's. In section 5 we will use these results for the study of a particular state -the γ-deformed BMN vacuum -and calculate its energy in the weak coupling approximation.

β-deformation
The β-deformation is a particular case of the γ-deformation, with all three γ-twists equal γ 1 = γ 2 = γ 3 = β, or Another possible choice of twists, corresponding to a coset background, is obtained by changing the sign of all x a 's. This coset corresponds to Lunin-Maldacena background [8] and it is dual to a particular case of Leigh-Strassler N = 1 deformation of N = 4 SYM [79]. The asymptotics of Q-functions can be again obtained using the general formulae of section 4.3: in particular the asymptotics of single-indexed P and Q-functions is given by The residual supersymmetry is N = 1 and the full symmetry of the coset is U(1) × U(1) × PSU(2, 2 2). 48 To use the equations of section 4.3, one should note that if the charges Ja are non-zero then for generic γ, one has ∀a ≠ b, xa ≠ x b . 49 For instance, the relationλa − λa = (0, 0, 0, 3) meansλ1 = λ1, . . .,λ3 = λ3,λ4 = λ4 + 3.

BMN vacuum in gamma-deformed case, weak coupling expansion
In this section, we will study by means of the twisted quantum spectral curve a particular, simplest possible operator -BMN vacuum Tr Z L in the gamma-deformed theory. Supersymmetry is fully broken in the presence of the gamma-deformation, and the conformal dimension of the BMN vacuum is no longer protected. At the same time, one does not need Bethe roots to describe this state since the whole contribution to its dimension comes entirely from wrapping effects. Hence this is probably the simplest example of twisted object to perform computation with. Due to its simplicity, the dimension of this operator was computed perturbatively, directly from the SYM, to the leading single-wrapping orders by QFT methods [17], confirming integrability-based predictions of [15]. We will show how to compute the conformal dimension of the BMN vacuum at weak coupling at the single-wrapping order using the twisted QSC. The result is already known in the literature, even the double-wrapping orders have been computed [16] using Lüscher-type approach. We do not aim so far to improve these results, rather we initiate a computation to demonstrate how the twisted QSC works and hope that it will be boosted in future to an efficient computation up to very high orders, similarly to as it already happened in nontwisted case [18]. In the process of our computation, we pave a new, more transparent way, compared to [3], of deriving the asymptotic Bethe Ansatz approximation to QSC solution and make first steps towards deriving Lüscher-type formulae directly from the QSC.

Input data, notations, and symmetries.
The BMN vacuum is characterized by the following set of charges where equality ∆ = L is reached at g = 0 or γ + = 0 or γ − = 0. Correspondingly, the weights (4.2) are given by For this choice of charges, only γ 2 and γ 3 out of three parameters of γ-deformation are relevant, c.f. (4.43), which enter in combinations γ ± ≡ 1 2 (γ 3 ± γ 2 )L. Consequently, the twists are identified as follows and y i = 1. We will also use the notation x ab ≡ x a x b . In particular, x 12 = x 34 = 1. The large-u asymptotics of Q-functions are deduced, following the analysis of section 4.4.2, to be One can note that if L = 3 then B 1 B 1 and B 4 B 4 develop a pole as g → 0. Also note that at L = 2 all the four products B i B i develop such a pole. For L = 2 this singular behaviour persists on the final formula for energy and it corresponds to rearrangements in comparative large-u magnitudes of Q i given by (5.4b). Hence this case should be treated separately. As for the case L = 3, we will see from the result at the end of the section that the formula for energy predicts the non-singular correct value. Hence the pole L = 3 in the formula is probably not physical. In what follows, we stick only to the regular case L ≥ 4, but see the comments and references at the very end of this section. From (4.26) one can also deduce that Q ab ij ∼ x i u ab u −λa−λ b −ν i −ν j −1 whereν 3 >ν 4 >ν 1 >ν 2 . Hence, as ω ij ∼ 1, the term with ij = 12 dominates in µ ab = 1 2 Q − ab ij ω ij (see (4.12)). Therefore, we obtain We now introduce normalised variables p and m suitable for further analysis.
Zhukovsky variable x is defined, as usually, by the relation u g = x + 1 x . We always consider it, as well as any other functions in this section, as a function in physical kinematics (with short cuts): x(u) = u 2g 1 + 1 − 4g 2 u 2 . For the purpose of weak coupling expansion, one should remember that x = u g − g u + . . . at either small g or large u, so that the expansion goes in powers of g 2 u 2 . Note in particular that the large-u behaviour of p is given by We also denote by M ab the prefactors in the large-u asymptotic of m (these prefactors will be explicitly determined later): The bosonic H-symmetry of QSC [3] is mostly destroyed by the introduction of twists, only the diagonal rescaling remains: provided that α 1 α 2 α 3 α 4 = 1 to preserve the Pf(µ) = 1 property. Hence the values of A a and A a are not fixed universally, only the product is fixed, and we will eventually determine it explicitly. However, the normalised quantities p and m do not depend on rescalings of A's. The input data is highly symmetric, with the consequence that the following transformations map a solution to itself, up to an appropriate rescaling (5.11): • Exchange 1 ↔ 2: q → 1 q ,q →q , (5.13) other P unchanged, • Exchange 3 ↔ 4: q → q ,q → 1 q , (5.14) other P unchanged, • Exchange {1, 2} ↔ {4, 3} (analog of LR-symmetry in [3]): q ↔q , (5.15) P 1 ↔ +P 4 , P 2 ↔ −P 3 , P 3 ↔ +P 2 , P 4 ↔ −P 1 , For instance, the answer for the conformal dimension should be invariant under replacements q ↔ 1 q,q ↔ 1 q, and q ↔q.
In the computations of this section, we will also routinely use the following properties, which are consequences of (5.5) and (5.3):

Asymptotic Pµ-system
We will use the following terminology: "pre-wrapping" orders signify a collection of perturbative corrections in g 2 from g 2 to g 2L−2 with respect to the leading order approximation 50 .
Similarly, "single-wrapping" orders means a collection of orders from g 2L to g 4L−2 , while "n-wrapping" orders means all orders from g 2nL to g 2(n+1)L−2 .
In this subsection we will find the explicit solution in all single-wrapping orders. One should note that at any perturbative order in g, the Zhukovsky cuts at [−2 g , 2 g] + i Z degenerate into isolated poles at u = i Z. The success of the perturbative expansion relies on our ability to control the functions at these poles.
Leading order. We start by identifying the value of p's and m's at the leading order of the perturbative expansion.
First, we note that all m ab should be polynomials at the leading order. The proof of this property was given in section 3.2.1. of [18]. We repeat it here because we will recursively apply it at higher perturbative orders: Represent µ(u) and µ(u + i) as follows On the r.h.s. of (5.22), all combinations in brackets are regular at u = 0 at any order of perturbative expansion. Indeed, they do not have branch points on the real axis at finite coupling, e.g. µ + µ [2] = µ +μ, so the singularities at u = 0 simply cannot develop. Hence µ is regular at u = 0, i at the leading order, and the singularity at subleading orders can arise only from expansion of u 2 − 4g 2 in front of the second bracket.
Now we use the relation µ [2] ab = µ ab + P c P b µ ac − P c P a µ bc and regularity of P's outside the real axis to recursively prove that µ has no poles at u = i Z >0 provided that µ is regular at u = i. Similarly, we use the relation µ ab = µ [2] ab − P c P b µ [2] ac + P c P a µ [2] bc to recursively deduce regularity of µ in the lower half-plane from its regularity at u = 0. Note that all 6 µ ab should be regular at u = 0 and u = i simultaneously because they are intertwined in the recursive procedure.
Hence we proved that µ, and therefore m, are entire functions at the leading order. Hence m's should be polynomials as they have power-like asymptotics.
Since m 12 ∼ u ∆−L and ∆ − L < 1 at small g, m 12 is forced to be simply a constant at all perturbative orders in which it is still a polynomial. Hence, at the leading order we have for sure m 12 = M 12 where the constant M 12 was defined in (5.10).
Second, from the relationP a = µ ab P b and polynomiality of m we conclude thatP a is free of singularities everywhere except probably at the origin, and this property propagates tõ p a and similarly we have the same absence of singularities forp a . On the other hand, consider the expansion of p (where p without index would denote in this section any of different functions p 1 , p 2 , p 3 or p 4 ) andp into the convergent series [18]: which shows, in particular, thatp is regular at u = 0. Given the mentioned analytic properties ofp and its power-like large-u behaviour, we deduce thatp is simply a polynomial in u and hence the infinite sums (5.23) are truncated at some finite number.

(5.24)
At weak coupling, a significant simplification happens on the r.h.s.: following from the definition (5.8), we haveP α ( P )α − P α ( P)α ∝ x +Lp α ( p)α − x −L p α ( p)α. On the other hand, we see from the truncated series (5.23) that x −L p α ( p)α (x +Lp α ( p)α) = O(g 2L ). Hence P α ( P)α is suppressed compared toP α ( P )α by a factor g 2L , so that it does not contribute to the perturbative expansion of (5.24) until the first wrapping order! This is precisely the simplification which validates the asymptotic Bethe Ansatz approximation.
Apart from dropping the P α ( P)α term from (5.24), we also use that m 12 is constant and derive where we used αβ αβ µ ββ = µαα .
the equation which is valid at least at the leading order. However, we will extend its validity to all pre-wrapping orders in a moment. The leading order of m αα is a polynomial of degree L, as one can deduce from the large-u asymptotics (5.6). Hence the r.h.s. of (5.25) is also a polynomial of degree L. But the factor (g x) L ≃ u L is already a polynomial of such degree. Hencep = 1 in this approximation.
All pre-wrapping orders. One can prove that p =p = 1 and m ab are polynomials at all single-wrapping orders. The proof is done by induction. Assume that the statement holds at the order n. Then one should perform the following steps.
First, one observes thatp = 1 at order n implies thatp is regular at u = 0 at the order n + 1. One can draw this conclusion by an elementary analysis of the second expansion in (5.23).
Second, prove that all m ab have no poles at u = 0 , i at order n + 1. For this, one uses that m 12 = const and hence m 12 − m [2] 12 = 0 at order n, then equations (5.22) tell us that m 12 cannot have singularities at u = 0, i at order n + 1. Then, in general, the singularity of any µ ab at u = 0, i is a singularity of the combination µ ab − µ [2] ab at u = 0. But this combination, up to the factors inessential for the issue, appears precisely on the l.h.s. of (5.25). At the same time, the r.h.s. is regular at the order n + 1 becausep is regular 52 .
Finally, applying the same logic as was used after equation (5.22) one concludes that m ab are entire functions and hence, again, polynomials. Thus, again,p = 1 from power-counting in (5.25).
These recursive arguments can be repeated until the moment when the r.h.s. of (5.25) develops a singularity for the first time. As we saw, it cannot originate fromp. Hence, it originates from the perturbative expansion of x L . One has hence the singularity does not emerge until the leading wrapping order g 2L (this is also the order when P α ( P)α starts to contribute). As a conclusion, at all orders up to g 2L−2 , one has and m αα is the polynomial solution of equation (5.25). We introduce an operator Ψ z which satisfies the property 52 Strictly speaking, equation (5.25) uses approximation m12 = const which has not been proven yet at the order n + 1. A more careful approach is to deduce that mαα m12 is regular at u = 0, i and hence mαα is regular from (5.24) and already proven regularity of m12 at these points.
We also require that Ψ z (f ) is a polynomial if f is a polynomial, to uniquely define the action of Ψ on polynomials in the case z ≠ 1.
Then one can write The remaining P's are found by elementary algebra from the equations of Pµ-system: By considering these expressions at infinity and using that A a A a for a = 1, . . . , 4 are the quantities fixed by (5.5), one finds explicit expressions for M 12 and Π: Then the explicit expressions for M αα follow Finally, the explicit expressions for nontrivial p's become Note the large-u behaviour:

Asymptotic Q-system
In subsequent section we will reduce the computation of energy to the Lüscher-type formula which requires T-functions T a,±1 in the physical gauge T [3,49] as an input. In this section we compute the necessary Q-functions to reconstruct T a,±1 . As it will be clear, these are the functions Q 12 τ with τ ∈ {1, 2} and Q 34 τ withτ ∈ {3, 4}. The functions Q 34 τ are deduced from the LR-symmetry (5.15), hence we will not spell them explicitly. The departing point is the generalisation of (5.24) to an arbitrary set of indices: µ [2] ab µ ac − µ [2] ac µ ab = abcd (P aP d − P a P d ) . (5.38) From the results of previous section we know thatP P ∝ g −L for all P's, hence one always has the approximation: ab µ ac − µ [2] ac µ ab =P a ( abcdP d ) + . . . , (5.39) at all pre-wrapping orders. But this equation looks precisely like the QQ-relation (2.74a) with A = {a, b}, I = {1, 2}! It is hence tempting to identifyP's and µ's with certain Q-functions. We perform the following identification One can think of (5.40) as a definition of some Q-functions, by introduction of a formal labelling. But in fact, it is not difficult to show that these are indeed Q-functions of the quantum spectral curve. Indeed, the large-u asymptotics is correct and given (5.40) one derives so the conjectured Q-functions (5.40) are properly linked with P a (and P a ). We know that having P a and P a is sufficient, in principle, to derive all the Q-functions of QSC [3]. Hence if we found a Q-system which contains P a and P a with standard identification P a = Q a ∅ and P a = Q a ∅ , and we did so by (5.40) and (5.41) indeed, this Q-system should be the one of QSC. The normalisation factors in (5.40) are restored easily, as we know the normalised large-u asymptotics of Q-functions (4.23),(4.47) and of µ's and P's. We adapt the same strategy of restoring prefactors in the following, and to make things more precise, we define q A I as where X iu A Υ A I are chosen in a way that q A I ≃ 1 ⋅ u n A I at large-u. Then we can fix the following Q-functions: It is not difficult to solve it: where the constant c α is in principle arbitrary, but we have chosen it to get a particularly simple expression for q ∅ 2 (see below).
To find Qα τ , one applies a Plücker identity Q ab 12 Q c τ + Q bc 12 Q a τ + Q ca 12 Q b τ = 0 (5. 45) for the case ab = 12 and recalls that µ + ab ∝ Q ab 12 , getting Qα τ ∝ − αβ µ + αα Q β τ . The corresponding normalised expression is Q + a i becomes the most attractive for the case ab = 12, when it reduces in the asymptotic limit to One has then explicitly Other Q's: We briefly comment on how to find all other Q-functions. Although it won't be used in this paper, it would be a necessary step for performing higher-loop computations in the future.
First, one uses Q + 12 12 Q − 12 ττ − Q − 12 12 Q + 12 ττ ∝ Q 12 τ Q 12 12τ , which is specified in the asymptotic limit as to compute Q 12 ττ : The action of Ψ is unambiguous in the case of (5.51) and L ≥ 4 as we require that the result is a function which decreases at u → ∞ and which is analytic in the upper half-plane.

Asymptotic T-system and energy
An obvious way to extract the energy of a state is to solve the RH equations of the QSC and then to read off ∆ from the powers of asymptotics of appropriate functions. For example, we know that for the BMN vacuum in question µ 12 ∼ u γ , where γ = ∆ − J 1 is the anomalous dimension. But in practice this method may be sometimes not very convenient because it requires certain information about Q-functions at the same order at which we want to compute the anomalous dimension, even at one order more if to be precise. In our example, the anomalous dimension starts to be non-trivial only at wrapping orders, γ = O(g 2L ), hence one would have to analyse the Q-system at L orders more compared to what was done in previous sections in order to find all one-wrapping orders of γ. To avoid this kind of difficulties we can always use the good old TBA formula which would allow us to compute the energy at the one-wrapping orders knowing some particular Q-functions only asymptotically. This formula, exact for any coupling, states [5,35,69,70] is the "mirror"momentum and Y a,s are the Y-functions on the "mirror" sheet with long cuts. This formula was used in [16] to compute the energy of the γ-deformed BMN vacuum up to two wrappings, using the direct solution of TBA equations.
The purpose of this section is to demonstrate the twisted QSC at work on the BMN vacuum at one wrapping. Hence we rederive in appendix E.2 the TBA formula (5.54) in a somewhat shorter way compared to a relatively cumbersome way of reversing the historical derivation of QSC from TBA in [3,49]. Then, at the end of this section, we evaluate log(1 + Y a,0 ) with single-wrapping precision as where T-functions are computed as special combinations of the Q-functions originating from the Wronskian formulae (2.95). The approximations made in (5.55) are valid under assumption that Y a,0 is small; we will confirm below that, indeed, Y a,0 = O(g 2L ).
The T-functions T a,0 and T a,1 are the elements of the mirror T-hook. Construction of its Wronskian solution (2.95) requires to choose a particular basis in the Q-system, by means of symmetry transformations, such that splitting of bosonic indices into two sets B 1 = {1, 2} , B 2 = {3, 4}, and further usage of (2.95) would produce T-functions with correct analytic properties identified in [3,49]. The appropriate basis for the mirror T-hook construction was given in appendix B of [3]. This basis is not the same as the one used in QSC, but, of course, it is related to the QSC basis in a certain way. As a result, we can express T-functions in terms of Q-functions of the QSC basis only, but after several non-trivial steps, the details are given in appendix E.1. The resulting explicit formula we will operate with is which is valid slightly above the real axis;Q notation means that the expressionQ 12 j is computed by analytic continuation from the upper half-plane to the lower half-plane using the physical kinematics. Correspondingly, These expressions for T a,0 and T a,1 do not have the structure of the Wronskian ansatz (2.95) precisely for the reason that we are using a basis which is related to the Wronskian ansatz basis by a transformation which is a symmetry of QQ-relations but not of relations (2.95). The expressions equivalent to (5.56) and (5.57) were already suggested in appendix D of [49] where the function ω appeared for the first time.
To accomplish the computations, we need to determine ω ij . In the asymptotic approximation, one finds Now one can derive the explicit expression for the required T-functions: [+a] where the expression for T a,−1 was obtain by applying LR-symmetry transformation (5.15) on (5.59a) and using . Finally, we compute Y a,0 in the approximation (5.55) Let us remind that x is here the function in the physical kinematics (short cuts). To compute the mirror momentum, we have to substitute It remains only to perform integration in (5.54) to reproduce the energy for the γtwisted BMN vacuum in the single-wrapping approximation: x [a] − 1 It is true up to the order g 4L−2 , just before the second wrapping appears. It coincides of course with the result computed before from TBA or from the direct perturbation theory [15][16][17]. For the leading single-wrapping order g 2L , the formula becomes more explicit: Notice that this formula is non-singular at L = 3 and it predicts the right value of energy, in spite of the presence of singularity at this value of L in some Q-functions, see (5.5). At the contrary, as was observed in [16], at L = 2 the formula is singular and it ceases to predict the right energy. The reason for it is probably related to the phenomenon pointed out in [76]: this operator leads to a new counter-term in the action of twisted N = 4 SYM which breaks down its conformal symmetry. In the 't Hooft limit this operator/state can be self-consistently removed from the spectrum of the theory, but at finite N c this is not possible.

Conclusion
In this paper, we gave a general description of grassmannian structure emerging from fusion relations in integrable rational Heisenberg super-spin chains. The general solution [7] of Hirota equations for transfer-matrices in a T-hook, corresponding to arbitrary highest weight irreps of sl(K 1 , K 2 M ) superalgebra, and its proof [7], are presented in an elegant way in terms of exterior forms built out of a finite number of Baxter's Q-functions. A particular attention is payed to the case of twisted spin chains and to subtleties of partial or full untwisting limit.
Then we used our observations to construct the twisted version of the Quantum Spectral Curve (QSC) of the AdS 5 /CFT 4 duality, thus extending the QSC proposal formulated [2,3] in the untwisted cased to the full or partial twisting of the superstring sigma model on AdS 5 × S 5 background. Via AdS/CFT duality, this twisted QSC describes exact solutions for the spectra of anomalous dimensions of an extended range of interesting super-Yang-Mills gauge theories in the planar limit with the number of supersymmetries N < 4. For generic configurations of twists, the actions of such gauge duals are unknown, though they are established in some particular cases, such as the beta-deformation corresponding to the so-called Leigh-Strassler deformation of N = 4 SYM, and a more general γ deformation for the fully twisted R-symmetry where the corresponding SYM action (see e.g. [83]) is explicitly non-supersymmetric. We presented the construction of QSC not only for twisted string sigma model in the case of generic twisting (6 arbitrary twist parameters) but also for an arbitrary partial twisting, representing a subtle limit when some twists become equal to each other. In particular, we computed the asymptotics of large spectral parameter for arbitrary Q-functions entering the Q-system describing of twisted QSC. Since the results seem to be as meaningful as in the untwisted case it poses an interesting question of construction of the gauge duals for each of configurations of twists.
Further on, we checked our twisted QSC formalism on the computation in the weak coupling approximation for the single-wrapping energy of a peculiar state -the γ-deformed BMN vacuum corresponding to N = 0 deformation N = 4 SYM in the 't Hooft limit, successfully reproducing the results of TBA computation [15,16].
It would be interesting to perform a systematic weak and strong coupling expansion for various twisted cases similarly to [18], as well as to study the subtle limit of small twistingthe intermediate regime between particular configurations of distinct and coinciding twist parameters. Another interesting problem could be the BFKL limit for various twisted SYM actions. The twisting of the conformal group -the isometry of AdS 5 -is believed to describe certain non-commutative YM theories [10,82], though their classical actions and the renormalization properties are not yet established. It would be interesting to use the QSC formalism to get more of the physical information about these exotic theories and to understand the consequences of the breakdown of conformal invariance.
Other interesting theories to consider by our QSC method are the orbifold SYM models and their AdS duals, obtained from the general twisted case by choosing some twists as equal to exp[i(rational number)] (see [82] for description).
The twisted quantum spin chains appeared to be a good starting point for the construction of operatorial formalism for T-systems and Q-systems in terms of the so-called co-derivative formalism [30,37,64]. It is conceivable that such a method could provide us with the possibility to recover the operatorial formulation of various sigma-models at finite volume, including the AdS/CFT integrability, in the physical space. After all, the sigma models are not that different from the quantum spin chains: the former could be often represented as a specific continuous limit of the latter.
Our method of twisting of QSC is certainly generalizable to other interesting sigma models, such as the principal chiral field where the twist are introduced in a similar way into the asymptotics of Q-functions [34]. It would be good to extend the QSC metods to these cases and to perform the numerical calculations of their energy spectrum.

Nota added
Recently, we were informed by N.Gromov and F.Levkovich-Maslyuk about their forthcoming paper where they used a similar construction of twisted QSC for the study of cusped Wilson loop where two twist angles are introduced, one on S 5 and one on AdS 5 . We agreed to synchronyze the publications of our works in the HEP Arxiv.

Appendices A Further details and proofs
A.1 Derivation of (2.21) via Plücker identities.
In this subsection we prove that (2.21) follows from (2.20). Consider the Plücker identity (2.15) and set x N = x, y N = y and , Note that in this example, only the terms a = N − 1 and a = N give a non-vanishing contribution to the right side of (2.15) (other terms vanish because y a = x a+1 ). For x, y ∈ {ζ 1 , . . . , ζ N }, this gives the QQ-relation (2.21) when A = N − 2.
To show the QQ relation (2.7) when the multi-index I has an arbitrary number l of elements, we write another obvious consequence of (2.15): (1) . Indeed, we can deduce from T N −1,−1 = 0 that P (1) is a linear combination P (1) . Hence, we have which allows to deduce 53 that α 2 = 0. Reproducing the argument for T N −3,−1 , we obtain α 3 = 0, and at the last step (T 1,−1 = 0) we obtain α N −1 = 0, which gives P (1) = α N Q (+−) and g 2 = f [+N ] 2 , then the relation where the sums run over sorted multi-indices A ⊂ S 1 and B ⊂ S 2 . 53 To conclude that α2 = 0 we use that the T-functions are non-zero on the dots of the lattice in figure 3(a), At the level of forms, if we denote Q (n;p;q) ≡ A generalization of (A.8) arises when we relax the condition t ∈ {p−2n, p−2n−2, . . . , −p+ 2n} and allow t = ±(p − 2n + 2); This generalization reads A =n Obviously, it follows from (A.8) that the relation (A.10) can also be written as

A.6 Proofs of [derivative] QQ-relations in a supersymmetric Q-system
Here we prove the relations (2.76-2.87).
Proof of (2.76) We will prove the recurrence relation which is equivalent to (2.76). For simplicity, we first assume that B = F = n + 1. In this case, we obtain (A.27) as follows: ⋆ Q (n n) ∧ Q (1 1) = (−1) n a∈B i∈F āa ī i Qā īQ a i = (−1) n a∈B i∈F (A.28) The last equality is the Plücker identity 54 : the last term in the r.h.s. corresponds to the exchange ξ i ↔ ξ a and the other term corresponds to the exchange ξ i ↔ ξ j with j ∈ī (ξ j appears in the product ξī = ξ j 1 ∧ ξ j 2 ∧ . . . whereī = j 1 , j 2 . . .). Noticing that in this last 54 In order to write this Plücker identity, it is important to note that q (n+1) = which proves (2.76) when B = F = n + 1.
In order to show that (2.76) holds also when B >= n + 1 or F >= n + 1, we simply use the fact that the QQ-relations are not sensible to the numbers B and F of indices.
First, we rewrite (2.76) in terms of coordinates as Proof of (2.77-2.78) By the same argument as above, we can assume that B = n and F = p without loss of generality (using the fact that the relation (2.80) is not sensible to B and F ).
Then, we have Proof of (2.83) If we set A = B and I =J in (2.80), then we get Remembering that the functions Q A I obey exactly the same QQ-relation as Q A I , we can substitute Q A I → Q A I (and hence and get exactly (2.83). 55 One can note that on the first line of (A.29), all terms of the sum in the r.h.s. are equal, hence the second equality. Proof of (2.86) Denoting n ≡ B − F and assuming that n > 0, one gets (1 0) ∧ Q (n−1 0) = 0. By contrast, if t = ±n then we get Proof of (2.87) The relation (2.87) is a particular case of (A.10): if we assume that B = F then we have where the third equality is the relation (A.11) with S 1 = B, S 2 = F, S 3 = ∅, n = B = F and t = −2, and in the fourth equality we substitute qb ;0 = bb Q b ∅ and qb ;0 = (−1) F b b Q b ∅ to get (2.87).

A.7 Proof of the Wronskian solution of Hirota on the T-hook
We will now show that (2.95a-2.95c) solves the Hirota equation. This means that we will have to prove the five following statements: (a) The expressions (2.95a) and (2.95c) coincide whenã ≤s ≤ −ã , i.e. on the intersection of the "right strip" and the "left strip" of figure 8.
(b) The expressions (2.95a) and (2.95b) (resp. (2.95b) and (2.95c)) coincide whenã = s ≥ 0 (resp.ã = −s ≥ 0), i.e. on the diagonal joining the "right strip" (resp the "left strip") to the "upper strip"of figure 8. b): Diagonals delimiting the upper strip For the simplicity we will focus on the diagonal between the upper strip and the right strip (i.e. the case a = s + K 1 − M 1 ≥ −s + K 2 − M 2 ) while the result for other diagonal (i.e. a = −s + K 2 − M 2 ≥ s + K 1 − M 1 ) has an identical proof. Assuming that a = s where the first equality is the bosonization trick (2.66), the second equality is the relation (A.9) where we choose S 1 = B 1 , S 2 = B 2 , S 3 = F, n = a and t = 2s. From the condition a = s + K 1 − M 1 ≥ −s + K 2 − M 2 characterizing the diagonal between the upper strip and the right strip, one sees that n ≤   This relation (A.50) can be proven as follows where the key point is the third equality, which is the relation (A.11) with n = K 1 − a,  where the third equality is the relation (A.11) with S 1 = B 2 , S 2 = B 1 , S 3 = F, n = a and t = −2, and the last equality uses the condition K − M = 0 (mod2) to simplify signs. This proves the relationT a,s−1 − T a,s−1 = (−1) K 1 −a T a−1,s and completes the proof that any • The solution (2.95) is characterized by B + F + 1 independent Q-functions, for instance the functions q ∅ , (q a ) a∈B , (q i ) i∈F .
• Under the gauge constraint (2.100), the solution to Hirota equation on the T-hook of figure 4(b) is characterized by K + M + 1 independent T-functions. For instance, if K 1 = K 2 , one can chose the functions (T a,M 1 ) 0≤a≤K 1 , (T a,M 1 +1 ) 0≤a≤K 1 and B More details of the zero-twist limit in spin chains

B.1 Large Bethe roots and zeros of Laguerre polynomials
The goal of this subsection is to derive approximate expressions (3.28) valid near the point z = 1. We will focus on the case of Q 1 . Zeros of this polynomial, Q 1 (u i ) = 0, will be called Bethe roots. They can be found from the Bethe equations which follow from (3.21), cf. (3.2). In the untwisting limit, certain Bethe roots approach infinity, and we denote such Bethe roots as θ α . We will make an assumption that is justified a-posteriori that to-beinfinite Bethe roots are far not only from the to-stay-finite Bethe roots but also far from each other when z → 1. By taking log of Bethe equations (B.1) and performing large-θ α expansion one gets Using the standard matrix model trick of multiplying with ∑ 1 x−x i we can write a Riccati equation on the resolvent R(x) ≡ ∑ i 1 x−x i : where m = M − M 0 is number of to-be-infinite Bethe roots. This Ricatti equation is mapped to the linear second-order ODE by R = ψ ′ ψ , by noticing that R 2 + R ′ = ψ ′′ ψ : We are looking for solution with the polynomial large-x asymptotics ψ ∼ x m . The equation above is almost precisely the one for the associated Laguerre polynomials L (α) We derive the solution: Zeros of ψ(x) are precisely x α , and now we just recall that Note that Laguerre polynomials have degenerate zeros x = 0 if m ≥ 2s + 1, with degree of degeneration 2s + 1. Hence we consider only solutions with m < 2s + 1 when there is no degenerate zeros. The polynomial Q in (3.28) is a polynomial with zeros at Bethe roots that remain finite in the z → 1 limit. From (B.1), it is easy to see that these finite Bethe roots satisfy when z = 1.

B.2 Construction of the rotation
In section 3.3, we announced the existence of a rotation of the Q-functions which allows to take the limit G → I in a style (3.61). We provided several explicit examples of rotations, in particular (3.42a) and (3.42b). In this appendix, we explain how a rotation matrix is constructed. First, we show this on an explicit example (3.42a) and then generalise the logic to arbitrary case.
Example of the rotation (3.42a) Many different rotation matrices can provide Qfunctions with a G → I limit. As explained in section 3.3, a way to chose a particular rotation is to choose a nesting path and then demand that the rotation leaves the Qfunctions on this nesting path invariant (up to a normalisation). Then the rotation matrix obeys the property: h α,β = 0 if α < β according to the order dictated by the nesting path. The rotation (3.42a) is obtained from the nesting path (∅ ∅) ⊂ (∅ 1) ⊂ (1 1) ⊂ (12 1). The effect of the rotation is to multiply Q ∅ 1 by h 3,3 , Q 1 1 by h 1,1 h 3,3 , etc. Hence the diagonal coefficients will be fixed by asking what normalisation provides the nesting path Q-functions with a G → I limit. In the present example Q ∅ 1 = y i u−1 4 goes to 1 when G → I, thus we set h 3,3 = 1. By contrast Q 1 1 = x 1 y −iu−1 4 1 has to be multiplied by (e.g.) −(x 1 − x 2 ) 2 (x 1 − y) 2 to get a smooth limit -and the limit is then one. Hence we set h 1,1 = −(x 1 − x 2 ) 2 (x 1 − y) 2, and get lim G→I h 1,1 h 3,3 Q 1 1 = 1. Similarly, to get a limit, hence . As we consider the example of an su(2 1) spin chain, the rotation h cannot be an arbitrary GL(3) element as it has to preserve the decomposition (2.63); we hence have h 1,3 = h 2,3 = h 3,1 = h 3,2 = 0. The only coefficient which remains to fix is thus h 2,1 , and it has to be chosen in such a way that h 2,1 Q 1 ∅ + h 2,2 Q 2 ∅ acquires a smooth G → I limit. To do this we will iteratively add counter-terms to h 2,2 Q 2 ∅ until the limit becomes smooth. Since has a second-order pole the simplest way to cancel this pole is by considering the difference by substrating the multiple of Q 1 ∅ which precisely cancels the pole of order two. This would correspond to setting h 2,1 = − x 1 −y x 1 −x 2 . But when one expands this combination A in the G → I limit, it turns out to have a pole of order one: A ≃ − 5 2 x 2 −y (x 1 −x 2 ) 2 , hence one should subtract one more term, and consider the combination B = A − 5 4 (x 1 − y)Q 1 ∅ , which would correspond to setting h 2,1 = −(x 1 − y) 1 x 1 −x 2 + 5 4 . When G → I, this combination B is equal to −u 2 − 41 16 x 2 −y , which still doesn't really have a unique limit when G → I. To give it a limit, one can subtract , and lim G→I h 2,1 Q 1 ∅ + h 1,1 Q 2 ∅ = −u 2 . We have hence obtained all the coefficients of the matrix h in (3.42a), in the α = 1 case.
Generalization In higher rank, the procedure is the same: given an arbitrary nesting path, we can still relabel all Q-functions to turn the nesting path into ∅ ⊂ 1 ⊂ 12 ⊂ . . ., so that if we require the functions of the nesting path to be preserved (up to a normalisation), we impose the rotation matrix to be lower-triangular when the matrix entries are order according the order dictated by the nesting path.
The diagonal coefficients are fixed by requiring the functions Q 1 , Q 12 to have a smooth G → I limit in a generic position. Then in the bosonic case, for each line i, the coefficients h i,j are chosen as being the necessary counter-terms to give the sum ∑ j Q j h i,j a smooth limit when G → I. This is always possible because all diverging terms cancel from Q 12...i , which means that as functions of u, they are linear combinations of Q 1 , Q 2 , . . ., Q i−1 . In addition this procedure ensures that the limits of the function Q i are linearly independent (as functions of u), because we enforced the condition that Q 123...N has non-vanishing limit.
In the super-symmetric case, the procedure is the same except that some coefficients of the matrix h are forced to be equal to zero, to preserve the decomposition (2.63). This means we have a too little number of counter-terms to be sure we can make the singleindexed Q-functions linearly independent, which may result in some Q-functions having a vanishing G → I limit, as in (3.39). As we can see in (3.39), the vanishing of a Qfunction still allows other Q-functions to be non-trivial, and in particular we obtain (by construction) non-vanishing Q∅.

B.3 Rational spin chain's Q-operators
Q-operators can be constructed very explicitly for rational spin chain in the defining representations, they are operators which commute with each other, and their Wronskians give the transfer matrices of the spin chain. Explicit expression of these operators are given for instance in [64], for a length L twisted rational su(K M ) spin chain in the defining representation. Their expression reads (in the present notation for shifts): where we use the notation B = {1, 2, . . . , K}, F = {K +1, K +2, . . . , K +M } and we abusively denote x K+i ≡ y i . We also denote p a = 0 for a ∈ B and p i = 1 for a ∈ F. The two factors in the first line are normalisations: the first factor is responsible for the antisymmetry of Q-functions, while the second in necessary to make the limit z k → 1 x k smooth (it amounts to taking a pole) and to ensure that Q ∅=1 . In this second factor, the operators J k ≡ E kk count the numbers of spins in direction k, see discussion after (3.20) and appendix C, and the function w(z) is defined by In the second line of (B.10), the u i 's are related to the inhomogeneities θ i by A is the number of indices in A, and the operatorD is a derivative operator with respect to the twist G which obeys where the super-script and subscript on the l.h.s. denote tensor indices of the operator, which is an operator on the Hilbert space (C K M ) ⊗L (where C K M denotes the defining representation of su(K M )). In the r.h.s. of (B.13), a sum runs over permutations σ belonging to the cyclic group S L , and a product runs over the "cycles" c appearing in the decomposition of σ into a product of cyclic permutations -and over the sites m on which the cycles c acts. The notation Θ i,j is defined by (2.5). For instance if L = 3 and σ is the permutation exchanging 1 and 2, then the corresponding term in the r.h.s. of (B.13) Given the explicit operatorial construction, it is easy to deduce commutation of Tand Q-operators with the symmetry generators: Both relations (B.14) follow from the statement that the functions T λ (u) can be written in the form (see e.g. [30]) where the sum runs over all possible permutations of spin chain sites. The operator P σ realises these permutations: P σ e j 1 ⋯e j L ⟩ = e j σ(1) ⋯e j σ(L) ⟩. The coefficients c σ depend only on the twist matrix G. They are diagonal operators if G is diagonal (whence (B.14a) follows, cf. [64]), and become proportional to an identity operator in the limit G → I (whence (B.14b) follows).
Hence the eigenstates of the T-and Q-operators organise in the irreps of the symmetry algebra. These are one-dimensional representations in the fully twisted case (hence the spectrum is generically non-degenerate, unless some bonus symmetry is present) and the representations labeled by Young diagrams with L boxes when the twist is absent.  for some special multi-indices A, I and indices a, i. The equivalence in (B.16) is due to the QQ-relation (2.74b). Such a situation seems to be problematic: If we choose to set Q Aa I = 0 then Q A Ii is completely undefined, and vice versa. For instance, examples (3.39a) and (3.39b) contain an unconstrained function R.
In this appendix we demonstrate that this arbitrariness in Q-system does not lead to any ambiguity in physical quantities. Choose for instance Q Aa I = 0 (the choice Q A Ii = 0 shall be processed in full analogy). Our main statement is that by the use of symmetry transformations which leave T-functions invariant, we can enforce to have ... = 0. We also notice that many T-functions completely vanish: When (B.17) applies, T K 1 ,s≥M 1 = 0 and T a≥K 1 ,M 1 = 0 in (2.95), i.e. both sizes K 1 and M 1 of the T-hook decrease by one; on this smaller hook, the T-functions are given by expression (2.95) in terms of the Q-functions of the smaller Hasse sub-diagram Q (a) of size (K − 1 M − 1). Ab 1b2 . . .b p c 1 c 2 . . . c l Ij 1j2 . . .j m k 1 k 2 . . . k n where b h ∈ A, c h ∈ Aa, j h ∈ I, k h ∈ Ii. Then a slight generalization of (2.77) reads for instance The result then follows from the fact that the first line of the determinant vanishes.
Finally note that Q Ba J = 0 implies that Q B J ∝ Q Ba Ji . If the coefficient of proportionality is not zero, then we can set it to one at the price of changing the normalization of T-functions. The case when it is zero for some B J means that instead of reduction to a hook of total size (K − 1 M − 1) one has the size (K − 2 M − 2) or even smaller, in particular the physically-relevant subsystem Q (a) would be smaller. We skip discussion of this case as it is done in full analogy to the presented analysis.
Remark: In section 2.8.2, we saw that the derivation of determinant expressions like (B.22) involves divisions by some Q-functions, and one may expect it fails when some Q-functions vanish.
In the present proof, we actually assume that a Q-system where some Q-functions vanish is the limit of a generic Q-system -where all Q-functions are non-zero. This assumption is obviously sufficient to obtain the determinant expressions, and it holds in examples like (3.39), as the twisted Q-system only has non-zero Q-functions -and the functions vanish only in the twistless limit. The choice of ordering < between bosonic and fermionic indices affects the choice of the highest-and lowest-weight vectors. The ordering is typically encoded by the Kac-Dynkin diagram. It is handy to represent it as a two-dimensional path on a K ×M lattice with crossed nodes corresponding to turning points [52]. Two examples are shown below: The global ordering is introduced by the rule: α < β if α appears before β when one follows the path of the diagram. So the left figure (usually called distinguished diagram) has the ordering 1 < 2 < 3 < 4 <1 <2 <3 <4 while the right figure (used in the AdS/CFT asymptotic Bethe Ansatz) has the ordering1 < 1 < 2 <2 <3 < 3 < 4. The highest/lowest weight is transformed following the rule 62 (see e.g. [59] for derivation): where the upper choice of a sign corresponds to the highest weight and the lower choice corresponds to the lowest weight.

C Twisted asymptotics and weight of the representation
It would be more convenient, partially for historical reasons, to use the lowest-weight terminology to describe a generic rational integrable spin chain with diagonal twist. The following data defines such a chain: its length L; inhomogeneity parameter θ k and the weight {λ λ λ (k) , ν ν ν (k) } of a lowest-weight representation at a spin chain site k, for k = 1, 2, . . . , L; the value of a twist G = diag(x 1 , x 2 , . . . , x N , y 1 , y 2 , . . . , y M ). Such a spin chain is solved by Bethe ansatz techniques, its spectrum is described by solutions of Bethe equations [84,85]. It is not difficult to determine the Q-system providing such equations [6,31,52]. To this end, one should introduce a couple of notations. First, one will need a function P m (u) with the property 63 P ++ m P m = u + i m u . (C.8) Then define Q α 1 ...α k ≡ Q A I , where A is the projection of the set α 1 . . . α k on the B-set and I the projection on the F-set, and denote by "← β" the set of all indices smaller or equal to β according to the given choice of a Kac-Dynkin diagram. For instance, for the right figure of (C.6), Q ←2 = Q1 122 = Q 12 12 . Note that the functions Q ←α are the functions on a certain nesting path (2.102). In this way we establish a one-to-one correspondence between the nesting paths and the choice of the global ordering.
Finally, define s γ ≡ (−1) pγ and ρ β ≡ γ≤β s γ . (C.9) Then the Q-system for the spin chain described above is defined by the Q-functions along the chosen Kac-Dynkin diagram, these Q-functions should fit the following ansatz with q α being a polynomial in u; denote its degree as K α . One furthermore demands Q ∅ = 1 and K N +M = 0 (so that q∅ = 1). For the twist factor, one obviously has x ←α = ∏ β≤α x α , with identification x a = x a and x i = 1 y i . (C.11) 63 If m is a non-negative integer then this function is simply a polynomial Pm = u (u+i)(u+2i) . . . (u+(m− 1)i) . This particular case is enough to cover all spin chains in finite-dimensional representations. However, we allow arbitrary m to include all the highest-weight representations, not only the finite-dimensional ones.
With such an ansatz for Q-functions, the bosonic Bethe equations would read 64 at zeros of q α ; and fermionic Bethe equations would read at zeros of q α . These are indeed the correct equations stemming from Bethe Ansatz. Each solution of the Bethe equations corresponds to an irrep of the sub-algebra of gl(K M ) that commutes with the twist matrix G. The lowest weight of the irrep is given by α . (C.14) Now note that P m ∼ u m when u → ∞. By performing comparison of (C.14) with large-u asymptotic of (C.10), we conclude that We see that power of Q-functions at large-u is dictated by representation theory, this statement is valid for any rational spin chain.
The property (C.15) should hold for any choice of the total order (equivalently, nesting paths). One should check then that the large-u behaviour of Q-functions given by (C.15) for all possible nesting paths is in agreement with QQ-relations which obviously constrain this behaviour, see (4.24). There are three cases to consider: First, in the presence of twist, only Cartan generators remain the symmetry. Hence the irreps are all one-dimensional. Therefore the lowest weight (C.2) is the unique weight present in a given irrep: it obviously does not depend on a chosen order, so that we can operate by the rule (C.7b) when changing from one order to another. The choice x a ≠ y i in (4.24c) is in full agreement with this rule. Second, if one has x a = y i then the symmetry is enhanced and we should operate according to the rule (C.7a), unless λ a + ν i = 0. And indeed, the degrees of Q-functions also involve appropriate ±1 factors as it follows from (4.24c), case x a = y i . Finally, if x a = y i , λ a + ν i = 0 and a, i are neighbours in the chosen order sequence, then one should use again (C.7b). We discuss the features of a corresponding Q-system in section 3.3.4 and appendix B.4. 64 Note that offset of Bethe roots may be different in different literature sources. The ambiguity arises, in particular, when only the sl symmetry instead of gl symmetry is present, hence the physical quantities would depend only on the Dynkin labels ωα = mα − (−1) pα+p α+1 mα+1. For instance, for "rectangular" representations, when only α's Dynkin label is different from zero, and when representation is the same for all nodes of the spin chain, one typically uses u → u − i 2 sαm (k) α , to make equations invariant under complex conjugation. Another common overall shift, more suitable for representation theory, is Q←α ↦ Q Such a Q-system is ambiguous, in particular, the functions Q α α αa and Q α α αi , where α α α is the set of all indices that precede both a and i in the chosen order, are not uniquely defined. However, these functions prove to be not relevant for physical quantities. If we want, we can always assign them a value that complies with (C.15) (but such an assignment would be different for different order choices). Note also that the condition deg Q α α α = deg Q α α αai is in a perfect agreement with (C.15) and the property λ a + ν i = 0 .
Consider now the counterpart of (C.15) in the Hodge-dual basis. Denote (C. 16) Note that this number depends only on the definition of the spin chain, but not on a particular state that we consider. For a spin chain in fundamental representation, M = L. Along the nesting path, Hodge dual basis is related to the original one by the relation Q [α]← ∝ Q ←α , where " [α]← " denotes all indices which are larger than α (and do not include α). Then it is easy to see the relation with the total order used in (C.17) precisely reverse of that in (C.15).
Reversing the order means swapping between lowest-weight and highest-weight description, cf. (C.5) vs (C.4). Hence, we see that one relates large-u asymptotic (C.17) in the Hodge-dual description to the highest weight of an irrep (note also the change in signs compared to (C.15)).
In Hodge-dual description, Q ∅ ≠ 1. One can achieve equality Q ∅ = 1 be performing the gauge transformation Q A I → ∏ β x β −i u u M Q A I , at the price that Q-functions loose their polynomiality if it was present. The lowest-weight description for compact rational spin chains was chosen to allow Q ∅ = 1 and have polynomial Q-functions at the same time.
The AdS/CFT integrable model becomes a rational spin chain at weak coupling g → 0. Hence (C. 15) and (C.17) should hold. In this special case Q ∅ = Q ∅ = 1, hence there is no actual preference between highest-and lowest-weight descriptions. For historical reasons [3], the highest-weight notation was adopted, with the QSC coinciding with the Hodge-dual basis of this appendix. We expect that (C.17) should hold at arbitrary coupling g, when rational spin chain description is no longer applicable. The argument we use is the same as in [3]: all quantized charges are coupling-independent, while for conformal dimension, the only continuous charge, one performs comparison with TBA, cf. appendix E.2. Of course, we believe that QSC is a fundamental object and a deviation from the property (C.17) cannot be expected.

D Leading QSC asymptotics for some particular cases of twisting
In this appendix, we will present the computation of the leading large u asymptotics of one-indexed Q-functions for some particular configurations of twists of AdS/CFT QSC. To implement the equations of section 4.3 in either SageMath or Mathematica, one should first copy-paste the code in section D.1.1 or D.1.2, and execute it in a notebook, and then follow the instructions below (people using SageMath should not forget to activate typesetting to obtain human readable results -they may also have to restore indentation by hand if copy-pasting removes it). In order to reproduce for instance the formulae of section 4.4.2, one should first specify that ∀i ∶ y i = 1. This is done by defining a substitution 65 rule Spec={y 1 ->1, y 2 ->1, . . .} (in Mathematica syntax) or a dictionary Spec={y 1 :1, y 2 :1, . . .} (in sage syntax). In what follows, instead of repeating statements in both syntax, we will show commands and their output in two columns: the left column for SageMath, and the right column for Mathematica.
For instance, let us show how to obtain the equation (4.46), using the functions hL, hN, hsL and hsN, which respectively correspond to "hat λ", "hat ν", "hat star λ" and "hat star ν": The matrix bellow the two columns is the computer's output when these lines are evaluated (the output is the same 66 with Mathematica as with SageMath).
Similarly, we obtain the equation (4.47) using the functions AA and BB (for A a A a and B i B i ): Moreover, if one wants this output to be expressed in terms of the charges λ a and ν i instead ofλ a andν i , one can use the function subHat to substitute the expression ofλ a 65 One could also specify values of xa from (4.44) but this is not necessary as the eigenvalues xa are pairwise-distinct in the case we consider (i.e. generic parameters γa). 66 Up to minor typographic differences, such as the order of terms.
We will give below the residual non-abelian subgroups for other cases of partial twisting which can be easily determined by similar method.
D. 4 The case x 1 = x 2 Now we consider a slightly more complicated case x 1 = x 2 = z. Again using the general formulae (4.36) give the asymptotics (4.37) with the coefficientŝ The supersymmetry is here completely broken and the residual non-abelian symmetry is SU (2).

E.1 Formulae for T-functions of mirror T-hook.
As was stressed a number of times in this paper, construction of T-functions on a T-hook depends non-trivially on a choice of a basis in a Q-system. A particular "mirror" basis Q A I of Q-functions that reproduces the "black" gauge T a,s (introduced in [3,49]) and hence the Y-functions entering the TBA equations were linked to the Q-functions of QSC in appendix B of [3]. The non-trivial part of the construction is the relations valid in the mirror kinematics: (E.1) This identification is perceived as an H-rotation which should be applied by covariance to all Q-functions, see section 2.5.2. Note that this rotation has a non-unit determinant and one finds Q∅ ∅ = (µ + 12 ) 2 ≠ 1, hence the formulae including Hodge-dual functions should be casted in their full form presented in this paper but not in the simplified form with assumption Q∅ ∅ = 1 which is typically used in QSC.
We construct T a,s using the mirror basis of Q-functions Q A I and according to the formulae (2.95), with K 1 = K 2 = M 1 = M 2 = 2,s = s,ã = a, and ε simplified to ε r (a, s) = ε l (a, s) = (−1) a−s , ε u (a, s) = (−1) a−s+a s ; (E.2) and then apply transformation (E.1) to express the answer explicitly in terms of Q-functions used in QSC.
Since the mirror T a,s are analytic only in the bands of finite width on the complex plane of u it is very handy to operate simultaneously with both UHPA functions Q A I and LHPA functions Q A I defined and explained in [3]. For instance, according to (E.1), one has Q 3 ∅ = Q 4 ∅ .
For the upper band of the T-hook, a ≥ s , which we will need for the formula for energy, one has the following explicit formulae We could also use the propertyQ 12 I = (ω II ′ ) [ I +1]Q 12 I ′ valid in the physical kinematics [3] to write the answer uniquely in terms of UHPA Q-functions of QSC, as it is done in (5.56) and (5.57).

E.2 Derivation of TBA formula for Energy from QSC
We recall that the "black" gauge T a,s satisfies certain properties: T 0,s = T 0,−s = T and T a,2 = T 2,a , T a,−2 = T −2,−a (a ≥ 2), where all functions are on the sheet with long cuts. In addition, we know that T 0,0 = µ 2 12 and [3] T 1,0 =μ 12 µ 12 . We will use the standard definition of Y-functions 1 + Y a,s = T + a,s T − a,s T a+1,s T a−1,s , relating the Tsystem to the Y-system, and the "telescoping" formulae -chain cancelations of T-functions -to write