<figure><img src="image_19.png" /><figcaption>Figure 12. Cut structure of P and µ, Q and ω and their analytic continuations $\tilde{P}$ and $\tilde{\mu}$, $\tilde{Q}$ and $\tilde{\omega}$ [2, 3]. These pictures are in a choice of sheet where the functions $\mu_{ab}$ and $\omega_{ij}$ are not i-periodic, giving the periodicity conditions $\mu^{++} = \tilde{\mu}$ and $\omega^{++} = \tilde{\omega}$.</figcaption></figure>

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: $A_1A^1$, $A_2A^2$, ..., $A_4A^4$, $B_1B^1$, ..., $B_4B^4$. 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 [62] 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]

$$ \mathbf{P}_a \sim \exp \left( - \int^u \hat{p}_a(v) dv \right), \qquad \mathbf{P}^a \sim \exp \left( + \int^u \hat{p}_a(v) dv \right), \qquad (4.6) $$

$$ \mathbf{Q}^j \sim \exp \left( - \int^u \check{p}_i(v) dv \right), \qquad \mathbf{Q}_j \sim \exp \left( + \int^u \check{p}_i(v) dv \right). \qquad (4.7) $$

we obtain from here and (4.5) the large u asymptotics of twisted quasimomenta for generic twist:

$$ \begin{pmatrix} e^{i\hat{p}_1} \\ e^{i\hat{p}_2} \\ e^{i\hat{p}_3} \\ e^{i\hat{p}_4} \end{pmatrix} \approx \begin{pmatrix} x_1 e^{i(J_1+J_2-J_3)/u} \\ x_2 e^{i(J_1-J_2+J_3)/u} \\ x_3 e^{i(-J_1+J_2+J_3)/u} \\ x_4 e^{i(-J_1-J_2-J_3)/u} \end{pmatrix}, \quad \begin{pmatrix} e^{i\check{p}_1} \\ e^{i\check{p}_2} \\ e^{i\check{p}_3} \\ e^{i\check{p}_4} \end{pmatrix} \approx \begin{pmatrix} y_1 e^{i(\Delta-S_1+S_2)/u} \\ y_2 e^{i(\Delta+S_1-S_2)/u} \\ y_3 e^{i(-\Delta-S_1-S_2)/u} \\ y_4 e^{i(-\Delta+S_1+S_2)/u} \end{pmatrix}. \qquad (4.8) $$

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 [46]. As an even stronger motivation of our twisting ansatz, we could also reproduce the twisted asymptotic Bethe ansatz of [10, 51] following the guidelines of a similar calculation for the untwisted case done in [3].
## 4.2 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.<fnref n="44" /> 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, +\infty[ \cup (-\infty, -2g)]$ with the same branch points, as shown in figure 12. The main ingredient of the $Pμ$ and $Qω$ systems is the relations describing the monodromy around these branch points. Using the notation $\tilde{f}$ to denote the analytic continuation of a function $f(u)$ around the branch point at $u = \pm 2g$, we can formulate the $Pμ$ and $Qω$ systems as relations between the original $P$ and $Q$ functions and their analytic continuations $\tilde{P}$ and $\tilde{Q}$. These relations essentially follow from the equivalence of choosing functions analytic either in the upper-half plane $\text{Im}(u) > 0$ (a standard choice for $P$ and $Q$ functions), or in the lower-half plane when $\text{Im}(u) < 0$ (then corresponding to $\tilde{P}$ and $\tilde{Q}$). This equivalence means there is an $H$-rotation transforming $\tilde{P}_a$ and $\tilde{Q}_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]:

$$ \tilde{Q}_j = \omega_{jk} Q^k, \qquad (4.9) $$

$$ \tilde{P}_a = \mu_{ab} P^b, \qquad (4.10) $$

where $\mu_{ab}$ is i-periodic on a sheet with long cuts, i.e. it has an infinite sequence of long Zhukovsky cuts at $u \in ([2g, +\infty[ \cup (-\infty, -2g)) + i\mathbb{Z}]$, whereas $\omega_{jk}$ is i-periodic on a sheet with short cuts $u \in \{[-2g, -2g] + i\mathbb{Z}\}$ (see figure 12 and [3] for more details). Both matrices $\mu_{ab}$ and $\omega_{jk}$ turn out to be antisymmetric and one can consistently normalise them to have unit Pfaffian, hence

$$ \mu^{ab} = -\frac{1}{2} \epsilon^{abcd} \mu_{cd}, \qquad \omega^{ab} = -\frac{1}{2} \epsilon^{abcd} \omega_{cd}. \qquad (4.11) $$

They are related in the same way as in the untwisted case [3]:

$$ \hat{\mu}_{ab} = \frac{1}{2} Q_{ab|jk}^{-} \hat{\omega}^{jk}, \qquad \tilde{\omega}_{jk} = \frac{1}{2} Q_{ab|jk}^{-} \tilde{\mu}^{ab} \qquad (4.12) $$

so that, on the sheet with short cuts (denoted by “hat”), $\mu_{ab}$ can be viewed as a linear combination of 4-index functions $Q_{ab|jk}$ with i-periodic coefficients $\omega^{jk}$, and vice versa for $\omega$ with long cuts (denoted by “check”). Let us also remind the obvious quasi-periodicity relations:

$$ \tilde{\mu}_{ab} = \hat{\mu}_{ab}^{++}, \qquad \tilde{\omega}_{jk} = \hat{\omega}_{jk} \qquad (4.13) $$

Another important set of equations defining the monodromies of $\hat{\mu}_{ab}$ follows from directly from certain QQ-relations [3]. Namely, we have (for short cuts)<fnref n="45" />

$$ \mu_{ab}^{++} - \mu_{ab} = P_a \tilde{P}_b - P_b \tilde{P}_a = \qquad (4.14) $$

$$ = (\delta_b^c P_a P^d - \delta_a^c P_b P^d) \mu_{cd}, \qquad (4.15) $$

<footnote n="44">⁴⁴These systems of RH relations are only two of many possible types of RH conditions on the full Q-system; the convenient choice of RH conditions can be specific to a particular computation.</footnote>

<footnote n="45">⁴⁵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.</footnote>
and a similar equation for $\omega$ in terms of $\mathbf{Q}$ (for long cuts):

$$ \omega_{jk}^{++} - \omega_{jk} = \mathbf{Q}_j \tilde{\mathbf{Q}}_k - \mathbf{Q}_k \tilde{\mathbf{Q}}_j = \qquad (4.16) $$

$$ = (\delta_k^i \mathbf{Q}_j \mathbf{Q}^l - \delta_j^i \mathbf{Q}_k \mathbf{Q}^l) \omega_{il}, \qquad (4.17) $$

Another set of useful relations between Q-functions which can be obtained from the QQ relations (2.74) and (2.91) reads$^{46}$

$$ \mathbf{Q}_{a|j}^{+} - \mathbf{Q}_{a|j}^{-} = \mathbf{P}_{a}\mathbf{Q}_{j}, \qquad (4.18) $$

$$ \mathbf{Q}_j = -\sum_a \mathbf{P}^a \mathbf{Q}_{a|j}^{\pm}, \qquad (4.19) $$

$$ \mathbf{P}_a = -\sum_j \mathbf{Q}^j \mathbf{Q}_{a|j}^{\pm}. \qquad (4.20) $$

We also have various orthogonality relations following from the algebraic properties of this Q-system (see section 2.8.2):

$$ \mathbf{Q}_{a|i} \mathbf{Q}^{b|i} = -\delta_a^b, \qquad \mathbf{Q}_{a|i} \mathbf{Q}^{a|i} = -\delta_i^j, \qquad (4.21) $$

$$ \mathbf{P}_a \mathbf{P}^a = 0, \qquad \mathbf{Q}_j \mathbf{Q}^j = 0 \qquad (4.22) $$

The only difference between untwisted $\mathbf{P}\mu$ and $\mathbf{Q}\omega$ system and the twisted ones, with various full or partial twistings, resides in the large $u$ asymptotics of functions entering these $\mathbf{P}\mu$ and $\mathbf{Q}\omega$ systems. We know already from (4.5) the asymptotics of twisted $\mathbf{P}_a$ and $\mathbf{Q}_j$. For the efficient applications of $\mathbf{P}\mu$ and $\mathbf{Q}\omega$ systems, we can also calculate the leading asymptotics for $\mu_{ab}$ on the sheet with short cuts assuming that $\omega^{jk}$ is a finite i-periodic function on that sheet.

In what follows, we will work out the asymptotics of $\mathbf{P}_a$ and $\mathbf{Q}_j$, as well as of some other Q-functions, in various cases of particular twisting.

## 4.3 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$, $\hat{\lambda}_a$ and $\hat{v}_i$ such that

$$ \mathbf{P}_a \approx \mathbf{A}_a x_a^{i u} u^{-\hat{\lambda}_a}, \qquad \mathbf{Q}_j \approx \mathbf{B}_j y_j^{-i u} u^{-\hat{v}_j}, \qquad (4.23) $$

where we assume without loss of generality that when $x_a = x_b$ then $\hat{\lambda}_a \neq \hat{\lambda}_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 $\hat{\lambda}_a \neq \hat{\lambda}_b$. Similarly, we can assume without loss of generality that if $y_i = y_j$ then we can always choose a basis with $\nu_j \neq \nu_i$. Finally, if $x_a = y_i$ then we also assume a generic situation when $\hat{\lambda}_a + \hat{v}_i - 1 \neq 0$. The equality $\hat{\lambda}_a + \hat{v}_i - 1 = 0$ corresponds to the

<footnote>$^{46}$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.</footnote>
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 $(\frac{\prod_{a \in A} x_a}{\prod_{i \in I} y_i})^{-i u} Q_{A|I}$ have a power-like asymptotics; more precisely (2.74) gives

$$ Q_{Aab|I} \approx \frac{Q_{Aa|I} Q_{Ab|I}}{Q_{A|I}} \frac{f_{ab}}{\sqrt{x_a x_b}} \quad \text{where } f_{ab} = \begin{cases} x_b - x_a & \text{if } x_a \neq x_b \\ i \times_a \frac{\lambda_b - \lambda_a}{u} & \text{if } x_a = x_b, \end{cases} \quad (4.24a) $$

$$ Q_{A|Iij} \approx \frac{Q_{A|Ii} Q_{A|Ij}}{Q_{A|I}} \frac{f_{ij}}{\sqrt{y_i y_j}} \quad \text{where } f_{ij} = \begin{cases} y_i - y_j & \text{if } y_i \neq y_j \\ i \times y_i \frac{\hat{v}_j - \hat{v}_i}{u} & \text{if } y_i = y_j, \end{cases} \quad (4.24b) $$

$$ Q_{Aa|Ii} \approx \frac{Q_{Aa|I} Q_{A|Ii}}{Q_{A|I}} \bigg/ \frac{f_{ai}}{\sqrt{x_a y_i}} \quad \text{where } f_{ai} = \begin{cases} y_i - x_a & \text{if } x_a \neq y_i \\ i \times a \frac{1 - \hat{\lambda}_a - \hat{v}_i}{u} & \text{if } x_a = y_i, \end{cases} \quad (4.24c) $$

where the ≈ symbol denotes the equivalent of $u \to \infty$ asymptotics (see the end of section 2.2). Indeed, we deduce (4.24) using that if $f \approx A_f x_f^{-iu} u^{p_f}$ and $g \approx A_g x_g^{-iu} u^{p_g}$ then

$$ \left| \begin{matrix} f^+ & g^+ \\ f^- & g^- \end{matrix} \right| \approx \begin{cases} f g^{\frac{x_f - x_g}{\sqrt{x_f x_g}}} & \text{if } x_f = x_g \\ f g^{\frac{i(p_f - p_g)}{u}} & \text{if } x_f \neq x_g \end{cases} \quad (4.25) $$

Applying the recurrence over the number of indices, starting from (4.23) and $Q_\emptyset = 1$, we derive the large-u asymptotics for an arbitrary Q-function:

$$ Q_{A|J} \approx \prod_{a \in A} \frac{A_a x_a^{iu} u^{-\hat{\lambda}_a}}{x_a^{\frac{|A|-|I|-1}{2}}} \prod_{i \in J} \frac{B_i y_i^{-iu} u^{-\hat{v}_i}}{y_i^{\frac{|I|-|A|-1}{2}}} \frac{\prod_{a,b \in A} f_{a,b} \prod_{i,j \in I} f_{i,j}}{\prod_{a \in A} \prod_{i \in I} f_{a,i}} \quad (4.26) $$

In addition, one should consider the constraint $Q_\emptyset = 1$, which implies

$$ \sum_{1 \le a \le 4} \hat{\lambda}_a + \sum_{1 \le i \le 4} \hat{v}_i = \sum_{1 \le a, i \le 4} \delta_{xa,yi} - \sum_{1 \le a < b \le 4} \delta_{xa,xb} - \sum_{1 \le i < j \le 4} \delta_{y_i,y_j} \quad (4.27) $$

As particular cases of (4.26), the Hodge duals of $P_a$ and $Q_i$, given by $P^a = P^a/Q_\emptyset \approx \frac{1/x_a}{A_a x_a^{\frac{1}{2}iu} u^{-\hat{\lambda}_a}} \frac{\prod_{1 \le i \le 4} f_{a,i}}{\prod_{b \ne a} f_{b,a}}$ and $Q^i = Q^i/Q_\emptyset \approx \frac{1/y_i}{B_i y_i^{-\frac{1}{2}iu} u^{-\hat{v}_i}} \frac{\prod_{1 \le a \le 4} f_{a,i}}{\prod_{j \ne i} f_{j,i}}$, can be rewritten as

$$ P^a \approx A^a x_a^{-iu} u^{\hat{\lambda}_a - \sum_i \delta_{xa,yi} + \sum_{b \ne a} \delta_{xa,xb}}, \quad Q^i \approx B^i y_i^{\frac{1}{2}iu} u^{\hat{v}_i - \sum_a \delta_{xa,yi} + \sum_{j \ne i} \delta_{y_i,y_j}}, \quad (4.28) $$

where we introduce $A^a$ and $B^i$ defined by

$$ A_a A^a = \frac{1}{x_a} \frac{\prod_{1 \le i \le 4} z_{a,i}}{\prod_{b \ne a} z_{b,a}}, \quad B_i B^i = \frac{1}{y_i} \frac{\prod_{1 \le b \le 4} z_{b,i}}{\prod_{j \ne i} z_{j,i}}, \quad (\text{no sum over } a, i) \quad (4.29) $$

and use the notation

$$ z_{ab} = \begin{cases} x_b - x_a & \text{if } x_a \neq x_b \\ i \times_a (\hat{\lambda}_b - \hat{\lambda}_a) & \text{if } x_a = x_b, \end{cases} \quad \text{so that} \quad f_{ab} = z_{ab} u^{-\delta_{xa,xb}}. \quad (4.30) $$

Obviously, $z_{ai}$ and $z_{ij}$ are defined similarly, by $f_{ai} = z_{ai} u^{-\delta_{xa,yi}}$ and $f_{ij} = z_{ij} u^{-\delta_{y_i,y_j}}$.
**Relation to Cartan charges and Dynkin labels.** One can now understand how the powers $\hat{\lambda}_a$ and $\hat{\nu}_i$ are related to the SO(6) × SO(2, 4) Cartan charges $\{J_1, J_2, J_3|\Delta, S_1, S_2\}$ or, equivalently, to the corresponding SU(4) × SU(2, 2) weights

$$ 
\begin{aligned}
\lambda_1 &= \frac{J_1 + J_2 - J_3}{2}, & \lambda_2 &= \frac{J_1 - J_2 + J_3}{2}, & \lambda_3 &= \frac{-J_1 + J_2 + J_3}{2}, & \lambda_4 &= \frac{-J_1 - J_2 - J_3}{2}, \\
\nu_1 &= \frac{-\Delta + S_1 + S_2}{2}, & \nu_2 &= \frac{-\Delta - S_1 - S_2}{2}, & \nu_3 &= \frac{\Delta + S_1 - S_2}{2}, & \nu_4 &= \frac{\Delta - S_1 + S_2}{2}, & (4.31)
\end{aligned}
$$

written for the Kac-Dynkin-Vogan diagram

$$ \{Q_{0|1}, Q_{1|1}, Q_{12|1}, Q_{12|12}, Q_{12|123}, Q_{123|123}, Q_{1234|123}\} \quad (4.32) $$

which corresponds to the sl₂ ABA diagram. We associate to this diagram the ordering

$$ \hat{1} < \hat{2} < \hat{3} < \hat{4} < \hat{5}, \quad (4.33) $$

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)

$$ 
\begin{aligned}
Q_{0|1} &\sim y_1^{-iu} u^{-\nu_1}, & Q_{1|1} &\sim \left(\frac{x_1}{y_1}\right)^{iu} u^{-\nu_1-\lambda_1}, & Q_{12|1} &\sim \left(\frac{x_1 x_2}{y_1}\right)^{iu} u^{-\nu_1-\lambda_1-\lambda_2}, \\
Q_{12|12} &\sim \left(\frac{x_1 x_2}{y_1 y_2}\right)^{iu} u^{-\nu_1-\nu_2-\lambda_1-\lambda_2} \sim \left(\frac{y_3 y_4}{x_3 x_4}\right)^{iu} u^{\nu_3+\nu_4+\lambda_3+\lambda_4}, & & & & (4.34)
\end{aligned}
$$

$$ Q_{12|123} \sim \left(\frac{y_4}{x_3 x_4}\right)^{iu} u^{\nu_4+\lambda_3+\lambda_4}, \quad Q_{123|123} \sim \left(\frac{y_4}{x_4}\right)^{iu} u^{\nu_4+\lambda_4}, \quad Q_{1234|123} \sim y_4^{iu} u^{\nu_4}. $$

By comparison with (4.26), we get$^{47}$

$$ \hat{\lambda}_a = \lambda_a - \sum_{b<a} \delta_{xa} x_b + \sum_{i<a} \delta_{xai} y_i, \qquad \hat{\nu}_i = \nu_i - \sum_{j<i} \delta_{yiy_j} + \sum_{a<i} \delta_{xai} y_i. \quad (4.35) $$

Inserting these expressions into the equations (4.23) and (4.28) we obtain

$$ 
\begin{aligned}
\mathbf{P}_a &\approx A_a x_a^{iu} u^{-\lambda_a + \sum_{b<a} \delta_{xa} x_b - \sum_{i<a} \delta_{xa} y_i}, & \mathbf{P}^a &\approx A^a x_a^{-iu} u^{\lambda_a + \sum_{b>a} \delta_{xa} x_b - \sum_{i>a} \delta_{xa} y_i}, \\
\mathbf{Q}_i &\approx B_i y_i^{-iu} u^{-\nu_i - \sum_{a<i} \delta_{xa} y_i + \sum_{j<i} \delta_{yiy_j}}, & \mathbf{Q}^i &\approx B^i y_i^{iu} u^{\nu_i - \sum_{a>i} \delta_{xa} y_i + \sum_{j>i} \delta_{yiy_j}},
\end{aligned}
\quad (4.36a) $$

where

$$ A_a A^a = \frac{1}{x_a} \frac{\prod_{1 \le i \le 4} z_{a,i}}{\prod_{b \ne a} z_{b,a}}, \qquad B_i B^i = \frac{1}{y_i} \frac{\prod_{1 \le a \le 4} z_{a,i}}{\prod_{j \ne i} z_{j,i}}, \quad (4.36b) $$

<footnote>$^{47}$We notice that, as a consequence of $\sum_a \lambda_a = 0 = \sum_i \nu_i$, the condition (4.27) is satisfied by the expression (4.35).</footnote>
with

$$
\begin{align}
z_{ab} = -z_{ba} &= \begin{cases}
x_b - x_a & \text{if } x_a \neq x_b \\
\mathrm{i}\mathrm{x}_a(\lambda_b - \lambda_a - \sum_{a<c<b} \delta_{\mathrm{x}_c x_a} + \sum_{a<i<j} \delta_{\mathrm{x}_a y_i} - 1) & \text{if } x_a = x_b \text{ and } a < b,
\end{cases} \nonumber \\
z_{ij} = -z_{ji} &= \begin{cases}
y_i - y_j & \text{if } y_i \neq y_j \\
\mathrm{i}\mathrm{y}_i(\nu_j - \nu_i - \sum_{i<k<j} \delta_{\mathrm{y}_i \mathrm{y}_k} + \sum_{i<a<j} \delta_{\mathrm{x}_a y_i} - 1) & \text{if } y_i = y_j \text{ and } i < j,
\end{cases} \nonumber \\
z_{ai} = -z_{ia} &= \begin{cases}
y_i - x_a & \text{if } x_a \neq y_i \\
\mathrm{i}\mathrm{x}_a(-\lambda_a - \nu_i - \sum_{a<b<i} \delta_{\mathrm{x}_a x_b} + \sum_{a<j<i} \delta_{\mathrm{x}_a y_j}) & \text{if } x_a = y_i \text{ and } a < i, \\
\mathrm{i}\mathrm{x}_a(-\lambda_a - \nu_i + \sum_{i<b<a} \delta_{\mathrm{x}_a x_b} - \sum_{i<j<a} \delta_{\mathrm{x}_a y_j}) & \text{if } x_a = y_i \text{ and } i < a.
\end{cases} \tag{4.36c}
\end{align}
$$

For future sections, the asymptotics (4.36) will be summarized as

$$
\begin{align}
\mathbf{P}_a &\approx A_a x_a^{\frac{i}{2}u} u^{-\hat{\lambda}_a}, & \mathbf{P}^a &\approx A^a x_a^{-\frac{i}{2}u} u^{\hat{\lambda}_a^*} \tag{4.37} \\
\mathbf{Q}_i &\approx B_i y_i^{-\frac{i}{2}u} u^{-\hat{\nu}_i}, & \mathbf{Q}^i &\approx B^i y_i^{\frac{i}{2}u} u^{\hat{\nu}_i^*}, \nonumber
\end{align}
$$

where $\hat{\lambda}_a$ and $\hat{\nu}_i$ are given by (4.35), whereas $\hat{\lambda}_a^*$ and $\hat{\nu}_i^*$ are given by

$$
\hat{\lambda}_a^* = \lambda_a + \sum_{b>a} \delta_{xa} \delta_{xb} - \sum_{i>a} \delta_{xa} \delta_{yi}, \qquad \hat{\nu}_i^* = \nu_i - \sum_{a>i} \delta_{xa} \nu_i + \sum_{j>i} \delta_{yi} \nu_j. \tag{4.38}
$$

This terminates the description of the calculation of asymptotics of Q-functions, in-
cluding 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.

4.4 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 approximation.
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.

4.4.1 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 \times \mathbb{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 by

$$
\hat{\lambda}_a = \lambda_a, \qquad \hat{\nu}_i = \nu_i, \qquad \hat{\lambda}_a^* = \lambda_a, \qquad \hat{\nu}_i^* = \nu_i, \qquad a, i = 1, 2, 3, 4. \tag{4.39}
$$
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):

$$ \forall a, A_a A^a = \frac{\prod_{b \neq a} (x_a - y_j)}{x_a \prod_{b \neq a} (x_a - x_b)}, \qquad \forall j, B_j B^j = \frac{\prod_{i \neq j} (x_a - y_j)}{y_j \prod_{i \neq j} (y_i - y_j)}, \qquad (4.40) $$

recovering equation (6.13) of [3] (where it was obtained by ignoring the $u^{-\hat{\lambda}_a}$ and $u^{-\hat{\nu}_j}$ factors in (4.23)).

Notice also that from the general formula (4.26) we get

$$ Q_{a|j} \approx \frac{A_a B_j}{\sqrt{y_j/x_a} - \sqrt{x_a/y_j}} u^{-\hat{\lambda}_a - \hat{\nu}_j} \left(\frac{x_a}{y_j}\right)^{iu}, \qquad (4.41) $$

and

$$ Q_{ab|jk} \approx \frac{A_a A_b B_j B_k \left( \sqrt{\frac{x_a}{x_b}} - \sqrt{\frac{x_b}{x_a}} \right) \left( \sqrt{\frac{y_j}{y_k}} - \sqrt{\frac{y_k}{y_j}} \right) u^{-\hat{\lambda}_a - \hat{\lambda}_b - \hat{\nu}_j - \hat{\nu}_k}}{\left( \sqrt{\frac{y_j}{x_a}} - \sqrt{\frac{x_a}{x_j}} \right) \left( \sqrt{\frac{y_j}{x_b}} - \sqrt{\frac{x_b}{x_j}} \right) \left( \sqrt{\frac{y_k}{x_a}} - \sqrt{\frac{x_a}{x_k}} \right) \left( \sqrt{\frac{y_k}{x_b}} - \sqrt{\frac{x_b}{x_k}} \right)} \left( \frac{x_a x_b}{y_j y_k} \right)^{iu}, \qquad (4.42) $$

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 $\hat{\mu}_{ab}$: indeed $\hat{\mu}_{ab}$ is the linear combination of $Q_{ab|jk}$ with coefficients $\hat{\omega}^{jk}$, and these coefficients are i-periodic with constant asymptotics at large $u$, hence they are constant.

### 4.4.2 $\gamma$-deformation

If we denote all three angles of $S^5$ corresponding to the generators $\{J_1, J_2, J_3\}$ by $\{e^{i\Phi_1} = x_1 x_2, e^{i\Phi_2} = x_1 x_3, e^{i\Phi_3} = x_2 x_3\}$ the $\gamma$-deformation is given by the following choice of twists$^{48}$

$$ e^{i\Phi_a} = e^{i\epsilon_{abc}\gamma_b J_c}, \qquad a = 1, 2, 3, \qquad (4.43) $$

or

$$ \begin{aligned} x_1 &= e^{\frac{i}{2}((\gamma_2 - \gamma_1)J_3 - (\gamma_1 + \gamma_3)J_2 + (\gamma_2 + \gamma_3)J_1)}, & x_2 &= e^{\frac{i}{2}((\gamma_1 + \gamma_2)J_3 - (\gamma_2 + \gamma_3)J_1 + (\gamma_1 - \gamma_3)J_2)}, \\ x_3 &= e^{\frac{i}{2}(-(\gamma_1 + \gamma_2)J_3 + (\gamma_1 + \gamma_3)J_2 + (\gamma_3 - \gamma_2)J_1)}, & x_4 &= e^{\frac{i}{2}((\gamma_3 - \gamma_1)J_2 + (\gamma_1 - \gamma_2)J_3 + (\gamma_2 - \gamma_3)J_1)}. \end{aligned} \qquad (4.44) $$

with real $\gamma$'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

$$ \left\{ \begin{array}{l} x_1 x_2 x_3 x_4 = 1, \\ (x_1 x_2)^{J_1} (x_1 x_3)^{J_2} (x_2 x_3)^{J_3} = 1. \end{array} \right. \qquad (4.45) $$

<footnote>$^{48}$Our $\gamma_j$ as well as $\beta$ of the next subsection, coincide with [21, 80] but they are $2\pi$ times bigger than those of [86].</footnote>
Again, using the general formulae<fnref n="49" /> eqs. (4.23)–(4.35) we get for it the asymptotics (4.37) with the powers given by

$$ \hat{\lambda}_a = \lambda_a, \quad \hat{\lambda}_a^* = \lambda_a, \quad \hat{\nu}_i = \nu_i + 1 - i, \quad \hat{\nu}_i^* = \nu_i + 4 - i. \qquad (4.46) $$

The existence of shifts in some $\hat{\lambda}_a$, $\hat{\nu}_i$, $\hat{\lambda}_a^*$ and/or $\hat{\nu}_i^*$ arises as soon as several eigenvalues are equal. It comes from $\delta$ 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 $\gamma$ deformed theory we obtain from the general formula (4.36b):

$$ A_a A^a = \frac{(x_a - 1)^4}{x_a \prod_{b \neq a} (x_a - x_b)}, \qquad B_i B^i = i \frac{\prod_a (x_a - 1)}{\prod_{j \neq i} (\hat{\nu}_i - \hat{\nu}_j)}. \qquad (4.47) $$

The supersymmetry is completely broken for the generic $\gamma$'s. In section 5 we will use these results for the study of a particular state — the $\gamma$-deformed BMN vacuum — and calculate its energy in the weak coupling approximation.

### 4.4.3 $\beta$-deformation

The $\beta$-deformation is a particular case of the $\gamma$-deformation, with all three $\gamma$-twists equal $\gamma_1 = \gamma_2 = \gamma_3 = \beta$, or

$$ x_1 = e^{i\beta(J_1 - J_2)}, \quad x_2 = e^{i\beta(J_3 - J_1)}, \quad x_3 = e^{i\beta(J_2 - J_3)}, \quad x_4 = 1. \qquad (4.48) $$

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 [83].

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 (4.36a), where<fnref n="50" />

$$ \begin{gathered} \hat{\lambda}_a - \lambda_a = (0, 0, 0, 3), \qquad \hat{\nu}_i - \nu_i = (0, -1, -2, -2), \\ \hat{\lambda}_a^* - \lambda_a = (0, 0, 0, -1), \qquad \hat{\nu}_i^* - \nu_i = (2, 1, 0, 0), \end{gathered} \qquad (4.49) $$

$$ A_a A^a = \begin{cases} \frac{(x_a - 1)^3}{x_a \prod_{b \le 3} (x_a - x_b)} & \text{if } a \le 3 \\ \frac{\prod_i (\hat{\lambda}_i^* + \hat{\nu}_i)}{\prod_{b \ne 4} (1 - x_b)} & \text{if } a = 4 \end{cases}, \qquad B_i B^i = \frac{(\hat{\lambda}_4^* + \hat{\nu}_i) \prod_{a \le 3} (1 - x_a)}{\prod_{j \ne i} (\hat{\nu}_i - \hat{\nu}_j)}. \qquad (4.50) $$

The residual supersymmetry is $N=1$ and the full symmetry of the coset is $U(1) \times U(1) \times \text{PSU}(2, 2|2)$.

<footnote n="49">⁴⁹To use the equations of section 4.3, one should note that if the charges $J_a$ are non-zero then for generic $\gamma$, one has $\forall a \neq b$, $x_a \neq x_b$.</footnote>

<footnote n="50">⁵⁰For instance, the relation $\hat{\lambda}_a - \lambda_a = (0, 0, 0, 3)$ means $\hat{\lambda}_1 = \lambda_1, \dots, \hat{\lambda}_3 = \lambda_3, \hat{\lambda}_4 = \lambda_4 + 3$.</footnote>
## 5 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 $\mathrm{Tr} Z^L$ in the gamma-deformed theory. Super-symmetry 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 [21], confirming integrability-based predictions of [19].

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 [20] 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 non-twisted case [22]. 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.

### 5.1 Input data, notations, and symmetries

The BMN vacuum is characterized by the following set of charges

$$J_1 = L, \quad J_2 = J_3 = S_1 = S_2 = 0, \quad \Delta(g, \gamma_{\pm}) \le L, \qquad (5.1)$$

where equality $\Delta = L$ is reached at $g = 0$ or $\gamma_+ = 0$ or $\gamma_- = 0$. Correspondingly, the weights (4.2) are given by

$$\lambda_1 = \lambda_2 = \frac{L}{2}, \quad \lambda_3 = \lambda_4 = -\frac{L}{2}, \quad \nu_1 = \nu_2 = -\frac{\Delta}{2}, \quad \nu_3 = \nu_4 = \frac{\Delta}{2}, \qquad (5.2)$$

For this choice of charges, only $\gamma_2$ and $\gamma_3$ out of three parameters of $\gamma$-deformation are relevant, cf. (4.43), which enter in combinations $\gamma_{\pm} \equiv \frac{1}{2}(\gamma_3 \pm \gamma_2)L$. Consequently, the twists are identified as follows

$$\begin{aligned} q &\equiv x_1 = e^{i\gamma_+}, & q^{-1} &\equiv x_2 = e^{-i\gamma_+}, \\ \dot{q} &\equiv x_3 = e^{i\gamma_-}, & \dot{q}^{-1} &\equiv x_4 = e^{-i\gamma_-}. \end{aligned} \qquad (5.3)$$

and $y_i = 1$. We will also use the notation $x_{ab} \equiv 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

$$\mathbf{P}_a \approx A_a x_a^{iu} u^{-\lambda_a}, \qquad \mathbf{P}^a \approx A^a x_a^{-iu} u^{+\lambda_a}, \qquad (5.4a)$$

$$\mathbf{Q}_i \approx B_i u^{-\hat{\nu}_i}, \qquad \mathbf{Q}^i \approx B^i u^{+\hat{\nu}_i+3}, \qquad (5.4b)$$
with

$$A_a A^a = \frac{1}{x_a} \frac{(1-x_a)^4}{\prod_{b \neq a} (x_a - x_b)}, \quad B_i B^i = -i \frac{\prod_{a=1}^4 (1-x_a)}{\prod_{j \neq i} (\hat{v}_j - \hat{v}_i)} = \begin{cases} (-1)^i \frac{-i \prod_{a=1}^4 (1-x_a)}{(\Delta-2)(\Delta-3)} & \text{if } i \in \{1, 4\} \\ (-1)^i \frac{-i \prod_{a=1}^4 (1-x_a)}{(\Delta-1)(\Delta-2)} & \text{if } i \in \{2, 3\}, \end{cases} \quad (5.5)$$

and $\hat{v}_i = \nu_i + 1 - i$.

One can note that if $L = 3$ then $B_1 B^1$ and $B_4 B^4$ develop a pole as $g \to 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 \ge 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} \sim x_{ab}^{iu} u^{-\hat{\lambda}_a - \hat{\lambda}_b - \hat{\nu}_i - \hat{\nu}_j - 1}$ where $\hat{\nu}_3 > \hat{\nu}_4 > \hat{\nu}_1 > \hat{\nu}_2$. Hence, as $\omega^{ij} \sim 1$, the term with $ij = 12$ dominates in $\mu_{ab} = \frac{1}{2} Q_{ab|ij} \omega^{ij}$ (see (4.12)). Therefore, we obtain

$$\mu_{12} \sim u^{\Delta-L}, \qquad \mu_{34} \sim u^{\Delta+L}, \qquad \mu_{\alpha\dot{\alpha}} \sim u^{\Delta} x_{\alpha\dot{\alpha}}^{iu}, \quad (5.6)$$

where

$$\alpha \in \{1, 2\} \quad \text{and} \quad \dot{\alpha} \in \{3, 4\}. \quad (5.7)$$

We now introduce normalised variables $\mathbf{p}$ and $\mathbf{m}$ suitable for further analysis.

$$\mathbf{P}_a = \frac{A_a x_a^{iu}}{(g \, x)^{L/2}} \mathbf{P}_a, \qquad \mathbf{P}^a = \frac{A^a x_a^{-iu}}{(g \, x)^{L/2}} \mathbf{P}^a, \qquad \mu_{ab} = \frac{x_{ab}^{iu} A_a A_b}{g^L} \mathbf{m}_{ab}. \quad (5.8)$$

Zhukovsky variable $x$ is defined, as usually, by the relation $\frac{u}{g} = x + \frac{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) = \frac{u}{2g} \left( 1 + \sqrt{1 - \frac{4g^2}{u^2}} \right)$. For the purpose of weak coupling expansion, one should remember that $x = \frac{u}{g} - \frac{g}{u} + \dots$ at either small $g$ or large $u$, so that the expansion goes in powers of $\frac{g^2}{u^2}$.

Note in particular that the large-u behaviour of $\mathbf{p}$ is given by

$$\mathbf{p}_{\alpha} \approx 1 \approx \mathbf{p}^{\dot{\alpha}}, \qquad \mathbf{p}_{\dot{\alpha}} \approx 1 \cdot u^{L} \approx \mathbf{p}^{\alpha}. \quad (5.9)$$

We also denote by $M_{ab}$ the prefactors in the large-u asymptotic of $\mathbf{m}$ (these prefactors will be explicitly determined later):

$$\mathbf{m}_{12} \approx M_{12} \cdot u^{\Delta-L}, \qquad \mathbf{m}_{34} \approx M_{34} \cdot u^{\Delta+L}, \qquad \mathbf{m}_{\alpha\dot{\alpha}} \approx M_{\alpha\dot{\alpha}} \cdot u^{\Delta}. \quad (5.10)$$

The bosonic H-symmetry of QSC [3] is mostly destroyed by the introduction of twists, only the diagonal rescaling remains:

$$\mathbf{P}_a \to \alpha_a \mathbf{P}_a \qquad \mathbf{P}^a \to \frac{1}{\alpha_a} \mathbf{P}^a, \quad (5.11)$$
provided that $\alpha_1\alpha_2\alpha_3\alpha_4 = 1$ to preserve the $\mathrm{Pf}(\mu) = 1$ property. Hence the values of $A_a$ and $A^a$ are not fixed universally, only the product

$$ \Pi \equiv A_1 A_2 A_3 A_4 \qquad (5.12) $$

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 \leftrightarrow 2$:

$$ \begin{gathered} q \to 1/q, \dot{q} \to \dot{q}, \qquad (5.13) \\ \mathbf{P}_1 \to \mathbf{P}_2, \quad \mathbf{P}_2 \to -\mathbf{P}_1, \quad \mathbf{P}^1 \to \mathbf{P}^2, \quad \mathbf{P}^2 \to -\mathbf{P}^1, \\ \text{other } \mathbf{P} \text{ unchanged,} \\ \mu_{12} \to \mu_{12}, \quad \mu_{1\dot{\alpha}} \to \mu_{2\dot{\alpha}}, \quad \mu_{2\dot{\alpha}} \to -\mu_{2\dot{\alpha}}, \quad \mu_{34} \to \mu_{34}; \end{gathered} $$

* Exchange $3 \leftrightarrow 4$:

$$ \begin{gathered} q \to q, \dot{q} \to 1/\dot{q}, \qquad (5.14) \\ \mathbf{P}_3 \to \mathbf{P}_4, \quad \mathbf{P}_4 \to -\mathbf{P}_3, \quad \mathbf{P}^3 \to \mathbf{P}^4, \quad \mathbf{P}^4 \to -\mathbf{P}^3, \\ \text{other } \mathbf{P} \text{ unchanged,} \\ \mu_{12} \to \mu_{12}, \quad \mu_{\alpha 3} \to \mu_{\alpha 4}, \quad \mu_{\alpha 4} \to -\mu_{\alpha 3}, \quad \mu_{34} \to \mu_{34}; \end{gathered} $$

* Exchange $\{1, 2\} \leftrightarrow \{4, 3\}$ (analog of LR-symmetry in [3]):

$$ \begin{gathered} q \leftrightarrow \dot{q}, \qquad (5.15) \\ \mathbf{P}_1 \leftrightarrow +\mathbf{P}^4, \quad \mathbf{P}_2 \leftrightarrow -\mathbf{P}^3, \quad \mathbf{P}_3 \leftrightarrow +\mathbf{P}^2, \quad \mathbf{P}_4 \leftrightarrow -\mathbf{P}^1, \\ \mathbf{P}^1 \leftrightarrow -\mathbf{P}_4, \quad \mathbf{P}^2 \leftrightarrow +\mathbf{P}_3, \quad \mathbf{P}^3 \leftrightarrow -\mathbf{P}_2, \quad \mathbf{P}^4 \leftrightarrow +\mathbf{P}_1, \\ \mu_{14} \leftrightarrow \mu_{23}, \quad \text{other } \mu \text{ unchanged.} \end{gathered} $$

For instance, the answer for the conformal dimension should be invariant under replacements $q \leftrightarrow 1/q$, $\dot{q} \leftrightarrow 1/\dot{q}$, and $q \leftrightarrow \dot{q}$.

In the computations of this section, we will also routinely use the following properties, which are consequences of (5.5) and (5.3):

$$ A_1 A^1 = -A_2 A^2, \qquad A_3 A^3 = -A_4 A^4, \qquad (5.16) $$

$$ A_3 A^3 \frac{1 + \dot{q}}{1 - \dot{q}} + A_1 A^1 \frac{1 + q}{1 - q} + 1 = 0, \qquad (5.17) $$

$$ \left[ \frac{1}{x_{\alpha 3} - 1} - \frac{1}{x_{\alpha 4} - 1} \right] = (A^3 A_3) \frac{(\dot{q} + 1)^2}{(\dot{q} - 1)^2}, \quad \left[ \frac{1}{x_{1\dot{\alpha}} - 1} - \frac{1}{x_{2\dot{\alpha}} - 1} \right] = (A^1 A_1) \frac{(q + 1)^2}{(q - 1)^2}. \qquad (5.18) $$
Finally, we introduce a handy notation to work with indices: $\alpha, \beta, \dots \in \{1, 2\}$, $\dot{\alpha}, \dot{\beta}, \dots \in \{3, 4\}$. Setting the normalisation of Levi-Civita symbols as $\epsilon_{12} = \epsilon_{34} = +1$, $\epsilon^{12} = \epsilon^{34} = +1$, one defines

$$ (\epsilon \mathbf{P})_{\alpha} \equiv \epsilon_{\alpha\beta} \mathbf{P}^{\beta}, \qquad (\epsilon \mathbf{P})_{\dot{\alpha}} \equiv \epsilon_{\dot{\alpha}\dot{\beta}} \dot{\mathbf{P}}^{\dot{\beta}}, \qquad (5.19) $$

$$ (\epsilon \mathbf{P})^{\alpha} \equiv \epsilon^{\alpha\beta} \mathbf{P}_{\beta}, \qquad (\epsilon \mathbf{P})^{\dot{\alpha}} \equiv \epsilon^{\dot{\alpha}\beta} \dot{\mathbf{P}}_{\beta}, \qquad (5.20) $$

and we use this convention for other functions with the same index structure. One property which uses this notation is

$$ \frac{(\epsilon A)_{\alpha}}{A_{\alpha}} = - \frac{A_1 A^1}{A_1 A_2}, \qquad \frac{(\epsilon A)_{\dot{\alpha}}}{A_{\dot{\alpha}}} = - \frac{A_3 A^3}{A_3 A_4}, \qquad (5.21) $$

note that the r.h.s. does not depend on $\alpha$ or $\dot{\alpha}$.

## 5.2 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.<fnref n="51" /> 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 $[-2g, 2g] + i\mathbb{Z}$ degenerate into isolated poles at $u = i\mathbb{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 $\mathbf{p}$'s and $\mathbf{m}$'s at the leading order of the perturbative expansion.

First, we note that all $\mathbf{m}_{ab}$ should be polynomials at the leading order. The proof of this property was given in section 3.2.1. of [22]. We repeat it here because we will recursively apply it at higher perturbative orders: represent $\mu(u)$ and $\mu(u + i)$ as follows

$$ \mu(u) = \frac{1}{2} (\mu + \mu^{[2]}) + \sqrt{u^2 - 4g^2} \left( \frac{\mu - \mu^{[2]}}{\sqrt{u^2 - 4g^2}} \right), \qquad (5.22a) $$

$$ \mu(u + i) = \frac{1}{2} (\mu + \mu^{[2]}) - \sqrt{u^2 - 4g^2} \left( \frac{\mu - \mu^{[2]}}{\sqrt{u^2 - 4g^2}} \right). \qquad (5.22b) $$

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. $\mu + \mu^{[2]} = \mu + \tilde{\mu}$, so the singularities at $u = 0$ simply cannot develop. Hence $\mu$ is regular at $u = 0, i$ at the leading order, and the singularity at subleading orders can arise only from expansion of $\sqrt{u^2 - 4g^2}$ in front of the second bracket.

Now we use the relation $\mu_{ab}^{[2]} = \mu_{ab} + \mathbf{P}^c \mathbf{P}_b \mu_{ac} - \mathbf{P}^c \mathbf{P}_a \mu_{bc}$ and regularity of $\mathbf{P}$'s outside the real axis to recursively prove that $\mu$ has no poles at $u = i\mathbb{Z}_{>0}$ provided that $\mu$ is regular

<footnote n="51">⁵¹In the literature, some authors also call pre-wrapping order the order $g^{2L-2}$, i.e. the last of the pre-wrapping orders.</footnote>
at $u = i$. Similarly, we use the relation $\mu_{ab} = \mu_{ab}^{[2]} - \mathbf{P}^c \mathbf{P}_b \mu_{ac}^{[2]} + \mathbf{P}^c \mathbf{P}_a \mu_{bc}^{[2]}$ to recursively deduce regularity of $\mu$ in the lower half-plane from its regularity at $u = 0$. Note that all $\mu_{ab}$ should be regular at $u = 0$ and $u = i$ simultaneously because they are intertwined in the recursive procedure.

Hence we proved that $\mu$, and therefore $\mathbf{m}$, are entire functions at the leading order. Hence $\mathbf{m}$'s should be polynomials as they have power-like asymptotics.

Since $\mathbf{m}_{12} \sim u^{\Delta-L}$ and $|\Delta - L| < 1$ at small $g$, $\mathbf{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 $\mathbf{m}_{12} = M_{12}$ where the constant $M_{12}$ was defined in (5.10).

Second, from the relation $\tilde{\mathbf{P}}_a = \mu_{ab}\mathbf{P}^b$ and polynomiality of $\mathbf{m}$ we conclude that $\tilde{\mathbf{P}}_a$ is free of singularities everywhere except probably at the origin, and this property propagates to $\tilde{\mathbf{p}}_a$ and similarly we have the same absence of singularities for $\tilde{\mathbf{p}}^a$. On the other hand, consider the expansion of $\mathbf{p}$ (where $\mathbf{p}$ without index would denote in this section any of different functions $\mathbf{p}_1, \mathbf{p}_2, \mathbf{p}^3$ or $\mathbf{p}^4$) and $\tilde{\mathbf{p}}$ into the convergent series [22]:

$$ \mathbf{p} = 1 + \sum_{k=1}^{\infty} \frac{c_k}{x^k}, \qquad \tilde{\mathbf{p}} = 1 + \sum_{k=1}^{\infty} c_k x^k, \qquad (5.23) $$

which shows, in particular, that $\tilde{\mathbf{p}}$ is regular at $u = 0$. Given the mentioned analytic properties of $\tilde{\mathbf{p}}$ and its power-like large-$u$ behaviour, we deduce that $\tilde{\mathbf{p}}$ is simply a polynomial in $u$ and hence the infinite sums (5.23) are truncated at some finite number.

Third, consider the following exact relation [3]$^{52}$

$$ \mu_{\alpha\dot{\alpha}} \mu_{12}^{[2]} - \mu_{12} \mu_{\alpha\dot{\alpha}}^{[2]} = \tilde{\mathbf{P}}_{\alpha}(\epsilon\tilde{\mathbf{P}})_{\dot{\alpha}} - \mathbf{P}_{\alpha}(\epsilon\mathbf{P})_{\dot{\alpha}}. \qquad (5.24) $$

At weak coupling, a significant simplification happens on the r.h.s.: following from the definition (5.8), we have $\tilde{\mathbf{P}}_{\alpha}(\epsilon\tilde{\mathbf{P}})_{\dot{\alpha}} - \mathbf{P}_{\alpha}(\epsilon\mathbf{P})_{\dot{\alpha}} \propto x^{+L}\tilde{\mathbf{p}}_{\alpha}(\epsilon\tilde{\mathbf{p}})_{\dot{\alpha}} - x^{-L}\mathbf{p}_{\alpha}(\epsilon\mathbf{p})_{\dot{\alpha}}$. On the other hand, we see from the truncated series (5.23) that $x^{-L}\mathbf{p}_{\alpha}(\epsilon\mathbf{p})_{\dot{\alpha}}/(x^{+L}\tilde{\mathbf{p}}_{\alpha}(\epsilon\tilde{\mathbf{p}})_{\dot{\alpha}}) = \mathcal{O}(g^{2L})$. Hence $\mathbf{P}_{\alpha}(\epsilon\mathbf{P})_{\dot{\alpha}}$ is suppressed compared to $\tilde{\mathbf{P}}_{\alpha}(\epsilon\tilde{\mathbf{P}})_{\dot{\alpha}}$ 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 $\mathbf{P}_{\alpha}(\epsilon\mathbf{P})_{\dot{\alpha}}$ term from (5.24), we also use that $\mathbf{m}_{12}$ is constant and derive

$$ \mathbf{m}_{\alpha\dot{\alpha}} - \frac{1}{z_{\alpha\dot{\alpha}}} \mathbf{m}_{\alpha\dot{\alpha}}^{[2]} = - \frac{\mathbf{A}^{\dot{\alpha}} \mathbf{A}_{\dot{\alpha}}}{M_{12} \bar{\Pi}} (g x)^{+L} \tilde{\mathbf{P}}_{\alpha}(\epsilon \tilde{\mathbf{p}})_{\dot{\alpha}}, \qquad (5.25) $$

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.

$$ \begin{aligned} \tilde{\mathbf{P}}_{\alpha}(\epsilon \tilde{\mathbf{P}})_{\dot{\alpha}} - \mathbf{P}_{\alpha}(\epsilon \mathbf{P})_{\dot{\alpha}} &= \epsilon_{\dot{\alpha}\dot{\beta}} \mu^{\dot{\beta}\dot{\beta}} (\tilde{\mathbf{P}}_{\alpha} \mathbf{P}_{\dot{\beta}} - \mathbf{P}_{\alpha} \tilde{\mathbf{P}}_{\dot{\beta}}) + \epsilon_{\dot{\alpha}\dot{\beta}} \epsilon^{\dot{\beta}\dot{\gamma}} \mu^{34} (\tilde{\mathbf{P}}_{\alpha} \mathbf{P}_{\dot{\gamma}} - \mathbf{P}_{\alpha} \tilde{\mathbf{P}}_{\dot{\gamma}}) \\ &= \epsilon_{\dot{\alpha}\dot{\beta}} \epsilon_{\alpha\beta} \mu^{\dot{\beta}\dot{\beta}} (\mu_{12} - \tilde{\mu}_{12}) + \mu_{12} (\mu_{\alpha\dot{\alpha}} - \tilde{\mu}_{\alpha\dot{\alpha}}) \\ &= -\mu_{\alpha\dot{\alpha}} (\mu_{12} - \tilde{\mu}_{12}) + \mu_{12} (\mu_{\alpha\dot{\alpha}} - \tilde{\mu}_{\alpha\dot{\alpha}}) = \mu_{\alpha\dot{\alpha}} \tilde{\mu}_{12} - \mu_{12} \tilde{\mu}_{\alpha\dot{\alpha}}, \end{aligned} $$

<footnote>$^{52}$Derivation:</footnote>

<footnote>where we used $\epsilon_{\alpha\beta} \epsilon_{\dot{\alpha}\dot{\beta}} \mu^{\dot{\beta}\dot{\beta}} = \mu_{\alpha\dot{\alpha}}$.</footnote>
The leading order of $\mathfrak{m}_{\alpha\dot{\alpha}}$ 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 $(gx)^L \simeq u^L$ is already a polynomial of such degree. Hence $\tilde{\mathfrak{p}} = 1$ in this approximation.

**All pre-wrapping orders.** One can prove that $\mathfrak{p} = \tilde{\mathfrak{p}} = 1$ and $\mathfrak{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 that $\tilde{\mathfrak{p}} = 1$ at order $n$ implies that $\tilde{\mathfrak{p}}$ 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 $\mathfrak{m}_{ab}$ have no poles at $u = 0, i$ at order $n + 1$. For this, one uses that $\mathfrak{m}_{12} = \text{const}$ and hence $\mathfrak{m}_{12} - \mathfrak{m}_{12}^{[2]} = 0$ at order $n$, then equations (5.22) tell us that $\mathfrak{m}_{12}$ cannot have singularities at $u = 0, i$ at order $n + 1$. Then, in general, the singularity of any $\mu_{ab}$ at $u = 0, i$ is a singularity of the combination $\mu_{ab} - \mu_{ab}^{[2]}$ 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$ because $\tilde{\mathfrak{p}}$ is regular.<fnref n="53" />

Finally, applying the same logic as was used after equation (5.22) one concludes that $\mathfrak{m}_{ab}$ are entire functions and hence, again, polynomials. Thus, again, $\tilde{\mathfrak{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 from $\tilde{\mathfrak{p}}$. Hence, it originates from the perturbative expansion of $x^L$. One has

$$ (gx)^L = g^L \left(x^L + \frac{1}{x^L}\right) - \frac{g^L}{x^L} = [\text{a polynomial in } u] - \frac{g^{2L}}{u^L} + \mathcal{O}(g^{2L+2}), \quad (5.26) $$

hence the singularity does not emerge until the leading wrapping order $g^{2L}$ (this is also the order when $\mathbf{P}_\alpha(\epsilon\mathbf{P})_{\dot{\alpha}}$ starts to contribute).

As a conclusion, at all orders up to $g^{2L-2}$, one has

$$ \tilde{\mathfrak{p}}_1 = \tilde{\mathfrak{p}}_2 = \tilde{\mathfrak{p}}^3 = \tilde{\mathfrak{p}}^4 = 1, , \quad \mathbf{p}_1 = \mathbf{p}_2 = \mathbf{p}^3 = \mathbf{p}^4 = 1. \quad (5.27) $$

and $\mathfrak{m}_{\alpha\dot{\alpha}}$ is the polynomial solution of equation (5.25).

We introduce an operator $\Psi_z$ which satisfies the property

$$ \Psi_z(f) - \frac{1}{z} \Psi_z(f)^{++} = f, \quad (5.28) $$

We also require that $\Psi_z(f)$ is a polynomial if $f$ is a polynomial, to uniquely define the action of $\Psi$ on polynomials in the case $z \neq 1$.

Then one can write

$$ \mathfrak{m}_{\alpha\dot{\alpha}} = -\frac{A^{\dot{\alpha}} A_{\dot{\alpha}}}{M_{12} \prod z_{\alpha\dot{\alpha}}} \Psi_{z_{\alpha\dot{\alpha}}} [(gx)^L]. \quad (5.29) $$

<footnote n="53">⁵³Strictly speaking, equation (5.25) uses approximation $\mathfrak{m}_{12} = \text{const}$ which has not been proven yet at the order $n + 1$. A more careful approach is to deduce that $\mathfrak{m}_{\alpha\dot{\alpha}}/\mathfrak{m}_{12}$ is regular at $u = 0, i$ and hence $\mathfrak{m}_{\alpha\dot{\alpha}}$ is regular from (5.24) and already proven regularity of $\mathfrak{m}_{12}$ at these points.</footnote>
The remaining $\mathbf{P}$'s are found by elementary algebra from the equations of $\mathbf{P}\mu$-system:

$$ (\epsilon \mathbf{P})_{\alpha} = \frac{\tilde{\mathbf{P}}_{\alpha} - \mu_{\alpha\dot{\alpha}} \mathbf{P}^{\dot{\alpha}}}{\mu_{12}}, \quad \mathbf{P}_{\dot{\alpha}} = \frac{(\epsilon \tilde{\mathbf{P}})_{\dot{\alpha}} + \mu_{\alpha\dot{\alpha}} (\epsilon \mathbf{P})^{\alpha}}{\mu_{12}}. \qquad (5.30) $$

By considering these expressions at infinity and using that $A_a A^a$ for $a = 1, \dots, 4$ are the quantities fixed by (5.5), one finds explicit expressions for $M_{12}$ and $\Pi$:

$$ \mathbf{m}_{12} = M_{12} = \frac{1+q}{1-q}, \quad \Pi = \frac{q-1}{q+1} \frac{\dot{q}+1}{\dot{q}-1} (A^3 A_3)^2. \qquad (5.31) $$

Then the explicit expressions for $M_{\alpha\dot{\alpha}}$ follow

$$ M_{\alpha\dot{\alpha}} = \frac{x_{\alpha} - x_{\dot{\alpha}}}{2 - [2]_{\dot{q}}}. \qquad (5.32) $$

One finds $\mathbf{m}_{34}$ from $\mathrm{Pf}(\mathbf{m}) = \mathbf{m}_{12}\mathbf{m}_{34} - \mathbf{m}_{13}\mathbf{m}_{24} + \mathbf{m}_{14}\mathbf{m}_{23} \propto g^{2L} = 0$, and in particular

$$ M_{34} = \frac{1 + \dot{q} \frac{2 - [2]_q}{2 - [2]_{\dot{q}}}}{1 - \dot{q} \frac{2 - [2]_q}{2 - [2]_{\dot{q}}}}. \qquad (5.33) $$

Finally, the explicit expressions for nontrivial $\mathbf{p}$'s become

$$ \mathbf{p}_{\dot{\alpha}} = \frac{1}{M_{12}} (\mathbf{m}_{1\dot{\alpha}} - \mathbf{m}_{2\dot{\alpha}}) - (gx)^L \frac{[2]_q + [2]_{\dot{q}}}{2 - [2]_{\dot{q}}} + \mathcal{O}(g^{2L}), \qquad (5.34) $$

$$ \tilde{\mathbf{p}}_{\dot{\alpha}} = \frac{1}{M_{12}} (\mathbf{m}_{1\dot{\alpha}} - \mathbf{m}_{2\dot{\alpha}}) + \mathcal{O}(g^{2L}), \qquad (5.35) $$

$$ (-1)^{\alpha} (\epsilon \mathbf{p})_{\alpha} = \frac{1}{M_{34}} (\mathbf{m}_{\alpha 3} - \mathbf{m}_{\alpha 4}) + (gx)^L \frac{[2]_q + [2]_{\dot{q}}}{2 - [2]_q} + \mathcal{O}(g^{2L}), \qquad (5.36) $$

$$ (-1)^{\alpha} (\epsilon \tilde{\mathbf{p}})_{\alpha} = \frac{1}{M_{34}} (\mathbf{m}_{\alpha 3} - \mathbf{m}_{\alpha 4}) + \mathcal{O}(g^{2L}) \qquad (5.37) $$

Note the large-$u$ behaviour: $\mathbf{p}_{\dot{\alpha}} \simeq u^L + \dots$ but $\tilde{\mathbf{p}}_{\dot{\alpha}} \simeq \frac{2-[2]_q}{2-[2]_{\dot{q}}} u^L + \dots$.

## 5.3 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,\pm 1}$ in the physical gauge $\mathbf{T}$ [3, 53] as an input. In this section we compute the necessary Q-functions to reconstruct $T_{a,\pm 1}$. As it will be clear, these are the functions $Q_{12|\tau}$ with $\tau \in \{1, 2\}$ and $Q^{34|\tau}$ with $\tau \in \{3, 4\}$. The functions $Q^{34|\tau}$ 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:

$$ \mu_{ab}^{[2]} \mu_{ac} - \mu_{ac}^{[2]} \mu_{ab} = \epsilon_{abcd} (\tilde{\mathbf{P}}_a \tilde{\mathbf{P}}^d - \mathbf{P}_a \mathbf{P}^d). \qquad (5.38) $$

From the results of previous section we know that $\tilde{\mathbf{P}}/\mathbf{P} \propto g^{-L}$ for all $\mathbf{P}$'s, hence one always has the approximation:

$$ \mu_{ab}^{[2]} \mu_{ac} - \mu_{ac}^{[2]} \mu_{ab} = \tilde{\mathbf{P}}_a (\epsilon_{abcd} \tilde{\mathbf{P}}^d) + \dots, \qquad (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 identify $\tilde{\mathbf{P}}$'s and $\mu$'s with certain Q-functions. We perform the following identification

$$Q_{ab|12}^{-} \propto \mu_{ab}, \quad Q_{a|12} \propto \tilde{\mathbf{P}}_{a}, \quad Q^{a|34} = \frac{1}{6} \epsilon^{bcd} Q_{bcd|12} \propto \tilde{\mathbf{P}}^{a}. \qquad (5.40)$$

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

$$Q_{a|\emptyset} Q_{a|12} = Q_{a|1}^{+} Q_{a|2}^{-} - Q_{a|1}^{-} Q_{a|2}^{+} = \mathbf{P}_{a} \mathbf{Q}_{1} Q_{a|2}^{-} - (1 \leftrightarrow 2) = \mathbf{P}_{a} Q_{ac|12}^{-} \mathbf{P}^{c} \simeq \mathbf{P}_{a} \tilde{\mathbf{P}}_{a}, \quad (5.41)$$

so the conjectured Q-functions (5.40) are properly linked with $\mathbf{P}_a$ (and $\mathbf{P}^a$). We know that having $\mathbf{P}_a$ and $\mathbf{P}^a$ is sufficient, in principle, to derive all the Q-functions of QSC [3]. Hence if we found a Q-system which contains $\mathbf{P}_a$ and $\mathbf{P}^a$ with standard identification $\mathbf{P}_a = Q_{a|\emptyset}$ and $\mathbf{P}^a = Q^{a|\emptyset}$, 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 $\mu$'s and $\mathbf{P}$'s. We adapt the same strategy of restoring prefactors in the following, and to make things more precise, we define $\mathbf{q}_{A|I}$ as

$$Q_{A|I} = X_{A}^{iu} \Upsilon_{A|I} \mathbf{q}_{A|I}, \qquad (5.42)$$

where $X_A^{iu} \Upsilon_{A|I}$ are chosen in a way that $\mathbf{q}_{A|I} \simeq 1 \cdot u^{n_{A|I}}$ at large-$u$. Then we can fix the following Q-functions:

$$Q_{a|\emptyset} = \mathbf{P}_a :$$

$$\mathbf{q}_{\alpha|\emptyset} = (g x)^{-L/2}, \qquad \mathbf{q}_{\dot{\alpha}|\emptyset} = (g x)^{-L/2} \mathbf{p}_{\dot{\alpha}}. \qquad (5.43)$$

$$Q_{a|\tau}, \text{ where } \tau \in \{1, 2\}:$$

consider the equation $\mathbf{q}_{\alpha|1}^{+} \mathbf{q}_{\alpha|2}^{-} - \mathbf{q}_{\alpha|1}^{-} \mathbf{q}_{\alpha|2}^{+} \propto 1$. It is not difficult to solve it:

$$\mathbf{q}_{\alpha|1} = 1, \quad \mathbf{q}_{\alpha|2} = u + c_{\alpha}, \quad c_{\alpha} = -\frac{\dot{i}}{2} \frac{1 + x_{\alpha}}{1 - x_{\alpha}}, \qquad (5.44)$$

where the constant $c_\alpha$ is in principle arbitrary, but we have chosen it to get a particularly simple expression for $\mathbf{q}_{\emptyset|2}$ (see below).

To find $Q_{\dot{\alpha}|\tau}$, one applies a Plücker identity

$$Q_{ab|12} Q_{c|\tau} + Q_{bc|12} Q_{a|\tau} + Q_{ca|12} Q_{b|\tau} = 0 \qquad (5.45)$$

for the case $ab = 12$ and recalls that $\mu_{ab}^{+} \propto Q_{ab|12}$, getting $Q_{\dot{\alpha}|\tau} \propto -\epsilon^{\alpha\beta} \mu_{\alpha\dot{\alpha}}^{+} Q_{\beta|\tau}$. The corresponding normalised expression is

$$\mathbf{q}_{\dot{\alpha}|\tau} = \frac{1 - 1/x_{\dot{\alpha}}}{1 + q} (\mathbf{q}_{2|\tau} \mathbf{m}_{1\dot{\alpha}}^{+} + q \mathbf{q}_{1|\tau} \mathbf{m}_{2\dot{\alpha}}^{+}). \qquad (5.46)$$
$Q_{\emptyset|\tau} = Q_{\tau}$, from the relation $Q_{\alpha|\tau}^{+} - Q_{\alpha|\tau}^{-} = P_{\alpha}Q_{\tau}$:

$$q_{\emptyset|1} = (gx)^{L/2}, \quad q_{\emptyset|2} = (gx)^{L/2} u. \qquad (5.47)$$

$Q_{12|\tau}$, the QQ-relation $Q_{ab|i}Q_{a|12} = Q_{ab|12}^{+}Q_{a|i}^{-} - Q_{ab|12}^{-}Q_{a|i}^{+}$ becomes the most attractive for the case $ab = 12$, when it reduces in the asymptotic limit to

$$Q_{12|\tau} \propto \frac{P_a}{\tilde{P}_a} Q_{\tau} \propto x^{-L} Q_{\tau}. \qquad (5.48)$$

One has then explicitly

$$q_{12|1} = (gx)^{-L/2}, \quad q_{12|2} = (gx)^{-L/2} u. \qquad (5.49)$$

**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|\tau\dot{\tau}}^{-} - Q_{12|12}^{-}Q_{12|\tau\dot{\tau}}^{+} \propto Q_{12|\tau}Q_{12|12\dot{\tau}}$, which is specified in the asymptotic limit as

$$q_{12|\tau\dot{\tau}}^{+} - q_{12|\tau\dot{\tau}}^{-} \propto \epsilon_{\tau\dot{\tau}\tau'} q_{12|\tau} q_{12|\tau'}^{34\tau'}, \qquad (5.50)$$

to compute $Q_{12|\tau\dot{\tau}}$:

$$q_{12|13} = i(L-1)\Psi^{+} \left[ \frac{1}{(gx)^L} \right], \qquad (5.51a)$$

$$q_{12|14} = q_{12|23} = i(L-2)\Psi^{+} \left[ \frac{u}{(gx)^L} \right], \qquad (5.51b)$$

$$q_{12|24} = i(L-3)\Psi^{+} \left[ \frac{u^2}{(gx)^L} \right], \qquad (5.51c)$$

The action of $\Psi$ is unambiguous in the case of (5.51) and $L \ge 4$ as we require that the result is a function which decreases at $u \to \infty$ and which is analytic in the upper half-plane.

From $Pf_{ij}(Q_{12|ij}) = Q_{12|12}Q_{12|34} - Q_{12|13}Q_{12|24} + Q_{12|14}Q_{12|23} = 0$ one finds $Q_{12|34}$, and hence all $Q_{12|ij}$ are known by now.

The last steps are to restore $Q_{\alpha|\dot{\tau}}$ from

$$Q_{\alpha|\dot{\tau}} Q_{12|12} + Q_{\alpha|1} Q_{12|2\dot{\tau}} - Q_{\alpha|2} Q_{12|1\dot{\tau}} = 0, \qquad (5.52)$$

$Q_{\dot{\alpha}|\dot{\tau}}$ from

$$Q_{\dot{\alpha}|1} Q_{12|2\dot{\tau}} - Q_{\dot{\alpha}|2} Q_{12|1\dot{\tau}} + Q_{\dot{\alpha}|\dot{\tau}} Q_{12|12} = Q_{12\dot{\alpha}|12\dot{\tau}}, \qquad (5.53)$$

and, finally $Q_{\dot{\tau}}$ from $Q_{\alpha|\dot{\tau}}^{+} - Q_{\alpha|\dot{\tau}}^{-} = P_{\alpha}Q_{\dot{\tau}}$.

The function $Q_{12\dot{\alpha}|12\dot{\tau}} = -\epsilon_{\dot{\alpha}\dot{\alpha}'}\epsilon_{\dot{\tau}\dot{\tau}'}Q^{\dot{\alpha}'|\dot{\tau}'}$ is known due to LR-symmetry (5.15), and all Hodge-dual functions are most easily found using LR-symmetry.
## 5.4 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 $\Delta$ from the powers of asymptotics of appropriate functions. For example, we know that for the BMN vacuum in question $\mu_{12} \sim u^{\gamma}$, where $\gamma = \Delta - 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, $\gamma = 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 $\gamma$. 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, 39, 73, 74]

$$ \Delta - J_1 = \sum_{a=1}^{\infty} \int_{-\infty}^{\infty} \frac{dv}{2\pi i} \partial_v \tilde{p}_a(u) \log (1 + Y_{a,0}(u)), \qquad (5.54) $$

where $\frac{1}{i\tilde{g}}\tilde{p}_a(u) = \frac{1}{i\tilde{g}}a + \tilde{x}^{-[a]} - \frac{1}{\tilde{x}^{[a]}} - \tilde{x}^{[a]} + \frac{1}{\tilde{x}^{[a]}}$ is the “mirror” momentum and $Y_{a,s}$ are the Y-functions on the “mirror” sheet with long cuts. This formula was used in [20] to compute the energy of the $\gamma$-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, 53]. Then, at the end of this section, we evaluate $\log(1 + Y_{a,0})$ with single-wrapping precision as

$$ \log(1 + Y_{a,0}) \approx Y_{a,0} = \frac{1}{\frac{\mathbf{T}_{a,0} + \mathbf{T}_{a,0}^{-}}{\mathbf{T}_{a,1} \mathbf{T}_{a,1}^{-}} - 1} \approx \frac{\mathbf{T}_{a,1} \mathbf{T}_{a,1}^{-}}{\mathbf{T}_{a,0} + \mathbf{T}_{a,0}^{-}}, \qquad (5.55) $$

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 $\mathbf{T}_{a,0}$ and $\mathbf{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, 53]. 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

$$ \mathbf{T}_{a,1} = \hat{Q}_{12|i}^{[a]} \hat{Q}_{12|j}^{[-a]} (\hat{\omega}^{ij})^{[a]}, \qquad (5.56) $$
which is valid slightly above the real axis; $\hat{Q}$ notation means that the expression $\hat{Q}_{12|j}^{[-a]}$ is computed by analytic continuation from the upper half-plane to the lower half-plane using the physical kinematics.

Correspondingly,

$$ T_{a,0} = (-1)^a \frac{1}{2} \hat{Q}_{12|ij}^{[a]} \hat{Q}_{12|i'j'}^{[-a]} (\hat{\omega}^{ii'} \hat{\omega}^{jj'})^{[a-1]} . \quad (5.57) $$

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 [53] where the function $\omega$ appeared for the first time.

To accomplish the computations, we need to determine $\omega^{ij}$. In the asymptotic approximation, one finds

$$ \omega^{ij} = -\frac{1}{2}(Q^{ab|ij})^{-} \mu_{ab} = i \frac{2-[2]_q}{g^L} \frac{1}{B_1 B_2} \frac{1}{2} (Q^{ab|ij} Q_{ab|12})^{-} = i \frac{2-[2]_q}{g^L} \frac{1}{B_1 B_2} \delta_{12}^{ij}. \quad (5.58) $$

Now one can derive the explicit expression for the required T-functions:

$$ T_{a,1} = i \frac{2-[2]_q}{g^L} \frac{1}{B_1 B_2} \epsilon^{\tau \tau'} \hat{Q}_{12|\tau}^{[+a]} \hat{Q}_{12|\tau'}^{[-a]} = -(A_1 A_2)^2 \frac{2+[2]_q}{g^L} \frac{a}{(g^2 x^{[+a]} x^{-[a]})^{L/2}}, \quad (5.59a) $$

$$ T_{a,0} = (-1)^a \left( \frac{2-[2]_q}{g^L} \frac{1}{B_1 B_2} \right)^2 \hat{Q}_{12|12}^{[+a]} Q_{12|12}^{-} = (-1)^a (A_1 A_2)^2 \frac{1}{g^{2L}} \left( \frac{1+q}{1-q} \right)^2, \quad (5.59b) $$

$$ T_{a,-1} = -(A_1 A_2)^2 \left( \frac{q+1}{q-1} \frac{\dot{q}-1}{\dot{q}+1} \right)^2 \frac{2+[2]_q}{g^L} \frac{a}{(g^2 x^{[+a]} x^{-[a]})^{L/2}}, \quad (5.59c) $$

where the expression for $T_{a,-1}$ was obtained by applying LR-symmetry transformation (5.15) on (5.59a) and using $\frac{A_3 A_4}{A_1 A_2} = \frac{A_3 A_3 A_4 A_4}{\Pi} = -\frac{q+1}{q-1} \frac{\dot{q}-1}{\dot{q}+1}$.

Finally, we compute $Y_{a,0}$ in the approximation (5.55)

$$ Y_{a,0} \approx \frac{T_{a,1} T_{a,-1}}{\mu_{12}^2} = g^{2L} (\dot{q}^{1/2} - \dot{q}^{-1/2})^2 (q^{1/2} - q^{-1/2})^2 a^2 \left( g^2 x^{[a]} x^{-[a]} \right)^{-L}. \quad (5.60) $$

Let us remind that $x$ is here the function in the physical kinematics (short cuts). To compute the mirror momentum, we have to substitute $x^{[+a]} \rightarrow \tilde{x}^{[+a]}$, $x^{-[a]} \rightarrow 1/\tilde{x}^{-[a]}$.

It remains only to perform integration in (5.54) to reproduce the energy for the $\gamma$-twisted BMN vacuum in the single-wrapping approximation:

$$ \begin{aligned} E_0^{(1-\text{wrap})} &= -(q^{1/2} - q^{-1/2})^2 (\dot{q}^{1/2} - \dot{q}^{-1/2})^2 g \sum_{a=1}^{\infty} a^2 \int \frac{dv}{2\pi} \partial_v (\tilde{x}^{-[a]} - \frac{1}{\tilde{x}^{-[a]}} - \tilde{x}^{[a]} + \frac{1}{\tilde{x}^{[a]}}) \left( \frac{\tilde{x}^{[a]}}{\tilde{x}^{-[a]}} \right)^L \\ &= -(q^{1/2} - q^{-1/2})^2 (\dot{q}^{1/2} - \dot{q}^{-1/2})^2 \sum_{a=-\infty}^{\infty} a^2 \int \frac{dv}{2\pi} \frac{x^{[a]} + \frac{1}{x^{[a]}}}{x^{[a]} - \frac{1}{x^{[a]}}} \left( \frac{1}{x^{-[a]} x^{[a]}} \right)^L, \end{aligned} $$

where we used the identity $g\partial_u(x - \frac{1}{x}) = \frac{x+\frac{1}{x}}{x-\frac{1}{x}} = \frac{u}{\sqrt{4g^2-u^2}}$. 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 [19–21]. For the leading single-wrapping order $g^{2L}$, the formula becomes more explicit:

$$ 
\begin{aligned}
E_0^{(\text{leading})} &= -(q^{1/2} - q^{-1/2})^2 (\dot{q}^{1/2} - \dot{q}^{-1/2})^2 g^{2L} \sum_{a=-\infty}^{\infty} a^2 \int_{-\infty}^{\infty} \frac{dv}{2\pi} \frac{1}{(v^2 + \frac{a^2}{4})^L} = \\
&= -2(q^{1/2} - q^{-1/2})^2 (\dot{q}^{1/2} - \dot{q}^{-1/2})^2 g^{2L} \binom{2L-2}{L-1} \zeta_{2L-3}.
\end{aligned}
$$

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 [20], 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 [80]: this operator leads to a new counter-term in the action of twisted $\mathcal{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.

## 6 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 \times 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 $\mathcal{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 $\mathcal{N} = 4$ SYM, and a more general $\gamma$ deformation for the fully twisted R-symmetry where the corresponding SYM action (see e.g. [87]) 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 $\gamma$-deformed
BMN vacuum corresponding to $N=0$ deformation $N=4$ SYM in the 't Hooft limit, successfully reproducing the results of TBA computation [19, 20].

It would be interesting to perform a systematic weak and strong coupling expansion for various twisted cases similarly to [22], as well as to study the subtle limit of small twisting — the 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, 86], 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(\text{rational number})]$ (see [86] 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 [34, 41, 68]. 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 [38]. It would be good to extend the QSC methods to these cases and to perform the numerical calculations of their energy spectrum.

## Acknowledgments

We thank N.Gromov, I.Kostov, Ch.Sieg, Z.Tsuboi, M.Wilhelm, and K.Zaremba for useful discussions. We are especially grateful to N. Gromov and F. Levkovich-Maslyuk for sharing their draft of [14] before publication.

Our work was supported by the People Programme (Marie Curie Actions) of the European Union's Seventh Framework Programme FP7/2007-2013/ under REA Grant Agreement No 317089 (GATIS). The work of V.K. has received funding from the European Research Council (Programme Ideas ERC-2012-AdG 320769 AdS-CFT-solvable), from the ANR grant StrongInt (BLANC-SIMI-4-2011) and from the ESF grant HOLOGRAV-09-RNP-092.

V.K. is also very grateful to Princeton Advanced Study Institute where a part of this work was done, for hospitality and to the Ambrose Monell Foundation for the generous support during his visit in 2014. V.K. is also very grateful to the Humboldt University of Berlin for their hospitality during a part of this work and to the partial funding of this research through the Humboldt Kosmos 2015-2017 Programme of the Excellence Initiative.
# 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 $x_i = Q_{(1)}^{[N+1-2i]}$, $y_i = Q_{(1)}^{[N-1-2i]}$ for $1 \le i \le N-1$. Then one gets

$$ \star(Q_{(N-1)}^{+} \wedge \mathbf{x}) \star(Q_{(N-1)}^{-} \wedge \mathbf{y}) = \star(Q_{(N-1)}^{+} \wedge \mathbf{y}) \star(Q_{(N-1)}^{-} \wedge \mathbf{x}) \\ + \frac{f_{N-1}^{+} f_{N-1}^{-}}{f_N f_{N-2}} \star Q_{(N)} \star(Q_{(N-2)} \wedge \mathbf{x} \wedge \mathbf{y}). \quad (A.1) $$

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 $\mathbf{x}, \mathbf{y} \in \{\zeta_1, \dots, \zeta_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):

$$ \star(Q_{(l+1)}^{+} \wedge \mathbf{x}_1 \wedge \cdots \wedge \mathbf{x}_{N-l-2} \wedge \mathbf{x}) \star(Q_{(l+1)}^{-} \wedge \mathbf{x}_1 \wedge \cdots \wedge \mathbf{x}_{N-l-2} \wedge \mathbf{y}) = \\ \star(Q_{(l+1)}^{+} \wedge \mathbf{x}_1 \wedge \cdots \wedge \mathbf{x}_{N-l-2} \wedge \mathbf{y}) \star(Q_{(l+1)}^{-} \wedge \mathbf{x}_1 \wedge \cdots \wedge \mathbf{x}_{N-l-2} \wedge \mathbf{x}) \\ + \frac{f_{l+1}^{+} f_{l+1}^{-}}{f_l f_{l+2}} \star(Q_{(l+2)} \wedge \mathbf{x}_1 \wedge \cdots \wedge \mathbf{x}_{N-l-2}) \star(Q_{(l)} \wedge \mathbf{x}_1 \wedge \cdots \wedge \mathbf{x}_{N-l-2} \wedge \mathbf{x} \wedge \mathbf{y}) \quad (A.2) $$

with only three terms surviving there. If we choose $\mathbf{x}_1, \dots, \mathbf{x}_{N-l-2}, \mathbf{x}, \mathbf{y} \in \{\zeta_1, \dots, \zeta_N\}$, (A.2) reduces to the QQ-relation (2.21).

## A.2 Q-functions for the semi-infinite strip

Starting from the results of section 2.6.3, let us show that generic solutions of the Hirota equation (2.1) on the semi-infinite strip of figure 3a are given by (2.36).

First, one should note that by repeating the arguments of the section 2.6.3, the generic solution of Hirota equation on this semi-infinite strip obeys

$$ T_{a,s} = \star(Q_{(a)}^{[+s]} \wedge P_{(N-a)}^{-[s]}) \quad \text{when} \left\{ \begin{array}{l} s \ge 0 \\ \text{or } s = -1 \text{ and } a < N. \end{array} \right. \quad (A.3) $$

As compared to the section 2.6.3, this expression does not hold for $T_{N,-1}$ because the Hirota equation at $(a, s) = (N, 0)$ is modified ($T_{N+1,0} = 0$ does not hold anymore), and it does not hold for arbitrarily negative $s$ because the Hirota equation does not allow to recursively express $T_{a,s} = \frac{T_{a,s+1}^{+} T_{a,s+1}^{-} - T_{a+1,s+1} T_{a-1,s+1}}{T_{a,s+2}}$ when the denominator is equal to zero.

The requirement $T_{a,-s} = 0$ for $a = 1, 2, \dots, N-1$ can be plugged into (A.3), allowing to conclude that $P_{(1)} \propto Q_{(1)}^{[-N]}$. Indeed, we can deduce from $T_{N-1,-1} = 0$ that $P_{(1)}$ is a
linear combination $P_{(1)} = \sum_{k=2}^{N} \alpha_k Q_{(1)}^{[N-2k]}$. Hence, we have

$$0 = T_{N-2,-1} = \star \frac{Q_{(N-2)}^{-} \wedge \sum_{k=2}^{N} \alpha_{k}^{[+2]} Q_{(1)}^{[N-2k+2]} \wedge P_{(1)}}{P_{\emptyset}^{+}} \quad (A.4)$$

$$= \alpha_2^{[+2]} \star \frac{Q_{(N-1)} \wedge P_{(1)}}{P_{\emptyset}^{+} / Q_{\emptyset}^{[N-3]}} = \alpha_2^{[+2]} \frac{Q_{\emptyset}^{[N-3]}}{P_{\emptyset}^{+}} T_{N-1,0}, \quad (A.5)$$

which allows to deduce<fnref n="54" /> that $\alpha_2 = 0$. Reproducing the argument for $T_{N-3,-1}$, we obtain $\alpha_3 = 0$, and at the last step ($T_{1,-1} = 0$) we obtain $\alpha_{N-1} = 0$, which gives $P_{(1)} = \alpha_N Q_{(1)}^{[N-1]}$. Inserting this into the relation $P_{(n)} = \frac{P_{(1)}^{[n-1]} \wedge P_{(1)}^{[n-3]} \wedge \dots \wedge P_{(1)}^{[1-n]}}{\prod_{1 \le k \le n-1} P_{\emptyset}^{[n-2k]}},$ one gets $P_{(n)} = g_{(+)}^{[N-n]} g_{(-)}^{[n-N]} Q_{(n)}$, where $g_{(+)}$ and $g_{(-)}$ are two functions such that $\frac{g_{(+)}^{+}}{g_{(-)}^{-}} = \frac{P_{\emptyset}^{[1-N]}}{\alpha_N Q_{\emptyset}^{[1-2N]}}$ and $g_{(-)} = \frac{P_{\emptyset}^{[N]} - P_{\emptyset}^{[1-N]}}{Q_{\emptyset}^{[1+2N]} - Q_{\emptyset}^{[1-2N]}}$.

At this point we have shown that

$$T_{a,s} = g_{(+)}^{[a-s]} g_{(-)}^{[-a-s]} \star (Q_{(a)}^{[+s]} \wedge Q_{(N-a)}^{[-s-N]}) \quad \text{when } s \ge 0 \text{ and } 0 \le a \le N, \quad (A.6)$$

which coincides with (2.30) up to a gauge transformation. If we introduce functions $f_1, f_2, g_1$ and $g_2$ defined by $f_1^2 = g_{(-)}$, $g_1 = 1/f_1$, $f_2^2 = g_{(+)}^{[N]}$ and $g_2 = f_2^{[N]}$, then the relation (A.6) becomes $T_{a,s} = \frac{f_1^{[a+s]} f_2^{[a-s-N]}}{f_1^{[-a-s]} f_2^{[-a+s-N]}} g_1^{[a+s]} g_1^{[-a-s]} g_2^{[-a+s]} g_2^{[a+s-N]} \star (Q_{(a)}^{[+s]} \wedge Q_{(N-a)}^{[-s-N]})$. If we redefine $Q_A \mapsto g_1^{[A]} g_2^{[-A]} Q_A$, which still obeys the QQ-relations and the relation (2.22), then we obtain

$$T_{a,s} = \frac{f_1^{[a+s]} f_2^{[a-s-N]}}{f_1^{[-a-s]} f_2^{[-a+s-N]}} \star (Q_{(a)}^{[+s]} \wedge Q_{(N-a)}^{[-s-N]}) \quad \text{when } s \ge 0 \text{ and } 0 \le a \le N, \quad (A.7)$$

as we wished to prove.

### A.3 Index splitting QQ-relations

Among the numerous relations between the Q-functions, implied by the relations (2.7), (2.22), there are such that arise if we split the set $\mathcal{B} = \{1, 2, \dots, N\}$ into the disjoint union of three subsets: $\mathcal{B} = S_1 \cup S_2 \cup S_3$. If $A_1, A_2$ and $A_3$ are multi-indices with $\{A_1\} \subset S_1$ (and $\{A_2\} \subset S_2, \{A_3\} \subset S_3$), then we denote $Q_{A_1;A_2;A_3} \equiv Q_{A_1A_2A_3}$. Then we have

$$\sum_{|A|=n} Q_{A;\emptyset;S_3}^{[t]} Q^{A;\emptyset;S_3} = (-1)^n \sum_{|B|=n} Q_{\emptyset;B;S_3}^{[t]} Q^{\emptyset;B;S_3}, \quad \text{where } n \le \frac{|S_1| + |S_2| - |S_3|}{2} \\ \text{and } t \in \{p-2n, p-2n-2, \dots, -p+2n\} \text{ with } p = |S_1| + |S_2| - |S_3|, \quad (A.8)$$

where the sums run over sorted multi-indices $A \subset S_1$ and $B \subset S_2$.

<footnote n="54">⁵⁴To conclude that $\alpha_2 = 0$ we use that the T-functions are non-zero on the dots of the lattice in figure 3a, so that $\frac{Q_{\emptyset}^{[N-3]}}{P_{\emptyset}^{+}} T_{N-1,0}$ is non-zero.</footnote>
At the level of forms, if we denote $Q_{(n;p;q)} \equiv \sum_{|A|=n, |B|=p, |C|=q} Q_{A;B;C} \zeta_A \wedge \zeta_B \wedge \zeta_C$, then the relation (A.8) reads

$$Q_{(n;0;|S_3|)}^{[t]} \wedge Q_{(|S_1|-n;|S_2|;0)} = (-1)^n Q_{(0;n;|S_3|)}^{[t]} \wedge Q_{(|S_1;|S_2|-n;0)} \quad (A.9)$$

A generalization of (A.8) arises when we relax the condition $t \in \{p - 2n, p - 2n - 2, \dots, -p + 2n\}$ and allow $t = \pm(p - 2n + 2)$; this generalization reads

$$\sum_{|A|=n} Q_{A;\emptyset;S_3}^{A;\emptyset} Q_{A;\emptyset;S_3}^{[t]} = (-1)^n \sum_{|B|=n} Q_{\emptyset;B;S_3}^{[t]} Q_{\emptyset;B;S_3}^{\emptyset;B} + \varepsilon_{\pm} \sum_{|B|=n-1} Q_{\emptyset;B;S_3}^{[t\mp1]} (Q_{\emptyset;B;S_3}^{\emptyset;B})^{\pm}, \\ \text{where } p = |S_1| + |S_2| - |S_3|, \quad n \le \frac{p+1}{2}, \quad t = \pm(p-2n+2) \quad (A.10) \\ \text{and } \varepsilon_+ = (-1)^{|S_1|+|S_2|+1}, \quad \varepsilon_- = (-1)^{|S_3|}.$$

Obviously, it follows from (A.8) that the relation (A.10) can also be written as

$$\sum_{|A|=n} Q_{A;\emptyset;S_3}^{A;\emptyset} Q_{A;\emptyset;S_3}^{[t]} = (-1)^n \left( \sum_{|B|=n} Q_{\emptyset;B;S_3}^{[t]} Q_{\emptyset;B;S_3}^{\emptyset;B} - \varepsilon_{\pm} \sum_{|A|=n-1} Q_{A;\emptyset;S_3}^{[t\mp1]} (Q_{A;\emptyset;S_3}^{A;\emptyset})^{\pm} \right), \\ \text{where } p = |S_1| + |S_2| - |S_3|, \quad n \le \frac{p+1}{2}, \quad t = \pm(p-2n+2) \quad (A.11) \\ \text{and } \varepsilon_+ = (-1)^{|S_1|+|S_2|}, \quad \varepsilon_- = (-1)^{|S_3|}.$$

**Proof.** Let us now show that if Q-functions obey (2.22), (2.23), then the relation (A.8), (A.9) holds. First, one can note that (A.8) is invariant under the gauge transformation (2.34), hence it is sufficient to show that it holds when $Q_\emptyset = 1$, i.e. when the Q-functions obey (4.37). In order to simplify the notations for equations like (4.37), we will use the notation $F^{[a]\dots[b]} \equiv F^{[a]} \wedge F^{[a-2]} \wedge \dots \wedge F^{[b]}$ (for $a-b \in 2\mathbb{N}$), with the convention $F^{[a]\dots[a+2]} \equiv 1$. Then, we obtain

$$\star \left( \sum_{|A|=n} Q_{A;\emptyset;S_3}^{A;\emptyset} Q_{A;\emptyset;S_3}^{[t]} \right) = \sum_{|A|=n} Q_{\bar{A};S_2;\emptyset} \epsilon^{\bar{A}S_2AS_3} Q_{A;\emptyset;S_3}^{[t]} \zeta_B = Q_{(|S_1|-n;|S_2|;0)} \wedge Q_{(n;0;|S_3|)}^{[t]} \quad (A.12)$$

$$= \sum_{k=1}^{|S_1|} Q_{(k;|S_1|+|S_2|-n-k;0)} \wedge \sum_{k'=1}^{|S_1|} Q_{(k;0;|S_3|+n-k)}^{[t]} \quad (A.13)$$

$$= (Q_{(1;0;0)} + Q_{(0;1;0)})^{|S_1|+|S_2|-n-1} \dots [-|S_1|-|S_2|+n+1] \\ \wedge (Q_{(1;0;0)} + Q_{(0;0;1)})^{[t+|S_3|+n-1]} \dots [t-|S_3|-n+1] \quad (A.14)$$

where (A.12) uses (2.12) to rewrite the l.h.s. in terms of forms, and (A.13) is a key argument that the sums in the r.h.s. vanish if $k \neq |S_1| - n$ or $k' \neq n$, because an expression of degree $|B|$ in the $\zeta_a$'s must contain each $\zeta_a$ exactly once. Finally the expression (A.14) is obtained by using (2.22) (with the substitution $B \rightsquigarrow S_1 \sqcup S_2$, hence $Q_{(1)} \rightsquigarrow Q_{(1;0;0)} + Q_{(0;1;0)}$) to express $\sum_{k=1}^{|S_1|} Q_{(k;|S_1|+|S_2|-n-k;0)}$ (and analogously for $\sum_{k'=1}^{|S_1|} Q_{(k;0;|S_3|+n-k;0)}^{[t]}$).
<figure><img src="image_20.png" /><figcaption>**Figure 13.** Graphical representation of the equality of the expressions (A.14) (left) and (A.15) (right). Each product $F^{[a]}...[b] \equiv F^{[a]} \wedge F^{[a-2]} \wedge \dots \wedge F^{[b]}$ is represented by the expression of $F$ above a series of dots with horizontal positions $a, a-2, \dots, b$. The equality reduces to the statement that for a fixed shift $s$, one has $(\tilde{Q}_{(1;0;0)}^{[s]} + \tilde{Q}_{(0;1;0)}^{[s]}) \wedge (\tilde{Q}_{(1;0;0)}^{[s]} + \tilde{Q}_{(0;0;1)}^{[s]}) = (\tilde{Q}_{(1;0;0)}^{[s]} + \tilde{Q}_{(0;1;0)}^{[s]}) \wedge (\tilde{Q}_{(0;0;1)}^{[s]} - \tilde{Q}_{(0;1;0)}^{[s]}).$</figcaption></figure>

The r.h.s. of (A.14) can be graphically represented as the l.h.s. of figure 13.

At this point, we can notice that if $t \in \{p-2n, p-2n-2, \dots, -p+2n\}$, then the set of the shifts $\{t + |S_3| + n-1, t + |S_3| + n-3, \dots, t - |S_3| - n+1\}$ of $Q_{(1;0;0)} + Q_{(0;0;1)}$ in the second factor of (A.14) is a subset of the set of the shifts $\{|S_1| + |S_2| - n-1, |S_1| + |S_2| - n-3, \dots, -|S_1| - |S_2| + n+1\}$ of the first factor. The antisymmetry of the “wedge” product hence allows to subtract $Q_{(1;0;0)} + Q_{(0;1;0)}$ to each $Q_{(1;0;0)} + Q_{(0;0;1)}$ in the second factor, so that we get

$$ \star \left( \sum_{|A|=n} Q^{A;\emptyset;S_3} Q_{A;\emptyset;S_3}^{[t]} \right) = (Q_{(1;0;0)} + Q_{(0;1;0)})^{[|S_1|+|S_2|-n-1]} \dots [|-|S_1|-|S_2|+n+1] \wedge (Q_{(0;0;1)} - Q_{(0;1;0)})^{[t+|S_3|+n-1]} \dots [t-|S_3|-n+1] \quad (A.15) $$

$$ = \sum_{k=1}^{|S_1|} Q_{(k;|S_1|+|S_2|-n-k;0)} \wedge \sum_{k'=1}^{|S_2|} (-1)^{k'} Q_{(0;k';|S_3|+n-k')}^{[t]} \quad (A.16) $$

$$ = (-1)^n \star \left( \sum_{|B|=n} Q_{\emptyset;B;S_3}^{[t]} Q_{\emptyset;B;S_3}^{\emptyset;B} \right), \quad (A.17) $$

which proves (A.8).

Let us now show that if $t = \pm(2+p-2n)$, the same arguments lead to the three-terms relation (A.10). Let us show this for the $t = -(2+p-2n)$ case:

$$ \star \left( \sum_{|A|=n} Q^{A;\emptyset;S_3} Q_{A;\emptyset;S_3}^{[t]} \right) = Q_{(|S_1|-n;|S_2|;0)} \wedge Q_{(n;0;|S_3|)}^{[t]} \quad (A.18) $$

$$ = (Q_{(1;0;0)} + Q_{(0;1;0)})^{[|S_1|+|S_2|-n-1]} \dots [|-|S_1|-|S_2|+n+1] \wedge (Q_{(1;0;0)} + Q_{(0;0;1)})^{[t+|S_3|+n-1]} \dots [t-|S_3|-n+3] \wedge (Q_{(1;0;0)} + Q_{(0;0;1)})^{[t-|S_3|-n+1]} \quad (A.19) $$
In this expression, both the second and the third factor originate from $Q_{(n;0;|S_3|)}^{[t]}$, but these factors are such that (when $t = -(2+p-2n)$) the shifts of $Q_{(1;0;0)} + Q_{(0;0;1)}$ in the second factor is a subset of the shifts of $Q_{(1;0;0)} + Q_{(0;1;0)}$ in the first factor. Consequently, one can subtract $Q_{(1;0;0)} + Q_{(0;1;0)}$ to each $Q_{(1;0;0)} + Q_{(0;0;1)}$ in the second factor — exactly like we did when showing the equality of (A.14) and (A.15). Moreover, the condition $t = -(2+p-2n)$ implies $t - |S_3| - n + 1 = -|S_1| - |S_2| + n - 1$, and we can rewrite the last term as $(Q_{(1;0;0)} + Q_{(0;1;0)})^{[-|S_1|-|S_2|+n-1]} + (Q_{(0;0;1)} - Q_{(0;1;0)})^{[t-|S_3|-n+1]}$:

$$ = (Q_{(1;0;0)} + Q_{(0;1;0)})^{[|S_1|+|S_2|-n-1]...[-|S_1|-|S_2|+n+1]} \wedge (Q_{(0;0;1)} - Q_{(0;1;0)})^{[t+|S_3|+n-1]...[t-|S_3|-n+3]} \quad (A.20) $$

$$ \begin{aligned} & \wedge \left( (Q_{(1;0;0)} + Q_{(0;1;0)})^{-|S_1|-|S_2|+n-1} + (Q_{(0;0;1)} - Q_{(0;1;0)})^{[t-|S_3|-n+1]} \right) \\ & = (-1)^{|S_3|} Q_{(|S_1|;|S_2|-n+1;0)}^{-} \wedge Q_{(0;n-1;|S_3|)}^{[t+1]} \\ & \quad + (-1)^n Q_{(|S_1|;|S_2|-n;0)} \wedge Q_{(0;n;|S_3|)}^{[t]} \end{aligned} \quad (A.21) $$

where the first (resp. second) term of (A.21) is obtained by keeping the first (resp. second) term of the last factor in (A.20). Finally, (A.21) proves

$$ \sum_{|A|=n} Q^{A;\emptyset;S_3} Q_{A;\emptyset;S_3}^{[t]} = (-1)^n \sum_{|B|=n} Q_{\emptyset;B;S_3}^{[t]} Q^{\emptyset;B;S_3} + (-1)^{|S_3|} \sum_{|B|=n-1} Q_{\emptyset;B;S_3}^{[t+1]} (Q^{\emptyset;B;S_3})^{-}, \quad (A.22) $$

which is the $t = -(2+p-2n)$ case of the relation (A.10). The proof of the $t = 2+p-2n$ case is identical.

## A.4 Example of a non-Wronskian solution to the Hirota equation

In the main text, we wrote the generic solution to Hirota equation, but one should keep in mind that there exist degenerate solutions of Hirota equations which do not have a Wronskian form.

As an example, for any $G_1, G_2 \in SU(3)$, the function

$$ T_{a,s}(u) = \begin{cases} 1 & \text{if } a = 0 \text{ or } a = 3 \\ \chi_{a,s}(G_1) & \text{if } s \ge 0 \text{ and } 0 \le a \le 3 \\ \chi_{a,-4-s}(G_2) & \text{if } s \le -4 \text{ and } 0 \le a \le 3 \\ 0 & \text{otherwise} \end{cases} \quad (A.23) $$

obeys the Hirota equation on the infinite strip of figure 6 (with size $N=3$), but it cannot be written in the form (2.29). Indeed, if $T$ could be written in the form (2.29), then by applying the arguments of section 2.6.3 at $s_0 = -3$, the functions $Q_1, Q_2$ and $Q_3$ would obey

$$ \begin{vmatrix} Q_i & Q_i^{[+2]} & Q_i^{[+4]} & Q_i^{[+6]} \\ 0 & 0 & 0 & 1 \\ 0 & 0 & 1 & \operatorname{tr}(g_1) \\ 0 & 1 & \operatorname{tr}(g_1) & \chi_{1,2}(g_1) \end{vmatrix} = 0. \quad (A.24) $$

This would imply that $Q_1 = Q_2 = Q_3 = 0$, which contradicts the fact that $T_{1,0} \ne 0$.
## A.5 Derivation of the Baxter equation in the form (2.62)

Consider first the operator $\tilde{O}(u; a, s) = T_{a,s} e^{\frac{i}{2}\partial_u - \partial_a} \frac{1}{T_{a,s}} - T_{a,s-1}^{+} e^{+\partial_s - \partial_a} \frac{1}{T_{a,s-1}^{+}}$. It was constructed to have the property

$$F_{a,s}(u) = \tilde{O}(u; a, s)F_{a,s}(u), \qquad (A.25)$$

which can be checked using (2.54a). First, we know that $F_{N,s} = 0$. On the other hand, $\tilde{O}^N F_{a,s}$ evaluated at $a = N$ is a certain linear combination of $F_{0,s+k}^{[N-k]}$ with $k = 0, 1, \dots, N$. Using $F_{0,s} = \pm Q_{\emptyset}^{[s]}(Q^b)^{[-s-N+1]}$, one can write

$$0 = (\tilde{O}^N F_{a,s})_{|a=N} = Q_{\emptyset}^{[s+N]} \tilde{O}^N (Q^b)^{[-s-N+1]}_{|a=N}. \qquad (A.26)$$

Thus we derived the Baxter equation $\tilde{O}^N W(u - \frac{i}{2})_{|a=N} = 0$ which is solved by $W = (Q^b)^{[-N+1]}$. To get from here the Baxter equation (2.62) which is solved by $Q_b$, we simply note that, according to (2.31), substitution $T_{a,s} \to T_{a,-N-s}$ changes the role of $Q_b$ and $Q^b$.

## 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

$$Q_{(n|n)} \wedge Q_{(1|1)} = (-1)^n (n+1) Q_{\emptyset} Q_{(n+1|n+1)}, \qquad (A.27)$$

which is equivalent to (2.76). For simplicity, we first assume that $|\mathcal{B}| = |\mathcal{F}| = n+1$. In this case, we obtain (A.27) as follows:

$$ \begin{aligned} \star (Q_{(n|n)} \wedge Q_{(1|1)}) &= (-1)^n \sum_{\substack{a \in \mathcal{B} \\ i \in \mathcal{F}}} \epsilon_{\bar{a}a} \epsilon_{ii} Q_{\bar{a}|i} Q_{a|i} = (-1)^n \sum_{\substack{a \in \mathcal{B} \\ i \in \mathcal{F}}} \epsilon_{\bar{a}a} \epsilon_{ii} q_{\bar{a}|i} q_{a|i} \\ &= -\sum_{\substack{a \in \mathcal{B} \\ i \in \mathcal{F}}} \epsilon_{a\bar{a}} \epsilon_{ii} \star (q_{(n+1)} \wedge \xi_a \wedge \xi_i) \star (q_{(n+1)} \wedge \xi_{\bar{a}} \wedge \xi_i) \\ &= n \sum_{\substack{a \in \mathcal{B} \\ j \in \mathcal{F}}} \epsilon_{a\bar{a}} \epsilon_{jj} \star (q_{(n+1)} \wedge \xi_a \wedge \xi_j) \star (q_{(n+1)} \wedge \xi_{\bar{a}} \wedge \xi_j) \\ &\quad - \sum_{\substack{a \in \mathcal{B} \\ i \in \mathcal{F}}} \epsilon_{a\bar{a}} \epsilon_{ii} \star (q_{(n+1)} \wedge \xi_i \wedge \xi_{\bar{i}}) \star (q_{(n+1)} \wedge \xi_{\bar{a}} \wedge \xi_a). \end{aligned} \qquad (A.28) $$

The last equality is the Plücker identity:<fnref n="55" /> the last term in the r.h.s. corresponds to the exchange $\xi_i \leftrightarrow \xi_a$ and the other term corresponds to the exchange $\xi_i \leftrightarrow \xi_j$ with $j \in \bar{i}$ ($\xi_j$ appears in the product $\xi_{\bar{i}} = \xi_{j_1} \wedge \xi_{j_2} \wedge \dots$ where $\bar{i} = j_1, j_2, \dots$). Noticing that in this last

<footnote n="55">⁵⁵In order to write this Plücker identity, it is important to note that $q_{(n+1)} = \frac{q_{(1)}^{[n]} \wedge q_{(1)}^{[n-2]} \wedge \dots \wedge q_{(1)}^{[-n]}}{\prod_{k=1}^{n-1} q_{\emptyset}^{[-n-1+2k]}}$.</footnote>
equality, the first term of the r.h.s. is equal to the l.h.s. (up to a factor $-n$), we obtain$^{56}$

$$ \begin{aligned} \star (Q_{(n|n)} \wedge Q_{(1|1)}) &= -\frac{1}{n+1} \sum_{\substack{a \in \mathcal{B} \\ i \in \mathcal{F}}} \epsilon_{a\bar{a}} \epsilon_{ii} \star (q_{(n+1)} \wedge \xi_i \wedge \xi_i) \star (q_{(n+1)} \wedge \xi_{\bar{a}} \wedge \xi_a) \\ &= \frac{(-1)^n}{n+1} (n+1)^2 q_{\mathcal{B}} q_{\mathcal{F}} = (-1)^n (n+1) Q_{\emptyset} Q_{\emptyset} \\ &= (-1)^n (n+1) \star (Q_{\emptyset} Q_{(n+1|n+1)}), \end{aligned} \quad (A.29) $$

which proves (2.76) when $|\mathcal{B}| = |\mathcal{F}| = n+1$.

In order to show that (2.76) holds also when $|\mathcal{B}| \ge n+1$ or $|\mathcal{F}| \ge n+1$, we simply use the fact that the QQ-relations are not sensible to the numbers $|\mathcal{B}|$ and $|\mathcal{F}|$ of indices.

First, we rewrite (2.76) in terms of coordinates as

$$ Q_{A|I} = \frac{1}{n+1} \sum_{\substack{a \in A \\ i \in I}} Q_{(A \setminus a)|(I \setminus i)} Q_{a|i} \epsilon_{(A \setminus a)a} \epsilon_{(I \setminus I)i}, \quad \text{where } |A| = |I| = n \quad (A.30) $$

where $(A \setminus a)$ (resp $(I \setminus i)$) denotes a multi-index corresponding to the set $\{A\} \setminus \{a\}$ (resp $\{I\} \setminus \{i\}$). Equation (A.30) holds without condition on $|\mathcal{B}|$ and $|\mathcal{F}|$, because for any $A$ and $I$, we can restrict QQ-relations to the subset of the Q-functions $Q_{B,J}$ where $B \subset A$ and $J \subset I$ — in other words we set $\mathcal{B} = A$ and $\mathcal{F} = I$. For this subset of Q-functions, the above proof holds, because we have artificially enforced $|\mathcal{B}| = |\mathcal{F}| = n+1$.

Hence we have proven (A.27) for arbitrary $n$ — without any condition on $|\mathcal{B}|$ and $|\mathcal{F}|$. This means that we have proven (2.76).

**Proof of (2.77)–(2.78).** By the same argument as above, we can assume that $|\mathcal{B}| = n$ and $|\mathcal{F}| = p$ without loss of generality (using the fact that the relation (2.80) is not sensible to $|\mathcal{B}|$ and $|\mathcal{F}|$).

Then, we have

$$ Q_{(p|p)}^{[t]} \wedge Q_{(n-p|0)} = (-1)^{p(n-p)} q_{(p;0)}^{[t]} \wedge q_{(n-p;p)} = (-1)^{np} q_{(0;p)}^{[t]} \wedge q_{(n;0)} = Q_{(n|p)} Q_{\emptyset}^{[t]}, \quad (A.31) $$

where the first equality uses the bosonization trick (2.66) and the second equality is the relation (A.9) with $S_1 = \mathcal{B}$, $S_2 = \mathcal{F}$ and $S_3 = \emptyset$ and $n = p$. This proves (2.77).

Obviously, (2.78) is obtained by exchanging the roles of bosonic and fermionic indices (see (2.80)–(2.81)).

**Proof of (2.83).** If we set $A = \mathcal{B}$ and $I = \bar{J}$ in (2.80), then we get

$$ Q^{\emptyset|J} = \sum_{|C|=n} \frac{(Q^{C|J})^{[t]}}{Q_{\emptyset}^{[t]}} Q_{C|\emptyset}. \quad (A.32) $$

Remembering that the functions $Q^{A|I}$ obey exactly the same QQ-relation as $Q_{A|I}$, we can substitute $Q_{A|I} \rightarrow Q^{A|I}$ (and hence $Q^{A|I} \rightarrow (-1)^{|A|+|\bar{I}|} \epsilon^{\bar{A}A} \epsilon^{\bar{I}I} Q^{\bar{A}|\bar{I}} = (-1)^{(|A|+|I|)(|\bar{A}|+|\bar{I}|)} Q_{A|I}$) and get exactly (2.83).

<footnote>$^{56}$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.</footnote>
**Proof of (2.85).** Let us see how the equation (2.85) arises from (2.76): let $|I|$ and $|J|$ be fermionic multi-indices such that $|J| - |I| = |\mathcal{F}| - |\mathcal{B}| \ge 0$, then

$$ \sum_{|A|=|I|} Q_{A|I} Q^{A|J} = \sum_{|A|=|I|} (-1)^{|A|+|\bar{A}|} \epsilon^{\bar{A}A} \epsilon^{\bar{J}J} Q_{A|I} Q_{\bar{A}|\bar{J}} \quad (A.33) $$

where one can note that, on the r.h.s., $|A| = |I|$ and $|\bar{A}| = |\bar{J}|$, which allows to use (2.79) to express the Q-functions of the r.h.s, and get

$$ = \frac{\epsilon^{\bar{J}\bar{J}}}{(Q_{\emptyset})^{|\mathcal{B}|-2}} \det_{\substack{a \in \mathcal{B} \\ i \in I, \bar{J}}} Q_{a,i}. \quad (A.34) $$

By comparison, we can now study the r.h.s. of (2.85): there is at most one non-vanishing term in the sum in the r.h.s: the term where $\{L\} = \{J\} \setminus \{I\}$, if $\{I\} \subset \{J\}$. If $\{I\} \not\subset \{J\}$, then the r.h.s. is zero, while the expression (A.34) of the l.h.s. is also zero because two columns of the determinant are equal. If $\{I\} \subset \{J\}$, let us denote by $L$ the sorted multi-index such that $\{L\} = \{J\} \setminus \{I\}$. Then we have:

$$ \begin{aligned} Q^{\emptyset|L} Q_{\emptyset|\emptyset} &= \epsilon^{I\bar{J}L} Q_{\emptyset|I\bar{J}} Q_{\emptyset|\emptyset} = (-1)^{|I|+|\bar{J}L|} \epsilon^{\bar{J}LI} Q_{\emptyset|I\bar{J}} Q_{\emptyset|\emptyset} \\ &= (-1)^{|I|+|\bar{J}L|} \delta_{J}^{LI} \epsilon^{\bar{J}J} Q_{\emptyset|I\bar{J}} Q_{\emptyset|\emptyset} = (-1)^{|I|(|\mathcal{F}|+1)} \delta_{J}^{LI} \epsilon^{\bar{J}J} Q_{\emptyset|I\bar{J}} Q_{\emptyset|\emptyset} \end{aligned} \quad (A.35) $$

Then, from (A.35), (2.79) and (A.34) we get (2.85).

**Proof of (2.86).** Denoting $n = |\mathcal{B}| - |\mathcal{F}|$ and assuming that $n > 0$, one gets

$$ \begin{aligned} \sum_{a \in \mathcal{B}} Q_a^{[+t]} Q^a &= \sum_{a \in \mathcal{B}} Q_a^{[+t]} (-1)^{|\mathcal{F}|} \epsilon^{\bar{a}a} Q_{\bar{a}|\emptyset} = (-1)^{|\mathcal{F}|+|\mathcal{B}|-1} Q_{(1|0)}^{[+t]} \wedge Q_{(|\mathcal{B}|-1||\mathcal{F}|)} \\ &= (-1)^{n+1} Q_{(1|0)}^{[+t]} \wedge Q_{(n-1|0)} \wedge \frac{Q_{\emptyset}^{[n-1]}}{Q_{\emptyset}^{[n-1]}}. \end{aligned} \quad (A.36) $$

One can note that since $Q_{(n-1|0)}$ does not involve fermionic indices, it is given by $Q_{(n-1|0)} = \frac{Q_{(1|0)}^{[n-2]} \wedge Q_{(1|0)}^{[n-4]} \wedge \dots \wedge Q_{(1|0)}^{[2-n]}}{\prod_{k=1}^{n-2} Q_{(\emptyset)}^{[-n+1+2k]}}$, as in (2.22). Hence, the r.h.s. of (A.36) vanishes if $t \in \{n-2, n-4, \dots, -n+2\}$ because $Q_{(1|0)}^{[+t]} \wedge Q_{(n-1|0)} = 0$. By contrast, if $t = \pm n$ then we get

$$ \begin{aligned} \sum_{a \in \mathcal{B}} Q_a^{[\pm n]} Q^a &= (-1)^{n+1} Q_{\emptyset}^{[\pm(n-1)]} Q_{(n|0)}^{\pm} \wedge \frac{Q_{(\emptyset||\mathcal{F})}^{[n-1]}}{Q_{\emptyset}^{[n-1]}} \\ &= (-1)^{n+1} Q_{\emptyset}^{[\pm(n-1)]} (Q^{\emptyset})^{\pm}. \end{aligned} \quad (A.37) $$

**Proof of (2.87).** The relation (2.87) is a particular case of (A.10): if we assume that $|\mathcal{B}| = |\mathcal{F}|$ then we have

$$ \begin{aligned} (Q^{\emptyset})^{-} Q_{\emptyset}^{+} &= q_{\mathcal{B};\emptyset}^{-} q_{\emptyset;\mathcal{F}}^{+} = (-1)^{|\mathcal{F}|} q_{\mathcal{B};\emptyset}^{-} (q^{\mathcal{B};\emptyset})^{+} \\ &= q_{\emptyset;\mathcal{F}}^{-} (q^{\emptyset;\mathcal{F}})^{+} - \sum_{b \in \mathcal{B}} q_{\bar{b};0} q^{\bar{b};0} \\ &= Q_{\emptyset}^{-} (Q^{\emptyset})^{+} + \sum_{b \in \mathcal{B}} Q_{b|\emptyset} Q^{b|\emptyset}, \end{aligned} \quad (A.38) $$
where the third equality is the relation (A.11) with $S_1 = \mathcal{B}$, $S_2 = \mathcal{F}$, $S_3 = \emptyset$, $n = |\mathcal{B}| = |\mathcal{F}|$ and $t = -2$, and in the fourth equality we substitute $q^{\tilde{b};0} = \epsilon^{\tilde{b}\tilde{b}}Q_{b|\emptyset}$ and $q_{\tilde{b};0} = (-1)^{|\mathcal{F}|}\epsilon^{\tilde{b}\tilde{b}}Q^{b|\emptyset}$ 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 $\tilde{a} \le \tilde{s} \le -\tilde{a}$, 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 $\tilde{a} = \tilde{s} \ge 0$ (resp. $\tilde{a} = -\tilde{s} \ge 0$), i.e. on the diagonal joining the “right strip” (resp the “left strip”) to the “upper strip” of figure 8.

(c) The Hirota equation is satisfied outside the diagonals, i.e. when $|\tilde{s}| \neq \tilde{a}$.

(d) The Hirota equation is satisfied when $\tilde{a} = \tilde{s} > 0$ and when $\tilde{a} = -\tilde{s} > 0$, i.e. on all the diagonals defining the border of the “upper strip” of figure 8 except their intersection.

(e) If the point $(s_0, a_0)$ (where the diagonals intersect) belongs to the T-hook (i.e. if $K_1 + K_2 \ge m$ and $k+m$ is odd), the Hirota equation is satisfied at this point as well.

The statements (a) and (b) mean that (2.95a)-(2.95c) defines indeed a function $T_{a,s}$, whereas the statements (c)-(e) mean that this function obeys the Hirota equation.

**a): intersection of the right and left strips.** As we will detail now, the relation (A.9) immediately implies that the expressions (2.95a) and (2.95c) coincide on the intersection of the right and left strips: assuming that $\tilde{a} \le \tilde{s} \le -\tilde{a}$, i.e. $a - \frac{K-M}{2} \le \tilde{s} \le -a + \frac{K-M}{2}$, we have

$$Q_{(a,0|0)}^{[\tilde{s}]} \wedge Q_{(K_1-a,K_2|M)}^{[-\tilde{s}]} = (-1)^{M(K-a)} q_{(a;0|M)}^{[\tilde{s}]} \wedge q_{(K_1-a,K_2|0)}^{[-\tilde{s}]} \quad (A.39)$$

$$= (-1)^{M(K-a)+a} q_{(0;a|M)}^{[\tilde{s}]} \wedge q_{(K_1,K_2-a|0)}^{[-\tilde{s}]} \quad (A.40)$$

$$= (-1)^a Q_{(0,a|0)}^{[+\tilde{s}]} \wedge Q_{(K_1,K_2-a|M)}^{[-\tilde{s}]} \quad (A.41)$$

$$= (-1)^{a(K+M)} Q_{(K_1,K_2-a|M)}^{[-\tilde{s}]} \wedge Q_{(0,a|0)}^{[+\tilde{s}]} \quad (A.42)$$

where the first and third equalities are the bosonization trick, and the second equality is (A.9), with $S_1 = \mathcal{B}_2$, $S_2 = \mathcal{F}$, $S_3 = \mathcal{B}_1$, $n = K_2 - a$, and $t = -2\tilde{s}$; in this equality, the condition $t \in \{p-2n, p-2n-2, \dots, -p+2n\}$ is exactly the condition $\tilde{a} \le \tilde{s} \le -\tilde{a}$ which defines the intersection of the left and write strip.

From (A.42) we see that the expressions (2.95a) and (2.95c) coincide on the intersection of the left and write strip, since $\varepsilon_l(a, s) = (-1)^{a(K+M)}\varepsilon_u(a, s)$.
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 \ge -s + K_2 - M_2$) while the result for other diagonal (i.e. $a = -s + K_2 - M_2 \ge s + K_1 - M_1$) has an identical proof. Assuming that $a = s + K_1 - M_1 \ge -s + K_2 - M_2$, we have

$$Q_{(a,0|0)}^{[\tilde{s}]} \wedge Q_{(K_1-a;K_2|M)}^{[-\tilde{s}]} = (-1)^{M(k+a)} q_{(a;0|M)}^{[\tilde{s}]} \wedge q_{(K_1-a;K_2;0)}^{[-\tilde{s}]} \quad (A.43)$$

$$= (-1)^{M(k+a)+K_1-a} q_{(K_1;0;M+a-K_1)}^{[\tilde{s}]} \wedge q_{(0;K_2;K_1-a)}^{[-\tilde{s}]} \quad (A.44)$$

$$= (-1)^{M(k+a)+K_1-a+M} q_{(K_1;0|K_1-a)}^{[\tilde{s}]} \wedge q_{(0;K_2|M+a-K_1)}^{[-\tilde{s}]} \quad (A.45)$$

$$= (-1)^{(M+1)(K_1+a)} Q_{(K_1;0|M_1-s)}^{[\tilde{a}]} \wedge q_{(0;K_2|M_2+s)}^{[-\tilde{a}]} \quad (A.46)$$

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 = \mathcal{F}$, $n = a$ and $t = 2\tilde{s}$. From the condition $a = s + K_1 - M_1 \ge -s + K_2 - M_2$ characterizing the diagonal between the upper strip and the right strip, one sees that $n \le \frac{|S_1|+|S_2|-|S_3|}{2}$ and $s = -|S_1| + |S_2| - |S_3| + 2n$, so that the conditions of relation (A.9) do hold. Finally, the third equality (A.45) is the bosonization trick (2.66) while the last equality is a rewriting of the result (using the condition $a = s + K_1 - M_1 \ge -s + K_2 - M_2$) to match the expression (2.95b) of the T-functions in the upper-strip (one can note that on this diagonal $\varepsilon_u(a, s) = (-1)^{(M+1)(K_1+a)}\varepsilon_r(a, s)$).

c): **Hirota equation outside the diagonals.** On each strip, the T-functions (2.95a)-(2.95c) have the form (2.29), up to an irrelevant sign. Hence it is clear that they obey the Hirota equation (as long as the nodes $(a, s)$, $(a+1, s)$, $(a-1, s)$, $(a, s+1)$ and $(a, s-1)$ lie on the same strip of the T-hook, i.e. as long as $(a, s)$ does not lie on a diagonal).

d): **Hirota equation on the diagonals.** We will focus on the diagonal between the upper strip and the right strip (i.e. the case $a = s + K_1 - M_1 \ge -s + K_2 - M_2$) while the result for other diagonal (i.e. $a = -s + K_2 - M_2 \ge s + K_1 - M_1$) has an identical proof. In the present proof of the Hirota equation, we denote$^{57}$

$$\tilde{T}_{a,s} = \varepsilon_r(a, s) \star (Q_{(a,0|0)}^{[\tilde{s}]} \wedge Q_{(K_1-a,K_2|m)}^{[-\tilde{s}]}), \quad (A.47)$$

so that $\tilde{T}_{a,s} = T_{a,s}$ if $\tilde{s} \ge \tilde{a}$. It has the form (2.29) (up to an irrelevant sign) hence it obeys the Hirota equation $\tilde{T}_{a,s}^+ \tilde{T}_{a,s}^- = \tilde{T}_{a+1,s} \tilde{T}_{a-1,s} + \tilde{T}_{a,s+1} \tilde{T}_{a,s-1}$. When $(a, s)$ lies on the diagonal, we have $\tilde{T}_{a,s} = T_{a,s}$, $\tilde{T}_{a,s+1} = T_{a,s+1}$ and $\tilde{T}_{a-1,s} = T_{a-1,s}$, hence

$$T_{a,s}^{+} T_{a,s}^{-} = \tilde{T}_{a+1,s} T_{a-1,s} + T_{a,s+1} \tilde{T}_{a,s-1}, \quad \text{when } \tilde{a} = \tilde{s}. \quad (A.48)$$

Therefore, the Hirota equation $T_{a,s}^+ T_{a,s}^- = T_{a+1,s} T_{a-1,s} + T_{a,s+1} T_{a,s-1}$ is equivalent to the statement

$$(\tilde{T}_{a+1,s} - T_{a+1,s}) T_{a-1,s} + T_{a,s+1} (\tilde{T}_{a,s-1} - T_{a,s-1}) = 0, \quad (A.49)$$

<footnote>$^{57}$The factor $\varepsilon_r(a, s)$ appearing in equation (A.47) was defined in (2.96).</footnote>
which actually follows from the relation$^{58}$

$$ \tilde{T}_{a+1,s} - T_{a+1,s} = -(-1)^{K_1-a} T_{a,s+1} \quad \tilde{T}_{a,s-1} - T_{a,s-1} = (-1)^{K_1-a} T_{a-1,s} \quad \text{when } \tilde{a} = \tilde{s}. \tag{A.50} $$

This relation (A.50) can be proven as follows

$$ \star T_{a,s+1} = \varepsilon_r(a, s+1) Q_{(a,0|0)}^{[\tilde{s}+1]} \wedge Q_{(K_1-a,K_2|M)}^{-[\tilde{s}-1]} \tag{A.51} $$

$$ = \varepsilon_r(a, s+1)(-1)^{M(K-a)} q_{(a;0;M)}^{[\tilde{s}+1]} \wedge q_{(K_1-a;K_2;0)}^{-[\tilde{s}-1]} \tag{A.52} $$

$$ = \varepsilon_r(a, s+1)(-1)^{M(K-a)} \left( (-1)^{K_1-a} q_{(K_1;0;M-K_1+a)}^{[\tilde{s}+1]} \wedge q_{(0;K_2;K_1-a)}^{-[\tilde{s}-1]} \right. \\ \left. \qquad + (-1)^{K-a-1} q_{(a+1;0;M)}^{[\tilde{s}]} \wedge q_{(K_1-a-1;K_2;0)}^{-[\tilde{s}]} \right) \tag{A.53} $$

$$ = \varepsilon_r(a, s+1)(-1)^{M(K-a)} \left( (-1)^{K_1-a+MK_2} Q_{(K_1,0|K_1-a)}^{[\tilde{s}+1]} \wedge Q_{(0,K_2|M-K_1+a)}^{-[\tilde{s}-1]} \right. \\ \left. \qquad + (-1)^{(K-a-1)(M+1)} Q_{(a+1,0|0)}^{[\tilde{s}]} \wedge Q_{(K_1-a-1,K_2|M)}^{-[\tilde{s}]} \right) \tag{A.54} $$

$$ = \varepsilon_r(a, s+1) \left( \begin{aligned} & (-1)^{(M+1)(K_1-a)} \star T_{a+1,s} / \varepsilon_u(a+1,s) \\ & + (-1)^{M+K-a+1} \star \tilde{T}_{a+1,s} / \varepsilon_r(a+1,s) \end{aligned} \right) \tag{A.55} $$

$$ = (-1)^{K_1-a} \star (T_{a+1,s} - \tilde{T}_{a+1,s}), \tag{A.56} $$

where the key point is the third equality, which is the relation (A.11) with $n = K_1 - a$, $S_1 = B_1$, $S_2 = \mathcal{F}$, $S_3 = B_2$ and $t = -2\tilde{s} - 2 = -(p - 2n + 2)$. The relation $\tilde{T}_{a,s-1} - T_{a,s-1} = (-1)^{K_1-a} T_{a-1,s}$ follows from $\tilde{T}_{a+1,s} - T_{a+1,s} = -(-1)^{K_1-a} T_{a,s+1}$ (by setting $a \to a-1$ and $s \to s-1$), and it concludes the proof of (A.50), showing that the Hirota equation holds on the diagonal delimiting the upper and the right strip.

**e): Hirota equation at the intersection of the diagonals.** The proof follows the same lines as the proof of case d) above: one should prove that (A.50) holds at the node $\tilde{a} = \tilde{s} = 0$. The previous proof already shows that $\tilde{T}_{a+1,s} - T_{a+1,s} = -(-1)^{K_1-a} T_{a,s+1}$ holds at the node $\tilde{a} = \tilde{s} = 0$. But for the relation $\tilde{T}_{a,s-1} - T_{a,s-1} = (-1)^{K_1-a} T_{a-1,s}$, we cannot repeat exactly the steps (A.51)-(A.56) because the condition $n \le \frac{p-1}{2}$ (for the relation (A.11)) would not be satisfied. Instead, we proceed as follows:

$$ \star T_{a,s-1} = \varepsilon_l(a, s-1) Q_{(K_1,K_2-a|M)}^{+} \wedge Q_{(0,a|0)}^{-} \tag{A.57} $$

$$ = \varepsilon_l(a, s-1)(-1)^{M a} q_{(K_1;K_2-a;0)}^{+} \wedge q_{(0;a;M)}^{-} \tag{A.58} $$

$$ = \varepsilon_l(a, s-1)(-1)^{(M+1)a} \left( q_{(K_1-a;K_2;0)}^{+} \wedge q_{(a;0;M)}^{-} \right. \\ \left. \qquad - (-1)^M q_{(K_1;K_2-a+1;0)} \wedge q_{(0;a-1;M)} \right) \tag{A.59} $$

$$ = \varepsilon_l(a, s-1)(-1)^{(M+1)a} \left( \begin{aligned} & \left( (-1)^{M a} Q_{(K_1-a,K_2|M)}^{+} \wedge Q_{(a,0|0)}^{-} \right. \\ & \left. \qquad - (-1)^{M a} Q_{(K_1,K_2-a+1|M)} \wedge Q_{(0,a-1|0)}^{-} \right) \end{aligned} \right) \tag{A.60} $$

$$ = \varepsilon_l(a, s-1) \left( \begin{aligned} & (-1)^{a(K+M)} \star \tilde{T}_{a,s-1} / \varepsilon_r(a, s-1) \\ & - (-1)^a \star T_{a-1,s} / \varepsilon_l(a-1, s) \end{aligned} \right) \tag{A.61} $$

$$ = \star (\tilde{T}_{a,s-1} - (-1)^{K_1-a} T_{a-1,s}) \tag{A.62} $$

<footnote>$^{58}$Suspicious readers may wonder whether the relations (A.50) mean that we are only describing very specific (somehow degenerate) solutions of the Hirota equation. This is actually not the case: any solution of the Hirota equation obeying the Wronskian gauge condition (2.100) has to obey the relations (A.50).</footnote>
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 relation $\tilde{T}_{a,s-1} - T_{a,s-1} = (-1)^{K_1-a}T_{a-1,s}$ and completes the proof that any T-functions obeying (2.95) satisfy the Hirota equation.

**Generic solution.** At this point, we have shown that (2.95) provides a solution of the Hirota equation, but one can ask whether all solutions of the Hirota equation fit the ansatz (2.95). Reproducing either the arguments of section 2.6.3 or of section 2.7 (see e.g. [56]), one can associate to a solution<fnref n="59" /> of Hirota equation a set of Q-functions such that T is expressed as (2.95).

Without entering into the details of such proof, one can already convince oneself that (2.95) is the generic solution by counting the number of independent functions:

* The solution (2.95) is characterized by $|B| + |F| + 1$ independent Q-functions, for instance the functions $q_0$, $(q_a)_{a \in B}$, $(q_i)_{i \in F}$.

* Under the gauge constraint (2.100), the solution to Hirota equation on the T-hook of figure 4b 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 \le a \le K_1}$, $(T_{a,M_1+1})_{0 \le a \le K_1}$ and $(T_{K_1+1,s})_{-M_2<s<M_1}$. Similarly if$^{60}$ $K_1 < K_2$, one can chose the functions $(T_{a,M_1})_{0 \le a \le K_1}$, $(T_{a,M_1+1})_{0 \le a \le K_1}$, $(T_{K_1+1,s})_{-M_2<s<M_1}$ and $(T_{a,-M_2})_{K_1+1 \le a \le K_2}$.

# 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

$$ \prod_{j=1}^{M_1} \frac{u_i - u_j + \frac{\mathrm{i}}{2}}{u_i - u_j - \frac{\mathrm{i}}{2}} = -z \left( \frac{u_i + \frac{\mathrm{i}}{2}}{u_i - \frac{\mathrm{i}}{2}} \right)^L, \quad i = 1, 2, \dots, M_1, \qquad (B.1) $$

which follow from (3.21), cf. (3.2).

In the untwisting limit, certain Bethe roots approach infinity, and we denote such Bethe roots as $\theta_\alpha$. We will make an assumption that is justified a-posteriori that to-be-infinite Bethe roots are far not only from the to-stay-finite Bethe roots but also far from each other when $z \to 1$. By taking log of Bethe equations (B.1) and performing large-$\theta_\alpha$ expansion one gets

$$ - \log z + \sum_{\beta, \beta \neq \alpha} \frac{2\mathrm{i}}{\theta_{\alpha} - \theta_{\beta}} - s \frac{2\mathrm{i}}{\theta_{\alpha}} = 0, \qquad (B.2) $$

where $s = \frac{L}{2} - M_0$, and $M_0$ is number of to-stay-finite Bethe roots.

<footnote n="59">⁵⁹This will be possible under mild assumption of existence of generic solutions for T-functions. For instance, in section 2.6.3, we had to assume that the Baxter equation had $N$ independent solutions, and that the functions $1/T_{a,s}$ were well defined.</footnote>

<footnote n="60">⁶⁰The number of independent functions is invariant under the $s \mapsto -s$ transformation which maps a $(K_1|M|K_2)$ T-hook into a $(K_2|M|K_1)$ T-hook. Hence if $K_1 \neq K_2$ we can choose $K_1 < K_2$ without loss of generality.</footnote>
Introduce $x = \frac{i \theta \log z}{2}$. Then we have

$$1 + \sum_{j, j \neq i} \frac{1}{x_i - x_j} - s \frac{1}{x_i} = 0. \qquad (B.3)$$

Using the standard matrix model trick of multiplying with $\sum \frac{1}{x-x_i}$ we can write a Ricatti equation on the resolvent $R(x) = \sum_i \frac{1}{x-x_i}$:

$$\frac{1}{2}(R^2 + R') + R \left(1 - \frac{S}{x}\right) = \frac{m}{x}, \qquad (B.4)$$

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 = \frac{\psi'}{\psi}$, by noticing that $R^2 + R' = \frac{\psi''}{\psi}$:

$$\psi'' + 2 \left(1 - \frac{S}{x}\right) \psi' - \frac{2m}{x} \psi = 0. \qquad (B.5)$$

We are looking for solution with the polynomial large-$x$ asymptotics $\psi \sim x^m$. The equation above is almost precisely the one for the associated Laguerre polynomials $L_n^{(\alpha)}(x)$:

$$x y'' + (\alpha + 1 - x) y' + n y = 0. \qquad (B.6)$$

We derive the solution:

$$\psi(x) = L_m^{(-2S-1)}(-2x). \qquad (B.7)$$

Zeros of $\psi(x)$ are precisely $x_\alpha$, and now we just recall that

$$x_\alpha = \frac{i \theta_\alpha \log z}{2}. \qquad (B.8)$$

Note that Laguerre polynomials have degenerate zeros $x = 0$ if $m \ge 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 \to 1$ limit. From (B.1), it is easy to see that these finite Bethe roots satisfy

$$\prod_{j=1}^{M_0} \frac{u_i - u_j + i}{u_i - u_j - i} = - \left( \frac{u_i + i/2}{u_i - i/2} \right)^L, \quad i = 1, 2, \dots, M_0, \qquad (B.9)$$

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 \to \mathbb{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 Q-functions with a $G \to \mathbb{I}$ limit. As explained in section 3.3, a way to choose a particular rotation is to choose a nesting path and then demand that the rotation leaves the Q-functions on this nesting path invariant (up to a normalisation). Then the rotation matrix obeys the property: $h_{\alpha,\beta} = 0$ if $\alpha < \beta$ according to the order dictated by the nesting path. The rotation (3.42a) is obtained from the nesting path $(\emptyset|\emptyset) \subset (\emptyset|1) \subset (1|1) \subset (12|1)$.

The effect of the rotation is to multiply $Q_{\emptyset|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 \to \mathbb{I}$ limit. In the present example $Q_{\emptyset|1} = y^{\frac{1}{4}u-1/4}$ goes to 1 when $G \to \mathbb{I}$, thus we set $h_{3,3} = 1$. By contrast $Q_{1|1} = \left(\frac{x_1}{y}\right)^{-iu-1/4} \frac{1}{x_1-y} \left(u^2 - iu\frac{x_1+x_2}{x_1-x_2} - \frac{x_1^2+6x_1x_2+x_2^2}{4(x_1-x_2)^2}\right)$ 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 \to \mathbb{I}} h_{1,1}h_{3,3}Q_{1|1} = 1$.
Similarly, $Q_{12|1} = \left(\frac{x_1x_2}{y}\right)^{-iu-3/4} u^2 \frac{(x_1-x_2)}{(x_1-y)(x_2-y)}$ should be multiplied by $\frac{(x_1-y)(x_2-y)}{(x_1-x_2)}$ to get a limit, hence we set $h_{1,1}h_{2,2}h_{3,3} = \frac{(x_1-y)(x_2-y)}{(x_1-x_2)}$, i.e. $h_{2,2} = -\frac{2(x_2-y)}{(x_1-x_2)^3}$.

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|\emptyset} + h_{2,2}Q_{2|\emptyset}$ acquires a smooth $G \to \mathbb{I}$ limit. To do this we will iteratively add counter-terms to $h_{2,2}Q_{2|\emptyset}$ until the limit becomes smooth. Since $h_{2,2}Q_{2|\emptyset} = -2\frac{(x_2-y)}{(x_1-x_2)^3}x_2^{-iu-3/4}$ has a second-order pole the simplest way to cancel this pole is by considering the difference $A = h_{2,2}Q_{2|\emptyset} - \frac{x_1-y}{x_1-x_2}Q_{1|\emptyset}$, i.e. by substrating the multiple of $Q_{1|\emptyset}$ which precisely cancels the pole of order two. This would correspond to setting $h_{2,1} = -\frac{x_1-y}{x_1-x_2}$. But when one expands this combination $A$ in the $G \to \mathbb{I}$ limit, it turns out to have a pole of order one: $A \simeq -\frac{5}{2}\frac{x_2-y}{(x_1-x_2)^2}$, hence one should subtract one more term, and consider the combination $B = A - \frac{5}{4}(x_1-y)Q_{1|\emptyset}$, which would correspond to setting $h_{2,1} = -(x_1-y)\left(\frac{1}{x_1-x_2} + 5/4\right)$. When $G \to \mathbb{I}$, this combination $B$ is equal to $-u^2 - \frac{41}{16}\frac{x_2-y}{x_1-x_2} + \mathcal{O}(G)$, which still doesn't really have a unique limit when $G \to \mathbb{I}$. To give it a limit, one can subtract $\frac{41}{32}(x_1-y)(x_1-x_2)Q_{1|\emptyset}$. Hence we finally get $h_{2,1} = -(x_1-y)\left(\frac{1}{x_1-x_2} + 5/4 + \frac{41}{32}(x_1-x_2)\right)$, and $\lim_{G \to \mathbb{I}} h_{2,1}Q_{1|\emptyset} + h_{1,1}Q_{2|\emptyset} = -u^2$. We have hence obtained all the coefficients of the matrix $h$ in (3.42a), in the $\alpha = 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 $\emptyset \subset 1 \subset 12 \subset \dots$, 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 \to \mathbb{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 $\sum_j Q_j h_{i,j}$ a smooth limit when $G \to \mathbb{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, \dots, 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\dots 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 single-indexed Q-functions linearly independent, which may result in some Q-functions having a vanishing $G \to \mathbb{I}$ limit, as in (3.39). As we can see in (3.39), the vanishing of a Q-function still allows other Q-functions to be non-trivial, and in particular we obtain (by construction) non-vanishing $Q_{\emptyset}$.

## 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 [68], for a length $L$ twisted rational $su(K|M)$ spin chain in the defining representation. Their expression reads (in the present notation for shifts):

$$Q_{A|I} = \prod_{\substack{a<b \\ a,b \in A \cup I}} ((-1)^{p_a p_b} (x_a - x_b)^{(-1)^{p_a+p_b}}) \lim_{\substack{z_k \to 1/x_k \\ k \in \bar{A} \cup \bar{I}}} \left[ \left( \prod_{k \in \bar{A} \cup \bar{I}} \frac{((-1)^{p_k+1} \hat{i}(1-x_k z_k))^{J_k}}{J_k! w(z_k)^{(-1)^{p_k}}} \right) \otimes \prod_{i=1}^{L} \left( u_i^{-s_0+|\bar{A}|-|\bar{I}|} + \hat{i}\hat{D} \right) \left( \prod_{k \in \bar{A} \cup \bar{I}} w(z_k)^{(-1)^{p_k}} \right) \right], \quad (B.10)$$

where we use the notation $\mathcal{B} = \{1, 2, \dots, K\}$, $\mathcal{F} = \{K+1, K+2, \dots, K+M\}$ and we abusively denote $x_{K+i} \equiv y_i$. We also denote $p_a = 0$ for $a \in \mathcal{B}$ and $p_i = 1$ for $a \in \mathcal{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 \to 1/x_k$ smooth (it amounts to taking a pole) and to ensure that $Q_{\emptyset=1}$. In this second factor, the operators $J_k \equiv 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

$$w(z) = \det \frac{1}{1 - Gz} = \prod_{k=1}^{N} \frac{1}{1 - x_k z}. \qquad (B.11)$$

In the second line of (B.10), the $u_i$'s are related to the inhomogeneities $\theta_i$ by

$$u_i = u - \theta_i, \qquad (B.12)$$
$|\bar{A}| = K - |A|$ is the number of indices in $A$, and the operator $\hat{D}$ is a derivative operator with respect to the twist $G$ which obeys

$$ \frac{1}{\prod_{k=1}^{n} w(z_k)^{(-1)^{p_k}}} \left[ \bigotimes_{i=1}^{L} (\alpha_i + i \hat{D}) \left( \prod_{k=1}^{n} w(z_k) \right) \right]_{i_1, i_2, \dots, i_L}^{j_1, j_2, \dots, j_L} = \tag{B.13} \\ = \sum_{\sigma \in S^L} \left[ \left( \prod_{\substack{1 \le k < l \le L \\ \sigma(k) > \sigma(l)}} (-1)^{p_{i_k} p_{i_l}} \right) \prod_{c \in \sigma} \left( \alpha_m \delta_m^{\sigma(n)} \delta_{im}^{jm} + \sum_{k=1}^{n} (-1)^{p_k} \prod_{m \in c} \left[ \frac{i \cdot (g \, z_k)^{\Theta_{m,\sigma(m)}}}{1 - g \, z_m} \right]_{i_{\sigma(m)}}^{jm} \right) \right], $$

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 $(\mathbb{C}^{K|M})^{\otimes L}$ (where $\mathbb{C}^{K|M}$ denotes the defining representation of $\mathfrak{su}(K|M)$). In the r.h.s. of (B.13), a sum runs over permutations $\sigma$ belonging to the cyclic group $S^L$, and a product runs over the “cycles” $c$ appearing in the decomposition of $\sigma$ into a product of cyclic permutations — and over the sites $m$ on which the cycles $c$ acts. The notation $\Theta_{i,j}$ is defined by (2.5). For instance if $L = 3$ and $\sigma$ is the permutation exchanging 1 and 2, then the corresponding term in the r.h.s. of (B.13) reads $\sum_{k=1}^n \left( (-1)^{p_k} \left[ \frac{i}{1-G z_k} \right]_{i_2}^{j_1} \left[ \frac{i \cdot G \, z_k}{1-G \, z_k} \right]_{i_1}^{j_2} \right) \left[ \alpha_3 \mathbb{I} + i \sum_{k=1}^n \frac{G \, z_k}{1-G \, z_k} \right]_{i_3}^{j_3}$ because the decomposition of $\sigma$ into cyclic permutations is $\sigma = (1,2)(3)$.

Given the explicit operatorial construction, it is easy to deduce commutation of T- and Q-operators with the symmetry generators:

$$ \text{if } G = \text{diag}(x_1, \dots, x_N) : \quad \forall \lambda, \forall k, [T_\lambda, J_k \equiv E_{kk}] = 0, \tag{B.14a} $$

$$ \text{zero-twist limit:} \quad \forall \lambda, \forall k, j, \left[ \lim_{g \to \mathbb{I}} T_\lambda, E_{kj} \right] = 0. \tag{B.14b} $$

Both relations (B.14) follow from the statement that the functions $T_\lambda(u)$ can be written in the form (see e.g. [34])

$$ T_{\lambda} = \sum_{\sigma \in S^{L}} c_{\sigma}(G) P_{\sigma}, \tag{B.15} $$

where the sum runs over all possible permutations of spin chain sites. The operator $P_\sigma$ realises these permutations: $P_\sigma |e_{j_1} \cdots e_{j_L}\rangle = \left| e_{j_{\sigma(1)}} \cdots e_{j_{\sigma(L)}} \right\rangle$. The coefficients $c_\sigma$ depend only on the twist matrix $G$. They are diagonal operators if $G$ is diagonal (whence (B.14a) follows, cf. [68]), and become proportional to an identity operator in the limit $G \to \mathbb{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.

## B.4 L-hook reduction in the case of short multiplets

In section 3.3.4, we demonstrated that a physically relevant supersymmetric Q-system may have zero Q-functions, i.e. the following situation may emerge:

$$ Q_{Aa|I} Q_{A|Ii} = 0 \quad \text{i.e.} \quad Q_{A|I} = Q_{Aa|Ii} \neq 0, \tag{B.16} $$
<figure><img src="image_21.png" /><figcaption>Figure 14. Splitting of the Hasse diagram into sub-diagrams, illustrating equations (B.17), (B.20).</figcaption></figure>

**Hasse diagram splitting:** the full Hasse diagram in the l.h.s. splits into four Hasse sub-diagrams $Q^{(a)}$, $Q^{(b)}$, $Q^{(c)}$ and $Q^{(d)}$ defined in equation (B.18).

Out of the four Hasse sub-diagrams on the r.h.s., the diagrams $Q^{(a)}$ and $Q^{(d)}$ (on top and bottom) are equal (see (B.17)), while the two grayed-out sub-diagrams are unphysical and can be set to zero (see (B.17), (B.20)). Hence the original ($K|M$) Hasse-diagram reduces to only one sub-diagram, which has size ($K - 1|M - 1$).

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

$$ \forall B \not\ni a, \forall J \not\ni i, \quad Q_{Ba|J} = 0, \quad \text{and hence} \quad Q_{Ba|Ji} = Q_{B|J}. \qquad (B.17) $$

We prove this result at the end of this appendix, whereas now we discuss its implications.

Denote by $B \subset \mathcal{B}$ and $J \subset \mathcal{F}$ arbitrary multi-indices such that $B \not\ni a, J \not\ni i$. It is handy to decompose the original ($K|M$) Q-system into the four subsystems of type ($K - 1|M - 1$) each which are defined by

$$ Q_{B|J}^{(a)} = Q_{B|J}, \quad Q_{B|J}^{(b)} = Q_{Ba|J} = 0, \quad Q_{B|J}^{(c)} = Q_{B|Ji}, \quad Q_{B|J}^{(d)} = Q_{Ba|Ji}, \qquad (B.18) $$

see figure 14. From (B.17) we see that $Q^{(d)} = Q^{(a)}$. The system $Q^{(a)}$ does not contain zero Q-functions. It is the one that posses all physical information. Note for instance that $Q_{\emptyset}^{(a)} = Q_{\emptyset \setminus a | \emptyset} = Q_{\emptyset | \emptyset} = u^L$.

The system $Q^{(c)}$ has no physical relevance since its Q-functions do not appear in T-functions. Indeed, expression (2.95) for T-functions only involves products of two, Hodge-dual, Q-functions. But the Hodge-dual of any function in $Q^{(c)}$ is $Q_{...}^{(b)} = 0$.

We also notice that many T-functions completely vanish: when (B.17) applies, $T_{K_1, s \ge M_1} = 0$ and $T_{a \ge 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$).
The reduction of L-hook has a clear counterpart in the theory of characters. The characters of an irrep $\mu$ of $\mathfrak{su}(K|M)$ is given by the supersymmetric Schur polynomial $s_\mu(x_1, x_2, \dots, x_K/y_1, y_2, \dots, y_M)$. It is a defining property of supersymmetric polynomials that they become independent on $x_a$ and $y_i$ if $x_a = y_i$. Hence, Schur functions become effectively the characters of $\mathfrak{su}(K - 1|M - 1)$ when $x_a = y_i$.

The system $Q^{(c)}$ contains exactly those Q-functions that are ambiguous due to the arbitrariness of $Q_{A|Ii}$. The Q-functions of $Q^{(c)}$ are still constrained: by internal to $Q^{(c)}$ QQ-relations and by the entanglement with $Q^{(a)} = Q^{(d)}$ through

$$Q_{Bb|J}^{(d)} Q_{B|J}^{(c)} = \begin{vmatrix} Q_{B|J}^{(d)} & Q_{Bb|J}^{(c)} \\ Q_{B|J}^{(d)} & Q_{Bb|J}^{(c)} \end{vmatrix}, \qquad Q_{B|Jj}^{(c)} Q_{B|J}^{(a)} = \begin{vmatrix} Q_{B|J}^{(c)} & Q_{B|Jj}^{(a)} \\ Q_{B|J}^{(c)} & Q_{B|Jj}^{(a)} \end{vmatrix}. \qquad (B.19)$$

One can notice that if we have an arbitrary solution of the full original Q-system, we obtain another solution by setting $Q_{B|J}^{(c)} = 0$, and this solution produces the same T-functions as the original one, and also the same Q-functions on the nesting path, except unphysical $Q_{A|Ii}$. Hence, it is admissible to set the ambiguous Q-functions to zero:

$$Q_{B|Ji} = 0. \qquad (B.20)$$

**Proof of (B.17).** We will proceed by steps to show that $Q_{Ba|J} = 0$ for arbitrary $B \neq a$ and $J \neq i$, starting from the case $(B|J) = (A|I)$ where we already know the result by assumption.

**Case** $(B|J) = (A|Ij)$ where $j \neq i$. From $Q_{Aa|I} = 0$ it follows that $\begin{vmatrix} Q_{A|I}^{+} & Q_{Aa|Ij}^{+} \\ Q_{A|I}^{-} & Q_{Aa|Ij}^{-} \end{vmatrix} = 0$, i.e. $\begin{vmatrix} Q_{Aa|Ii}^{+} & Q_{Aa|Ij}^{+} \\ Q_{Aa|Ii}^{-} & Q_{Aa|Ij}^{-} \end{vmatrix} = 0$, i.e. there exists an i-periodic function $\alpha$ such that $Q_{Aa|Ii} = \alpha Q_{Aa|Ij}$.

If we redefine the Q-functions by the rotation

$$h = \begin{pmatrix} 1 & & & & \\ & \ddots & & & \\ & & 1 & -\alpha & \\ & & & 1 & \\ & & & & \ddots \end{pmatrix}, \qquad (B.21)$$

where the coefficient $-\alpha$ is at position $(j, i)$, then we obtain $Q_{Aa|Ij} = 0$. One should note that the rotation (B.21) leaves all the Q-functions of the nesting path invariant (as well as the T-functions, obviously).

**Case** $(B|J) = (A\bar{b}|I)$, where we denote as $A\bar{b}$ a multi-index$^{61}$ corresponding to the set $\{A\} \setminus \{b\}$, where $b \in A$.

This case is exactly like above: there exists $\alpha$ such that $Q_{Aa\bar{b}|I} = \alpha Q_{A|I}$, and we rotate using the same rotation (B.21) where $\alpha$ stands at position $(a, b)$.

<footnote>$^{61}$This definition defines $A\bar{b}$ up to the ordering, which is irrelevant because it only changes the sign of $Q_{A\bar{b}|I}$, without impacting its zeroness.</footnote>
**General case.** In the general case, one can write $Q_{Ba|J}$ as a determinant where a full line vanishes due to the cases shown previously. More precisely, one can write $(B|J)$ as $A\bar{b}_1\bar{b}_2\dots\bar{b}_p c_1 c_2\dots c_l | I\bar{j}_1\bar{j}_2\dots\bar{j}_m k_1 k_2\dots k_n$ where $b_h \in A$, $c_h \notin Aa$, $j_h \in I$, $k_h \notin Ii$. Then a slight generalization of (2.77) reads for instance

$$ Q_{Ba|J}^{[\dots]} (Q_{A|I}^{[\dots]})^{\dots} = \begin{vmatrix} Q_{Aa\bar{b}_1|I} & \dots & Q_{Aa\bar{b}_p|I} & Q_{Aa|Ik_1} & \dots & Q_{Aa|Ik_m} & Q_{Aa|I}^{[\dots]} & Q_{Aa|I}^{[\dots]} & \dots \\ Q_{Ac_1\bar{b}_1|I} & \dots & Q_{Ac_1\bar{b}_p|I} & Q_{Ac_1|Ik_1} & \dots & Q_{Ac_1|Ik_m} & Q_{Ac_1|I}^{[\dots]} & Q_{Ac_1|I}^{[\dots]} & \dots \\ \vdots & \vdots & \vdots & \vdots & \vdots & \vdots & \vdots & \vdots & \dots \\ Q_{Ac_l\bar{b}_1|I} & \dots & Q_{Ac_l\bar{b}_p|I} & Q_{Ac_l|Ik_1} & \dots & Q_{Ac_l|Ik_m} & Q_{Ac_l|I}^{[\dots]} & Q_{Ac_l|I}^{[\dots]} & \dots \\ Q_{Ab\bar{b}_1|I\bar{j}_1} & \dots & Q_{Ab\bar{b}_p|I\bar{j}_1} & Q_{A|Ik_1\bar{j}_1} & \dots & Q_{A|Ik_m\bar{j}_1} & Q_{A|I\bar{j}_1}^{[\dots]} & Q_{A|I\bar{j}_1}^{[\dots]} & \dots \\ \vdots & \vdots & \vdots & \vdots & \vdots & \vdots & \vdots & \vdots & \dots \\ Q_{Ab\bar{b}_1|I\bar{j}_m} & \dots & Q_{Ab\bar{b}_p|I\bar{j}_m} & Q_{A|Ik_1\bar{j}_m} & \dots & Q_{A|Ik_m\bar{j}_m} & Q_{A|I\bar{j}_m}^{[\dots]} & Q_{A|I\bar{j}_m}^{[\dots]} & \dots \end{vmatrix} \quad (B.22) $$

if $l+m+1 \ge p+k$.<fnref n="62" />

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} \propto 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.

## C Twisted asymptotics and weight of the representation

Consider a $gl(K|M)$ algebra with generators $E_{\alpha\beta}$ obeying the commutation relation

$$ [E_{\alpha\beta}, E_{\gamma\delta}] = \delta_{\beta\gamma} E_{\delta\alpha} - (-1)^{(p_{\alpha}+p_{\beta})(p_{\gamma}+p_{\delta})} \delta_{\delta\alpha} E_{\gamma\alpha}, \quad (C.1) $$

where indices $\alpha, \beta, \dots$ belong either to the set $B = \{1, 2, \dots, K\}$ or to the set $F = \{\hat{1}, \hat{2}, \dots, \hat{M}\}$. Correspondingly, $p$ is a $\mathbb{Z}_2$-valued function with $p_{\alpha} = 0$ if $\alpha \in B$ and $p_{\alpha} = 1$ if $\alpha \in F$. The weight of a state $|v\rangle$ of a $gl(K|M)$ irreducible representation will be labeled by the set

$$ [\lambda_1, \dots, \lambda_K; \nu_1, \dots, \nu_M] \quad (C.2) $$

<footnote n="62">⁶²Otherwise one gets a similar determinant where the last columns are dropped and extra rows are added.</footnote>
defined by

$$E_{\alpha\alpha}|v\rangle = m_{\alpha}|v\rangle, \quad \text{where } m_{\alpha} = \lambda_{\alpha}, \ a \in \mathcal{B}; \quad m_{i} = \nu_{i}, \ i \in \mathcal{F}. \quad (C.3)$$

Furthermore, $|v\rangle$ is called the highest-weight state if

$$E_{\alpha\beta}|v\rangle = 0 \quad \alpha < \beta \qquad (C.4)$$

and the lowest-weight state if

$$E_{\alpha\beta}|v\rangle = 0 \quad \alpha > \beta. \qquad (C.5)$$

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 \times M$ lattice with crossed nodes corresponding to turning points [56]. Two examples are shown below:

<figure><img src="image_22.png" /></figure>

The global ordering is introduced by the rule: $\alpha < \beta$ if $\alpha$ appears before $\beta$ when one follows the path of the diagram. So the left figure (usually called distinguished diagram) has the ordering $1 < 2 < 3 < 4 < \hat{1} < \hat{2} < \hat{3} < \hat{4}$ while the right figure (used in the AdS/CFT asymptotic Bethe Ansatz) has the ordering $\hat{1} < \hat{1} < \hat{2} < \hat{2} < \hat{3} < \hat{3} < \hat{4}$.

The highest/lowest weight is transformed following the rule$^{63}$ (see e.g. [63] for derivation):

<figure><img src="image_23.png" /></figure>

<figure><img src="image_24.png" /></figure>

<footnote>$^{63}$The weight of a given vector in a representation module does not depend on the ordering. It is the choice of the highest/lowest weight vector which is responsible for the transformation rule.</footnote>
where the upper choice of a sign corresponds to the highest weight and the lower choice corresponds to the lowest weight.

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 $\theta_k$ and the weight $\{\lambda^{(k)}, \nu^{(k)}\}$ of a lowest-weight representation at a spin chain site $k$, for $k = 1, 2, \dots, L$; the value of a twist $G = \text{diag}(x_1, x_2, \dots, x_N, y_1, y_2, \dots, y_M)$.

Such a spin chain is solved by Bethe ansatz techniques, its spectrum is described by solutions of Bethe equations [88, 89]. It is not difficult to determine the Q-system providing such equations [6, 35, 56]. To this end, one should introduce a couple of notations. First, one will need a function $P_m(u)$ with the property$^{64}$

$$ \frac{P_m^{++}}{P_m} = \frac{u + i m}{u}. \qquad (C.8) $$

Then define $Q_{\alpha_1 \dots \alpha_k} \equiv Q_{A|I}$, where $A$ is the projection of the set $\alpha_1 \dots \alpha_k$ on the $B$-set and $I$ the projection on the $F$-set, and denote by “$\leftarrow \beta$” the set of all indices smaller or equal to $\beta$ according to the given choice of a Kac-Dynkin diagram. For instance, for the right figure of (C.6), $Q_{\leftarrow \hat{2}} = Q_{\hat{1}12\hat{2}} = Q_{12|\hat{1}\hat{2}}$.

Note that the functions $Q_{\leftarrow \alpha}$ 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_{\gamma} \equiv (-1)^{p_{\gamma}} \quad \text{and} \quad \rho_{\beta} \equiv \sum_{\gamma \le \beta} s_{\gamma}. \qquad (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

$$ Q_{\leftarrow \alpha} = q_{\alpha} \cdot x_{\leftarrow \alpha}^{-i \frac{u}{\alpha}} \cdot \prod_{k=1}^{L} \prod_{\beta \le \alpha} \left( P_{s_{\beta} m_{\beta}^{(k)}} \left( u - \theta_{k} + \frac{i}{2}(\rho_{\alpha} - 2\rho_{\beta} + 1 + s_{\beta}) \right) \right)^{s_{\beta}}, \quad 1 \le \alpha \le N+M-1, \qquad (C.10) $$

with $q_{\alpha}$ being a polynomial in $u$; denote its degree as $K_{\alpha}$. One furthermore demands $Q_{\emptyset} = 1$ and $K_{N+M} = 0$ (so that $q_{\emptyset} = 1$). For the twist factor, one obviously has $x_{\leftarrow \alpha} = \prod_{\beta \le \alpha} x_{\alpha}$, with identification

$$ x_a = x_a \quad \text{and} \quad x_i = 1/y_i. \qquad (C.11) $$

<footnote>$^{64}$If $m$ is a non-negative integer then this function is simply a polynomial $P_m = u(u+i)(u+2i)\dots(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.</footnote>
With such an ansatz for Q-functions, the bosonic Bethe equations would read<sup>65</sup>

$$ - \frac{q_{\alpha}^{++} q_{\alpha-1}^{-} q_{\alpha+1}^{-}}{q_{\alpha}^{--} q_{\alpha-1}^{+} q_{\alpha+1}^{+}} = \frac{x_{\alpha+1}}{x_{\alpha}} \left[ \prod_{k=1}^{L} \frac{u - \theta_k + i s_{\alpha+1} m_{\alpha+1}^{(k)} - \frac{i}{2} \rho_{\alpha}}{u - \theta_k + i s_{\alpha} m_{\alpha}^{(k)} - \frac{i}{2} \rho_{\alpha}} \right]^{s_{\alpha}}, \quad (C.12) $$

at zeros of $q_\alpha$; and fermionic Bethe equations would read

$$ \frac{q_{\alpha-1}^{+} q_{\alpha+1}^{-}}{q_{\alpha-1}^{-} q_{\alpha+1}^{+}} = x_{\alpha} x_{\alpha+1} \left[ \prod_{k=1}^{L} \frac{u - \theta_k + i s_{\alpha+1} m_{\alpha+1}^{(k)} - \frac{i}{2} \rho_{\alpha}}{u - \theta_k + i s_{\alpha} m_{\alpha}^{(k)} - \frac{i}{2} \rho_{\alpha}} \right]^{s_{\alpha+1}}, \quad (C.13) $$

at zeros of $q_\alpha$. 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

$$ m_{\alpha} = K_{\alpha} - K_{\alpha-1} + \sum_{k=1}^{L} m_{\alpha}^{(k)}. \quad (C.14) $$

Now note that $P_m \sim u^m$ when $u \to \infty$. By performing comparison of (C.14) with large-u asymptotic of (C.10), we conclude that

$$ Q_{\leftarrow \alpha} \sim x_{\leftarrow \alpha}^{-i u} \cdot u^{\sum_{\beta \le \alpha} m_{\beta}}. \quad (C.15) $$

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 \neq 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 $\lambda_a + \nu_i = 0$. And indeed, the degrees of Q-functions also involve appropriate $\pm 1$ factors as it follows from (4.24c), case $x_a = y_i$. Finally, if $x_a = y_i$, $\lambda_a + \nu_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. Such a Q-system is ambiguous, in particular, the functions $Q_{\alpha a}$ and $Q_{\alpha i}$, where $\alpha$ is the

<footnote n="65"><sup>65</sup>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 $\omega_\alpha = m_\alpha - (-1)^{p_\alpha+p_{\alpha+1}} m_{\alpha+1}$. For instance, for “rectangular” representations, when only $\alpha$'s Dynkin label is different from zero, and when representation is the same for all nodes of the spin chain, one typically uses $u \to u - i/2 s_\alpha m_\alpha^{(k)}$, to make equations invariant under complex conjugation. Another common overall shift, more suitable for representation theory, is $Q_{\leftarrow \alpha} \mapsto Q_{\leftarrow \alpha}^{[p_\alpha]}$, which changes the convention of how QQ-relation (2.7) is represented.</footnote>
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_{\alpha} = \deg Q_{\alpha a i}$ is in a perfect agreement with (C.15) and the property $\lambda_a + \nu_i = 0$.

Consider now the counterpart of (C.15) in the Hodge-dual basis. Denote

$$M \equiv \sum_{\alpha} m_{\alpha} = \sum_{k=1}^{L} m_{\alpha}^{(k)}. \qquad (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^{[\alpha] \leftarrow} \propto Q_{\leftarrow \alpha}$, where “$[\alpha] \leftarrow$” denotes all indices which are larger than $\alpha$ (and do not include $\alpha$). Then it is easy to see the relation

$$\frac{\left( \prod_{\beta} x_{\beta} \right)^{i u}}{u^{M}} Q^{\leftarrow \alpha} \sim x_{\leftarrow \alpha}^{i u} \cdot u^{-\sum_{\beta \le \alpha} m_{\beta}}, \qquad (C.17)$$

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^{\emptyset} \neq 1$. One can achieve equality $Q^{\emptyset} = 1$ by performing the gauge transformation $Q_{A|I} \rightarrow \left( \prod_{\beta} x_{\beta} \right)^{-i u} u^{M} Q_{A|I}$, at the price that Q-functions lose their polynomiality if it was present. The lowest-weight description for compact rational spin chains was chosen to allow $Q_{\emptyset} = 1$ and have polynomial Q-functions at the same time.

The AdS/CFT integrable model becomes a rational spin chain at weak coupling $g \to 0$. Hence (C.15) and (C.17) should hold. In this special case $Q_{\emptyset} = Q^{\emptyset} = 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.
The subsections gives the implementation of the formulae of section 4.3 in the widespread Mathematica language and its free, open-source competitor SageMath. The further sections give several examples for different configurations of the twists.

## D.1 Computer implementation of leading asymptotics of QSC Q-functions

Let us illustrate how to use the code provided in sections D.1.1 and D.1.2: we will show, as an example, how to obtain the formulae of section 4.4.2.

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 $\forall i: y_i = 1$. This is done by defining a substitution$^{66}$ rule `Spec={y1->1, y2->1, ...}` (in Mathematica syntax) or a dictionary `Spec={y1:1, y2: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 $\lambda$”, “hat $\nu$”, “hat star $\lambda$” and “hat star $\nu$”:

$$ \text{Spec} = \{y(i):1 \text{ for } i \text{ in } [1, \dots, 4]\} \\ \text{matrix}(\text{[}hL(a),hN(a),hsL(a),hsN(a)] \text{ for } a \text{ in } [1, \dots, 4]\text{]) \quad \text{SageMath} \\ \left( \begin{array}{llll} \hat{\lambda}_1 = \lambda_1 & \hat{\nu}_1 = \nu_1 & \hat{\lambda}_1^* = \lambda_1 & \hat{\nu}_1^* = \nu_1 + 3 \\ \hat{\lambda}_2 = \lambda_2 & \hat{\nu}_2 = \nu_2 - 1 & \hat{\lambda}_2^* = \lambda_2 & \hat{\nu}_2^* = \nu_2 + 2 \\ \hat{\lambda}_3 = \lambda_3 & \hat{\nu}_3 = \nu_3 - 2 & \hat{\lambda}_3^* = \lambda_3 & \hat{\nu}_3^* = \nu_3 + 1 \\ \hat{\lambda}_4 = \lambda_4 & \hat{\nu}_4 = \nu_4 - 3 & \hat{\lambda}_4^* = \lambda_4 & \hat{\nu}_4^* = \nu_4 \end{array} \right) $$

The matrix below the two columns is the computer's output when these lines are evaluated (the output is the same$^{67}$ with Mathematica as with SageMath).

Similarly, we obtain the equation (4.47) using the functions AA and BB (for $A_aA^a$ and $B_iB^i$):

$$ \text{matrix}(\text{[AA(a),BB(a)] for } a \text{ in } [1, \dots, 4]\text{]) \quad \text{SageMath} \\ \left( \begin{array}{l} A^1 A_1 = \frac{(x_1-1)^4}{(x_1-x_2)(x_1-x_3)(x_1-x_4)x_1} \\ A^2 A_2 = -\frac{(x_2-1)^4}{(x_1-x_2)(x_2-x_3)(x_2-x_4)x_2} \\ A^3 A_3 = \frac{(x_3-1)^4}{(x_1-x_3)(x_2-x_3)(x_3-x_4)x_3} \\ A^4 A_4 = -\frac{(x_4-1)^4}{(x_1-x_4)(x_2-x_4)(x_3-x_4)x_4} \end{array} \right) \quad \text{Mathematica} \\ \text{Table}[\text{AA[a],BB[a]}, \text{a,1,4}]\text{/MatrixForm} $$

<footnote>$^{66}$One could also specify values of $x_a$ from (4.44) but this is not necessary as the eigenvalues $x_a$ are pairwise-distinct in the case we consider (i.e. generic parameters $\gamma_a$).</footnote>

<footnote>$^{67}$Up to minor typographic differences, such as the order of terms.</footnote>
Moreover, if one wants this output to be expressed in terms of the charges $\lambda_a$ and $\nu_i$ instead of $\hat{\lambda}_a$ and $\hat{\nu}_i$, one can use the function `subHat` to substitute the expression of $\hat{\lambda}_a$ and $\hat{\nu}_i$. And if one wants to further substitute $\lambda_a$ and $\nu_i$ using expression (4.2), then one can use the function `subln`, as in the following example:

```
SageMath

def f(i,j): return subln(subHat([AA, BB], [j](i+1)))
matrix(4,2,f)

Mathematica

MatrixForm[Table[{AA[a], BB[a]}, {a, 1, 4}]
]//subHat//subln//Factor]
```

$$
\left(
\begin{aligned}
A^1 A_1 &= \frac{(x_1-1)^4}{(x_1-x_2)(x_1-x_3)(x_1-x_4)x_1} \\
A^2 A_2 &= -\frac{(x_2-1)}{(x_1-x_2)(x_2-x_3)(x_2-x_4)x_2} \\
A^3 A_3 &= \frac{(x_3-1)^4}{(x_1-x_3)(x_2-x_3)(x_3-x_4)x_3} \\
A^4 A_4 &= -\frac{(x_4-1)^4}{(x_1-x_4)(x_2-x_4)(x_3-x_4)x_4}
\end{aligned}
\right)
\qquad
\begin{aligned}
B^1 B_1 &= \frac{i(x_1-1)(x_2-1)(x_3-1)(x_4-1)}{(\Delta-S_1-3)(\Delta-S_2-2)(S_1+S_2+1)} \\
B^2 B_2 &= -\frac{i(x_1-1)(x_2-1)(x_3-1)(x_4-1)}{(\Delta+S_1-1)(\Delta+S_2-2)(S_1+S_2+1)} \\
B^3 B_3 &= \frac{i(x_1-1)(x_2-1)(x_3-1)(x_4-1)}{(\Delta+S_1-1)(\Delta-S_2-2)(S_1-S_2+1)} \\
B^4 B_4 &= -\frac{i(x_1-1)(x_2-1)(x_3-1)(x_4-1)}{(\Delta-S_1-3)(\Delta+S_2-2)(S_1-S_2+1)}
\end{aligned}
$$

For other cases of twisting than the $\gamma$-deformation of section 4.4.2, we can still use the same functions, but they should be preceded with another definition of the substitution `Spec`: for instance section 4.4.1 corresponds to `Spec={}`, while section 4.4.3 corresponds to `Spec=Join[Table[y[i]->1,{i,1,4}],{x[4]->1}]`; (assuming the considered state does not have two charges equal).

### D.1.1 Sagemath implementation

```
#The definitions below allow for a nicely formatted output; for instance x(1) returns x_1

def sb(s): return lambda i:var("\%s_\%s"\%(s,i))
x=sb("x");y=sb("y");lam=sb("lambda");nu=sb("nu");J=sb("J");S=sb("S");var("Delta")
def hl(a): return var("hl_\%s"\%a,latex_name=r"\hat{\lambda}_{{\%s}"\%a}
def hn(a): return var("hn_\%s"\%a,latex_name=r"\hat{\nu}_{{\%s}"\%a}
def hsl(a): return var("hsl_\%s"\%a,latex_name=r"\hat{\lambda}^\star_{{\%s}"\%a}
def hsn(a): return var("hsn_\%s"\%a,latex_name=r"\hat{\nu}^\star_{{\%s}"\%a}

def delta(i,j): return bool((i==j).subs(Spec)) # delta(x(a),x(b)) computes \delta_{x_a,x_b}
def bosQ(i): return str(i)[0] == "x" # checks ``bosonicness'': bosQ(x(a))=1 whereas bosQ(y(i))=0
def hl(a):
    S=sum([-(-1)^(bosQ(b))*delta(x(a),b) for b in NP if NP.index(b)<NP.index(x(a))])
    return hl(a)==lam(a)+S

def hN(i):
    S=sum([-(-1)^(bosQ(b))*delta(y(i),b) for b in NP if NP.index(b)<NP.index(y(i))])
    return hN(i)==nu(i)+S

def hsL(a):
    S=sum([-(-1)^(bosQ(b))*delta(x(a),b) for b in NP if NP.index(b)>NP.index(x(a))])
    return hsL(a)==lam(a)+S

def hsN(i):
    S=sum([-(-1)^(bosQ(b))*delta(y(i),b) for b in NP if NP.index(b)>NP.index(y(i))])
    return hsN(i)==nu(i)+S

def z(a,b):
    #From inputs of the form x(a) or y(i), computes z_{a,b} defined by
    if delta(a,b):
        if bosQ(a) and bosQ(b): return I*a*(hl(idx(b))-hl(idx(a)))
        elif bosQ(a): return I*a*(1-hn(idx(b))-hl(idx(a)))
        elif bosQ(b): return -I*a*(1-hn(idx(a))-hl(idx(b)))
        else: return I*a*(hn(idx(b))-hn(idx(a)))
    else:
        if bosQ(a): return b-a
        else: return a-b

def AA(a):
    LHS=sb("A")*(a)*var("A\%s"\%a,latex_name=r"A^{\%s}"\%a") #computes A_aA^a from (4.29)
```
```c
return LHS=(1/x(a)*prod([z(b,x(a))^((-1)^bosQ(b)) for b in NP if b!=x(a)])).subs(Spec)
def BB(i):
    LHS=sb("B")*(i)*var("B%\s%"%i, latex_name=r"B^{\%s}"%i)
    return LHS=(1/y(i)*prod([z(j,y(i))^((-1)^bosQ(j)) for j in NP if j!=y(i)])).subs(Spec)
def subHat(e):
    #substitutes the expression (4.35) of \hat \lambda_a and \hat \nu_i into the expression e
    for i in [1, ..., 4]:
        e=e.subs(hL(i)).subs(hN(i))
    return e

def l(a):
    #returns the expression (4.2a) of \lambda_a
    return lam(a)==1/2*((-1)^a>2)*J(1)-(-1)^a*J(2)+(-1)^abs(a-2.5)>1)*J(3)
def n(i):
    #returns the expression (4.2b) of \hat \nu_i
    return nu(i)==1/2*((-1)^i>2)*Delta_-(-1)^i*S(1)-(-1)^abs(i-2.5)>1)*S(2)
def subln(e):
    #substitutes the expressions (4.2) of \lambda_a and \nu_i into the expression e
    for i in [1, ..., 4]:
        e=e.subs(l(i)).subs(n(i))
    return e
```

## D.1.2 Mathematica implementation

```c
(*The definitions below allow for a nicely formatted output; e.g. \ hsl[2] returns \hat \lambda_2^\star *)
sb[s_1]:=Subscript[s, #1]&;lam=sb[\[Lambda]];nu=sb[\[Nu]];x[a_1]=sb[x][a];y[i_1]=sb[y][i];
J[a_1]=sb[J][a];S[i_1]=sb[S][i];hn=sb[OverHat[\[Nu]]];hl=sb[OverHat[\[Lambda]]];
hsn=sb[SuperStar[OverHat[\[Nu]]]];hl=sb[SuperStar[OverHat[\[Lambda]]]];
(*The definition below specifies the nesting path according to (4.33)*)
NP={y[1], x[1], x[2], y[2], y[3], x[3], x[4], y[4]};
delta[i_, j_1]:=Boole[(i/.Spec)==(j/.Spec)]; (*delta(x(a), x(b)) computes \delta_{x_a, x_b} *)
bosQ[i_1]:=Boole[x==i[[1]]]; (*checks 'bosonicness': bosQ(x(a))=1 whereas bosQ(y(i))=0*)
idx=Last; (*converts x(a) into the label a*)
hL[a_1]:=Block[{S}, (*computes \hat \lambda_a from (4.35)*)
    S=Sum[(-1)^bosQ[b]*delta[x[a], b]*Boole[Position[NP, b][[1,1]]<Position[NP, x[a]][[1,1]], {b, NP}];
    hl[a==lam[a]+S]
hN[i_1]:=Block[{S}, (*computes \hat \nu_i from (4.35)*)
    S=Sum[(-1)^bosQ[b]*delta[y[i], b]*Boole[Position[NP, b][[1,1]]<Position[NP, y[i]][[1,1]], {b, NP}];
    hn[i==nu[i]+S]
hS[1, 1_1]:=Block[{S}, (*computes \hat \lambda_a^\star from (4.38)*)
    S=Sum[(-1)^bosQ[b]*delta[x[a], b]*Boole[Position[NP, b][[1,1]] >Position[NP, x[a]][[1,1]], {b, NP}];
    hsl[a==lam[a]+S]
hS[1, 2_1]:=Block[{S}, (*computes \hat \nu_i^\star from (4.38)*)
    S=Sum[(-1)^bosQ[b]*delta[y[i], b]*Boole[Position[NP, b][[1,1]] >Position[NP, y[i]][[1,1]], {b, NP}];
    hsn[i==nu[i]+S]
AA[a_1]:=sb[A][a]*Superscript[A, a==1/x[a]*Product[If[b==x[a], 1, (*computes A_aA^a from (4.29)*)
    z[b, x[a]]^((-1)^bosQ[b])], {b, NP}]/.Spec
BB[i_1]:=sb[B][i]*Superscript[B, i==1/y[i]*Product[If[b==y[i], 1, (*computes B_iB^i from (4.29)*)
    z[b, y[i]]^((-1)^bosQ[b])], {b, NP}]/.Spec
z[a_, b_1]:=If[delta[a, b==1, (*From inputs of the form x(a) or y(i), computes z_{ab} defined by (4.30)*)
    Which[bosQ[a==1==bosQ[b], I a (hl[idx[b]]-hl[idx[a]]),
    bosQ[a==1, I a (1-hn[idx[b]]-hl[idx[a]]),
    bosQ[b==1, -I a (1-hn[idx[a]]-hl[idx[b]]),
    True, I a (hn[idx[b]]-hn[idx[a]]),
    If[bosQ[a==1, b=a, a-b]]
1[a_1]:=lam[a==1/2*((-1)^Boole[a>2]*J[1]-(-1)^a*J[2]+(-1)^Boole[Abs[a-2.5]>1]*J[3])(*equation (4.2a)*)
n[a_1]:=nu[a==1/2*((-1)^Boole[a>2]\[CapitalDelta]-(-1)^a*S[1]-(-1)^Boole[Abs[a-2.5]>1]*S[2])
subln[e_1]:=e/.Flatten[Table[{Rule@@l[a], Rule@@n[a]}, {a, 1, 4}]]
subHat[e_1]:=e/.Flatten[Table[{Rule@@hL[a], Rule@@hN[a]}, {a, 1, 4}]] (*substitutes (4.2) into e*)
```
## D.2 Fully untwisted case

In this case we have $x_a = y_j = 1$, $a, j = 1, 2, 3, 4$, and the equations (4.36), give the asymptotics

$$ \hat{\lambda}_a = \lambda_a + (a \bmod 2), \quad \hat{\nu}_i = \nu_i + (a+1 \bmod 2), \quad \hat{\lambda}_a^* = \lambda_a - (a+1 \bmod 2), \quad \hat{\nu}_i^* = \nu_i - (i \bmod 2), \tag{D.1} $$

$$ A_a A^a = \frac{\mathrm{i} \prod_i (\hat{\lambda}_a + \hat{\nu}_i - 1)}{\prod_{b \neq a} (\hat{\lambda}_a - \hat{\lambda}_b)}, \qquad B_i B^i = \frac{\mathrm{i} \prod_a (\hat{\lambda}_a + \hat{\nu}_i - 1)}{\prod_{j \neq i} (\hat{\nu}_i - \hat{\nu}_j)}, \tag{D.2} $$

which matches the result already obtained in [3] (eq. (3.64) and (3.68)). They can also easily be expressed in terms of the charges $J_1, J_2, \dots$ by executing the code of section D.1. The only difference with the example of section 4.4.2 is that one should start with setting$^{68}$ `Spec={x[_]->1,y[_]->1}`.

Notice that in the non-twisted case, the T-functions (2.95a)-(2.95c) will turn to the dimensions of corresponding rectangular representations in the large $u$ limit.

The untwisted coset possesses the full $\mathcal{N} = 4$ supersymmetry.

## D.3 The case $x_1 = y_4$

First we consider a simple case of partial twisting and put $x_1 = y_4 = z$, with other twists being arbitrary. We can use the formulae of section 4.3, or the computer implementation of section,⁶⁹ obtaining the following coefficients for the asymptotics (4.37):

$$ \hat{\lambda}_a = \lambda_a, \qquad \hat{\nu}_i = \nu_i + \delta_{i,4}, \qquad \hat{\lambda}_a^* = \lambda_a - \delta_{a,1}, \qquad \hat{\nu}_i^* = \nu_i, \tag{D.3} $$

$$ A_a A^a = \begin{cases} \frac{\mathrm{i}(\lambda_1 + \nu_4) \prod_{i \le 3} (z - y_i)}{\prod_{b \ne 1} (x_b - z)} & \text{if } a = 1 \\ \frac{\prod_{i \le 3} (x_a - y_i)}{x_a \prod_{b \ne a} (x_a - x_b)} & \text{if } a > 1 \end{cases} \qquad B_i B^i = \begin{cases} \frac{\prod_{a > 2} (x_a - y_i)}{y_i \prod_{j \le 3} (y_j - y_i)} & \text{if } i \le 3 \\ \frac{\mathrm{i}(\lambda_1 + \nu_4) \prod_{a > 2} (x_a - z)}{\prod_{j \le 3} (y_j - z)} & \text{if } i = 4. \end{cases} \tag{D.4} $$

The residual supersymmetry is here $\mathcal{N} = 1$. A way to see it for this for arbitrary cases of twisting is as follows:

* Take the twist matrix in diagonal form $g = \mathrm{diag}\{x_1, \dots, x_4 | y_1, \dots, y_4\}$;

* Take a matrix $M$ of $(4|4)$ generators of $SU(4|4)$ algebra. Find a general solution of equation $[M, g] = 0$ where $M_{i,j}$ is otherwise an arbitrary $(4|4 \times 4|4)$ supermatrix, with the labels running the values e.g. $i, j = 1, 2, 3, 4 | -1, -2, -3, -4$. The matrix elements of $M$ which remain non-zero correspond to the generators of the remaining symmetry subalgebra;

* Bring $M$ into a block-diagonal form by reshuffling its rows and columns. The sizes of blocks together with the collection of indices in each grading within each block will indicate the leftover (super)symmetry.

<footnote>$^{68}$The definition is written in *Mathematica* syntax. In *SageMath* syntax, the same constraint can (for instance) be specified as `Spec={f(i):1 for f in [x,y] for i in [1,...,4]}`.</footnote>

<footnote>$^{69}$To specify that $x_1 = y_4$, one can start by setting `Spec={x(1):SR.var("z"),y(4):SR.var("z")}` (in *SageMath* syntax) or `Spec={x[1]->z,y[4]->z}` (in *Mathematica* syntax).</footnote>
For instance, for the case of this subsection we have the twist matrix

$$ g = \mathrm{diag}\{z, x_2, x_3, x_4 | y_1, y_2, y_3, z\}. \qquad (D.5) $$

After reordering indices (by putting fermionic indices before bosonic ones) to get a block-diagonal matrix, the solution of the equation $[M, g] = 0$ gives the matrix $M$ in the form

$$ M = \begin{pmatrix} * & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & * & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & * & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & * & * & 0 & 0 & 0 \\ 0 & 0 & 0 & * & * & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & * & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & * & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & * \end{pmatrix}. \qquad (D.6) $$

The 2×2 block in the middle provides us with the only non-abelian residual symmetry. This block is actually rather a $(1|1) \times (1|1)$ block supersymmetry, while the rest of (super)symmetries of the overall $\mathrm{psu}(2, 2|4)$ are broken up to one-dimensional subgroups: $\mathrm{psu}(2, 2|4) \to \mathrm{psu}[u(1|1) \oplus u(1) \oplus u(1) \oplus u(1) \oplus u(1) \oplus u(1) \oplus \mathbb{R}]$.

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 coefficients

$$ \hat{\lambda}_a = \lambda_a - \delta_{a,2}, \qquad \hat{v}_i = v_i, \qquad \hat{\lambda}_a^* = \lambda_a + \delta_{a,1}, \qquad \hat{v}_i^* = v_i, \qquad (D.7) $$

$$ A_a A^a = \begin{cases} (-1)^a \frac{i \prod_i (z-y_i)}{(\hat{\lambda}_1 - \hat{\lambda}_2) z^2 \prod_{b=3}^4 (z-x_b)} & \text{if } a \le 2 \\ (-1)^a \frac{\prod_i (x_a - y_i)}{x_a (x_4 - x_3) (x_a - z)^2} & \text{if } a \ge 3 \end{cases} \qquad B_i B^i = \frac{\prod (x_a - y_i)}{y_i \prod_{j \ne i} (y_j - y_i)}. \qquad (D.8) $$

The supersymmetry is here completely broken and the residual non-abelian symmetry is SU(2).

### D.5 Twisted sl₂-sector

In this case only the values of Cartan charges $\Delta$, $J_1 \equiv L$ and $S_1 \equiv S$ are nonzero. We choose accordingly the configuration of twists, using (4.2): $x_1x_2 = t^2$, $x_1x_3 = 1$, $x_2x_3 = 1$, $y_1y_2 = 1$, $y_2y_4 = y^2$, $y_2y_3 = 1$, or

$$ x_1 = x_2 = \frac{1}{x_3} = \frac{1}{x_4} = t, \qquad y_2 = \frac{1}{y_1} = y_4 = \frac{1}{y_3} = y \qquad (D.9) $$
where $t^2 = e^{i\mathcal{P}}$ and $y = e^{i\phi}$ is the twist variable related to the conformal spin direction.

Using the general formulae (4.36) give the asymptotics (4.37) with the coefficients

$$ \hat{\lambda}_a - \lambda_a = (0, -1, 0, -1) \quad \hat{\nu}_i - \nu_i = (0, 0, -1, -1), \quad \hat{\lambda}_a^* - \lambda_a = (0, 1, 0, 1) \quad \hat{\nu}_i^* - \nu_i = (1, 1, 0, 0), \qquad (D.10) $$

$$ \lambda_1 = \lambda_2 = -\lambda_3 = -\lambda_4 = \frac{J_1}{2}, \quad \nu_4 = -\nu_1 = \frac{\Delta - S_1}{2}, \quad \nu_3 = -\nu_2 = \frac{\Delta + S_1}{2}, \qquad (D.11) $$

$$ A_a A^a = (-1)^{a_i} \frac{(t-y)^2(ty-1)^2}{(t^2-1)^2 y^2}, \quad B_1 B^1 = B_2 B^2 = -B_3 B^3 = -B_4 B^4 = i \frac{(t-y)^2(ty-1)^2}{(\Delta-1)t^2(y^2-1)^2}. \qquad (D.12) $$

The superconformal symmetry is completely broken: $\text{psu}(2, 2|4) \to \text{ps}[u(1, 1) \oplus u(2) \oplus u(1) \oplus u(1)]$ unless we put the total momentum to zero: $\mathcal{P} = 0$. Then the $\mathcal{N} = 2$ supersymmetry gets restored.

**sl(2) with only AdS$_5$ twists.** If we twist only the AdS$_5$ in the previous example, we should put $t = 1$ and we get instead

$$ \hat{\lambda}_a - \lambda_a = (0, -1, -2, -3) \quad \hat{\nu}_i - \nu_i = (0, 0, -1, -1) \quad \hat{\lambda}_a^* - \lambda_a = (3, 2, 1, 0) \quad \hat{\nu}_i - \nu_i = (1, 1, 0, 0) \qquad (D.13) $$

$$ A_1 A^1 = -A_4 A^4 = i \frac{(y-1)^4}{(J_1+3)(J_1+2)y^2}, \quad A_2 A^2 = -A_3 A^3 = i \frac{(y-1)^4}{(J_1+2)(J_1+1)y^2}, \qquad (D.14) $$

$$ B_1 B^1 = B_2 B^2 = -B_3 B^3 = -B_4 B^4 = i \frac{(y-1)^2}{(\Delta-1)(y+1)^2} \qquad (D.15) $$

The left-over symmetry is $\text{psu}(2, 2|4) \to \text{ps}[u(1, 1) \oplus u(2) \oplus u(4)]$ so that the supersymmetry is completely broken.

**sl(2) with only S$^5$ twists.** If we twist here only the $S^5$, putting $y = 1$ we get instead

$$ \hat{\lambda}_a = \lambda_a - (a + 1 \mod 2) \quad \hat{\nu}_i = \nu_i + 1 - a \quad \hat{\lambda}_a^* = \lambda_a - (a \mod 2) \quad \hat{\nu}_i = \nu_i + 4 - i \qquad (D.16) $$

$$ A_a A^a = (-1)^{a_i} \frac{(t-1)^2}{(t+1)^2}, \quad B_1 B^1 = -B_4 B^4 = i \frac{(t-1)^4}{(\Delta - S_1 - 3)(\Delta - 2)(S_1 + 1)t^2}, \qquad (D.17) $$

$$ B_2 B^2 = -B_3 B^3 = -i \frac{(t-1)^4}{(\Delta - S_1 - 1)(\Delta - 2)(S_1 + 1)t^2}. \qquad (D.18) $$

The left-over symmetry is $\text{psu}(2, 2|4) \to \text{ps}[u(2, 2) \oplus u(2) \oplus u(2)]$ so that the theory is conformal.

## E Links to TBA: mirror Q-T- and Y-functions and the energy

In this appendix, we will re-derive the TBA formula for the energy from the point of view of QSC construction, and relate the mirror Y-functions entering there through the Q-functions in the gauge in which they enter the QSC equations. This makes for example our derivation of the single wrapping energy of BMN vacuum of the section 5 completely consistent within the QSC formalism.
## 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, 53]) 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:

$$Q_{1|\emptyset} = P_1, \quad Q_{2|\emptyset} = P_2, \quad Q_{3|\emptyset} = \mu^{4a} P_a, \quad Q_{4|\emptyset} = -\mu^{3a} P_a. \quad (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_{\bar{\emptyset}|\bar{\emptyset}} = (\mu_{12}^+)^2 \neq 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_{\bar{\emptyset}|\bar{\emptyset}} = 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$, $\tilde{s} = s$, $\tilde{a} = a$, and $\varepsilon$ simplified to

$$\varepsilon_r(a, s) = \varepsilon_l(a, s) = (-1)^{a-s}, \quad \varepsilon_u(a, s) = (-1)^{a-s+as}; \quad (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|\emptyset} = Q^4|_I$.

For the upper band of the T-hook, $a \ge |s|$, which we will need for the formula for energy, one has the following explicit formulae

$$\begin{aligned} T_{a,s} &= (-1)^{a-s+as} \sum_{|I|=2-s} \epsilon^{I\bar{I}} Q_{12|I}^{[+a]} Q_{34|\bar{I}}^{[-a]} = (-1)^{a-s+as} \sum_{|I|=2-s} \epsilon^{I\bar{I}} Q_{12|I}^{[+a]} (\mu^{3c}\mu^{4d})^{[a+s+1]} Q_{cd|\bar{I}}^{[-a]} \\ &= (-1)^{a-s+as} \sum_{|I|=2-s} \epsilon^{I\bar{I}} Q_{12|I}^{[+a]} Q_{34|\bar{I}}^{[+a]} = (-1)^{a+s} \sum_{|I|=2-s} Q_{12|I}^{[+a]} (Q_{12}|^I)^{[-a]} . \end{aligned} \quad (E.3)$$

We could also use the property $\hat{Q}_{12}|^I = (\omega^{II'})^{[|I|+1]} \hat{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_{0,0}^{[s]} = T_{0,0}^{[-s]}$ and $T_{a,2} = T_{2,a}$, $T_{a,-2} = T_{-2,-a}$ ($a \ge 2$), where all functions are on the sheet with long cuts. In addition, we know that $T_{0,0} = \mu_{12}^2$ and [3] $T_{1,0} = \tilde{\mu}_{12}\mu_{12}$.

We will use the standard definition of Y-functions $1 + Y_{a,s} = \frac{T_{a,s}^+ T_{a,s}^-}{T_{a+1,s} T_{a-1,s}}$, relating the T-system to the Y-system, and the “telescoping” formulae — chain cancelations of
T-functions — to write

$$ \left( \frac{\mu_{12}}{\tilde{\mu}_{12}} \right)^{[2n]} \prod_{a=1}^{n} (1 + Y_{a,0}^{[2n-a]}) = \left( \frac{\mathbf{T}_{0,0}^{[-1]}}{\mathbf{T}_{1,0}^{[0]}} \right)^{[2n]} \prod_{a=1}^{n} \left( \frac{\mathbf{T}_{a,0}^{[2n-a+1]} \mathbf{T}_{a,0}^{[2n-a-1]}}{\mathbf{T}_{a-1,0}^{[2n-a]} \mathbf{T}_{a+1,0}^{[2n-a]}} \right) = \frac{\mathbf{T}_{n,0}^{[n-1]}}{\mathbf{T}_{n+1,0}^{[n]}} $$

Now use that functions $\mathbf{T}_{n,0}$ are analytic in the strip $-\frac{n+1}{2} < \text{Im}(u) < \frac{n+1}{2}$, cf. (E.3). This analyticity implies that the quantity $\frac{\mu_{12}}{\tilde{\mu}_{12}} \prod_{a=1}^{n} (1 + Y_{a,0}^{[-a]})$ is analytic for any $n$ in the strip $0 < \text{Im}(u) \le \text{Im}(u) \le \pi n$. Hence $\frac{\mu_{12}}{\tilde{\mu}_{12}} \prod_{a=1}^{\infty} (1 + Y_{a,0}^{[-a]})$ is analytic in the whole upper-half plane $\text{Im}(u) > 0$.

The large-$u$ asymptotics of the discussed quantity is known and is determined by the energy. Indeed,

$$ \frac{\tilde{\mu}_{12}}{\mu_{12}} \equiv \frac{\tilde{\mu}_{12}}{\hat{\mu}_{12}} = \frac{\hat{\mu}_{12}^{++}}{\hat{\mu}_{12}} = \frac{\dot{i}(\Delta - J_1)}{u} + \mathcal{O}\left(\frac{1}{u^2}\right), \qquad (\text{E.4}) $$

while the second term $\log \prod_{a=1}^{n} (1 + Y_{a,0}^{[-a]})$ diminishes at $u \to \infty$ quicker than $1/u$, as it can be seen by its asymptotic expression $Y_{a,0}^{[-a]} \sim \left(\frac{x^{[-0]}}{x^{[2a]}}\right)^{J_1} \approx \frac{1}{[(u+\dot{i}0)(u+\dot{i}a)]^{J_1}}$ computed e.g. in the main text.

Hence we can write the following useful Cauchy representation:

$$ \frac{1}{\sqrt{u^2 - 4g^2}} \log \left( \frac{\mu_{12}}{\tilde{\mu}_{12}} \prod_{a=1}^{\infty} (1 + Y_{a,0}^{[-a]}) \right) = \int_{-\infty}^{\infty} \frac{dv}{2\pi i} \frac{1}{(u-v)\sqrt{v^2 - 4g^2}} \log \left( \frac{\mu_{12}}{\tilde{\mu}_{12}} \prod_{a=1}^{\infty} (1 + Y_{a,0}^{[-a]}) \right). $$

The contour of integration can be closed around a big semi-circle surrounding the upper half-plane since the integrand diminishes as $1/u^2$ at $u \to \infty$.

Let us expand now both sides of this equation up to the order $1/u^2$. The r.h.s. renders $\frac{\Delta - J_1}{u^2}$ due to (E.4). Comparing it to the $1/u^2$ term of the l.h.s., we obtain the equation

$$ \gamma = \Delta - J_1 = \oint \frac{du}{2\pi i} \frac{u}{\sqrt{u^2 - 4g^2}} \left( -\log\left(\frac{\tilde{\mu}_{12}}{\mu_{12}}\right) + \log\prod_{a=1}^{\infty} (1 + Y_{a,0}^{[-a]}) \right). \qquad (\text{E.5}) $$

Since the l.h.s. is real we can replace the r.h.s. by its real part. The first term in the integrand will not contribute$^{70}$ since the product $\frac{u}{\sqrt{u^2-4g^2}} \log \frac{\tilde{\mu}_{12}}{\mu_{12}}$ is purely imaginary on the whole real axis: inside the interval $(-2g, 2g)$ — due to the first factor, and outside of it — due to the second factor (calculated with long cuts). The second term gives

$$ \gamma = g \sum_{a=1}^{\infty} \int_{-\infty}^{\infty} \frac{du}{2\pi} \left[ \partial_u \left( \tilde{x}^{[-0]} - \frac{1}{\tilde{x}^{[-0]}} \right) \log (1 + Y_{a,0}^{[a-0]}) - \left[ \partial_u \left( \tilde{x}^{[+0]} - \frac{1}{\tilde{x}^{[+0]}} \right) \log (1 + Y_{a,0}^{[-a+0]}) \right] \right], \qquad (\text{E.6}) $$

where we used the identity $g\partial_u(x - \frac{1}{x}) = \frac{x+\frac{1}{x}}{x-\frac{1}{x}} = \frac{u}{\sqrt{4g^2-u^2}}$. After shifting the integration arguments in the first and second term, respectively, by $\pm i\alpha$, it gives the TBA formula for energy (5.54).$^{71}$

<footnote>$^{70}$This type of cancellation is a useful trick exploited considerably in [75].</footnote>

<footnote>$^{71}$We ignored the possible logarithmic poles related to the Bethe roots of excited states defined as $1 + \hat{Y}_{1,0}(u_j) = \mu_{12}(u_j + \dot{i}/2) = 0$. The corresponding logarithmic poles would produce the driving terms $\sum_j \hat{p}_1(u_j)$, but they are absent for the case of twisted BMN vacuum considered in this work.</footnote>
**Open Access.** This article is distributed under the terms of the Creative Commons Attribution License (CC-BY 4.0), which permits any use, distribution and reproduction in any medium, provided the original author(s) and source are credited.

References

[1] H. Bethe, On the theory of metals. 1. Eigenvalues and eigenfunctions for the linear atomic chain, Z. Phys. 71 (1931) 205 [INSPIRE].

[2] N. Gromov, V. Kazakov, S. Leurent and D. Volin, Quantum spectral curve for planar $N = 4$ super-Yang-Mills theory, Phys. Rev. Lett. 112 (2014) 011602 [arXiv:1305.1939] [INSPIRE].

[3] N. Gromov, V. Kazakov, S. Leurent and D. Volin, Quantum spectral curve for arbitrary state/operator in $AdS_5/CFT_4$, JHEP 09 (2015) 187 [arXiv:1405.4857] [INSPIRE].

[4] I. Krichever, O. Lipan, P. Wiegmann and A. Zabrodin, Quantum integrable systems and elliptic solutions of classical discrete nonlinear equations, Commun. Math. Phys. 188 (1997) 267 [hep-th/9604080] [INSPIRE].

[5] N. Gromov, V. Kazakov and P. Vieira, Exact spectrum of anomalous dimensions of planar $N = 4$ supersymmetric Yang-Mills theory, Phys. Rev. Lett. 103 (2009) 131601 [arXiv:0901.3753] [INSPIRE].

[6] N. Gromov, V. Kazakov, S. Leurent and Z. Tsuboi, Wronskian solution for $AdS/CFT$ Y-system, JHEP 01 (2011) 155 [arXiv:1010.2720] [INSPIRE].

[7] Z. Tsuboi, Wronskian solutions of the $T$, $Q$ and $Y$-systems related to infinite dimensional unitarizable modules of the general linear superalgebra $gl(M|N)$, Nucl. Phys. B 870 (2013) 92 [arXiv:1109.5524] [INSPIRE].

[8] O. Lunin and J.M. Maldacena, Deforming field theories with $U(1) \times U(1)$ global symmetry and their gravity duals, JHEP 05 (2005) 033 [hep-th/0502086] [INSPIRE].

[9] S. Frolov, Lax pair for strings in Lunin-Maldacena background, JHEP 05 (2005) 069 [hep-th/0503201] [INSPIRE].

[10] N. Beisert and R. Roiban, Beauty and the twist: the Bethe ansatz for twisted $N = 4$ SYM, JHEP 08 (2005) 039 [hep-th/0505187] [INSPIRE].

[11] N. Gromov, F. Levkovich-Maslyuk and G. Sizov, Analytic solution of bremsstrahlung TBA II: turning on the sphere angle, JHEP 10 (2013) 036 [arXiv:1305.1944] [INSPIRE].

[12] D. Correa, J. Maldacena and A. Sever, The quark anti-quark potential and the cusp anomalous dimension from a TBA equation, JHEP 08 (2012) 134 [arXiv:1203.1913] [INSPIRE].

[13] N. Drukker, Integrable Wilson loops, JHEP 10 (2013) 135 [arXiv:1203.1617] [INSPIRE].

[14] N. Gromov and F. Levkovich-Maslyuk, Quantum spectral curve for a cusped Wilson line in $N = 4$ SYM, JHEP 04 (2016) 134 [arXiv:1510.02098] [INSPIRE].

[15] N. Gromov and F. Levkovich-Maslyuk, $Y$-system and $\beta$-deformed $N = 4$ super-Yang-Mills, J. Phys. A 44 (2011) 015402 [arXiv:1006.5438] [INSPIRE].

[16] G. Arutyunov, M. de Leeuw and S.J. van Tongeren, Twisting the mirror TBA, JHEP 02 (2011) 025 [arXiv:1009.4118] [INSPIRE].
[17] C. Ahn, Z. Bajnok, D. Bombardelli and R.I. Nepomechie, Finite-size effect for four-loop Konishi of the β-deformed N = 4 SYM, Phys. Lett. B 693 (2010) 380 [arXiv:1006.2209] [INSPIRE].

[18] C. Ahn, Z. Bajnok, D. Bombardelli and R.I. Nepomechie, *Twisted Bethe equations from a twisted S-matrix*, JHEP 02 (2011) 027 [arXiv:1010.3229] [INSPIRE].

[19] M. de Leeuw and S.J. van Tongeren, *Orbifolded Konishi from the mirror TBA*, J. Phys. A 44 (2011) 325404 [arXiv:1103.5853] [INSPIRE].

[20] C. Ahn, Z. Bajnok, D. Bombardelli and R.I. Nepomechie, TBA, NLO Lüscher correction and double wrapping in twisted AdS/CFT, JHEP 12 (2011) 059 [arXiv:1108.4914] [INSPIRE].

[21] J. Fokken, C. Sieg and M. Wilhelm, *A piece of cake: the ground-state energies in γᵢ-deformed N = 4 SYM theory at leading wrapping order*, JHEP 09 (2014) 078 [arXiv:1405.6712] [INSPIRE].

[22] C. Marboe and D. Volin, *Quantum spectral curve as a tool for a perturbative quantum field theory*, Nucl. Phys. B 899 (2015) 810 [arXiv:1411.4758] [INSPIRE].

[23] N. Gromov, F. Levkovich-Maslyuk and G. Sizov, *Pomeron eigenvalue at three loops in N = 4 supersymmetric Yang-Mills theory*, Phys. Rev. Lett. 115 (2015) 251601 [arXiv:1507.04010] [INSPIRE].

[24] N. Gromov, F. Levkovich-Maslyuk and G. Sizov, *Quantum spectral curve and the numerical solution of the spectral problem in AdS₅/CFT₄*, JHEP 06 (2016) 036 [arXiv:1504.06640] [INSPIRE].

[25] R. Hirota, *Discrete analogue of a generalized Toda equation*, J. Phys. Soc. Jpn. 50 (1981) 3785.

[26] M. Jimbo and T. Miwa, *Solitons and infinite dimensional Lie algebras*, Publ. Res. Inst. Math. Sci. Kyoto 19 (1983) 943.

[27] A. Kuniba, T. Nakanishi and J. Suzuki, *T-systems and Y-systems in integrable systems*, J. Phys. A 44 (2011) 103001 [arXiv:1010.1344] [INSPIRE].

[28] P.P. Kulish and N.Y. Reshetikhin, *On gl₃-invariant solutions to the Yang-Baxter equation and the associated quantum systems*, Zap. Nauchn. Sem. POMI 120 (1982) 92.

[29] N.Y. Reshetikhin, *The functional equation method in the theory of exactly soluble quantum systems*, Sov. Phys. JETP 57 (1983) 691 [Zh. Eksp. Teor. Fiz 84 (1983) 1190].

[30] A. Klumper and P.A. Pearce, *Conformal weights of RSOS lattice models and their fusion hierarchies*, Physica A 183 (1992) 304 [INSPIRE].

[31] A. Kuniba, T. Nakanishi and J. Suzuki, *Functional relations in solvable lattice models. 1: functional relations and representation theory*, Int. J. Mod. Phys. A 9 (1994) 5215 [hep-th/9309137] [INSPIRE].

[32] Z. Tsuboi, *Analytic Bethe ansatz and functional equations for Lie superalgebra sl(r + 1|s + 1)*, J. Phys. A 30 (1997) 7975 [arXiv:0911.5386] [INSPIRE].

[33] Z. Tsuboi, *Analytic Bethe ansatz and functional equations associated with any simple root systems of the Lie superalgebra sl(r + 1|s + 1)*, Physica A 252 (1998) 565 [arXiv:0911.5387] [INSPIRE].

[34] V. Kazakov and P. Vieira, *From characters to quantum (super)spin chains via fusion*, JHEP 10 (2008) 050 [arXiv:0711.2470] [INSPIRE].
[35] Z. Tsuboi, *Solutions of the T-system and Baxter equations for supersymmetric spin chains*, Nucl. Phys. B 826 (2010) 399 [arXiv:0906.2039] [INSPIRE].

[36] V.V. Bazhanov, S.L. Lukyanov and A.B. Zamolodchikov, *Integrable structure of conformal field theory, quantum KdV theory and thermodynamic Bethe ansatz*, Commun. Math. Phys. 177 (1996) 381 [hep-th/9412229] [INSPIRE].

[37] N. Gromov, V. Kazakov and P. Vieira, *Finite volume spectrum of 2D field theories from Hirota dynamics*, JHEP 12 (2009) 060 [arXiv:0812.5091] [INSPIRE].

[38] V. Kazakov and S. Leurent, *Finite size spectrum of SU(N) principal chiral field from discrete Hirota dynamics*, Nucl. Phys. B 902 (2016) 354 [arXiv:1007.1770] [INSPIRE].

[39] N. Gromov, V. Kazakov, A. Kozak and P. Vieira, *Exact spectrum of anomalous dimensions of planar N = 4 supersymmetric Yang-Mills theory: TBA and excited states*, Lett. Math. Phys. 91 (2010) 265 [arXiv:0902.4458] [INSPIRE].

[40] N. Beisert et al., *Review of AdS/CFT integrability: an overview*, Lett. Math. Phys. 99 (2012) 3 [arXiv:1012.3982] [INSPIRE].

[41] A. Alexandrov, V. Kazakov, S. Leurent, Z. Tsuboi and A. Zabrodin, *Classical tau-function for quantum spin chains*, JHEP 09 (2013) 064 [arXiv:1112.3310] [INSPIRE].

[42] V. Bazhanov and N. Reshetikhin, *Restricted solid on solid models connected with simply based algebras and conformal field theory*, J. Phys. A 23 (1990) 1477 [INSPIRE].

[43] I.V. Cherednik, *An analogue of the character formula for Hekke algebras*, Funct. Anal. Appl. 21 (1987) 172 [Funkt. Anal. Pril. 21 (1987) 94].

[44] E. Moens and J. Van der Jeugt, *A determinantal formula for supersymmetric Schur polynomials*, J. Alg. Combinat. 17 (2003) 283.

[45] J.-H. Kwon, *Rational semistandard tableaux and character formula for the Lie superalgebra*, Adv. Math. 217 (2008) 713.

[46] N. Gromov, V. Kazakov and Z. Tsuboi, *PSU(2, 2|4) character of quasiclassical AdS/CFT*, JHEP 07 (2010) 097 [arXiv:1002.3981] [INSPIRE].

[47] G.P. Pronko and Yu. G. Stroganov, *The complex of solutions of the nested Bethe ansatz. The $A_2$ spin chain*, J. Phys. A 33 (2000) 8267 [hep-th/9902085] [INSPIRE].

[48] V.V. Bazhanov, A.N. Hibberd and S.M. Khoroshkin, *Integrable structure of $W_3$ conformal field theory, quantum Boussinesq theory and boundary affine Toda theory*, Nucl. Phys. B 622 (2002) 475 [hep-th/0105177] [INSPIRE].

[49] P. Dorey, C. Dunning, D. Masoero, J. Suzuki and R. Tateo, *Pseudo-differential equations and the Bethe ansatz for the classical Lie algebras*, Nucl. Phys. B 772 (2007) 249 [hep-th/0612298] [INSPIRE].

[50] A.V. Belitsky, S.E. Derkachov, G.P. Korchemsky and A.N. Manashov, *Baxter Q-operator for graded SL(2|1) spin chain*, J. Stat. Mech. 01 (2007) P01005 [hep-th/0610332] [INSPIRE].

[51] N. Gromov and P. Vieira, *Complete 1-loop test of AdS/CFT*, JHEP 04 (2008) 046 [arXiv:0709.3487] [INSPIRE].

[52] V.V. Bazhanov and Z. Tsuboi, *Baxter's Q-operators for supersymmetric spin chains*, Nucl. Phys. B 805 (2008) 451 [arXiv:0805.4274] [INSPIRE].

[53] N. Gromov, V. Kazakov, S. Leurent and D. Volin, *Solving the AdS/CFT Y-system*, JHEP 07 (2012) 023 [arXiv:1110.0562] [INSPIRE].
[54] J. Caetano, *Unified approach to the SU(2) principal chiral field model at finite volume*, arXiv:1012.2600 [insPIRE].

[55] A. Zabrodin, *Discrete Hirota's equation in quantum integrable models*, Int. J. Mod. Phys. B 11 (1997) 3125 [hep-th/9610039] [insPIRE].

[56] V. Kazakov, A.S. Sorin and A. Zabrodin, *Supersymmetric Bethe ansatz and Baxter equations from discrete Hirota dynamics*, Nucl. Phys. B 790 (2008) 345 [hep-th/0703147] [insPIRE].

[57] A. Zabrodin, *Backlund transformations for difference Hirota equation and supersymmetric Bethe ansatz*, Theor. Math. Phys. 155 (2007) 567 [Teor. Mat. Fiz. 155 (2008) 74] [arXiv:0705.4006] [insPIRE].

[58] S. Leurent, *Integrable systems and AdS/CFT duality*, arXiv:1206.4061 [insPIRE].

[59] S.-J. Cheng and W. Wang, *Dualities and representations of Lie superalgebras*, American Mathematical Society, U.S.A. (2012).

[60] F. Gohmann and A. Seel, *A note on the Bethe ansatz solution of the supersymmetric t-J model*, Czech. J. Phys. 53 (2003) 1041 [cond-mat/0309138].

[61] N. Beisert, V.A. Kazakov, K. Sakai and K. Zaremba, *Complete spectrum of long operators in N = 4 SYM at one loop*, JHEP 07 (2005) 030 [hep-th/0503200] [insPIRE].

[62] M. Alfimov, N. Gromov and V. Kazakov, *QCD pomeron from AdS/CFT quantum spectral curve*, JHEP 07 (2015) 164 [arXiv:1408.2530] [insPIRE].

[63] D. Volin, *String hypothesis for gl(n|m) spin chains: a particle/hole democracy*, Lett. Math. Phys. 102 (2012) 1 [arXiv:1012.3454] [insPIRE].

[64] M. Gunaydin and D. Volin, in preparation.

[65] A. Hegedus, *Discrete Hirota dynamics for AdS/CFT*, Nucl. Phys. B 825 (2010) 341 [arXiv:0906.2546] [insPIRE].

[66] V.V. Bazhanov, T. Lukowski, C. Meneghelli and M. Staudacher, *A shortcut to the Q-operator*, J. Stat. Mech. 1011 (2010) P11002 [arXiv:1005.3261] [insPIRE].

[67] V.V. Bazhanov, R. Frassek, T. Lukowski, C. Meneghelli and M. Staudacher, *Baxter Q-operators and representations of yangians*, Nucl. Phys. B 850 (2011) 148 [arXiv:1010.3699] [insPIRE].

[68] V. Kazakov, S. Leurent and Z. Tsuboi, *Baxter's Q-operators and operatorial Backlund flow for quantum (super)-spin chains*, Commun. Math. Phys. 311 (2012) 787 [arXiv:1010.4022] [insPIRE].

[69] P.P. Kulish and E.K. Sklyanin, *On the solution of the Yang-Baxter equation*, J. Sov. Math. 19 (1982) 1596 [Zap. Nauchn. Semin. 95 (1980) 129] [insPIRE].

[70] P.P. Kulish, *Integrable graded magnets*, J. Sov. Math. 35 (1986) 2648 [Zap. Nauchn. Semin. 145 (1985) 140] [insPIRE].

[71] V.V. Bazhanov, S.L. Lukyanov and A.B. Zamolodchikov, *Integrable structure of conformal field theory. 2. Q operator and DDV equation*, Commun. Math. Phys. 190 (1997) 247 [hep-th/9604044] [insPIRE].

[72] S.E. Derkachov and A.N. Manashov, *Factorization of R-matrix and Baxter Q-operators for generic sl(N) spin chains*, J. Phys. A 42 (2009) 075204 [arXiv:0809.2050] [insPIRE].
[73] D. Bombardelli, D. Fioravanti and R. Tateo, Thermodynamic Bethe ansatz for planar AdS/CFT: a proposal, J. Phys. A 42 (2009) 375401 [arXiv:0902.3930] [INSPIRE].

[74] G. Arutyunov and S. Frolov, Thermodynamic Bethe ansatz for the AdS$_5$ × S$^5$ mirror model, JHEP 05 (2009) 068 [arXiv:0903.0141] [INSPIRE].

[75] A. Cavaglià, D. Fioravanti and R. Tateo, Extended Y-system for the AdS$_5$/CFT$_4$ correspondence, Nucl. Phys. B 843 (2011) 302 [arXiv:1005.3016] [INSPIRE].

[76] N. Gromov, F. Levkovich-Maslyuk, G. Sizov and S. Valatka, *Quantum spectral curve at work: from small spin to strong coupling in N = 4 SYM*, JHEP 07 (2014) 156 [arXiv:1402.0871] [INSPIRE].

[77] A. Cavaglià, D. Fioravanti, N. Gromov and R. Tateo, *Quantum spectral curve of the N = 6 supersymmetric Chern-Simons theory*, Phys. Rev. Lett. 113 (2014) 021601 [arXiv:1403.1859] [INSPIRE].

[78] N. Gromov and G. Sizov, *Exact slope and interpolating functions in N = 6 supersymmetric Chern-Simons theory*, Phys. Rev. Lett. 113 (2014) 121601 [arXiv:1403.1894] [INSPIRE].

[79] L. Anselmetti, D. Bombardelli, A. Cavaglià and R. Tateo, *12 loops and triple wrapping in ABJM theory from integrability*, JHEP 10 (2015) 117 [arXiv:1506.09089] [INSPIRE].

[80] J. Fokken, C. Sieg and M. Wilhelm, *Non-conformality of $\gamma_i$-deformed N = 4 SYM theory*, J. Phys. A 47 (2014) 455401 [arXiv:1308.4420] [INSPIRE].

[81] Q. Jin, *The emergence of supersymmetry in $\gamma_i$-deformed N = 4 super-Yang-Mills theory*, arXiv:1311.7391 [INSPIRE].

[82] S. Frolov and A.A. Tseytlin, *Rotating string solutions: AdS/CFT duality in nonsupersymmetric sectors*, Phys. Lett. B 570 (2003) 96 [hep-th/0306143] [INSPIRE].

[83] R.G. Leigh and M.J. Strassler, *Exactly marginal operators and duality in four-dimensional N = 1 supersymmetric gauge theory*, Nucl. Phys. B 447 (1995) 95 [hep-th/9503121] [INSPIRE].

[84] S.A. Frolov, R. Roiban and A.A. Tseytlin, *Gauge-string duality for (non)supersymmetric deformations of N = 4 super Yang-Mills theory*, Nucl. Phys. B 731 (2005) 1 [hep-th/0507021] [INSPIRE].

[85] G. Arutyunov, S. Frolov and R. Suzuki, *Five-loop Konishi from the mirror TBA*, JHEP 04 (2010) 069 [arXiv:1002.1711] [INSPIRE].

[86] S.J. van Tongeren, *Integrability of the AdS$_5$ × S$^5$ superstring and its deformations*, J. Phys. A 47 (2014) 433001 [arXiv:1310.4854] [INSPIRE].

[87] J. Fokken, C. Sieg and M. Wilhelm, *The complete one-loop dilatation operator of planar real $\beta$-deformed N = 4 SYM theory*, JHEP 07 (2014) 150 [arXiv:1312.2959] [INSPIRE].

[88] P.P. Kulish and N. Yu. Reshetikhin, *Diagonalization of GL(N) invariant transfer matrices and quantum N wave system (Lee model)*, J. Phys. A 16 (1983) L591 [INSPIRE].

[89] É. Ragoucy and G. Satta, *Analytical Bethe ansatz for closed and open gl(M|N) super-spin chains in arbitrary representations and for any Dynkin diagrams*, JHEP 09 (2007) 001 [arXiv:0706.3327] [INSPIRE].