# Classification of four-qubit entangled states via Machine Learning

S. V. Vintskevich  Technology Innovation Institute, Abu Dhabi, United Arab
Emirates  N. Bao  Brookhaven National Laboratory, Upton NY 11973, USA  A.
Nomerotski  Brookhaven National Laboratory, Upton NY 11973, USA  P. Stankus
Brookhaven National Laboratory, Upton NY 11973, USA  D.A. Grigoriev  LLP
Eqvium, Almaty, Kazakhstan

###### Abstract

We apply the support vector machine (SVM) algorithm to derive a set of
entanglement witnesses (EW) to identify entanglement patterns in families of
four-qubit states. The effectiveness of SVM for practical EW implementations
stems from the coarse-grained description of families of equivalent entangled
quantum states. The equivalence criteria in our work is based on the
stochastic local operations and classical communication (SLOCC) classification
and the description of the four-qubit entangled Werner states. We numerically
verify that the SVM approach provides an effective tool to address the
entanglement witness problem when the coarse-grained description of a given
family state is available. We also discuss and demonstrate the efficiency of
nonlinear kernel SVM methods as applied to four-qubit entangled state
classification.

###### pacs:

42.65.Yj, 42.50.Lc

##  I Introduction

The ability to quantify, detect and analyze the structure of quantum
entanglement Horodecki et al. (2009) is essential for quantum computation
Jozsa and Linden (2003); Briegel and Raussendorf (2001); Zhang et al. (2006),
quantum communication Wei et al. (2022); Hu et al. (2021); Lloyd (2003),
quantum networks McCutcheon et al. (2016); Illiano et al. (2022a, b) and
quantum metrology Tóth (2012); Hyllus et al. (2012). Moreover, an improper
”amount” of entanglement, incorrect structure or pattern of multipartite
entangled state, or action of quantum noise could all severely affect the
overall efficiency of given quantum computation tasksGross et al. (2009) or
performance of given quantum protocols, such as that of entanglement
purification Dür and Briegel (2007). Thus, it is crucial to detect and
describe the structure of entanglement in a set of states to maximize the
efficiency of a given protocol.

As a specific case of this, one can attempt to detect the presence of
entanglement in particular families of states relevant in specific quantum
protocols; note that the success probability of the protocol may vary when one
uses different families of entangled states Eisert et al. (2020); Kliesch and
Roth (2021); Gühne et al. (2021). A characteristic example of such a
difference is that between the multipartite GHZ- and W- type states. The GHZ-
type states are fragile against losses and are more utilized in quantum
information sharing protocols, whereas W-type states are robust against the
noise and are used in multi-party quantum network protocols Cruz et al.
(2019). For instance, in the case of tripartite W-state it is easy to verify
that each pair of qubits in this state is in an entangled state in contrast to
the tripartite GHZ-type state. This particular example emphasizes robustness
of the W-state, e.g. we can assume that the third qubit can be traced out to
emulate losses.

The entanglement witness (EW) technique is one of the most common, effective
and practical methods to detect the presence of entanglement for a given
multipartite quantum state, see, e.g.Gühne and Tóth (2009); Horodecki et al.
(2009), and references therein. In the present work, we analyze this technique
applied to arbitrary four-qubit systems. The essence of the EW technique is
briefly summarized below. By finding a specific Hermitian operator, called the
entanglement witness $\hat{W}$, one calculates a linear functional (EW
functional), which maps a given multipartite quantum state described by
density operator $\hat{\varrho}$ into a real number 111The usage of density
operators allows the accommodation of both mixed and pure states. with a
property that the EW functional has a non-negative value for all separable
states $\hat{\varrho}_{sep.}$ and that there exists a particular set of
entangled states for which the EW functional has negative values Horodecki et
al. (1996); Terhal (2000); Horodecki et al. (2009).

More specifically, let us formally denote a set of arbitrary multi-qubit
states as:
$S_{n_{q}}:=\\{\hat{\varrho}_{n_{q}}\in\mathcal{T}(\mathcal{H}_{n_{q}})|\
{\rm{tr}}\left(\hat{\varrho}_{n_{q}}\right)=1,\hat{\varrho}_{n_{q}}\geq O\\}$.
We denoted $\mathcal{T}\left(\mathcal{H}_{n_{q}}\right)$ as a linear space of
trace class operators acting on Hilbert space $\mathcal{H}_{{n}_{q}}$. The
condition $\hat{\varrho}_{n_{q}}\geq O$ states that operator $\hat{\varrho}$
is a positive operator Heinosaari and Ziman (2009). Mathematically, the EW
functional will have the following property:

${\rm{tr}}\left(\hat{\varrho}_{sep.}\hat{W}\right)\geq
0,\forall\hat{\varrho}_{sep.}\in S;\
{\rm{tr}}\left(\hat{\varrho}_{ent.}\hat{W}\right)<0,$ (1)

where we denote $S$ as a subset of all separable states. By definition
Horodecki et al. (2009); Heinosaari and Ziman (2009) a state
$\hat{\varrho}_{sep.}$ is separable if and only if it can be represented as a
convex combination of factorized states:
$\hat{\varrho}=\sum_{i}^{k}p_{i}\hat{\varrho}^{i}_{1}\otimes\dots\otimes\hat{\varrho}^{i}_{N}$;
where each $\hat{\varrho}^{i}$ is a state of the $i$-th qubit subsystem, a
density operator acting on a subspace $\mathcal{H}_{i}$ of a N-partite quantum
system with joint space
$\mathcal{H}=\mathcal{H}_{i}\otimes\dots\mathcal{H}_{N}$;
$\sum_{i=1}^{k}p_{i}=1,\ k\leq{\rm{dim}}\mathcal{H}^{2}$. Thus, the set of all
separable states is a convex subset of all states $S_{{n_{q}}}$ defined above
with respect to the trace norm Heinosaari and Ziman (2009), while, by
definition, the entangled states are those states that are not separable.

Note that the entanglement witness operator $\hat{W}$, which can detect the
entanglement for a given state $\hat{\varrho}_{ent}$ is not universal. There
are always other entangled states $\hat{\sigma}_{ent}$ such that
${\rm{tr}}(\hat{W}\hat{\sigma}_{ent})>0$, but at the same time
${\rm{tr}}(\hat{W}\hat{\varrho}_{ent})<0$. Unfortunately, one cannot determine
the entanglement witness operator for all possible entangled states for an
arbitrary multipartite quantum system Horodecki et al. (2009); Heinosaari and
Ziman (2009). It was shown that the problem of a general description of all
entangled states, pure and mixed, for multipartite quantum systems does not
have a solution, see e.g. Ioannou et al. (2004); Ioannou and Travaglione
(2006); Ioannou (2006); Bengtsson and Życzkowski (2017). However, in some
cases, the aforementioned disadvantage might be partially overcome. The
general idea is to split the quantum states into specific families - sets of
states that may share certain symmetries or specific structure. Another
possibility is if the quantum states can be created via a specific protocol
that maps a certain set of states to another set that can be mathematically
described via a specific parametrization.

The idea of splitting sets of entangled quantum states (generally, an infinite
set of states) into families with some inner mathematical structure can be
termed a coarse-grained classification. For instance one can specify
equivalence classes - families of the pure entangled states. Each state within
a given family can be transformed into another state of the same family with
nonzero probability through local operations and classical communications
(LOCC) Dür et al. (2000); Verstraete et al. (2002). If one can describe or
specify a structure of entangled states one may expect that the complexity of
finding entanglement witnesses for such set of states will be significantly
reduced. The mentioned above GHZ and W states are members of two
distinguishable families of states that cannot be converted into one another
by any (SLOCC) as was emphasized in Verstraete et al. (2002). Other possible
approaches include inductive entanglement classification Lamata et al. (2007),
entanglement classification with matrix product states Sanz et al. (2016) and
coarse graining of entanglement classes in $2\times m\times n$ systems
Hebenstreit et al. (2018).

Here we aim to employ the coarse-grained classifications of four-qubit quantum
states, following the results of Verstraete et al. (2002), to construct a set
of entanglement witness operators. We avoid difficulties of analytical
derivation of the entanglement witness operators by approaching the problem
numerically. The core of our numerical analysis is based on the well-known
Support Vector Machine (SVM) method in machine-learning (ML) Cortes and Vapnik
(1995); Bishop (2007). The SVM-based algorithm is designed to detect the
presence of entanglement not only in arbitrary four-qubit states but also to
assign this state to a particular family of states. To train our SVM model we
sample a data set of quantum states for each class of entangled and separable
states based on this coarse-grained classification. We are sampling $20000$
states for each class of entangled states, including separable states.

It is worth emphasizing that in recent years, machine learning-based methods
have demonstrated remarkable efficiency in application to various areas of
quantum physics Carleo and Troyer (2017); Torlai et al. (2018); Carleo et al.
(2019); Luchnikov et al. (2020). For instance, others have used the neural
networks Ma and Yung (2018); Lu et al. (2018) and also the SVM Zhu et al.
(2021) to find EW operators, which efficiently distinguish between separable
and entangled states of a particular type.

The simplest linear SVM approach can classify quantum states if they belong to
one of two classes (entangled and probably separable) by computing the
decision function and constructing a decision boundary. Thus, the SVM approach
directly corresponds to the EW problem. Note that SVM fits our problem
naturally, as quantum states can be equivalently considered as vectors in
$\mathcal{T}\left(\mathcal{H}_{n_{q}}\right)$ space. Consequently, the SVM
approach allows one to find a hyper-plane in the
$\mathcal{T}\left(\mathcal{H}_{n_{q}}\right)$, which corresponds to the
entanglement witness. We describe our approach and results of its application
in Section II. Appendix A provides a detailed description of the SLOCC
classification of four-qubit states used in this work.

##  II Entanglement witnesses for four-qubit states and application of SVM

In this section we construct a set of EW operators by considering a set of
four qubit states ($n_{q}=4$). As the first step, let us provide a general
mathematical description for the linear space of trace class operators
$\mathcal{T}\left(\mathcal{H}_{n_{q}}\right)$ in the case of an arbitrary
number of qubits $n_{q}$. The space
$\mathcal{T}\left(\mathcal{H}_{n_{q}}\right)$ is endowed with Hilbert-Schmidt
inner product for any two operators $\hat{R}_{1},\hat{R}_{2}$:
$\langle\hat{R}_{1},\hat{R}_{2}\rangle_{{\rm{HS}}}={\rm{tr}}\left(\hat{R}_{1}^{\dagger}\hat{R}_{2}\right)$,
which induces the norm $||R||_{HS}=\sqrt{\langle R^{\dagger}R\rangle_{HS}}$.
Let us choose the standard multi-qubit Pauli basis
$\\{\hat{\mathbf{I}}/\sqrt{2},\hat{\sigma}_{x}/\sqrt{2},\hat{\sigma}_{y}/\sqrt{2},\hat{\sigma}_{z}/\sqrt{2}\\}^{\otimes{n_{q}}}$
as a self-adjoint orthonormal basis for
$\mathcal{T}\left(\mathcal{H}_{n_{q}}\right)$. For simplicity we denoted a
particular basis operator as $\hat{E}_{i},i=0,4^{{n_{q}}}-1$ assuming
$\hat{E}_{0}=\hat{\mathbf{I}}^{\otimes n_{q}}$,
${\rm{tr}}\left(E_{i}\right)=0,i\neq 0$ and
$\langle\hat{E}_{i}\hat{E}_{j}\rangle_{HS}=\delta_{ij}$. Thus, an arbitrary
operator $\hat{R}$ can be represented as a vector $\vec{r}$:

$\displaystyle\hat{R}=\sum_{j}r_{j}\hat{E}_{j},r_{k}={\rm{tr}}\left(\hat{E}_{k}\hat{R}\right),\vec{r}=(r_{0},\dots
r_{4^{n_{q}}-1})$ (2)

If operator $\hat{R}$ is Hermitian all elements of a corresponding vector
$\vec{r}$ are real numbers and $||\hat{R}||_{HS}=||\vec{r}||_{e}$, the norm
$||\cdot||_{e}$ is the standard Euclidean norm of a vector. Consequently, the
Hilbert-Schmidt inner product of two Hermitian operators $\langle
R_{1},R_{2}\rangle_{{\rm{HS}}}$ corresponds to the standard ”Euclidean” inner
product $(\vec{r}_{1},\vec{r}_{2})$. The vector representation emphasizes the
direct correspondence between EW problems and the linear SVM method, and,
indeed, the EW problems can be viewed as problems of classification. We
consider two classes: the set of all separable states and a subset of
entangled states. In the vector representation an EW operator and an arbitrary
state can be denoted $\hat{W}\leftrightarrow\vec{w}$ and
$\hat{\varrho}\leftrightarrow\vec{\varrho}$ respectively, in accordance with
(2). Thus, the decision function used in SVM can be written as follows:

$\displaystyle
t_{\hat{W}}\left(\hat{\varrho}\right)=\begin{cases}-1,&{\text{if}}\
(\vec{w},\vec{\rho})<0\\\ 1,&{\text{if}}\ (\vec{w},\vec{\rho})>0,\end{cases}$
(3)

where we explicitly write the linear form of EW functional
$f_{\hat{W}}(\varrho)=(\vec{w},\vec{\rho})\equiv{\rm{tr}}(\hat{W}\hat{\varrho})$.
Accordingly, a training data set $DS=\\{\hat{\varrho}_{j}\\}_{j=1}^{N_{data}}$
consists of separable and entangled states in vector representation labeled
with $t_{\hat{W}}\left(\hat{\varrho}_{sep.}\right)=1$ and
$t_{\hat{W}}\left(\hat{\varrho}_{ent.}\right)=-1$ respectively, whereas a
decision hyperplane is defined by $f_{\hat{W}}(\hat{\varrho})=0$.

For a given sampled state of a train data set $\hat{\varrho}_{j}$ we will
simplify the notation: $f_{\hat{W}}(\hat{\varrho}_{j})\equiv f_{j}$ and
$t_{\hat{W}}(\hat{\varrho}_{j})\equiv t_{j}$. The SVM training objective is to
find a decision boundary by maximizing the margin $m$, which is the smallest
distance between the decision hyperplane (i.e. the boundary) and the closest
quantum states, also named support vectors, from the training data set. We
illustrate the SVM approach in Figure (1).

Figure 1: Illustration of SVM approach in two dimensions. The distance from a
given sample state $\hat{\varrho}_{j}\leftrightarrow\vec{\varrho}_{j}$ to a
decision boundary $f_{\hat{W}}=0$ is given by $m_{j}=t_{j}f_{j}/||\vec{w}||$.
Mathematically, the value of an optimal margin value $m_{*}$ can be found by
minimizing the hinge error function (4). For simplicity we denote
$\xi_{j}={\text{max}}(0,1-f_{j}t_{j})$. The location of the decision boundary
is determined by a subset of the data points, known as support vectors, which
is located on the margin boundary ($f_{\hat{W}}=1$ and $f_{\hat{W}}=-1$,
respectively). The support vectors are marked by the circles. Thus, for the
states that are on the correct side of the decision boundary $\xi_{j}=0$ and
for the outliers $\xi_{j}=1-t_{j}f_{j}$. Note that adding new samples that lie
outside of the optimal margin region will not affect the decision boundary.

To find the optimal margin $m_{*}$ one can consider minimization of the
following objective function
$\underset{\vec{w},{\text{DS}}}{\text{argmin}}L(\vec{w},DS)$ named the hinge
error function. The reader may find a comprehensive description in Géron
(2019); Bishop (2007):

$\displaystyle
L(\vec{w},DS)=\sum_{j}^{N_{data}}{\text{max}}\left(0,1-f_{j}t_{j}\right)+\lambda||\vec{w}||^{2}_{e}.$
(4)

The parameter $\lambda$ plays the role of regularization parameter to control
the model’s accuracy and generalization abilities.

Due to the given vector representation (2), the linear structure of
entanglement witness functional (1) and relatively small dimensionality of the
linear space of operators $\mathcal{T}(\mathcal{H}_{{n_{q}}})$ (in our case
$n_{q}=4$, $n_{f}={\rm{dim}}(\mathcal{T}(\mathcal{H}_{{n_{q}}}))=256$), the
SVM approach is computationally feasible. We denoted the dimension of a
feature space as $n_{f}$, which in our case coincides with the dimension of
space $\mathcal{T}(\mathcal{H}_{{n_{q}}})$. For instance, a rough estimate of
the SVM computational complexity is $O(N_{data}n_{f})$, based on the
implementation of SciKit Learn python package Géron (2019). Thus, the SVM
computational complexity can be estimated by $O(N_{data}4^{{n}_{q}})$.
Therefore, the SVM is a good match for analyzes of complex but relatively
small data sets.

In addition, the case of four qubits has another advantage, the SLOCC
classification of entangled states. This coarse-grained classification of
four-qubit entangled states further reduces the complexity of the EW problem
and allows efficient application of SVM. In the next subsection II.1 we focus
on this classification following the results of Verstraete et al. (2002) and
applying it to the construction of EW operators. The subsection II.2 provides
results of the SVM approach for construction of the EW operators and
entanglement detection of arbitrary four-qubit states.

###  II.1 Classification of four-qubit states

It was shown in Verstraete et al. (2002) how one can classify all pure states
of four qubits into distinguishable classes of entangled pure states. The
authors specified nine equivalent classes of this form. The equivalence
criteria were determined with respect to the stochastic local quantum
operations assisted by classical communication (SLOCC) applied to a particular
quantum state. More specifically, states in a set can be treated as equivalent
if any state for this set can be transformed into any other state with non-
zero probability by means of LOCC. Note that in the present analysis we
restrict ourselves to only local operations that are unitary transformations.
A local unitary transformation of arbitrary four-qubit state can be written
as:

$\hat{\varrho}_{{}^{\prime}}=\hat{U}_{1}\otimes\hat{U}_{2}\otimes\hat{U}_{3}\otimes\hat{U}_{4}\leavevmode\nobreak\
\hat{\varrho}\leavevmode\nobreak\
\hat{U}_{1}^{\dagger}\otimes\hat{U}_{2}^{\dagger}\otimes\hat{U}_{3}^{\dagger}\otimes\hat{U}_{4}^{\dagger},$
(5)

where $\hat{U}$ are arbitrary unitary operators acting on Hilbert space of a
single qubit $\mathcal{H}_{2}$. Operationally, the states belonging to the
same class can be used in a given quantum protocol but they will have a
different protocol efficiency. We list the explicit state classification in
Appendix A based on results of Verstraete et al. (2002). We denote these pure
states via ket - vectors $\ket{G},\ket{E}_{i},i=1,\dots,8,\ket{F}_{0}$, where
$\ket{G}$ represents a generic state, as $\ket{E}_{i}$ we denoted ”specific”
classes of entangled states and $\ket{F}_{0}$ is a factorized state, so is a
class member of separable four-qubit states.

Some of the states, like the class representatives in (A) - (19), are
parametrized with complex numbers, e.g. the generic states such as $\ket{G}$
in (A) and states $\ket{E}_{i},i=1,5$ in (A)-(A). However, some classes are
represented just by a single pure state. To form a data set needed to train
our SVM model we sample the complex numbers for each class
$\\{{E}_{i},i=1,5\\}$. In addition, we sample the random unitary matrices
$\hat{U}$ to increase the diversity of a particular data set, in accordance
with (5).

The sampling algorithm of random unitary matrices is implemented via QuTip
python package Johansson et al. (2012, 2013) with a slight modification as
explained below. We took the standard QuTip function rand$\\_$unitary and
added an additional parameter $\varepsilon$ to control the value of
$U_{\varepsilon}$. For this we assumed that:

$\displaystyle U_{\varepsilon}=\rm{exp}\left(i\varepsilon H\right),$ (6)

where $H$ is a random $2\times 2$ full rank Hermitian matrix. The sampling of
$H$ is done with another QuTip function, rand$\\_$herm.

Summarizing, for each SLOCC class of four-qubit states we create
$N_{data}=20000$ samples of pure states, including factorized states,
utilizing the LOCC transformations for each state (5) with random unitary
operators in accordance with Eq. (6). We normalize each sample by replacing
$\hat{\varrho}_{E_{i}}\rightarrow\hat{\varrho}_{E_{i}}/{\rm{tr}}\left(\hat{\varrho}_{E_{i}}\right)$.
As the next step, we find the EW operators via a SVM algorithm, which can
distinguish separable four-qubit states $\hat{\varrho}_{sep}$ and each class
of entangled states represented in families ${E}_{i},i=1,\dots 8$. Figure 2
illustrates the expected result.

Figure 2: Schematic representation of results obtained with the SVM approach.
The decision boundaries between the set of separable states $S$ and each class
of entangled states ${E}_{i}$ are represented by dashed lines. Each line
corresponds to a particular class and is specified by a vector representation
$\vec{w}_{i}$ of the entanglement witness operator $\hat{W}_{i}$ in accordance
with Eqs. (1) and Eqs. (3)

.

The set of separable states $S$ is a closed convex set and any separable state
can be represented as a convex hull of factorized states. We directly employ
this property to create a data set of separable states to train and validate
our results achieving high accuracy, see subsection II.2. To create a single
separable state we sample $4*4^{4}$ random factorized unitary operators
(matrices):
$\hat{U}_{f}^{(4)}\equiv\hat{U}_{1}\otimes\hat{U}_{2}\otimes\hat{U}_{3}\otimes\hat{U}_{4}$.
Each $2\rm{x}2$ single qubit unitary operator $\hat{U}$ is distributed
according to the Haar measure Fasi and Robol (2020). As a result one can get a
random pure factorized state $\ket{F}^{\prime}=\hat{U}_{f}^{(4)}\ket{F}_{0}$.
The need for $4*4^{4}$ unitary operators is driven by the requirement of
Carathéodory’s theorem for the convex sets and dimension of state space
$\mathcal{H}_{n_{q}}$, see Heinosaari and Ziman (2009) for a detailed
discussion. To sample an arbitrary separable four-qubit state we construct a
convex hull:
$\hat{\varrho}_{S}=\sum_{i=1}^{4^{4}}p_{i}\ket{F}^{\prime}_{i}\bra{F}^{\prime}_{i}$,
where the probability distribution $\\{p_{i}\\}$ is generated from the
Dirichlet distribution Bishop (2007). Note that it is possible to train SVM
and find the EW operator by using only pure factorized states. It follows
directly from the definition of separable states and properties of
entanglement witnesses. We will return to this topic in the next subsection.

Summarizing, our central goal is to demonstrate that the SVM approach allows
one to classify and detect the entanglement for an arbitrary four-qubit state,
not only for pure states. In the next subsection we confirm that the presented
above SVM approach can achieve this goal with high accuracy.

###  II.2 Constructing Entanglement Witness operators via Linear Support
Vector Machines

To implement the linear SVM algorithm, we prepared a data set comprised of
pairs of entangled and separable states. The data set had 20000 samples of
each family of states $\\{\rm{G,E_{i}},i=1,\dots 8\\}$ and the same number of
samples of separable states $S$. Specifically, in the case of
$\rm{G,E_{1}-E_{5}}$ we randomly sampled complex numbers $a,b,c,d$ describing
parametrization of a particular family (A) - (19). All states in the data set
are normalized and converted to the density operator form as we mentioned
above.

It is important to emphasize that, in principle, an increase of the training
data set size will improve the overall performance of any algorithm. However,
the computational resources required for such an improvement were not
available for the full scope of this work. The doubling of the training data
set demonstrates at maximum $\approx 0.1\%$ improvements of overall accuracy
but roughly doubling computational time, plus one requires additional time to
tune the algorithm’s parameters. Based on performance results we have chosen
20000 as a reasonable number of samples. As a result, for each member of
$\\{\rm{E_{i},i=1,\dots 8\\}}$, we constructed a corresponding set of
normalized EW operators such that $|{\rm{tr}}(\hat{\varrho}\hat{W})|\leq 1$.

To train an SVM model for a given family, we split the corresponding data
subset (for each pair of states) into three parts: 18000 samples were used for
the training set, 1000 samples for  a validation set to tune hyperparameters
and 1000 samples for a test set to check the generalization capabilities of an
algorithm by evaluating the accuracy on another data set. We presented the
results of the trained model performance via SVM in Figures 3 and 4 for the
cases of families $\rm{E_{3}}$ and $\rm{G}$. Histograms of $\rm{E_{3}}$ and
$\rm{G}$ consist of 75 bins versus ${\rm{tr}}(\hat{\varrho}\hat{W})$ covering
the range of $|{\rm{tr}}(\hat{\varrho}\hat{W}_{G})|\leq 1$. Note that for the
both presented cases we have chosen the parameter $\varepsilon=0.5$ in (6) to
assemble data sets of states. We set the regularization parameter in
(4),$\lambda=0.5*10^{-4}$ to yield an acceptable generalization, based on the
performance on the validation data set.

We used the Adam optimizer implemented in Tensorflow library TensorFlow
Developers (2022) with the following parameters: learning rate=0.005,
epsilon=$10^{-6}$. The total number of training steps, or epochs, was chosen
to be equal to 20000 steps, but an acceptable convergence of SVM algorithm
with the batch size 50 was achieved after approximately 5000 - 7000 training
steps. Based on the performance analysis on a validation set we utilized the
following regularization strategy. Each batch consisting of 50 samples was
randomly sampled from the whole data set for each epoch. This additional
randomization strategy had demonstrated significant improvements on a test
data set. It is clear from the performance presented in Figure 3 that the
resulting witness can reliably distinguish separable and entangled states.

Figure 3: Distribution of ${\rm{tr}}(\hat{\varrho}\hat{W})$, mean value of the
entanglement witness for a) validation set and b) test set of the trained EW
model via Linear SVM algorithm in the case of $\rm{{E}_{3}}$ family of states.
Both test set and validation set consist of 2000 samples: 1000 separable
states and 1000 entangled states of $\rm{{E}_{3}}$ family. For both validation
and test sets there were only few ($\leq 5$) miss-classifications of entangled
states and zero miss-classifications for separable states. Note that the
training data set included mixed Werner states to achieve better
generalization. Figure 4: Distribution of ${\rm{tr}}(\hat{\varrho}\hat{W})$,
mean value of entanglement witness, for a) validation set and b) test set of
trained EW model via Linear SVM algorithm in the case of generic $\rm{G}$
family of states. Both validation and test set consist of 2000 samples: 1000
separable states and 1000 entangled states of $\rm{{E}_{3}}$ family. For both
validation and test sets there were only few ($\leq 5$) miss-classifications
of entangled states and zero miss-classifications for separable states. Note
that the training data set included mixed Werner states to achieve better
generalization.

Let us further analyze the performance of the linear SVM algorithm. It is
worth mentioning that, in accordance with the properties of multipartite EW
(1) $f_{W}(\varrho)\geq 0$ for all separable states but
$f_{W}(\hat{\varrho}_{sep.})<0$ for at least one entangled state
$\hat{\varrho}_{ent.}$; it does not exist an EW operator that can detect all
entangled states We aim to find the best possible EW operator that can detect
the presence of entanglement in a maximum number of states of a given family
of states.

Usually, the optimal EW implies an operator $\hat{W}_{opt}$ that can detect
the maximum number of entangled states Heinosaari and Ziman (2009). In
geometrical terms it means that the decision hyperplane is tangent to the set
of all separable states $S$. Note that for a single entangled state it is
guaranteed that this entangled state and all separable states can be linearly
separated. On the other hand, in terms of linear SVM we tend to find the
maximal distance to the closest sample of a given set of states from the
decision boundary. It is known Bishop (2007), that the linear SVM works
perfectly for linearly separable data, but even for non linearly separable
data it might perform quite well Géron (2019). Below we will demonstrate that
analysis of the SVM performance can help to determine to what extent the
entangled states from a given family can be linearly separated from a set of
all separable states.

The analysis presented here directly tests the ability to distinguish
entangled and separable states for each SLOCC family individually. The SVM
generalization performance is considered for the newly resampled entangled and
separable states. In what follows, we analyze a variety of states correctly
detected by EW without limiting them to only pure entangled states from
families $\\{\rm{G,E_{i}},i=1,\dots 8\\}$, but also considering a specific
family of mixed entangled states - Werner states. Note that doing this we also
included mixed Werner states and pure factorized states in the construction of
a training data set.

Let us analyze the performance of a linear SVM classifier to train the
entanglement witnesses corresponding to each family of quantum states. We
consider three different cases correspond to three parameters
$\varepsilon_{1},\varepsilon_{2},\varepsilon_{3}$. In these cases we operate
with different data sets of entangled states. The diversity of each sample is
varying by parameter $\varepsilon$ in (6), in accordance with the SLOCC
classification criteria (5). We tested the procedure for the following
parameters: $\varepsilon_{1}=0.5,\varepsilon_{2}=0.75,\varepsilon_{3}=1$. The
results are presented in Figure 5. It is clear from the figure that the
ability to detect entanglement with an already trained EW operator for the
corresponding family members drops dramatically for $\varepsilon_{3}=1$: the
score is equal to about $50\%$ on average for all classes compared to almost
$100\%$ for $\varepsilon_{1}=0.5$. In these cases, the value of $\varepsilon$
has a possible interpretation of ability to distinguish entangled states from
separable ones employing linear SVM and, therefore, the EW theory approach.

Figure 5: General analysis of correct detection of entangled states based on
trained set of EW operators. For each family $\rm{G,E_{1},\dots E_{8}}$ we
used 20000 new samples of states. Each state is modified according to Eq. (5).
The random unitary operators are controlled by parameters $\varepsilon$
according to Eq. (6). The depicted bars represent the probability (or score)
to correctly detect entangled states of a given family for various values of
$\varepsilon$: 0.5, 0.75, 1, correspondingly for the bars 1, 2, 3 starting
from the left. For each family index ${\rm{G,E_{1}-E_{8}}}$ the fourth bar $4$
corresponds to mixed separable states, the fifth bar $5$ corresponds to pure
separable (factorized) states. The set of EW is obtained employing SVM with
parameters described in the caption of Figure (3) and Fig.(4).

The approach works similarly for all families $\\{E_{i}\\},i=1\dots 8$. In
other words, one can roughly estimate the vicinity for any state if it is a
member of a given family of entangled states, for which a linear model can
detect the presence of entanglement. We also analyzed the SVM generalization
performance in the worst case scenario. In this case, each state is modified
via (5) but each unitary operator
$\hat{U}_{f}^{(4)}\equiv\hat{U}_{1}\otimes\hat{U}_{2}\otimes\hat{U}_{3}\otimes\hat{U}_{4}$
is distributed according to the Haar measure. As expected, in this case we
have a much inferior performance: scores $\leq 1\%$ for all SLOCC families.
However, the correct detection scores for separable and factorized states have
not changed and are still high, about $99.5\%$. Such behavior agrees with the
EW properties.

A pure factorized state always has an infinitely large number of entangled
states within $\varepsilon$, the vicinity, calculated, for example, with
respect to the trace norm or Hilbert-Schmidt norm. This may lead to inferior
performance of the SVM algorithm in its attempt to derive EWs capable of
detecting the mixed entangled states. Consequently, to improve the algorithm
further we have included mixed entangled states in our training model. For
instance, let us consider another important family of multipartite quantum
states $\hat{\varrho}_{W}$, so called Werner states Huber et al. (2021);
Chruściński and Kossakowski (2006), which involve entanglement of mixed
states.

It is known Horodecki et al. (2009) that, in general, the detection of
entanglement presence in Werner states utilizing entanglement witnesses is not
an easy task. Werner states are invariant under the diagonal action of the
unitary group $U(2)\otimes U(2)$. Thus, in the case of four-qubit quantum
states the Werner states are defined as follows:

$\displaystyle\hat{\varrho}_{W}=[\hat{\mathbf{U}}\otimes\hat{\mathbf{U}}]\hat{\varrho}_{W}[\hat{\mathbf{U}}^{\dagger}\otimes\hat{\mathbf{U}}^{\dagger}],$
(7)

where $\hat{\mathbf{U}}=\hat{U}_{1}\otimes\hat{U}_{2},\ U_{1},U_{2}\in U(2)$.

To construct the sample data sets of both entangled and separable Werner
states we followed derivations presented in Chruściński and Kossakowski
(2006). An arbitrary Werner state can be obtained by action of a twril
channel:
$\hat{\varrho}_{W}=\tau\big{[}\hat{\varrho}_{W}\big{]}=\int[\hat{\mathbf{U}}\otimes\hat{\mathbf{U}}]\hat{\varrho}[\hat{\mathbf{U}}\otimes\hat{\mathbf{U}}]d_{Haar}\mathbf{U}$
where $d_{Haar}\mathbf{U}=dU_{1}dU_{2}$, invariant Haar measure on group
$U(2)\otimes U(2)$. This operation can be considered as a projection on
$\hat{\mathbf{U}}\otimes\hat{\mathbf{U}}$, an invariant subspace.

On the other hand, any Werner state can be represented as a decomposition
$\hat{\varrho}_{W}=\sum_{\alpha}q_{\alpha}\hat{Q}_{\alpha}$, where
$\\{\hat{Q}_{\alpha}\\}$ is a set of 4-partite orthogonal projectors that
characterize $\hat{\mathbf{U}}\otimes\hat{\mathbf{U}}$ invariant subspace, see
Chruściński and Kossakowski (2006) where an explicit form of the operators is
presented). It is evident that action of the twirling channel on a separable
state results in a separable state. Thus, as it was shown in Chruściński and
Kossakowski (2006), the Werner state is separable if and only when the
following conditions hold: $q_{1}\leq 1,q_{2},q_{3}\leq 1/2,q_{4}\leq
1/4;q_{4}\leq q_{2},q_{3}\leq 1$ for mentioned above decomposition of
$\hat{\varrho}_{W}$. In our analysis we applied this criteria to sample both
separable and entangled states by considering the following procedures. To
sample the separable Werner states one can sample a simple four-qubit
separable state and then apply a twirling channel.

Action of a twirling channel is equivalent to projection of a quantum state
$\hat{\varrho}$ by using operators $\\{\hat{Q}_{\alpha}\\}$ with coefficients
$q_{\alpha}(\hat{\varrho})={\rm{tr}}(\hat{Q}_{\alpha}\hat{\varrho}),\alpha=1,\dots
4.$ to obtain corresponding
$\hat{\varrho}_{W}(\hat{\varrho})=\sum_{\alpha}q_{\alpha}(\hat{\varrho})\hat{Q}_{\alpha}$.
Such construction of Werner states works because the following properties of
twirling channel hold. First, the dual channel to twirling channel is again a
twirling channel. Second, any $\hat{Q}_{\alpha}$ is invariant under action of
a twirling channel. Entangled Werner states are obtained by sampling a random
four - qubit state and collecting states for which the separability criteria
had been violated.

Utilizing already trained witness operators for each SLOCC family we found
that an entanglement detection for the random entangled Werner states yielded
poor accuracy. We obtained correct entanglement detection scores of just
$\approx 1\%$ based on a trained witness operator that corresponded to the
family ${\rm{G}}$, for all other families of states we got scores ${\approx
0.1\%}$. On the other hand, the separable states are again classified with
almost 100 % accuracy. Summarizing, almost all sampled entangled Werner states
were classified as separable states. Thus, it was essential to train the SVM
linear modes for the Werner states and consider such states as a separate
family.

The performance results of trained EW in the case of Werner states is
presented in Figure 6. It is not surprising that the linear SVM performance
was poor because the Werner states are not linearly separable in the space of
trace class operators. Nevertheless, it is clear from the separability
criteria above (see also details in work Chruściński and Kossakowski (2006))
that the separable and entangled Werner states can be distinguished in
invariant subspace $\hat{\mathbf{U}}\otimes\hat{\mathbf{U}}$. Furthermore, one
may project subsets of states parameterized with $\vec{\beta}$ from subsets
($S_{\vec{\beta}}$) of a given SLOCC family
$\\{\hat{\varrho}({\rm{E}}_{i},\vec{\beta}),\vec{\beta}\in
S_{\vec{\beta}}\subseteq\mathcal{R}^{m}\\}$ onto invariant subspace
$\hat{\mathbf{U}}\otimes\hat{\mathbf{U}}$. In a such case one may assume that
even a linear SVM model can yield good performance. Indeed, one may expect
that knowing a trained entanglement witness
$\hat{W}(\vec{\beta}):{\rm{tr}}\left(\hat{W}(\vec{\beta})\hat{\varrho}(\vec{\beta})\right)<0,\forall\vec{\beta}\in
S_{\vec{\beta}}$ one may construct an EW operator for the corresponding subset
of Werner states obtained via a twirling channel
$\hat{\varrho}_{W}(\vec{\beta})=\tau\big{[}\hat{\varrho}(\vec{\beta})\big{]}$.
Mathematically, it is evident from the following example. By choosing a family
$\hat{\varrho}(\vec{\beta})\in\rm{G,E_{i},i=1,\dots 8},\forall\vec{\beta}\in
S_{\vec{\beta}}$, and assuming that there exist an EW operator
$\hat{W}^{\prime}(\vec{\beta})$ such that
${\rm{sign}}\big{[}{\rm{tr}}(\tau\big{[}\hat{\varrho}(\vec{\beta})\big{]}\hat{W}^{\prime}(\vec{\beta}))\big{]}={\rm{sign}}\big{[}{\rm{tr}}(\hat{\varrho}(\vec{\beta})\tau\big{[}\hat{W^{\prime}}(\vec{\beta})\big{]})\big{]}<0\
\forall\vec{\beta}\in S_{\vec{\beta}}$. In the above equality we utilized the
self-duality property of a twirling channel by swapping action of
$\tau\big{[}\hat{\varrho}(\vec{\beta})\big{]}\longrightarrow\tau\big{[}\hat{W^{\prime}}(\vec{\beta})\big{]})\big{]}$
under the trace operation. Thus, one may imply that
$\tau\big{[}\hat{W^{\prime}}(\vec{\beta})\big{]}\subset{\rm{span}}(\\{\hat{P}_{\lambda_{j}}(\hat{W}(\vec{\beta}))\\})$.
We denoted $"\rm{span}(\cdot)"$ as linear span for a set of operators.

In our case these sets of operators
$\\{\hat{P}_{\lambda_{j}}(\hat{W}(\vec{\beta}))\\}$ are orthogonal projectors
on an eigenspace that corresponds to an eigenvalue
$\lambda_{j}\in{\rm{spec}}(\hat{W}(\vec{\beta}))$. It is evident that if the
set $S_{\vec{\beta}}$ is simple enough the correspondence can be specified
straightforwardly. As we can see from Figure 6 the direct numerical evaluation
of linear SVM algorithm support the discussed assumption. Note, an approach
discussed above might be generalized further to construct more sophisticated
algorithm for entanglement detection of multipartite quantum states.

In this subsection, we considered several families of entangled states,
including entangled Werner states. Our analysis clearly indicates that a
linear SVM algorithm can be efficiently employed to construct a set of EW
operators. However, it was also demonstrated that the approach has fundamental
limitations. It is evident because each family of states is quite complex and
cannot be separated by applying just a linear SVM algorithm. In the following,
we discuss possible nonlinear extensions of the SVM algorithms applicable to
the problem of entanglement detection.

Figure 6: Distribution of ${\rm{tr}}(\hat{\varrho}\hat{W})$, mean value of
entanglement witness, for a) validation set and b) test set of trained EW
model via Linear SVM algorithm in the case of Werner family of entangled
states. All parameters are the same as was described in Figure (3) and Figure
(4). For the first and second rows in a plot the corresponding Werner states
are generated from Generic-$\rm{G}$ and $\rm{E3}$ family of states by applying
twirling channel and separability criteria, in a third row provides
performance in the case of general sampling strategy described in a main text.

###  II.3 Constructing Entanglement Witness operators via Support Vector
Machines with nonlinear kernels

Let us consider possible improvements of the discussed above approach. The SVM
method is a quadratic constrained programming problem, which can be seen from
Equation (4). Importantly, the maximum margin problem has a dual
representation operating with kernel functions Bishop (2007); Géron (2019). We
can upgrade our simple linear model (3) with the following expression:

$\displaystyle f_{\vec{\phi}}(\vec{\varrho})=\left(\vec{w}(\vec{\varrho}),\
\vec{\phi}(\vec{\varrho})\right),$ (8)

where a map $\vec{\phi}(\cdot)$ transforms the initial feature space, but the
overall model is still linear. One can write the error function (loss) in the
following form:

$\tilde{L}(\vec{a})=\sum_{i}^{N}a_{n}-\frac{1}{2}\sum_{n,m}^{N}a_{n}a_{m}t_{n}t_{m}k(\vec{\varrho}_{n},\vec{\varrho}_{m}),$
(9)

where we introduced a new vector $\vec{a}=(a_{1},\dots a_{N})$ related to
$\vec{w}(\vec{\varrho})$ as follows:
$\vec{w}(\vec{\varrho})=\sum_{i}^{N}a_{n}t_{n}\vec{\phi}(\vec{\varrho})$. The
symbol $k(\vec{\varrho}_{n},\vec{\varrho}_{m}$) represents a kernel function,
which can be efficiently used to evaluate nonlinear transformations. The
optimization (training by finding $\vec{a}$) of quadratic function (9) yields
the following predictive model in terms of kernel function:

$f_{\vec{\phi}}(\vec{\varrho})\longrightarrow
f_{k(\vec{\varrho}_{n},\cdot)}(\vec{\varrho})=\sum_{i}^{N}a_{n}t_{n}k(\vec{\varrho}_{n},\vec{\varrho})$
(10)

Note that working with kernel functions allows one to avoid explicit
operations with the featured space, though it could produce, in principle,
more successful and complex models. For instance, it could happen that one
finds a specific kernel that can perfectly distinguish separable states and
the whole family of entangled states based on the SLOCC classification.
Indeed, we verified this assumption directly applying a nonlinear SVM using
SciKit Learn package. Figure (7) provides a comparison of models with linear
and nonlinear kernels to classify the entangled Werner, generic and separable
states. Furthermore, we modify the generic states according to the Haar
measure to assemble a new data set of 1000 samples. We observe 100 % accuracy
on a test set in the case of nonlinear SVM with Radial Basis Function (RBF)
kernel:
$k(\vec{\varrho},\vec{\sigma})={\rm{exp}}\left(-\gamma||\vec{\varrho}-\vec{\sigma}||_{2}^{2}\right)$,
compared to the linear model.

Figure 7: Distribution of $f_{\vec{\phi}}(\vec{\varrho})$ described in Eqs.
(8) and (10), and comparison of trained linear and nonlinear SVM algorithm
with RBF kernel using SciKit Learn Python package. Cases a) and d) correspond
to the standard SVM classification with linear kernel on a newly generated
test set, whereas b) and c) correspond to the Generic and entangled Werner
states classified with a nonlinear SVM with RBF kernel. We verify results by
sampling 5000 states of each family and for each case. Note that the assembled
data set of Generic states is obtained by modifying each sample by unitary
operators distributed according to the Haar measure and Eq.5. It is clear that
the performance of nonlinear SVM is very good, 100% and 99,8% in the cases of
Generic and Werner states, respectively.

Unfortunately, there are constraints among the feature values that restrict
the dimension of feature space so evaluating kernel functions for all samples
might be computationally demanding. To reduce the problem complexity, one
needs to find certain heuristics or another advanced coarse-grained
classification. In the next section we summarize the obtained results and
discuss possible applications and further steps.

##  III Discussion

Let us summarize the salient points regarding the problem of entanglement
detection in multipartite states using the support vector machine algorithms
as we considered in our work.

The entanglement detection problem is rather complex. Ideally, one would aim
to find tangent hyperplanes at each point of a set of separable states.
Several methods were proposed to find an approximate distance between a given
witness and a set of separable states, which help to detect the entanglement
of a particular state Ioannou (2006). In this context the considered SVM
approach has a similar objective to the one mentioned above. The SVM aims to
maximize the shortest distance between the decision boundary and ”support”
state (vector). However, as it was shown in Ioannou et al. (2004); Ioannou and
Travaglione (2006); Ioannou (2006) the characterization of all EWs for a given
multipartite system is a NP-hard problem as the dimensionality increases. The
geometrical interpretation of this problem is also a highly nontrivial task
Bengtsson and Życzkowski (2017).

Nevertheless, the EW problem complexity can be reduced by employing a coarse-
grained classification such as the considered four-qubit SLOCC classification
or description in terms of Werner states. We demonstrated successful
applications of the linear SVM algorithm for both of these cases. It is
important to mention that our analysis is akin to that proposed in Zhu et al.
(2021), where the authors also emphasized the direct relationship of the
entanglement witness functional and linear SVM. In our work here, we focus on
the successful applicability of the SVM technique specifically for the coarse-
grained classification of entangled states joined in to certain families.
However, the success of linear models comes with a price owing to the
mentioned above NP-hardness of the EW problem. In general, the linear SVM
approach cannot provide high accuracy for all states in a particular family.
As we showed, one can detect the entanglement with high accuracy for all
family members only within a vicinity of a fiducial state of the family. Thus,
one can interpret the accuracy of a trained EW model based on linear SVM as a
measure of complexity for a given family or parametrization of entangled
states.

One of the main advantages of the discussed linear SVM approach is its
universality in terms of implementation. Note that the modern Python packages
such as QuTip,Tensorflow, Scikit learnJohansson et al. (2012, 2013); Abadi et
al. (2015); Pedregosa et al. (2011) provide all necessary tools for
implementation of both linear and nonlinear SVM to find EW. The source code
used for this work is also provided in a GitHub repository GitHub (2022). In
addition, a nonlinear version of SVM can be a valuable tool for theoretical
analysis, especially in the case of coarse-grained classifications. We
demonstrated that nonlinear SVM allows to detect the entanglement with almost
perfect accuracy for any arbitrary state from a given family, while the linear
SVM has almost zero accuracy. It is not surprising because an arbitrary family
of states based on a given classification or parametrization is highly likely
to be not linearly separable from a convex set of separable states. We also
showed that introduction of the kernel function could be useful for specific
cases. At the same time it may require considerable computing resources making
the nonlinear kernels less attractive in general.

It is important to mention that local unitary transformations limit our
analysis. These limitations are dictated by the simplicity of analysis and
implementation of the SVM algorithm. Nevertheless, we believe that our results
are sufficient to demonstrate the universality of the proposed approach. It is
also worth noting that the previously described problematic Werner states are
not members of the SLOCC family, as their definition is based on the unitary
group structure described above. In addition, we tailored our work to specific
practical problems, such as quantum astrometry Stankus et al. (2022);
Khabiboulline et al. (2019a, b), where the local unitary operations are
reasonable models for the information encoding present in those environments.
On the other hand, it is also crucial to emphasize that the general analysis
of the symmetry of quantum states and operations, for example, by applying
group theory, plays a prominent role in the construction of the coarse-grained
description.

Application of the group theory and symmetry analysis are some of the most
powerful tools in theoretical physics. In particular, these approaches led to
a significant progress in developing novel theoretical and practical tools for
quantum technologies and their applications, such as entanglement detection,
foundations of quantum theory Graydon and Appleby (2016); Graydon (2017);
Graydon et al. (2021, 2022), randomized benchmarking Erhard et al. (2019);
Harper et al. (2020); Winick et al. (2021) etc. The aim for the next stage of
research is to elaborate on the developments of SVM - like algorithms to train
more sophisticated and, if possible, universal frameworks of classifiers to
combine specific sets of multipartite quantum states. It is our hope that the
synthesis of machine learning-based group theory methods and symmetry analysis
of states and quantum channels can be valuable tools to accelerate further
developments of quantum technology.

Another advantage of linear models is that they allow for a physical
interpretation of EW operators, as observables that can be measured directly
in an experiment. An interesting goal would be to analyze further the
connection between kernel methods and optimal collective measurements within
the concept of collective entanglement witnesses Horodecki et al. (2003).

The presented SVM-based analysis of EW can be useful for practical
applications. For instance, the SLOCC operations described above directly
relate to the field of quantum metrology. In particular, optical
interferometers were proposed where an entangled ancilla was shared between
two or more stations to improve the accuracy of astrometrical measurements
Gottesman et al. (2012); Khabiboulline et al. (2019a, b); Stankus et al.
(2022); Nomerotski et al. (2020). Each ancilla’s subsystem interacts locally
with a fiducial state in the station that carries valuable information to be
extracted. For practical implementation of such schemes, one needs to
understand how the noise affects the ancilla’s state and also specifics of
local interactions to optimize the measurement protocol and to quantify the
structure of the entangled states. Simple and effective tools such as the
proposed SVM approach can help to solve the problem of detecting and
classifying the structure of entangled states used in those quantum astrometry
schemes.

Finally, another promising application of this approach is its employment in
quantum-enhanced sensor networksZhuang and Zhang (2019) and quantum reservoir
computing Ghosh et al. (2019); Vintskevich and Grigoriev (2022). It was
already demonstrated that both SVM and EW problems could be mapped and
processed by such multipartite quantum systems working as quantum-enhanced
processors Zhuang and Zhang (2019). These promising developments open new
directions for applications of multipartite quantum systems to address the
cross-cutting interdisciplinary problems of machine learning and quantum
metrology.

##  IV Acknowledgments

We are grateful to Matthew Graydon, Zhi Chen, Anže Slosar, Konstantin
Katamadze and Rene Reimann for useful discussions and support. This work was
supported in part by the U.S. Department of Energy QuantISED award and BNL
LDRD grant 19-30.

##  Appendix A SLOCC classification of four-qubit pure states

All trained SVM models discussed above were derived by combining all states of
one family based on a given property such as the SLOCC equivalence or another
particular state property (parametrization) intrinsic to the Werner states.
This appendix provides an explicit description of the SLOCC classification
used in this manuscript. This classification was investigated in detail in
Verstraete et al. (2002), where the authors derived nine families of states
corresponding to nine different ways of entangling four qubits.

The main idea of derivation follows from the equivalence of groups
${\rm{SU}}(2)\otimes{\rm{SU}}(2)$ and ${\rm{SO}}(4)$ in the Lie-group theory,
where ${\rm{SU}}(2)$ is a special group of $2{\rm{x}}2$ unitary matrices and
${\rm{SO}}(4)$ is a group of orthogonal matrices with unit determinant.
Mathematically, this equivalence is represented by $\forall
U_{1},U_{2}\in{\rm{SU}}(2)\ \exists T:O=T(U_{1}\otimes
U_{2})T^{\dagger}\in{\rm{SO}}(4)$. Additionally, each four-qubit pure state
can be represented as a $4{\rm{x}}4$ complex matrix
$R=T\psi_{(i_{1}i_{2})(i_{3}i_{4})}T^{\dagger}$, where
$\psi_{(i_{1}i_{2})(i_{3}i_{4})}$ is a reshaped matrix element of four-qubit
state representation in the computational basis. Thus, the aforementioned
equivalence and state representation allows one to represent the SLOCC
transformation of four-qubit state in (5) as an action of orthogonal matrices:
$R^{\prime}=O_{1}RO_{2}$. On the other hand it was proven that a given
$4{\rm{x}}4$ complex matrix $R$ can always be transformed via $O_{1}$ and
$O_{2}$ to the Jordan block normal form. This means that the normal form
encodes the genuine non-local properties of the four-qubit state and allows
classification of the states. Entangled states from the same family can
perform the same quantum protocol but with a different probability. The
following distinct classes of (unnormalized) pure states were specified in the
computational basis:

$\displaystyle\ket{G_{abcd}}=$
$\displaystyle\frac{a+d}{2}(\ket{0000}+(\ket{1111})+\frac{a-d}{2}(\ket{0011}+\ket{1100})+$
$\displaystyle\frac{b+c}{2}(\ket{0101}+\ket{1010})+$
$\displaystyle+\frac{b-c}{2}(\ket{0110}+\ket{1001})$ (11)

$\displaystyle\ket{E_{1}}=\frac{a+b}{2}(\ket{0000}+\ket{1111})+\frac{a-b}{2}(\ket{0011}$
$\displaystyle+\ket{1100})+c(\ket{0101}+\ket{1010})+\ket{0110}$ (12)

$\displaystyle\ket{E_{2}}=a(\ket{0000}+\ket{1111})+b(\ket{0101}+\ket{1010})$
$\displaystyle+\ket{0110}+\ket{0011}$ (13)

$\displaystyle\ket{E_{3}}=a(\ket{0000}+\ket{1111})+\frac{a+b}{2}(\ket{0101}+\ket{1010})$
$\displaystyle+\frac{a-b}{2}(\ket{0110}+\ket{1001})$
$\displaystyle+\frac{i}{\sqrt{2}}(\ket{0001}+\ket{0010}+\ket{0111}+\ket{1011})$
(14)

$\displaystyle\ket{E_{4}}=a(\ket{0000}+\ket{0101})+\ket{1010}+\ket{1111})$
$\displaystyle+(i\ket{0001}+\ket{0110}-i\ket{1011})$ (15)

$\displaystyle\ket{E_{5}}=a(\ket{0000}+\ket{1111})$
$\displaystyle+(\ket{0011}+\ket{0101}+\ket{0110})$ (16)

$\displaystyle\ket{E_{6}}=\ket{0000}+\ket{0101}+\ket{1000}+\ket{1110}$ (17)
$\displaystyle\ket{E_{7}}=\ket{0000}+\ket{1011}+\ket{1101}+\ket{1110}$ (18)
$\displaystyle\ket{E_{8}}=\ket{0000}+\ket{0111}$ (19)
$\displaystyle\ket{S_{0}}=\ket{0110}\equiv\ket{E}_{1}:a=b=c=0$ (20)

The state $\ket{S_{0}}$ represents a subclass of the pure factorized state.
All other states (classes) possess unique properties and entanglement
structure. For instance, the state $\ket{G}_{abcd}$ represents a class of
generic pure states. It is claimed that this is a class of states with maximal
4-partite entanglement on the orbit generated by SLOCC measured in accordance
with majorization criteria Verstraete et al. (2002).

## References

  * Horodecki et al. (2009) R. Horodecki, P. Horodecki, M. Horodecki, and K. Horodecki, Rev. Mod. Phys. 81, 865 (2009), URL https://link.aps.org/doi/10.1103/RevModPhys.81.865.
  * Jozsa and Linden (2003) R. Jozsa and N. Linden, Proceedings of the Royal Society of London. Series A: Mathematical, Physical and Engineering Sciences 459, 2011 (2003), eprint https://royalsocietypublishing.org/doi/pdf/10.1098/rspa.2002.1097, URL https://royalsocietypublishing.org/doi/abs/10.1098/rspa.2002.1097.
  * Briegel and Raussendorf (2001) H. J. Briegel and R. Raussendorf, Phys. Rev. Lett. 86, 910 (2001), URL https://link.aps.org/doi/10.1103/PhysRevLett.86.910.
  * Zhang et al. (2006) A.-N. Zhang, C.-Y. Lu, X.-Q. Zhou, Y.-A. Chen, Z. Zhao, T. Yang, and J.-W. Pan, Phys. Rev. A 73, 022330 (2006), URL https://link.aps.org/doi/10.1103/PhysRevA.73.022330.
  * Wei et al. (2022) S.-H. Wei, B. Jing, X.-Y. Zhang, J.-Y. Liao, C.-Z. Yuan, B.-Y. Fan, C. Lyu, D.-L. Zhou, Y. Wang, G.-W. Deng, et al., Laser & Photonics Reviews 16, 2100219 (2022), URL https://doi.org/10.1002/lpor.202100219.
  * Hu et al. (2021) X.-M. Hu, C.-X. Huang, Y.-B. Sheng, L. Zhou, B.-H. Liu, Y. Guo, C. Zhang, W.-B. Xing, Y.-F. Huang, C.-F. Li, et al., Phys. Rev. Lett. 126, 010503 (2021), URL https://link.aps.org/doi/10.1103/PhysRevLett.126.010503.
  * Lloyd (2003) S. Lloyd, Phys. Rev. Lett. 90, 167902 (2003), URL https://link.aps.org/doi/10.1103/PhysRevLett.90.167902.
  * McCutcheon et al. (2016) W. McCutcheon, A. Pappa, B. A. Bell, A. McMillan, A. Chailloux, T. Lawson, M. Mafu, D. Markham, E. Diamanti, I. Kerenidis, et al., Nature Communications 7 (2016), URL https://doi.org/10.1038/ncomms13251.
  * Illiano et al. (2022a) J. Illiano, M. Caleffi, A. Manzalini, and A. S. Cacciapuoti, Computer Networks 213, 109092 (2022a), URL https://doi.org/10.1016/j.comnet.2022.109092.
  * Illiano et al. (2022b) J. Illiano, M. Viscardi, S. Koudia, M. Caleffi, and A. S. Cacciapuoti, _Quantum internet: from medium access control to entanglement access control_ (2022b), URL https://arxiv.org/abs/2205.11923.
  * Tóth (2012) G. Tóth, Phys. Rev. A 85, 022322 (2012), URL https://link.aps.org/doi/10.1103/PhysRevA.85.022322.
  * Hyllus et al. (2012) P. Hyllus, W. Laskowski, R. Krischek, C. Schwemmer, W. Wieczorek, H. Weinfurter, L. Pezzé, and A. Smerzi, Phys. Rev. A 85, 022321 (2012), URL https://link.aps.org/doi/10.1103/PhysRevA.85.022321.
  * Gross et al. (2009) D. Gross, S. T. Flammia, and J. Eisert, Phys. Rev. Lett. 102, 190501 (2009), URL https://link.aps.org/doi/10.1103/PhysRevLett.102.190501.
  * Dür and Briegel (2007) W. Dür and H. J. Briegel, Reports on Progress in Physics 70, 1381 (2007), URL https://doi.org/10.1088/0034-4885/70/8/r03.
  * Eisert et al. (2020) J. Eisert, D. Hangleiter, N. Walk, I. Roth, D. Markham, R. Parekh, U. Chabaud, and E. Kashefi, Nature Reviews Physics 2, 382 (2020), URL https://doi.org/10.1038/s42254-020-0186-4.
  * Kliesch and Roth (2021) M. Kliesch and I. Roth, PRX Quantum 2, 010201 (2021), URL https://link.aps.org/doi/10.1103/PRXQuantum.2.010201.
  * Gühne et al. (2021) O. Gühne, Y. Mao, and X.-D. Yu, Phys. Rev. Lett. 126, 140503 (2021), URL https://link.aps.org/doi/10.1103/PhysRevLett.126.140503.
  * Cruz et al. (2019) D. Cruz, R. Fournier, F. Gremion, A. Jeannerot, K. Komagata, T. Tosic, J. Thiesbrummel, C. L. Chan, N. Macris, M.-A. Dupertuis, et al., Advanced Quantum Technologies 2, 1900015 (2019), URL https://doi.org/10.1002/qute.201900015.
  * Gühne and Tóth (2009) O. Gühne and G. Tóth, Physics Reports 474, 1 (2009), URL https://doi.org/10.1016/j.physrep.2009.02.004.
  * Horodecki et al. (1996) M. Horodecki, P. Horodecki, and R. Horodecki, Physics Letters A 223, 1 (1996), ISSN 0375-9601, URL https://www.sciencedirect.com/science/article/pii/S0375960196007062.
  * Terhal (2000) B. M. Terhal, Physics Letters A 271, 319 (2000), ISSN 0375-9601, URL https://www.sciencedirect.com/science/article/pii/S0375960100004011.
  * Heinosaari and Ziman (2009) T. Heinosaari and M. Ziman, _The Mathematical language of Quantum Theory_ (Cambridge University Press, 2009), URL https://doi.org/10.1017/cbo9781139031103.
  * Ioannou et al. (2004) L. M. Ioannou, B. C. Travaglione, D. Cheung, and A. K. Ekert, Phys. Rev. A 70, 060303 (2004), URL https://link.aps.org/doi/10.1103/PhysRevA.70.060303.
  * Ioannou and Travaglione (2006) L. M. Ioannou and B. C. Travaglione, Phys. Rev. A 73, 052314 (2006), URL https://link.aps.org/doi/10.1103/PhysRevA.73.052314.
  * Ioannou (2006) L. M. Ioannou (2006), URL https://arxiv.org/abs/quant-ph/0603199.
  * Bengtsson and Życzkowski (2017) I. Bengtsson and K. Życzkowski, _Geometry of quantum states: an introduction to quantum entanglement_ (Cambridge university press, 2017).
  * Dür et al. (2000) W. Dür, G. Vidal, and J. I. Cirac, Phys. Rev. A 62, 062314 (2000), URL https://link.aps.org/doi/10.1103/PhysRevA.62.062314.
  * Verstraete et al. (2002) F. Verstraete, J. Dehaene, B. De Moor, and H. Verschelde, Phys. Rev. A 65, 052112 (2002), URL https://link.aps.org/doi/10.1103/PhysRevA.65.052112.
  * Lamata et al. (2007) L. Lamata, J. León, D. Salgado, and E. Solano, Phys. Rev. A 75, 022318 (2007), URL https://link.aps.org/doi/10.1103/PhysRevA.75.022318.
  * Sanz et al. (2016) M. Sanz, I. L. Egusquiza, R. D. Candia, H. Saberi, L. Lamata, and E. Solano, Scientific Reports 6 (2016), URL https://doi.org/10.1038/srep30188.
  * Hebenstreit et al. (2018) M. Hebenstreit, M. Gachechiladze, O. Gühne, and B. Kraus, Phys. Rev. A 97, 032330 (2018), URL https://link.aps.org/doi/10.1103/PhysRevA.97.032330.
  * Cortes and Vapnik (1995) C. Cortes and V. Vapnik, Machine learning 20, 273 (1995).
  * Bishop (2007) C. M. Bishop, _Pattern Recognition and Machine Learning (Information Science and Statistics)_ (Springer, 2007), 1st ed., ISBN 0387310738\.
  * Carleo and Troyer (2017) G. Carleo and M. Troyer, Science 355, 602 (2017), eprint https://www.science.org/doi/pdf/10.1126/science.aag2302, URL https://www.science.org/doi/abs/10.1126/science.aag2302.
  * Torlai et al. (2018) G. Torlai, G. Mazzola, J. Carrasquilla, M. Troyer, R. Melko, and G. Carleo, Nature Physics 14, 447 (2018), URL https://doi.org/10.1038/s41567-018-0048-5.
  * Carleo et al. (2019) G. Carleo, I. Cirac, K. Cranmer, L. Daudet, M. Schuld, N. Tishby, L. Vogt-Maranto, and L. Zdeborová, Rev. Mod. Phys. 91, 045002 (2019), URL https://link.aps.org/doi/10.1103/RevModPhys.91.045002.
  * Luchnikov et al. (2020) I. A. Luchnikov, S. V. Vintskevich, D. A. Grigoriev, and S. N. Filippov, Phys. Rev. Lett. 124, 140502 (2020), URL https://link.aps.org/doi/10.1103/PhysRevLett.124.140502.
  * Ma and Yung (2018) Y.-C. Ma and M.-H. Yung, npj Quantum Information 4 (2018), URL https://doi.org/10.1038/s41534-018-0081-3.
  * Lu et al. (2018) S. Lu, S. Huang, K. Li, J. Li, J. Chen, D. Lu, Z. Ji, Y. Shen, D. Zhou, and B. Zeng, Phys. Rev. A 98, 012315 (2018), URL https://link.aps.org/doi/10.1103/PhysRevA.98.012315.
  * Zhu et al. (2021) E. Y. Zhu, L. T. Wu, O. Levi, and L. Qian, arXiv preprint arXiv:2107.02301 (2021).
  * Géron (2019) A. Géron, _Hands-on machine learning with Scikit-Learn, Keras, and TensorFlow: Concepts, tools, and techniques to build intelligent systems_ (” O’Reilly Media, Inc.”, 2019).
  * Johansson et al. (2012) J. Johansson, P. Nation, and F. Nori, Computer Physics Communications 183, 1760 (2012), ISSN 0010-4655, URL https://www.sciencedirect.com/science/article/pii/S0010465512000835.
  * Johansson et al. (2013) J. Johansson, P. Nation, and F. Nori, Computer Physics Communications 184, 1234 (2013), ISSN 0010-4655, URL https://www.sciencedirect.com/science/article/pii/S0010465512003955.
  * Fasi and Robol (2020) M. Fasi and L. Robol, _Sampling the eigenvalues of random orthogonal and unitary matrices_ (2020), URL https://arxiv.org/abs/2009.11515.
  * TensorFlow Developers (2022) TensorFlow Developers, _Tensorflow_ (2022), URL https://zenodo.org/record/4724125.
  * Huber et al. (2021) F. Huber, I. Klep, V. Magron, and J. Volčič, _Dimension-free entanglement detection in multipartite werner states_ (2021), URL https://arxiv.org/abs/2108.08720.
  * Chruściński and Kossakowski (2006) D. Chruściński and A. Kossakowski, Phys. Rev. A 73, 062314 (2006), URL https://link.aps.org/doi/10.1103/PhysRevA.73.062314.
  * Abadi et al. (2015) M. Abadi, A. Agarwal, P. Barham, E. Brevdo, Z. Chen, C. Citro, G. S. Corrado, A. Davis, J. Dean, M. Devin, et al., _TensorFlow: Large-scale machine learning on heterogeneous systems_ (2015), software available from tensorflow.org, URL https://www.tensorflow.org/.
  * Pedregosa et al. (2011) F. Pedregosa, G. Varoquaux, A. Gramfort, V. Michel, B. Thirion, O. Grisel, M. Blondel, P. Prettenhofer, R. Weiss, V. Dubourg, et al., Journal of machine learning research 12, 2825 (2011).
  * GitHub (2022) GitHub, _Classification of four-qubit entangled states via machine learning: Source code_ , https://github.com/StephenVintskevich/qCSC (2022).
  * Stankus et al. (2022) P. Stankus, A. Nomerotski, A. Slosar, and S. Vintskevich, The Open Journal of Astrophysics 5 (2022), URL https://doi.org/10.21105/astro.2010.09100.
  * Khabiboulline et al. (2019a) E. T. Khabiboulline, J. Borregaard, K. De Greve, and M. D. Lukin, Phys. Rev. Lett. 123, 070504 (2019a), URL https://link.aps.org/doi/10.1103/PhysRevLett.123.070504.
  * Khabiboulline et al. (2019b) E. T. Khabiboulline, J. Borregaard, K. De Greve, and M. D. Lukin, Phys. Rev. A 100, 022316 (2019b), URL https://link.aps.org/doi/10.1103/PhysRevA.100.022316.
  * Graydon and Appleby (2016) M. A. Graydon and D. M. Appleby, Journal of Physics A: Mathematical and Theoretical 49, 33LT02 (2016), URL https://doi.org/10.1088/1751-8113/49/33/33lt02.
  * Graydon (2017) M. A. Graydon, arXiv preprint arXiv:1703.06800 (2017).
  * Graydon et al. (2021) M. A. Graydon, J. Skanes-Norman, and J. J. Wallman, _Clifford groups are not always 2-designs_ (2021), URL https://arxiv.org/abs/2108.04200.
  * Graydon et al. (2022) M. A. Graydon, J. Skanes-Norman, and J. J. Wallman, _Designing stochastic channels_ (2022), URL https://arxiv.org/abs/2201.07156.
  * Erhard et al. (2019) A. Erhard, J. J. Wallman, L. Postler, M. Meth, R. Stricker, E. A. Martinez, P. Schindler, T. Monz, J. Emerson, and R. Blatt, Nature Communications 10 (2019), URL https://doi.org/10.1038/s41467-019-13068-7.
  * Harper et al. (2020) R. Harper, S. T. Flammia, and J. J. Wallman, Nature Physics 16, 1184 (2020), URL https://doi.org/10.1038/s41567-020-0992-8.
  * Winick et al. (2021) A. Winick, J. J. Wallman, and J. Emerson, Phys. Rev. Lett. 126, 230502 (2021), URL https://link.aps.org/doi/10.1103/PhysRevLett.126.230502.
  * Horodecki et al. (2003) M. Horodecki, K. Horodecki, P. Horodecki, R. Horodecki, J. Oppenheim, A. Sen(De), and U. Sen, Phys. Rev. Lett. 90, 100402 (2003), URL https://link.aps.org/doi/10.1103/PhysRevLett.90.100402.
  * Gottesman et al. (2012) D. Gottesman, T. Jennewein, and S. Croke, Phys. Rev. Lett. 109, 070503 (2012), URL https://link.aps.org/doi/10.1103/PhysRevLett.109.070503.
  * Nomerotski et al. (2020) A. Nomerotski, P. Stankus, A. Slosar, S. Vintskevich, S. Andrewski, G. Carini, D. Dolzhenko, D. England, E. Figueroa, S. Gera, et al., in _Optical and Infrared Interferometry and Imaging VII_ , edited by P. G. Tuthill, A. Mérand, and S. Sallum, International Society for Optics and Photonics (SPIE, 2020), vol. 11446, pp. 290 – 306, URL https://doi.org/10.1117/12.2560272.
  * Zhuang and Zhang (2019) Q. Zhuang and Z. Zhang, Phys. Rev. X 9, 041023 (2019), URL https://link.aps.org/doi/10.1103/PhysRevX.9.041023.
  * Ghosh et al. (2019) S. Ghosh, A. Opala, M. Matuszewski, T. Paterek, and T. C. H. Liew, npj Quantum Information 5 (2019), URL https://doi.org/10.1038/s41534-019-0149-8.
  * Vintskevich and Grigoriev (2022) S. Vintskevich and D. Grigoriev, arXiv preprint arXiv:2201.07969 (2022).