# Adaptive Circuit Learning of Born Machine: Towards Realization of Amplitude
Embedding and Data Loading

Chun-Tse Li1,5 Hao-Chung Cheng1,2,3,4,5 1Department of Electrical Engineering
and Graduate Institute of
Communication Engineering, National Taiwan University, Taipei 106, Taiwan
(R.O.C.)  2Department of Mathematics, National Taiwan University, Taipei 106,
Taiwan (R.O.C.)  3Center for Quantum Science and Engineering, National Taiwan
University  4Physics Division, National Center for Theoretical Sciences,
Taipei 10617, Taiwan (R.O.C.)  5Hon Hai Quantum Computing Research Center,
Taipei, Taiwan

###### Abstract

With the progress in the quantum algorithm in recent years, much of the
existing literature claims the exponential quantum advantage against their
classical counterpart. However, many of these successes hinge on the
assumption that arbitrary states can be efficiently prepared in quantum
circuits. In reality, crafting a circuit to prepare a generic $n$-qubit
quantum state demands an operation count on the order of $\mathcal{O}(2^{n})$,
which is prohibitively demanding for the quantum algorithm to demonstrate its
advantage against the classical one. To tackle this data-loading problem,
numerous strategies have been put forward. Nonetheless, most of these
approaches only consider a very simple and easy-to-implement circuit
structure, which has been shown to suffer from serious optimization issues.

In this study, we harness quantum circuits as Born machines to generate
probability distributions. Drawing inspiration from methods used to
investigate electronic structures in quantum chemistry and condensed matter
physics, we present a novel algorithm ”Adaptive Circuit Learning of Born
Machine” (ACLBM) that dynamically expands the ansatz circuit. Our algorithm is
tailored to selectively integrate two-qubit entangled gates that best capture
the complex entanglement present within the target state. Empirical results
underscore the proficiency of our approach in encoding real-world data through
amplitude embedding, demonstrating not only compliance with but also
enhancement over the performance benchmarks set by previous research.

##  I Introduction

Over the past two decades, intensive research within the quantum computing
community has spurred rapid advancements in quantum algorithms, yielding
promising applications across diverse fields of study. These include solving
systems of linear equations [1, 2, 3, 4], Hamiltonian simulation [5, 6, 7, 8,
9, 10], the Quantum Approximation Optimization Algorithm [11, 12, 13], quantum
walks [14, 15], Quantum Principal Component Analysis [16], and Quantum Support
Vector Machines [17]. However, many of these quantum algorithms’ claims of
exponential speedup over their classical counterparts are contingent upon the
assumption that arbitrary quantum states can be efficiently prepared. In
reality, studies have shown that preparing generic quantum states requires
either $\mathcal{O}(2^{n}/n)$ circuit depth with $n$ qubits [18, 19, 20, 21]
or $\Theta(n)$ circuit depth with $\mathcal{O}(2^{n})$ ancillary qubits [22,
23, 24]. Only certain $d$-sparse quantum states can be prepared in
$\Theta(\log(nd))$ circuit depth, though this still necessitates
$\mathcal{O}(nd\log(d))$ ancillary qubits [24].

Despite the formidable complexity of state preparation, it remains an open
question whether some highly structured quantum states can be approximately
constructed with $\mathcal{O}(\textnormal{poly}(n))$ overhead. To address
this, several hybrid quantum-classical algorithms have been proposed. Quantum
Generative Adversarial Network (QGAN) [25, 26, 27] employ adversarial training
to minimize the distance between the distribution produced by a quantum
generator and the target distribution. Quantum Circuit Born Machine (QCBM)
[28] utilizes the squared maximum mean discrepancy (MMD) loss to assess the
distance between the model and target distribution in the kernel feature
space, and they construct the entanglement layer based on the Chow-Liu tree
[29]. Data Driven Quantum Circuit Learning (DDQCL) [30] applies negative log
likelihood as a loss function to train the quantum generator.

While these approaches have showcased promising results in numerical
experiments on simpler datasets and therefore claimed their scalability for
larger qubit applications, numerical experiments reveal their inability to
deliver satisfactory outcomes on more intricate and extensive datasets. The
noticeable decline in performance with an increasing problem size can likely
be traced back to the simplistic circuit structure initially devised for
addressing ground state issues in small molecules [31]. This structure, while
straightforward to implement and agnostic to the specific problem, faces
substantial optimization challenges. This issue, commonly referred to as
barren plateaus, is characterized by a significant reduction in gradient
magnitude as the number of qubits increases and the circuit depth grows,
leading to an exponential decrease in the gradient [32]. Furthermore, the
absence of a data-driven approach in the circuit design process leads to
concerns regarding the efficient use of two-qubit gates. The current
methodology applies a uniform circuit structure, irrespective of the specific
entanglement characteristics of the state being prepared. This one-size-fits-
all strategy may not be necessary, particularly for states that exhibit only
weak entanglement. Consequently, the indiscriminate use of a linear structure
of two-qubit entangled layers across all qubits could be considered an
inefficient allocation of quantum resources.

Conversely, the adaptive circuit structure ansatz, and in particular, the
ADAPT-VQE method, as outlined in [33, 34], has attracted considerable interest
from the quantum computing community. The ADAPT-VQE iteratively builds the
ansatz by selectively incorporating operators, which function as generators of
unitary transformations, from a predetermined operator pool based on their
gradient magnitudes. This innovative strategy results in the creation of
remarkably compact ansatz, delivering superior precision when compared to
previous methodologies referenced in [35, 36, 37]. Additionally, numerical
evidence indicates that ansatz produced by this algorithm are resistant to
barren plateaus, offering a more favorable scenario for optimization tasks.
Recently, there are some similar algorithms that have been proposed to tackle
other challenges, such as quantum machine learning [38] and quantum circuit
compilation [39, 40]. However, it is unclear whether adaptive circuit learning
can be effectively applied to quantum data loading.

In this study, we embrace the principles of the adaptive circuit learning
framework and introduce an algorithm ”Adaptive Circuit Learning of Born
Machine” (ACLBM) designed to iteratively build an ansatz circuit that is
uniquely suited to the problem, while also being compact and efficient in
terms of parameters. We extensively benchmark the performance of our model
against a variety of datasets, as well as compare it with existing approaches
in the literature. Specifically, we focus on representing real-world datasets,
such as image data, utilizing the amplitude embedding method. This method
involves encoding the image information into the $2^{n}$ amplitudes of an
$n$-qubit state. Our numerical experiments reveal that our method surpasses
current techniques [27, 28, 30] by requiring fewer parameters and yielding
more accurate results, showcasing an exceptional capability to discern the
intrinsic correlations within image data with a parameter count of only
$\mathcal{O}(\textnormal{poly}(n))$.

##  II Results

###  II.1 Problem formulation

For a generic probability distribution, we construct the dataset
$\mathcal{D}=\\{x^{1},...,x^{N}\\}$ with samples drawn independently and
identically distributed $(i.i.d.)$ from an unknown distribution $p_{d}(x)$. We
then use this dataset to empirically reconstruct an approximated probability
mass function (PMF) through the following equation:

$p(x)=\frac{1}{N}\sum_{i}\mathbbm{1}\\{x^{i}=x\\}\approx p_{d}(x),$ (1)

where $\mathbbm{1}\\{x^{i}=x\\}$ is an indicator function. While for real-
world datasets, such as images or time-sequential signals, we directly flatten
them into one-dimensional vectors (if necessary) and normalize them to conform
to a probability distribution $p(x)$.

Given the target distribution $p(x)$, we aim to recover the state in the
following form:

$|\Psi^{\star}\rangle=\sum_{x}\sqrt{p(x)}|x\rangle,$ (2)

so that, according to the Born rule, the probability of measuring a specific
computational basis $\\{|x\rangle\\}_{x}$ is

$|\langle x|\Psi^{\star}\rangle|^{2}=p(x).$ (3)

Our objective is to find a unitary $U(\bm{\theta})$ that can well recover the
target probability distribution when we measure on the computational basis,

$\text{Tr}\left(|x\rangle\langle x|U(\bm{\theta})|0\rangle\langle 0|^{\otimes
n}U^{\dagger}(\bm{\theta})\right)=q_{\bm{\theta}}(x)\approx p(x).$ (4)

###  II.2 Loss criterion

In generative learning, the Kullback–Leibler (KL) divergence is a standard
metric for measuring the discrepancy between two probability distributions. It
is defined as:

$\mathcal{L}(\bm{\theta})=D_{\text{KL}}(p\|q_{\bm{\theta}})=\sum_{x}p(x)\log\frac{p(x)}{q_{\bm{\theta}}(x)}.$
(5)

Numerically, the KL divergence effectively characterizes the distance between
distributions across any dimensionality without suffering from diminishing
values as the problem size increases.

###  II.3 Adaptive circuit learning algorithm

Figure 1: Graphical illustration of the Adaptive Circuit Learning of Born
Machine (ACLBM) process. The upper portion of the diagram outlines the quantum
data loading framework, where a quantum circuit, functioning as a Born
machine, generates a probability distribution. This distribution is then
utilized to compute the Kullback-Leibler (KL) divergence, serving as the loss
function, which is subsequently minimized by a classical optimizer to update
the circuit parameters. The lower portion delineates the adaptive learning
workflow. At each epoch, a set of $N_{o}$ operators is selected and
incorporated into the current circuit configuration. A reoptimization of all
parameters follows. The optimization cycle concludes once the convergence
criterion – specifically, when the $L_{2}$ norm of the gradient vector
$\|\bm{g}\|_{2}$ – is less than $\epsilon_{2}$. The entire procedure
terminates when the maximum gradient among the selected operators is below
$\epsilon_{1}$, ensuring the algorithm’s progression towards a precise
solution without perturbing the state, as gradients are evaluated at
$\theta_{i}=0$.

In this section, we describe the steps of the adaptive circuit learning
algorithm in detail. Readers are referred to Fig. 1 for a schematic workflow.
Operator pool. The first step in the adaptive circuit learning algorithm is to
establish a self-defined operator pool. Grimsley et al.’s foundational ADAPT-
VQE work [33] chooses a pool comprising fermionic single and double excitation
operators, drawing from the UCC ansatz [36]. This method capitalizes on
unitary coupled cluster theory, integrating physical intuition into the
operator selection process. However, our problem’s context lacks such physical
motivations for constructing the operator pool, prompting a shift towards
alternative methodologies. The qubit-ADAPT-VQE, proposed by Tang et al. [34],
presents a more fitting approach for our scenario. Tang et al. [34] have
demonstrated that a pool with a minimal number of $2n-2$ operators is
complete, capable of generating any arbitrary quantum state. Despite this, our
numerical simulations reveal that the exact pool of $2n-2$ operators suggested
in [34] does not consistently yield satisfactory results. We surmise that this
might be attributed to the fact that nearest-neighbor unitary operations
struggle to effectively propagate interactions between distant qubits as the
problem size increases. To address this, we have expanded their operator pool
to encompass any pairs of qubits, specifically focusing on unitary operators
with matrix elements that are solely real.

$\displaystyle e^{-i\theta Z_{i}\otimes Y_{j}/2}$
$\displaystyle=\begin{pmatrix}\cos\frac{\theta}{2}&-\sin\frac{\theta}{2}&0&0\\\
\sin\frac{\theta}{2}&\cos\frac{\theta}{2}&0&0\\\
0&0&\cos\frac{\theta}{2}&\sin\frac{\theta}{2}\\\
0&0&-\sin\frac{\theta}{2}&\cos\frac{\theta}{2}\end{pmatrix}\hskip
8.5359pt\forall i\neq j,$ $\displaystyle e^{-i\theta X_{i}\otimes Y_{j}/2}$
$\displaystyle=\begin{pmatrix}\cos\frac{\theta}{2}&0&0&-\sin\frac{\theta}{2}\\\
0&\cos\frac{\theta}{2}&\sin\frac{\theta}{2}&0\\\
0&-\sin\frac{\theta}{2}&\cos\frac{\theta}{2}&0\\\
\sin\frac{\theta}{2}&0&0&\cos\frac{\theta}{2}\end{pmatrix}\hskip
8.5359pt\forall i\neq j,$ $\displaystyle C_{i}R_{Y_{j}}(\theta)$
$\displaystyle=\begin{pmatrix}1&0&0&0\\\ 0&1&0&0\\\
0&0&\cos\frac{\theta}{2}&-\sin\frac{\theta}{2}\\\
0&0&\sin\frac{\theta}{2}&\cos\frac{\theta}{2}\end{pmatrix}\hskip
8.5359pt\forall i\neq j,$ $\displaystyle R_{Y_{i}}(\theta)$
$\displaystyle=\begin{pmatrix}\cos\frac{\theta}{2}&-\sin\frac{\theta}{2}\\\
\sin\frac{\theta}{2}&\cos\frac{\theta}{2}\end{pmatrix}\hskip 22.76228pt\forall
i.$ (6)

We have selected the real unitary approach, a decision grounded in the
observation that when the generator is real (take $Z_{i}X_{j}$ as an example),
constraining our state to be real results in a zero gradient. For a
comprehensive proof of this, please refer to Appendix. B.
Ansatz initialization. As we can see in the previous section, the majority of
the loss functions presented involve the model probability in the denominator.
This can potentially result in an explosion of values for both the loss
function and its gradient, posing a significant challenge during optimization.
To circumvent this issue, we initialize our quantum state to be an equal
superposition, achieved by applying a set of
$R_{Y}(\theta)|_{\theta=\frac{\pi}{2}}$ gates to each qubit. Furthermore, we
allow these initial parameters to be trainable in the subsequent optimization
phase.
Gradient evaluation. In the second step, we compute the gradient of the
operator within the pool. Previous studies [36, 34] have demonstrated that the
gradient can be derived using the commutation relationship between the
Hamiltonian $H$ and the generator $P_{i}$:

$\frac{\partial\langle
H\rangle_{\bm{\theta}}}{\partial\theta^{i}}\biggr{|}_{\theta^{i}=0}=-\frac{i}{2}\langle\psi(\bm{\theta})|[H,P_{i}]|\psi(\bm{\theta})\rangle.$
(7)

However, in our case, we do not possess a defined Hamiltonian. As detailed in
Appendix. A, we establish that the gradient can be precisely calculated using
the parameter-shift rule [41, 42]. This allows us to append the unitary
directly to the circuit and utilize three quantum evaluations to compute the
exact gradient:

$\frac{\partial\mathcal{L}(\bm{\theta})}{\partial\theta^{i}}=-\sum_{x}\frac{p(x)}{q_{\bm{\theta}}(x)}\biggl{(}q_{\bm{\theta}+\frac{\pi}{2}\bm{e}_{i}}(x)-q_{\bm{\theta}-\frac{\pi}{2}\bm{e}_{i}}(x)\biggr{)}.$
(8)

Notice that if the largest gradient is less than the threshold, say,
$\epsilon_{1}$ we simply terminate our algorithm.

Figure 2: Benchmark comparisons for the generic probability distribution
across different models. This figure illustrates the benchmarking of various
quantum generative models, with QGAN [27] (purple), QCBM [28] (blue), DDQCL
[30] (green), and the proposed ACLBM (red). The top row represents the results
for the log-normal distribution, followed by the bimodal distribution in the
second row, and the triangular distribution in the third. The bottom row
charts the KL divergence over the number of epochs. Benchmark models employ
circuits with 10 layers, totaling 330 parameters. In contrast, the proposed
ACLBM model demonstrates superior accuracy as well as parameter efficiency
with only 93, 45, and 87 parameters for the respective distributions. Figure
3: Benchmark comparisons on the Bars and Stripes (BAS) dataset. From top to
bottom rows, we present BAS $2\times 2$, BAS $3\times 3$, BAS $4\times 4$, and
the KL-divergence respectively. For the $2\times 2$ BAS dataset, almost all
models can perfectly fit the distribution. However, in the $3\times 3$ BAS,
the performance of QGAN [27] begins to deteriorate as adversarial training
fails to capture the features of the 9-qubit data. In the $4\times 4$ BAS,
QCBM [28] also suffers from optimization issues, failing to approximate the
distribution accurately. In contrast, our model, ACLBM, maintains robustness
and exhibits a very fast convergence rate, even with data comprising 65,536
dimensions.

Operator selection. Upon calculating the gradients for each operator, we
proceed to choose the top $N_{o}$ operators based on their gradient
magnitudes. While previous literature, such as the works by Romero et al. [36]
and Tang et al. [34], has typically set $N_{o}$ to 1, our numerical
experiments indicate that a moderately larger $N_{o}$ often enhances
performance. This approach not only yields better results but also reduces the
necessity of repeatedly evaluating the gradients within the operator pool.
Additionally, in scenarios involving extremely sparse distributions, a larger
$N_{o}$ becomes crucial to ensure convergence of the algorithm.
Optimization. We incorporate the chosen operator into our ansatz and proceed
to optimize all the parameters until convergence is achieved. The convergence
criterion is defined as the gradient norm $\|\bm{g}\|_{2}$ falling below a
specified threshold $\epsilon_{2}$.

##  III Numerical experiments

In this section, we present an extensive study through numerical simulations
conducted on various datasets. To ensure a fair comparison, we have adhered
closely to the experimental settings outlined in the original works [27, 28,
30], with minor modifications to the circuit architecture to enhance
performance. The circuit architecture for comparative models incorporates a
sequence of $k+1$ layers of single qubit rotation
$R_{X}(\theta_{i,1})R_{Y}(\theta_{i,2})R_{X}(\theta_{i,3})$ alternated with
$k$ layers of entanglement layer. For the Quantum Circuit Born Machine (QCBM)
[28], the entanglement layers are structured based on the Chow-Liu Tree [29].
In contrast, the entanglement strategy for Quantum Generative Adversarial
Networks (QGAN) [27] and Data-Driven Quantum Circuit Learning (DDQCL) [30]
involves a simpler arrangement where controlled-Z (CZ) gates connect each
qubit $i$ with its neighbor $(i+1)\text{ mod }n$. We use ADAM optimizer [43],
commonly used in the deep learning community, to optimize the model. In order
to rule out the detrimental effect on the finite shot noise, which could
obscure the true performance of different models, all experiments are
conducted under the assumption that the exact probability distribution of the
model, $q_{\bm{\theta}}(x)$, is precisely calculable. This is equivalent to
performing an infinite number of measurements. For each experiment, we
conducted 20 independent trials and selected the best result for inclusion in
our plots. All implementations were carried out using PennyLane [44],
interfaced with PyTorch [45].

###  III.1 Generic probability distribution

We commenced our evaluation with an assessment of our algorithm on a range of
generic probability distributions, which were initially utilized as benchmarks
in works by Benedetti et al. [30] and Liu et al. [28]. It is noteworthy that
these distributions are highly structured and can be specified by a limited
number of parameters; consequently, it remains unclear whether there are any
efficient techniques specifically tailored for preparing these distributions.

Our analysis focuses on a 10-qubit dataset, examining a log-normal
distribution with parameters $\mu=5.5,\sigma=0.9$, a bimodal distribution with
$\sigma_{1}=\sigma_{2}=128,\mu_{1}=\frac{2}{7}\cdot
1024,\mu_{2}=\frac{5}{7}\cdot 1024$, and a triangular distribution with a
lower limit $l=0$, upper limit $u=1023$ and mode $m=256$. For the benchmark
models, the number of circuit layers is set to $k=10$, with a total of 330
parameters. As for our model, the number of operators is set to $N_{o}=3$. Our
numerical simulations suggest that while each model can accurately prepare
quantum states in datasets with a lower number of qubits, their performance
significantly weakens as the problem scale increases. In contrast, our model
(ACLBM) exhibits robustness, consistently achieving an excellent fit with the
target distribution. The detailed comparison is shown in Fig. 2.

Figure 4: Representative patterns from the $4\times 4$ Bars and Stripes (BAS)
dataset. This subset includes all permissible configurations of horizontal
bars and vertical stripes. Among the $2^{16}=65536$ possible patterns for a
$4\times 4$ grid, only 30 constitute valid BAS patterns. Figure 5: Benchmark
comparisons on the real image dataset. For QGAN [27], QCBM [28] , and DDQCL
[30], we terminate the optimization loop if the gradient norm falls below
$10^{-3}$. For our model, we set the threshold at $5\times 10^{-3}$. From the
figure, it is evident that only our model (ACLBM) captures features
recognizable visually, while the other three models do not. We observe that
QGAN suffers from catastrophic optimization issues; the losses of the
generator and discriminator are extremely unstable, causing the KL divergence
to increase as the iteration proceeds.

###  III.2 Bars and Stripes

The Bars and Stripes (BAS) dataset [46, 47, 30] is a set of binary images that
are foundational for benchmarking generative models in both classical deep
learning and quantum machine learning. Images in BAS display unique patterns
of horizontal bars or vertical stripes within a grid, with ‘on’ pixels (1’s)
forming the bars or stripes and ‘off’ pixels (0’s) as the background. Due to
its binary and combinatorial nature, the BAS dataset serves as a prime
candidate for evaluating the ability of generative algorithms to learn and
replicate distinct, structured patterns, thus providing insight into the
learning model’s capabilities to capture data distributions effectively. All
patterns of BAS $4\times 4$ dataset is shown in Fig. 4.

The BAS datasets serve as an excellent testing ground for the entangling
capabilities of quantum circuits. This is because finding a close
approximation of BAS distributions is nearly impossible using only product
states. Our model reflects this challenge; in each epoch, a higher number of
operators must be selected to ensure satisfactory convergence.

In our investigation, we examine the $2\times 2$, $3\times 3$, and $4\times 4$
configurations of the BAS dataset, which correspond to quantum problems
involving 4, 9, and 16 qubits, respectively. For the comparative benchmark
models, the quantum circuit depth is set with $k=4$ layers for the $2\times 2$
case, $k=10$ for the $3\times 3$ case, and $k=20$ for the $4\times 4$ case.
The total number of adjustable parameters for these configurations is 60, 297,
and 1008, respectively. In contrast, ACLBM employs a variable number of
operators, selecting $N_{o}=3$ for the $2\times 2$ case, $N_{o}=45$ for the
$3\times 3$ case, and $N_{o}=300$ for the $4\times 4$ case in each
optimization epoch.

Our numerical experiments given in Fig. 3, indicate QCBM [28], DDQCL [30], and
ACLBM are all capable of finding a robust approximation of the BAS
distribution, showing consistency across different experimental trials. On the
other hand, QGAN [27] exhibits challenges in approximating the distribution
when scaling to larger problem sizes, frequently converging to random quantum
states rather than the intended distribution. This phenomenon underscores the
inherent difficulties and instabilities associated with generative learning,
which often requires meticulous selection of hyperparameters and strategic
initializations to achieve robustness across varying trials.

###  III.3 Real images

We demonstrate ACLBM’s capability for realizing amplitude embedding, a crucial
task in quantum machine learning, where image datasets are encoded into the
$2^{n}$ amplitudes of quantum states. In contrast to previously considered
distributions that are defined by a limited number of parameters or are sparse
relative to the total dimensionality, image datasets intrinsically present a
greater challenge for quantum representation due to their encoding of
exponentially more information.

We evaluate three $256\times 256$ pixel images, corresponding to a 16-qubit
system. These images are flattened into 65536-dimensional vectors and
normalized to our target distribution $\\{p(x)\\}_{x=0}^{65535}$. For
benchmark models, we set the circuit depth to $k=20$ layers, entailing a total
of 1,008 parameters. In our approach, $N_{o}=3$ generators are selected in
each epoch for circuit construction.

Numerical experiments given in Fig. 5 reveal that, with the exception of our
model, other approaches fail to capture the distribution of real-image
datasets, resulting in outputs that are indistinguishable to the human eye. In
contrast, although the images generated by our model are somewhat blurred,
they retain identifiable features that can be recognized visually. These
results manifest the significance of a well-tailored circuit design for
accurately approximating complex distributions in quantum machine learning.

It is important to note that the Maximum Mean Discrepancy (MMD) loss function
employed by the QCBM [28] is less effective as a loss criterion for larger
datasets. While it can measure distribution differences in smaller-scale
problems effectively, the MMD loss does not adequately reflect discrepancies
in image datasets. As indicated in Table. 1, a low MMD value does not
necessarily correlate with an accurate approximation of the target
distribution, often leading to a misleading representation of model
performance.

(a)

(b)

Figure 6: The effect of varying the number of operators, $N_{o}$, on the
performance of ACLBM with different datasets. (a) For the densely populated
real image 1 dataset, a higher $N_{o}$ leads to faster convergence with fewer
epochs required: 250 epochs for $N_{o}=1$, 145 for $N_{o}=3$, and 85 for
$N_{o}=5$, while using 250, 435, and 425 parameters, respectively. (b) For the
sparser BAS $4\times 4$ dataset, the number of epochs to convergence decreases
significantly with an increase in $N_{o}$ : 18 epochs for $N_{o}=3$, 7 for
$N_{o}=30$, and only 1 for $N_{o}=300$, corresponding to a parameter count of
54, 210, and 300, respectively.

###  III.4 Discussions

Number of operators.
We explore the impact of varying the number of operators, $N_{o}$, per epoch
on the performance of the Adaptive Circuit Learning of Born Machine (ACLBM).
As illustrated in Fig. 6, when applied to a dense distribution (specifically,
the real image 1 dataset in our study), a moderate increase in $N_{o}$ above 1
slightly enhances both performance and convergence rate. Notably, performance
appears to saturate at $N_{o}=3$. While the $N_{o}=5$ setting achieves faster
convergence and requires fewer parameters than the $N_{o}=3$ scenario, the
overall converged KL divergence for these two settings is comparable. In the
case of sparse distributions, exemplified by the BAS $4\times 4$ dataset, a
larger $N_{o}$ is essential to ensure convergence. With $N_{o}=3$, convergence
is notably sluggish, and the final KL divergence hovers around 1.5. However,
as $N_{o}$increases to 30 or even 300, we see a marked acceleration in
convergence and an improved KL divergence. This effect likely stems from the
BAS dataset’s inherent need for long-range entanglement, where a smaller
$N_{o}$ provides insufficient entanglement range, leading to subpar
distribution approximation.
Adjustable learning rate.
To ensure stability and rapid convergence of our model, we adopt an adjustable
learning rate, reassigning it a new value at the start of each epoch. This
approach prevents the loss function from fluctuating, which commonly occurs
when a constant learning rate is too high near convergence. Specifically, we
base our learning rate on the norm of the gradient of selected operators,
setting it as follows:

$\text{lr}=\alpha\cdot\frac{\|\bm{g}\|_{2}}{\sqrt{N_{o}}}.$ (9)

Here, $\alpha$ is a scaling factor, generally chosen between 0.1 to 0.5, and
$\|\bm{g}\|_{2}$ is the 2-norm of the gradient vector $\bm{g}$. This strategy
allows the learning rate to adapt dynamically, promoting fast and stable
convergence.

(a)

(b)

Figure 7: Quantum mutual information and entanglement of formation for two
different datasets. The axes correspond to qubit indices, and the correlation
is evaluated on two-qubit subsystems of the target state
$|\Psi^{\star}\rangle$ in Eq. (2). The color scale indicates the strength of
the correlation, with brighter colors denoting stronger correlations and
darker colors indicating weaker ones. Panel (a) shows the entanglement
correlation for a real image dataset, where both quantum mutual information
and entanglement of formation identify pairs of qubits with strong
correlations. Quantum mutual information generally indicates a smoother
transition than entanglement of formation. Panel (b) displays the entanglement
correlation for the BAS $4\times 4$ dataset. Here, only quantum mutual
information reflects the two-qubit correlation, whereas entanglement of
formation registers zero correlation, suggesting that the BAS dataset may
exhibit long-range entanglement, rendering two-qubit subsystem entanglement of
formation immeasurable.

(a)

(b)

Figure 8: Effect of operator pool reduction for different datasets. (a) For
the real image 1 dataset, reduction rates from 0 to 0.6 were tested. Results
indicate that reduction rates between 0.1 to 0.3 do not significantly impact
the convergence of KL divergence. However, higher reduction rates result in a
faster performance deterioration. (b) For the BAS $4\times 4$ dataset, a
reduction rate of 0.5 was selected based on the sharp transition in mutual
information observed in Fig. 7, targeting qubit pairs with strong
correlations. Post-reduction, the reduced number of operators with significant
gradients decrease $N_{o}$ from 300 to 175. This adjustment led to a
requirement for more iterations to achieve convergence and a slight decrease
in performance.

Operator Pool Reduction.
Our algorithm, as it currently stands, evaluates the gradients of
$\mathcal{O}(n^{2})$ operators at each epoch. Yet, in certain distributions,
specific qubit pairs may contribute more significantly to the overall quantum
correlation than others. In such cases, we can streamline the operator pool by
retaining only those operators that act on highly correlated qubit pairs,
thereby eliminating the less contributory ones. There are numerous methods to
assess the correlation between two qubits in a subsystem. In this study, we
employ quantum mutual information and the entanglement of formation (detailed
discussion can be found in Appendix. C) — both of which have well-defined
expressions in the two-qubit scenario—to discern correlation patterns, here we
take real image 1 and BAS $4\times 4$ dataset for example, the correlation
between different qubit pairs can be seen in Fig. 7.

Fig. 8 illustrates the effects of reducing the operator pool within our
adaptive circuit learning framework. We define the reduction rate $r$ as the
threshold for selecting two-qubit operators based on their correlation
relative to the maximum observed correlation in the system:

$\mathcal{P}_{r}=\left\\{G_{ij}\in\mathcal{P}\,\middle|\,I(q_{i},q_{j})\geq
r\cdot I_{\text{max}}\right\\}\cup\left\\{G_{i}\in\mathcal{P}\right\\},$ (10)
$I_{\text{max}}=\max_{ij}I(q_{i},q_{j}),$ (11)

where $\mathcal{P}_{r}$ represents the reduced operator pool, $\mathcal{P}$
denotes the original full pool, and $I(q_{i},q_{j})$ is the quantum mutual
information between qubits indexed $i$ and $j$. Here, $G_{ij}$ symbolizes the
two-qubit gates and $G_{i}$ the single-qubit gates. This methodical reduction
of the operator pool aims to retain only the most impactful gates, thereby
streamlining the learning process while preserving the ability to capture
essential quantum correlations. Fig. 8(a) presents experiments with reduction
rates ranging from 0 to 0.6 for the real image 1 dataset. We observe that
reduction rates up to 0.3 do not adversely affect the convergence of KL
divergence, implying that moderate operator pruning is viable without
significantly deteriorating the algorithm’s performance. However, higher
reduction rates result in a rapid decline in effectiveness.

For the BAS $4\times 4$ dataset, shown in Fig. 8(b), we observe a stark
transition in quantum mutual information. Consequently, we implemented a
reduction rate of 0.5 to pinpoint operator pairs with heightened correlations.
This selection, although it narrows the pool of operators, necessitates
increasing $N_{o}$ to 175, reflecting a strategic adjustment to a smaller set
of operators with stronger gradients. Despite this modification, the algorithm
demands a greater number of iterations to achieve convergence, with a marginal
reduction in performance. These results elucidate the nuanced advantages and
potential drawbacks of reducing the operator pool and accentuate the
importance of strategic operator selection informed by quantum correlation
metrics to sustain algorithmic performance.

##  IV Conclusions

In this work, we have introduced an adaptive circuit learning algorithm
inspired by the ADAPT-VQE methodology, extending its principles to address the
challenges of quantum data loading. Our innovative approach has demonstrated
exceptional adaptability and robustness across a variety of datasets,
including generic probability distributions, the Bars and Stripes (BAS)
patterns, and real-world image data, showcasing significant improvements over
existing methods.

Specifically, our algorithm’s ability to capture the intricate correlations
present in image data using amplitude embedding has proven to be particularly
effective. We have shown that it not only achieves superior performance in
terms of convergence and precision but also overcomes the limitations
typically associated with the entanglement range in other models. Moreover,
our results highlight the critical importance of choosing an adequate number
of operators and a dynamic learning rate to ensure the algorithm’s efficiency
and accuracy.

The challenges encountered with QGAN [27] and QCBM [28] in larger problem
sizes emphasize the need for careful hyperparameter selection and the design
of circuit architectures that can cope with the complexity of the data
involved. Our findings also suggest that while the MMD loss function is
suitable for smaller datasets, it may not be the best fit for larger or more
complex distributions, as seen with real image datasets.

Looking ahead, our study opens up several avenues for future exploration. One
area of particular interest is the refinement of the adaptive circuit learning
framework to further optimize parameter efficiency and convergence rates.
Another promising direction is the investigation of different loss functions
and their impact on the model’s ability to approximate complex distributions
more accurately. Additionally, our work offers compelling evidence that
certain highly structured quantum states, which are characterized by a limited
number of parameters, can be efficiently prepared using a relatively small
number of gates. This raises the intriguing question of whether there is a
deterministic algorithm that can directly acquire the gates to prepare these
states, instead of relying on an adaptive method to select them. It is also
currently unknown what precision of amplitude embedding is necessary for the
approximation to be meaningful. Is a very precise quantum state required, or
are states that capture the most critical features sufficient? We expect that
further theoretical work is required to answer these questions.

As quantum computing continues to advance, the algorithms and techniques
developed for quantum data loading will play a crucial role in harnessing the
full potential of quantum resources. Our work represents a significant step
toward achieving this goal, providing a robust foundation for future research
in the field of quantum machine learning.

## Acknowledgements

H.-C. Cheng is supported by the Young Scholar Fellowship (Einstein Program) of
the Ministry of Science and Technology, Taiwan (R.O.C.) under Grants No. NSTC
111-2636-E-002-026, No. NSTC 112-2636-E-002-009, No. NSTC 112-2119-M-007-006,
No. NSTC 112-2119-M-001-006, No. NSTC 112-2124-M-002-003, by the Yushan Young
Scholar Program of the Ministry of Education, Taiwan (R.O.C.) under Grants No.
NTU-111V1904-3, No. NTU-112V1904-4, and by the research project “Pioneering
Research in Forefront Quantum Computing, Learning and Engineering” of National
Taiwan University under Grant No. NTC-CC-112L893405. H.-C. Cheng acknowledges
support from the “Center for Advanced Computing and Imaging in Biomedicine
(NTU-112L900702)” through the Featured Areas Research Center Program within
the framework of the Higher Education Sprout Project by the Ministry of
Education (MOE) in Taiwan.

## References

  * Harrow  _et al._ [2009] A. W. Harrow, A. Hassidim, and S. Lloyd, Physical review letters 103, 150502 (2009).
  * Childs [2009] A. M. Childs, Nature Physics 5, 861 (2009).
  * Clader  _et al._ [2013] B. D. Clader, B. C. Jacobs, and C. R. Sprouse, Physical review letters 110, 250504 (2013).
  * Lloyd  _et al._ [2013] S. Lloyd, M. Mohseni, and P. Rebentrost, arXiv preprint arXiv:1307.0411 (2013).
  * Childs and Wiebe [2012] A. M. Childs and N. Wiebe, arXiv preprint arXiv:1202.5822 (2012).
  * Berry  _et al._ [2015a] D. W. Berry, A. M. Childs, R. Cleve, R. Kothari, and R. D. Somma, Physical review letters 114, 090502 (2015a).
  * Berry  _et al._ [2015b] D. W. Berry, A. M. Childs, and R. Kothari, in  _2015 IEEE 56th annual symposium on foundations of computer science_ (IEEE, 2015) pp. 792–809.
  * Low and Chuang [2017] G. H. Low and I. L. Chuang, Physical review letters 118, 010501 (2017).
  * Low and Chuang [2019] G. H. Low and I. L. Chuang, Quantum 3, 163 (2019).
  * Gilyén  _et al._ [2019] A. Gilyén, Y. Su, G. H. Low, and N. Wiebe, in  _Proceedings of the 51st Annual ACM SIGACT Symposium on Theory of Computing_ (2019) pp. 193–204.
  * Farhi  _et al._ [2014] E. Farhi, J. Goldstone, and S. Gutmann, arXiv preprint arXiv:1411.4028 (2014).
  * Zhou  _et al._ [2020] L. Zhou, S.-T. Wang, S. Choi, H. Pichler, and M. D. Lukin, Physical Review X 10, 021067 (2020).
  * Hadfield  _et al._ [2019] S. Hadfield, Z. Wang, B. O’gorman, E. G. Rieffel, D. Venturelli, and R. Biswas, Algorithms 12, 34 (2019).
  * Childs  _et al._ [2003] A. M. Childs, R. Cleve, E. Deotto, E. Farhi, S. Gutmann, and D. A. Spielman, in  _Proceedings of the thirty-fifth annual ACM symposium on Theory of computing_ (2003) pp. 59–68.
  * Magniez  _et al._ [2007] F. Magniez, M. Santha, and M. Szegedy, SIAM Journal on Computing 37, 413 (2007).
  * Lloyd  _et al._ [2014] S. Lloyd, M. Mohseni, and P. Rebentrost, Nature Physics 10, 631 (2014).
  * Rebentrost  _et al._ [2014] P. Rebentrost, M. Mohseni, and S. Lloyd, Physical review letters 113, 130503 (2014).
  * Barenco  _et al._ [1995] A. Barenco, C. H. Bennett, R. Cleve, D. P. DiVincenzo, N. Margolus, P. Shor, T. Sleator, J. A. Smolin, and H. Weinfurter, Physical review A 52, 3457 (1995).
  * Vartiainen  _et al._ [2004] J. J. Vartiainen, M. Möttönen, and M. M. Salomaa, Physical review letters 92, 177902 (2004).
  * Shende  _et al._ [2005] V. V. Shende, S. S. Bullock, and I. L. Markov, in  _Proceedings of the 2005 Asia and South Pacific Design Automation Conference_ (2005) pp. 272–275.
  * Plesch and Brukner [2011] M. Plesch and Č. Brukner, Physical Review A 83, 032302 (2011).
  * Sun  _et al._ [2023] X. Sun, G. Tian, S. Yang, P. Yuan, and S. Zhang, IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems (2023).
  * Rosenthal [2021] G. Rosenthal, arXiv preprint arXiv:2111.07992 (2021).
  * Zhang  _et al._ [2022] X.-M. Zhang, T. Li, and X. Yuan, Physical Review Letters 129, 230504 (2022).
  * Dallaire-Demers and Killoran [2018] P.-L. Dallaire-Demers and N. Killoran, Physical Review A 98, 012324 (2018).
  * Lloyd and Weedbrook [2018] S. Lloyd and C. Weedbrook, Physical review letters 121, 040502 (2018).
  * Zoufal  _et al._ [2019] C. Zoufal, A. Lucchi, and S. Woerner, npj Quantum Information 5, 103 (2019).
  * Liu and Wang [2018] J.-G. Liu and L. Wang, Physical Review A 98, 062324 (2018).
  * Chow and Liu [1968] C. Chow and C. Liu, IEEE transactions on Information Theory 14, 462 (1968).
  * Benedetti  _et al._ [2019] M. Benedetti, D. Garcia-Pintos, O. Perdomo, V. Leyton-Ortega, Y. Nam, and A. Perdomo-Ortiz, npj Quantum Information 5, 45 (2019).
  * Kandala  _et al._ [2017] A. Kandala, A. Mezzacapo, K. Temme, M. Takita, M. Brink, J. M. Chow, and J. M. Gambetta, nature 549, 242 (2017).
  * McClean  _et al._ [2018] J. R. McClean, S. Boixo, V. N. Smelyanskiy, R. Babbush, and H. Neven, Nature communications 9, 4812 (2018).
  * Grimsley  _et al._ [2019] H. R. Grimsley, S. E. Economou, E. Barnes, and N. J. Mayhall, Nature communications 10, 3007 (2019).
  * Tang  _et al._ [2021] H. L. Tang, V. Shkolnikov, G. S. Barron, H. R. Grimsley, N. J. Mayhall, E. Barnes, and S. E. Economou, PRX Quantum 2, 020310 (2021).
  * Taube and Bartlett [2006] A. G. Taube and R. J. Bartlett, International journal of quantum chemistry 106, 3393 (2006).
  * Romero  _et al._ [2018] J. Romero, R. Babbush, J. R. McClean, C. Hempel, P. J. Love, and A. Aspuru-Guzik, Quantum Science and Technology 4, 014008 (2018).
  * Lee  _et al._ [2018] J. Lee, W. J. Huggins, M. Head-Gordon, and K. B. Whaley, Journal of chemical theory and computation 15, 311 (2018).
  * Bilkis  _et al._ [2021] M. Bilkis, M. Cerezo, G. Verdon, P. J. Coles, and L. Cincio, arXiv preprint arXiv:2103.06712 (2021).
  * Cincio  _et al._ [2018] L. Cincio, Y. Subaşı, A. T. Sornborger, and P. J. Coles, New Journal of Physics 20, 113022 (2018).
  * Cincio  _et al._ [2021] L. Cincio, K. Rudinger, M. Sarovar, and P. J. Coles, PRX Quantum 2, 010324 (2021).
  * Mitarai  _et al._ [2018] K. Mitarai, M. Negoro, M. Kitagawa, and K. Fujii, Physical Review A 98, 032309 (2018).
  * Schuld  _et al._ [2019] M. Schuld, V. Bergholm, C. Gogolin, J. Izaac, and N. Killoran, Physical Review A 99, 032331 (2019).
  * Kingma and Ba [2014] D. P. Kingma and J. Ba, arXiv preprint arXiv:1412.6980 (2014).
  * Bergholm  _et al._ [2018] V. Bergholm, J. Izaac, M. Schuld, C. Gogolin, S. Ahmed, V. Ajith, M. S. Alam, G. Alonso-Linaje, B. AkashNarayanan, A. Asadi, _et al._ , arXiv preprint arXiv:1811.04968 (2018).
  * Paszke  _et al._ [2019] A. Paszke, S. Gross, F. Massa, A. Lerer, J. Bradbury, G. Chanan, T. Killeen, Z. Lin, N. Gimelshein, L. Antiga, _et al._ , Advances in neural information processing systems 32 (2019).
  * MacKay [2003] D. J. MacKay,  _Information theory, inference and learning algorithms_ (Cambridge university press, 2003).
  * Han  _et al._ [2018] Z.-Y. Han, J. Wang, H. Fan, L. Wang, and P. Zhang, Physical Review X 8, 031012 (2018).
  * Wootters [1998] W. K. Wootters, Physical Review Letters 80, 2245 (1998).
  * Wootters [2001] W. K. Wootters, Quantum Inf. Comput. 1, 27 (2001).

##  Appendix A Gradient evaluation

We illustrate that the gradient of a parameter can be explicitly computed with
parameters-shift rule [41, 42], requiring three quantum circuit evaluations
for each parameter. The derivative of the loss function
$\mathcal{L}(\bm{\theta})$ with respect to a specific parameter $\theta_{i}$
is given by:

$\displaystyle\frac{\partial\mathcal{L}(\bm{\theta})}{\partial\theta_{i}}=-\sum_{x}\frac{p(x)}{q_{\bm{\theta}}(x)}\frac{\partial
q_{\bm{\theta}}(x)}{\partial\theta_{i}},$ (12)

where we introduce the following operators:

$\displaystyle\Pi_{x}(\bm{\theta})$ $\displaystyle\equiv
U^{\dagger}_{\ell}(\theta_{\ell})\ldots
U^{\dagger}_{i+1}(\theta_{i+1})|x\rangle\langle x|U_{i+1}(\theta_{i+1})\ldots
U_{\ell}(\theta_{\ell})$ $\displaystyle\rho(\bm{\theta})$ $\displaystyle\equiv
U_{i-1}(\theta_{i-1})\ldots U_{1}(\theta_{1})|0\rangle\langle
0|U^{\dagger}_{1}(\theta_{1})\ldots U^{\dagger}_{i-1}(\theta_{i-1}).$ (13)

The derivative of $q_{\bm{\theta}}(x)$ with respect to $\theta_{i}$ can be
expanded as

$\displaystyle\frac{\partial q_{\bm{\theta}}(x)}{\partial\theta_{i}}$
$\displaystyle=\text{Tr}\Biggl{(}\Pi_{x}(\bm{\theta})\frac{\partial}{\partial\theta_{i}}\Bigl{[}U_{i}(\theta_{i})\rho(\bm{\theta})U^{\dagger}_{i}(\theta_{i})\Bigr{]}\Biggr{)}$
$\displaystyle=-\frac{i}{2}\text{Tr}\Biggl{(}\Pi_{x}(\bm{\theta})U_{i}(\theta_{i})[P_{i},\rho(\bm{\theta})]U^{\dagger}_{i}(\theta_{i})\Biggr{)}$
$\displaystyle=\text{Tr}\Biggl{(}\Pi_{x}(\bm{\theta})U_{i}\left(\theta_{i}+\frac{\pi}{2}\right)\rho(\bm{\theta})U^{\dagger}_{i}\left(\theta_{i}+\frac{\pi}{2}\right)\Biggr{)}-\text{Tr}\Biggl{(}\Pi_{x}(\bm{\theta})U_{i}\left(\theta_{i}-\frac{\pi}{2}\right)\rho(\bm{\theta})U^{\dagger}_{i}\left(\theta_{i}-\frac{\pi}{2}\right)\Biggr{)}$
$\displaystyle=q_{\bm{\theta}+\frac{\pi}{2}\bm{e}i}(x)-q_{\bm{\theta}-\frac{\pi}{2}\bm{e}_{i}}(x).$
(14)

Thus, the gradient formula can be compactly expressed as:

$\displaystyle\frac{\partial\mathcal{L}(\bm{\theta})}{\partial\theta_{i}}=-\sum_{x}\frac{p(x)}{q_{\bm{\theta}}(x)}\left(q_{\bm{\theta}+\frac{\pi}{2}\bm{e}i}(x)-q_{\bm{\theta}-\frac{\pi}{2}\bm{e}_{i}}(x)\right).$
(15)

This procedure simplifies the gradient evaluation to a series of tractable
quantum measurements.

##  Appendix B Zero gradient operators

We establish that gradients vanish when initiating from a quantum state with
solely real amplitudes and applying operators generated by an even number of
Pauli $Y$ operators. This phenomenon can be inspected as follows: Introducing
an operator into a circuit yields

$\displaystyle\frac{\partial q_{\bm{\theta}}(x)}{\partial\theta_{i}}$
$\displaystyle=\text{Tr}\left(|x\rangle\langle
x|\frac{\partial}{\partial\theta_{i}}\left[U_{i}(\theta_{i})\rho(\bm{\theta})U^{\dagger}_{i}(\theta_{i})\right]\right)\Bigg{|}_{\theta_{i}=0}$
$\displaystyle=-\frac{i}{2}\text{Tr}\left(|x\rangle\langle
x|[P_{i},\rho(\bm{\theta})]\right)$ $\displaystyle=-\frac{i}{2}\left(\langle
x|P_{i}\rho(\bm{\theta})|x\rangle-\langle
x|\rho(\bm{\theta})P_{i}|x\rangle\right)$
$\displaystyle=-\frac{i}{2}\left(\langle
x|P_{i}\rho(\bm{\theta})|x\rangle-\langle
x|P_{i}\rho(\bm{\theta})|x\rangle^{*}\right)$ $\displaystyle=0,$ (16)

where the last equality is deduced from the initial state $\rho(\bm{\theta})$
and the generator $P_{i}$ being real. Consequently, the absence of imaginary
components results in a zero gradient due to the real nature of the elements
involved.

##  Appendix C Quantum Mutual Information and Entanglement of Formation

Quantum mutual information (QMI) is a measure of the total correlation between
two subsystems of a quantum state. It quantifies not only classical
correlations but also encompasses quantum entanglement, providing a complete
picture of the correlations present in a quantum system. The QMI of a
bipartite state $\rho_{AB}$ is defined as:

$I(A:B)=S(\rho_{A})+S(\rho_{B})-S(\rho_{AB}),$ (17)

where $S(\rho)$ denotes the von Neumann entropy of the state $\rho$, and
$\rho_{A}$ and $\rho_{B}$ are the reduced density matrices of subsystems A and
B, respectively.

Entanglement of formation (EOF) [48, 49] is a conceptually distinct measure
that specifically quantifies the resources needed to create a given entangled
state. For a bipartite quantum state $\rho_{AB}$, the EOF is the minimum
average entanglement of an ensemble of pure states that represents
$\rho_{AB}$. Formally, if
$\rho_{AB}=\sum_{i}p_{i}|\psi_{i}\rangle\langle\psi_{i}|$, where
$|\psi_{i}\rangle$ are pure states and $p_{i}$ are the probabilities of the
states, the EOF is given by:

$E_{F}(A:B)=\min\sum_{i}p_{i}E(|\psi_{i}\rangle),$ (18)

where $E(|\psi_{i}\rangle)$ is the entanglement entropy of the state
$|\psi_{i}\rangle$.

For two-qubit systems, EOF has a closed-form expression, which is derived from
the measure known as concurrence. The concurrence, $C$, for a pair of qubits
in a mixed state $\rho$, is calculated as:

$C(\rho)=\max\\{0,\lambda_{1}-\lambda_{2}-\lambda_{3}-\lambda_{4}\\},$ (19)

where $\lambda_{i}$ (for $i=1,2,3,4$) are the square roots of the eigenvalues,
in descending order, of the non-Hermitian matrix $\rho\tilde{\rho}$. Here,
$\tilde{\rho}$ is the spin-flipped state of $\rho$:

$\tilde{\rho}=(\sigma_{y}\otimes\sigma_{y})\rho^{*}(\sigma_{y}\otimes\sigma_{y}),$
(20)

and $\rho^{*}$ denotes the complex conjugate of $\rho$ in a fixed basis such
as $\\{|00\rangle,|01\rangle,|10\rangle,|11\rangle\\}$.

The EOF can then be expressed as a function of concurrence:

$E_{F}(\rho)=h\left(\frac{1+\sqrt{1-C(\rho)^{2}}}{2}\right),$ (21)

where $h(x)=-x\log_{2}x-(1-x)\log_{2}(1-x)$ represents the binary entropy
function.

This relationship provides a direct method to calculate EOF from the density
matrix of two-qubit states, offering a valuable tool for quantifying
entanglement.

In the case of partitioned systems, where we focus on a two-qubit subsystem
$A,B$ within a larger system that includes $C$, the bipartite state
$\rho_{AB}$ can be obtained by tracing out subsystem $C$:

$\rho_{AB}=\text{Tr}_{C}(\rho_{ABC}).$ (22)

##  Appendix D Experiment results

Experiment results
---
Datasets |  QGAN |  QCBM |  DDQCL |  ACLBM
log normal 3 |  $2.71\times 10^{-2}$ |  $1.46\times 10^{-10}$ |  $6.09\times 10^{-7}$ |  $2.98\times 10^{-6}$
0.7206 / 0.6894 |  $2.88\times 10^{-11}$ |  $6.09\times 10^{-7}$ |  $2.98\times 10^{-6}$
bimodal 3 |  $1.74\times 10^{-2}$ |  $2.38\times 10^{-8}$ |  $3.96\times 10^{-7}$ |  $3.31\times 10^{-6}$
0.6994 / 0.6905 |  $1.47\times 10^{-9}$ |  $3.96\times 10^{-7}$ |  $3.31\times 10^{-6}$
triangular 3 |  $1.12\times 10^{-2}$ |  $2.84\times 10^{-5}$ |  $2.94\times 10^{-6}$ |  $1.66\times 10^{-6}$
0.6969 / 0.6926 |  $4.41\times 10^{-7}$ |  $2.94\times 10^{-6}$ |  $1.66\times 10^{-6}$
log normal 10 |  $3.48\times 10^{-1}$ |  $9.61\times 10^{-2}$ |  $1.12\times 10^{-1}$ |  $3.25\times 10^{-4}$
0.7571 / 0.6762 |  $6.41\times 10^{-5}$ |  $1.12\times 10^{-1}$ |  $3.25\times 10^{-4}$
bimodal 10 |  $5.93\times 10^{-1}$ |  $2.98\times 10^{-1}$ |  $1.28\times 10^{-1}$ |  $4.73\times 10^{-4}$
0.7746 / 0.6664 |  $2.10\times 10^{-4}$ |  $1.28\times 10^{-1}$ |  $4.73\times 10^{-4}$
triangular 10 |  $5.45\times 10^{-1}$ |  $3.29\times 10^{-1}$ |  $1.31\times 10^{-1}$ |  $5.00\times 10^{-4}$
0.7702 / 0.6670 |  $3.12\times 10^{-4}$ |  $1.31\times 10^{-1}$ |  $5.00\times 10^{-4}$
bas 2x2 |  $1.49\times 10^{-3}$ |  $1.68\times 10^{-2}$ |  $1.48\times 10^{-5}$ |  $1.81\times 10^{-6}$
0.6944 / 0.6927 |  $4.34\times 10^{-5}$ |  $1.48\times 10^{-5}$ |  $1.81\times 10^{-6}$
bas 3x3 |  $3.86$ |  $2.30\times 10^{-2}$ |  $2.63\times 10^{-2}$ |  $6.36\times 10^{-4}$
0.6967 / 0.6905 |  $8.53\times 10^{-5}$ |  $2.63\times 10^{-2}$ |  $6.36\times 10^{-4}$
bas 4x4 |  $10.46$ |  $4.46$ |  $1.54\times 10^{-1}$ |  $1.03\times 10^{-1}$
$5.39\times 10^{-3}$ / 13.0612 |  $5.58\times 10^{-2}$ |  $1.52\times 10^{-1}$ |  $1.03\times 10^{-1}$
real image 1 |  $12.73$ |  $6.16\times 10^{-1}$ |  $5.06\times 10^{-1}$ |  $2.82\times 10^{-2}$
5.7377 / 13.8094 |  $4.58\times 10^{-5}$ |  $5.06\times 10^{-1}$ |  $2.82\times 10^{-2}$
real image 2 |  $13.81$ |  $8.62\times 10^{-1}$ |  $5.44\times 10^{-1}$ |  $4.22\times 10^{-2}$
8.8076 / 13.8156 |  $1.67\times 10^{-3}$ |  $5.44\times 10^{-1}$ |  $4.22\times 10^{-2}$
real image 3 |  11.85 |  $5.70\times 10^{-1}$ |  $4.98\times 10^{-1}$ |  $1.62\times 10^{-2}$
4.7950 / 13.7895 |  $2.56\times 10^{-5}$ |  $4.98\times 10^{-1}$ |  $1.62\times 10^{-2}$
Table 1: Experimental results across various datasets and benchmark models.
Each row is divided into two subrows: the upper subrow displays the KL
divergence, while the lower subrow presents the specific loss metric employed
by each model. For QGAN, the loss is associated with the generator and
discriminator; for QCBM, it is the MMD loss; and for DDQCL and ACLBM, it is
the KL divergence.