{'fraction_non_alphanumeric': 0.039217822321477205, 'fraction_numerical': 0.010321912958222126, 'mean_word_length': 4.706060606060606, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Generalized Hydrodynamics of the attractive Non-Linear Schroedinger Equation

We study the generalized hydrodynamics of the one-dimensional classical Non Linear Schroedinger equation in the attractive phase. We thereby show that the thermodynamic limit is entirely captured by solitonic modes and radiation is absent. Our results are derived by considering the semiclassical limit of the quantum Bose gas, where the Planck constant has a key role as a regulator of the classical soliton gas. We use our result to study adiabatic interaction changes from the repulsive to the attractive phase, observing soliton production and obtaining exact analytical results which are in excellent agreement with Monte Carlo simulations.


I. INTRODUCTION
The relentless experimental advances in probing strongly correlated quantum matter are hardly overemphasized [1,2] and triggered an as much impressive amount of theoretical research. The one-dimensional world stands out as a fruitful melting pot for experiments [3][4][5][6][7], numerical methods and analytical expressions: indeed, particles moving on a line cannot avoid each other, with the consequent enhancement of interactions and correlations. As a consequence, the fascinating problem of describing nonequilibrium phases of matter in low dimensions is extremely challenging and often far beyond the comfort zone of perturbative methods. Hence, other approaches should be envisaged.
Tensor networks [8] are one of the most versatile and powerful numerical methods to access one-dimensional physics, but they come with their own limitations: the nonequilibrium late-time behavior of many-body system is extremely hard to capture, due to its highly entangled nature. If on top of this one also wishes to set aside lattice systems and explore continuous setups, the problem becomes quickly intractable. Other strategies should then be used, for example semiclassical methods or exact solutions: this paper lies at the interface between these two.
A widely known modelling of 1d cold atom experiments is the interacting Bose gas Hamiltonian, which in dimensionless units readsĤ with c describing a local pairwise interaction and V (x) being the shallow confining potential and [ψ(x),ψ † (y)] = δ(x − y). This model hardly needs any introduction due to its widespread use in both experimental [9][10][11][12][13][14][15][16][17][18][19] and theoretical communities. In experiments, interacting bosons squeezed in elongated traps, either by means of optical lattices or atom chips, are trustfully described by this Hamiltonian. Remarkably, both the trapping potential and the interactions are highly tunable parameters, also in real time. Particularly interesting for us, as we discuss later on, is the possibility of manipulating the interaction by means of Feshbach resonances [20][21][22][23].
The ground state and low-energy properties of the repulsive (c > 0) 1d Bose gas can be efficiently described within bosonization [24,25], but depending on the question at hand, the usefulness of this approach is at stake: macroscopic changes of the trap or interactions will create excitations high in the spectrum, far beyond bosonization applicability. In the opposite limit, semiclassical methods take the lead: in the case of large mode occupancy, one can discard the quantum nature of the fields by replacing them with classical variablesψ(x) → φ(x). The system is now described by the classical Non-Linear Schroedinger (NLS) equation [26,27] where φ is a classical complex field and κ the classical interaction strength. This approximation holds when interactions are weak and curiously emerges in two opposite scenarios. On the one hand, it can describe a single macroscopically occupied mode (quasicondensate) and within this setup is often referred as Gross-Pitaevskii equation [28]. Since this description captures a quasicondensate, it can be interpreted as a low temperature limit. On the other hand, high temperature limits of the Bose gas can be treated with the NLS as well, which now describes a fluctuating classical field [29][30][31]. The fact that cold atoms can be described by means of a high temperature fluctuating classical field could appear as a contradiction, but the concept of "high temperature" must be compared with the energy scales of the 1d experiments, i.e. the interactions and the oscillator frequency of the longitudinal trap, which can be rather weak. The appeal of semiclassical approximations is self-evident: classical fluctuating fields can be easily simulated with Monte Carlo methods on very large scales and for long times. Besides, external perturbations and noise are easy to implement.
Outside the semiclassical realm, whose applicability is not restricted to the Bose gas, one can probe the true quantum nature of the system with analytical methods. Indeed, the 1d Bose gas (in the absence of the trap) is an outstanding example of integrable model, originally solved by Lieb and Liniger in 1963 [32,33] and often referred to as Lieb-Liniger (LL) model after them. When applicable, integrability is powerful: it gives access to exact results directly in the thermodynamic limit, ranging from equilibrium physics [34] to out of equilibrium setups [35]. As a downside, deriving analytical solutions can be challenging and until recently the effects of soft integrability breaking terms, such as the longitudinal trap, were hard to include in the theory.
The table turned in 2016 with the proposal of a new hydrodynamic approach to integrability [36,37] now dubbed as Generalized Hydrodynamics (GHD), which is built only on the local and instantaneous integrability of the Hamiltonian, making it the ideal tool to describe several experimental setups. The interested reader can refer to the recent reviews [38][39][40][41][42][43][44]. Shortly after the original papers, inhomogeneities in the Hamiltonian such as external potentials [45] and time-changes of the interactions [46] were readily included. Recently, GHD predictions have been challenged by real experiments showing a spectacular agreement between the two [40,[47][48][49]. Noticeably, the very defining properties of integrability is having an extensive number of local conserved quantities that hinder thermalization and cause relaxation to Generalized Gibbs Ensembles [50], as probed in early experiments [51,52], and allows for novel nonequilibrium phases. Very interestingly, integrability can stabilize quantum matter in regimes that simply do not exist in its absence: the Bose gas within the attractive phase c < 0 is an outsdanding example of it. At equilibrium, the attractive Bose gas is extremely unstable [53][54][55]: in this phase, the gas can form bound states [56][57][58][59] and for any finite temperature the gas collapses in a gigantic molecule consisting of all particles. However, integrability overturns the rules of the game by stabilizing the few-particles bound states and allowing stable nonequilibrium phases. This has been already realized and discussed in experiments [22,23], but theoretical results are scarce [60,61] and for a good reason: one should initialize the system in a far from equilibrium setting and this is extremely difficult to be analytically addressed.
Fortunately, GHD comes in handy when facing this challenge: in a recent work [62], the three of us proposed to initialize the gas in the attractive regime by means of a slow interaction tuning starting from the repulsive phase. Within each phase, GHD describes the interaction changes [46] and must be supplemented by a description of what happens crossing the non-interacting point c = 0. When entering the attractive phase, bound states are expected to be produced and we proposed an educated exact ansatz for this process. However, aside the low-density limit, its validity is extremely challenging to be tested due to the absence of independent analytical or numerical computations.
In this work, we address this protocol in the classical Non-Linear Schroedinger equation: the motivations are multifaceted. First of all, by comparing with large-scale classical simulations we can benchmark the analytical predictions, exploring corrections to adiabaticity and due to integrability breaking corrections, always present in experimental setups. Secondly, the in se-per-se interest in the thermodynamic description of integrable models is fueled by the advances of GHD studies. In contrast with quantum models, where excitations are of fermionic or bosonic nature, classical systems feature either solitonic or radiative modes, obeying Maxwell-Boltzmann or Rayleigh-Jeans statistics. Probably, the simplest example of classical integrability is the hard rods gas [63], namely an ensemble of hard-core particles of finite length obeying a (dressed) Maxwell-Boltzmann statistics, thus having solitonic nature. Solitonic modes also appear in the Toda chain [64,65] and Landau-Lifschitz spin model [66][67][68]. In contrast, the thermodynamics of the relativistic sinh-Gordon model [69,70] and the repulsive NLS [71] is built upon radiative modes. Within the attractive phase, the NLS is known [27] to support both radiative and solitonic modes, hence its thermodynamics can be naively expected to be described by a mixture of the two. Surprisingly, we show that this is not the case: by accessing the classical GHD through a semiclassical limit of the quantum model, we recover only solitonic modes. Benchmarks with ab initio classical simulations confirm the correctness of the procedure.
The paper is organized as follows. Section II reviews the solution of the quantum Bose gas, its hydrodynamics and slow interaction changes from the repulsive to the attractive phase. Section III presents the classical NLS, discussing the difficulties of obtaining a hydrodynamic description from purely classical methods and thus building the GHD from semiclassical limits of the quantum model. Section IV benchmarks the hydrodynamic treatment against ab initio Monte Carlo simulations. Finally in Section V we gather our conclusions followed by two short appendixes desribing the numerical methods.

II. THE 1D QUANTUM BOSE GAS
In this section, we summarize the key points of the exact solution of the Bose gas and its hydrodynamic treatment, which we use as a stepping stone to access the classical NLS. We start by reviewing the microscopic solution by means of the Coordinate Bethe ansatz and discussing the strings representing bound-states in the attractive phase. We then turn to the thermodynamic limit and conclude with a short summary of GHD and its application to slow drives from a repulsive to an attractive interaction strength.
A. The many-body wavefunction Already in 1963 Lieb and Liniger provided the exact solution of the homogeneous V (x) = 0 1d Bose gas [32], which is also referred to as Lieb-Liniger (LL) model. Integrable models are characterized by the presence of an extensive number of local conservation laws which greatly affects the dynamics. Indeed, the Hilbert space can be understood as a collection of particles undergoing pairwise elastic scatterings. The rapidities λ i represent the asymptotic momenta of the particles after a scattering event. The asymptotic states are common eigenvectors |{λ i } N i=1 of the Hamiltonian and all the charges, which act additively on the quasiparticles due to their localitŷ where q(λ) is called charge eigenvalue. Notable examples are the number of particles q(λ) → 1, the energy q(λ) → (λ) = λ 2 and the momentum q(λ) → p(λ) = λ. The many-body wavefunction is explicitly computed via the Coordinate Bethe Ansatz [32] and reads Above, P are the permutations of rapidities and the coefficients A(P) encode the factorized scattering of the particles. In particular, exchanging two rapidities is equivalent to a scattering process, hence the state picks up a phase. By defining Π j,j+1 as the permutation that exchanges the rapidities in position j and j + 1, it holds that where S(λ) and Θ(λ) are the two-body scattering matrix and phase, respectively. Notice, that for any non zero interaction, one has S(0) = −1: as a consequence, the wavefunction (4) vanishes if two or more identical rapidities are considered, enforcing a Pauli exclusion principle on the set {λ i } N i=1 . As we will see, the scattering phase fully encodes the interacting nature of the problem and it is a key ingredient in its thermodynamic description. The first step in this direction is to consider a finite system of length L: periodic boundary conditions quantize the allowed rapidities through the Bethe equations Notice that in the non-interacting limit S(λ) = 1 the standard quantization conditions of non-interacting models are recovered e iLλj = 1. In the presence of interactions, the highly non-linear nature of the Bethe equations make their solution extremely challenging.
In the zero density limit (L → ∞ and N fixed) the nature of the solutions can be classified and strongly depends on the sign of the interaction strength. Within the repulsive phase c > 0, only real rapidities λ j are admitted, which describe asymptotically free particles. On the contrary, in the attractive regime c < 0 bound states are possible and are described by complex rapidities. In fact, complex λ j with the proper imaginary part are associated with a wavefunction that exponentially vanishes for large particle separation (4).
At the level of the Bethe equations (6), a complex rapidity causes e iλj L to either diverge or vanish when L → +∞. The zero or divergence must be counterbalanced by a similar behavior in the product of the scattering matrices and this locks the rapiditiy differences to either the zeroes or poles of S(λ), giving rise to regular patterns in the complex plane which are called strings. Rapidities belonging to the same string have the same real part, but are regularly shifted along the imaginary direction ..} is the length of the string. Physically, a string represents a bound state of j particles traveling together with momentum λ. The string hypothesis [34] assumes that in the true thermodynamic limit (L → ∞ with N/L kept fixed), the strings can still be used to classify the state. Hence, by grouping together the constituents of each string, one can write the Bethe-Takahashi equations which constrain the real center of mass λ α j of the strings where j specifies the string species. The string scattering matrix S jj (λ) = e iΘ jj (λ) is simply defined by the product of the scattering matrices of all the constituents of the two scattered strings. In terms of the scattering phase, it reads and θ j (λ) = −2 arctan 2λ cj .
Similarly, one defines the charge eigenvalues of a given string by summing the contributions of its constituents q j (λ) = j a=1 q(λ − i c 2 (j + 1 − 2a)). In particular, in the case of energy and momentum one has Particularly relevant is the energy eigenvalue from which one can readily extract important information on the stability of the attractive phase. In fact, the attractive ground state is a giant bound state of all its constituents with energy E g = −c 2 N (N 2 − 1)/12. Remaining in the zero momentum sector, the first excited state is obtained by removing one particle from the molecule and placing it infinitely far apart, hence E e = −c 2 (N − 1)[(N − 1) 2 − 1]/12. Thus, the energy difference E e − E g diverges in the thermodynamic limit, signaling the impossibility of exciting the system for any finite temperature.
B. The Bose gas in the thermodynamic limit The thermodynamic limit is attained by sending the system size to infinity L → ∞ while retaining a fixed density n = N/L. In this perspective, solving the Bethe equations by analytical or numerical methods appears a daunting task which, however, can be avoided in the thermodynamic limit. In the spirit of the Thermodynamic Bethe Ansatz (TBA) [34], the exact details of a microstate defined by a set of discrete rapidities |{λ i } N i=1 are no longer of importance. Instead, we pass over to a coarse-grained description of states in terms of the so-called root densities ρ j (λ). For the sake of a more compact discussion, we consider the repulsive and attractive case at the same time, hence we introduce a set of root densities {ρ j (λ)}, one for each string species: the repulsive phase is obtained by retaining only strings with j = 1. Concretely, Ldλρ j (λ) counts how many solutions to the Bethe-Takahashi equations of the j th string specie lay within the interval [λ, λ + dλ], thus Eq. (3) in the thermodynamic limit becomes The Bethe-Takahashi equations (7) in logarithmic form constrain the allowed set of rapidities 2πI j,α = Lp j (λ α j ) − (k ,α ) =(j,α) Θ j,j (λ α j − λ α j ), with I j,α an integer. As a consequence, one introduces the total root density ρ t j (λ) ≥ ρ j (λ) as the maximum allowed occupancy and ϑ j (λ) = ρ j (λ)/ρ t j (λ) ≤ 1 is the filling fraction. Due to the nonlinear nature of the Bethe-Takahashi equations, ρ t j (λ) is explicitly state-dependent and is defined as the Jacobian of the change of coordinates between the rapidities and the set of integers I j,α . In the thermodynamic limit, this is compactly expressed as 2πρ t j (λ) = (∂ λ p j ) dr , where the dressing operation is introduced for an arbitrary test function Here, the kernel ϕ jk (λ) is the derivative of the scattering phase ϕ jk (λ) = ∂ λ Θ jk (λ). The dressing operation is ubiquitous in TBA calculations, as we will see. Due to the coarse-grained nature of the root density representation, many states share the same macroscopic description: the Yang-Yang entropy counts the degeneracy of the macrostate identified by a given root density, in the sense that the number of microscopic states sharing the same root density scales as ∼ exp(LS[{ρ j } ∞ j=1 ]). Notice that S is nothing else than the entropy of "fermionic particles" with occupancy ϑ j (λ) and total phase space distribution ρ t j (λ): the fermionic nature of the Yang-Yang entropy is due to the Pauli principle exclusions enforced on the rapidities. The entropic contribution is crucial when aiming to describe an ensemble of states, both in equilibrium and non-equilibrium setups.
Equilibrium thermodynamics-One of the earliest successes of integrability has been its ability to exactly describe systems at thermal equilibrium, despite the presence of strong interactions. Let us focus on a thermal state e −β(Ĥ−µN ) with β and µ the inverse temperature and chemical potential, respectively. The grand canonical partition function Z is obtained by summing over all microscopic states. In the thermodynamic limit, one can coarse grain the microscopic summation by replacing it with a path integral over the root densities In the thermodynamic limit L → ∞, the path integral localizes on the saddle point solution obtained by minimizing the free energy F = −S[{ρ j }] + j´d λ β[ j (λ) − µ]ρ j (λ). This minimization procedure determines a unique choice of root densities that fully describes the thermal state. Within the attractive regime, the ground state's instability is also present at finite temperatures, therefore the resulting equations are stable only within the repulsive regime and read [34] where one conveniently parametrizes the filling fractions through the effective energy ε ϑ(λ) = 1 1 + e ε(λ) .
Generalized Gibbs Ensembles-Besides playing a pivotal role in equilibrium, the root densities fully characterize several non-equilibrium protocols. Let us focus on the paradigmatic example of the homogeneous quantum quench [72]: here, the system is initialized in a certain state (or ensemble) that is not an eigenstate of the Hamiltonian. Then, the state evolves under unitary evolution and eventually (local) relaxation is attained. The presence of infinitely many local conservation laws greatly constrains the dynamics of integrable models and hinders thermalization. Indeed, the steady state reached by integrable models after a quantum quench is usually not described by thermal ensembles, but rather by Generalized Gibbs Ensembles (GGE) [50] e − i βiQi , where in addition to the Hamiltonian, all the relevant charges must be taken into account. Within the thermodynamic limit, GGEs can be described with minor changes of the thermal analysis, by modifying the source term in the TBA integral equations (15): however, there are two major obstructions to this program. The first concerns the charges that need to be included in the GGE: in continuum models such as the Bose gas, the expectation values of ultra local charges often feature ultraviolet divergences [73,74], which must be properly regularized [75][76][77]. In addition, also in the absence of ultraviolet divergences as for example in lattice systems, listing all the charges needed in the GGE is challenging and quasi-local conservation laws must be considered [78,79]. Fortunately, the explicit construction of the charges is not needed for the thermodynamic description of the GGE. Indeed, GGEs are understood to be in one-to-one correspondence with the root density description [80]: given a set of root densities, a GGE of the form e − i βiQi exists from which they can be derived. The second challenge to be addressed is determining the final GGE from the initial conditions: a major breakthrough in this direction has been the quench action approach [81,82] which extracts the root densities from the knowledge of the overlaps between the initial state and the post quench eigenstates. Thanks to this approach, several quench protocols in integrable models have been exactly solved, but its applicability is limited to those initial states where the aforementioned overlap can be computed [83]. In the case of the Bose gas, the list of these special states hosts a unique element, namely the non-interacting ground state (i.e. the homogeneous Bose-Einstein condensate). The sudden quench from the non-interacting ground state to the repulsive case is among the first quenches in interacting integrable models ever solved [84] and it has been lately generalized to the case of attractive interactions [60,61], showing bound state formation. However, despite the appeal of such an exact solution, the instability of the one-dimensional BEC against thermal fluctuations makes the realization of this protocol in real-life experiments difficult. In contrast to sudden quantum quenches, slow timedependent protocols allows for a much greater flexibility in the choice of the initial state: these setups fall within the realm of hydrodynamics, which we now discuss.

C. Generalized Hydrodynamics and bound state formation
When a many-body system is subjected to slow and smoothly varying external perturbations, it can be rightfully expected to locally evolve through quasi-stationary states. This is the onset of hydrodynamics: by invoking a separation of time scales, one assumes the system is locally and instantaneously described by a homogeneous stationary state, which then evolves on macroscopic times through proper continuity equations. For those models that are evolving through a locally integrable Hamiltonian, stationary states are described by GGEs and the hydrodynamics of GGEs is now known as Generalized Hydrodynamics (GHD) [36,37]. Since its introduction in 2016, it has provided tremendous advances in understanding 1d systems out of equilibrium. Here, we focus on the hydrodynamic equations at the Euler scale, i.e. we retain only the first order in a gradient expansion: diffusive corrections are known [85,86] and play a pivotal role in the late-time thermalization due to the trap-induced integrability breaking corrections [87]. The thermalization time scale is proportional to the square of the sloshing period and can be neglected for very smooth traps. At the Eulerian scale, the hydrodynamics is governed by the following continuity equation where the space-time dependent root density describes the local GGE and we suppress the explicit dependence on rapidities, space and time for the sake of a more compact notation. We discuss the attractive and repulsive cases again at once, the latter being obtained by retaining only the first string species ρ j=1 in the forthcoming expressions. The continuity equation describes the phase space density of particles moving with velocity v eff j and experiencing a force F eff j : due to the strongly interacting nature of the system. The velocity and force are suitably renormalized by the presence of the surrounding particles. The form v eff j = (∂ λ j ) dr /(∂ λ p j ) dr , where the dressing operation is defined in Eq. (12), has been proposed in the original papers and then later rigorously proven in Refs. [88,89] (however, see Ref. [90] for an exception). The effective force undergoes an analogous dressing operation F eff j = f dr j /(∂ λ p j ) dr , where f j is the bare force, which captures the effects of traps [45] and interaction changes [46] Above, we assume for simplicity that the interaction changes in time, but not in space. The hydrodynamic equation allows for evolving the root density within the repulsive or the attractive phase, but does not provide a recipe to connect the two. For example, let us initialize the system in a given state (e.g. thermal) within the repulsive phase c > 0 and then gently tune the interaction to smaller values until c = 0 + is met. Here, the evolution with the repulsive GHD stops and continues from c = 0 − within the attractive regime with the initial conditions being determined by the endpoint of the repulsive evolution. This boundary condition is not contained within the GHD equations presented so far, which must be supplemented by further considerations: in Ref. [62], the three of us proposed an analytical ansatz to accomplish this task (see also [42,91]). Our reasoning is based on entropic arguments and on the fact that at c = 0 bound states have purely real rapidities and are indistinguishable from unbound particles with the same rapidity. This last statement is expressed by the continuity equation which, besides being diagonal in coordinate space (whose dependence we omit) is also diagonal in rapidity space. In the case of an interaction change from attractive to repulsive, the right hand-side is known and uniquely determines the repulsive root density: physically, a bound state of j particles traveling with velocity v eff j (λ) melts in j unbound particles traveling with the same velocity v eff (λ ) = v eff j (λ). At the non-interacting point, it is easy to check that the last identity implies λ = λ . On the other hand, when the interaction is tuned from repulsive to attractive, only particles with the same rapidity can form a bound state, since particles with different velocity would drift apart before having the chance to bind. Notice that in the more interesting case when the attractive phase is approached from the repulsive one, Eq. (19) does not uniquely fix {ρ j (λ)} and further considerations must be made. If bound states at c = 0 − are indistinguishable from unbound particles, any choice of the bound states population is equally probable: therefore, the thermodynamic limit will select the most probable configuration, obtained by entropy maximization. Maximizing the Yang-Yang entropy (13) at the free point under the constraint of particle conservation (19) uniquely determines the attractive root densities through where ω(λ) is the rapidity-dependent Lagrange multiplier whose value must be tuned to enforce Eq. (19). The effective energy ε j parametrizes the state through ϑ j (λ) = (1 + e εj (λ) ) −1 . Similar equations already appeared in the literature [92,93] in the context of the non-interacting limit of the sine-Gordon field theory and can be analytically solved [94] As a last step, the Lagrange multiplier ω(λ) can be connected with the repulsive root density through ρ(λ) = 1 2π 1 e ω(λ) −1 , obtaining an explicit solution for the filling fraction.
The GHD equations together with the ansatz (20) allow one to access the attractive phase in a controlled manner from a large variety of initial states. Once c is gently tuned to negative values, the gas enters a highly excited phase featuring bound states of finite size, whose stability is protected by integrability. In contrast to equilibrium thermal states, GGEs obtained by solving (20) are stable and the bound state population is exponentially decaying in their size ϑ j (λ) ∼ e −jω(λ) . Of course, the value of ω(λ) > 0 is fixed imposing Eq. (19): it decreases monotonously as ρ(λ)| c=0 + , approaching zero when ρ(λ)| c=0 + diverges and leading to instabilities. Our ansatz is rooted on physical arguments and well-motivated thermodynamic considerations, but ab-initio checks are extremely difficult. Analytical consistency checks are available only in the low density limit, while numerical benchmarks are a daunting task. The state-of-the-art tensor network simulations struggle to capture the dynamics of highly excited and entangled systems, especially in the case where the model is continuous and of bosonic nature (which results in an infinite local Hilbert space). In fact, the appeal of GHD is to provide trustful predictions in a regime beyond any other method. As we will see in the next section, the same hydrodynamic treatment together with the bound states production ansatz can be transferred to the classical world: there, efficient numerical simulations will confirm the correctness of our ansatz.

III. THE NON-LINEAR SCHROEDINGER EQUATION
After having reviewed the quantum Bose gas and its hydrodynamic description, we now revert to the classical world and introduce the Non-Linear Schroedinger (NLS) equation Eq. (2). The equation of motion can be derived from a classical Hamiltonian by enforcing the Poisson brackets {φ(x), φ * (y)} = iδ(x − y). From the comparison between the Hamiltonian of the 1d quantum model (1) with that of the classical NLS, the similarities between the two appear self-evident. Indeed, the homogeneous NLS (V (x) = 0) is a well-known integrable partial differential equation [26,27]: it features infinitely many local conservation laws affecting the dynamics. In the absence of a Hilbert space, there is not a classical analogue of the Coordinate Bethe ansatz and the NLS is studied with the Inverse Scattering Method (ISM). In contrast, the quantum model can also be studied by means of the Quantum Inverse Scattering Method [95], but its discussion is beyond the scope of our work. The key point is noticing that the NLS equation emerges as a compatibility condition of an auxiliary linear problem where F is an auxiliary two-dimensional vector and U λ , V λ are 2 × 2 matrices with an explicit dependence on φ with σ x,y,z the standard Pauli matrices and σ ± = (σ x ± iσ y )/2. The consistency of the two differential equations (23) requires the zero curvature condition ∂ t U λ −∂ x V λ +[U λ , V λ ] = 0 to hold, the latter is λ−independent and it is satisfied if and only if the Schroedinger equation (2) holds. Eventually, we are interested in the emergent thermodynamic properties in setups with finite particle number and energy densities, i.e. where L −1´d x|φ| 2 remains constant in the thermodynamic limit. However, it is convenient to start our discussion within the zero density limit. An extensive discussion can be found in Refs. [26,27].
The whole line monodromy matrix-In this case, the system is assumed to be infinite with the condition that the wavefunction φ(t, x) vanishes sufficiently fast (e.g. exponentially) for |x| → +∞. Let us define the transfer matrix as the spatial propagator of Eq. (23) where Pexp is the path-ordered exponential. Thanks to the zero curvature condition, the transfer matrix obeys a simple equation of motion Particularly important is the role of the monodromy matrix, i.e. the extension of the transfer matrix to the whole line Above, the additional oscillating terms are introduced in view of the asymptotic behavior lim |x|→∞ U λ (t, x) = λσ z /(2i). Due to the vanishing boundary conditions, one simply has lim |x|→+∞ V λ (t, x) = iσ z λ 2 /2. From Eq. (26) it immediately follows ∂ t Tr[T λ ] = 0 for any spectral parameter. As a consequence, an infinite λ−dependent family of conservation laws is found. Further insight is gained from the matrix elements of the monodromy matrix, which can be parametrized as where a(λ), b(λ) are entire functions in the λ−complex plane and play the role of action-angle variables of the integrable system. They in fact obey a very simple equation of motion Hence, a(λ) is itself a conserved quantity. In principle, the non-linear dynamics of the wavefunction φ(t, x) is solved, albeit in an implicit way. In practice, one should compute the monodromy matrix from the initial profile, then evolve the scattering parameters according to Eq. (29) and finally use them to infer back the scattering potential and thus φ. The last step is what is referred to as "inverse scattering" and passes through the solution of the Gelfand-Levitan-Marchenko linear integral equation. In this respect, the analytical properties of a(λ) are crucial. Indeed, a(λ) can be analytically continued in the complex and a(λ) → 1 when λ is large, leading to the representation On the one hand, a(λ) is an integral of motion for any λ in view of Eq. (29), hence each term Q n ≡´∞ −∞ dλ κ (λ ) n log |a(λ )| is separately conserved. In addition, it is possible to show that Q n are local conserved charges [26,69]. On the other hand, a comparison with the expectation value of the quantum charges in the thermodynamic limit (11) suggests that log |a(λ)| plays the role of a classical root density [69,96]. However, a proper analysis requires to consider the system in a finite volume, which we now briefly discuss.
The periodic monodromy matrix-When periodic boundary conditions are enforced, the monodromy matrix is defined as the transfer matrix across the finite system T PBC λ (t) = T λ (t, −L/2, L/2). Eq. (26) still holds and by virtue of PBC V λ (t, −L/2) = V λ (t, L/2), hence the trace of the monodromy matrix is still a conserved quantity. There are two main differences to the previous case: first, not all choices of the spectral parameter are acceptable. In fact, by imposing periodic boundary conditions only values of λ such that T PBC λ (t) = ±Id are allowed. Secondly, in contrast with the fast decaying case, only the trace of the monodromy matrix is conserved, while the diagonal entries are not. However, this is due to boundary terms that are unimportant in the thermodynamic limit if one focuses only on bulk properties: following the argument of Ref. [69,96], let us imagine a configuration of the field φ initially having support on the restricted interval [−L/2 + , L/2 − ]. In this case, the monodromy matrix on the whole line coincides with the PBC case and has the same analytic properties of its coefficient. In addition, a(λ) is conserved until the evolving field does not reach the boundaries. This suggests that in the thermodynamic limit one can identify with ffl being the principal value regularization of the integral. These equations have strong analogies with the quantum Bethe equations in the logarithmic form (6), where the spectral parameter is identified with the rapidities and the summation over rapidities has already been replaced with an integral over the root density. In particular, the classical root density ρ(λ) and scattering phase Θ(λ) can be identified as [69] The proportionality factor between ρ(λ) and log |a(λ)| is determined comparing the local charges obtained from Eq. (31) with the standard normalization of particle density and Hamiltonian. This correspondence leads to a full characterization of the post-quench GGE in the repulsive phase [71] in terms of the initial data. In principle, one could attempt the same strategy in the attractive case as well, but this path appears unpractical or, at least, very challenging. First, solitonic modes complicate the analytical properties of the scattering coefficient and must be properly taken into account. Strictly speaking, a sharp distinction between solitons and radiation exists only in the whole line problem and is blurred out in the periodic case: nevertheless, we still refer to the complex zeroes of a(λ) as solitons. Secondarily, in writing Eq. (32) one implicitly assumes only real values of the spectral parameter λ j . However, in the attractive case one expects complex solutions as well, in analogy with the quantum case and their classification further complicates the approach. Fortunately, one can avoid a solution of the classical problem and indirectly access its thermodynamic description through a proper semiclassical limit of the well-controlled quantum case.
The NLS as the semiclassical limit of the quantum Bose gas-Despite the intrinsic quantumness of nature, our daily life experience is based on classical physics: in the large mode occupation limit, quantum systems are trustfully described by classical equations of motion. Semiclassical methods have a long lasting success story which is not possible to properly credit here, therefore we restrict our attention to the interplay between semiclassical limits and integrability, emphasizing the connection between the NLS and the quantum Bose gas. At equilibrium, the quantum-classical correspondence has been studied in early days [92,97], but it was brought back into focus through recent interest in non-equilibrium problems. In Ref. [69] the idea of studying classical GGEs by taking the semiclassical limit of quantum theories has been put forward, which has been later successfully applied to sudden quench protocols in the NLS [71]. Following the advent of GHD, the hydrodynamics of classical integrable models has been successfully derived from their quantum relatives [67,70], in particular the hydrodynamics of the repulsive NLS has been proven to be extremely fruitful in benchmarking GHD predictions against ab initio numerical simulations. Here, we will follow a similar route and tackle the NLS in its attractive phase κ < 0, which becomes accessible in view of our previous results in the attractive quantum Bose gas [62]. The semiclassical limit is most conveniently accessed by introducing a small parameter h which plays the role of Planck's constant. The large occupation limit requires the number of particles to diverge N ∝ h −1 , but a finite limit is attained only if the quantum interaction is rescaled to small values c = hκ. This is readily seen from a path integral representation of the quantum propagator In the h → 0 limit, the path integral localizes on the saddle point, enforcing the classical equations of motion. The whole analysis is then carried out on thermal ensembles and GGEs. In particular, the limit of large occupation modes must be imposed for each conserved charge, leading to the scaling In the next section, we briefly review the semiclassical limit of the quantum TBA and GHD in the repulsive case before moving on with the attractive interactions.
A. The semi-classical limit of the repulsive LL In this and in the forthcoming sections, it is convenient to introduce an extra label to tell apart quantum and classical quantities. Therefore, we add the subscript "q" to variables labelling quantum quantities. For the repulsive phase, we follow Refs. [69,71]. As we anticipated, the classical model features a single root density describing radiative modes. Let us rewrite the large occupancy scaling of the charges (35) using the root density representation dλ q q (λ)ρ q (λ) = h −1ˆd λ q(λ)ρ(λ).
The charge eigenvalues of the local charges such as the density or the energy do not bear any explicit interaction dependence. Hence, one can identify the quantum eigenvalues with the classical ones q q (λ) = q(λ): assuming this identification holds for a complete set of charges, imposing Eq. (36) and at the leading order one is led to the scaling ρ q (λ) = h −1 ρ(λ), with possible further corrections in h. Indeed, this quantum-classical correspondence turns out to give a finite limit of the whole thermodynamic Bethe ansatz with the already anticipated classical scattering phase (33). The classical scattering phase is recovered by the quantum one as In order to keep the standard definition of the total root density, the classical root density is consequentially obtained as ρ t (λ) = lim h→0 (ρ t q (λ) − ρ q (λ)). With this caveat, the classical dressing is defined in the usual manner employing the classical scattering phase and the identification 2πρ t (λ) = (1) dr (λ) still holds: consistently, the limit of the whole GHD results in the same equations as Eq. (17) where the classical scattering phase replaces the quantum one. An important difference arises in the integral equations describing thermal states and this is deeply connected to the different statistical properties of the classical NLS when compared with the quantum Bose gas, encoded in Eq. (37). Indeed, the Pauli principle exclusion on the quantum Bethe roots naturally leads to fermionic statistics (13), while the radiative modes of the repulsive NLS are expected to follow a Rayleigh-Jeans distribution, which can be thought of as the large occupation limit of bosonic particles. In fact, Eq. (37) removes the fermionic component of the scattering phase before sending h → 0: this is strictly connected with the possibility of reformulating the whole quantum TBA in terms of bosonic degrees of freedom [98]. By taking the semi-classical limit of the Yang-Yang entropy (13), one finds that still has a divergent term ∝ log h. However, by explicitly using the definition of ρ t it is immediate to see that dλρ t (λ) is a state-independent, sincê Hence, it can be neglected, leading to the definition of the classical Yang-Yang entropy within the repulsive phase S ≡ˆd λ 2π ρ t (λ) log ϑ(λ) .
Just as in the quantum case, thermal states are obtained by minimizing the free energy, leading to a Rayleigh-Jeans distribution of the mode occupation ϑ(λ) = 1/ε(λ) Thanks to the equipartition theorem, non-interacting waves on thermal states are distributed according to the inverse of the energy: Eq. (41) generalizes this expectation to the presence of interactions. Eq. (41) matches the natural expectation inferred by the inverse scattering solution, from which only radiative modes of a single species are expected. This must be contrasted with the attractive phase we now discuss.

B. The attractive phase
As we have already discussed, tackling the thermodynamics and hydrodynamics of the attractive phase with the inverse scattering solution appears challenging. Nevertheless, the semiclassical limit offers a direct path to our goal, whose validity has to be ultimately benchmark against numerical simulations. The first point to be addressed is the correspondence between the quantum and the classical root densities: we start by noticing that in the semiclassical limit the energy quantization of the strings is expected to merge in a continuum. In order to understand the correct scaling, let us focus on the expectation value of a given quantum charge where we explicated the charge eigenvalue using the string hypothesis as well as the correspondence between the quantum and classical interaction strength c = hκ. By requiring the same scaling ∼ h −1 for all the charges and assuming their completeness, the same scaling must be independently enforced on each rapidity λ. Furthermore, the imaginary shifts in the charge eigenvalue are equispaced on a vanishing step ∼ h. This suggests to replace the summation over the quantum strings with an integral over a continuum variable s = hj. Therefore we get Imposing the scaling ∼ h −1 of the whole expression suggests the following quantum-classical correspondence Following this argument, the attractive phase accommodates for the semiclassical limit in a completely different manner when compared with the repulsive case: instead of macroscopically populating a single root density, it fills a divergent number of particle species (i.e. the bound states), but each of them with a population of order O(h). This is a priori not entirely obvious from Eq. (43), since the same scaling could have been obtained with a single non-vanishing and divergent summand. However, Eq. (43) is not the only requirement to be enforced and Eq. (44) guarantees a finite limit of all the TBA equations, as we now discuss. Before turning to the total root density, we can first deduce the semiclassical limit of the quantum scattering phase (8), which explicitly reads

arctan 2λ
κh(|j − k| + 2a) . (45) Notice, that by taking the limit of large strings necessary for attaining the semiclassical limit, the summation diverges as ∼ h −1 , while the first two terms remain O(h 0 ). Therefore, we define the derivative of the classical scattering phase as Θ ss (λ) = lim h→0 hΘ q;s/h s /h (λ): the first two terms in Eq. (45) do not contribute in this limit Using the classical scattering phase, one can write the total root density, the dressing equations and all the GHD equations. Of course, they coincide with the semiclassical limit of the quantum hydrodynamics. In particular, the quantum total root density scales as ρ t q;j (λ) = hρ t hj (λ), with the classical total root density defined as the dressed derivative of the momentum 2πρ t s (λ) = (∂ λ p s (λ)) dr . The classical dressing for an arbitrary test function τ s → τ dr s is defined through the usual integral equation with ϑ s (λ) = ρ s (λ)/ρ t s (λ) the classical filling function and ϕ ss (λ) = ∂ λ Θ ss (λ). It is worth to mention that ϕ ss (λ) = ∂ λ Θ ss (λ) can be explicitly written as The scattering kernel ϕ ss (48) is nothing else than the post-scattering displacement of two colliding classical solitons [99] and has recently appeared in connection with superdiffusion in the XXZ spin chain [39,67], where the exotic transport has been attributed to excitations of semiclassical nature (see also Ref. [68,100,101]). In the semiclassical limit, the XXZ spin chain is described by the Landau-Lifschitz model, which is gauge-equivalent to the attractive NLS [27,102], hence the identical scattering kernels. The energy and momentum eigenvalues are immediately obtained as p s (λ) = lim h→0 hp q;s/h (λ) and s (λ) = lim h→0 h q;s/h (λ) and read Finally, the GHD equations have the usual form ∂ t ρ s + ∂ x (v eff s ρ s ) + ∂ λ (F eff s ρ s ) = 0, with the following effective quantities v eff s = (∂ λ s ) dr /(∂ λ p s ) dr , F eff s = f dr s /(∂ λ p s ) dr and the bare force We now turn to the semi-classical limit of the Yang-Yang entropy, leading to the definition of the classical entropy within the attractive phase. On the practical side, this will allow us to access the attractive regime by means of slow interaction changes. Moreover, it will unveil the nature of the excitations described by ρ s (λ).
By using the quantum-classical correspondence in Eq. (13), one finds where a ∼ log h term survives and the role of δ(h) will be clarified soon. In contrast with the repulsive phase, where the entropy was pointing out the radiative nature of the excitations, Eq. (51) is associated with solitons. Indeed, consider N indistinguishable classical particles, hence the associated phase space is 1/N ! and the entropy reads S = log(1/N !) ∼ N (1 − log N ) , in striking similarity with Eq. (51). We stress the absence of explicit radiative modes, as one could have naively expected from the inverse scattering method. Let us now analyze the role of the ∼ log h term: a similar correction appeared in the repulsive case as well, but, as we commented, its contribution was state independent and could be omitted. This is not the case in Eq. (51) and, in order for the h → 0 limit to give a finite equation of state through entropy maximization, the ∼ log h term should be counterbalanced by another singularity. This is the role covered by δ(h): indeed, as we now discuss, ϑ s develops a power law singularity for small s and δ(h) must be properly tuned to obtain a finite expression. From the semiclassical limit perspective, we are summing over string indexes j = {1, 2, 3, ..} hence s ∈ {h, 2h, 3h, ...}: therefore, a cutoff δ(h) ∝ h is expected. We notice that a similar log h term appeared also in the semiclassical TBA of the XXZ chain [67], further strengthening the connection with the NLS. In that case, the role of the Planck constant was played by an external magnetic field. In the following, we determine δ(h) through a bootstrap approach, asking the maximum entropy approach to guide us towards a finite (and explicitly h−independent) formulation of the bound state production.
Crossing κ = 0 and soliton production-When crossing over from the repulsive to the attractive phase, the classical problem can be tackled in the same spirit as the quantum Bose gas. One can proceed in two different but equivalent ways, either by taking directly the semiclassical limit of the exact quantum solution (21) or through maximization of the classical entropy. We start by addressing the first case, then we turn back to the classical entropy maximization and discuss the role of the log(h) term appearing in Eq. (51). The semiclassical limit of Eq. (21) is extremely simple to be taken: by enforcing the h−scaling discussed in the previous section, one reaches the simple expression ϑ s (λ) = 1 (2πρ(λ)) 2 .
Notice that the filling fraction diverges for small s as ϑ s (λ) ∼ 1/s 2 , regardless of the value of ρ(λ). This divergence is the reason behind the appearance of log(h) in the classical entropy, as we now discuss. By enforcing that the two phases should be indistinguishable when approaching the non-interacting point, one reaches the semiclassical analogue of (19) This continuity equation does not suffice to determine the population of each string, which is in turn determined by the constrained maximization of the classical entropy. In the limit κ → 0 − , the kernel of the dressing equation becomes diagonal in rapidity space As a consequence, the definition of the total root density is also diagonal in rapidity space and the entropy can be maximized for each rapidity independently leading to the equation Where we used the natural parametrization ϑ s (λ) = e −εs(λ) . The λ−dependent Lagrange multiplier ω(λ) is of course determined by enforcing Eq. (53). These integral equation can develop singular solutions for s → 0: this is precisely FIG. 1. We compare the solution of the classical filling and root densities against the quantum case for finite h. We proceed as it follows. Since the bound state production is diagonal in rapidity space, we fix a certain rapidity and give the value of ρ(λ) what happens in Eq. (52) and the divergence must be singled out before taking the h → 0 limit. In view of Eq. (52), it is useful to introduce the reparametrization In the above, the last integral is obviously finite. The first integral on the second row is not only finite, but it vanishes as C → δ → 0. Hence, the singularity is entirely due to the integral in the first row´C δ(h) ds 2 min(s,s ) s 2 = 2 log(s/δ) + 2s 1 s − 1 C = 2 log(s/δ(h)) + 2 + O(s). By matching the singular and O(s 0 ) terms in Eq. (57), we are lead to log δ(h) = log h + 1. The next natural question concerns the effects of the singular filling ϑ s on the behavior of the total root density and, in general, of dressed quantities. A similar analysis of the s ∼ 0 behavior can be performed, showing that the total root density is not only finite, but it also quadratically vanishes (see next subsection) as s → 0: this is crucial, since it guarantees the root density ρ s (λ) = ρ t s ϑ s (λ) to remain finite, thus giving finite expectation values of the charges. Using the identity log δ = log h + 1, one can obtain a finite integral equation forε and explicitly take the h → 0 limit. Indeed, by using´∞ δ(h) ds 2 min(s,s ) s 2 = 2 log(s/δ(h)) + 2, we can rewrite Eq. (55) as The integrand is now finite in zero and the limit δ(h) → 0 can be safely taken. As in the quantum case, this integral equation admits an exact analytical solution which, with the identification ρ(λ) = 1 2πω(λ) , is equivalent to the result (52) derived as the semiclassical limit of the quantum filling.
In Fig. 1 we compare the semiclassical scaling with the quantum result for small values of h and study the convergence. In the case of the filling fractions, we compare the analytical solutions while the correspondent root densities are obtained by numerically solving the dressing equations. Overall, we experience that a large number of quantum strings are needed to reproduce the classical result, especially in the case of the filling function. In contrast, the classical dressing equations can be efficiently discretized with a far lower number of points (in this example, excellent convergence is already obtained with ∼ 20 points). This stresses the need of solving directly the classical GHD rather than numerically considering the semiclassical limit of the quantum case.
A non-singular reparametrization-The analysis of the singularities we provided suggests to redefine the total root density and filling by singling out the small s behavior. The same procedure is also extremely useful for computing quantities appearing in the GHD equations. Hence, we introduce the following definitions that are also valid for finite interactions κ < 0.θ Furthermore, we define the regularized dressing on a test function t s (λ) → t dr s (λ) as the solution of the following integral equation Notice that the limit lim s→0 s −1 ϕ ss (λ) is finite and non-vanishing for any interactions. As a consequence, if the source term does not have singularities t s (λ) ∼ O(s 0 ) as s → 0, then t dr s (λ) is expected to be finite as well, which is easily numerically checked. The definition Eq. (60) leads to the following correspondence between the regularized and standard dressing (47) In particular, this impliesρ t s (λ) = (1/(2π)) dr s (λ), henceρ t s (λ) remains finite as s → 0, while ρ t s (λ) quadratically vanishes, as anticipated. Due to the ∼ s behavior of the energy and bare force, (s −1 ∂ λ s ) dr and (s −1 f s ) dr are finite as well. Hence, the effective velocity and force can now be conveniently computed in terms of a ratio of non-singular functions.

IV. HYDRODYNAMICS AND MICROSCOPIC SIMULATIONS
One of the major advantages that classical field theories have in contrast to quantum ones is the possibility of numerically accessing arbitrarily long times, hence we are in the perfect position to test our hydrodynamic predictions and quantify the corrections. In particular, classical simulations can be performed through Monte Carlo methods: the initial field configurations are randomly sampled from a known probability distribution. Then, the initial conditions are deterministically evolved through the equations of motion and the desired observables are computed. Finally, the average over the initial conditions is taken. Thermal states within the repulsive phase are probably the most natural choice for the initial conditions and can be efficiently simulated by means of Metropolis-Hasting methods [103][104][105]. However, as we will discuss in the following, other choices of initial GGEs are also plausible and easy to simulate. We perform the standard microscopic numerical simulations following Refs. [71,87]. For the interested reader, a short summary is reported in A. When numerically solving the GHD equations, it turns out that the root density is not the most convenient variable. Already in the seminal papers [36,37] the GHD equations have been rewritten in terms of the filling fraction where convective form is recovered. Within the attractive phase, the GHD equations in terms of the filling fraction are and an analogous expression is reached within the repulsive phase, where of course the string index is absent. Notice that, importantly, it is convenient to use the rescaled filling fraction defined in Eq. (59) to ensure the regularity of the expression for s → 0. Similarly, in the attractive phase the effective velocity and force are computed using the modified definition of the dressing introduced in Eqs. (60)(61). Showing the equivalence between the GHD equations (62) and the canonical version in terms of the root density requires to manipulate the integral equations defining the dressing operation. We choose to not report here these lengthy, but standard calculations: the interested reader can find them in the seminal papers [36,37] (see also Ref. [46] for the presence of forces) and straightforwardly apply them to our classical case as well. Once the GHD equations are written in the form Eq. (62), they can be seen as infinitesimal translations in the (x, λ) plane and solved by the method of characteristics [46,106]: we provide a short summary in B. In principle, the GHD equations (62) can be used to study interaction changes in fully inhomogeneous settings, that are for example given by trapping potentials. In practice, we experience that the need of discretizing the continuum set of strings of the attractive phase places a major hurdle on the numerical simulations. For this reason, and since we are mostly interested in observing the bound state production due to time-dependent interaction changes, we focus here on the homogeneous case. Nevertheless, a more careful optimization of the GHD code would make the fully inhomogeneous case accessible as well. Notice that, within the homogeneous case, the ∂ t κ term appearing in the effective force can be singled out and absorbed with a change of variables. Thernefore, the GHD evolution can be parametrized in terms of the interaction only. In the following, we use this convention. The comparison between hydrodynamics and microscopic simulations passes through the expectation value of observables. As we discussed, in integrable models the expectation values of conserved quantities are the most easy ones to be accessed, leading to the density of particles and energy as the natural choices. However, the particle density is trivially conserved throughout the protocol and is thus not informative at all. On the other hand, the expectation value of the energy density diverges on classical thermal states: this is due to the well known ultraviolet catastrophe of black body radiation, which led to the discovery of quantum mechanics. Indeed, at very high momenta one can discard the role of interactions in Eq. (41) obtaining ρ(k) ∼ (β (k)) −1 and causing the energy density to diverge´dk (k)ρ(k) → ∞. For this reason, we focus on the expectation value of the correlated density |φ(x)| 4 , which is finite and undergoes a non-trivial evolution.
In the quantum case, its expectation value can be computed on arbitrary GGEs by means of a generalization of the Hellmann-Feynmann theorem (see eg. [62]). From this point onwards, the semiclassical limit is readily taken leading to the classical expressions. In particular, one has In the second line we can use the non-singular parametrization we introduced by noticing ϑ s (λ)f dr s (λ) =θ s (λ)(s −1 f s ) dr . The amount of information of the evolving state captured by the correlated density is of course limited and a better characterization of the state though further measurement is desirable. Within the repulsive case, close analytical expression for the exact probability distribution of the density |φ| 2 have been recently derived [71]. Consequentially, all the momenta |φ| 2n can be computed on arbitrary GGEs (see also Refs. [107,108] for the quantum case). Moreover, the root density itself could be determined from the microscopic simulations thanks to the correspondence (33). However, to the best of our knowledge, analogous results are not available within the attractive realm, hence we turn our attention to different observables in the form of two-point correlation functions. Indeed, GHD allows for an exact computation of two-point correlation functions O(t, x)O(t , y) on the Eulerian scale (i.e. leading order in the large space and time separation limit), provided the expectation value of O on arbitrary GGEs is known. This result has first been obtained for the time independent and homogeneous GGEs [109] and was tested for the first time on the classical Sinh Gordon model [70]. Later, expressions for inhomogeneous and time dependent GGEs became available [110] (see also [38]). For simplicity, here we focus on the two-point correlation of the density on constant GGEs where ... c stands for the connected part of the correlator and the integration over the string variable is obviously omitted in the repulsive case κ > 0. Eq. (65) holds for large space-time separations and after averaging over mesoscopic fluid cells. Notice the scaling form of the right hand term as a function of the ray ζ ≡ x/t. The function V O carries the information of the observable of interest and it is defined as ρ t s (λ)V O s (λ) = δ O δϑs(λ) . Notably, in the case where O is the local density of a conserved charge, the simple result V O s (λ) = q dr s (λ) holds true. Lastly, σ s (λ) is a statistical factor determined by the nature of the excitations and it is different if quantum particles (bosons or fermions) or classical radiation or solitons are considered [109]. In our case, one has Of course, the Eulerian correlation functions can also be accessed by first writing the quantum expression and then taking the semiclassical limit, consistently obtaining the same result. We now benchmark our analytical predictions against microscopic simulations. For numerical reasons clarified later on, rather than starting from a repulsive thermal state and drive the interactions in the attractive phase, we start by engineering suitable GGEs at the non-interacting point κ = 0 of the form With this convention, the total density of particles is fixed to unity and the parameter w is tuned to address different initial states. Notice that the root density is decaying fast for λ → ∞: this is not the case for thermal ensembles, which makes the discretization of the GHD equations more difficult. GGEs in the form Eq. (67) are easy to be implemented in the microscopic simulations, see A. In Fig. 2 we investigate several protocols obtained by gently driving the system within the attractive phase κ < 0 starting from states (67). We consider linear ramps of the interaction κ(t) = −t/T max and start by investigating the convergence to GHD as T max is increased (Fig. 2 (a)). We focus on the correlated density g 2 = |φ| 4 /( |φ| 2 ) 2 and observe a linear convergence in the ramp time 1/T max , within the numerical error (see inset). Corrections to adiabaticity are of different nature: higher derivative terms in the GHD equations (62) are expected and a second order contribution ∼ ∂ 2 t would lead to ∼ T −1 max corrections. To further reduce the number of points, we tossed away those coordinates at which filling is basically zero during the whole evolution. We consider three sets of data (N λ , Ns) = {(αi100, αi15} 3 i=1 with α = {1, 6/5, 7/5} and linearly extrapolate in 1/α. Left: Monte Carlo data (markers) against extrapolated GHD data. Inset: GHD data at fixed interactions as a function of the extrapolation parameter α. Right: sρs is plotted at κ = 0 − , for comparison we show ρ(λ)| κ=0 + (black line) and the points used for the best discretization (purple markers).
Besides, finite-time protocols affect the bound state recombination happening at κ = 0 − . Also in this case, one can envisage ∼ T −1 max corrections in view of the forthcoming argument. Following the quantum case discussed in Ref. [62], immediately after crossing κ = 0 − , bound state recombination is allowed as long as the typical size of the bound state ∝ |κ| −1 exceeds the typical correlation length ζ corr . In dimensionless units, this sets a recombination time t BS ∝ T max ζ −1 corr . Physically, only particles that remained close by during this time window are allowed to bind: let us consider two particles of rapidities λ and λ : On a timescale t BS they drift apart by a distance t BS (2λ − 2λ ) (we neglect the interaction on this time scale and approximate the effective velocity with the bare velocity 2λ). Imposing the drift to be smaller than the bound state size at t BS , i.e. ζ corr , we obtained a coarse-grained resolution in rapidity space ∆λ ∼ ζ 2 corr /T max . Thus, the Dirac deltas in rapidity space appearing in the maximum entropy ansatz will be broadened on a scale ∼ ∆λ, inducing overall ∝ T −1 max corrections. After having studied the approach to adiabaticity, we consider the protocol for different initial states focusing on g 2 ( Fig. 2 (b)) and on the density-density correlation function (65) (Fig. 2 (c)), where we find excellent agreement. As expected, the gas is much more sensitive to attractive rather than repulsive interactions, as depicted in Fig. 3. There, we initialize the system at the non-interacting point and alternatively drive it within the attractive or repulsive phase. By retaining the same initial state, we explore the effects of the interactions. In particular, it is worthwhile to contrast the density correlation functions in the attractive phase with the repulsive phase ( Fig. 3 (b) and (c)). By increasing κ to negative values, the particles feel stronger attraction and convert part of their kinetic energy into interactions. Hence, a strong signal appears at small rays (i.e. small velocities). On the contrary, repulsive interactions accelerate the particles to larger velocities and reduce the peak of the correlation function. Finally, we address the original proposed protocol: in Fig. 4 we initialize the system in a thermal ensemble within the repulsive phase and adiabatically drive it to attractive interactions. Ideally, thermal states are simply a different initial state which can be captured by our method, but in practice the discretization of the GHD equations appears more challenging. The reason is in the shape of ρ(λ)| κ=0 + , which features polynomially decaying tails at large rapitidities ∼ λ −2 , while it is very peaked at small rapitidies. As a consequence, a very large cutoff in the rapidity space must be used, while in the attractive phase the cutoff along the s direction greatly depends on λ. These features, in addition to the need of a fine discretization in rapidity space to correctly capture the integration kernels and the Euleran shift of the GHD equation, worsen the convergence. We experienced that a λ−dependent discretization of the s space improves the convergence of the integral equations, but negatively affects the interpolation used in solving the GHD equation. Hence, we compromise with an independent, but inhomogeneous discretization of the λ and the s space: a judicious discretization choice is crucial to boost the convergence (see caption of Fig. 4). Overall, a much denser discretization in the λ space compared with the string space is needed for correctly describing the derivatives and integration kernels. In Fig. 4 we obtained a good agreement by considering different discretizations and then extrapolating (see caption for more details), while in Figs. 2 and 3 convergence was obtained without the need of any extrapolation and by employing a flat discretization in the λ and s space (roughly ∼ 800 points have been used in the discretization).

V. CONCLUSIONS AND DISCUSSION
In this work, we constructed the integrable hydrodynamics of the one-dimensional attractive Non Linear Schroedinger equation. We then applied these findings to adiabatic interaction changes from the repulsive to the attractive phase, observing soliton production and engineering a strongly excited nonequilibrium phase of matter. The integrability of the NLS stabilizes the attractive phase out of equilibrium, which would be highly unstable in the presence of thermalization. We constructed the Generalized Hydrodynamics of the classical model by considering the proper semiclassical limit of the quantum Bose gas: the excellent agreement with ab-initio microscopic simulations confirms the correctness of the procedure, but this strategy leaves open some interesting questions.
The first one concerns the absence of radiative modes, as one could have naively expected from the inverse scattering analysis. Let us stress that in statistical ensembles in the thermodynamic limit the distinction between solitons and radiations is blurred since one can accommodate for an arbitrary number (divergent in the thermodynamic limit) of zeroes in the imaginary plane of the scattering data (30). In this perspective, one could interpret radiation as a condensation of light solitons (small binding energy) on the real axis of the spectral parameter. Within the (λ, s) phase-space, this means that modes at s → 0 should be macroscopically occupied, which is not the case within our protocol. In fact, when κ = 0 is crossed over in an adiabatic manner, solitons of arbitrary size s are created with equal probability and s = 0 does not stand out as a special point. It is natural to wonder if radiative modes can be excited by different protocols.
A second question concerns the classical interpretation of the Planck constant h. Indeed, in contrast with the repulsive phase, we showed that the Planck constant does not completely disappear after having taken the semiclassical limit and plays an important role as a regulator in the entropy of the soliton gas. Interestingly, the h → 0 limit can be explicitly taken on the TBA equations obtained after entropy maximization (58), but not for the entropy itself. Indeed, by replacing the non-singular parametrization (59) in the semiclassical Yang-Yang entropy (51), at most ∼ log s singularities (and thus are integrable) appear. As a consequence, the ∼ log h term is not counterbalanced by a divergence in δ(h). Since it does not seem possible to explicitly remove the Planck constant from the semiclassical Yang-Yang entropy, the same term should be recovered from a pure classical construction of the thermodynamics. Retrospectively, we can give a phenomenological interpretation of the Planck constant as a infrared regularization of the classical theory. Indeed, NLS solitons have a width ∼ (s|κ|) −1 : when addressing the thermodynamics of a large, but finite system of length L, large solitons should be removed from the spectrum giving a cutoff s|κ| L −1 . In our results, this role is taken by the cutoff δ(h) ∝ h appearing in Eq. (51). However, notice that the validity of this crude argument is harmed by the need of taking the non-interacting limit and furthermore it does not explain the appearance of the ∼ log h in the entropy. A complete understanding of these points passes through a complete classical analysis of the attractive phase. We leave this interesting question open for the future. Lastly, it would be interesting to extend our analysis to the sine-Gordon model (SG) [27,[111][112][113]. This relativistic field theory is integrable both at the quantum and classical level and its spectrum is understood in terms of topological excitations (kinks) and bound states of them (breathers). The interest is twofold: first, by changing the interaction one forms or destroys kink's bound states, in strict analogy with the NLS case. Secondly, the thermodynamics of the classical sine-Gordon, which in contrast to the NLS is stable also at equilibrium, has been thoroughly addressed in the literature also by means of semiclassical analysis [92,97,114]. On the other hand, the SG model and the NLS are closely connected, since the second can be obtained as the non-relativistic limit of the first [115][116][117]. However, to the best of our knowledge, an analogue ∼ log h regulator does not appear in the SG literature. It would be interesting to further investigate this point.

Appendix A: The microscopic numerical simulations
The microscopic simulations are performed by discretizing the NLS φ(x) → φ j on N lattice sites and lattice space a, thus the system's length is L = aN . The limit of small lattice spacing is then numerically taken. In this respect, one discretize the NLS Hamiltonian as which results in the equation of motion Periodic boundary conditions are assumed. The evolution of the observables of interest is performed in two steps 1. We randomly sample the initial condition φ j (t = 0) from a known probability distribution. We consider two cases which are sampled in different ways: (a) For initial values κ > 0 we consider thermal initial states of inverse temperature β and chemical potential µ.
Therefore, the target probability is P Above, ρ(k) sets the initial root density in the limit κ → 0 + and can be set at will.
2. Each random initial field configuration φ j (t = 0) is then evolved according to the deterministic equation of motion (A2). In order to achieve stability, we trotterize the evolution on the time interval ∆t in two steps. In the first step, we diagonally evolve in the real space according to φ j (t + ∆t/2) = e −i∆tκ(t)|φj (t)| 2 φ j (t) .
This strategy explicitly enforces the particle number conservation. For a given lattice spacing a, we chose ∆t by checking energy conservation of an initial random configuration in the case of a constant interaction κ. A posteriori, the convergence of the simulation is checked by considering different discretizations in space and time.