# Cylinder partition function of the 6-vertex model from algebraic geometry

Zoltan Bajnok, Jesper Lykke Jacobsen, Yunfeng Jiang, Rafael I. Nepomechie,

Yang Zhang

► To cite this version:

Zoltan Bajnok, Jesper Lykke Jacobsen, Yunfeng Jiang, Rafael I. Nepomechie, Yang Zhang. Cylinder partition function of the 6-vertex model from algebraic geometry. Journal of High Energy Physics, 2020, 2020 (06), pp.169. 10.1007/JHEP06(2020)169. hal-02504618

HAL Id: hal-02504618

https://hal.science/hal-02504618v1

Submitted on 21 Aug 2024

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

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

Distributed under a Creative Commons Attribution 4.0 International License
<figure><img src="image_2.png" /></figure>

RECEIVED: March 1, 2020

REVISED: May 25, 2020

ACCEPTED: June 9, 2020

PUBLISHED: June 26, 2020

# Cylinder partition function of the 6-vertex model from algebraic geometry

Zoltan Bajnok,ª Jesper Lykke Jacobsen,ᵇ,ᶜ,>d Yunfeng Jiang,ᵉ Rafael I. Nepomechief and Yang Zhangg,ʰ

ªWigner Research Centre for Physics,
Konkoly-Thege Miklós u. 29-33, 1121 Budapest, Hungary

ᵇInstitut de Physique Théorique, Paris Saclay,
CEA, CNRS, 91191 Gif-sur-Yvette, France

ᶜLaboratoire de Physique de l'École Normale Supérieure, ENS, Université PSL,
CNRS, Sorbonne Université, Université de Paris, F-75005 Paris, France

ᵈSorbonne Université, École Normale Supérieure, CNRS,
Laboratoire de Physique (LPENS), F-75005 Paris, France

ᵉCERN Theory Department,
Geneva, Switzerland

f Physics Department,
P.O. Box 248046, University of Miami, Coral Gables, FL 33124 U.S.A.

⁹Peng Huanwu Center for Fundamental Theory,
Hefei, Anhui 230026, China

ʰInterdisciplinary Center for Theoretical Study,
University of Science and Technology of China,
Hefei, Anhui 230026, China

E-mail: bajnok.zoltan@wigner.hu, jesper.jacobsen@lpt.ens.fr,
jinagyf2008@gmail.com, nepomechie@miami.edu, yzhphy@ustc.edu.cn

**ABSTRACT:** We compute the exact partition function of the isotropic 6-vertex model on a cylinder geometry with free boundary conditions, for lattices of intermediate size, using Bethe ansatz and algebraic geometry. We perform the computations in both the open and closed channels. We also consider the partial thermodynamic limits, whereby in the open (closed) channel, the open (closed) direction is kept small while the other direction becomes large. We compute the zeros of the partition function in the two partial thermodynamic limits, and compare with the condensation curves.

**KEYWORDS:** Bethe Ansatz, Differential and Algebraic Geometry, Lattice Integrable Models

ARXIV ePRINT: 2002.09019
# Contents

1 Introduction 1

2 Set-up 3

3 Partition function in the open channel 5

3.1 Reformulation and Bethe ansatz 5

3.2 BAE and Q-system 8

3.3 Algebraic geometry 9

4 Partition function in the closed channel 11

4.1 Reformulation and Bethe ansatz 11

4.2 Even N 15

4.3 Odd N 16

4.4 BAE and Q-system 17

4.5 Algebraic geometry 19

5 Algebraic equation with free parameters 20

6 Analytical results in closed form 22

6.1 Open channel 22

6.2 Closed channel 23

7 Zeros of partition functions 26

7.1 Condensation curves 26

7.2 Open channel 28

7.2.1 Temperley-Lieb algebra 28

7.2.2 Results 30

7.3 Closed channel 33

7.3.1 Temperley-Lieb algebra 33

7.3.2 Results 35

8 Conclusions and discussions 38

A Basic notions of computational algebraic geometry 40

A.1 Polynomial ring and ideal 40

A.2 Gröbner basis 40

A.3 Quotient ring and companion matrix 41

B More details on AG computation 43

C The overlap (4.34) 44
<table><tr><td>D</td><td>The relation (4.38)</td><td>44</td></tr><tr><td>E</td><td>Parity of states with paired Bethe roots</td><td>45</td></tr><tr><td>F</td><td>Exact partition functions</td><td>46</td></tr><tr><td>F.1</td><td>N = 6</td><td>46</td></tr><tr><td>F.2</td><td>N = 5</td><td>48</td></tr><tr><td>F.3</td><td>N = 4</td><td>50</td></tr><tr><td>F.4</td><td>N = 3</td><td>51</td></tr><tr><td>F.5</td><td>N = 2</td><td>52</td></tr></table>

# 1 Introduction

Computing partition functions of integrable vertex models at intermediate lattice size is a hard problem. For small lattice size, the partition function can be computed simply by brute force. For large lattice size, where the thermodynamic limit is a good approximation, various methods are available, including the Wiener-Hopf method [1–3], non-linear integral equations [4, 5] and a distribution approach [6]. At intermediate lattice size, brute force is no longer an option, and the thermodynamic approximation is inaccurate. In a previous work [7], three of the authors developed an efficient method to compute the exact partition function of the 6-vertex model analytically for intermediate lattice size. They considered the 6-vertex model at the isotropic point on the torus, i.e. with periodic boundary conditions in both directions. The method is based on the rational Q-system [8] and computational algebraic geometry (AG). The algebro-geometric approach to Bethe ansatz was initiated in [9], with the general goal of exploring the structure of the solution space of Bethe ansatz equations (BAE) and developing new methods to obtain analytic results in integrable models. The simplest example for such a purpose is the BAE of the SU(2)-invariant Heisenberg XXX spin chain with periodic boundary conditions. It is an interesting question to generalize these methods to more sophisticated cases such as higher-rank spin chains, quantum deformations and non-trivial boundary conditions.

In the current work, we take one step forward in this direction and consider the partition function of the 6-vertex model on the cylinder. Namely, we take one direction of the lattice to be periodic and impose free open boundary conditions in the other direction. This set-up has several new features compared to the torus geometry already considered in [7].

First of all, to consider open boundary conditions for the vertex model, we put the model on a diagonal square lattice where each square is rotated by 45°, as is shown in figure 1. The partition function on such a lattice can be formulated in terms of a diagonal-to-diagonal transfer matrix [10], which does not commute for different values of the spectral parameter. Nevertheless, the R-matrix approach (the so-called Quantum Inverse Scattering Method) can be applied by reformulating this transfer matrix in terms of an inhomogeneous double-row transfer matrix [11] with suitable alternating inhomogeneities [12, 13]. It turns
out that these inhomogeneities depend on the spectral parameter. As a result, the BAE depend on a free parameter; hence, the Bethe roots are functions of this parameter, instead of pure numbers. In general, this new feature makes it significantly more difficult to solve the BAE. However, in the algebro-geometric approach, there is no extra difficulty, because the computations are purely algebraic and analytic — there is not much qualitative difference between manipulating numbers and algebraic expressions. Therefore, the AG computations can be adapted to cases with free parameters straightforwardly, which further demonstrates the power of our method.

Secondly, in the torus case, the computation of the partition function can be done in two directions which are equivalent. For the cylinder case, however, the computations of the partition function in the two directions or channels are quite different. In the open channel, we need to diagonalize the transfer matrix corresponding to *open* spin chains. The partition function is given by the sum over traces of powers of the open-channel transfer matrix, similarly to the torus case. In the closed channel, we diagonalize transfer matrices corresponding to *closed* spin chains, and the open boundaries become non-trivial boundary states. The partition function is thus given by a matrix element, between boundary states, of powers of the closed-channel transfer matrix.

For a given lattice size, the final results should be the same in both channels. Nevertheless, we may consider different limits. In the open (closed) channel, we can take the lattice size in the open (closed) direction to be finite and let the other direction tend to infinity. This *partial thermodynamic* limit has been studied in the torus case [7]. In the cylinder case, there are two different partial thermodynamic limits ("long narrow straw" and "short wide pancake"), which we study in detail in this paper. In these limits, it follows from the Beraha-Kahane-Weiss theorem [14] that the zeros of the partition function condense on certain curves in the complex plane of the spectral parameter.

The rest of the paper is structured as follows. In section 2, we give the set-up of the vertex model and its reformulation in terms of a diagonal-to-diagonal transfer matrix. In sections 3 and 4, we discuss the computation of the partition function in the two different channels, using Bethe ansatz and algebraic geometry. Section 5 is devoted to some general discussions on the algebro-geometric computations for the BAE/QQ-relation with a free parameter. In section 6 we present the partition functions which can be written in closed forms for any $M$ or $N$ in the two channels. These include $M=1$ in the open channel and $N=1, 2, 3$ in the closed channel. In section 7, we compute the zeros of the partition function close to the two partial thermodynamic limits (i.e., for very large aspect ratios) and compare them with the condensation curves, which we compute from the transfer matrix spectra. In appendix A, we give a brief introduction to the basic notions of computational algebraic geometry which are used in this paper. In appendix B, we give more details on the algebro-geometric computations. Appendix C to E contain the proofs of some statements in the main text. We collect explicit exact results in appendix F for small $M$ and $N$, where we can perform the computation in both channels and make consistency checks.

Some of the results we obtained are too large to be presented in the paper. They can also be downloaded from the webpage (576 MB in compressed form):

http://staff.ustc.edu.cn/~yzhphy/integrability.html
<figure><img src="image_3.png" /><figcaption>**Figure 1.** The 6-vertex model on a cylinder. In the open channel, there are $2M + 1$ sites in the horizontal direction with free boundary conditions, and $2N$ sites in the vertical direction with periodic boundary conditions.</figcaption></figure>

<figure><img src="image_4.png" /><figcaption>**Figure 2.** Diagonal-to-diagonal transfer matrix.</figcaption></figure>

## 2 Set-up

We consider the 6-vertex model at the isotropic point on a $(2M + 1) \times 2N$ medial lattice, for positive integers $M$ and $N$. We impose periodic boundary conditions in the vertical direction, and free boundary conditions in the horizontal direction; the geometry under consideration is a cylinder, as is shown in figure 1. The partition function on the lattice can be computed in two different channels.

**Open channel.** In the open channel, we define the diagonal-to-diagonal transfer matrix

$$t_D(u) = \tilde{R}_{23}(u) \tilde{R}_{45}(u) \cdots \tilde{R}_{2M,2M+1}(u) \tilde{R}_{12}(u) \tilde{R}_{34}(u) \cdots \tilde{R}_{2M-1,2M}(u), \quad (2.1)$$

shown in figure 2; by convention the direction of propagation (the “imaginary time” direction) is upwards in our figures. The subscripts label the spaces being acted upon, and $\tilde{R}$ is related to the standard $R$-matrix of the isotropic 6-vertex model by

$$\tilde{R}_{jk}(u) = P_{jk} R_{jk}(u), \quad (2.2)$$

where $P$ is the permutation operator. Written explicitly, the $R$-matrix is given by

$$R(u) = u + iP = \begin{pmatrix} a(u) & 0 & 0 & 0 \\ 0 & b(u) & c(u) & 0 \\ 0 & c(u) & b(u) & 0 \\ 0 & 0 & 0 & a(u) \end{pmatrix}, \quad (2.3)$$
<figure><img src="image_5.png" /><figcaption>**Figure 3.** In the closed channel, there are $2N$ sites in the horizontal direction with periodic boundary conditions, and $2M + 1$ sites in the vertical direction with free boundary conditions.</figcaption></figure>

with the Boltzmann weights

$$a(u) = u + i, \quad b(u) = u, \quad c(u) = i. \qquad (2.4)$$

The partition function is given by

$$Z(u, M, N) = \mathrm{tr} [t_D(u)^N]. \qquad (2.5)$$

For small values of $M$ and $N$, the results can be directly computed by brute force from the definition, for example

$$\begin{aligned}
Z(u, 1, 1) &= 2(u + 2i)^2, \\
Z(u, 1, 2) &= 2(u^4 + 8iu^3 - 12u^2 - 8iu + 4), \\
Z(u, 2, 2) &= 2(u^8 + 16iu^7 - 76u^6 - 184iu^5 + 268u^4 + 256iu^3 - 160u^2 - 64iu + 16).
\end{aligned} \qquad (2.6)$$

**Closed channel.** In the closed channel, the graph is rotated by $90^\circ$ degrees, as shown in figure 3. The rotated $R$-matrix which will be denoted by $R^c$ takes the following form

$$R^c(u) = \begin{pmatrix} b(u) & 0 & 0 & 0 \\ 0 & a(u) & c(u) & 0 \\ 0 & c(u) & a(u) & 0 \\ 0 & 0 & 0 & b(u) \end{pmatrix}. \qquad (2.7)$$

Notice that this $R$-matrix does not satisfy the Yang-Baxter equation. In the closed channel, the partition function is no longer given by a trace, since periodic boundary conditions are not imposed in the vertical direction. Instead, the open boundary conditions give rise to non-trivial boundary states in the closed channel. The partition function in the closed channel is given by

$$Z^c(u, M, N) = \langle \Psi_0 | U^\dagger \tilde{t}_D(u)^M | \Psi_0 \rangle, \qquad (2.8)$$
where $U$ is the one-site shift operator

$$U = P_{12}P_{23}\cdots P_{2N-1,2N}, \qquad (2.9)$$

and $\tilde{t}_D(u)$ is defined as

$$\tilde{t}_D(u) = \tilde{R}_{12}^c(u) \tilde{R}_{34}^c(u) \cdots \tilde{R}_{2N-1,2N}^c(u) \tilde{R}_{23}^c(u) \tilde{R}_{45}^c(u) \cdots \tilde{R}_{2N-2,2N-1}^c(u) \tilde{R}_{2N,1}^c(u), \quad (2.10)$$

where $\tilde{R}_{ij}^c(u) = P_{ij}R_{ij}^c(u)$. The boundary state $|\Psi_0\rangle$ is given by

$$|\Psi_0\rangle = |\psi_0\rangle^{\otimes N}, \quad |\psi_0\rangle = |\uparrow\rangle \otimes |\downarrow\rangle + |\downarrow\rangle \otimes |\uparrow\rangle, \qquad (2.11)$$

where we have used the notation

$$|\uparrow\rangle \equiv \begin{pmatrix} 1 \\ 0 \end{pmatrix}, \quad |\downarrow\rangle \equiv \begin{pmatrix} 0 \\ 1 \end{pmatrix}. \qquad (2.12)$$

The result for the partition function of course does not depend on how we perform the computation, so we have

$$Z(u, M, N) = Z^c(u, M, N). \qquad (2.13)$$

To verify the correctness of our various computations (see below), we have explicitly checked this identity for small value of $M$ and $N$.

Our goal is to compute analytic expressions of $Z(u, M, N)$ explicitly for different intermediate values of $M$ and $N$. When both $M$ and $N$ are large, the system can be well approximated by the computation in the thermodynamic limit. Here we instead focus on the interesting intermediate case where we keep one of $M$, $N$ to be finite (namely, the one that determines the dimension of the transfer matrix) and the other to be large. For finite $M$ ($\le 10$) and large $N$ (around a few hundred to thousands), we perform the computation in the open channel using (2.5); whereas for finite $N$ and large $M$, we work in the closed channel using (2.8). We discuss the computation of the partition function in both channels from the perspective of Bethe ansatz and algebraic geometry.

# 3 Partition function in the open channel

In this section, we discuss the computation of the partition function in the open channel using Bethe ansatz and algebraic geometry. Using this method, we are able to compute the partition function for finite $M \le 10$ and large $N$ (ranging from a few hundred to thousands).

## 3.1 Reformulation and Bethe ansatz

In order to apply the $R$-matrix machinery, the first step is to re-express the diagonal-to-diagonal transfer matrix $t_D(u)$ (2.1) in terms of an integrable open-chain transfer matrix with $2M + 1$ sites and with inhomogeneities $\{\theta_j\}$ [11]. Let us define

$$t(u; \{\theta_j\}) = \text{tr}_a K^+(u) T_a^{(2M+1)}(u; \{\theta_j\}) K^-(u) \hat{T}_a^{(2M+1)}(u; \{\theta_j\}), \qquad (3.1)$$
where the monodromy matrices are given by

$$ 
\begin{aligned}
T_a^{(l)}(u; \{\theta_j\}) &= R_{a1}(u - \theta_1) \dots R_{al}(u - \theta_l), \\
\hat{T}_a^{(l)}(u; \{\theta_j\}) &= R_{al}(u + \theta_l) \dots R_{a1}(u + \theta_1).
\end{aligned} 
\quad (3.2) $$

For our isotropic problem, the K-matrices are simply $K^+(u) = K^-(u) = \mathbb{I}$.

The eigenvalues $\Lambda(u; \{\theta_j\})$ of the transfer matrix $t(u; \{\theta_j\})$ (3.1), which can be obtained using algebraic Bethe ansatz [11], are given by

$$ 
\begin{aligned}
\Lambda(u; \{\theta_j\}) = \frac{2(u+i)}{(2u+i)} \left[ \prod_{j=1}^{2M+1} (u-\theta_j+i)(u+\theta_j+i) \right] \prod_{k=1}^{K} \frac{(u-u_k-\frac{i}{2})(u+u_k-\frac{i}{2})}{(u-u_k+\frac{i}{2})(u+u_k+\frac{i}{2})} \\
+ \frac{2u}{(2u+i)} \left[ \prod_{j=1}^{2M+1} (u-\theta_j)(u+\theta_j) \right] \prod_{k=1}^{K} \frac{(u-u_k+\frac{3i}{2})(u+u_k+\frac{3i}{2})}{(u-u_k+\frac{i}{2})(u+u_k+\frac{i}{2})},
\end{aligned} 
\quad (3.3) $$

where the $\{u_k\}$ are solutions of the BAE

$$ \prod_{j=1}^{2M+1} \frac{(u_k - \theta_j + \frac{i}{2})(u_k + \theta_j + \frac{i}{2})}{(u_k - \theta_j - \frac{i}{2})(u_k + \theta_j - \frac{i}{2})} = \prod_{j=1; j \neq k}^{K} \frac{(u_k - u_j + i)(u_k + u_j + i)}{(u_k - u_j - i)(u_k + u_j - i)}. \quad (3.4) $$

The key point (due to Destri and de Vega [12]) is to choose alternating spectral-parameter-dependent inhomogeneities as follows

$$ \theta_j = \theta_j(u) = (-1)^j u, \quad j = 1, \dots, 2M+1. \quad (3.5) $$

One can then show [13] that the diagonal-to-diagonal transfer matrix $t_D(u)$ is given by<fnref n="1" />

$$ t_D(u) = \frac{1}{i^{2M+1}(u+2i)} t(\frac{u}{2}; \{\theta_j(\frac{u}{2})\}), \quad (3.6) $$

noting that half of the R-matrices become proportional to permutation operators, and the spin chain geometry is transformed into the vertex one, see figure 4. Specifying in (3.3)–(3.4) the inhomogeneities as in (3.5), it follows that the eigenvalues $\Lambda_D(u)$ of $t_D(u)$ are given by

$$ \Lambda_D(u) = \Lambda_{D,K}(u) = \frac{1}{i^{2M+1}(u+2i)} \Lambda(\frac{u}{2}; \{\theta_j(\frac{u}{2})\}) \quad (3.7) $$

$$ = (u+i)^{2M} \prod_{k=1}^{K} \frac{(\frac{u}{2} - u_k - \frac{i}{2})(\frac{u}{2} + u_k - \frac{i}{2})}{(\frac{u}{2} - u_k + \frac{i}{2})(\frac{u}{2} + u_k + \frac{i}{2})}, \quad (3.8) $$

where the $\{u_k\}$ are solutions of the Bethe equations

$$ \left[ \frac{(u_k - \frac{u}{2} + \frac{i}{2})(u_k + \frac{u}{2} + \frac{i}{2})}{(u_k - \frac{u}{2} - \frac{i}{2})(u_k + \frac{u}{2} - \frac{i}{2})} \right]^{2M+1} = \prod_{j=1; j \neq k}^{K} \frac{(u_k - u_j + i)(u_k + u_j + i)}{(u_k - u_j - i)(u_k + u_j - i)}. \quad (3.9) $$

<footnote n="1">¹We note that $t_D(u)$ does not commute with $t_D(v)$.</footnote>
<figure><img src="image_6.png" /><figcaption>**Figure 4.** The R-matrices with zero argument act as permutation operators depicted with avoiding lines. This transforms the double-row transfer matrix of the spin-chain geometry into the diagonal-to-diagonal transfer matrix of the boundary vertex model.</figcaption></figure>

Here $k = 1, \dots, K$ and $K = 0, 1, \dots, M$. Note that the BAE (3.9) depend on the spectral parameter $u$, which is an unusual feature.

We observe that $t_D(u)$ has $su(2)$ symmetry

$$[t_D(u), \vec{S}] = 0, \quad \vec{S} = \sum_{j=1}^{2M+1} \frac{1}{2}\vec{\sigma}_j. \qquad (3.10)$$

The Bethe states are $su(2)$ highest-weight states, with spin

$$s = s^z = \frac{1}{2}(2M + 1) - K. \qquad (3.11)$$

For a given value of $K$, the corresponding eigenvalue therefore has degeneracy

$$2s + 1 = 2M + 2 - 2K. \qquad (3.12)$$

We conclude that the partition function (2.5) is given by

$$Z(u, M, N) = \sum_{K=0}^{M} \sum_{\text{sol}(M, K)} (2M + 2 - 2K) \Lambda_{D,K}(u)^N, \qquad (3.13)$$

where $\Lambda_{D,K}(u)$ is given by (3.8). Here $\text{sol}(M, K)$ stands for physical solutions $\{u_1, \dots, u_K\}$ of the BAE (3.9) with $2M + 1$ sites and $K$ Bethe roots. The number $\mathcal{N}(M, K)$ of such solutions has been conjectured to be given by [15]

$$\mathcal{N}(M, K) = \binom{2M + 1}{K} - \binom{2M + 1}{K - 1}. \qquad (3.14)$$

In order to find the explicit expressions for the partition function (3.13), we need to find the eigenvalues $\Lambda_{D,K}(u)$. They depend on the values of rapidities which are solutions of the BAE (3.9). We encounter two difficulties. Firstly, the solution set of the BAE (3.9) contains some redundancy, since not all solutions are physical; therefore one needs to impose extra selection rules [15]. Secondly, generally Bethe equations are a complicated system of algebraic equations, which cannot be solved analytically. What is worse, our
BAE (3.9) depend on a free parameter $u$, which means that the Bethe roots are functions of $u$, thereby making the BAE even harder than usual to solve.

In order to overcome these two difficulties, we need new tools, namely the rational $Q$-system and computational algebraic geometry. These methods have been applied successfully in computing the torus partition function of the 6-vertex model [7]. The BAE can be reformulated as a set of $QQ$-relations, with appropriate boundary conditions [8]. The benefit of working with the $Q$-system is twofold. Firstly, it is much more efficient to solve the rational $Q$-system than to directly solve the BAE. Secondly, all the solutions of the $Q$-system are physical, so there is no need to impose further selection rules [16, 17]. The rational $Q$-system, which was first developed for isotropic (XXX) spin chains with periodic boundary conditions [8], was recently generalized to anisotropic (XXZ) spin chains and to spin chains with certain open boundary conditions [17, 18]. We briefly review the $Q$-system for open boundary conditions in section 3.2.

Turning to the second difficulty, finding all solutions of the BAE (or of the corresponding $Q$-system) is in general only possible numerically. However, it was realized in [9] that if the goal is to sum over all the solutions of the BAE/$Q$-system for some rational function $f(\{u_j\})$ of the Bethe roots, then it can be done without knowing all the solutions explicitly. The idea is based on computational algebraic geometry. The solutions of the BAE/$Q$-system form a finite-dimensional linear space called the *quotient ring*. The dimension of the quotient ring is the number of physical solutions of the BAE/$Q$-system. A basis of the quotient ring can be constructed by standard methods using a Gröbner basis. Once a basis for the quotient ring is known, one can construct the *companion matrix* for the function $f(\{u_j\})$, which is a finite-dimensional representation of this function in the quotient ring. Taking the trace of the companion matrix gives the sought-after sum. For a more detailed introduction to these notions and explicit examples in the context of toroidal boundary conditions, we refer to the original papers [7, 9] and the textbooks [19, 20].

The same strategy can be applied to the open boundary conditions. The new feature that appears in this case is the dependence on a free parameter $u$. While this creates extra difficulty for numerical computations, it does not cost more effort in the algebro-geometric approach. The reason is that the constructions of the Gröbner basis, the basis for the quotient ring and companion matrices are purely algebraic; and it does not make much qualitative difference whether we have to manipulate numbers or algebraic expressions.<fnref n="2" />

## 3.2 BAE and $Q$-system

In this section, we review the rational $Q$-system for the SU(2)-invariant XXX spin chain with open boundary conditions [18]. Let us first consider the BAE with generic inhomogeneities $\{\theta_j\}$ (3.4)

$$ \prod_{l=1}^{L} \frac{(u_j - \theta_l + \frac{i}{2})(u_j + \theta_l - \frac{i}{2})}{(u_j - \theta_l - \frac{i}{2})(u_j + \theta_l - \frac{i}{2})} = \prod_{k \neq j}^{K} \frac{(u_j - u_k + i)(u_j + u_k + i)}{(u_j - u_k - i)(u_j + u_k - i)}, \quad (3.15) $$

<footnote n="2">²In practice, due to implementations of the algorithm in packages, the efficiencies for manipulating numbers and algebraic expressions can be different.</footnote>
where $L = 2M+1$. For given value of $L$ and $K$, we consider a two-row Young tableau with number of boxes $(L-K, K)$. At each vertex of the Young tableau, we associate a $Q$-function denoted by $Q_{a,s}$. The BAE (3.15) can be obtained from the following $QQ$-relations

$$v Q_{a+1,s}(v) Q_{a,s+1}(v) \propto Q_{a+1,s+1}^{+}(v) Q_{a,s}^{-}(v) - Q_{a+1,s+1}^{-}(v) Q_{a,s}^{+}(v), \quad (3.16)$$

where $f^{\pm}(v) := f(v \pm \frac{i}{2})$, and the $Q$-functions $Q_{a,s}(v)$ are even polynomials of $v$

$$Q_{a,s}(v) = v^{2M_{a,s}} + \sum_{k=0}^{M_{a,s}-1} c_{a,s}^{(k)} v^{2k}, \quad (3.17)$$

where $M_{a,s}$ is the number of boxes in the Young tableau to the right and top of the vertex $(a, s)$. The boundary conditions are chosen such that $Q_{2,s} = 1$, $Q_{1,s>K} = 1$ and

$$Q_{0,0}(v) = \prod_{j=1}^{L} (v - \theta_j)(v + \theta_j), \quad Q_{1,0}(v) = Q(v) = \prod_{k=1}^{K} (v - u_k)(v + u_k). \quad (3.18)$$

Here $Q_{1,0}(v)$ is the usual Baxter $Q$-function, whose zeros are the Bethe roots. Comparing to the periodic $QQ$-relations [8], the main differences are an extra factor $v$ that appears on the left-hand side of (3.16), and the degree of the polynomial of $Q_{a,s}$ which is twice the one for the periodic case. More details can be found in section 4.2 of [18].

For the Bethe equations (3.9), corresponding to the alternating inhomogeneities (3.5), we simply have<fnref n="3" />

$$Q_{0,0}(v) = \left[ \left( v - \frac{u}{2} \right) \left( v + \frac{u}{2} \right) \right]^{2M+1}. \quad (3.19)$$

To solve the $Q$-system, we impose the condition that all the $Q_{a,s}$ functions are polynomials. This requirement generates a set of algebraic equations called zero remainder conditions (ZRC) for the coefficients $c_{a,s}^{(k)}$. In principle, one can then solve the ZRC's and find $Q_{a,s}$, in particular the main $Q$-function $Q_{1,0}$. The zeros of $Q_{1,0}$ are the Bethe roots $\{u_k\}$, which are functions of the parameter $u$.

After finding the $Q$-functions, the next step is to find the eigenvalues $\Lambda_D$ (3.8), which in terms of $Q$-functions are given simply by

$$\Lambda_D(u) = (u + i)^{2M} \frac{Q(\frac{u}{2} - \frac{i}{2})}{Q(\frac{u}{2} + \frac{i}{2})}. \quad (3.20)$$

Plugging these into (3.13), we finally obtain the partition function.

### 3.3 Algebraic geometry

In this subsection, we give the main steps for the algebraic-geometric computation of the partition function:

1. Generate the set of zero remainder conditions (ZRC) from the rational $Q$-system;

<footnote n="3">³Recall that the argument of the double-row transfer matrix $t$ in (3.6) is $\frac{u}{2}$, rather than $u$.</footnote>
2. Compute the Gröbner basis of the ZRC;

3. Construct the quotient ring of the ZRC;

4. Compute the companion matrix for the eigenvalues $\Lambda_{D,K}(u)$ (3.8) which will be denoted by $\mathbb{T}_{M,K}(u)$;

5. Compute the matrix power of $\mathbb{T}_{M,K}(u)$ and take the trace

$$Z(u, M, N) = \sum_{K=0}^{M} (2M + 2 - 2K) \operatorname{tr} [\mathbb{T}_{M,K}(u)]^N . \quad (3.21)$$

Most steps listed above can be done straightforwardly, adapting the corresponding working of [7]. The only step that requires some additional work is step 4. The variables of ZRC are $c_{a,s}^{(k)}$ which are coefficients of the $Q$-functions. From these variables, it is easy to construct the companion matrix of the $Q$-function. For fixed $M$ and $K$, we denote the companion matrix by $\mathbb{Q}_{M,K}$. To find the companion matrix of $\Lambda_D$, which is essentially the companion matrix of $\Lambda$ (3.20) up to some multiplicative factors, the most direct way is to use homomorphism property of the companion matrix and write

$$\mathbb{T}_{M,K}(u) = (u + i)^{2M} \frac{\mathbb{Q}_{M,K}\left(\frac{u}{2} - \frac{i}{2}\right)}{\mathbb{Q}_{M,K}\left(\frac{u}{2} + \frac{i}{2}\right)}, \quad (3.22)$$

where $\mathbb{T}_{M,K}(u)$ is the companion matrix for $\Lambda_D(u)$ with fixed $M$ and $K$. Unfortunately, this method involves taking the inverse of the matrix $\mathbb{Q}_{M,K}(u + \frac{i}{2})$ analytically, which can be slow when the dimension of the matrix is large.

We find that a much more efficient way is to use the following $TQ$-relation

$$\begin{aligned} uT\left(u - \frac{i}{2}\right)Q(u) = & \left(u + \frac{i}{2}\right) \left[ \left(u + \frac{i}{2}\right)^2 - \left(\frac{z}{2}\right)^2 \right]^L Q(u - i) \\ & + \left(u - \frac{i}{2}\right) \left[ \left(u - \frac{i}{2}\right)^2 - \left(\frac{z}{2}\right)^2 \right]^L Q(u + i). \end{aligned} \quad (3.23)$$

In our case, we need to take $L = 2M + 1$ and $z = u$. To solve the $TQ$ relation (3.23), we make the following ansatz for the two polynomials

$$T(u) = t_{2L}u^{2L} + t_{2L-1}u^{2L-1} + \dots + t_0, \quad (3.24)$$

$$Q(u) = u^{2K} + s_{K-1}u^{2(K-1)} + \dots + s_0.$$

Notice that $Q(u)$ is an even polynomial and only even powers of $u$ appear, which is not the case for $T(u)$. Plugging the ansatz (3.24) into (3.23), we obtain a system of algebraic equations for the coefficients $\{t_0, t_1, \dots, t_{2L}, s_0, \dots, s_{K-1}\}$. In fact, solving these set of algebraic equations is yet another way to find the Bethe roots. For our purpose, we only solve the equation partially, namely we view $\{s_0, \dots, s_{K-1}\}$ as parameters and solve $\{t_k\}$ in terms of $\{s_j\}$. This turns out to be much simpler since the equations are linear. We find that $t_k(\{s_j\})$ are polynomials in the variables $\{s_j\}$. From ZRC and algebro-geometric
computations, we can find the companion matrix of $s_j$ which we denote by $\mathbf{s}_j$. Replacing $s_j$ by $\mathbf{s}_j$ and the products by matrix multiplication in $t_k(\{s_j\})$, we find the companion matrix $\mathbf{t}_k = t_k(\{\mathbf{s}_j\})$. Then the companion matrix of the eigenvalues of the transfer matrix is given by

$$T_{M,K}(u) = \mathbf{t}_{2L} u^{2L} + \mathbf{t}_{2L-1} u^{2L-1} + \dots + \mathbf{t}_0. \quad (3.25)$$

More details on the implementation of the algebro-geometric computations are given in appendix B.

Using the AG approach, we have computed the partition functions for $M$ up to 6, with $N$ up to 2048. We also calculated some partition functions with higher $M$ and lower $N$. The results for $2 \le M, N \le 6$ are given in appendix F.

# 4 Partition function in the closed channel

In this section, we compute the partition function in the closed channel. There are both simplifications and complications due to the presence of non-trivial boundary states. Indeed, the presence of boundary states imposes selection rules for the allowed solutions of the BAE. Firstly, it restricts to the states with zero total spin. This implies that the length of the spin chain must be even, which we denote by $2N$; and the only allowed number of Bethe roots is $K = N$. In contrast, for the periodic (torus) case [7], one must consider all the sectors $K = 0, 1, \dots, N$. Moreover, the Bethe roots must form Cooper-type pairs (4.33), which leads to significant simplification in the computation of the Gröbner basis and quotient ring.

This simplification comes with a price. Recall that the partition function in the closed channel takes the form of a matrix element given by (2.8). To evaluate this matrix element, we need the overlaps between the boundary states and the Bethe states. These overlaps are a new feature, which is not present in the open channel. They are complicated functions of the rapidities, which makes the computation of the companion matrix more difficult.

## 4.1 Reformulation and Bethe ansatz

To compute the expression (2.8) for the partition function in the closed channel, the first step is to rewrite $\tilde{t}_D$ (2.10) in terms of integrable closed-chain transfer matrices. To this end, we observe that $R^c(u)$ (2.7) is related to $R(u)$ by

$$R_{12}^{c}(u) = -\sigma_{1}^{z} R_{12}(\tilde{u}) \sigma_{1}^{z} = -\sigma_{2}^{z} R_{12}(\tilde{u}) \sigma_{2}^{z}, \quad (4.1)$$

where $\tilde{u}$ is the ‘crossing transformed’ spectral parameter defined by

$$\tilde{u} = -u - i. \quad (4.2)$$

The corresponding “checked” $R$-matrices are therefore related by

$$\tilde{R}_{12}^{c}(u) = -\sigma_{2}^{z} \tilde{R}_{12}(\tilde{u}) \sigma_{2}^{z}. \quad (4.3)$$

For later convenience, we define

$$\begin{aligned} \tilde{V}^{(1)} &= \tilde{R}_{23}^{c}(u) \tilde{R}_{45}^{c}(u) \cdots \tilde{R}_{2N-2,2N-1}^{c}(u) \tilde{R}_{2N,1}^{c}(u), \\ \tilde{V}^{(2)} &= \tilde{R}_{12}^{c}(u) \tilde{R}_{34}^{c}(u) \cdots \tilde{R}_{2N-1,2N}^{c}(u), \end{aligned} \quad (4.4)$$
in terms of which $\tilde{t}_D$ (2.10) is given by

$$ \tilde{t}_D(u) = \tilde{V}^{(2)}(u) \tilde{V}^{(1)}(u). \qquad (4.5) $$

It follows from (4.3) that

$$ \begin{aligned} \tilde{V}^{(1)}(u) &= (-1)^N \Omega^{(2)} V^{(1)}(\tilde{u}) \Omega^{(1)}, \\ \tilde{V}^{(2)}(u) &= (-1)^N \Omega^{(1)} V^{(2)}(\tilde{u}) \Omega^{(2)}, \end{aligned} \qquad (4.6) $$

where

$$ \Omega^{(1)} = \sigma_1^z \sigma_3^z \cdots \sigma_{2N-1}^z, \qquad \Omega^{(2)} = \sigma_2^z \sigma_4^z \cdots \sigma_{2N}^z, \qquad (4.7) $$

and the $V^{(i)}$ are the same as the corresponding $\tilde{V}^{(i)}$, but with $R$'s instead of $R^c$'s:

$$ \begin{aligned} V^{(1)}(u) &= \tilde{R}_{23}(u) \tilde{R}_{45}(u) \cdots \tilde{R}_{2N-2,2N-1}(u) \tilde{R}_{2N,1}(u), \\ V^{(2)}(u) &= \tilde{R}_{12}(u) \tilde{R}_{34}(u) \cdots \tilde{R}_{2N-1,2N}(u). \end{aligned} \qquad (4.8) $$

Let us now introduce integrable inhomogeneous closed-chain transfer matrices of length $2N$

$$ \begin{aligned} \tau(u; \{\theta_j\}) &= \mathrm{tr}_a T_a^{(2N)}(u; \{\theta_j\}), \\ \hat{\tau}(u; \{\theta_j\}) &= \mathrm{tr}_a \hat{T}_a^{(2N)}(u; \{\theta_j\}), \end{aligned} \qquad (4.9) $$

where the monodromy matrices are defined in (3.2). Using crossing symmetry

$$ R_{12}(\tilde{u}) = -\sigma_1^y R_{12}^{t_1}(u) \sigma_1^y, \qquad (4.10) $$

where '$t_1$' stands for transposition in the first quantum space, one can show that

$$ \tau(\tilde{u}; \{\theta_j\}) = \hat{\tau}(u; \{\theta_j\}). \qquad (4.11) $$

The transfer matrices (4.9) can be diagonalized by algebraic Bethe ansatz. We define the operators $A, B, C, D$ as matrix elements of the monodromy matrix (3.2) as usual

$$ T_a^{(2N)} \left( u - \frac{i}{2}; \{\theta_j\} \right) = \begin{pmatrix} A(u) & B(u) \\ C(u) & D(u) \end{pmatrix}, \qquad (4.12) $$

but note the shift in the spectral parameter. We consider the reference state or pseudovacuum

$$ |0\rangle = |\uparrow\rangle^{2N}. \qquad (4.13) $$

The Bethe states and their duals are constructed by acting with $B$- and $C$-operators on the reference state$^4$

$$ |\mathbf{u}\rangle = B(u_1) \cdots B(u_K) |0\rangle, \qquad \langle \mathbf{u} | = \langle 0 | C(u_1) \cdots C(u_K). \qquad (4.14) $$

<footnote>$^4$It should be kept in mind that the Bethe states depend on the inhomogeneities $\{\theta_j\}$; in order to lighten the notation, this dependence is not made explicit.</footnote>
<figure><img src="image_7.png" /><figcaption>**Figure 5.** The R-matrices with zero argument act as permutation operators depicted with avoiding lines. This transforms the product of periodic transfer matrices of the spin-chain geometry into the periodic diagonal-to-diagonal transfer matrix of the vertex model.</figcaption></figure>

These states are eigenstates of the transfer matrix $\tau(u; \{\theta_j\})$ (4.9)

$$ \tau(u; \{\theta_j\})|\mathbf{u}\rangle = \Lambda_c(u; \{\theta_j\})|\mathbf{u}\rangle, \quad (4.15) $$

with eigenvalues $\Lambda_c(u; \{\theta_j\})$ given by

$$ \Lambda_c(u; \{\theta_j\}) = \prod_{j=1}^{2N} (u - \theta_j + i) \prod_{k=1}^{K} \frac{u - u_k - \frac{i}{2}}{u - u_k + \frac{i}{2}} + \prod_{j=1}^{2N} (u - \theta_j) \prod_{k=1}^{K} \frac{u - u_k + \frac{3i}{2}}{u - u_k - \frac{i}{2}}, \quad (4.16) $$

provided that the rapidities $\mathbf{u} = \{u_1, \dots, u_K\}$ satisfy the BAE

$$ \prod_{j=1}^{2N} \frac{u_k - \theta_j + \frac{i}{2}}{u_k - \theta_j - \frac{i}{2}} = \prod_{j=1; j \neq k}^{K} \frac{u_k - u_j + i}{u_k - u_j - i}. \quad (4.17) $$

In contradistinction with (3.9) these BAE do not depend on the spectral parameter $u$, as is usually the case. The eigenvalues $\hat{\Lambda}_c(u; \{\theta_j\})$ of $\hat{\tau}(u; \{\theta_j\})$ are given by

$$ \hat{\Lambda}_c(u; \{\theta_j\}) = \Lambda_c(\tilde{u}; \{\theta_j\}), \quad (4.18) $$

as follows from (4.11).

To make contact with $\tilde{t}_D$, we again choose alternating spectral-parameter-dependent inhomogeneities

$$ \theta_j = \theta_j(u) = (-1)^{j+1} u, \quad j = 1, \dots, 2N. \quad (4.19) $$

The V's (4.8) can then be related to the closed-chain transfer matrices (4.9) by

$$ V^{(2)}(u) V^{(1)}(u) = (-1)^N \tau \left( \frac{u}{2}; \left\{ \theta_j \left( \frac{u}{2} \right) \right\} \right) \hat{\tau} \left( \frac{u}{2}; \left\{ \theta_j \left( \frac{u}{2} \right) \right\} \right), \quad (4.20) $$

which is similar to (3.6), see figure 5. In view of the relations (4.6) between $\tilde{V}$'s and V's, we conclude that $\tilde{t}_D$ (4.5) is given by

$$ \begin{aligned} \tilde{t}_D(u) &= \tilde{V}^{(2)}(u) \tilde{V}^{(1)}(u) \\ &= \Omega^{(1)} V^{(2)}(\tilde{u}) V^{(1)}(\tilde{u}) \Omega^{(1)} \\ &= (-1)^N \Omega^{(1)} \tau \left( \frac{\tilde{u}}{2}; \left\{ \theta_j \left( \frac{\tilde{u}}{2} \right) \right\} \right) \hat{\tau} \left( \frac{\tilde{u}}{2}; \left\{ \theta_j \left( \frac{\tilde{u}}{2} \right) \right\} \right) \Omega^{(1)}. \end{aligned} \quad (4.21) $$
The expression (2.8) for the partition function in the closed channel can therefore be recast as

$$
\begin{align}
Z^c(u, M, N) &= (-1)^{MN} \langle \Psi_0 | U^\dagger \Omega^{(1)} \left[ \tau \left( \frac{\tilde{u}}{2} ; \left\{ \theta_j \left( \frac{\tilde{u}}{2} \right) \right\} \right) \hat{\tau} \left( \frac{\tilde{u}}{2} ; \left\{ \theta_j \left( \frac{\tilde{u}}{2} \right) \right\} \right) \right]^M \Omega^{(1)} | \Psi_0 \rangle \nonumber \\
&= (-1)^{(M+1)N} \langle \Phi_0 | U^\dagger \left[ \tau \left( \frac{\tilde{u}}{2} ; \left\{ \theta_j \left( \frac{\tilde{u}}{2} \right) \right\} \right) \hat{\tau} \left( \frac{\tilde{u}}{2} ; \left\{ \theta_j \left( \frac{\tilde{u}}{2} \right) \right\} \right) \right]^M | \Phi_0 \rangle, \tag{4.22}
\end{align}
$$

where $|\Phi_0\rangle$ is the so-called dimer state

$$
|\Phi_0\rangle = \Omega^{(1)}|\Psi_0\rangle = (-1)^N \Omega^{(2)}|\Psi_0\rangle = |\phi_0\rangle^{\otimes N}, \quad |\phi_0\rangle = |\uparrow\rangle \otimes |\downarrow\rangle - |\downarrow\rangle \otimes |\uparrow\rangle, \quad (4.23)
$$

and we have also used the fact that $U^\dagger\Omega^{(1)}U = \Omega^{(2)}$. We now insert in (4.22) the completeness relation in terms of Bethe states (which are SU(2) highest-weight states) and their lower-weight descendants

$$
\sum_K \sum_{\text{sol}_c(N,K)} \frac{1}{\mathcal{N}(\mathbf{u})} |\mathbf{u}\rangle\langle\mathbf{u}| + \dots = \mathbf{1}, \quad (4.24)
$$

where $\text{sol}_c(N, K)$ stands for physical solutions $\mathbf{u}$ of the closed-chain BAE (4.17) with $2N$ sites and $K$ Bethe roots. Moreover, the normalization factor is given by

$$
\mathcal{N}(\mathbf{u}) = \langle \mathbf{u} | \mathbf{u} \rangle, \qquad (4.25)
$$

and the ellipsis denotes the descendant terms. However, these descendant terms do not
contribute to the matrix element (4.22), since the dimer state is annihilated by the spin
raising and lowering operators

$$
S^{\pm} |\Phi_0\rangle = 0, \quad \text{where} \quad S^{\pm} = S^x \pm iS^y, \quad \vec{S} = \sum_{j=1}^{2N} \frac{1}{2} \vec{\sigma}_j. \qquad (4.26)
$$

Moreover, in view of the fact

$$
0 = \langle \mathbf{u} | S^z | \Phi_0 \rangle = (N - K) \langle \mathbf{u} | \Phi_0 \rangle, \quad (4.27)
$$

the overlap $\langle \mathbf{u} | \Phi_0 \rangle$ vanishes unless $K = N$. The matrix element (4.22) therefore reduces to

$$
Z^c(u, M, N) = (-1)^{(M+1)N} \sum_{\text{sol}_c(N,N)} \frac{\langle \Phi_0 | U^\dagger | \mathbf{u} \rangle \langle \mathbf{u} | \Phi_0 \rangle}{\mathcal{N}(\mathbf{u})} \\
\times \left[ \Lambda_c \left( \frac{\tilde{u}}{2} ; \left\{ \theta_j \left( \frac{\tilde{u}}{2} \right) \right\} \right) \hat{\Lambda}_c \left( \frac{\tilde{u}}{2} ; \left\{ \theta_j \left( \frac{\tilde{u}}{2} \right) \right\} \right) \right]^M, \quad (4.28)
$$

where the sum runs over all physical solutions of the closed-chain BAE (4.17) in the $K = N$
sector. We note that the expressions involving the eigenvalues are given by

$$
\begin{align}
\Lambda_c \left( \frac{\tilde{u}}{2} ; \left\{ \theta_j \left( \frac{\tilde{u}}{2} \right) \right\} \right) &= (-iu)^N \prod_{k=1}^{N} \frac{-\frac{u}{2} - u_k - i}{-\frac{u}{2} - u_k}, \nonumber \\
\hat{\Lambda}_c \left( \frac{\tilde{u}}{2} ; \left\{ \theta_j \left( \frac{\tilde{u}}{2} \right) \right\} \right) &= (-iu)^N \prod_{k=1}^{N} \frac{\frac{u}{2} - u_k + i}{\frac{u}{2} - u_k}, \tag{4.29}
\end{align}
$$
as follows from (4.16) and (4.18). The normalization factor (4.25) is given by the Gaudin formula [21, 22]

$$ \mathcal{N}(\mathbf{u}) = (-1)^N \prod_{j=1}^{N} \left[ \left( u_j + \frac{\tilde{u}}{2} \right)^2 + \frac{1}{4} \right]^N \left[ \left( u_j - \frac{\tilde{u}}{2} \right)^2 + \frac{1}{4} \right]^N \\ \times \left[ \prod_{j,k=1; j \neq k}^{N} \frac{u_j - u_k - i}{u_j - u_k} \right] \det_N (G_{jk}), \qquad (4.30) $$

where

$$ G_{jk} = \delta_{jk} \left\{ N \left[ K_{\frac{1}{2}} \left( u_j - \frac{\tilde{u}}{2} \right) + K_{\frac{1}{2}} \left( u_j + \frac{\tilde{u}}{2} \right) \right] - \sum_{l=1}^{N} K_1 (u_j - u_l) \right\} + K_1 (u_j - u_k), \qquad (4.31) $$

and

$$ K_a(u) = \frac{2a}{u^2 + a^2}. \qquad (4.32) $$

Overlaps similar to $\langle \mathbf{u} | \Phi_0 \rangle$ have been studied extensively, see e.g. [23–30], see also [31, 32]. The cases of even and odd $N$ must be analyzed separately.

## 4.2 Even $N$

Let us first consider even values of $N$. Interestingly, only Bethe states with “paired” Bethe roots of the form

$$ \{u_1, -u_1, \dots, u_{\frac{N}{2}}, -u_{\frac{N}{2}}\} \qquad (4.33) $$

have non-zero overlaps [25, 26]. Such Bethe states have even parity, see (E.5) below. For such Bethe states, the overlaps are given by (see appendix C)

$$ \langle \mathbf{u} | \Phi_0 \rangle = \left( \frac{\tilde{u}}{2} + \frac{i}{2} \right)^N \left[ \prod_{j=1}^{\frac{N}{2}} \frac{1}{u_j \sqrt{u_j^2 + \frac{1}{4}}} \right] \sqrt{\frac{\det_{\frac{N}{2}}(G_{jk}^+)}{\det_{\frac{N}{2}}(G_{jk}^-)}} \sqrt{\mathcal{N}(\mathbf{u})}, \qquad (4.34) $$

where

$$ G_{jk}^{\pm} = \delta_{jk} \left\{ N \left[ K_{\frac{1}{2}} \left( u_j - \frac{\tilde{u}}{2} \right) + K_{\frac{1}{2}} \left( u_j + \frac{\tilde{u}}{2} \right) \right] - \sum_{l=1}^{\frac{N}{2}} K_1^{(+)}(u_j, u_l) \right\} + K_1^{(\pm)}(u_j, u_k), \qquad (4.35) $$

with

$$ K_a^{(\pm)}(u, v) = K_a(u - v) \pm K_a(u + v), \qquad (4.36) $$

and $K_a(u)$ is defined in (4.32). We remark that, for these states,

$$ \det_N (G_{jk}) = \det_{\frac{N}{2}} (G_{jk}^{+}) \det_{\frac{N}{2}} (G_{jk}^{-}). \qquad (4.37) $$
Moreover, we show in appendix D the relation

$$ \langle \Phi_0 | U^\dagger | \mathbf{u} \rangle = i^N (\tilde{u} + i)^{-N} \Lambda_c \left( \frac{\tilde{u}}{2}; \left\{ \theta_j \left( \frac{\tilde{u}}{2} \right) \right\} \right) \langle \mathbf{u} | \Phi_0 \rangle. \quad (4.38) $$

The matrix element (4.28) therefore reduces to

$$ \begin{aligned} Z^c(u, M, N) &= \frac{i^N (-1)^{(M+1)N}}{2^{2N}} (\tilde{u} + i)^N \sum_{\text{sol}(u_1, \dots, u_{\frac{N}{2}})} \left[ \prod_{j=1}^{\frac{N}{2}} \frac{1}{u_j^2 \left(u_j^2 + \frac{1}{4}\right)} \right] \frac{\det_{\frac{N}{2}}(G_{jk}^+)}{\det_{\frac{N}{2}}(G_{jk}^-)} \\ & \quad \times \Lambda_c \left(\frac{\tilde{u}}{2}; \left\{\theta_j\left(\frac{\tilde{u}}{2}\right)\right\}\right) \left[\Lambda_c\left(\frac{\tilde{u}}{2}; \left\{\theta_j\left(\frac{\tilde{u}}{2}\right)\right\}\right) \hat{\Lambda}_c\left(\frac{\tilde{u}}{2}; \left\{\theta_j\left(\frac{\tilde{u}}{2}\right)\right\}\right)\right]^M, \\ &= 2^{-2N} u^{2N(M+1)} \sum_{\text{sol}(u_1, \dots, u_{\frac{N}{2}})} \left[ \prod_{j=1}^{\frac{N}{2}} \frac{1}{u_j^2 \left(u_j^2 + \frac{1}{4}\right)} \right] \frac{\det_{\frac{N}{2}}(G_{jk}^+)}{\det_{\frac{N}{2}}(G_{jk}^-)} \\ & \quad \times \left[ \prod_{k=1}^{\frac{N}{2}} \left(\frac{u}{2} - u_k + i\right) \left(\frac{u}{2} + u_k + i\right) \right]^{2M+1}, \end{aligned} \quad (4.39) $$

where we have used (4.29) to pass to the second equality, and the sum is over all physical solutions of the BAE (4.17) with paired Bethe roots (4.33), see (4.48) below.

## 4.3 Odd N

For odd values of N, the only Bethe states with non-zero overlaps have one 0 Bethe root, and all the other Bethe roots form pairs; i.e., the Bethe roots are of the form

$$ \{u_1, -u_1, \dots, u_{\frac{N-1}{2}}, -u_{\frac{N-1}{2}}, 0\}. \quad (4.40) $$

Such Bethe states have odd parity, see (E.6) below. The overlaps are now given by

$$ \langle \mathbf{u} | \Phi_0 \rangle = - \left( \frac{\tilde{u}}{2} + \frac{i}{2} \right)^N \left[ \prod_{j=1}^{\frac{N-1}{2}} \frac{1}{u_j \sqrt{u_j^2 + \frac{1}{4}}} \right] \sqrt{\frac{\det_{\frac{N+1}{2}}(H_{jk})}{\det_{\frac{N-1}{2}}(G_{jk}^-)}} \sqrt{\mathcal{N}(\mathbf{u})}, \quad (4.41) $$

where H is the block matrix

$$ H = \begin{pmatrix} G^+ & 2C \\ C^t & D \end{pmatrix}_{\frac{N+1}{2} \times \frac{N+1}{2}}, \quad (4.42) $$

and $G^\pm$ are now the $\frac{N-1}{2} \times \frac{N-1}{2}$ matrices given by

$$ G_{jk}^{\pm} = \delta_{jk} \left\{ N \left[ K_{\frac{1}{2}} \left( u_j - \frac{\tilde{u}}{2} \right) + K_{\frac{1}{2}} \left( u_j + \frac{\tilde{u}}{2} \right) \right] - K_1(u_j) - \sum_{l=1}^{\frac{N-1}{2}} K_1^{(+)}(u_j, u_l) \right\} \\ + K_1^{(\pm)}(u_j, u_k), \quad j, k = 1, \dots, \frac{N-1}{2}, \quad (4.43) $$
with $K_a^{(\pm)}(u, v)$ and $K_a(u)$ defined as before, see (4.36), (4.32). Moreover, in (4.42), $C$ is an $\frac{N-1}{2}$-component column vector, $C^t$ is the corresponding row vector, and $D$ is a scalar, which are given by

$$C_j = K_1(u_j), \quad j = 1, \dots, \frac{N-1}{2}, \\ D = 2NK_1\left(\frac{\tilde{u}}{2}\right) - 2\sum_{l=1}^{\frac{N-1}{2}} K_1(u_l). \qquad (4.44)$$

We remark that, for these states,

$$\det_N(G_{jk}) = \det_{\frac{N+1}{2}}(H_{jk}) \det_{\frac{N-1}{2}}(G_{jk}^{-}). \qquad (4.45)$$

Moreover,

$$\langle \Phi_0 | U^\dagger | \mathbf{u} \rangle = i^N (\tilde{u} + i)^{-N} \Lambda_c \left( \frac{\tilde{u}}{2} ; \left\{ \theta_j \left( \frac{\tilde{u}}{2} \right) \right\} \right) \langle \mathbf{u} | \Phi_0 \rangle. \qquad (4.46)$$

The matrix element (4.28) now reduces to

$$Z^c(u, M, N) = \frac{i^N (-1)^{(M+1)N}}{2^{2N}} (\tilde{u} + i)^N \sum_{\text{sol}(u_1, \dots, u_{\frac{N-1}{2}})} \left[ \prod_{j=1}^{\frac{N-1}{2}} \frac{1}{u_j^2 \left(u_j^2 + \frac{1}{4}\right)} \right] \frac{\det_{\frac{N+1}{2}}(H_{jk})}{\det_{\frac{N-1}{2}}(G_{jk}^{-})} \\ \times \Lambda_c \left(\frac{\tilde{u}}{2}; \left\{\theta_j\left(\frac{\tilde{u}}{2}\right)\right\}\right) \left[\Lambda_c\left(\frac{\tilde{u}}{2}; \left\{\theta_j\left(\frac{\tilde{u}}{2}\right)\right\}\right) \hat{\Lambda}_c\left(\frac{\tilde{u}}{2}; \left\{\theta_j\left(\frac{\tilde{u}}{2}\right)\right\}\right)\right]^M, \\ = 2^{-2N} u^{2N(M+1)} \sum_{\text{sol}(u_1, \dots, u_{\frac{N-1}{2}})} \left[ \prod_{j=1}^{\frac{N-1}{2}} \frac{1}{u_j^2 \left(u_j^2 + \frac{1}{4}\right)} \right] \frac{\det_{\frac{N+1}{2}}(H_{jk})}{\det_{\frac{N-1}{2}}(G_{jk}^{-})} \\ \times \left[ \left(\frac{u+2i}{u}\right) \prod_{k=1}^{\frac{N-1}{2}} \left(\frac{\frac{u}{2}-u_k+i}{\frac{u}{2}-u_k}\right) \left(\frac{\frac{u}{2}+u_k+i}{\frac{u}{2}+u_k}\right) \right]^{2M+1}, \qquad (4.47)$$

where we have used (4.29) to pass to the second equality, and the sum is over all physical solutions of the BAE (4.17) with paired Bethe roots (4.40), see (4.53) below.

## 4.4 BAE and Q-system

We now summarize the BAE and Q-systems in the closed channel. They are special cases of those for the spin chain with periodic boundary condition with length $2N$ and magnon number $N$.

**Even N.** For the paired Bethe roots (4.33), the closed-chain Bethe equations (4.17) reduce to open-chain-like Bethe equations

$$\left(\frac{u_k - \frac{\tilde{u}}{2} + \frac{i}{2}}{u_k - \frac{\tilde{u}}{2} - \frac{i}{2}}\right)^N \left(\frac{u_k + \frac{\tilde{u}}{2} + \frac{i}{2}}{u_k + \frac{\tilde{u}}{2} - \frac{i}{2}}\right)^N = \left(\frac{u_k + \frac{i}{2}}{u_k - \frac{i}{2}}\right) \prod_{j=1; j \neq k}^{\frac{N}{2}} \left(\frac{u_k - u_j + i}{u_k - u_j - i}\right) \left(\frac{u_k + u_j + i}{u_k + u_j - i}\right), \qquad (4.48)$$
where $k = 1, \dots, \frac{N}{2}$. The corresponding $QQ$-relations are

$$Q_{a+1,s}(v) Q_{a,s+1}(v) \propto Q_{a+1,s+1}^{+}(v) Q_{a,s}^{-}(v) - Q_{a+1,s+1}^{-}(v) Q_{a,s}^{+}(v), \quad (4.49)$$

where $Q_{a,s}(v)$ are even polynomial functions of $v$. In particular, the main $Q$-function is given by

$$Q_{1,0}(v) = \prod_{j=1}^{\frac{N}{2}} (v - u_j)(v + u_j) = \sum_{k=0}^{\frac{N}{2}} c_{1,0}^{(2k)} v^{2k} = v^N + c_{1,0}^{(N-2)} v^{N-2} + \dots + c_{1,0}^{(0)}. \quad (4.50)$$

Moreover,

$$Q_{0,0}(v) = \left[ \left( v - \frac{\tilde{u}}{2} \right) \left( v + \frac{\tilde{u}}{2} \right) \right]^N. \quad (4.51)$$

Therefore, to obtain the ZRC for this case, we can simply take the ZRC for the generic periodic case and add the following constraints

$$c_{1,0}^{(2k+1)} = 0, \quad k = 0, 1, \dots, \frac{N}{2} - 1. \quad (4.52)$$

**Odd N.** For odd $N$, the nonzero paired Bethe roots (4.40) satisfy the open-chain-like Bethe equations

$$\left( \frac{u_k - \frac{\tilde{u}}{2} + \frac{i}{2}}{u_k - \frac{\tilde{u}}{2} - \frac{i}{2}} \right)^N \left( \frac{u_k + \frac{\tilde{u}}{2} + \frac{i}{2}}{u_k + \frac{\tilde{u}}{2} - \frac{i}{2}} \right)^N \\ = \left( \frac{u_k + \frac{i}{2}}{u_k - \frac{i}{2}} \right) \left( \frac{u_k + i}{u_k - i} \right) \prod_{j=1; j \neq k}^{\frac{N-1}{2}} \left( \frac{u_k - u_j + i}{u_k - u_j - i} \right) \left( \frac{u_k + u_j + i}{u_k + u_j - i} \right), \quad (4.53)$$

where $k = 1, \dots, (N-1)/2$. The corresponding $QQ$-relations are again given by (4.49), with $Q_{0,0}(v)$ given by (4.51). The $Q$-functions are odd polynomials in this case. In particular, the main $Q$-function takes the form

$$Q_{1,0}(v) = v \prod_{j=1}^{\frac{N-1}{2}} (v-u_j)(v+u_j) = \sum_{k=0}^{\frac{N-1}{2}} c_{1,0}^{(2k+1)} v^{2k+1} = v^N + c_{1,0}^{(N-2)} v^{N-2} + \dots c_{1,0}^{(1)} v. \quad (4.54)$$

Therefore, to obtain the ZRC in this case, we take the general ZRC for the generic periodic case and impose the conditions

$$c_{1,0}^{(2k)} = 0, \quad k = 0, 1, \dots, (N-1)/2. \quad (4.55)$$

For both even and odd values of $N$, we conjecture that the number $N(\mathcal{N})$ of such physical solutions of the BAE (4.48), (4.53) is given simply by

$$\mathcal{N}(\mathcal{N}) = \binom{\mathcal{N}}{\lfloor \mathcal{N}/2 \rfloor}, \quad (4.56)$$

where $\lfloor x \rfloor$ denotes the integer part of $x$. The first 10 values are given by

$$\{1, 2, 3, 6, 10, 20, 35, 70, 126, 252\}, \quad (4.57)$$

which we checked by explicit computations.
## 4.5 Algebraic geometry

The procedure for algebro-geometric computations follows the same steps as in the open channel. As we mentioned before, the computation of the Gröbner basis and quotient ring is simpler. The complication comes from computing the companion matrices. The companion matrix of the transfer matrices $\Lambda_c(v; \{\theta_j(u)\})$ can be constructed similarly from the TQ relation

$$Q(v)T(v - \frac{i}{2}) = \left[ \left( v + \frac{i}{2} \right)^2 - u^2 \right]^N Q(v - i) + \left[ \left( v - \frac{i}{2} \right)^2 - u^2 \right]^N Q(v + i). \quad (4.58)$$

The most complicated part is the ratio of determinants in (4.39) and (4.47). These are complicated functions in terms of rapidities $u$. As in the open channel, the natural variables that enter the AG computation are $c_{a,s}^{(k)}$. Therefore, in order to construct the companion matrices of the ratio of determinants, we need to first convert it to be functions $c_{a,s}^{(k)}$. This can be done because the ratio of determinants are symmetric rational functions.

**Even N.** For even $N$, after expanding the determinant the result can be written in the form

$$\frac{N(u_1, \dots, u_{N/2})}{D(u_1, \dots, u_{N/2})}, \quad (4.59)$$

where $N(u_1, \dots, u_{N/2})$ and $D(u_1, \dots, u_{N/2})$ are symmetric polynomials in $\{u_1^2, \dots, u_{N/2}^2\}$. By the fundamental theorem of symmetric polynomials, they can be written in terms of elementary symmetric polynomials of $\{u_1^2, \dots, u_{N/2}^2\}$, which we denote by $\{s_0, s_1, \dots, s_{N/2-1}\}$:

$$s_0 = u_1^2 u_2^2 \cdots u_{\frac{N}{2}}^2, \quad (4.60)$$

$$\begin{aligned} s_{\frac{N}{2}-2} &= u_1^2 u_2^2 + u_1^2 u_3^2 + \dots + u_{\frac{N}{2}-1}^2 u_{\frac{N}{2}}^2, \\ s_{\frac{N}{2}-1} &= u_1^2 + u_2^2 + \dots + u_{\frac{N}{2}-1}^2. \end{aligned}$$

They are related to the coefficients $c_{1,0}^{(2k)}$ in (4.50) as

$$c_{1,0}^{(2k)} = (-1)^{\frac{N}{2}+k} s_k, \quad k = 0, 1, \dots, \frac{N}{2}-1. \quad (4.61)$$

**Odd N.** For odd $N$, the result can be written as

$$\frac{N(u_1, \dots, u_{\frac{N-1}{2}})}{D(u_1, \dots, u_{\frac{N-1}{2}})} \quad (4.62)$$

Similarly, we can do the symmetry reduction and write the result in terms of the elementary symmetric polynomials

$$s_0 = u_1^2 u_2^2 \cdots u_{\frac{N-1}{2}}^2, \quad (4.63)$$

$$\begin{aligned} s_{\frac{N-1}{2}-2} &= u_1^2 u_2^2 + u_1^2 u_3^2 + \dots + u_{\frac{N-1}{2}-1}^2 u_{\frac{N-1}{2}}^2, \\ s_{\frac{N-1}{2}-1} &= u_1^2 + u_2^2 + \dots + u_{\frac{N-1}{2}-1}^2. \end{aligned}$$
They are related to the coefficients $c_{1,0}^{(2k+1)}$ in (4.54) as

$$c_{1,0}^{(2k+1)} = (-1)^{\frac{N-1}{2}+k} s_k, \quad k = 0, 1, \dots, \frac{N-1}{2}-1. \qquad (4.64)$$

There are two sources of complication worth mentioning. Firstly, computing the determinant explicitly and performing the symmetric reduction is straightforward in principle, but becomes cumbersome very quickly. It would be desirable to have a simpler form for these quantities. Secondly, the companion matrix of the quantity 1/D is the inverse of the companion matrix of D. Computing the inverse of a matrix analytically is also straightforward, but it has a negative impact on the efficiency of the computations when the dimension of the matrix becomes large. For the eigenvalues of the transfer matrix, we saw in (3.23) that the problem of computing inverses can be circumvented by using the TQ-relations. For the expression of the overlaps, it is not clear whether we can find better means to compute the companion matrix of the ratio N/D so as to avoid taking matrix inverses.

Using the algebro-geometric approach in the closed channel, we computed partition functions for $N$ up to 7 and $M$ up to 2048. The results for $2 \le M, N \le 6$ are listed in appendix F.

## 5 Algebraic equation with free parameters

In this section, we discuss the Gröbner basis of the ZRC in the closed channel in more detail. This will demonstrate further the power of the algebro-geometric approach for algebraic equations, especially for cases with free parameters.

The system of algebraic equations we consider depends on a parameter $u$. This means that the coefficients of the equations are no longer pure numbers, but functions of $u$. As a result, the solutions also depend on the parameter $u$. As we vary the parameter $u$, the solutions also change. One important question is if there are any special values $u$ where the solution space changes drastically. To understand this point, let us consider the following simple equation for $x$ whose coefficients depend on the free parameter $u$

$$(u^2 - 1)x^2 + ux - 1 = 0. \qquad (5.1)$$

At generic values of $u$, this is a quadratic equation with two solutions. However, when $u = \pm 1$, the leading term vanishes and the equation becomes linear. The number of solutions becomes one. Therefore at these 'singular' points, the structure of the solution space changes drastically.

A similar phenomena occurs in the BAE of the Heisenberg spin chain. Consider for a moment the more general XXZ spin chain and take the anisotropy parameter (alias quantum group deformation parameter) $q$ as the free parameter of the BAE. It is well-known that the solution space is very different between generic $q$ and $q$ being a root of unity. The traditional way to see this is by studying representation theory of the $U_q(sI(2))$ symmetry of the spin chain [33]. A more straightforward way to see this fact is by the algebro-geometric approach. We can compute the Gröbner basis of the corresponding
BAE/Q-system and analyze the coefficients as functions of q. We shall discuss this problem in more detail in a future publication.

Related to the current work, we consider the ZRC in the closed channel for the XXX spin chain. Here the free parameter is the inhomogeneity u. We want to know whether there are special singular points of u where the structure of solution space changes drastically. Recall that from elementary algebraic geometry, the number of solutions equals the linear dimension of the quotient ring. Furthermore, the quotient ring dimension is completely determined by the leading terms of the Gröbner basis. Therefore, to this end, we compute the Gröbner basis explicitly. For $N = 3$, the ideal can be written as $\langle g_1, g_2, g_3 \rangle$ where the elements of the Gröbner basis $g_i$ are given by

$$ 
\begin{aligned}
g_1 &= 192s_1^3 + (192u^2 - 208)s_1^2 - (192u^4 + 288u^2 - 4)s_1 - 192u^6 + 48u^4 + 60u^2 + 9, \\
g_2 &= s_2, \\
g_3 &= s_0.
\end{aligned} 
\quad (5.2) 
$$

Here we have chosen the ordering

$$ s_0 < s_1 < s_2. \quad (5.3) $$

We see from (5.2) that the leading terms are independent of u. This implies that the dimension of the quotient ring $\mathbb{C}[s_0, s_1, s_2]/\langle g_1, g_2, g_3 \rangle$, or equivalently the number of solutions, is independent of the value of u. Of course, the explicit solutions of the BAE will depend on the value of u, but there will always be 3 solutions to the ZRC for $N = 3$ at any value of u.

Similarly, we can write down a slightly more non-trivial example for $N = 4$. The ideal is given by $\langle g_1, \dots, g_6 \rangle$ where the Gröbner basis elements $g_i$ are given by

$$ 
\begin{aligned}
g_1 &= \mathbf{11520s}_0^3 + (-864 - 3840u^2 - 13824u^4)s_0^2 + (3 + 48u^2 + 288u^4 + 768u^6 + 768u^8)s_2^2 \\
    &\quad + (-1296 + 1728u^2 + 2304u^4 - 3072u^6)s_0s_2 \\
    &\quad + (-4 - 64u^2 - 384u^4 - 1024u^6 - 1024u^8)s_2 \\
    &\quad + (-251 - 3632u^2 - 1056u^4 + 3328u^6 - 6912u^8)s_0 \\
    &\quad + (-2 - 32u^2 - 192u^4 - 512u^6 - 512u^8),
\end{aligned}
$$

$$ 
\begin{aligned}
g_2 &= \mathbf{2304s}_0^2s_2 - 1536s_0s_2 + (768 + 3072u^2)s_0^2 + (-1 - 16u^2 - 96u^4 - 256u^6 - 256u^8)s_2 \\
    &\quad + (-80 - 2624u^2 - 768u^4 + 1024u^6)s_0 + (-2 - 32u^2 - 192u^4 - 512u^6 - 512u^8),
\end{aligned}
$$

$$ 
\begin{aligned}
g_3 &= \mathbf{768s}_0s_2^2 + (-2304 + 1024u^2)s_0s_2 + 1280s_0^2 + (-96 - 3840u^2 - 1536u^4)s_0 \\
    &\quad + (-3 - 48u^2 - 288u^4 - 768u^6 - 768u^8),
\end{aligned}
$$

$$ 
\begin{aligned}
g_4 &= \mathbf{48s}_2^3 + (-48 + 64u^2)s_2^2 - 352s_0s_2 + (-6 - 112u^2 - 96u^4)s_2 \\
    &\quad + (16 - 576u^2)s_0 + (3 + 12u^2 - 48u^4 - 192u^6)
\end{aligned}
$$

$$ 
\begin{aligned}
g_5 &= \mathbf{s}_1 \\
g_6 &= \mathbf{s}_3.
\end{aligned} 
\quad (5.4) 
$$

The leading terms are in boldface letters. We see again these terms are independent of u. For all the values of $N$ which we compute, this is true. It would be nice to prove this for general $N$.
Therefore from the algebro-geometric computation, we conclude that for any value of $u$, there exist solutions with definite parity (parity even/odd for even/odd $N$). For fixed $N$, the number of solutions is the same for any value of $u$, which has been given in (4.56).

We end this section by the following comment. The conclusion that there always exist solutions with definite parity for any $u$ is far from obvious from the ZRC or original BAE. It is also not easy to see this from numerical computations. On the contrary, it is a straightforward observation from the algebro-geometric computation. This shows again that algebro-geometric approach is a powerful tool to analyze the solution space of BAE.

# 6 Analytical results in closed form

In this section, we discuss the analytical results which can be written in closed forms for arbitrary $N$ and $M$ in the open and closed channel respectively.

## 6.1 Open channel

We first discuss the open channel. The partition function takes the same form as the torus case, which is written as the trace of the $N$-th power of the transfer matrix. If the eigenvalues of the transfer matrix can be found analytically, we can write down the partition function for any $N$. Here by analytical we mean more precisely expressible in terms of radicals. In the algebro-geometric approach, we first compute the companion matrix of the eigenvalue of the transfer matrix. The dimension of the companion matrix equals the number of physical solutions of the open channel BAE/Q-system. The eigenvalues of the companion matrix give the eigenvalues of the transfer matrices evaluated at each solution. From Galois theory, if the dimension of the companion matrix is less than 5, the eigenvalues can be expressed in terms of radicals. Therefore for the values of $M$ where all the companion matrices have dimension less than 5, we can obtain the analytical expression for any $N$. This requirement is only met by $M = 1$. Already for $M = 2$, we need to consider the sectors $K = 0, 1, 2$, and for $K = 1$ and $2$ the dimensions of the companion matrices are 4 and 6 respectively. For larger $M$, the dimensions of the companion matrices are even larger. We give the closed form expression for $M = 1$ and any $N$ in what follows.

**The $M = 1$ case.** We need to consider $K = 0, 1$. For $K = 0$, the eigenvalue of the transfer matrix is given by

$$ \Lambda_{\mathrm{D},0}(u) = (u + i)^2. \qquad (6.1) $$

For $K = 1$, the solution of BAE takes the form $\{u_1, -u_1\}$. The companion matrix is 2-dimensional. The two eigenvalues of the transfer matrix in this sector are given by

$$ \lambda_1(u) = -\frac{u^2}{2} - 1 - \frac{iu}{2}\sqrt{3u^2 + 4}, \qquad (6.2) $$

$$ \lambda_2(u) = -\frac{u^2}{2} - 1 + \frac{iu}{2}\sqrt{3u^2 + 4}. $$

The closed-form expression of the partition function, taking into account the $su(2)$ multiplicities (3.12), is then

$$ Z(u, 1, N) = 4(u + i)^{2N} + 2(\lambda_1(u)^N + \lambda_2(u)^N). \qquad (6.3) $$
Let us make one comment on the comparison with the torus case. The closed-form results have been found up to<fnref n="5" /> $M = 6$ in the torus case [7]. There we also used the fact that certain companion matrices can be further decomposed into smaller blocks, which implies the existence of non-trivial primary decompositions over the field $\mathbb{Q}$. Physically, this primary decomposition is related to decomposing the solutions of BAE/Q-system according to the total momentum. In the cylinder case, however, the total momentum is automatically zero for all allowed solutions, due to the presence of the boundary. Therefore, further decomposition according to the total momentum is not possible in the current case.

## 6.2 Closed channel

The situation is more interesting in the closed channel. The expression for the partition function is qualitatively different from the torus case, since we have a new ingredient: the non-trivial overlap between Bethe states and the boundary state. To find the analytical expressions, we first compute the companion matrices, both for the transfer matrix and the overlaps. For the values of $N$ where the dimensions of the companion matrices are less than 5, we can express the final result in terms of radicals for any $M$. This is satisfied by $N = 1, 2, 3$. The dimensions of the companion matrices are 1, 2, 3 respectively. We present the analytical results for these cases in what follows.

**The $N = 1$ case.** This case is somewhat trivial, but we give it here for completeness. There is only one allowed solution to the BAE, which is $\{0\}$. The eigenvalue of the transfer matrix is given by

$$ \Lambda_c = -i(u + 2i). \qquad (6.4) $$

The contribution from the overlaps only comes from $\det H_{jk}$ which is given by

$$ \det H_{jk} = \frac{8}{u(u + 2i)}. \qquad (6.5) $$

The partition function is thus given by (4.47).

$$ Z(u, M, 1) = \frac{i(-1)^M}{4} u (-i(u + 2i))^{2M+1} \frac{8}{u(u + 2i)} = 2(u + 2i)^{2M}. \qquad (6.6) $$

**The $N = 2$ case.** This is the simplest non-trivial case where $N$ is even. The Bethe roots take the form $\{u_1, -u_1\}$. There are two such solutions, which can be found straightforwardly by directly solving Bethe equations. Let us denote the companion matrices of $\Lambda_c(\tilde{u}_2, \{\tilde{u}_2\})$ by $\mathbb{T}_2(u)$ and companion matrix of the following factor

$$ \frac{1}{u_1(u_1^2 + \frac{1}{4})} \frac{\det G_{jk}^+}{\det G_{jk}^-} \qquad (6.7) $$

<footnote n="5">⁵Note that in the torus case, $M$ denoted the length of the spin chain [7], while here, in the cylinder case, the length of the spin chain is given by $2M + 1$.</footnote>
by $\mathbb{F}_2(u)$. The partition function is given by (4.39)

$$Z(u, M, 2) = -\frac{1}{16}u^2 \text{tr} \left[ \mathbb{T}_2^{2M+1}(u) \cdot \mathbb{F}_2(u) \right]. \qquad (6.8)$$

Let us denote the eigenvalues of $\mathbb{T}_2(u)$ and $\mathbb{F}_2(u)$ by $\lambda_{T,i}(u)$ and $\lambda_{F,i}$, $i = 1, 2$ respectively. They are given by

$$\begin{aligned}
\lambda_{T,1}(u) &= 1 - iu - \sqrt{1 + (u + 2i)(u + i)^2 u}, \\
\lambda_{T,2}(u) &= 1 - iu + \sqrt{1 + (u + 2i)(u + i)^2 u}
\end{aligned}
\qquad (6.9)$$

and

$$\lambda_{F,1}(u) = \frac{32}{u^2(u+2i)^2} + \frac{16(u^2 + 2iu - 2)\sqrt{1 + (u + 2i)(u + i)^2 u}}{u^2(u + 2i)^2(u^4 + 4iu^3 - 5u^2 - 2iu + 1)}, \qquad (6.10)$$

$$\lambda_{F,2}(u) = \frac{32}{u^2(u+2i)^2} - \frac{16(u^2 + 2iu - 2)\sqrt{1 + (u + 2i)(u + i)^2 u}}{u^2(u + 2i)^2(u^4 + 4iu^3 - 5u^2 - 2iu + 1)}.$$

Collecting all the results, the explicit closed-form expression for $N = 2$ and any $M$ is given by

$$Z(u, M, 2) = -\frac{1}{16}u^2 \left( [\lambda_{T,1}(u)]^{2M+1} \lambda_{F,1}(u) + [\lambda_{T,2}(u)]^{2M+1} \lambda_{F,2}(u) \right). \qquad (6.11)$$

One may check that this agrees in particular with (2.6) for $M = 2$. We see here that the eigenvalues take rather complicated forms in terms of radicals whose arguments are polynomials of $u$. Nevertheless, the final result is a polynomial, as it should be.

**The N = 3 case.** This is the simplest non-trivial case where $N$ is odd. The results are bulky, therefore it is more convenient to write them in terms of smaller building blocks. To this end, we recall the solution for cubic polynomial equations. Let us consider the following generic cubic equation

$$ax^3 + bx^2 + cx + d = 0, \qquad (6.12)$$

where $a \neq 0$. We define

$$\Delta_0 = b^2 - 3ac, \qquad \Delta_1 = 2b^3 - 9abc + 27a^2d \qquad (6.13)$$

and

$$C = \left( \frac{\Delta_1 + \sqrt{\Delta_1^2 - 4\Delta_0^3}}{2} \right)^{1/3}. \qquad (6.14)$$

Then the three solutions of the cubic equation (6.12) are given by

$$x_k = -\frac{1}{3a} \left( b + \xi^k C + \frac{\Delta_0}{\xi^k C} \right), \quad k = 1, 2, 3 \qquad (6.15)$$

where $\xi = (-1 + i\sqrt{3})/2$.
For $N=3$, the solutions of the Bethe equations take the form $\{u_1, -u_1, 0\}$. There are three physical solutions. Let us denote the companion matrix of $\Lambda_c(\frac{\tilde{u}}{2}, \{\frac{\tilde{u}}{2}\})$ by $\mathbb{T}_3(u)$ and the companion matrix of the following factor

$$ \frac{1}{u_1(u_1^2 + \frac{1}{4})} \frac{\det H_{jk}}{\det G_{jk}^{-}} \qquad (6.16) $$

by $\mathbb{F}_3(u)$. The partition function is given by

$$ Z(u, M, 3) = -\frac{i(-1)^{3M}}{64} u^3 \operatorname{tr} [\mathbb{T}_3^{2M+1}(u) \cdot \mathbb{F}_3(u)], \qquad (6.17) $$

where the trace is over the 3-dimensional quotient ring. One can check explicitly that $\mathbb{T}_3(u)$ and $\mathbb{F}_3(u)$ commute with each other and can thus be diagonalized simultaneously. Let us denote their eigenvalues by $\lambda_{T,i}(u)$ and $\lambda_{F,i}(u)$, with $i=1,2,3$. The characteristic equations of $\mathbb{T}_3(u)$ and $\mathbb{F}_3(u)$ take cubic forms

$$ x^3 + b_T x^2 + c_T x + d_T = 0, \qquad x^3 + b_F x^2 + c_F x + d_F = 0, \qquad (6.18) $$

where the coefficients are rational functions of $u$. The characteristic equations can be solved by radicals using (6.15). The relevant quantities are given as follows. For the eigenvalues of $\mathbb{T}_3(u)$, we have

$$ a_T = 1, \qquad b_T = 2u^2 + 3iu - 2 \qquad (6.19) $$

and

$$ \Delta_0^T = -6iu^5 + 31u^4 + 54iu^3 - 41u^2 - 12iu + 4, \qquad (6.20) $$

$$ \Delta_1^T = 27iu^9 - 216u^8 - 684iu^7 + 1096u^6 + 1035iu^5 - 840u^4 - 666iu^3 + 300u^2 + 72iu - 16. $$

The eigenvalues $\{\lambda_{T,1}, \lambda_{T,2}, \lambda_{T,3}\}$ are given by

$$ \lambda_{T,i}(u) = -\frac{1}{3} \left( b_T + \xi^i C_T + \frac{\Delta_0^T}{\xi^i C_T} \right), \qquad i = 1, 2, 3 \qquad (6.21) $$

where $C_T$ is defined as in (6.14). For the eigenvalues of $\mathbb{F}_3$, we have

$$ a_F = 1, \qquad b_F = -\frac{512}{u^3(2i+u)^3} \qquad (6.22) $$

and

$$ \Delta_0^F = \frac{16384}{u^6(2i+u)^6} \frac{P_0(u)}{P(u)}, \qquad \Delta_1^F = -\frac{4194304}{u^9(2i+u)^9} \frac{P_1(u)}{P(u)}, \qquad (6.23) $$

where

$$ \begin{aligned} P(u) &= 27u^{10} + 270iu^9 - 1125u^8 - 2520iu^7 + 3345u^6 + 2934iu^5 \\ & \qquad - 1875u^4 - 420iu^3 - 468u^2 - 96iu + 64, \\ P_0(u) &= 27u^{10} + 270iu^9 - 1395u^8 - 4680iu^7 + 10680u^6 + 16704iu^5 \\ & \qquad - 16608u^4 - 7872iu^3 - 576u^2 - 1536iu + 1024, \end{aligned} \qquad (6.24) $$

$$ \begin{aligned} P_1(u) &= 27u^{10} + 270iu^9 - 1530u^8 - 5760iu^7 + 15360u^6 + 29664iu^5 \\ & \qquad - 39648u^4 - 33792iu^3 + 11520u^2 - 6144iu + 4096. \end{aligned} $$
The eigenvalues are given by<fnref n="6" />

$$ \lambda_{F,i}(u) = -\frac{1}{3} \left( b_F + \xi^{i-1} C_F + \frac{\Delta_0^F}{\xi^{i-1} C_F} \right), \quad i = 1, 2, 3 \qquad (6.25) $$

Finally, combining all the results, the closed form expression is given by

$$ Z(u, M, 3) = -\frac{i(-1)^{3M}}{64} u^3 \sum_{i=1}^{3} (\lambda_{T,i})^{2M+1} \lambda_{F,i}(u). \qquad (6.26) $$

# 7 Zeros of partition functions

The study of partition function zeros is a well-known tool to access the phase diagram of models in statistical physics. The seminal works by Lee and Yang [34] and by Fisher [35] studied the zeros of the Ising model partition function, respectively with a complex magnetic field (at the critical temperature) and at a complex temperature (in zero magnetic field). But more generally, any statistical model depending on one (or more) parameters can be studied in the complex plane of the corresponding variable(s). In particular, the chromatic polynomial with $Q \in \mathbb{C}$ colors has been used as a test bed to develop a range of numerical, analytical and algebraic tools for computing partition function zeros and analyzing their behavior as the (partial) thermodynamic limit is approached [36–42]. Further information about the physical relevance of studying partition function zeros can be found in [43] and the extensive list of references in [36].

In the case at hand, we are interested in zeros of the partition function $Z(u, M, N)$ of the six-vertex model, in the complex plane of the spectral parameter, $u \in \mathbb{C}$. As explained in section 2, the algebro-geometric approach permits us to efficiently compute $Z(u, M, N)$ close to the partial thermodynamic limits $N \gg M$ (open channel) or $M \gg N$ (closed channel), and more precisely for aspect ratios $\rho := N/M$ of the order $\sim 10^3$ and $\sim 10^{-3}$, respectively.

## 7.1 Condensation curves

An important result for analyzing these cases is the Beraha-Kahane-Weiss (BKW) theorem [14]. When applied to partition functions of the form (3.13) for the open channel, respectively (4.39) or (4.47) for the closed channel, it states that the partition function zeros in the partial thermodynamic limits ($\rho \to \infty$ or $\rho \to 0$, respectively) will condense on a set of curves in the complex $u$-plane that we shall refer to as *condensation curves*. In particular, the condensation set cannot comprise isolated points, or areas. By standard theorems of complex analysis, each closed region delimited by these curves constitutes a thermodynamic phase (in the partial thermodynamic limit).

<footnote n="6">⁶Notice that the powers of $\xi$ in (6.25) are slightly different from (6.21). The reason for this convention is to make sure that $\lambda_i^T$ and $\lambda_i^F$ correspond to the same eigenvector. Working directly with characteristic equations, it is not immediately clear which eigenvalues correspond to the same eigenvector. We establish the correspondence by making numerical checks. We choose $u$ to be some purely imaginary numbers such that the arguments in the radicals are real and positive.</footnote>
To be more precise, let $\Lambda_i(u)$ denote the eigenvalues of the relevant transfer matrix (for the open or closed channel, respectively) that effectively contributes to $Z(u, M, N)$. For a given $u$, we order these eigenvalues by norm, so that $|\Lambda_1(u)| \ge |\Lambda_2(u)| \ge \dots$, and we say that an eigenvalue $\Lambda_i(u)$ is dominant at $u$ if there does not exist any other eigenvalue having a strictly greater norm. Under a mild non-degeneracy assumption (which is satisfied for the expressions of interest here), the BKW theorem [14] states that the condensation curves are given by the loci where there are (at least) two dominant eigenvalues, $|\Lambda_1(u)| = |\Lambda_2(u)|$. It is intuitively clear that this defines curves, since the relative phase $\phi(u) \in \mathbb{R}$ defined by $\Lambda_2(u) = e^{i\phi(u)}\Lambda_1(u)$ is allowed to vary along the curve. Moreover, a closer analysis [36] shows that the condensation curves may have bifurcation points (usually called T-points) or higher-order crossings when more than two eigenvalues are dominant. They may also have end-points under certain conditions; see [36] for more details.

A numerical technique for tracing out the condensation curves has been outlined in our previous paper on the toroidal geometry [7]. It builds on an efficient method for the numerically exact diagonalization of the relevant transfer matrix, and on a direct-search method that allows us to trace out the condensation curves. We refer the reader to [7] for more details, and focus instead on a technical point that is important (especially in the closed channel) for correctly computing the condensation curves for the cylindrical boundary conditions studied in this paper.

One might of course choose to obtain the eigenvalues by solving the BAE, either analytically or numerically. However, the Bethe ansatz does not provide a general principle to order the eigenvalues by norm. It is of course well known that in many, if not most, Betheansatz solvable models, for “physical” values of the parameters the dominant eigenvalue and its low-lying excitations are characterized by particularly nice and symmetric arrangements of the Bethe roots, and hence one can easily single out those eigenvalues. However, we here wish to examine our model for all complex values of the parameter $u$, and it is quite possible — and in fact true, as we shall see — that there will be a complicated pattern of crossings (in norm) of eigenvalues throughout the complex $u$-plain. To apply the BAE one would therefore have to make sure to obtain all the physical eigenvalues and compare their norm for each value of $u$. By contrast, the numerical scheme (Arnoldi’s method) that we use for the direct numerical diagonalization of the transfer matrix is particularly well suited for computing only the first few eigenvalues (in norm), so we shall rely on it here. We shall later compare the computed condensation curves with the zeros of partition functions obtained using Bethe ansatz and algebraic geometry.

The reader will have noticed that above we have twice referred to the diagonalization of a “relevant” transfer matrix. By this we mean a transfer matrix whose spectrum contains only the eigenvalues that provide non-zero contributions to $Z(u, M, N)$, after taking account of the boundary conditions via the trace (2.5) in the open channel, or the sandwich between boundary states (2.8) in the closed channel. These contributing eigenvalues correspond to the physical solutions in (3.13) for the open channel, or in (4.39) and (4.47) for the closed channel. A “relevant” transfer matrix is thus not only a linear operator that can build up the partition function $Z(u, M, N)$, but it must also have the correct dimension, namely $\sum_K \mathcal{N}(M, K)$ given by (3.14) in the open channel, or $\mathcal{N}(N)$ given by (4.56) in the
closed channel. Ensuring this is an issue of representation theory. We begin by discussing it in the open channel, which is easier.

## 7.2 Open channel

The defining ingredient of the transfer matrix is the $\tilde{R}$-matrix. Using (2.2)–(2.3), it reads

$$ \tilde{R}(u) = \begin{pmatrix} a(u) & 0 & 0 & 0 \\ 0 & c(u) & b(u) & 0 \\ 0 & b(u) & c(u) & 0 \\ 0 & 0 & 0 & a(u) \end{pmatrix}, \qquad (7.1) $$

with $a(u) = u + i$, $b(u) = u$ and $c(u) = i$. The most immediate transfer matrix approach is to let the diagonal-to-diagonal transfer matrix $t_D(u)$ given by (2.1) act in the 6-vertex model representation, that is, on the space $\{|\uparrow\rangle, |\downarrow\rangle\}^{2M+1}$ of dimension $2^{2M+1}$.

If we constrain to a fixed magnon number $K$, the dimension reduces to $(2M+1)_K$. This is larger than $N(M, K)$ given by (3.14), because we have not restricted to $su(2)$ highest-weight states. Therefore, each eigenvalue would appear with a multiplicity given by (3.12). Since each eigenvalue actually does contribute to $Z(u, M, N)$, dealing with this naive representation provides a feasible route to computing the condensation curves (and this was actually the approach used in [7]). However, the appearance of multiplicities is cumbersome and impedes the efficiency of the computations.

### 7.2.1 Temperley-Lieb algebra

To overcome this problem, notice that in the more general XXZ model with quantum-group deformation parameter $q$, the integrable $\tilde{R}$-matrix may be taken as

$$ \tilde{R}_{i,i+1}(u) = \alpha I + \beta E_i, \qquad (7.2) $$

for certain coefficients $\alpha, \beta$ depending on $u$ and $q$. Here $I$ denotes the identity operator and $E_i$ is a generator of the Temperley-Lieb (TL) algebra. The defining relations of this algebra, acting on $L = 2M + 1$ sites, are

$$ \begin{aligned} E_i E_i &= \delta E_i, \\ E_i E_{i \pm 1} E_i &= E_i, \\ E_i E_j &= E_j E_i \text{ for } |i-j| > 1, \end{aligned} \qquad (7.3) $$

where $i, j = 1, 2, \dots, L-1$ and the parameter $\delta := q + q^{-1}$. A representation of $E_i$, written in the same 6-vertex model representation as (7.1), reads

$$ E_i = \begin{pmatrix} 0 & 0 & 0 & 0 \\ 0 & q^{-1} & 1 & 0 \\ 0 & 1 & q & 0 \\ 0 & 0 & 0 & 0 \end{pmatrix}. \qquad (7.4) $$
We have here defined the q-deformed numbers

$$ (n)_q = \frac{q^n - q^{-n}}{q - q^{-1}} = U_{n-1}\left(\frac{\delta}{2}\right), \qquad (7.10) $$

where $U_p(x)$ denotes the p-th order Chebyshev polynomial of the second kind. This result (7.9) can be proved by using the quantum group symmetry $U_q(su(2))$ enjoyed by the spin chain in the open channel [44], or alternatively by purely combinatorial means [45].

The factors $(1+2s)_q$ appearing in (7.9) account for the multiplicities in the problem. In the limit $q \to -1$ corresponding to the XXX case of interest, the q-deformed numbers become $(n)_q = n$ for $n$ odd, and $(n)_q = -n$ for $n$ even. The latter minus sign can be eliminated at the price of an overall sign change of the partition function (7.9), since only even $n = 1+2s$ occur in the problem. This corresponds to $q \mapsto -q$, so that the quantum group symmetry $U_q(su(2))$ becomes just ordinary $su(2)$ in the limit. The multiplicities then become $(1+2s)_q = 1+2s = 2M+2-2K$, in agreement with (3.11).

In conclusion, we see that not only do the link pattern representations of the TL algebra lead to the correct dimensions $N(M, K)$, but they also account for the correct $su(2)$ multiplicities $2M+2-2K$ of eigenvalues in the XXX spin chain.

### 7.2.2 Results

We have computed the condensation curves by applying the numerical methods of [7] to the transfer matrix $t_D(u)$ given by (2.1). The latter is taken to act on the representation given by the union of link patterns on $L = 2M+1$ sites with $K \in \{0, 1, \dots, M\}$ arcs and $d = L-2K$ defects.

The results for the condensation curves with $M = 2, 3, 4, 5$ are shown in figure 6. The curves are confined to the half-space $\mathrm{Im}\,u \le 0$, and they are invariant under changing the sign of $\mathrm{Re}\,u$. Therefore it is enough to consider them in the fourth quadrant: $\mathrm{Re}\,u \ge 0$, $\mathrm{Im}\,u \le 0$. The condensation curves display several noteworthy features:

1. Outside the curves and in the enclosed regions delimited by blue curves, the dominant eigenvalue belongs to the $K = M$ magnon sector (i.e., $d = 1$ defect in the TL representation). For the largest size $M = 5$ there are also enclosed regions delimited by green curves: in this case the dominant eigenvalue belongs to the $K = M-1$ sector ($d = 3$).

2. The whole real axis forms part of the curve. In fact, when $u \in \mathbb{R}$, all the eigenvalues are equimodular and have norm $(u^2+1)^M$. Above the real axis ($\mathrm{Im}\,u > 0$) the dominant eigenvalue is the unique eigenvalue in the $K = 0$ sector.

3. There is a segment of the imaginary axis, $\mathrm{Re}\,u = 0$ and $\mathrm{Im}\,u \le u_c(M)$ which also belongs to the condensation curve. Along this segment, the two dominant eigenvalues come from the $K = M$ sector. For the end-point $u_c(M)$ we find the following results:

<table><thead><tr><th>M</th><th>2</th><th>3</th><th>4</th><th>5</th><th>6</th><th>7</th></tr></thead><tbody><tr><td>u<sub>c</sub>(M)</td><td>-1.091487</td><td>-1.065097</td><td>-1.050552</td><td>-1.041328</td><td>-1.034954</td><td>-1.030285</td></tr></tbody></table>

4. It seems compelling from these data that

$$ u_c(M) \to -1 \text{ as } M \to \infty, \qquad (7.11) $$
<figure><img src="image_8.png" /><figcaption>**Figure 6.** Condensation curves for partition function zeros on a $(2M + 1) \times 2N$ cylinder, in the limit $N \to \infty$ (aspect ratio $\rho \to \infty$, open channel). The panels show, in reading direction, the cases $M = 2, 3, 4, 5$.</figcaption></figure>

with a finite-size correction proportional to $1/M$. We also note that at this asymptotic end-point, $u = -i$, for all finite $M$ there is a unique dominant eigenvalue which belongs to the $K = M$ sector and has norm 1, while all other eigenvalues have norm 0.

5. The remainder of the condensation curve forms a single connected component with no end-points. It however has a number of T-points that grows fast with $M$. Notice that we have taken great care to determine all of these T-points, some of which are very close and thus hard to distinguish in the figures. To help the reader identifying them, they have been marked by small crosses.

6. For the leftmost point $u_*$ of this connected component (i.e., the point with the smallest imaginary part) we find the following results:

<table><thead><tr><th><i>M</i></th><th>2</th><th>3</th><th>4</th><th>5</th><th>6</th><th>7</th></tr></thead><tbody><tr><td>Re <i>u</i><sub>*</sub>(<i>M</i>)</td><td>0.496489</td><td>0.338134</td><td>0.258384</td><td>0.209593</td><td>0.176490</td><td>0.152498</td></tr><tr><td>Im <i>u</i><sub>*</sub>(<i>M</i>)</td><td>-1.307913</td><td>-1.196739</td><td>-1.146652</td><td>-1.117510</td><td>-1.098264</td><td>-1.084539</td></tr></tbody></table>

7. It seems compelling from these data that

$$ \begin{aligned} \operatorname{Re} u_{*}(M) &\to 0 \quad \text{as } M \to \infty, \\ \operatorname{Im} u_{*}(M) &\to -1 \quad \text{as } M \to \infty, \end{aligned} \qquad (7.12) $$
<figure><img src="image_9.png" /><figcaption>**Figure 7.** Comparison between the partition function zeros on a $(2M + 1) \times 2N$ cylinder, with $N = 1024$, and the corresponding condensation curves in the $N \to \infty$ limit (open channel). The panels show, in reading direction, the cases $M = 2, 3, 4, 5$.</figcaption></figure>

both with finite-size corrections proportional to $1/M$. We conclude that the leftmost point of the connected component converges to the same value as the end-point, namely $u = -i$. This kind of “pinching” is characteristic of a phase transition [34, 35]; note however that the limit $u \to -i$ of the XXX model is singular and does not present a critical point in the usual sense.

We now compare the condensation curves with the partition function zeros. The partition functions $Z(u, M, N)$ were first computed from the algebro-geometric approach, for $M = 2, 3, 4, 5$ and $N = 1024$, which corresponds to a very large aspect ratio $\rho \sim 10^3$. The zeros of $Z(u, M, N)$ were then computed by the program MPSOLVE [46][47], which is a multiprecision implementation of the Ehrlich-Aberth method [48, 49], an iterative approach to finding all zeros of a polynomial simultaneously.

The resulting zeros are shown in figure 7, as red points superposed on the condensation curves of figure 6. The agreement is in general very good, although some portions of the condensation curves are very sparsely populated with zeros; in those cases the zeros are still at a discernible distance from the curves, in spite of the large aspect ratio. We have verified that the agreement improves upon increasing $\rho$.<fnref n="7" />

<footnote n="7">⁷One may notice that some of the roots (in particular for $M = 5$, in the region $0 < \text{Re } u < 1$) stray off the curves in a seemingly erratic fashion. We believe that this is an artifact of MPSOLVE when applied to polynomials of very high degree.</footnote>
## 7.3 Closed channel

In the closed channel the $\tilde{R}$-matrix can be inferred from (2.7) and (2.2). It reads

$$ \tilde{R}^c(u) = \begin{pmatrix} b(u) & 0 & 0 & 0 \\ 0 & c(u) & a(u) & 0 \\ 0 & a(u) & c(u) & 0 \\ 0 & 0 & 0 & b(u) \end{pmatrix}, \qquad (7.13) $$

still with $a(u) = u + i$, $b(u) = u$ and $c(u) = i$. However, as we shall soon see, it is convenient to apply a diagonal gauge transformation $D = \text{diag}(1, -1)$ in the left in-space and the right out-space of $\tilde{R}^c$; that is, $\tilde{R}_{12}^c \mapsto D_1 \tilde{R}_{12}^c D_1$. This has the effect of changing the sign of $c(u)$ while leaving the partition function unchanged: the gauge matrices square to the identity at the intersections between $\tilde{R}$-matrices when taking powers of the transfer matrix $\tilde{t}_D(u)$ given by (2.10). To complete the transformation, the first and last row of gauge transformations have to be absorbed into a redefinition of the boundary states $\langle \Psi_0 |$ and $| \Psi_0 \rangle$ appearing in (2.8).

### 7.3.1 Temperley-Lieb algebra

As in the open channel, we can rewrite the $\tilde{R}$-matrix in terms of TL generators (7.4):

$$ \tilde{R}_{i,i+1}^c(u) = \alpha I + \beta E_i. \qquad (7.14) $$

To match (7.13), with $c(u) = -i$ after the gauge transformation, we must now set

$$ \alpha = u, \quad \beta = u + i, \quad q = -1, \quad \delta = -2. \qquad (7.15) $$

In the closed channel, the TL algebra is defined on $L = 2N$ sites. The goal is now to find a representation having the same dimension $N(N)$, see (4.56), as the number of physical solutions appearing in the closed-channel expressions of the partition function, (4.39) and (4.47). This issue is more complicated than in the open channel.

As a first step, we let the TL generators act on the basis of link patterns, as before. Since the boundary states restrict to zero total spin, the only allowed number of Bethe roots is $K = N$ (see section 4). This implies that the link patterns are free of defects ($d = 0$). The transfer matrix $\tilde{t}_D(u)$ is then given by (2.10) with (7.14), where the TL generators $E_i$ act on the link patterns as described in section 7.2.1. To reproduce the partition function (2.8) we also need to interpret the boundary state (2.11) within the TL representation. The natural object is the quantum-group singlet of two neighboring sites

$$ |\psi_0\rangle_{\text{TL}} = q^{1/2} |\uparrow\rangle \otimes |\downarrow\rangle + q^{-1/2} |\downarrow\rangle \otimes |\uparrow\rangle, \qquad (7.16) $$

which is represented in terms of link patterns as a short arc joining the neighboring sites. We should however remember at this stage the gauge transformation that allowed us to switch the sign of $c(u)$. To compensate this, we need to insert a minus sign for a down-spin in the second tensorand, to obtain

$$ |\tilde{\psi}_0\rangle_{\text{TL}} = -q^{1/2} |\uparrow\rangle \otimes |\downarrow\rangle + q^{-1/2} |\downarrow\rangle \otimes |\uparrow\rangle, \qquad (7.17) $$

With $q = -1$, this is proportional to $|\psi_0\rangle$ of (2.11).
On the other hand it is easy to check from (7.4) that the TL generator $E_i$ is nothing but the (unnormalized) projector onto the quantum-group singlet. Therefore, just as $E_i = \mathcal{X}$, the initial boundary state $|\Psi_0\rangle$ can be represented graphically by the defect-free link pattern in which sites $2j-1$ and $2j$ are connected by an arc, for each $j = 1, 2, \dots, N$. Similarly, the final boundary state $\langle\Psi_0|$ is interpreted as the TL contraction of the corresponding pairs of sites. With these identifications, we have explicitly verified for small $N$ and $M$ that the TL formalism produces the correct partition functions, such as (2.6).

With the spin-zero constraint imposed, the TL dimension is thus equal to the number of defect-free link patterns on $L = 2N$ sites. This is easily shown to be given by the Catalan numbers

$$ \mathrm{Cat}(N) = \frac{1}{N+1} \binom{2N}{N}, \qquad (7.18) $$

for which the first 10 values are given by

$$ \{1, 2, 5, 14, 42, 132, 429, 1430, 4862, 16796\}. \qquad (7.19) $$

Although this is smaller than the dimension of the 6-vertex-model representation constrained to the $S^z = 0$ sector, viz. $\binom{2N}{N}$, it is not as small as (4.56), so further work is needed.

The transfer matrix and the boundary states are also symmetric under cyclic shifts (in units of two lattice spacings) of the $L = 2N$ sites. This symmetry can be used to further reduce the dimension of the transfer matrix. Indeed, after acting with $\tilde{t}_D(u)$ we project each link pattern obtained onto a suitably chosen image under the cyclic group $\mathbb{Z}_N$. In this way each orbit under $\mathbb{Z}_N$ is mapped onto a unique representative link pattern. The dimension of the corresponding rotation invariant transfer matrix then reduces to [50]

$$ \dim_{\mathbb{Z}_N}(N) = \frac{1}{N} \sum_{m|N} \varphi(N/m) \binom{2m}{m} - \mathrm{Cat}(N), \qquad (7.20) $$

where the sum is over the divisors of $N$, and $\varphi(x)$ denotes the Euler totient function. The first 10 values are given by

$$ \{1, 2, 3, 6, 10, 28, 63, 190, 546, 1708\}. \qquad (7.21) $$

But one can go a bit further, since the transfer matrix and boundary states are also invariant under reflections. This gives rise to a symmetry under the dihedral group $\mathbb{D}_N$. The dimension of the rotation-and-reflection invariant transfer matrix then becomes [50]

$$ \dim_{\mathbb{D}_N}(N) = \frac{1}{2} \left( \frac{1}{N} \sum_{m|N} \varphi(N/m) \binom{2m}{m} - \mathrm{Cat}(N) + \binom{N}{\lfloor N/2 \rfloor} \right), \qquad (7.22) $$

of which the first 10 values are

$$ \{1, 2, 3, 6, 10, 24, 49, 130, 336, 980\}. \qquad (7.23) $$

The process of imposing more and more symmetries and reducing the dimension of the relevant transfer matrices might be realized at the ZRC level by imposing more and
more constraints on the $Q$-functions. Consider the ZRC of a closed spin chain with length $L = 2N$ and $N$ magnons. The corresponding Bethe states are in the $S^z = 0$ sector. In order to restrict to the parity symmetric solutions, we need to impose the condition $Q(u) = Q(-u)$ for any $u$. This leads to further constraints to the ZRC and reduces the number of allowed solutions down to $\mathcal{N}(N)$. Since $Q(u)$ is a polynomial of order $N$, the constraint $Q(u) = Q(-u)$ can also be imposed by $Q(x_k) = Q(-x_k)$ at $N$ different values. Now the main observation is that at certain values of $x_k$, the constraints have a clear physical meaning. For example, taking $x_1 = i/2$, the constraint $Q(i/2) = Q(-i/2)$ is equivalent to

$$ \frac{Q(-i/2)}{Q(+i/2)} = \prod_{k=1}^{N} \frac{u_k + \frac{i}{2}}{u_k - \frac{i}{2}} = 1, \qquad (7.24) $$

which restricts to the solutions with zero total momentum. It is therefore an interesting question to see whether the dihedral symmetry can be realized in this way. If so, at which further value(s) of $x_k$ would we need to impose $Q(x_k) = Q(-x_k)$?

We do not presently know if and how one can identify a TL representation whose dimension equals $\mathcal{N}(N) = \binom{N}{\lfloor N/2 \rfloor}$ given by (4.56). It certainly appears remarkable at this stage that

$$ 2 \dim_{\mathbb{D}_N}(N) - \dim_{\mathbb{Z}_N}(N) = \mathcal{N}(N), \qquad (7.25) $$

as already noticed in [50]. It is also worth pointing out that $\mathcal{N}(N)$ can be interpreted as the number of defect-free link patterns on $2N$ sites which are symmetric around the mid-point. We leave the further investigation of this question for future work.

### 7.3.2 Results

We have computed the condensation curves in the closed channel, using the TL link-pattern representations identified above, namely using: 1) spin-zero (i.e., defect free) link patterns, 2) spin-zero link patterns with cyclic symmetry $\mathbb{Z}_N$, and 3) spin-zero link patterns with dihedral symmetry.

Figure 8 shows the results using only the spin-zero constraint. In the regions enclosed by curves of blue color there is a unique dominant eigenvalue, whereas in the regions enclosed by green (resp. yellow) color the dominant eigenvalue has multiplicity two (resp. three). Obviously the sought-after representation of dimension $\mathcal{N}(N)$ is expected to be multiplicity-free, so the corresponding condensation curve should be free of green and yellow branches. Nevertheless, the curves in figure 8 are expected to correctly produce the condensation curves of partition function zeros for any system described by the transfer matrix $\tilde{t}_D(u)$ and with boundary states that impose only the spin-zero symmetry, while breaking any other symmetry (e.g., by imposing spatially inhomogeneous weights).

Next we show in figure 9 the results using both the spin-zero and the cyclic symmetry $\mathbb{Z}_N$. When compared to figure 8 it can be seen that many branches of the curves are unchanged. However all of the yellow and some of the green curves have now disappeared, reflecting the fact that the eigenvalues which were formerly dominant inside the regions enclosed by green and yellow colors have now been eliminated from the spectrum, since they do not correspond to $\mathbb{Z}_N$ symmetric eigenstates. The curves in figure 9 should give the correct condensation curves for systems having the spin-zero and cyclic symmetries.
<figure><img src="image_10.png" /><figcaption>**Figure 8.** Condensation curves for partition function zeros on a $(2M + 1) \times 2N$ cylinder, in the limit $M \to \infty$ (closed channel), for a system exhibiting only spin-zero symmetry. The panels show, in reading direction, the cases $N = 3, 4, 5, 6$.</figcaption></figure>

But those with $N = 4, 5$ should even provide the correct results for the full “Cooper-pair” symmetry (4.33), since the TL dimension is then equal to the number of physical solutions.

Finally we depict in figure 10 results using the spin-zero and dihedral symmetry $D_N$. For $N = 6$ the condensation curve is identical to the one found with cyclic symmetry, meaning that none of the four eliminated eigenvalues (when going from $\dim_{Z_N}(6) = 28$ to $\dim_{D_N}(6) = 24$) was dominant anywhere in the complex $u$-plane. It should provide the correct result for the full “Cooper-pair” symmetry (4.33) if the elimination of four more eigenvalues (going from $\dim_{D_N}(6) = 24$ to $\mathcal{N}(6) = 20$) turned out to be equally innocuous. The $N = 7$ curve with dihedral symmetry has only branches corresponding to multiplicity-free eigenvalues, so it may also apply to the full paired symmetry, although a greater amount of eigenvalues are redundant in this case.

All the curves contain an end-point $u_e$ close to the origin for which we have found the following results:

<table><thead><tr><th>N</th><th>4</th><th>5</th><th>6</th><th>7</th><th>8</th><th>9</th></tr></thead><tbody><tr><td>Re u<sub>e</sub>(N)</td><td>0.234690</td><td>0.186435</td><td>0.154775</td><td>0.132364</td><td>0.115649</td><td>0.102696</td></tr><tr><td>Im u<sub>e</sub>(N)</td><td>-0.057271</td><td>-0.045012</td><td>-0.037154</td><td>-0.031665</td><td>-0.027604</td><td>-0.024475</td></tr></tbody></table>

It seems compelling from these data that

$$u_e(N) \to 0 \text{ as } N \to \infty, \qquad (7.26)$$

with finite-size correction in both the real and imaginary parts proportional to $1/N$.
<figure><img src="image_11.png" /><figcaption>**Figure 9.** Condensation curves for partition function zeros on a $(2M + 1) \times 2N$ cylinder, in the limit $M \to \infty$ (closed channel), for a system exhibiting spin-zero and cyclic symmetry $\mathbb{Z}_N$. The panels show, in reading direction, the cases $N = 4, 5, 6, 7$.</figcaption></figure>

<figure><img src="image_12.png" /><figcaption>**Figure 10.** Condensation curves for partition function zeros on a $(2M + 1) \times 2N$ cylinder, in the limit $M \to \infty$ (closed channel), for a system exhibiting spin-zero and dihedral symmetry $\mathbb{D}_N$. The panels show the cases $N = 6, 7$.</figcaption></figure>

To finish this section, we now compare the condensation curves with the actual partition function zeros. This is done for $N = 4, 5, 6, 7$ in figure 11. For the partition function zeros, we have $M = 2048$, except for $N = 7$ where we have only $M = 1024$; this ensures an aspect ratio $\rho < 10^{-2}$ in all cases. The agreement with the condensation curves appears excellent, with the possible exception of the bubble-shaped region with $-5 < \operatorname{Im} u < -2$ in the $N = 7$ case.
<figure><img src="image_13.png" /><figcaption>**Figure 11.** Comparison between the partition function zeros on a $(2M + 1) \times 2N$ cylinder, with $M = 2048$, and the corresponding condensation curves in the $M \to \infty$ limit (closed channel). The panels show, in reading direction, the cases $N = 4, 5, 6, 7$.</figcaption></figure>

## 8 Conclusions and discussions

We have computed the *exact* partition functions for the 6-vertex model on *intermediate* size lattices with periodic boundary condition in one direction and free open boundary conditions in the other. This work is a natural continuation of a previous work [7] by three of the authors on the partition function of the 6-vertex model where periodic boundary conditions were imposed in both directions. The presence of free open boundary conditions brings new features and challenges. To overcome these challenges, we have further developed the application of algebro-geometric methods to the Bethe ansatz equations in various directions. We have incorporated recent developments in integrability such as rational $Q$-systems for open spin chains [18] and the exact formulae for overlaps between integrable boundary states and Bethe states [23–27]. We have also developed powerful algorithms to perform the algebraic geometry computations, such as the construction of Gröbner bases and companion matrices, in the presence of a *free parameter*.

Equipped with these new developments, we obtained the following exact results for the cylinder partition function $Z(u, M, N)$.

* *Open channel.* In the open channel, for $M = 1$, we obtained a closed-form expression (6.3) valid for any $N$. For $M = 2, 3, 4, 5, 6$, we have computed the partition function for fixed $N$, both for small values and large values. For small values, we computed $N = 2, 3, 4, 5, 6$. These results are given in appendix F. For large values,
we computed $N = 128, 256, 512, 1024, 2048$. These results were used to generate the zeros of partition functions in the partial thermodynamic limit. The exact results for large $N$ are not suitable to be put in the paper, so we have uploaded them as supplementary material.<fnref n="8" />

*   **Closed channel.** In the closed channel, for $N = 1, 2, 3$, we obtained closed-form expressions valid for any $M$. The results are given in (6.6), (6.8) and (6.26), respectively. For $N = 4, 5, 6, 7$ we have computed partition functions for fixed $M$, both for small and large values. For small values of $M$, we computed $M = 2, 3, 4, 5, 6$ for $N = 4, 5, 6$ because for these values we can compare the results in both channels and make non-trivial consistency checks. For large values of $M$, we computed $M = 128, 256, 512, 1024, 2048$ for $M = 4, 5, 6$ and $M = 128, 256, 512, 1024$ for $M = 7$. The results for large values of $M$ have been used to obtain the zeros of the partition function in the closed channel and are uploaded as supplementary material.<fnref n="8" />

We studied the partial thermodynamic limit of the partition function in both channels using the exact results. In particular, we computed the zeros of the partition functions in these limits and found that they condense on certain curves. The condensation curves in the partial thermodynamic limit can be found by a numerical approach based on the BKW theorem. This numerical approach has been applied in the torus case and was further developed in the current context by taking into account the new features, especially in the closed channel. Comparing the distribution of the zeros obtained from the exact partition function and the condensation curve obtained from the numerical approach, we found nice agreement and were able to shed light on several interesting features. The condensation curves in both the open and closed channels were found to involve very intricate features with multiple bifurcation points and enclosed regions. We believe that the further study of these curves might be of independent interest.

There are many other questions which deserve further investigation.

One of the most interesting directions is to compute the partition function for the $q$-deformed case. For generic values of $q$ (namely, when $q$ is not a root of unity), $Q$-systems for both closed and open chains have been formulated in a recent work [18]. This should provide a good starting point for developing an algebro-geometric approach, since $QQ$-relations are more efficient than Bethe equations and give only physical solutions. It would presumably be easier to first study the torus case where the relevant Bethe equations are those of the periodic XXZ spin chain. After that, one could move to the more complicated cylinder case.

We have focused here on the cylinder geometry with free boundary conditions. The case of fixed boundary conditions (with two arbitrary boundary parameters) may now also be in reach, using the new $Q$-system [51].

From the perspective of algebro-geometric computations, it will be desirable to sharpen the computational power of our method. For instance, we will try to apply the modern implements of Faugère's F4 algorithm [53], which is in general more efficient than Buchberger's algorithm.

<footnote n="8">⁸http://staff.ustc.edu.cn/~yzhphy/integrability.html</footnote>
Acknowledgments

ZB and RN are grateful for the hospitality extended to them at the University of Miami and the Wigner Research Center, respectively. ZB was supported in part by the NKFIH grant K116505. RN was supported in part by a Cooper fellowship. YZ thanks Janko Boehm for help on applied algebraic geometry. YJ and YZ acknowledge support from the NSF of China through Grant No. 11947301. JLJ acknowledges support from the European Research Council through the advanced grant NuQFT.

A Basic notions of computational algebraic geometry

In this appendix, we give a brief introduction to some basic notions of computational
algebraic geometry which are used in the main text.

A.1 Polynomial ring and ideal

**Polynomial ring.** Let us start with the notion of *polynomial ring* which is denoted by $A_K[z_1, \dots, z_n]$ or $A_K$ for short. It is the set of all polynomials in $n$ variables $z_1, z_2, \dots, z_n$ whose coefficients are in the field $K$. In our case, the field is often taken to be the set of complex numbers $\mathbb{C}$ or rational numbers $\mathbb{Q}$.

**Ideal.** An ideal $I$ of $A_K$ is a subset of $A_K$ such that

1. $f_1 + f_2 \in I$, if $f_1 \in I$ and $f_2 \in I$,

2. $gf \in I$, for $f \in I$ and $g \in A_K$.

Importantly, any ideal $I$ of the polynomial ring $A_K$ is *finitely generated*. This means, for any ideal $I$, there exists a finite number of polynomials $f_i \in I$ such that any polynomial $F \in I$ can be written as

$$
F = \sum_{i=1}^{k} f_i g_i, \quad g_i \in A_K. \tag{A.1}
$$

We can write $I = \langle f_1, f_2, \dots, f_k \rangle$. Here the polynomials $\{f_k\}$ are called a *basis* of the ideal.

A.2 Gröbner basis

As mentioned before, an ideal is generated by a set of basis $\{f_1, \dots, f_k\}$. The choice of the
basis is not unique. Namely, the same ideal can be generated by several different choices
of bases

$$
I = \langle f_1, \dots, f_k \rangle = \dots = \langle g_1, \dots, g_s \rangle. \tag{A.2}
$$

Notice that in general *k* does not have to be the same as *s*. For many cases, a convenient
basis is needed. For solving polynomial equations and the polynomial reduction problem,
it is most convenient to work with a *Gröbner basis*.
We can introduce the Gröbner basis by considering polynomial reduction. A polynomial reduction of a given polynomial $F$ over a set of polynomials $\{f_1, \dots, f_k\}$ is given by

$$F = \sum g_i f_i + r, \quad g_i \in A_K \qquad (A.3)$$

where $r$ is a polynomial that cannot be reduced further by any of the $f_i$. The polynomial $r$ is called the *remainder* of the polynomial reduction. One important fact is that the polynomial reduction is *not unique* for a generic basis $\{f_1, \dots, f_k\}$. As a simple example, let us take $f_1 = y^2 - 1$ and $f_2 = xy - 1$, and consider $F(x, y) = x^2y + xy^2 + y^2$. The polynomial reduction of $F(x, y)$ over $f_1$ and $f_2$ can be performed in two different ways

$$F(x, y) = (x + 1) f_1 + x f_2 + (2x + 1), \qquad (A.4)$$

$$F(x, y) = f_1 + (x + y)f_2 + (x + y + 1).$$

As we can see, the remainders are $r_1 = 2x + 1$ and $r_2 = x + y + 1$ respectively. Therefore for a generic basis, the remainder of the polynomial is not well-defined. A basis of an ideal $\{g_1, \dots, g_s\}$ is said to be a Gröbner basis if the polynomial reduction is well-defined in the sense that the remainder is unique. Now we move to the more formal definition of the Gröbner basis.

**Monomial ordering.** To define a Gröbner basis, we first need to define monomial orders in the polynomial ring. A monomial order $<$ is specified by the following two rules

* If $u \prec v$ then for any monomial $w$, we have $uw \prec vw$.

* If $u$ is non-constant monomial, then $1 \prec u$.

Some commonly used orders are **lex** (Lexicographic), **deglex** (DegreeLexicographic) and **degrevlex** (DegreeReversedLexicographic).

**Leading term.** Once a monomial order $<$ is specified, for any polynomial $f$, we can define the *leading term* uniquely. The leading term, which is denoted by $\text{LT}(f)$, is defined as the highest monomial of $f$ with respect to the monomial order $<$.

**Gröbner basis.** A Gröbner basis $G(I)$ of an ideal $I$ with respect to the monomial order $<$ is a basis of the ideal $\{g_1, \dots, g_s\}$ such that for any $f \in I$, there exists a $g_i \in G(I)$ such that $\text{LT}(f)$ is divisible by $\text{LT}(g_i)$. A Gröbner basis for a given ideal with a monomial order can be computed by standard algorithms such as Buchberger algorithm [52] or the F4/F5 algorithms [53]. For an ideal $I$, given a monomial order $<$, the so-called minimal reduced Gröbner basis is unique.

### A.3 Quotient ring and companion matrix

**Quotient ring.** Given an ideal $I$, we can define the *quotient ring* $A_K/I$ by the equivalence relation: $f \sim g$ if and only if $f - g \in I$.

Polynomial reduction and Gröbner basis provide a canonical representation of the elements in the quotient ring $A_K/I$. Two polynomials $F_1$ and $F_2$ belong to the same element
in the quotient ring $A_K/I$ if and only if their remainders of the polynomial reduction are the same. In particular, $f \in I$ if and only if its remainder of the polynomial reduction is zero. This gives a very efficient method to determine whether a polynomial $f$ is in the ideal $I$ or not.

**Dimension of quotient ring.** To our purpose, the dimension of the quotient ring is important. Consider a system of polynomial equations of $n$ variables

$$f_1(z_1, \dots, z_n) = \dots = f_k(z_1, \dots, z_n) = 0, \qquad (A.5)$$

we can define the ideal and the quotient ring as

$$I = \langle f_1, \dots, f_k \rangle, \quad Q_I = \mathbb{C}[z_1, \dots, z_n]/\langle f_1, \dots, f_k \rangle. \qquad (A.6)$$

One crucial result is that the linear dimension of the quotient ring $\dim_K Q_I$ equals the number of the solutions of the system (A.5). Therefore, if the number of solutions of the polynomial equations (A.5) is finite, $Q_I$ is a finite dimensional linear space. Let $G(I)$ be the Gröbner basis of the ideal $I$. The linear space is spanned by monomials which are not divisible by any elements in $LT[G(I)]$.

**Companion matrix.** Another important notion for our applications is the companion matrix. The main idea is that we can represent any polynomial $f \in A_K$ as a matrix in the quotient ring which is a finite dimensional linear space. More precisely, let $(m_1, \dots, m_N)$ be the monomial basis of $A_K/I$, which can be constructed by the Gröbner basis $G(I)$. Given any polynomial, we can define an $N \times N$ matrix as follows

1. Multiply $f$ with one of the basis monomials $m_i$, perform the polynomial reduction with respect to the Gröbner basis $G(I)$ and find the remainder $r_i$. It is clear that $r_i$ sits in the quotient ring $A_K/I$.

2. Since $r_i$ is in the quotient ring, we can expand it in terms of the basis $(m_1, \dots, m_N)$, namely $r_i = c_{ij}m_j$. In terms of formulas, we can write

$$[f \times m_i]_{G(I)} = \sum_j c_{ij} m_j \qquad (A.7)$$

where $[F]_{G(I)}$ means the remainder of the polynomial reduction of $F$ with respect to the Gröbner basis $G(I)$.

3. The companion matrix of $f$ is defined by

$$(M_f)_{ij} = c_{ij}. \qquad (A.8)$$

**Properties of companion matrix.** Let us denote the companion matrix of the polynomials $f$ and $g$ by $M_f$ and $M_g$. It is clear that $M_f = M_g$ if and only if $[f] = [g]$ in $A_K/I$. Furthermore, we have the following properties

$$M_{f+g} = M_f + M_g, \quad M_{fg} = M_f M_g = M_g M_f. \qquad (A.9)$$
If $M_g$ is an invertible matrix, we can actually define the companion matrix of the rational function $f/g$ by

$$M_{f/g} = M_f M_g^{-1}. \qquad (A.10)$$

The companion matrix is a powerful tool for computing the sum over solutions of the polynomial system (A.5). As we mentioned before, the dimension of $Q_I$ equals the number of solutions of (A.5). Let us denote the $N$ solutions to be $(\vec{\xi}_1, \dots, \vec{\xi}_N)$. Then we have the following important result

$$\sum_{i=1}^{N} f(\vec{\xi}_i) = \mathrm{Tr} M_f. \qquad (A.11)$$

## B More details on AG computation

In this section, we summarize the algorithm of our algebra-geometry based partition function computation for this paper.

* We first compute the Gröbner basis and quotient ring linear basis of the TQ relation equations (3.23) and QQ relation equations (4.51). Note that the TQ and QQ relations contain the free parameter $u$. It is possible to compute the corresponding Gröbner basis analytically in $u$ via sophisticated computational algebraic-geometry algorithms, like “slimgb” in the software SINGULAR [54].

However, we find that it is more efficient to set $u$ to some integral value, and compute the Groebner basis. The computation is done with the standard Gröbner basis command “std” in SINGULAR. In this approach, we maximize the power of parallelization since the Groebner basis running time for different values of $u$ is quite uniform.

* Then we compute the power of companion matrices $(\mathbb{T}_{M,K})^N$. Although from the Gröbner basis it is straightforward to evaluate $(\mathbb{T}_{M,K})^N$, $\mathbb{T}_{M,K}$ is usually a dense matrix and the matrix product is a heavy computation. Instead, we postpone the matrix computations to the end, and evaluate the polynomial power $F^N$ first. Here $F$ is the corresponding polynomial of $\mathbb{T}_{M,K}$. After each polynomial multiplication step, we divide the polynomial by the ideal’s Gröbner basis to save RAM usage by trimming high-degree terms. To speed up the computation, we apply the binary strategy, i.e., $F^N = F^{N/2}F^{N/2}$. After $F^N$ is calculated, a standard polynomial division computation provides the companion matrix power $(\mathbb{T}_{M,K})^N$. So the partition function for a particular $u$ value is obtained.

* In previous steps, $u$ is set as an integral number. To get the analytic partition function in $u$, we have to repeat the computation, and then interpolate in $u$. We know that for both the closed and open channel partition functions, the maximum degree in $u$ is $2MN$. Hence, we compute the partition function with $2MN+1$ integer values. These results are then interpolated to the analytic partition function in $u$. The interpolation is carried out with the Newton polynomial method.
The whole computation is powered by our codes in SINGULAR. The parallelization is implemented in the Gröbner basis and companion matrix power steps, for different integer values of u's. The interpolation step is not parallelized, although it is also straightforward to do so in the future.

We remark that through the computations, the coefficient field is chosen to be the rational number field $\mathbb{Q}$. We observe that the resulting analytic partition function contains large-integer coefficients, so finite-field techniques may not speed up the computation.

## C The overlap (4.34)

The overlap (4.34) can be deduced from results in the paper by Pozsgay and Rákos [27] (based on [23, 24]), to which we refer here by PR. Their $R$-matrix is given by PR (2.6), which has the same form as ours (2.3), except with

$$a(u) = \sinh(u + \eta), \quad b(u) = \sinh(u), \quad c(u) = \sinh(\eta). \qquad (C.1)$$

Moreover, they work with the “quantum monodromy matrix” given by PR (2.33)

$$T_{QTM}(u) = R_{2N,0}(u - \eta + \omega) R_{2N-1,0}(u - \omega) \dots R_{2,0}(u - \eta + \omega) R_{1,0}(u - \omega) \\ = \begin{pmatrix} A(u) & B(u) \\ C(u) & D(u) \end{pmatrix}. \qquad (C.2)$$

By choosing

$$\omega = \frac{\eta}{2} - u, \qquad (C.3)$$

scaling the variables as

$$u \mapsto \epsilon u, \quad \eta \mapsto i\epsilon, \qquad (C.4)$$

and keeping the leading order in $\epsilon$, our shifted monodromy matrix $\hat{T}_a^{(2N)}(u - i\frac{\epsilon}{2}; \{\theta_j(u)\})$ (3.2) with alternating inhomogeneities (4.19) can be obtained.

In order to relate the generic boundary states PR (2.36)–(2.38) to the dimer state, the boundary parameters in PR (2.15) can be chosen as follows

$$\alpha \to \infty, \quad \beta = 0, \quad \theta = 0, \qquad (C.5)$$

so that the K-matrices are proportional to the identity matrix. In this limit, the overlap PR (3.4) together with PR (3.3) gives our overlap (4.34).

## D The relation (4.38)

We show here that the relation (4.38) follows from two simpler lemmata.

**Lemma 1:**

$$\langle \Phi_0 | U^\dagger = \left( \frac{i}{2v - i} \right)^N \langle \Phi_0 | \tau(v; \{\theta_j(v)\}) . \qquad (D.1)$$
This lemma follows from the observation

$$ \tau(v; \{\theta_j(v)\}) = i^N R_{12}(2v) R_{34}(2v) \dots R_{2N-1,2N}(2v) P_{2N-3,2N-1} \dots P_{3,5} P_{1,3}, \quad (D.2) $$

together with

$$ \langle \Phi_0 | R_{12}(2v) R_{34}(2v) \dots R_{2N-1,2N}(2v) = (2v-i)^N \langle \Phi_0 |, \quad (D.3) $$

and

$$ \langle \Phi_0 | P_{2N-3,2N-1} \dots P_{3,5} P_{1,3} = (-1)^N \langle \Phi_0 | U^\dagger. \quad (D.4) $$

Taking the scalar product of (D.1) with transfer-matrix eigenvectors $|u\rangle$ (which are constructed using B-operators with alternating inhomogeneities $\{\theta_j(v)\}$) and setting $v = \frac{\tilde{u}}{2}$, we obtain

$$ \begin{aligned} \langle \Phi_0 | U^\dagger | u \rangle &= \left( \frac{i}{\tilde{u} - i} \right)^N \langle \Phi_0 | \tau \left( \frac{\tilde{u}}{2}; \{ \theta_j \left( \frac{\tilde{u}}{2} \right) \} \right) | u \rangle \\ &= \left( \frac{i}{\tilde{u} - i} \right)^N \Lambda_c \left( \frac{\tilde{u}}{2}; \{ \theta_j \left( \frac{\tilde{u}}{2} \right) \} \right) \langle \Phi_0 | u \rangle. \end{aligned} \quad (D.5) $$

**Lemma 2:** the following relation is valid off shell

$$ \langle \Phi_0 | u \rangle = \left( \frac{2v - i}{2v + i} \right)^N \langle u | \Phi_0 \rangle. \quad (D.6) $$

See e.g. (3.3) in [27], with (C.3) and (C.4).

For our case, with $v = \frac{\tilde{u}}{2}$, we have

$$ \langle \Phi_0 | u \rangle = \left( \frac{\tilde{u} - i}{\tilde{u} + i} \right)^N \langle u | \Phi_0 \rangle. \quad (D.7) $$

Inserting (D.7) in the r.h.s. of (D.5), we obtain

$$ \langle \Phi_0 | U^\dagger | u \rangle = \left( \frac{i}{\tilde{u} + i} \right)^N \Lambda_c \left( \frac{\tilde{u}}{2}; \{ \theta_j \left( \frac{\tilde{u}}{2} \right) \} \right) \langle u | \Phi_0 \rangle, \quad (D.8) $$

which coincides with (4.38).

## E Parity of states with paired Bethe roots

Following [55, 56], the parity operator $\Pi$ in the closed channel (length $2N$) is defined by

$$ \Pi X_n \Pi^{-1} = X_{2N+1-n}, \quad (E.1) $$

where $X_n$ is any operator at site $n \in \{1, 2, \dots, 2N\}$, and is given by

$$ \Pi = P_{1,2N} P_{2,2N-1} \dots P_{N,N+1}, \quad (E.2) $$
hence $\Pi = \Pi^{-1} = \Pi^{\dagger}$. The parity operator has a simple and beautiful action on the B-operator, namely

$$ \Pi B(u) \Pi = -B(-u), \qquad (E.3) $$

while the reference state (4.13) remains invariant under parity

$$ \Pi |0\rangle = |0\rangle. \qquad (E.4) $$

It follows from (E.3) and (E.4) that Bethe states (4.14) corresponding to the paired Bethe roots (4.33) (even $N$) are eigenstates of parity with eigenvalue +1

$$ \Pi|u_1, -u_1, \dots, u_{\frac{N}{2}}, -u_{\frac{N}{2}}\rangle = |u_1, -u_1, \dots, u_{\frac{N}{2}}, -u_{\frac{N}{2}}\rangle. \qquad (E.5) $$

Similarly, Bethe states corresponding to the paired Bethe roots (4.40) (odd $N$) are eigenstates of parity with eigenvalue -1

$$ \Pi|u_1, -u_1, \dots, u_{\frac{N-1}{2}}, -u_{\frac{N-1}{2}}, 0\rangle = -|u_1, -u_1, \dots, u_{\frac{N-1}{2}}, -u_{\frac{N-1}{2}}, 0\rangle. \qquad (E.6) $$

The dimer state $|\Phi_0\rangle$ (4.23) is an eigenstate of parity with eigenvalue $(-1)^N$

$$ \Pi|\Phi_0\rangle = (-1)^N|\Phi_0\rangle, \qquad (E.7) $$

which is consistent with the fact that the overlaps $\langle\Phi_0|u\rangle$ are nonzero only for Bethe states with paired Bethe roots (4.33), (4.40).

## F Exact partition functions

In this appendix, we list all the exact partition functions for $2 \le M, N \le 6$ apart from the simple ones that have already been given in the main text (2.6). For these values of $M$ and $N$, the partition function can be computed in both channels. As a consistency check, computations in the two channels give the same result, as it should be.

### F.1 $N=6$

$$
\begin{aligned}
Z_{6,6} ={}& 2u^{72} + 288iu^{71} - 14328u^{70} - 414000iu^{69} + 8317584u^{68} + 127125504iu^{67} && (\text{F.1}) \\
& - 1559236944u^{66} - 15897457728iu^{65} + 138130609500u^{64} + 1041934800608iu^{63} \\
& - 6921377423424u^{62} - 40952806081344iu^{61} + 217832067312960u^{60} \\
& + 1049571874084608iu^{59} - 4610142527559840u^{58} - 18559041008388480iu^{57} \\
& + 68788394401561470u^{56} + 235662122430397008iu^{55} - 748761418763439296u^{54} \\
& - 2212828011779983200iu^{53} + 6098355792769470156u^{52} \\
& + 15707717731534712832iu^{51} - 37888459151633760240u^{50} \\
& - 85733900199121648320iu^{49} + 182272478003908656432u^{48} \\
& + 364591770627856882608iu^{47} - 686967220132168504248u^{46} \\
& - 1220600244357970313168iu^{45} + 2047050659153089585764u^{44} \\
& + 3243098453976454684320iu^{43} - 4857133424214480178560u^{42}
\end{aligned}
$$
$$
\begin{align*}
& -6881082470938635503328iu^{41} + 9226096556900912648334u^{40} \\
& + 11712585761982875838624iu^{39} - 14083587268444001339280u^{38} \\
& - 16044127855808638420656iu^{37} + 17319816398521272862676u^{36} \\
& + 17719150885149621701664iu^{35} - 1718025244447853950520u^{34} \\
& - 15786443250650483906112iu^{33} + 13745313212235461309790u^{32} \\
& + 11338458117413798884752iu^{31} - 8858516711168371303152u^{30} \\
& - 6552673143433555176576iu^{29} + 4587036228059022522828u^{28} \\
& + 3037167694581592157600iu^{27} - 1900876723794459666576u^{26} \\
& - 1123749410112064351008iu^{25} + 626974446577452175698u^{24} \\
& + 329820882193355585184iu^{23} - 163410941489958322920u^{22} \\
& - 76159342969170112944iu^{21} + 33342588484553082888u^{20} \\
& + 13690734769961746560iu^{19} - 5263022902673709824u^{18} \\
& - 1890408224237932800iu^{17} + 633003570392541120u^{16} \\
& + 197095658448168960iu^{15} - 56899838812276224u^{14} \\
& - 15180285240013824iu^{13} + 3728675863226880u^{12} \\
& + 839585772859392iu^{11} - 172442609104896u^{10} - 32118023696384iu^{9} \\
& + 5386833271296u^{8} + 806617128960iu^{7} - 106666801152u^{6} - 12280172544iu^{5} \\
& + 1206835200u^{4} + 98304000iu^{3} - 6340608u^{2} - 294912iu + 8192 \\
Z_{5,6} &= 2u^{60} + 240iu^{59} - 10200u^{58} - 247760iu^{57} + 4106064u^{56} + 50944128iu^{55} \quad (\text{F.2}) \\
& - 501290288u^{54} - 4069332864iu^{53} + 28034725284u^{52} + 167372075712iu^{51} \\
& - 879568749504u^{50} - 4117046950656iu^{49} + 17320477694784u^{48} \\
& + 65956540414464iu^{47} - 228627359471520u^{46} - 724727457569280iu^{45} \\
& + 2108994608155482u^{44} + 5652786955676832iu^{43} - 13995089127459600u^{42} \\
& - 32084625043816128iu^{41} + 68261467147861284u^{40} + 135034284911783616iu^{39} \\
& - 248788374633283104u^{38} - 427529707088463360iu^{37} \\
& + 686116309138082856u^{36} + 1029410431077285360iu^{35} \\
& - 1445199354794151720u^{34} - 1899914808354007664iu^{33} \\
& + 2340240191331772812u^{32} + 2702070900176216160iu^{31} \\
& - 2925317019312145664u^{30} - 2970027518108113056iu^{29} \\
& + 2827960377154344960u^{28} + 2525039773174991216iu^{27} \\
& - 2113704343901047104u^{26} - 1658217850739230320iu^{25} \\
& + 121853989455249848u^{24} + 838213811707493088iu^{23} \\
& - 539306661016030248u^{22} - 324234959917029984iu^{21} \\
& + 181939121823624930u^{20} + 95158509487089840iu^{19} \\
& - 46317104213610216u^{18} - 20941877029818960iu^{17} + 8777163928275864u^{16}
\end{align*}
$$
$$
\begin{aligned}
& + 3401716413897600iu^{15} - 1215689053318848u^{14} - 399309726257280iu^{13} \\
& + 120092906906976u^{12} + 32925815343360iu^{11} - 8187331182336u^{10} \\
& - 1835366381568iu^{9} + 368278769664u^{8} + 65577553920iu^{7} - 10251309056u^{6} \\
& - 1387327488iu^{5} + 159490560u^{4} + 15134720iu^{3} - 1136640u^{2} - 61440iu + 2048
\end{aligned}
$$

$$
\begin{aligned}
Z_{4,6} = & 8u^{48} + 336iu^{47} - 7728u^{46} - 123856iu^{45} + 1484064u^{44} + 13860000iu^{43} \\
& - 104403144u^{42} - 652530240iu^{41} + 3461257458u^{40} + 15858754400iu^{39} \\
& - 63627652560u^{38} - 225943164384iu^{37} + 716128871152u^{36} \\
& + 2039662782720iu^{35} - 5249124545904u^{34} - 12261248086848iu^{33} \\
& + 26092620286092u^{32} + 50742484822368iu^{31} - 90406264918472u^{30} \\
& - 147877208599872iu^{29} + 222439906309668u^{28} + 308118607243360iu^{27} \\
& - 393433500079944u^{26} - 463456204858080iu^{25} + 503911508965434u^{24} \\
& + 505852778886192iu^{23} - 468842183109432u^{22} - 401107676795728iu^{21} \\
& + 316601908242108u^{20} + 230384778687264iu^{19} - 154393257821456u^{18} \\
& - 95159659506624iu^{17} + 53851823641602u^{16} + 27924428347584iu^{15} \\
& - 13235329354320u^{14} - 5716979185248iu^{13} + 2242521937456u^{12} \\
& + 795411629952iu^{11} - 253808103360u^{10} - 72409421696iu^{9} + 18332792928u^{8} \\
& + 4082245632iu^{7} - 790647936u^{6} - 131353344iu^{5} + 18380160u^{4} \\
& + 2105344iu^{3} - 190464u^{2} - 12288iu + 512
\end{aligned}
\quad (F.3)
$$

$$
\begin{aligned}
Z_{3,6} = & 2u^{36} + 144iu^{35} - 3240u^{34} - 41760iu^{33} + 371556u^{32} + 2500704iu^{31} \\
& - 13426440u^{30} - 59457600iu^{29} + 222050034u^{28} + 710461408iu^{27} \\
& - 1970740872u^{26} - 4783539888iu^{25} + 10235477796u^{24} + 19420445664iu^{23} \\
& - 32825856240u^{22} - 49607005056iu^{21} + 67208955660u^{20} \\
& + 81794924496iu^{19} - 89535239664u^{18} - 88204716144iu^{17} \\
& + 78198825096u^{16} + 62348094624iu^{15} - 44646023160u^{14} \\
& - 28655915040iu^{13} + 16442440386u^{12} + 8405591184iu^{11} - 3811764096u^{10} \\
& - 1524747232iu^{9} + 534186864u^{8} + 162405504iu^{7} - 42326208u^{6} \\
& - 9318528iu^{5} + 1700640u^{4} + 249600iu^{3} - 28800u^{2} - 2304iu + 128
\end{aligned}
\quad (F.4)
$$

$$
\begin{aligned}
Z_{2,6} = & 2u^{24} + 96iu^{23} - 1488u^{22} - 12464iu^{21} + 67908u^{20} + 267360iu^{19} \\
& - 818024u^{18} - 2043648iu^{17} + 4286358u^{16} + 7635536iu^{15} - 11600448u^{14} \\
& - 15070368iu^{13} + 16767884u^{12} + 15970080iu^{11} - 12994512u^{10} \\
& - 9014240iu^{9} + 5311314u^{8} + 2637792iu^{7} - 1094360u^{6} \\
& - 375504iu^{5} + 103512u^{4} + 22016iu^{3} - 3648u^{2} - 384iu + 32
\end{aligned}
\quad (F.5)
$$

## F.2 N = 5

$$
\begin{aligned}
Z_{6,5} = & 2u^{60} + 240iu^{59} - 10140u^{58} - 248000iu^{57} + 4185570u^{56} + 53344848iu^{55} \\
& - 542357480u^{54} - 4562838000iu^{53} + 32597238180u^{52} + 201557883000iu^{51}
\end{aligned}
\quad (F.6)
$$
$$
\begin{align*}
& -1094433249708u^{50} - 5278042287600iu^{49} + 22813265943960u^{48} \\
& + 89030269264680iu^{47} - 315622898284860u^{46} - 1021614345486960iu^{45} \\
& + 3032155944987750u^{44} + 8282078769490080iu^{43} - 20883263266224960u^{42} \\
& - 48740210535148320iu^{41} + 105537643218985020u^{40} + 212434648891515000iu^{39} \\
& - 398192299717983780u^{38} - 696081663569207040iu^{37} \\
& + 1136284932112092120u^{36} + 1734011186676432768iu^{35} \\
& - 2476033587009228660u^{34} - 3310802034120343280iu^{33} \\
& + 4148085867425363430u^{32} + 4871950812684428040iu^{31} \\
& - 5365880829686871812u^{30} - 5543013568038622320iu^{29} \\
& + 5370865405192114860u^{28} + 4880969524493532440iu^{27} \\
& - 4159536448109346180u^{26} - 3322896661947378912iu^{25} \\
& + 2487244973239722900u^{24} + 1743350380048456200iu^{23} \\
& - 1143361265067321060u^{22} - 700989597010688640iu^{21} \\
& + 401316693215927490u^{20} + 214260526736194800iu^{19} \\
& - 106515303269030220u^{18} - 49218120113100480iu^{17} + 21095469547685670u^{16} \\
& + 8367142598539080iu^{15} - 3062728016717700u^{14} - 1031401068624240iu^{13} \\
& + 318402566218770u^{12} + 89734056144240iu^{11} - 22976204056848u^{10} \\
& - 5314648800960iu^{9} + 1103026376160u^{8} + 203688568320iu^{7} \\
& - 33111380480u^{6} - 4671793152iu^{5} + 561016320u^{4} + 55685120iu^{3} \\
& - 4362240u^{2} - 245760iu + 8192
\end{align*}
$$

$$
\begin{align}
Z_{5,5} = {}& 2u^{50} + 200iu^{49} - 6800u^{48} - 133600iu^{47} + 1816720u^{46} + 18696280iu^{45} \tag{F.7} \\
& - 153516300u^{44} - 1041341760iu^{43} + 5980862700u^{42} + 29622561920iu^{41} \nonumber \\
& - 128320692620u^{40} - 491601126800iu^{39} + 1680469080490u^{38} \nonumber \\
& + 5162580577360iu^{37} - 14337030631180u^{36} - 36164934863280iu^{35} \nonumber \\
& + 83189622229650u^{34} + 175077243069600iu^{33} - 338033265929600u^{32} \nonumber \\
& - 600140879412320iu^{31} + 981612780573350u^{30} + 1481512519939600iu^{29} \nonumber \\
& - 2065877195101300u^{28} - 2664254653480000iu^{27} + 3180146358121680u^{26} \nonumber \\
& + 3515139558674328iu^{25} - 3599034368401500u^{24} - 3413530724251600iu^{23} \nonumber \\
& + 2998653880187200u^{22} + 2438862766979800iu^{21} - 1835361722793380u^{20} \nonumber \\
& - 1276908650973200iu^{19} + 820389106281650u^{18} + 486066456229800iu^{17} \nonumber \\
& - 265119363721020u^{16} - 132847449311520iu^{15} + 61002271510150u^{14} \nonumber \\
& + 25593377506000iu^{13} - 9776149068460u^{12} - 3385803508640iu^{11} \nonumber \\
& + 1057993826450u^{10} + 296565427400iu^{9} - 74059916520u^{8} - 16339593600iu^{7} \nonumber \\
& + 3151663680u^{6} + 524266240iu^{5} - 73811200u^{4} - 8550400iu^{3} \nonumber \\
& + 780800u^{2} + 51200iu - 2048 \nonumber
\end{align}
$$
$$
\begin{aligned}
Z_{4,5} = & 2u^{40} + 160iu^{39} - 4440u^{38} - 69280iu^{37} + 728000u^{36} + 5674392iu^{35} \quad (F.8) \\
& - 34874340u^{34} - 176140320iu^{33} + 752228880u^{32} + 2769883720iu^{31} \\
& - 8912697344u^{30} - 25297249440iu^{29} + 63775686230u^{28} \\
& + 143577146200iu^{27} - 289901804220u^{26} - 526881584016iu^{25} \\
& + 864503010900u^{24} + 1283718138360iu^{23} - 1728451887060u^{22} \\
& - 2113229980800iu^{21} + 2348251006860u^{20} + 2372768013000iu^{19} \\
& - 2180177662980u^{18} - 1820882530080iu^{17} + 1381238400930u^{16} \\
& + 950393607264iu^{15} - 592143230220u^{14} - 333299096320iu^{13} \\
& + 168978930950u^{12} + 76875351000iu^{11} - 31236020084u^{10} - 11269764880iu^{9} \\
& + 3584938290u^{8} + 996761760iu^{7} - 239659680u^{6} - 49170048iu^{5} + 8454080u^{4} \\
& + 1185280iu^{3} - 130560u^{2} - 10240iu + 512
\end{aligned}
$$

$$
\begin{aligned}
Z_{3,5} = & 2u^{30} + 120iu^{29} - 2340u^{28} - 25120iu^{27} + 182970u^{26} + 1000824iu^{25} \quad (F.9) \\
& - 4342200u^{24} - 15435600iu^{23} + 45931380u^{22} + 116188080iu^{21} - 252735000u^{20} \\
& - 476824800iu^{19} + 785325960u^{18} + 1134545880iu^{17} - 1442491140u^{16} \\
& - 1617100080iu^{15} + 1599383250u^{14} + 1395092760iu^{13} - 1072037820u^{12} \\
& - 724305120iu^{11} + 428924070u^{10} + 221637600iu^{9} - 99319260u^{8} - 38260800iu^{7} \\
& + 12523890u^{6} + 3435384iu^{5} - 774840u^{4} - 139840iu^{3} \\
& + 19680u^{2} + 1920iu - 128
\end{aligned}
$$

$$
\begin{aligned}
Z_{2,5} = & 32u^{20} + 320iu^{19} - 1760u^{18} - 7680iu^{17} + 28560u^{16} + 87696iu^{15} \quad (F.10) \\
& - 218880u^{14} - 446160iu^{13} + 747090u^{12} + 1031120iu^{11} - 1177868u^{10} \\
& - 1117760iu^{9} + 880230u^{8} + 572520iu^{7} - 306660u^{6} \\
& - 134064iu^{5} + 46290u^{4} + 12240iu^{3} - 2480u^{2} - 320iu + 32
\end{aligned}
$$

### F.3 N = 4

$$
\begin{aligned}
Z_{6,4} = & 2u^{48} + 192iu^{47} - 6432u^{46} - 125344iu^{45} + 1695768u^{44} + 17380704iu^{43} \quad (F.11) \\
& - 142071744u^{42} - 957909984iu^{41} + 5456197416u^{40} + 26727665408iu^{39} \\
& - 114171998592u^{38} - 430010518272iu^{37} + 1440779616064u^{36} \\
& + 4325994981888iu^{35} - 11709940237824u^{34} - 28718431904256iu^{33} \\
& + 64075191370944u^{32} + 13050282849484iu^{31} - 243315793126400u^{30} \\
& - 416238684174336iu^{29} + 654563752915968u^{28} + 947664700456960iu^{27} \\
& - 1264641410790912u^{26} - 1556980053712896iu^{25} + 1769626440158208u^{24} \\
& + 1857530670661632iu^{23} - 1801001830855680u^{22} - 1612788643440640iu^{21} \\
& + 1333448855969280u^{20} + 1017287720361984iu^{19} - 715462372579328u^{18} \\
& - 463315439579136iu^{17} + 275828260637184u^{16} + 150674393284608iu^{15} \\
& - 75348310695936u^{14} - 34399109013504iu^{13} + 14290811226112u^{12} \\
& + 5382179758080iu^{11} - 1829435990016u^{10} - 558255153152iu^{9}
\end{aligned}
$$
$$ 
\begin{aligned}
&+151954421760u^8 + 36599955456iu^7 - 7720648704u^6 - 1406828544iu^5 \\
&+217178112u^4 + 27590656iu^3 - 2752512u^2 - 196608iu + 8192
\end{aligned}
$$

$$
\begin{aligned}
Z_{5,4} = & 2u^{40} + 160iu^{39} - 4512u^{38} - 72352iu^{37} + 789416u^{36} + 6439584iu^{35} \quad (\text{F.12}) \\
& - 41590944u^{34} - 220803168iu^{33} + 988466328u^{32} + 3799026688iu^{31} \\
& - 12701096768u^{30} - 37309082496iu^{29} + 97056390560u^{28} + 225028607488iu^{27} \\
& - 467409758976u^{26} - 873387327744iu^{25} + 1472970252384u^{24} \\
& + 2247880822272iu^{23} - 31102579522256u^{22} - 3907451351040iu^{21} \\
& + 4461712923648u^{20} + 4633176305664iu^{19} - 4376312765952u^{18} \\
& - 3759173240832iu^{17} + 2934531772416u^{16} + 2079427166208iu^{15} \\
& - 1335273784320u^{14} - 775224616960iu^{13} + 405738771968u^{12} \\
& + 190745063424iu^{11} - 80192927744u^{10} - 29991620608iu^{9} + 9914835456u^{8} \\
& + 2874777600iu^{7} - 723861504u^{6} - 156229632iu^{5} + 28375040u^{4} + 4218880iu^{3} \\
& - 491520u^{2} - 40960iu + 2048
\end{aligned}
$$

$$
\begin{aligned}
Z_{4,4} = & 2u^{32} + 128iu^{31} - 2720u^{30} - 33088iu^{29} + 275920u^{28} + 1721920iu^{27} \quad (\text{F.13}) \\
& - 8468640u^{26} - 33967296iu^{25} + 113839344u^{24} + 324510720iu^{23} \\
& - 797262912u^{22} - 1704729984iu^{21} + 3195196320u^{20} + 5276663040iu^{19} \\
& - 7705800576u^{18} - 9976315392iu^{17} + 11469719520u^{16} + 11721735168iu^{15} \\
& - 10651210752u^{14} - 8600710656iu^{13} + 6162514560u^{12} + 3908175360iu^{11} \\
& - 2185631232u^{10} - 1072522752iu^{9} + 458877312u^{8} + 169820160iu^{7} \\
& - 53830656u^{6} - 14436352iu^{5} + 3218944u^{4} + 581632iu^{3} \\
& - 81920u^{2} - 8192iu + 512
\end{aligned}
$$

$$
\begin{aligned}
Z_{3,4} = & 2u^{24} + 96iu^{23} - 1536u^{22} - 13376iu^{21} + 76656u^{20} + 321984iu^{19} \quad (\text{F.14}) \\
& - 1060064u^{18} - 2847552iu^{17} + 6375696u^{16} + 12024320iu^{15} - 19217088u^{14} \\
& - 26146944iu^{13} + 30396896u^{12} + 30257664iu^{11} - 25802112u^{10} - 18824192iu^{9} \\
& + 11701920u^{8} + 6151680iu^{7} - 2706944u^{6} - 984576iu^{5} + 290688u^{4} + 68096iu^{3} \\
& - 12288u^{2} - 1536iu + 128
\end{aligned}
$$

$$
\begin{aligned}
Z_{2,4} = & 2u^{16} + 64iu^{15} - 576u^{14} - 2912iu^{13} + 9928u^{12} + 24864iu^{11} - 47840u^{10} \quad (\text{F.15}) \\
& - 71968iu^{9} + 85176u^{8} + 80128iu^{7} - 60608u^{6} - 36480iu^{5} \\
& + 16864u^{4} + 5888iu^{3} - 1536u^{2} - 256iu + 32
\end{aligned}
$$

## F.4 N = 3

$$
\begin{aligned}
Z_{6,3} = & 2u^{36} + 144iu^{35} - 3672u^{34} - 54720iu^{33} + 566172u^{32} + 4421808iu^{31} \quad (\text{F.16}) \\
& - 27359952u^{30} - 138421152iu^{29} + 585564318u^{28} + 2106246952iu^{27} \\
& - 6526250244u^{26} - 17601308640iu^{25} + 41667849936u^{24} + 87178071096iu^{23} \\
& - 162100318500u^{22} - 269073694512iu^{21} + 400109679918u^{20} + 534347671248iu^{19} \\
& - 642039336300u^{18} - 694728826992iu^{17} + 677171433726u^{16} + 594340399176iu^{15}
\end{aligned}
$$
$$-469220702148u^{14} - 332676139248iu^{13} + 211359220146u^{12} + 119998562832iu^{11}$$

$$-60673432464u^{10} - 27204293440iu^{9} + 10758322656u^{8} + 3726162432iu^{7}$$

$$-1119674880u^{6} - 288110592iu^{5} + 62295552u^{4} + 10997760iu^{3}$$

$$-1511424u^{2} - 147456iu + 8192$$

$$Z_{5,3} = 2u^{30} + 120iu^{29} - 2544u^{28} - 30784iu^{27} + 254340u^{26} + 1570464iu^{25} \quad (F.17)$$

$$-7633440u^{24} - 30170016iu^{23} + 99104634u^{22} + 274915920iu^{21} - 652019508u^{20}$$

$$-1335239136iu^{19} + 2379520968u^{18} + 3712304088iu^{17} - 5091867900u^{16}$$

$$-6157254672iu^{15} + 6573306816u^{14} + 6196463352iu^{13} - 5152840800u^{12}$$

$$-3772407312iu^{11} + 2424284226u^{10} + 1362333816iu^{9} - 666211176u^{8}$$

$$-281734272iu^{7} + 102169152u^{6} + 31401216iu^{5} - 8038656u^{4}$$

$$-1669120iu^{3} + 268800u^{2} + 30720iu - 2048$$

$$Z_{4,3} = 8u^{24} + 168iu^{23} - 1920u^{22} - 15344iu^{21} + 91506u^{20} + 418992iu^{19} \quad (F.18)$$

$$-1508768u^{18} - 4370976iu^{17} + 10394316u^{16} + 20622512iu^{15} - 34552644u^{14}$$

$$-49294128iu^{13} + 60175370u^{12} + 62991480iu^{11} - 56528844u^{10} - 43384016iu^{9}$$

$$+ 28353042u^{8} + 15688800iu^{7} - 7297568u^{6} - 2825088iu^{5} + 896448u^{4}$$

$$+ 227840iu^{3} - 44544u^{2} - 6144iu + 512$$

$$Z_{3,3} = 2u^{18} + 72iu^{17} - 828u^{16} - 5328iu^{15} + 22914u^{14} + 71568iu^{13} - 170652u^{12} \quad (F.19)$$

$$-321264iu^{11} + 488124u^{10} + 605480iu^{9} - 614664u^{8} - 509040iu^{7} + 341826u^{6}$$

$$+ 184392iu^{5} - 78840u^{4} - 26304iu^{3} + 6624u^{2} + 1152iu - 128$$

$$Z_{2,3} = 2u^{12} + 48iu^{11} - 348u^{10} - 1264iu^{9} + 2934u^{8} + 4968iu^{7} \quad (F.20)$$

$$-6420u^{6} - 6192iu^{5} + 4338u^{4} + 2224iu^{3} - 816u^{2} - 192iu + 32$$

## F.5 N = 2

$$Z_{6,2} = 2u^{24} + 96iu^{23} - 1704u^{22} - 17936iu^{21} + 131208u^{20} + 717696iu^{19} \quad (F.21)$$

$$-3057152u^{18} - 10408704iu^{17} + 28851648u^{16} + 66013184iu^{15} - 126014976u^{14}$$

$$-202398720iu^{13} + 275340800u^{12} + 318861312iu^{11} - 315426816u^{10}$$

$$-266989568iu^{9} + 193300992u^{8} + 119365632iu^{7} - 62486528u^{6} - 27439104iu^{5}$$

$$+ 9934848u^{4} + 2883584iu^{3} - 638976u^{2} - 98304iu + 8192$$

$$Z_{5,2} = 2u^{20} + 80iu^{19} - 1160u^{18} - 9840iu^{17} + 57240u^{16} + 245376iu^{15} - 806208u^{14} \quad (F.22)$$

$$-2081664iu^{13} + 4300128u^{12} + 7203584iu^{11} - 9888512u^{10} - 11208704iu^{9}$$

$$+ 10543104u^{8} + 8245248iu^{7} - 5351424u^{6} - 2863104iu^{5} + 1245696u^{4}$$

$$+ 430080iu^{3} - 112640u^{2} - 20480iu + 2048$$

$$Z_{4,2} = 2u^{16} + 64iu^{15} - 720u^{14} - 4640iu^{13} + 20080u^{12} + 62592iu^{11} - 145856u^{10} \quad (F.23)$$

$$-260224iu^{9} + 361824u^{8} + 397312iu^{7} - 347264u^{6} - 241920iu^{5} + 133504u^{4}$$

$$+ 57344iu^{3} - 18432u^{2} - 4096iu + 512$$

$$Z_{3,2} = 2u^{12} + 48iu^{11} - 384u^{10} - 1696iu^{9} + 4848u^{8} + 9600iu^{7} \quad (F.24)$$

$$-13632u^{6} - 14208iu^{5} + 11040u^{4} + 6400iu^{3} - 2688u^{2} - 768iu + 128$$
**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.J. de Vega and F. Woynarovich, Method for calculating finite size corrections in bethe Ansatz systems: Heisenberg chain and six vertex model, Nucl. Phys. B 251 (1985) 439 [INSPIRE].

[2] F. Woynarovich and H.P. Eckle, Finite-size corrections and numerical calculations for long spin 1/2 Heisenberg chains in the critical region, J. Phys. A 20 (1987) L97.

[3] C.J. Hamer, G.R.W. Quispel and M.T. Batchelor, Conformal anomaly and surface energy for Potts and Ashkin-Teller quantum chains, J. Phys. 20 (1987) 5677 [INSPIRE].

[4] P.A. Pearce and A. Kluemper, Finite size corrections and scaling dimensions of solvable lattice models: an analytic method, Phys. Rev. Lett. 66 (1991) 974 [INSPIRE].

[5] C. Destri and H.J. De Vega, Unified approach to thermodynamic Bethe Ansatz and finite size corrections for lattice models and field theories, Nucl. Phys. B 438 (1995) 413 [hep-th/9407117] [INSPIRE]].

[6] E. Granet, J.L. Jacobsen and H. Saleur, A distribution approach to finite-size corrections in Bethe Ansatz solvable models, Nucl. Phys. B 934 (2018) 96 [arXiv:1801.05676] [INSPIRE].

[7] J. Lykke Jacobsen, Y. Jiang and Y. Zhang, Torus partition function of the six-vertex model from algebraic geometry, JHEP 03 (2019) 152 [arXiv:1812.00447] [INSPIRE].

[8] C. Marboe and D. Volin, Fast analytic solver of rational Bethe equations, J. Phys. A 50 (2017) 204002 [arXiv:1608.06504] [INSPIRE].

[9] Y. Jiang and Y. Zhang, Algebraic geometry and Bethe ansatz. Part I. The quotient ring for BAE, JHEP 03 (2018) 087 [arXiv:1710.04693] [INSPIRE].

[10] A.L. Owczarek and R.J. Baxter, Surface free energy of the critical six-vertex model with free boundaries, J. Phys. A 22 (1989) 1141.

[11] E.K. Sklyanin, Boundary conditions for integrable quantum systems, J. Phys. 21 (1988) 2375 [INSPIRE].

[12] C. Destri and H.J. de Vega, Bethe-Ansatz and quantum groups: the light cone lattice approach. 1. Six vertex and SOS models, Nucl. Phys. B 374 (1992) 692 [INSPIRE].

[13] C.M. Yung and M.T. Batchelor, Integrable vertex and loop models on the square lattice with open boundaries via reflection matrices, Nucl. Phys. B 435 (1995) 430 [hep-th/9410042] [INSPIRE].

[14] S. Beraha, J. Kahane and N.J. Weiss, Limits of zeroes of recursively defined polynomials, Proc. Natl. Acad. Sci. 72 (1975) 4209.

[15] A.M. Gainutdinov, W. Hao, R.I. Nepomechie and A.J. Sommese, Counting solutions of the Bethe equations of the quantum group invariant open XXZ chain at roots of unity, J. Phys. 48 (2015) 494003 [arXiv:1505.02104] [INSPIRE].

[16] R.I. Nepomechie and C. Wang, Algebraic Bethe ansatz for singular solutions, J. Phys. A 46 (2013) 325002 [arXiv:1304.7978] [INSPIRE].

[17] E. Granet and J.L. Jacobsen, On zero-remainder conditions in the Bethe ansatz, JHEP 03 (2020) 178 [arXiv:1910.07797] [INSPIRE].
[18] Z. Bajnok, E. Granet, J.L. Jacobsen and R.I. Nepomechie, On Generalized Q-systems, JHEP 03 (2020) 177 [arXiv:1910.07805] [INSPIRE].

[19] D. Cox, J. Little and D. O’Shea, Using algebraic geometry, Springer, Germany (1998).

[20] D. Cox, J. Little, and D. O’Shea, Ideals, varieties, and algorithms, Springer, Germany (2007).

[21] M. Gaudin, B.M. McCoy and T.T. Wu, Normalization sum for the Bethe’s hypothesis wave functions of the Heisenberg-Ising chain, Phys. Rev. D 23 (1981) 417.

[22] V.E. Korepin, Calculation of norms of Bethe wave functions, Commun. Math. Phys. 86 (1982) 391 [INSPIRE].

[23] B. Pozsgay, Overlaps between eigenstates of the XXZ spin-1/2 chain and a class of simple product states, J. Stat. Mech. 06 (2014) P06011 [arXiv:1309.4593].

[24] M. Brockmann, J. De Nardis, B. Wouters and J.S. Caux, A Gaudin-like determinant for overlaps of Neel and XXZ Bethe states, J. Phys. A 47 (2014) 145003 [arXiv:1401.2877].

[25] M. Brockmann, J. De Nardis, B. Wouters and J.S. Caux, Neel-XXZ state overlaps: odd particle numbers and Lieb-Liniger scaling limit, J. Phys. A 47 (2014) 345003 [arXiv:1403.7469].

[26] L. Piroli, B. Pozsgay and E. Vernier, What is an integrable quench?, Nucl. Phys. B 925 (2017) 362 [arXiv:1709.04796] [INSPIRE].

[27] B. Pozsgay and O. Rákos, Exact boundary free energy of the open XXZ chain with arbitrary boundary conditions, J. Stat. Mech. 1811 (2018) 113102 [arXiv:1804.09992] [INSPIRE].

[28] M. de Leeuw, C. Kristjansen and K. Zarembo, One-point functions in defect CFT and integrability, JHEP 08 (2015) 098 [arXiv:1506.06958] [INSPIRE].

[29] I. Buhl-Mortensen, M. de Leeuw, C. Kristjansen and K. Zarembo, One-point Functions in AdS/dCFT from matrix product states, JHEP 02 (2016) 052 [arXiv:1512.02532] [INSPIRE].

[30] M. de Leeuw, C. Kristjansen and S. Mori, AdS/dCFT one-point functions of the SU(3) sector, Phys. Lett. B 763 (2016) 197 [arXiv:1607.03123] [INSPIRE].

[31] O. Tsuchiya, Determinant formula for the six-vertex model with reflecting end, J. Math. Phys. 39 (1998) 5946 [solv-int/9804010].

[32] K.K. Kozlowski and B. Pozsgay, Surface free energy of the open XXZ spin-1/2 chain, J. Stat. Mech. 1205 (2012) P05021 [arXiv:1201.5884] [INSPIRE].

[33] V. Pasquier and H. Saleur, Common structures between finite systems and conformal field theories through quantum groups, Nucl. Phys. B 330 (1990) 523 [INSPIRE].

[34] C.N. Yang and T.D. Lee, Statistical theory of equations of state and phase transitions. I. Theory of condensation, Phys. Rev. 87 (1952) 404.

[35] M. Fisher, The nature of critical points, in Lecture notes in theoretical physics, W. Brittin, ed., University of Colorado Press, Boulder U.S.A. (1965).

[36] J. Salas and A.D. Sokal, Transfer matrices and partition-function zeros for antiferromagnetic Potts models. I. General theory and square-lattice chromatic polynomial, J. Stat. Phys. 104 (2001) 609 [cond-mat/0004330].

[37] J.L. Jacobsen and J. Salas, Transfer matrices and partition-function zeros for antiferromagnetic Potts models. II. Extended results for square-lattice chromatic polynomial, J. Stat. Phys. 104 (2001) 701 [cond-mat/0011456].

[38] J.L. Jacobsen, J. Salas, and A. D. Sokal, Transfer matrices and partition-function zeros for antiferromagnetic Potts models. III. Triangular-lattice chromatic polynomial, J. Stat. Phys. 112 (2003) 921 [cond-mat/0204587].
[39] J.L. Jacobsen and J. Salas, Transfer matrices and partition-function zeros for antiferromagnetic Potts models. IV. Chromatic polynomial with cyclic boundary conditions, *J. Stat. Phys.* **122** (2006) 705 [cond-mat/0407444].

[40] J.L. Jacobsen and J. Salas, Phase diagram of the chromatic polynomial on a torus, *Nucl. Phys. B* **783** (2007) 238 [cond-mat/0703228] [INSPIRE].

[41] J.L. Jacobsen and J. Salas, A generalized Beraha conjecture for non-planar graphs, *Nucl. Phys. B* **875** (2013) 678 [arXiv:1303.5210] [INSPIRE].

[42] J.L. Jacobsen, J. Salas and C.R. Scullard, Phase diagram of the triangular-lattice Potts antiferromagnet, *J. Phys. A* **50** (2017) 345002 [arXiv:1702.02006].

[43] C. Itzykson and J.M.D. Drouffe, Statistical field theory. Volume 1: from Brownian Motion to Renormalization and Lattice Gauge Theory, Cambridge University Press, Cambridge U.K. (1991).

[44] H. Saleur and M. Bauer, On some relations between local height probabilities and conformal invariance, *Nucl. Phys. B* **320** (1989) 591 [INSPIRE].

[45] J.-F. Richard and J.L. Jacobsen, Character decomposition of Potts model partition functions, *I: cyclic geometry*, *Nucl. Phys. B* **750** (2006) 250 [math-ph/0605016] [INSPIRE].

[46] D. A. Bini and G. Fiorentino, *Design, analysis, and implementation of a multiprecision polynomial rootfinder*, *Numer. Alg.* **23** (2000) 127.

[47] D.A. Bini and L. Robol, *Solving secular and polynomial equations: a multiprecision algorithm*, *J. Comp. Appl. Math.* **272** (2015) 276.

[48] L. W. Ehrlich, *A modified Newton method for polynomials*, *Comm. A.C.M.* **10** (1967) 107.

[49] O. Aberth, *Iteration methods for finding all zeros of a polynomial simultaneously*, *Math. Comp.* **27** (1973) 339.

[50] S.C. Chang, J.L. Jacobsen, J. Salas and R. Shrock, *Exact Potts model partition functions for strips of the triangular lattice*, *J. Stat. Phys.* **114** (2004) 763.

[51] R.I. Nepomechie, *Q-systems with boundary parameters*, [arXiv:1912.12702 [INSPIRE]].

[52] B. Buchberger, *A theoretical basis for the reduction of polynomials to canonical forms*, *SIGSAM Bull.* **10** (1976) 19.

[53] J.-C. Faugère, *A new efficient algorithm for computing Gröbner bases (F4)*, *J. Pure Appl. Algebra* **139** (1999) 61.

[54] W. Decker, G.M. Greuel, G. Pfister and H. Schönemann, *Singular 4-1-2 — A computer algebra system for polynomial computations*, http://www.singular.uni-kl.de, (2019).

[55] A. Doikou and R.I. Nepomechie, *Discrete symmetries and S matrix of the XXZ chain*, *J. Phys. A* **31** (1998) L621 [hep-th/9808012] [INSPIRE].

[56] A. Doikou and R.I. Nepomechie, *Parity and charge conjugation symmetries and S matrix of the XXZ chain*, in *Statistical physics on the eve of the twenty-first century*, M. Batchelor and L. Wille eds., World Scientific, Singapore (1999), hep-th/9810034 [INSPIRE].