# Exact hydrodynamic description of symmetry-resolved Rényi entropies after a
quantum quench

Stefano Scopa1,† and Dávid X. Horváth1,∗ 1 SISSA and INFN, via Bonomea 265,
34136 Trieste, Italy  email: $\dagger$<EMAIL_ADDRESS>$*$<EMAIL_ADDRESS>
(August 30, 2024)

###### Abstract

We investigate the non-equilibrium dynamics of the symmetry-resolved Rényi
entropies in a one-dimensional gas of non-interacting spinless fermions by
means of quantum generalised hydrodynamics, which recently allowed to obtain
very accurate results for the total entanglement in inhomogeneous quench
settings. Although our discussion is valid for any quench setting accessible
with quantum generalised hydrodynamics, we focus on the case of a quantum gas
initially prepared in a bipartite fashion and subsequently let evolve
unitarily with a hopping Hamiltonian. For this system, we characterise the
symmetry-resolved Rényi entropies as function of time $t$ and of the
entangling position $x$ along the inhomogeneous profile. We observe an
asymptotic logarithmic growth of the charged moments at half system and an
asymptotic restoration of equipartition of entropy among symmetry sectors with
deviations which are proportional to the square of the inverse of the total
entropy.

###### Contents

  1. 1 Introduction
  2. 2 The model, the quench and the hydrodynamic descriptions
    1. 2.1 Quantum model and quench protocol
    2. 2.2 Phase-space hydrodynamics
    3. 2.3 Quantum fluctuating hydrodynamics
  3. 3 Total Rényi entropies and charged moments
  4. 4 Symmetry-resolved Rényi entropies
    1. 4.1 Fourier transform of the charged moments
    2. 4.2 Symmetry-resolved Rényi entropies
  5. 5 Summary and conclusions
  6. A Some details on the numerical implementation

##  1 Introduction

Since the birth of quantum mechanics, the concept of entanglement has been at
the core of any quantum theory. Its profound and sometimes subtle links to
various aspects of physics, ranging from the connection to thermal entropy [1,
2] to the applications in the early universe e.g. [3, 4, 5], have been
stimulating an enormous scientific activity in the last years. Nowadays,
entanglement measures have become a commonly recognised (and very efficient)
tool for the investigation and the understanding of quantum correlations. This
is particularly true in low-dimensional quantum systems, which are notable for
hosting strong quantum correlations, see e.g. [6, 7, 8, 9] for recent reviews
and e.g. [10, 11, 12, 13, 14] for some experimental tests. Alongside a still
fascinating research on entanglement in exotic and/or out-of-equilibrium
contexts, it has been initiated to formulate refined tools to go beyond the
conventional entanglement measures and, in this way, obtain more information
on such quantum correlations. An example is the so-called entanglement
Hamiltonian e.g. [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26] (and more
recently the negativity Hamiltonian [27]), which encodes in a single object
the full description on the entanglement spectrum and on its topological
properties, or the understanding of the structure of entanglement with respect
to an internal symmetry of the model under analysis [14], which is the main
character of this work. Despite the enormous success that the idea of the
symmetry resolution of entanglement is experiencing, it was first applied to a
concrete physical system only recently in Ref. [28] and put forward in a more
general context even later in Ref. [29]. Typically, one considers models
having $U(1)$ internal symmetry associated with the conservation of the
particle number $\braket{\hat{N}}$, but the case of non-abelian symmetries has
been also investigated, see Ref. [30]. Here, we focus on the usual case of an
abelian internal symmetry by considering a pure quantum state $|\Psi\rangle$
such that

$[\hat{\rho},\hat{N}]=0\,,\;\;\hat{\rho}=|\Psi\rangle\langle\Psi|\,.$ (1)

Since the particle number operator is made out of the sum of local densities,
i.e., $\hat{N}=\sum_{j\in\mathbb{Z}}\hat{n}_{j}$, by taking any spatial bi-
partition $A\cup\bar{A}\equiv[-\infty,\ell]\cup[\ell+1,\infty]$ of the system
with a cut at a certain position $\ell\in\mathbb{Z}$, one finds that

$\hat{N}=\hat{N}_{A}\otimes\mathds{1}_{\bar{A}}+\mathds{1}_{A}\otimes\hat{N}_{\bar{A}},$
(2)

where $\hat{N}_{A}=\sum_{j\leqslant\ell}\hat{n}_{j}$ and similarly for
$\hat{N}_{\bar{A}}$. It is then easy to show [30] that the reduced density
matrix $\hat{\rho}_{A}={\rm tr}_{\bar{A}}(\hat{\rho})$, still commutes with
$\hat{N}_{A}$, that is,

$[\hat{\rho}_{A},\hat{N}_{A}]=0\,.$ (3)

Moreover, it is evident that since $\hat{N}$ is a global conserved quantity
$[\hat{N},\hat{H}]=0$, Eq. (3) remains valid during the course of time
evolution as well, i.e.,

$[\hat{\rho}_{A}(t),\hat{N}_{A}]=0\,.$ (4)

The commutation relations (3) and (4) imply a block-diagonal structure of
$\hat{\rho}_{A}$ in terms of the eigenvalues $N$ of $\hat{N}_{A}$ as

$\hat{\rho}_{A}=\bigoplus_{N}\hat{\Pi}_{N}\
\hat{\rho}_{A}=\bigoplus_{N}\left[p(N)\hat{\rho}_{A}(N)\right]$ (5)

where $p(N)={\rm tr}(\hat{\Pi}_{N}\hat{\rho}_{A})$ is the probability of
having $N$ particles in the subsystem $A$. The symmetry-resolved Rényi entropy
is then defined as usual

$S_{n,N}=\frac{1}{1-n}\log\tr\left(\hat{\rho}_{A}(N)^{n}\right)\,,$ (6)

via the symmetry-resolved reduced density matrix $\hat{\rho}_{A}(N)$. The
calculation of $\hat{\rho}_{A}(N)$ is typically very challenging, due to the
non-local action of the projector $\hat{\Pi}_{N}$ on the subspace with $N$
particles, making the calculation of $S_{n,N}$ almost out-of-reach, if one
tries to work it out directly from its definition. Nevertheless, it was
noticed in Ref. [29] that an equivalent (and very convenient) formulation of
the problem can be done by focusing on the so-called symmetry resolved charged
moments using path-integral formalism or known lattice techniques. These
quantities were already introduced before their connection to symmetry-
resolved entropies were established [31, 32, 33, 34, 35, 36, 37], and in
particular, are defined as

$Z_{n}(\alpha)=\tr\left[\hat{\rho}_{A}^{n}e^{\mathbf{i}\alpha\hat{N}_{A}}\right],$
(7)

implying that their computation is indeed feasible in the path integral
formulation of the replicated model at the price of introducing an additional
flux on one of the Riemann sheets. Equally importantly, one finds that

${\cal Z}_{n}(N)=\int_{-\pi}^{\pi}\frac{\mathrm{d}\alpha}{2\pi}\
e^{-\mathbf{i}N\alpha}Z_{n}(\alpha)\equiv\tr\left[\hat{\Pi}_{N}\hat{\rho}_{A}^{n}\right]\,,$
(8)

for the Fourier transform of the charged moments, aka the symmetry-resolved
partition function, and hence the symmetry-resolved Rényi entropy (6) can be
expressed as

$S_{n,N}=\frac{1}{1-n}\log\left[\frac{{\cal Z}_{n}(N)}{({\cal
Z}_{1}(N))^{n}}\right].$ (9)

Immediately after the introduction of these concepts in Refs. [28, 29], the
symmetry resolution of entanglement has been investigated in a large variety
of systems, including e.g. 1+1 conformal field theories [28, 29, 38, 39, 40,
41, 42, 43, 44, 45, 30, 46, 47], free [48, 49] and interacting integrable
quantum field theories [50, 51, 52] and also holographic settings [54, 53,
55]. These studies are generically carried out in lattice models [28, 38, 39,
56, 57, 58, 59, 60, 61, 62, 40, 63, 64, 66, 67], but other systems exhibiting
more exotic types of dynamics have been also considered [69, 70, 71, 72, 73,
74, 75]. Moreover, the interest for symmetry-resolved entanglement measures on
the theoretical side is accompanied and consolidated by their experimental
feasibility, see e.g. Ref. [76, 77].

In addition, the investigation of symmetry-resolution in out-of-equilibrium
situations has also been initiated, although so far carried out only for very
few cases, see [39, 62, 76, 78, 79, 80, 81]. The reason for this lack in
literature is quite evident as the study of out-of-equilibrium entanglement is
known to be often challenging and its possible symmetry-resolved counterpart
is seen to be even harder to analyse. However, besides being interesting in
its own right, probing the non-equilibrium properties of the symmetry-resolved
entanglement could significantly help us thoroughly understand these
quantities and the eventual physical systems they are associated with. With
this scope, in this manuscript, we wish to connect the idea of symmetry
resolution with the framework of quantum generalised hydrodynamics [82, 83,
84, 85, 86, 87, 88, 89], which recently enabled to obtain very accurate
predictions for the non-equilibrium dynamics of the total entropy in non-
homogeneous quench settings.
More precisely, the aim of this work is twofold: on the one hand, we detail
the exact asymptotic solution for a prototypical setting of non-homogeneous
and out-of-equilibrium system, that is, a bi-partitioning quench protocol made
with a one-dimensional gas of free spinless fermions, see e.g. Ref. [90, 85,
86, 87, 89] and Sec. 2.1 below. To our best knowledge there are no similar
studies about the symmetry-resolved entanglement of such inhomogeneous quench
protocols. On the other hand, and most importantly, our discussion on symmetry
resolution has a general validity and applies to any inhomogeneous quench
protocol which is accessible by quantum generalised hydrodynamics.

Outline — In Sec. 2.1, we briefly introduce the model and the quench protocol
considered in this work. Similarly, Sec. 2.2 is a short introduction to phase-
space hydrodynamics, made by following the discussions in recent works (e.g.
[90, 84, 85, 86, 87, 89]) and that of previous studies on the quasi-classical
evolution of the conserved charges (e.g. [91, 92, 93, 94, 95, 96, 97, 98, 99,
100]). After preparing this ground, in Sec. 2.3 we re-quantise the
hydrodynamic solution at low energy in terms of a Luttinger liquid by
following the recent literature on quantum generalised hydrodynamics, see e.g.
[88, 85]. In Sec. 3 we specialise to the calculation of symmetry resolved
quantities and, in particular, we detail the strategy of calculation of the
charged moments in the quantum generalised hydrodynamic framework. Finally,
Sec. 4 contains the analysis of the symmetry-resolved partition function (8)
and of the symmetry-resolved Rényi entropy (9) while Sec. 5 summarise our work
and our results. We provide a numerical check of our major results based on
exact lattice calculations, whose implementation details are reported in A.

##  2 The model, the quench and the hydrodynamic descriptions

###  2.1 Quantum model and quench protocol

In this work, we consider a one-dimensional gas of non-interacting spinless
fermions on a semi-infinite lattice $j\in[-L,\infty]$ with nearest-neighbour
hopping, whose Hamiltonian reads

$\hat{H}=-\frac{1}{2}\sum_{j=-L}^{\infty}\left(\hat{c}^{\dagger}_{j}\hat{c}_{j+1}+\hat{c}^{\dagger}_{j+1}\hat{c}_{j}\right),$
(10)

where $\hat{c}^{\dagger}_{j}$, $\hat{c}_{j}$ are standard fermionic lattice
operators satisfying canonical anti-commutation relations
$\\{\hat{c}_{i},\hat{c}_{j}^{\dagger}\\}=\delta_{ij}$. The system is initially
prepared in a state $\left|\Omega\right>$ obtained as ground state of the
trapped Hamiltonian

$\hat{H}_{t<0}=-\frac{1}{2}\sum_{j=-L}^{\infty}\left(\hat{c}^{\dagger}_{j}\hat{c}_{j+1}+\hat{c}^{\dagger}_{j+1}\hat{c}_{j}+(V_{j}-\mu)\hat{c}^{\dagger}_{j}\hat{c}_{j}\right)\,,$
(11)

where $\mu$ is a chemical potential and $V_{j}$ is a confining potential
specified as

$V_{j}\,=\,\left\\{\begin{array}[]{rcl}0&\text{if \quad$-L\leqslant
j\leqslant-1$};\\\ +\infty&\text{otherwise}.\end{array}\right.$ (12)

This setup can be equivalently interpreted as a quench protocol where the trap
in Eq. (11) is suddenly released at $t=0$ and the model is subsequently
evolved with Hamiltonian (10). Notice that if we set $\mu=0$ in Eq. (11), the
ground state contains exactly $L/2$ particles (we assume $L$ is even). This
can be easily seen by diagonalising the Hamiltonian (11) with the potential
(12) yielding

$\hat{H}_{t<0}=-\sum_{k}\cos(k)\;\hat{\eta}_{k}^{\dagger}\hat{\eta}_{k},$ (13)

with Fourier modes of momentum $k=\pi q/(L+1)$, $q=1,\dots,L$, given as

$\hat{\eta}_{k}^{\dagger}=\sqrt{\frac{2}{L+1}}\sum_{j=-L}^{-1}\sin\left(kj\right)\hat{c}_{j}^{\dagger},\qquad\\{\hat{\eta}_{k}^{\dagger},\hat{\eta}_{k^{\prime}}\\}=\delta_{kk^{\prime}}.$
(14)

Indeed, the single-particle energy $-\cos(k)$ is negative for $q=1,\dots,L/2$
and the ground state is obtained by acting on the fermion vacuum
$\left|0\right>$ with such single-particle creation operators

$\ket{\Omega}\equiv\left|\\{\rho=1/2\\}\right>=\hat{\eta}_{1}^{\dagger}\hat{\eta}_{2}^{\dagger}\dots\hat{\eta}_{\nicefrac{{L}}{{2}}}^{\dagger}\left|0\right>.$
(15)

Here, we introduced the notation $\left|\\{\rho=1/2\\}\right>$ to emphasise
that the ground state at $\mu=0$ is half-filled, that is, on average, every
second site is occupied by a fermion. Together with the state in Eq. (15), we
consider also the case of a fully-filled ground state, obtained by setting
$\mu<-1$ in Eq. (11) as

$\ket{\Omega}\equiv\left|\\{\rho=1\\}\right>=\hat{\eta}_{1}^{\dagger}\hat{\eta}_{2}^{\dagger}\dots\hat{\eta}_{L}^{\dagger}\left|0\right>.$
(16)

Both the variants of the initial states allow for an intuitive spin chain
interpretation since the model in Eq. (11) is known to map to a spin-$1/2$ XX-
chain

$\hat{H}=-\frac{1}{4}\sum_{j=-L}^{\infty}\left(\hat{\sigma}^{x}_{j}\hat{\sigma}^{x}_{j+1}+\hat{\sigma}^{y}_{j}\hat{\sigma}^{y}_{j+1}\right)\,+\,\frac{1}{2}\sum_{j=-L}^{\infty}(V_{j}-\mu)\hat{\sigma}^{z}_{j}\,+\,{\rm
constant}$ (17)

through the Jordan-Wigner transformation [101]

$\hat{c}_{j}^{\dagger}=\exp\left(\mathbf{i}\pi\sum_{i<j}\hat{\sigma}^{+}_{i}\hat{\sigma}^{-}_{i}\right)\hat{\sigma}^{+}_{j},$
(18)

where
$\hat{\sigma}^{\pm}_{j}=(\hat{\sigma}^{x}_{j}\pm\mathbf{i}\hat{\sigma}^{y}_{j})/2$
and $\hat{\sigma}_{j}^{a}$, $a=x,y,z$, are spin-$1/2$ operators acting at site
$j$. In particular, the specific choice
$\ket{\Omega}\equiv\left|\\{\rho=1\\}\right>$ corresponds to the standard
domain wall where the left and the right parts of the system display opposite
value of magnetisation equal to $+\frac{1}{2}$ and $-\frac{1}{2}$
respectively, while $\ket{\Omega}\equiv\left|\\{\rho=1/2\\}\right>$ is
regarded as a zero-magnetisation ground state.

Hence, the quench dynamics takes place by switching off the initial potential
$V_{j}$ at time $t=0$. Consequently, the gas expands freely to the right side
of the chain and develops a non-trivial profile of density around the junction
at $j=0$, which enlarges with time. More precisely, in the hydrodynamic limit
$L\to\infty$, $t\rightarrow\infty$, $j\rightarrow\infty$ with $t\leqslant L$
and $j/t$ fixed (see Subsec. 2.2), a non-trivial density profile forms in the
region $-t\leqslant j\leqslant t$ according to [91, 92]

$\rho(j,t)\,=\begin{cases}\frac{1}{2\pi}{\rm arccos}\frac{j}{t}&\text{ if
}\left|\Omega\right>=\left|\\{\rho=1/2\\}\right>\\\ \frac{1}{\pi}{\rm
arccos}\frac{j}{t}&\text{ if
}\left|\Omega\right>=\left|\\{\rho=1\\}\right>\par\end{cases}$ (19)

at times $0<t\leqslant L$.

As a result of the expansion of the gas, quantum correlations spread from the
junction $j=0$ towards outer regions, leading to a growth of the entanglement
with a non-homogeneous behaviour along the chain. In Refs. [98, 102, 85]
(resp. Refs. [90, 87, 89]) such growth for the $n$-Rényi entropy, defined as

$S_{n}(j,t)=\frac{1}{1-\alpha}\log\tr\ (\hat{\rho}_{A}(t))^{n},$ (20)

and its limit $n\to 1$ where it reduces to the von Neumann entanglement
entropy

$S_{1}(j,t)=-\tr\hat{\rho}_{A}(t)\log\hat{\rho}_{A}(t),$ (21)

has been thoroughly studied for the reduced density matrix of the subsystem
$A=[j,+\infty]$ for the half-filled (resp. fully-filled) case. In this work,
we compute and study the symmetry-resolved counterparts of the above
quantities, that are

$S_{n,N}(j,t)=\frac{1}{1-\alpha}\log\tr\ (\hat{\rho}_{A}(t,N))^{n}$ (22)

for the symmetry-resolved $n$-Rényi entropy and

$S_{1,N}(j,t)=-\tr\hat{\rho}_{A}(t,N)\log\hat{\rho}_{A}(t,N)$ (23)

for the von Neumann entanglement. Here, $\hat{\rho}_{A}(t,N)$ is defined via
Eq. (5) by taking the hydrodynamic limit of the expanding quantum gas in Eq.
(10), as further specified below.

###  2.2 Phase-space hydrodynamics

As a first step towards the calculation of the symmetry-resolved entanglement
during the quench dynamics, we move to a hydrodynamic description of the
problem. In this way, we eventually obtain a quasi-classical description of
the time evolution from which asymptotically exact result for the conserved
charges readily follows, see e.g. Ref. [91, 92, 93, 94, 95, 96]. However, this
machinery is not sufficient for the description of quantum effects such as
entanglement at zero temperature. In fact, the latter are captured only after
the re-introduction of large-scale quantum fluctuations on top of the phase-
space hydrodynamics, as detailed in the next subsection.

The quasi-classical treatment consists of taking an appropriate hydrodynamic
limit i.e., considering the model at large space-time scales by sending
$L,j,t\to\infty$ keeping fixed the ratio $j/t$. In such a limit, the model can
be described in terms of fluid cells $\Delta x$ labeled by $x$ each containing
a large number of particles $\Delta x=[j,j+M]$ with $M\gg 1$. It follows that
the Hamiltonian (10) can be rewritten as [103, 85]

$\hat{H}=-\frac{1}{2}\int_{-L}^{\infty}\mathrm{d}x\int_{0}^{\Delta
x}\frac{\mathrm{d}y}{\Delta x}\
\left(\hat{c}^{\dagger}_{x+y}\hat{c}_{x+y+1}+\text{h.c.}\right)$ (24)

and can be diagonalised in Fourier basis within each fluid cell as

$\hat{H}=-\int_{-L}^{\infty}\mathrm{d}x\
\int_{-\pi}^{\pi}\frac{\mathrm{d}k}{2\pi}\cos k\ \hat{\eta}^{\dagger}_{k,x}\
\hat{\eta}_{k,x}$ (25)

where

$\hat{c}^{\dagger}_{x+y}=\int_{-\pi}^{\pi}\frac{\mathrm{d}k}{2\pi}\
e^{\mathbf{i}ky}\
\hat{\eta}^{\dagger}_{k,x},\qquad\hat{\eta}_{k,x}=(\hat{\eta}_{k,x}^{\dagger})^{\dagger}.$
(26)

The two variants of the initial state that we investigate fill the left part
of the system with modes $-\pi\rho_{0}\leqslant k\leqslant\pi\rho_{0}$
($0\leqslant\rho_{0}\leqslant 1$), leaving empty the right side. The specific
choice $\rho_{0}=1$ (resp., $\rho_{0}=1/2$) associated with
$\left|\\{\rho=1\\}\right>$ ($\left|\\{\rho=1/2\\}\right>$) corresponds to
l.h.s. of the system being entirely filled (half filled).
Crucially, both initial states are asymptotically described by a Wigner
function which is, in our cases, equivalent to the local occupation function
of the free particles and reads as

$W_{0}(x,k)=\begin{cases}1,\quad\text{if $x\leqslant 0$ and
$-\pi\rho_{0}\leqslant k\leqslant\pi\rho_{0}$};\\\\[4.0pt]
0,\quad\text{otherwise.}\end{cases}$ (27)

Its evolution in phase-space is dictated by the Euler equation [82, 85]

$\partial_{t}\ W_{t}(x,k)+\sin k\ \partial_{x}\ W_{t}(x,k)=0$ (28)

with the simple solution

$W_{t}(x,k)=W_{0}(x-t\sin k,k),$ (29)

see also Ref. [104, 105] for details on the derivation. An important
consequence of the above solution is that the dynamics at zero-temperature is
characterised by the zero-entropy condition $W_{t}=\\{0,1\\}$ of the local
macro-states at each time. It follows that one can focus only on the
hydrodynamic evolution of local Fermi points $k^{\pm}_{F}(x,t)$, satisfying
the so-called zero-entropy GHD equation [106]

$\left(\partial_{t}+\sin k^{\pm}_{F}\ \partial_{x}\right)k^{\pm}_{F}=0.$ (30)

The solution of Eq. (30) allows us to built the Fermi contour $\Gamma_{t}$ as

$\Gamma_{t}=\left\\{(x,k)\ :\ k_{F}^{-}(x,t)\leqslant k\leqslant
k_{F}^{+}(x,t)\right\\}$ (31)

and to re-construct the time-evolved Wigner function simply as

$W_{t}(x,k)=\begin{cases}1,\quad\text{if $k_{F}^{-}(x,t)\leqslant k\leqslant
k_{F}^{+}(x,t)$};\\\\[4.0pt] 0,\quad\text{otherwise.}\end{cases}$ (32)

Notice that the quench problem under analysis is characterised by a connected
Fermi sea at each time [100, 90, 102, 85, 86], i.e., it displays only two
local Fermi points $k_{F}^{-}(x,t)\leqslant k_{F}^{+}(x,t)$ resulting in the
Fermi contour of Eq. (31). The time-evolved Fermi contour $\Gamma_{t}$ is a
key quantity for our study, not only because it fully encodes the quasi-
classical dynamics of the model, but also because it constitutes the
background over which quantum fluctuations are re-introduced, as shortly
presented.

As already mentioned, once the Fermi contour is determined, one has immediate
access to the exact asymptotic profile of conserved charges densities $q$ and
currents $j_{q}$ as

$q(x,t)=\int_{k_{F}^{-}(x,t)}^{k_{F}^{+}(x,t)}\frac{\mathrm{d}k}{2\pi}\
h_{q}(k);$ (33a)
$j_{q}(x,t)=\int_{k_{F}^{-}(x,t)}^{k_{F}^{+}(x,t)}\frac{\mathrm{d}k}{2\pi}\
\sin k\ h_{q}(k),$ (33b)

where $h_{q}(k)$ is the single-particle eigenvalue associated to the charge
$q$ (for instance: $h_{1}\equiv 1$ for the particle density, $h_{2}\equiv-\cos
k$ for the energy density and so on).

For sake of concreteness, in the cases $\rho_{0}=\\{1,1/2\\}$, one finds the
solutions for $0\leqslant x/t\leqslant 1$

$k_{F}^{\pm}(x,t)=\begin{cases}\left\\{\pi-\arcsin(x/t);\
\arcsin(x/t)\right\\};\quad\rho_{0}=1\\\\[4.0pt] \left\\{\pi/2;\
\arcsin(x/t)\right\\};\qquad\rho_{0}=1/2\end{cases}$ (34)

for the Fermi points, and

$\rho(x,t)=\begin{cases}(\rho_{0}/\pi)\arccos(x/t),\qquad\text{if
$|x|/t\leqslant 1$};\\\\[4.0pt] \rho_{0},\qquad\text{if $x/t<-1$};\\\\[4.0pt]
0,\qquad\text{otherwise}\end{cases}$ (35)

for the density profile. Given a bi-partition of the system as

$A\cup\bar{A}\qquad\text{with $A=[-L,x]$,}$ (36)

we compute, for future convenience, the number of particles in $A$ as function
of the cutting point $x$ and of time $t$

$N_{A}(x,t)=\int_{-L}^{x}\mathrm{d}y\ \rho(y,t)\equiv\rho_{0}\ {\cal N}(x,t)$
(37)

with scaling function

${\cal
N}(x,t)=\begin{cases}L-t/\pi\sqrt{1-x^{2}/t^{2}}+(x/\pi)\arccos(x/t),\\\
\text{if $|x|/t\leqslant 1$};\\\\[8.0pt] (L+x),\qquad\text{if
$x/t<-1$};\\\\[4.0pt] L,\qquad\text{otherwise}.\end{cases}$ (38)

At $x=0$, we find simply

${\cal N}(0,t)=L-t/\pi.$ (39)

(a) (b)

Figure 1: (a) Particle density $\rho(x,t)$ in Eq. (35) and (b) rescaled
particle number ${\cal N}(x,t)$ of the subsystem $A=[-L,x]$ in Eq. (38) as
function of the rescaled position at different instants of time. The symbols
are numerical data obtained for a lattice of $300$ sites while the full line
is the hydrodynamic prediction.

In Fig. 1, the semi-classical hydrodynamic results in Eqs. (35) and (37) for
the particle density $\rho(x,t)$ and number $N_{A}(x,t)$ are compared to exact
numerical data obtained for the lattice model in Eq. (10), see A for details
on the numerical implementation.

###  2.3 Quantum fluctuating hydrodynamics

As we above mentioned, for the calculation of the entanglement entropy it is
essential to restore the quantum fluctuations on top of the semi-classical
hydrodynamic solution that we previously determined[82, 83, 84, 85, 88]. A
useful and successful way to do so is to incorporate only those quantum
processes that are relevant at low-energy, which can be described in terms of
a Luttinger liquid. Therefore, we introduce a large-scale density fluctuation
field as

$\delta\hat{\rho}=\frac{1}{2\pi}\partial_{x}\hat{\varphi}$ (40)

and we expand the time-dependent fermionic operators in terms of the low-
energy fields of the underlying Luttinger liquid

$\begin{matrix}&\hat{c}^{\dagger}_{x}(t)\propto\exp\left[\frac{\mathbf{i}}{2}\left(\hat{\varphi}_{+}-\hat{\varphi}_{-}\right)\right]+\dots\\\\[4.0pt]
&\hat{c}_{x}(t)\propto\exp\left[\frac{\mathbf{i}}{2}\left(\hat{\varphi}_{-}-\hat{\varphi}_{+}\right)\right]+\dots\end{matrix}$
(41)

retaining only the leading order terms, i.e., those with smallest scaling
dimensions. The above identification is valid up to a non-universal amplitude
and to a semi-classical phase that are unimportant for our scopes. It is
customary and useful to denote the chiral components of $\hat{\varphi}$ as
$\hat{\varphi}=\hat{\varphi}_{+}+\hat{\varphi}_{-}$. The dynamics of these
quantum fluctuations is then established by the following effective
Hamiltonian [90, 107, 108, 82, 109, 110, 83, 85, 86, 89]

$\hat{H}[\Gamma_{t}]=\int_{\Gamma_{t}}\frac{\mathrm{d}\theta}{2\pi}{\cal
J}(\theta)\ \sin(k(\theta))\ (\partial_{\theta}\hat{\varphi}_{a})^{2}$ (42)

together with the parametrisation of the Fermi contour

$\Gamma_{t}=\left\\{(x(\theta),k(\theta))\ :\
k(\theta)=k_{F}(x(\theta),t)\right\\},$ (43)

in terms of $\theta\in 2\pi\mathbb{R}/\mathbb{Z}$, which is a coordinate along
the contour $\Gamma_{t}$, $a\equiv a(\theta)=\pm$ iff $k(\theta)\gtrless 0$
and ${\cal J}(\theta)$ is simply the Jacobian of the coordinate change. In our
cases, the large-scale quantum fluctuations are obtained from the ground state
of the Luttinger liquid Hamiltonian (42) at time $t=0$. Over the course of
time evolution, these fluctuations are then simply transported along the Fermi
contour, which gets modified according to the semi-classical hydrodynamics of
Sec. 2.2.
Importantly, in our quench setting, any bi-partition of the system
$A\cup\bar{A}$ with cut in real space at position $x$ (i.e., $A=[-L,x]$) can
be identified with two boundary points $\theta_{1,2}$ along the curve
$\Gamma_{t}$ such that $k(x(\theta_{1,2}),t)=k_{F}^{\pm}(x,t)$, see Fig. 2 for
an illustration.

We conclude this section with a remark. Although the semi-classical
hydrodynamics of Sec. 2.2 is found to be the same for $\rho_{0}=\\{1,1/2\\}$
(up to a simple rescaling of the profiles), the same is not true for the
behaviour of quantum fluctuations. In fact, the parametrisation of the Fermi
contour $\Gamma_{t}$ as well as the final result for the entanglement entropy
is strongly dependent on the value of $\rho_{0}$, see the subsequent section
for a brief summary and Refs. [90]-[85] for a comprehensive discussion of the
two cases.

Figure 2: Illustration of the Fermi contour $\Gamma_{t}$ at $t>0$ (left panel)
and at $t=0$ (right panel) for the cases $\rho_{0}=1/2,1$. It is shown that a
bi-partition $A=[-L,x]$ at a time $t>0$ can be encoded by the coordinates
$\theta_{1,2}$ along the Fermi contour, which are then mapped backward in time
to the initial Fermi contour where they can be more easily parametrised, see
Ref. [85] for details.

##  3 Total Rényi entropies and charged moments

The quantum fluctuating hydrodynamic framework enable us to exactly determine
the non-equilibrium dynamics of both the total Rényi entropies (first computed
in Ref. [90, 85]) and of the symmetry-resolved charged moments (cf. Eq. (7))
in a similar fashion, as we now discuss.
In the original formulation, the essence of this computation for $S_{n}$ is in
fact the determination of the one-point function of a specific field, namely
the branch-point twist field $\hat{\cal T}_{n}$, associated with the
permutation symmetry of the $n$ copies of the Luttinger liquid (42) in the
replica approach, see e.g. Refs. [111, 112, 113] and the discussion below.
Similarly, the extension to symmetry resolution requires the replacement of
$\hat{\cal T}_{n}$ with the so-called composite (branch point) twist fields
$\hat{\cal T}_{n,\alpha}$, first introduced in Ref. [114, 115] and recently
used for the calculation of charged moments [29]. This field can be regarded
as the fusion of the standard branch point twist field $\hat{\cal T}_{n}$ with
a $U(1)$ vertex field $\hat{\cal V}_{\alpha}$, that is,

$\hat{\cal T}_{n,\alpha}=\hat{\cal T}_{n}\times\hat{\cal V}_{\alpha}\ .$ (44)

The vertex operator is associated with the internal symmetry of the non-
replicated model and corresponds to the insertion of the flux on one of the
Riemann sheets. Notice that in absence of flux-insertions (i.e., setting
$\alpha=0$), the vertex field $\hat{\cal V}_{0}\equiv\mathds{1}$ and we
recover the usual twist field. With these considerations, we can relate the
charged moments in Eq. (7) to the expectation value of the composite twist
field as [29]

$\begin{split}\log Z_{n,\alpha}(x,t)&\equiv\log\tr\left[\hat{\rho}_{A}^{n}\
e^{\mathbf{i}\alpha\hat{N}_{A}}\right]=\log\left[\varepsilon(x,t)^{2\Delta_{n,\alpha}}\braket{\hat{\cal
T}_{n,\alpha}(x,t)}\right]+\mathbf{i}\alpha N_{A}(x,t)\\\\[4.0pt]
&=\log\left(\varepsilon(x,t)^{2\Delta_{n,\alpha}}\left|\frac{\mathrm{d}\theta}{\mathrm{d}x}\right|_{\theta=\theta_{1}}^{\Delta_{n,\alpha}}\left|\frac{\mathrm{d}\theta}{\mathrm{d}x}\right|_{\theta=\theta_{2}}^{\Delta_{n,\alpha}}\braket{\hat{\tau}^{+}_{n,\alpha}(\theta_{1})\hat{\tau}^{-}_{n,\alpha}(\theta_{2})}\right)+\mathbf{i}\alpha
N_{A}(x,t)\,,\end{split}$ (45)

where $\hat{\tau}_{n,\alpha}^{\pm}$ are the chiral components of the composite
(or standard if $\alpha=0$) branch point twist field $\hat{\cal T}_{n,\alpha}$
living at the boundary points $\theta_{1,2}$ of subsystem $A$ with scaling
dimension

$\Delta_{n,\alpha}=\frac{h_{n}}{2}+\frac{h_{\alpha}}{2n}$ (46)

where

$h_{n}=\frac{c}{12}\left(n-n^{-1}\right),\quad
h_{\alpha}=\frac{\alpha^{2}}{(2\pi)^{2}}$ (47)

are the scaling dimension of $\hat{\cal T}_{n}$ and $\hat{\cal V}_{\alpha}$
respectively, and the central charge $c=1$ for the free Fermi gas. The factor
$\varepsilon(x,t)$ appearing in Eq. (45) is a short-distance regularisation,
which also guarantees that the quantity in the r.h.s of Eq. (45) is
dimensionless. As was already shown in Ref. [90, 85, 86, 88, 89, 87], the
expression of $\varepsilon$ for a connected Fermi sea is

$\varepsilon(x,t)=\frac{C_{n,\alpha}}{\sin\pi\rho(x,t)}\,,$ (48)

where $\rho(x,t)$ is the particle density in Eq. (35) and $C_{n,\alpha}$ is a
known non-universal constant, see Ref. [116, 117] and the discussion below.

Eq. (45) is the building block for the calculation of the total and of the
symmetry-resolved entropies. For concreteness, we report below the explicit
derivation for the saturated case $\rho_{0}=1$. The same logic applies then to
the half-filled case $\rho_{0}=1/2$, with some additional technicalities for
which we address the interested reader to Ref. [85].
For $\rho_{0}=1$, one finds that the coordinate $\theta$ along the Fermi
contour can be simply written as

$\theta\equiv k+\pi$ (49)

and, therefore, one obtains

$\theta_{1}=2\pi-\arcsin\frac{x}{t};\qquad\theta_{2}=\pi+\arcsin\frac{x}{t},$
(50)

for the Fermi points. The Weyl factors in Eq. (45) associated with the change
of coordinates read as

$\left|\frac{\mathrm{d}\theta}{\mathrm{d}x}\right|_{\theta=\theta_{1,2}}=\left(t\sqrt{1-\frac{x^{2}}{t^{2}}}\right)^{-1}$
(51)

and the two-point correlation function is expressed as

$\braket{\hat{\tau}^{+}_{n,\alpha}(\theta_{1})\hat{\tau}^{-}_{n,\alpha}(\theta_{2})}=\left|2\sin\frac{\theta_{1}-\theta_{2}}{2}\right|^{-2\Delta_{n,\alpha}}=\left(2\sqrt{1-\frac{x^{2}}{t^{2}}}\right)^{-2\Delta_{n,\alpha}}.$
(52)

Finally, using Eq. (35), we write the UV cutoff $\varepsilon$ in Eq. (48)
explicitly as

$\varepsilon(x,t)=\frac{C_{n,\alpha}}{\sqrt{1-x^{2}/t^{2}}}\,.$ (53)

Putting all the elements together, one eventually obtains

$\log
Z_{n,\alpha}=-2\Delta_{n,\alpha}\log\left[2t\left|1-\frac{x^{2}}{t^{2}}\right|^{3/2}\right]+\mathbf{i}\alpha
N_{A}(x,t)+\Upsilon_{n,\alpha},$ (54)

(with $N_{A}$ given in (37)) which we rewrite as

$\log
Z_{n,\alpha}=-2\Delta_{n,\alpha}\log\mathcal{L}(x,t)+\mathbf{i}\alpha\rho_{0}\
{\cal N}(x,t)+\Upsilon_{n,\alpha}\,,$ (55)

in terms of the function $\mathcal{L}(x,t)$, introduced for convenience.
Indeed, it is possible to show that the structure in Eq. (55) for the charged
moments holds also for the case $\rho_{0}=1/2$ and that the details of the
specific quench protocol under consideration enters only through the
definition of ${\cal L}(x,t)$. From Eq. (54) and Refs. [90, 85], we find that

${\cal
L}(x,t)=\begin{cases}2t\left|1-\frac{x^{2}}{t^{2}}\right|^{3/2};\quad\text{if
$\rho_{0}=1$};\\\\[10.0pt]
\frac{2L}{\pi}\sqrt{|\frac{x}{t}-t(1-\frac{x^{2}}{t^{2}})|}\times\\\
|\sqrt{1+\sqrt{1-\frac{x^{2}}{t^{2}}}}-\mathrm{sgn}(x)\sqrt{1-\sqrt{1-\frac{x^{2}}{t^{2}}}}||\sin\frac{\pi(x-t)}{2L}|;\\\\[3.0pt]
\text{if $\rho_{0}=1/2$.}\end{cases}$ (56)

The additive constant $\Upsilon_{n,\alpha}$ in Eq. (55) is related to
$C_{n,\alpha}$ in Eq. (53) as

$\Upsilon_{n,\alpha}\equiv 2\Delta_{n,\alpha}\log\frac{C_{n,\alpha}}{2}$ (57)

and it has been analytically determined in Ref. [56] exploiting the Fisher-
Hartwig conjecture

$\Upsilon_{n,\alpha}=\frac{\mathbf{i}n}{2}\int_{-\infty}^{\infty}\mathrm{d}w\
\left(\tanh(\pi w)-\tanh(\pi
nw+\mathbf{i}\alpha/2)\right)\log\frac{\Gamma(\frac{1}{2}+\mathbf{i}w)}{\Gamma(\frac{1}{2}-\mathbf{i}w)}-2\Delta_{n,\alpha}\log(2).$
(58)

It is then customary to rewrite this constant as

$\Upsilon_{n,\alpha}=\Upsilon_{n}+\alpha^{2}\nu_{n}+e_{n,\alpha},$ (59)

with

$\nu_{n}=-\frac{\log(2)}{4\pi^{2}n}+\frac{\mathbf{i}n}{8}\int_{-\infty}^{\infty}\mathrm{d}w\left(\tanh^{3}(\pi
nw)-\tanh(\pi
nw)\right)\log\frac{\Gamma(\frac{1}{2}+\mathbf{i}w)}{\Gamma(\frac{1}{2}-\mathbf{i}w)},$
(60)

and $e_{n,\alpha}={\cal O}(\alpha^{4})$ (cf. Ref. [56]), such that the first
term $\Upsilon_{n}\equiv\Upsilon_{n,0}$ reproduces the non-universal constant
obtained in Ref. [116, 117] in the absence of fluxes $\alpha=0$.

The total Rényi entropies are recovered from Eq. (45) by plugging the correct
prefactor $1/(1-n)$ and by setting the flux $\alpha=0$ [90, 85] i.e.,

$\begin{split}S_{n}(x,t)&=\frac{1}{1-n}\log
Z_{n,\alpha}\Big{|}_{\alpha=0}=\frac{n+1}{12n}\log{\cal
L}(x,t)+\frac{\Upsilon_{n}}{1-n}.\end{split}$ (61)

Notice that the constant $\Upsilon_{n}/(1-n)$ is related to $C_{n,0}$ in (53)
as

$\frac{\Upsilon_{n}}{1-n}=-\frac{n+1}{12n}\log\frac{C_{n,0}}{2},$ (62)

and gives for $n\to 1$

$\lim_{n\to
1}\frac{\Upsilon_{n}}{1-n}=\frac{\widetilde{\Upsilon}+\log(2)/3}{2}\,,$ (63)

where $\widetilde{\Upsilon}\approx 0.49502$ is the Korepin-Jin constant [117],
consistently with the known results for the total entropy [85, 86, 118]. In
Fig. 3, we show the exact numerical results for the total von Neumann
entanglement entropy alongside with the hydrodynamic formula in Eq. (61) for
the cases $\rho_{0}=1/2,1$ respectively. The agreement of the hydrodynamic
prediction with the data is remarkably good.

(a) (b)

Figure 3: Total von Neumann entanglement entropy for (a) $\rho_{0}=1/2$ and
(b) $\rho_{0}=1$. The solid line shows the analytical prediction in Eq. (61)
provided by quantum fluctuating hydrodynamics while symbols show the numerical
data obtained for a lattice of $300$ sites. Although the two settings are
characterised by the same semi-classical description (up to a rescaling), cf.
Fig. 1, the entanglement properties are very different. In both the cases
(a)-(b), the hydrodynamic prediction is very accurate.

##  4 Symmetry-resolved Rényi entropies

We now move towards the calculation of the symmetry-resolved Rényi entropies,
starting from the charged moments that we computed in the previous section.
First, let us write down explicitly the real part of the charged moments in
Eq. (55)

${\rm Re}\log Z_{n,\alpha}(x,t)=-2\Delta_{n,\alpha}\log{\cal
L}(x,t)+\Upsilon_{n,\alpha}$ (64)

which at half system and for large times becomes

${\rm Re}\log Z_{n,\alpha}(0,t)\sim-2(2-\rho_{0})\Delta_{n,\alpha}\log
t+\delta_{n,\alpha}(\rho_{0})$ (65)

with
$\delta_{n,\alpha}(\rho_{0})\equiv\Upsilon_{n,\alpha}-2\Delta_{n,\alpha}\log(2^{\rho_{0}})$,
and it displays a logarithmic growth for both $\rho_{0}=\\{1,1/2\\}$, see Fig.
5. The imaginary part reads instead

${\rm Im}\log Z_{n,\alpha}(x,t)=\alpha\rho_{0}\ {\cal N}(x,t)\,,$ (66)

and at half-system it decreases linearly in time

${\rm Im}\log Z_{n,\alpha}(0,t)=\alpha\rho_{0}\left(L-t/\pi\right).$ (67)

In Figs. 4-6, the above predictions for $Z_{n,\alpha}$ given by quantum
fluctuating hydrodynamics are tested against exact lattice calculations. In
particular, Fig. 4 shows the real part of the charged moments as function of
$x$ at different $t$ and $\alpha$ while Fig. 5 is an analysis of the
logarithmic growth in Eq. (65) observed at half system. Finally, Fig. 6
contains the result for the imaginary part of $Z_{n,\alpha}$. In all cases,
the hydrodynamic results are found in a very good agreement.

Figure 4: Real part of the charged moments in Eq. (64) as function of the
cutting position $x$ for $n=1$, different values of $\alpha$ (see plots
legend) and at different times $t/L=0.5,0.67,0.8$ from the left to rightmost
panel. The top (bottom) row shows the results for a half (fully) filled
initial state $\rho_{0}=1/2$ ($\rho_{0}=1$). In each plot, the symbols show
the numerical data obtained for a lattice of $300$ sites while the solid line
is the analytical prediction in (64); the vertical axes mark the light cone
position $|x|=t$.

(a) (b)

Figure 5: Half system behaviour of the real part of the charged moments as
function of time for different values of $n$ and $\alpha$ (see plots legend)
for (a) half-filled initial state $\rho_{0}=1/2$; (b) fully-filled initial
state $\rho_{0}=1$. The analytical prediction in Eq. (65) (thick solid line)
is compared with exact lattice calculations (symbols) obtained for a lattice
of $300$ sites. Figure 6: Imaginary part of the charged moments as function of
time for different cutting position $x$ (panels) and values of $\alpha$, $n$
(see plots legend). The hydrodynamic prediction in Eq. (67) is found in
agreement with exact numerical data obtained for a system of size $300$.

###  4.1 Fourier transform of the charged moments

The next step is to compute the Fourier transform of the charged moments
yielding the symmetry-resolved partition function (8), which we denote by
$\mathcal{Z}_{n,N}(x,t)$ to stress the space-time dependence. When explicitly
written, one obtains for ${\cal Z}_{n,N}$

$\begin{split}{\cal
Z}_{n,N}(x,t)&=\int_{-\pi}^{\pi}\frac{\mathrm{d}\alpha}{2\pi}\
e^{-\mathbf{i}N\alpha}Z_{n,\alpha}(x,t)\\\
&=Z_{n,0}(x,t)\int_{-\pi}^{\pi}\frac{\mathrm{d}\alpha}{2\pi}e^{-\mathbf{i}\alpha(N-N_{A}(x,t))}e^{-b_{n}(x,t)\alpha^{2}+e(n,\alpha)}\end{split}$
(68)

where

$b_{n}(x,t)=\frac{1}{4\pi^{2}n}\log{\cal L}(x,t)-\nu_{n}$ (69)

and

$Z_{n,0}(x,t)=\exp\left(-h_{n}\log{\cal L}(x,t)+\Upsilon_{n}\right).$ (70)

The computation of the integral in Eq. (68) is performed using the saddle-
point (in our case equal to a quadratic order) approximation. In particular,
this amounts to ignore the contribution of $\exp(e_{n,\alpha})$ (since
$\exp(e_{n,\alpha})=1+{\cal O}(\alpha^{4})$, cf. Ref. [56]) and hence
obtaining

${\cal Z}_{n,N}(x,t)=\frac{Z_{n,0}(x,t)}{\sqrt{4\pi
b_{n}(x,t)}}\exp\left(-\frac{(N-N_{A}(x,t))^{2}}{4b_{n}(x,t)}\right).$ (71)

It is useful to comment on the validity of this approximation, for which one
can use the analogous argument of Ref. [51]. In our case, one can identify the
small parameter $\varepsilon$ of Ref. [51] with the inverse of $b_{n}(x,t)$,
which indeed becomes small as time progresses. The comparison to [51] tells us
that neglecting $\exp(e_{n,\alpha})$ is legitimate if $b_{n}(x,t)\gg 1$ and
more importantly,

$(N-N_{A}(x,t))^{2}\ll b_{n}(x,t)\,,$ (72)

that is, $(N-N_{A}(x,t))^{2}$ does not have to be large but can take small
values if $b_{n}(x,t)$ is large. In Fig. 7, we show the probabilities ${\cal
Z}_{1,N}$ at half system as function of the charge imbalance $\Delta N\equiv
N-N_{A}(x,t)$ at different times. Notice that, due to particle number
conservation, the width $b_{n}(x,t)$ of the Gaussian in (71) is really small
(for instance, the variance at half-system for large times is
$b_{n}(0,t)\propto{\cal L}(0,t)\sim\log(t)$) and therefore the fluctuations
with $|\Delta N|\gtrsim 2$ particles are strongly suppressed. In Fig. 8,
${\cal Z}_{1,N}$ is visualised as function of $x$ for different choices of $N$
and $t$, and compared with exact lattice numerics.

Figure 7: Symmetry-resolved partition function in Eq. (68) at half system
($x=0$) as function of $\Delta N$, at $n=1$ and at different times
$t/L=0.33,0.8$ (see plots legend). In each plot, the symbols show the
numerical data obtained for a lattice of $300$ sites while the solid line is
the analytical prediction in (71). Figure 8: Symmetry-resolved partition
function in Eq. (68) as function of the cutting position $x$ for $n=1$,
different values of $\Delta N=0,\pm 1$ (see plots legend) and at different
times $t/L=0.5,0.67,0.8$ from the left to rightmost panel. The top (bottom)
row shows the results for a half (fully) filled initial state $\rho_{0}=1/2$
($\rho_{0}=1$). In each plot, the symbols show the numerical data obtained for
a lattice of $300$ sites while the solid line is the analytical prediction in
(71); the vertical axes mark the light cone position $|x|=t$.

###  4.2 Symmetry-resolved Rényi entropies

Finally, from the symmetry-resolved partition function in Eq. (71), the
symmetry-resolved Rényi entropies are straightforwardly obtained as (cf. Eq.
(9))

$\begin{split}S_{n,N}(x,t)&\equiv\frac{1}{1-n}\log\left[\frac{{\cal
Z}_{n,N}(x,t)}{({\cal
Z}_{1,N}(x,t))^{n}}\right]=S_{n}(x,t)+\frac{1}{1-n}\left[\frac{n(N-N_{A}(x,t))^{2}}{4b_{1}(x,t)}-\frac{(N-N_{A}(x,t))^{2}}{4b_{n}(x,t)}\right]\\\\[4.0pt]
&\qquad-\log(2\sqrt{\pi})+\frac{1}{1-n}\log\left[\frac{b_{1}(x,t)^{n/2}}{b_{n}(x,t)^{1/2}}\right].\end{split}$
(73)

At this point, we wish to consider the analytic continuation of $S_{n,N}$ in
(73) for $n\to 1$ and obtain a closed expression for the symmetry-resolved von
Neumann entropy. To this end, we write the symmetry-resolved von Neumann
entropy as
$S_{1,N}=-\partial_{n}\left[\mathcal{Z}_{n,N}/\mathcal{Z}_{1,N}^{n}\right]\Big{|}_{n=1}$
and differentiate the quantity $-\mathcal{Z}_{n,N}/\mathcal{Z}_{1,N}^{n}$ with
respect to $n$, exploiting the product form
$\mathcal{Z}_{n,N}\equiv{Z}_{n,0}\times g_{n,N}$ with

$g_{n,N}(x,t)=\frac{\exp\left(-\frac{(N-N_{A}(x,t))^{2}}{4b_{n}(x,t)}\right)}{\sqrt{4\pi
b_{n}(x,t)}}\ .$ (74)

Doing so, the analytic continuation of the symmetry-resolved von Neumann
entropy takes the form

$\begin{split}S_{1,N}(x,t)&=\log{Z}_{1,0}+\log g_{1,N}-\frac{g_{n,N}\
\partial_{n}{Z}_{n,0}+{Z}_{1,0}\ \partial_{n}g_{n,N}}{{Z}_{1,0}\
g_{1,N}}\\\\[5.0pt] &=S_{1}(x,t)+\log
g_{1,N}(x,t)-\frac{\partial_{n}g_{1,N}(x,t)}{g_{1,N}(x,t)}\end{split}$ (75)

since ${Z}_{1,0}\equiv 1$ by construction, even in the non-homogeneous quench
setting under analysis. This means that the symmetry-resolved von Neumann
entropy can eventually be expressed as

$\begin{split}S_{1,N}(x,t)&=S_{1}(x,t)-\frac{(N-N_{A}(x,t))^{2}}{4b_{1}(x,t)}-\log\left[(4\pi
b_{1}(x,t))^{1/2}\right]\\\\[4.0pt]
&-b^{\prime}_{1}(x,t)\frac{(N-N_{A}(x,t))^{2}-2b_{1}(x,t)}{4b_{1}(x,t)^{2}},\end{split}$
(76)

where $b^{\prime}_{1}(t,x)$ denotes the derivative of $b_{n}$ with respect to
$n$ evaluated at $n=1$, i.e.,

$b^{\prime}_{1}(x,t)\equiv\partial_{n}b_{n}(x,t)\Big{|}_{n=1}=-(b{}_{1}(x,t)+\nu_{1}+\nu^{\prime}_{1})\,,$
(77)

following directly from the definition of $b_{n}$ in (69). We recall that
$\nu_{n}$ is related to the non-universal constant appearing in Eq. (59). In
Fig. 9, the result for the symmetry-resolved von Neumann entropy in Eq. (76)
is compared with exact lattice numerics. As for the charged moments in Fig. 4,
we observe oscillations around the hydrodynamic result. In Ref. [40, 56],
similar oscillations were detected and attributed to leading correction in the
subsystem size. Including such subleading effects in our approach is non
trivial and goes beyond our scopes. Nevertheless, it is quite remarkable that
quantum generalised hydrodynamics is able to predict the functional behaviour
of the symmetry-resolved quantities modulo oscillations.

Figure 9: Symmetry-resolved von Neumann entropy in Eq. (76) as function of the
cutting position $x$ at different values of $\Delta N=0,\pm 1$ (see plots
legend) and at different times $t/L=0.5,0.67,0.8$ from the left to rightmost
panel. The top (bottom) row shows the results for a half (fully) filled
initial state $\rho_{0}=1/2$ ($\rho_{0}=1$). In each plot, the symbols show
the numerical data obtained for a lattice of $300$ sites while the solid line
is the analytical prediction in (76); the vertical axes mark the light cone
position $|x|=t$. The additive constants are fitted with numerics at half
system. Figure 10: Configurational $S^{(c)}$ and number $S^{(n)}$ entanglement
entropy as function of the cutting position $x$ at time $t/L=0.67$, for
different initial states $\rho_{0}=1,1/2$ (see plots legend). The data are
obtained for a system of $300$ sites with exact lattice numerics, retaining
only terms with $|\Delta N|\leqslant 2$ in Eq. (80). The sum of the two
contributions (symbols) is found in remarkable agreement with the hydrodynamic
prediction in Eq. (61) (solid line).

From the analytic expressions of the symmetry-resolved von Neumann entropy in
Eq. (76), one can easily investigate the limit $b_{1}(x,t)\rightarrow\infty$,
which physically corresponds to a long time limit beyond the Euler scaling
regime. Expanding Eq. (76) in such a $b_{1}(x,t)\rightarrow\infty$ limit, we
find that

$\begin{split}S_{1,N}(x,t)=&S_{1}(x,t)-\log\left[(4\pi
b_{1}(x,t))^{1/2}\right]-\frac{1}{2}-\frac{2(\nu(1)+\nu^{\prime}(1))}{4b_{1}(x,t)}\\\
&+\frac{\left(\nu(1)+\nu^{\prime}(1)\right)(N-N_{A}(x,t))^{2}}{b_{1}(x,t)^{2}}+\mathcal{O}\left(b_{1}(x,t)^{-3}\right)\,,\end{split}$
(78)

and we recall that the validity of the above expression requires that $\Delta
N^{2}\ll b_{1}(x,t)$, (notice that $\nu(1)+\nu^{\prime}(1)$ differs from
zero). Since $b_{1}(x,t)\propto S_{1}(x,t)$, we conclude that the
equipartition of entanglement in the symmetry sectors is asymptotically
restored according to

$\delta S_{1,N}(x,t)\sim\frac{(N-N_{A}(x,t))^{2}}{S_{1}(x,t)^{2}},$ (79)

with a non-trivial prefactor that depends on non-universal quantities. We
finally notice that the total von Neumann entropy profile in Eq. (61) can be
recovered, for each position $x$ and time $t$, as

$S_{1}(x,t)=\sum_{N}{\cal Z}_{1,N}(x,t)S_{1,N}(x,t)-\sum_{N}{\cal
Z}_{1,N}(x,t)\log{\cal Z}_{1,N}(x,t)\equiv S^{(c)}+S^{(n)}.$ (80)

The two terms appearing in the sum are known as configurational entanglement
entropy $S^{(c)}$, measuring the total entropy due to each charge sector, and
the number entropy $S^{(n)}$, which accounts for the entropy due to the charge
fluctuations among different sectors, see e.g. [14]. In Fig. 10, we show these
two contributions and we compare their sum to the hydrodynamic prediction in
Eq. (61). Notice that the oscillations observed in $S^{(c)}$ and $S^{(n)}$
(coming from those of the charged moments, cf. Fig. 4) nicely disappear once
the two contributions are summed.

##  5 Summary and conclusions

We considered a one-dimensional gas of non-interacting fermions initially
prepared in a bi-partite state $\ket{\Omega}$, characterised by the absence of
particles on the right part $(j\geqslant 0)$ and by a filling on the left part
($j<0$) of the chain with density $\rho_{0}=1/2$ or $1$. We subsequently let
$\ket{\Omega}$ evolve unitarily with the hopping Hamiltonian in Eq. (10) and
we studied the non-equilibrium dynamics after the quench in the Euler
hydrodynamic limit of large space-time scales $j,t\to\infty$ at fixed $j/t$,
see Sec. 2.2 for details. For this prototypical model of inhomogeneous quench
setting, the non-equilibrium dynamics of conserved charges has been determined
long ago (see e.g. Ref. [91, 92, 93, 95, 99, 94, 96]) and recently
complemented by results on the dynamics of the total entanglement (Ref. [90,
85]) and on the entanglement Hamiltonian [87], obtained through quantum
generalised hydrodynamics. In this manuscript, we eventually completed the
study on entanglement providing a careful analysis of the symmetry-resolved
Rényi entropies as function of time and of the entangling position along the
inhomogeneous system, see Sec. 3 and 4. We found that the charged moments at
half system display a logarithmic growth in time (see Eq. (65) and Fig. 5) and
that the symmetry-resolved von Neumann entropy is distributed among symmetry
sectors with equal weights, up to corrections that scale as the inverse of the
square of the total entanglement (see Eq. (79)). Our analytical results for
symmetry resolved quantities are based on quantum generalised hydrodynamics
and have been checked with numerical exact lattice calculations (see A for
details on the implementation), returning a very good agreement of the
hydrodynamic prediction with data.
Beside the per se interest of our results for the initial bi-partite state,
our work aims to connect two current branches of research on entanglement,
that are, symmetry resolution and quantum generalised hydrodynamics. Indeed,
our discussion in Sec. 3 and 4 has general validity and can be
straightforwardly extended to the study of symmetry resolved quantities in any
inhomogeneous quench setting that is accessible with quantum generalised
hydrodynamics, opening the doors to several subsequent analysis. For instance,
it would be interesting to consider the symmetry resolution in a quartic-to-
quadratic quench protocol (see e.g. [119]), whose total entanglement has been
calculated recently in Ref. [88] and realised in Ref. [120] with rubidium atom
chips for an experimental test of the hydrodynamic results on conserved
charges.

Acknowledgments —  The authors acknowledge support from ERC under Consolidator
grant number 771536 (NEMO). We are very thankful to Pasquale Calabrese for
discussions on the project at various stages of its development and for
valuable comments on the manuscript. We acknowledge Riccarda Bonsignori, Sara
Murciano and Filiberto Ares for useful discussions and remarks on the
manuscript.

##  Appendix A Some details on the numerical implementation

In this section we consider the exact numerical calculation for free fermionic
lattice Hamiltonian

$\hat{H}=-\frac{1}{2}\sum_{j=-L}^{L-1}\left(\hat{c}^{\dagger}_{j}\hat{c}_{j+1}+\hat{c}^{\dagger}_{j+1}\hat{c}_{j}\right)$
(81)

which differs from that in Eq. (10) for the presence of a right boundary. For
this model, it is sufficient to determine the expression of the two-point
correlation matrix

$G(t)=\left[\braket{\psi(t)}{\hat{c}^{\dagger}_{i}\hat{c}_{j}}{\psi(t)}\right]_{i,j=-L}^{L-1}$
(82)

from which other quantities becomes accessible exploiting Wick’s theorem. The
latter is initially obtained as $G(0)=\ket{\Omega}\bra{\Omega}$ by following
the state preparation discussed in Sec. 2.1 and subsequently evolved in the
post-quench eigenstate basis $\hat{H}\ket{w_{n}}=E_{n}\ket{w_{n}}$ of the
Hamiltonian (81) as

$G(t)=\sum_{n,m=-L}^{L-1}\ket{w_{n}}e^{-\mathbf{i}tE_{n}}\braket{w_{n}}{\Omega}\braket{\Omega}{w_{m}}e^{\mathbf{i}tE_{m}}\bra{w_{m}},$
(83)

see e.g. Ref. [98, 85] for more details. At this point, the density profile in
Eq. (35) is given by

$\rho(i,t)=G_{i,i}(t)$ (84)

and the number of particles $N_{A}$ in a subsystem $A$ (cf. Eq. (37)) is
obtained with a simple numerical integration. The next step is to build the
correlation matrix restricted to the sub-system $A$ as

$G_{A}(t)=\left[G_{i,j}(t)\right]_{i,j\in A}$ (85)

and eventually to compute the set of its eigenvalues
$\\{\zeta_{j}\\}_{j=1}^{\ell_{A}}$, with $\ell_{A}$ the number of sites
contained in $A$. The von Neumann entanglement entropy is then obtained as
[121, 122, 123, 124, 125, 126]

$S_{1}=-\sum_{j=1}^{\ell_{A}}\left[\zeta_{j}\log\zeta_{j}+(1-\zeta_{j})\log(1-\zeta_{j})\right].$
(86)

Similarly, the charged moments can be expressed in terms of the eigenvalues
$\\{\zeta_{j}\\}_{j=1}^{\ell_{A}}$ as [29]

$\log
Z_{n,\alpha}=\sum_{j=1}^{\ell_{A}}\log\left[\zeta_{j}^{n}e^{\mathbf{i}\alpha}+(1-\zeta_{j})^{n}\right].$
(87)

From Eq. (87), the other quantities (such as symmetry-resolved partition
functions and entropies) are obtained via simple numerical manipulations.

## References

## References

  * [1] M. Takahashi, Thermodynamics of one-dimensional solvable models, Cambridge University Press (1999).
  * [2] P. Calabrese, Entanglement spreading in non-equilibrium integrable systems, SciPost Phys. Lect. Notes 20 (2020).
  * [3] D. Boyanovsky, Imprint of entanglement entropy in the power spectrum of inflationary fluctuations, Phys. Rev. D 98, 023515 (2018).
  * [4] S. Brahma, O. Alaryani and R. Brandenberger, Entanglement entropy of cosmological perturbations, Phys. Rev. D 102, 043529 (2020).
  * [5] J. Martin and V. Vennin, Real-space entanglement of quantum fields, Phys. Rev. D 104, 085012 (2021).
  * [6] L. Amico, R. Fazio, A. Osterloh and V. Vedral, Entanglement in many-body systems, Rev. Mod. Phys. 80, 517 (2008).
  * [7] P. Calabrese, J. Cardy and B. Doyon, Entanglement entropy in extended quantum systems, J. Phys. A: Math. Theor. 42, 500301 (2009).
  * [8] J. Eisert, M. Cramer and M. B. Plenio, Area laws for the entanglement entropy, Rev. Mod. Phys. 82, 277 (2010).
  * [9] N. Laflorencie, Quantum entanglement in condensed matter systems, Phys. Rep. 643, 1 (2016).
  * [10] R. Islam, R. Ma, P. Preiss, M. Tai, A. Lukin, M. Rispoli and M. Greiner, Measuring entanglement entropy in a quantum many-body system, Nature 528, 77 (2015).
  * [11] A. M. Kaufman, M. E. Tai, A. Lukin, M. Rispoli, R. Schittko, P. M. Preiss and M. Greiner, Quantum thermalization through entanglement in an isolated many-body system, Science 353, 794 (2016).
  * [12] A. Elben, B. Vermersch, M. Dalmonte, J. I. Cirac and P. Zoller, Rényi Entropies from Random Quenches in Atomic Hubbard and Spin Models, Phys. Rev. Lett. 120, 050406 (2018).
  * [13] T. Brydges, A. Elben, P. Jurcevic, B. Vermersch, C. Maier, B. P. Lanyon, P. Zoller, R. Blatt and C. F. Roos, Probing Rényi entanglement entropy via randomized measurements, Science 364, 6437 (2019).
  * [14] A. Lukin, M. Rispoli, R. Schittko, M. E. Tai, A. M. Kaufman, S. Choi, V. Khemani, J. Leonard and M. Greiner, Probing entanglement in a many-body localized system, Science, 364, 6437 (2019).
  * [15] H. Li and F. D. M. Haldane, Entanglement spectrum as a generalization of entanglement entropy: Identification of topological order in non-abelian fractional quantum Hall effect states, Phys. Rev. Lett. 101, 010504 (2008).
  * [16] V. Eisler and I. Peschel, Analytical results for the entanglement hamiltonian of a free-fermion chain, J. Phys. A 50, 284003 (2017).
  * [17] V. Eisler and I. Peschel, Properties of the entanglement Hamiltonian for finite free-fermion chains, J. Stat. Mech. (2018) 104001.
  * [18] V. Eisler, E. Tonni and I. Peschel, On the continuum limit of the entanglement hamiltonian, J. Stat. Mech. (2019) 073101.
  * [19] J. Cardy and E. Tonni, Entanglement hamiltonians in two dimensional conformal field theory, J. Stat. Mech. (2016) 12103.
  * [20] X. Wen, S. Ryu and A. W.W. Ludwig, Entanglement hamiltonian evolution during thermalization in conformal field theory, J. Stat. Mech. 113103 (2018).
  * [21] P. Hislop and R. Longo, Modular structure of the local algebras associated with the free massless scalar field theory, Commun. Math. Phys. 84, 71 (1982).
  * [22] M. Dalmonte, B. Vermersch and P. Zoller, Quantum Simulation and Spectroscopy of Entanglement Hamiltonians, Nat. Phys. 14, 827 (2018).
  * [23] C. Kokail, B. Sundar, T. V. Zache, A. Elben, B. Vermersch, M. Dalmonte, R. van Bijnen, and P. Zoller, Quantum Variational Learning of the Entanglement Hamiltonian, Phys. Rev. Lett. 127, 170501 (2021).
  * [24] C. Kokail, R. van Bijnen, A. Elben, B. Vermersch and P. Zoller, Entanglement Hamiltonian Tomography in Quantum Simulation, Nature Phys. 17, 936 (2021).
  * [25] T. V. Zache, C. Kokail, B. Sundar, and P. Zoller, Entanglement Spectroscopy and probing the Li-Haldane Conjecture in Topological Quantum Matter, Quantum 6, 702 (2022).
  * [26] N. Javerzat and E. Tonni, On the continuum limit of the entanglement Hamiltonian of a sphere for the free massless scalar field, JHEP 2022, 86 (2022).
  * [27] S. Murciano, V. Vitale, M. Dalmonte and P. Calabrese, Negativity Hamiltonian: An Operator Characterization of Mixed-State Entanglement, Phys. Rev. Lett. 128, 140502, (2022).
  * [28] N. Laflorencie and S. Rachel, Spin-resolved entanglement spectroscopy of critical spin chains and Luttinger liquids, J. Stat. Mech. P11013 (2014).
  * [29] M. Goldstein and E. Sela, Symmetry-Resolved Entanglement in Many-Body Systems, Phys. Rev. Lett. 120, 200602 (2018).
  * [30] P. Calabrese, J. Dubail, and S. Murciano, Symmetry-resolved entanglement entropy in Wess-Zumino-Witten models, JHEP 2021, 67 (2021).
  * [31] A. Belin, L.-Y. Hung, A. Maloney, S. Matsuura, R. C. Myers, and T. Sierens, Holographic charged Rényi entropies,  JHEP 12 (2013) 059.
  * [32] P. Caputa, G. Mandal, and R. Sinha, Dynamical entanglement entropy with angular momentum and U(1) charge, JHEP 11 (2013) 052.
  * [33] P. Caputa, M. Nozaki, and T. Numasawa, Charged Entanglement Entropy of Local Operators, Phys. Rev. D 93, 105032 (2016).
  * [34] J. S. Dowker, Conformal weights of charged Rényi entropy twist operators for free scalar fields in arbitrary dimensions, J. Phys. A: Math. Theor. 49, 145401 (2016).
  * [35] J. S. Dowker, Charged Rényi entropies for free scalar fields,  J. Phys. A: Math. Theor. 50, 165401 (2017).
  * [36] H. Shapourian, K. Shiozaki, and S. Ryu, Partial time-reversal transformation and entanglement negativity in fermionic systems, Phys. Rev. B 95, 165101 (2017).
  * [37] H. Shapourian, P. Ruggiero, S. Ryu, and P. Calabrese, Twisted and untwisted negativity spectrum of free fermions, SciPost Phys. 7, 037 (2019).
  * [38] J. C. Xavier, F. C. Alcaraz, and G. Sierra, Equipartition of the entanglement entropy, Phys. Rev. B 98, 041106 (2018).
  * [39] N. Feldman and M. Goldstein, Dynamics of Charge-Resolved Entanglement after a Local Quench, Phys. Rev. B 100, 235146 (2019).
  * [40] R. Bonsignori and P. Calabrese, Boundary effects on symmetry resolved entanglement, J. Phys. A: Math. Theor. 54, 015005 (2021).
  * [41] L. Capizzi, P. Ruggiero, and P. Calabrese, Symmetry resolved entanglement entropy of excited states in a CFT, J. Stat. Mech. (2020) 073101.
  * [42] B. Estienne, Y. Ikhlef, A. Morin-Duchesne, Finite-size corrections in critical symmetry-resolved entanglement, SciPost Phys. 10, 054 (2021).
  * [43] S. Murciano, R. Bonsignori, and P. Calabrese, Symmetry decomposition of negativity of massless free fermions, SciPost Phys. 10, 111 (2021).
  * [44] H.-H. Chen, Symmetry decomposition of relative entropies in conformal field theory, JHEP 07 084 (2021).
  * [45] L. Capizzi and P. Calabrese, Symmetry resolved relative entropies and distances in conformal field theory, JHEP 10 195 (2021).
  * [46] M. Ghasemi, Universal Thermal Corrections to Symmetry-Resolved Entanglement Entropy and Full Counting Statistics, preprint – arXiv:2203.06708 (2022).
  * [47] H.-H. Chen, Charged Rényi negativity of massless free bosons, JHEP 02 117 (2022).
  * [48] S. Murciano, G. Di Giulio, and P. Calabrese, Entanglement and symmetry resolution in two dimensional free quantum field theories, JHEP 08 073 (2020).
  * [49] D. X. Horváth, L. Capizzi, and P. Calabrese, U(1) symmetry resolved entanglement in free 1+1 dimensional field theories via form factor bootstrap, JHEP 2021 197 (2021).
  * [50] D. X. Horváth and P. Calabrese, Symmetry resolved entanglement in integrable field theories via form factor bootstrap, JHEP 11 131 (2020).
  * [51] D. X. Horváth, P. Calabrese, and O. A. Castro-Alvaredo, Branch Point Twist Field Form Factors in the sine-Gordon Model II: Composite Twist Fields and Symmetry Resolved Entanglement, SciPost Phys. 12, 088 (2022).
  * [52] L. Capizzi, D. X. Horváth, P. Calabrese, and O. A. Castro-Alvaredo, Entanglement of the 3-State Potts Model via Form Factor Bootstrap: Total and Symmetry Resolved Entropies, JHEP 05, 113 (2022).
  * [53] K. Weisenberger, S. Zhao, C. Northe and R. Meyer, Symmetry-resolved entanglement for excited states and two entangling intervals in AdS3/CFT2, JHEP 2021, 104 (2021).
  * [54] S. Zhao, C. Northe, and R. Meyer, Symmetry-Resolved Entanglement in AdS3/CFT2 coupled to U(1) Chern-Simons Theory, JHEP. 07 30 (2021).
  * [55] S. Zhao, C. Northe, K. Weisenberger and R. Meyer, Charged Moments in W3 Higher Spin Holography, JHEP, 05 166 (2022) .
  * [56] R. Bonsignori, P. Ruggiero, and P. Calabrese, Symmetry resolved entanglement in free fermionic systems, J. Phys. A: Math. Theor. 52, 475302 (2019).
  * [57] S. Fraenkel and M. Goldstein, Symmetry resolved entanglement: Exact results in 1d and beyond, J. Stat. Mech. 033106 (2020).
  * [58] H. Barghathi, C. M. Herdman, and A. Del Maestro, Rényi Generalization of the Accessible Entanglement Entropy, Phys. Rev. Lett. 121, 150501 (2018).
  * [59] H. Barghathi, E. Casiano-Diaz, and A. Del Maestro, Operationally accessible entanglement of one dimensional spinless fermions, Phys. Rev. A100, 022324 (2019).
  * [60] S. Murciano, G. Di Giulio, and P. Calabrese, Symmetry resolved entanglement in gapped integrable systems: a corner transfer matrix approach, SciPost Phys. 8, 046 (2020).
  * [61] P. Calabrese, M. Collura, G. Di Giulio, and S. Murciano, Full counting statistics in the gapped XXZ spin chain, EPL 129, 60007 (2020).
  * [62] G. Parez, R. Bonsignori, and P. Calabrese, Quasiparticle dynamics of symmetry resolved entanglement after a quench: the examples of conformal field theories and free fermions, Phys. Rev. B 103, L041104 (2021).
  * [63] M. T. Tan and S. Ryu, Particle Number Fluctuations, Rényi and Symmetry-resolved Entanglement Entropy in Two-dimensional Fermi Gas from Multi-dimensional bosonisation, Phys. Rev. B 101, 235169 (2020).
  * [64] S. Murciano, P. Ruggiero, and P. Calabrese, Symmetry resolved entanglement in two-dimensional systems via dimensional reduction, J. Stat. Mech. 083102 (2020).
  * [65] F. Ares, S. Murciano, P. Calabrese, Symmetry-resolved entanglement in a long-range free-fermion chain, J. Stat. Mech. (2022) 063104.
  * [66] N. G. Jones, Symmetry-resolved entanglement entropy in critical free-fermion chains, J. Stat. Mech. (2022) 063104.
  * [67] Z. Ma, C. Han, Y. Meir and E. Sela, Symmetric inseparability and number entanglement in charge-conserving mixed states, Phys. Rev. A 105, 042416 (2022)
  * [68] L. Piroli, E. Vernier, M. Collura, P. Calabrese, Thermodynamic symmetry resolved entanglement entropies in integrable systems, J. Stat. Mech. (2022) 073102.
  * [69] X. Turkeshi, P. Ruggiero, V. Alba, and P. Calabrese, Entanglement equipartition in critical random spin chains, Phys. Rev. B 102, 014455 (2020).
  * [70] M. Kiefer-Emmanouilidis, R. Unanyan, J. Sirker, and M. Fleischhauer, Evidence for unbounded growth of the number entropy in many-body localized phases, Phys. Rev. Lett. 124, 243601 (2020).
  * [71] M. Kiefer-Emmanouilidis, R. Unanyan, M. Fleischhauer and J. Sirker, Unlimited growth of particle fluctuations in many-body localized phases, Ann. of Phys., 168481 (2021).
  * [72] K. Monkman and J. Sirker, Operational Entanglement of Symmetry-Protected Topological Edge States, Phys. Rev. Research 2, 043191 (2020).
  * [73] E. Cornfeld, L. A. Landau, K. Shtengel, and E. Sela, Entanglement spectroscopy of non-Abelian anyons: Reading off quantum dimensions of individual anyons, Phys. Rev. B 99, 115429 (2019).
  * [74] D. Azses and E. Sela, Symmetry-resolved entanglement in symmetry-protected topological phases, Phys. Rev. B 102, 235157 (2020).
  * [75] B. Oblak, N. Regnault, and B. Estienne, Equipartition of entanglement in quantum Hall states Phys. Rev. B 105, 115131 (2022).
  * [76] A. Neven, J. Carrasco, V. Vitale, C. Kokail, A. Elben, M. Dalmonte, P. Calabrese, P. Zoller, B. Vermersch, R. Kueng, and B. Kraus, Symmetry-resolved entanglement detection using partial transpose moments, Npj Quantum Inf. 7, 152 (2021).
  * [77] V. Vitale, A. Elben, R. Kueng, A. Neven, J. Carrasco, B. Kraus, P. Zoller, P. Calabrese, B. Vermersch, and M. Dalmonte, Symmetry-resolved dynamical purification in synthetic quantum matter, SciPost Phys. 12, 106 (2022).
  * [78] S. Fraenkel and M. Goldstein, Entanglement Measures in a Nonequilibrium Steady State: Exact Results in One Dimension, SciPost Phys. 11, 085 (2021).
  * [79] G. Parez, R. Bonsignori, and P. Calabrese, Exact quench dynamics of symmetry resolved entanglement in a free fermion chain, J. Stat. Mech.(2021) 093102.
  * [80] G. Parez, R. Bonsignori, and P. Calabrese, Dynamics of charge-imbalance-resolved entanglement negativity after a quench in a free-fermion model, J. Stat. Mech. (2022) 053103.
  * [81] H.-H. Chen, Dynamics of charge imbalance resolved negativity after a global quench in free scalar field theory, preprint – arXiv:2205.09532 (2022).
  * [82] P. Ruggiero, Y. Brun, and J. Dubail, Conformal field theory on top of a breathing one-dimensional gas of hard core bosons, SciPost Phys. 6, 051 (2019).
  * [83] P. Ruggiero, P. Calabrese, B. Doyon and J. Dubail, Quantum Generalized Hydrodynamics, Phys. Rev. Lett. 124, 140603 (2020)
  * [84] M. Collura, A. De Luca, P. Calabrese, and J. Dubail, Domain wall melting in the spin-1/2 XXZ spin chain: Emergent Luttinger liquid with a fractal quasiparticle charge, Phys. Rev. B 102, 180409 (2020).
  * [85] S. Scopa, A. Krajenbrink, P. Calabrese, and J. Dubail, Exact entanglement growth of a one-dimensional hard-core quantum gas during a free expansion, J. Phys. A: Math. Theor. 54, 404002 (2021).
  * [86] S. Scopa, P. Calabrese and J. Dubail, Exact hydrodynamic solution of a double domain wall melting in the spin-1/2 XXZ model, SciPost Phys. 12, 207 (2022).
  * [87] F. Rottoli, S. Scopa and P. Calabrese, Entanglement Hamiltonian during a domain wall melting in the free Fermi chain, J. Stat. Mech. (2022) 063103.
  * [88] P. Ruggiero, P. Calabrese, B. Doyon and J. Dubail, Quantum generalized hydrodynamics of the Tonks-Girardeau gas: density fluctuations and entanglement entropy, J. Phys. A: Math. Theor. 55 024003 (2022).
  * [89] F. Ares, S. Scopa and S. Wald, Entanglement dynamics of a hard-core quantum gas during a Joule expansion,J. Phys. A: Math. Theor. 55, 375301 (2022).
  * [90] J. Dubail, J.-M. Stéphan, J. Viti and P. Calabrese, Conformal field theory for inhomogeneous one-dimensional quantum systems: the example of non-interacting Fermi gases, SciPost Phys. 2, 2 (2017).
  * [91] T. Antal, Z. Rácz, A. Rákos and G. M. Schütz, Transport in the XX chain at zero temperature: Emergence of flat magnetization profiles, Phys. Rev. E 59, 4912 (1999).
  * [92] T. Antal, P. L. Krapivsky, and A. Rákos, Logarithmic current fluctuations in nonequilibrium quantum spin chains, Phys. Rev. E 78, 061115 (2008).
  * [93] D. Karevski, Scaling behaviour of the relaxation in quantum chains, Eur. Phys. J. B 27, 147 (2002).
  * [94] M. Rigol and A. Muramatsu, Emergence of Quasicondensates of Hard-Core Bosons at Finite Momentum, Phys. Rev. Lett. 93, 230404 (2004).
  * [95] T. Platini and D. Karevski, Scaling and front dynamics in Ising quantum chains, Eur. Phys. J. B 48, 225 (2005).
  * [96] T. Platini and D. Karevski, Relaxation in the XX quantum chain, J. Phys. A 40, 1711 (2007).
  * [97] V. Eisler, D. Karevski, T. Platini and I. Peschel, Entanglement evolution after connecting finite to infinite quantum chains, J. Stat. Mech. (2008) P0102.
  * [98] V. Alba and F. Heidrich-Meisner, Entanglement spreading after a geometric quench in quantum spin chains, Phys. Rev. B 90, 075144 (2014).
  * [99] L. Vidmar, J. P. Ronzheimer, M. Schreiber, S. Braun, S. S. Hodgman, S. Langer, S. F. Heidrich-Meisner, I. Bloch and U. Schneider, Dynamical Quasicondensation of Hard-Core Bosons at Finite Momenta, Phys. Rev. Lett. 115, 175301 (2015).
  * [100] N. Allegra, J. Dubail, J.-M. Stéphan and J. Viti, Inhomogeneous field theory inside the arctic circle, J. Stat. Mech. (2016) 053108.
  * [101] P. Jordan and E. Wigner, Über das Paulische Äquivalenzverbot, Z. Phys. 47, 631 (1928).
  * [102] M. Gruber and V. Eisler, Magnetization and entanglement after a geometric quench in the XXZ chain, Phys. Rev. B 99, 174403 (2019).
  * [103] P. Wendenbaum, M. Collura, and D. Karevski, Hydrodynamic description of hard-core bosons on a Galileo ramp, Phys. Rev. A 87, 023624 (2013).
  * [104] M. Fagotti, Higher-order generalized hydrodynamics in one dimension: The noninteracting test, Phys. Rev. B 96, 220302 (2017).
  * [105] M. Fagotti, Locally quasi-stationary states in noninteracting spin chains, SciPost Phys. 8, 048 (2020).
  * [106] B. Doyon, J. Dubail, R. Konik and T. Yoshimura, Large-Scale Description of Interacting One-Dimensional Bose Gases: Generalized Hydrodynamics Supersedes Conventional Hydrodynamics, Phys. Rev. Lett. 119, 195301 (2017).
  * [107] Y. Brun and J. Dubail, One-particle density matrix of trapped one-dimensional impenetrable bosons from conformal invariance, SciPost Phys. 2, 012 (2017).
  * [108] Y. Brun and J. Dubail, The Inhomogeneous Gaussian Free Field, with application to ground state correlations of trapped 1d Bose gases, SciPost Phys. 4, 037 (2018).
  * [109] S. Scopa, L. Piroli and P. Calabrese, One-particle density matrix of a trapped Lieb Liniger anyonic gas, J. Stat. Mech. (2020) 093103.
  * [110] A. Bastianello, J. Dubail, and J.-M. Stéphan, Entanglement entropies of inhomogeneous Luttinger liquids, J. Phys. A: Math. Theor. 53, 23 (2020).
  * [111] P. Calabrese and J. Cardy, Entanglement Entropy and Quantum Field Theory, J. Stat. Mech. 0406:P06002 (2004).
  * [112] J. L. Cardy, O. A. Castro-Alvaredo and B. Doyon, Form factors of branch-point twist fields in quantum integrable models and entanglement entropy, J. Stat. Phys. 130, 129 (2008).
  * [113] P. Calabrese and J. Cardy, Entanglement entropy and conformal field theory, J. Phys. A 42, 504005 (2009).
  * [114] O. A. Castro-Alvaredo, B. Doyon and E. Levi, Arguments towards a c-theorem from branch-point twist fields,  J. Phys. A: Math. Theor. 44, 492003 (2011).
  * [115] D. Bianchini, O. A. Castro-Alvaredo, B. Doyon, E. Levi and F. Ravanini, Entanglement Entropy of Non Unitary Conformal Field Theory, J. Phys. A: Math. Theor. 48, 04FT01 (2015).
  * [116] P. Calabrese and F. H.L. Essler, Universal corrections to scaling for block entanglement in spin-1/2 XX chains, J. Stat. Mech. (2010) P08029.
  * [117] B. Q. Jin and V. E. Korepin, Quantum spin chain, Toeplitz determinants and the Fisher-Hartwig conjecture, J. Stat. Phys. 116, 79 (2004).
  * [118] V. Eisler, Entanglement spreading after local and extended excitations in a free-fermion chain, J. Phys. A: Math. Theor. 54, 424002 (2021).
  * [119] T. Kinoshita, T. Wenger and D. A. Weiss, A quantum Newton’s cradle, Nature 440,900-903 (2006).
  * [120] M. Schemmer, I. Bouchoule, B. Doyon, and J. Dubail, Generalized Hydrodynamics on an Atom Chip, Phys. Rev. Lett. 122, 090601 (2020).
  * [121] I. Peschel, Entanglement in solvable many-particle models, Braz. J. Phys. 42, 267 (2012).
  * [122] I. Peschel, M. Kaulke and Ö. Legeza, Density-matrix spectra for integrable models, Ann. Phys. 8, 153 (1999).
  * [123] M. C. Chung and I. Peschel, Density-matrix spectra of solvable fermionic systems, Phys. Rev. B 64, 064412 (2001).
  * [124] I. Peschel, Calculation of reduced density matrices from correlation functions, J. Phys. A 36, L205 (2003).
  * [125] I. Peschel, On the reduced density matrix for a chain of free electrons, J. Stat. Mech. (2004) P06004.
  * [126] I. Peschel and V. Eisler, Reduced density matrices and entanglement entropy in free lattice models, J. Phys. A 42, 504003 (2009).


# The impact of Twitter on political influence on the choice of a running
mate: Social Network Analysis and Semantic Analysis - A Review

Immaculate Wanza Musyoka  dept. Computer Science
Dedan Kimathi University of Technology
<EMAIL_ADDRESS>Irad Kamuti Mwendo  dept. Computer Science
Dedan Kimathi University of Technology
<EMAIL_ADDRESS>David Gichohi Maina  dept. Computer Science
Dedan Kimathi University of Technology
<EMAIL_ADDRESS>Kinyua Gikunda  dept. Computer Science
Dedan Kimathi University of Technology
<EMAIL_ADDRESS>
###### Abstract

In this new era of social media, social networks are becoming increasingly
important sources of user-generated content on the internet. These kinds of
information resources, which include a lot of people’s feelings, opinions,
feedback, and reviews, are very useful for big businesses, markets, politics,
journalism, and many other fields. Politics is one of the most talked-about
and popular topics on social media networks right now. Many politicians use
micro-blogging services like Twitter because they have a large number of
followers and supporters on those networks. Politicians, political parties,
political organizations, and foundations use social media networks to
communicate with citizens ahead of time. Today, social media is used by
hundreds of thousands of political groups and politicians. On these social
media networks, every politician and political party has millions of
followers, and politicians find new and innovative ways to urge individuals to
participate in politics. Furthermore, social media assists politicians in
various decision-making processes by providing recommendations, such as
developing policies and strategies based on previous experiences, recommending
and selecting suitable candidates for a particular constituency, recommending
a suitable person for a particular position in the party, and launching a
political campaign based on citizen sentiments on various issues and
controversies, among other things. This research is a review on the use of
social network analysis (SNA) and semantic analysis (SA) on the Twitter
platform to study the supporters’ networks of political leaders because it can
help in decision-making when predicting their political futures.

###### Index Terms:

politician, running mate, supporter, social network analysis, semantic
analysis.

##  I Introduction

Social media platforms are now a part of everyday life [1]. They let people
from all over the world talk to each other in large groups about anything,
even important social and political issues. So, social media has become a good
source of data-rich information that can be used to learn about people’s
political opinions and interests [2]. Twitter, a medium for political and
social discussion, can be analyzed to get political insights from people [1]
.These insights are useful in making informed decisions. They help predict how
a certain running mate will affect the chances of a political aspirant [3].

Social network and semantic analysis are vital tools when it comes to the use
of social media to make predictions [4]. Structures of interactions between
individuals (or other social entities, such as organizations) and inter
dependencies in behavior or attitudes connected to configurations of social
relations are studied using social network analysis. A social network is a
social structure made up of a group of social actors (such as people or
organizations), a set of dyadic links, and other social interactions between
them. It brings individuals together to converse, share ideas and interests,
and meet new people. Social media is the term for this form of collaboration
and sharing [5]. The social network approach offers a collection of tools for
examining the structure of entire social entities, as well as a number of
hypotheses to explain the patterns that emerge. Social network analysis is
used to detect local and global trends, locate influential entities, and
investigate network dynamics in the study of these systems.

Semantic networks are a type of data representation that incorporates
linguistic information to express the relationship or dependency between
concepts or objects. Semantic networks aid in the extraction of meanings given
to a political leader by followers based on the text they use in social media
posts and could help political leaders transform their strategies [6].
Semantic networks, rather than connecting individuals to people, connect words
to words based on their co-occurrence [7].Words that come in the same sentence
as a politician’s name may highlight areas of concern that require public
relations assistance [5].

Semantic networks differ from social network analysis in that nodes are
semantic concepts (e.g., names, places, organizations, policies, values)
rather than social actors (e.g., citizens, nongovernmental organizations
[NGOs], political parties); and ties are not social interactions (e.g.,
friendships) but associations between concepts (e.g., co-occurrence). Semantic
networks, on the other hand, can be studied using network analysis
methodologies to gain quantitative and qualitative insights [5]. Quantitative
measurements can aid qualitative semantic structure research and exploration
[7]. This research is therefore guided by the following objectives: 1\. What
different techniques have been used in SNA and SA in relation to politics? 2\.
Which are the best-performing techniques in the analysis of SNA and SA? 3\.
How can we apply the best techniques in SNA and SA to determine the political
influence on the choice of a running mate?

Figure 1: Example SNA network of tweets[8]

The rest of the work is arranged as follows: in Section 2, an overview of the
current state-of-the-art in social network analysis and semantic analysis is
presented; and in Section 3, we provide the methodology for the best technique
that can be used in social network analysis and sentiment analysis before
making our conclusion in Section 4.

##  II State-of-the-art approaches for social network analysis and sentiment
analysis

In this section, we review various approaches that has been used in social
network analysis and sentiment analysis. Most researchers have analyzed social
media in different application areas [9]. For instance, [10] analyzed Twitter
to predict 2020 Oscar winner using several machine learning techniques, [11]
created a supervised learning algorithm to examine the political sentiments of
India’s national political parties with respect to the 2019 elections and [12]
mined opinions on the web among others as discussed below.

A study done by [13] employed Naïve Bayes classifier to analyze opinions and
categorize positive and negative comments on Facebook regarding agritech
startups of Thailand to examine the sentiments and attitudes of people and
investors. The researcher eliminated slang or unstructured words to reduce
errors in the results and achieved an accuracy of 79. In the prediction of
sentiments on comments made on Twitter, [14] manually tagged twitter comments
as positive, neutral, and negative. Using Naïve Bayes to classify unknown
comments, they achieved an accuracy score of 86.43 which was higher compared
with decision tree and random forest algorithms. However, [15] classified
Facebook textual posts of bigger size into negative, positive, neutral, spam,
and dual classes ensuring that every post can be easily classified into its
respective class. In doing so, an accuracy score of 91.2 was obtained.
Research conducted using multinomial Naïve bayes to detect cyberstalking on
social media, achieved an accuracy of 95.8 [16]. The researcher represented
all tweets with bag-of-words treating each word as an independent feature
before tagging. This variant of Naïve bayes proved to produce good results
with proper feature extraction, hence the high accuracy. There is long-term
semantic popularity of a post as compared to the social users’ popularity
(likes count of a post). Using Gaussian Naïve Bayes, [17] achieved an average
accuracy score of 90. This implies that appropriate future extraction and more
label classes can be used to accurately predict new instances of sentiments.

Graph theories can be used in the analysis of content posted on social
networks [18]. How users are connected to the content posted on social media
can be easily modeled. To achieve higher predictions on the links between
users and content posted on social networks, graph-related metrics such as
betweenness, centrality, and clustering algorithms [19] can be used to easily
group social networks into groups based on their links and relationships. For
instance, [20] used the K-means clustering algorithm to analyze the sentiment
polarity on threatening trends in Colombia. Furthermore, [21] use other
algorithms like Fruchterman Reingold [22], Harel-Korean, and Caluset-Newman-
Moore to measure betweenness, closeness centralities to measure how
politicians are engaged with citizens in developing countries using Twitter
and in the automatic prediction of political views, [23] used constructed
graph algorithms to forecast Russian elections in 2018.

Supervised machine learning algorithms can be used to model political social
network popularity. [3] in trying to predict the strongest and most
influential supporters network of three famous Pakistan political leaders,
they used Botometer to detect and remove fake supporters from the network
before analyzing the retweet network and the reply network using SVM which
achieved an accuracy of 79.89. [24] tried to predict the spread of propaganda
in social media, they collected lots of textual data from different online
sources, annotated it, and performed feature engineering of the data. Applying
the output after feature engineering to Support Vector Machine (SVM)
algorithm, an accuracy of 81 was attained. Comparing this result with [25]
work who attained 88 accuracy after widening their network by combining the
output of sentiment analysis of tweets and retweet count network and applying
these results to the SVM algorithm.

In detecting and identifying hate speech on social media comments, [26]
considered social media sites such as Twitter, Facebook and Myspace. Collected
corpus was pre-processed through stemming and normalization before applying
the cleaned dataset on Random Forest classifier which achieved an accuracy of
72.22. In detecting depression and applying the same algorithm, [27] achieved
an accuracy of 74 without feature selection despite having more features like
tweets, hashtags, retweets and user information which were more than [26]. To
analyze sentiments on Indonesia language, [28] used Random forest classifier
and explored bag of words using short term weighting methods for words’
selection after which an accuracy of 82.9 was attained. [29] applied
supervised ensemble random forest approach to detect cyber-bullying of
children. In this case, the researcher used tweets and Facebook posts which
were later labelled and preprocessed before being applied to the said
approach, which attained 83 accuracy and 88 when carried out with larger
dataset by [30]. Comparing these results with [31], who integrated unigram and
random forest to identify critical indicators of the rise and decline of stock
market attained accuracy of 98.34.

There were two types of methods that can be used to analyze social networks:
content analysis methods and methods based on the analysis of graph structure
topologies. Machine learning are used for content analysis while graph
algorithms for topology analysis [18]. Though there are several machine
learning techniques, SVM and Nave Bayes models are most frequently utilized.
When applied to well-formed text corpora, naive Bayes is effective [32],
whereas support vector machines perform well on datasets with irregular
shapes. However, machine learning methods struggle on social media platforms
where users post in random lengths, slang or unstructured words, and with lots
of spelling mistakes, and it takes a sizable training sample to modify the
method because the size and caliber of the output are affected by the dataset
size [33]. Additionally, using machine learning for analysis requires a lot of
time, sometimes hours in complex models, especially if training is necessary
[34]. A smaller training dataset speeds up the process, but the classification
accuracy suffers [35].

| Problem | Approach | Performance and Reference
---|---|---|---
1 | To examine the sentiments and attitudes of people and investors using Facebook Textual comments data | Naive Bayes | 79% [13]
2 | Prediction of sentiments on comments made on Twitter | Naive Bayes | 86.43% [14]
3 | To predict the strongest and most influential supporters’ in Twitter | NB, K-NN, and SVM | SVM 79.89% NB 75.40% and KNN 65.35% [3]
4 | Classification Facebook textual posts & Textual data-Facebook | Naive Bayes | Accuracy 91.2% [15]
5 | To detect cyberstalking on social media & Textual data- Twitter | Multinomial Naive Bayes | Accuracy 95.8% [15]
6 | Predicting future of polarity of images on social networks & Images | Gaussian Naive Bayes | Accuracy 90% [17]
7 | To predict the spread of propaganda in social media & Textual data | Support Vector Machine | Accuracy 84% [24]
8 | A novel sentiment analysis of social networks using supervised learning & Textual data- Twitter | Support Vector Machine | Accuracy 88% [25]
9 | Detecting and identifying hate speech on social media comments Textual data -Twitter, Facebook and Myspace | Random Forest | Accuracy 72.2% [26]
10 | Detecting depression Textual data-Twitter | Random Forest | Accuracy 74% [27]
11 | To analyze sentiments on Indonesia language | Random Forest | Accuracy 82.9% [28]
12 | To detect cyber-bullying of children - Textual data from Facebook and Twitter | Random Forest | Accuracy 83% [36]
13 | Ensemble classification of cyber space users tendency in blog writing using Textual data- Facebook, Twitter | Random Forest | Accuracy 88% [30]
14 | To identify critical indicators of the rise and decline of stock market | Random Forest | Accuracy 98.34 88% [31]

TABLE I: Summary of the reviewed machine learning application cases for
sentiment analysis

##  III Conclusion and Future Work

This paper reviewed social network analysis and semantic analysis and
associated state-of-the-art techniques. The primary objective of this work is
to review various techniques uses in SNA and SA and determine their
performance in relation to politics. This work noted that supervised machine
learning method such as support vector machine (SVM) and Naïve Bayes are
widely used in sentiment analysis. This is due to their simplicity and
accuracy [37]. Classification using Naïve Bayes increases the accuracy score
when applied to well-formed textual data [32]. This work has also observed
that applying more than one technique optimizes the performance without
compromising the accuracy [38]. Despite remarkable accuracy score in use of
the various techniques, there are grey areas in relation to political
influence that future researchers may look at. Such areas are to have an
overview of necessary procedures such as data collection, data cleaning and
feature selection used in various techniques, expanding the scope of data
collected to include images, mentions, hashtags, and to come up with ways of
dealing with sarcasm, negated sentences, misspelt words, and slang or
unstructured words [12].

## References

  * [1] N. Öztürk and S. Ayvaz, “Sentiment analysis on Twitter: A text mining approach to the Syrian refugee crisis,” Telemat. Informatics, vol. 35, no. 1, pp. 136–147, 2018, doi: 10.1016/j.tele.2017.10.006.
  * [2] R. Cantini, F. Marozzo, D. Talia, and P. Trunfio, “Analyzing Political Polarization on Social Media by Deleting Bot Spamming,” Big Data Cogn. Comput., vol. 6, no. 1, 2022, doi: 10.3390/bdcc6010003.
  * [3] A. Khan et al., “Predicting Politician’s Supporters’ Network on Twitter Using Social Network Analysis and Semantic Analysis,” Sci. Program., vol. 2020, 2020, doi: 10.1155/2020/9353120.
  * [4] M. Nur Habibi and Sunjana, “Analysis of Indonesia Politics Polarization before 2019 President Election Using Sentiment Analysis and Social Network Analysis,” Int. J. Mod. Educ. Comput. Sci., vol. 11, no. 11, pp. 22–30, 2019, doi: 10.5815/ijmecs.2019.11.04.
  * [5] Z. Drus and H. Khalid, “Sentiment analysis in social media and its application: Systematic literature review,” Procedia Comput. Sci., vol. 161, pp. 707–714, 2019, doi: 10.1016/j.procs.2019.11.174.
  * [6] A. Hasan, S. Moin, A. Karim, and S. Shamshirband, “Machine Learning-Based Sentiment Analysis for Twitter Accounts,” Math. Comput. Appl., vol. 23, no. 1, p. 11, 2018, doi: 10.3390/mca23010011.
  * [7] M. Wongkar and A. Angdresey, “Sentiment Analysis Using Naive Bayes Algorithm Of The Data Crawler: Twitter,” in 2019 Fourth International Conference on Informatics and Computing (ICIC), 2019, pp. 1–5, doi: 10.1109/ICIC47613.2019.8985884.
  * [8] A. Kruseman, “Social Network Analysis on Tweets,” 2018. .
  * [9] B. T.k., C. S. R. Annavarapu, and A. Bablani, “Machine learning algorithms for social media analysis: A survey,” Comput. Sci. Rev., vol. 40, p. 100395, 2021, doi: 10.1016/j.cosrev.2021.100395.
  * [10] J. Kim, S. Hwang, and E. Park, “Can we predict the Oscar winner? A machine learning approach with social network services,” Entertain. Comput., vol. 39, no. August 2020, p. 100441, 2021, doi: 10.1016/j.entcom.2021.100441.
  * [11] M. Ansari, M. B. Aziz, M. O. Siddiqui, H. Mehra, and K. P. Singh, “Analysis of Political Sentiment Orientations on Twitter,” Procedia Comput. Sci., vol. 167, pp. 1821–1828, Jan. 2020, doi: 10.1016/j.procs.2020.03.201.
  * [12] H. Soong, N. B. A. Jalil, R. K. Ayyasamy, and R. Akbar, “The Essential of Sentiment Analysis and Opinion Mining in Social Media,” 2019 IEEE 9th Symp. Comput. Appl. Ind. Electron., pp. 272–277, 2019.
  * [13] N. Kewsuwun and S. Kajornkasirat, “A sentiment analysis model of agritech startup on Facebook comments using naive Bayes classifier.,” Int. J. Electr. & Comput. Eng., vol. 12, no. 3, 2022.
  * [14] V. A. Fitri, R. Andreswari, and M. A. Hasibuan, “Sentiment analysis of social media Twitter with case of Anti-LGBT campaign in Indonesia using Naïve Bayes, decision tree, and random forest algorithm,” Procedia Comput. Sci., vol. 161, pp. 765–772, 2019, doi: 10.1016/j.procs.2019.11.181.
  * [15] M. M. Itani, R. N. Zantout, L. Hamandi, and I. Elkabani, “Classifying sentiment in Arabic social networks: Naïve search versus Naïve Bayes,” 2012 2nd Int. Conf. Adv. Comput. Tools Eng. Appl. ACTEA 2012, pp. 192–197, 2012, doi: 10.1109/ICTEA.2012.6462864.
  * [16] A. Filzah, M. Nasir, K. Amin, and M. Sukri, “Journal of Soft Computing and Data Mining Machine Learning Approach on Cyberstalking Detection in Social Media Using Naive Bayes and Decision Tree,” J. Soft Comput. Data Min., vol. 3, no. 1, pp. 19–27, 2022, [Online]. Available: http://penerbit.uthm.edu.my/ojs/index.php/jscdm.
  * [17] K. Almgren, J. Lee, and M. Kim, “Predicting the future popularity of images on social networks,” ACM Int. Conf. Proceeding Ser., 2016, doi: 10.1145/2955129.2955154.
  * [18] M. Kolomeets, A. Chechulin, and I. Kotenko, “Social networks analysis by graph algorithms on the example of the V Kontakte social network,” J. Wirel. Mob. Networks, Ubiquitous Comput. Dependable Appl., vol. 10, no. 2, pp. 55–75, 2019, doi: 10.22667/JOWUA.2019.06.30.055.
  * [19] S. P. B, “Improved BSP Clustering Algorithm for Social Network Analysis,” Bonfring Int. J. Softw. Eng. Soft Comput., vol. 1, no. 1, pp. 15–20, 2011, doi: 10.9756/bijsesc.1003.
  * [20] J. R. Sanchez et al., “On the Power of Social Networks to Analyze Threatening Trends,” IEEE Internet Comput., vol. 26, no. 2, pp. 19–26, 2022, doi: 10.1109/MIC.2022.3154712.
  * [21] C. Udanor, S. Aneke, and B. O. Ogbuokiri, “Determining social media impact on the politics of developing countries using social network analytics,” Program, vol. 50, no. 4, pp. 481–507, Jan. 2016, doi: 10.1108/PROG-02-2016-0011.
  * [22] A. J. O’Malley and P. V. Marsden, “The analysis of social networks,” Heal. Serv. Outcomes Res. Methodol., vol. 8, no. 4, pp. 222–269, 2008, doi: 10.1007/s10742-008-0041-z.
  * [23] I. V Kozitsin et al., “Modeling Political Preferences of Russian Users Exemplified by the Social Network Vkontakte,” Math. Model. Comput. Simulations, vol. 12, no. 2, pp. 185–194, 2020, doi: 10.1134/S2070048220020088.
  * [24] A. M. U. D. Khanday, Q. R. Khan, and S. T. Rabani, “SVMBPI: support vector machine-based propaganda identification,” in Cognitive Informatics and Soft Computing, Springer, 2021, pp. 445–455.
  * [25] M. Anjaria and R. M. R. Guddeti, “A novel sentiment analysis of social networks using supervised learning,” Soc. Netw. Anal. Min., vol. 4, no. 1, pp. 1–15, 2014, doi: 10.1007/s13278-014-0181-9.
  * [26] K. Nugroho et al., “Improving Random Forest Method to Detect Hatespeech and Offensive Word,” in 2019 International Conference on Information and Communications Technology (ICOIACT), 2019, pp. 514–518, doi: 10.1109/ICOIACT46704.2019.8938451.
  * [27] J. Angskun, S. Tipprasert, and T. Angskun, “Big data analytics on social networks for real-time depression detection,” J. Big Data, vol. 9, no. 1, p. 69, 2022, doi: 10.1186/s40537-022-00622-2.
  * [28] M. A. Fauzi, “Random forest approach fo sentiment analysis in Indonesian language,” Indones. J. Electr. Eng. Comput. Sci., vol. 12, no. 1, pp. 46–50, 2018, doi: 10.11591/ijeecs.v12.i1.pp46-50.
  * [29] Patel, “Evaluating the Effectiveness of an Ensemble Random Forest Machine Learning Algorithm in Detecting Cyberbullying in the 4chan Politically Incorrect Board Social,” pp. 9–25, 2019.
  * [30] N. A. Samsudin, A. Mustapha, and M. H. Abd Wahab, “Ensemble classification of cyber space users tendency in blog writing using random forest,” in 2016 12th International Conference on Innovations in Information Technology (IIT), 2016, pp. 1–4, doi: 10.1109/INNOVATIONS.2016.7880046.
  * [31] M. N. Elagamy, C. Stanier, and B. Sharp, “Stock market random forest-text mining system mining critical indicators of stock market movements,” 2nd Int. Conf. Nat. Lang. Speech Process. ICNLSP 2018, pp. 1–8, 2018, doi: 10.1109/ICNLSP.2018.8374370.
  * [32] A. U. Hassan, J. Hussain, M. Hussain, M. Sadiq, and S. Lee, “Sentiment Analysis of Social Networking Sites (SNS) Data using Machine Learning Approach for the Measurement of Depression,” 2017, doi: 10.1109/ICTC.2017.8190959.
  * [33] S. Mahtab, N. Islam, and M. M. Rahaman, “Sentiment Analysis on Bangladesh Cricket with Support Vector Machine,” 2018, pp. 1–4, doi: 10.1109/ICBSLP.2018.8554585.
  * [34] K. Chekima and R. Alfred, “Sentiment Analysis of Malay Social Media Text,” 2018, pp. 205–219.
  * [35] C. Dhaoui, C. M. Webster, and L. P. Tan, “Social media sentiment analysis: lexicon versus machine learning,” J. Consum. Mark., vol. 34, no. 6, pp. 480–488, Jan. 2017, doi: 10.1108/JCM-03-2017-2141.
  * [36] C. C. Henry, “Evaluating the Effectiveness of an Ensemble Random Forest Machine Learning Algorithm in Detecting Cyberbullying in the 4chan Politically Incorrect Board Social,” vol. 15, no. 2, pp. 1–23, 2019.
  * [37] M. Wankhade, A. Rao, and C. Kulkarni, “A survey on sentiment analysis methods, applications, and challenges,” Artif. Intell. Rev., pp. 1–50, 2022, doi: 10.1007/s10462-022-10144-1.
  * [38] P. K. Gikunda and N. Jouandeau, State-of-the-Art Convolutional Neural Networks for Smart Farms: A Review, vol. 997. Springer International Publishing, 2019.