Recent Advances for Quantum Neural Networks in Generative Learning

Jinkai Tian, Xiaoyu Sun, Yuxuan Du,
Shanshan Zhao, Qing Liu, Kaining Zhang, Wei Yi, Wanrong Huang, Chaoyue Wang, Xingyao Wu, Min-Hsiu Hsieh, Senior Member, IEEE, Tongliang Liu, Senior Member, IEEE,
Wenjing Yang, Dacheng Tao, Fellow, IEEE

Jinkai Tian, Wei Yi, and Wanrong Huang are with Artificial Intelligence Research Center, Defense Innovation Institute, 100071 Beijing, China and Tianjin Artificial Intelligence Innovation Center, 300457 Tianjin, China.
Xiaoyu Sun is with The Blackett Laboratory, Imperial College London, London SW7 2AZ, U.K.
Yuxuan Du, Shanshan Zhao, Chaoyue Wang, Xingyao Wu, and Dacheng Tao are with JD Explore Academy, 101111 Beijing, China.
Qing Liu is with School of Physical and Mathematical Sciences, Nanyang Technological University, 637371, Singapore.
Wenjing Yang is with Institute for Quantum Information & State Key Laboratory of High Performance Computing, College of Computer Science and Technology, National University of Defense Technology, 410073 Changsha, China.
Kaining Zhang, Tongliang Liu are with The University of Sydney, Darlington, NSW 2008, Australia.
Min-hsiu Hsieh is with Hon Hai (Foxconn) Research Institute, Taipei, Taiwai.
Jinkai Tian and Xiaoyu Sun contributed equally to this work.
This work was done when Jinkai Tian and Xiaoyu Sun are research interns in JD Explore Academy.
Correspondence to Yuxuan Du, Wenjing Yang, Xingyao Wu, and Dacheng Tao.

Quantum computers are next-generation devices  that hold promise to perform calculations beyond the reach of classical computers. A leading method towards achieving this goal is through quantum machine learning, especially quantum generative learning. Due to the intrinsic probabilistic nature of quantum mechanics, it is reasonable to postulate that quantum generative learning models (QGLMs) may surpass their classical counterparts. As such, QGLMs are receiving growing attention from the quantum physics and computer science communities, where various QGLMs that can be efficiently implemented on near-term quantum machines with potential computational advantages are proposed. In this paper, we review the current progress of QGLMs from the perspective of machine learning. Particularly, we interpret these QGLMs, covering quantum circuit Born machines, quantum generative adversarial networks, quantum Boltzmann machines, and quantum autoencoders, as the quantum extension of classical generative learning models. In this context, we explore their intrinsic relation and their fundamental differences. We further summarize the potential applications of QGLMs in both conventional machine learning tasks and quantum physics. Last, we discuss the challenges and further research directions for QGLMs.

Generative Learning, Quantum generative learning, Quantum machine learning, Quantum Computing.

§ INTRODUCTION

Deep generative learning models (GLM) have revolutionized the classical world during the past decade [Goodfellow et al., 2016], including but not limited to computer vision [Voulodimos et al., 2018], natural language processing [Otter et al., 2020], and drug discovery [Vamathevan et al., 2019]. The unprecedented success of GLMs stems from the power of deep neural networks, which can effectively capture the underlying distribution of training data and then generate new samples from the same distribution.   Celebrated by this property, GLMs have been recently exploited to tackle fundamental problems in quantum physics science. Namely, GLMs are used to address the `curse of dimensionality' encountered in quantum physics [Carleo et al., 2019]. Compared with conventional methods, GLMs generally ensure better performance as well as the improved generalization ability. All of these characteristics contribute to physicists to understand the mechanisms of nature.

An overview of this survey.

In parallel to the design of advanced GLMs and the exploration of their potential applications, another critical line of research in artificial intelligence is seeking the next-generation of GLMs with enhanced abilities. The current challenge is overcoming the computational overhead of GLMs as the limits of Moore’s law is approached [Thompson et al., 2020]. To this end, a leading solution is executing GLMs on quantum computers, which have exhibited strong theoretical and experimental performance [Bravyi et al., 2020, Arute et al., 2019]. In this respect, a great amount of effort has been made to design quantum generative learning models (QGLMs) that can be efficiently carried out on noisy intermediate-scale quantum (NISQ) machines [Preskill, 2018] with computational advantages. To date, extensive studies have demonstrated the feasibility of QGLMs for different learning tasks, e.g., image generation [Huang et al., 2021], quantum state approximation [Hu et al., 2019], and drug design [Jin et al., 2022].

Key landmarks in the development of QGLMs.

The rapid development of  QGLMs necessitates a systematic review of the existing works, which could benefit researchers from both the computer science and quantum physics communities. To this end, in this survey, we analyze the current progress of QGLMs through the lens of deep generative learning. Definitively, according to the typical protocols of GLMs, we categorize QGLMs into four types, which are quantum circuit Born machine (QCBM), quantum generative adversarial network (QGAN), the quantum Boltzmann machine (QBM), and quantum autoencoder (QAE). For each type of QGLM, we first introduce the pioneering work and its inherent relation with its classical counterparts, followed by elucidating its variants and potential applications in both conventional machine learning and quantum physics. To the best of our knowledge, this is the first review in the context of quantum generative learning. We believe this survey can help audiences of varying backgrounds to understand the development of QGLMs.

The structure of this survey is depicted in Fig. <ref>. In Section <ref>, we introduce the basic knowledge of deep neural networks, typical classical generative learning models, quantum computing, and variational quantum algorithms. In Section <ref>, we systematically review prior literature related to QGLMs and explain the relationship with their classical counterparts. According to the categorization of QGLMs, this section comprises of four subsections, which orient QCBM, QGAN, QBM, and QAE, respectively. In Section <ref>, we discuss the challenges and future directions of quantum generative learning.

§.§ Related works

A few review articles have similar or intersectional topics with our survey, while their emphases and scopes are different.  Schuld et al., 2015,Biamonte et al., 2017, and Ciliberto et al., 2018 gave a review on early works of quantum machine learning under fault-tolerant scenarios. Moving into the    NISQ era, Bharti et al., 2022, Cerezo et al., 2021, and Massoli et al., 2022 reviewed the fundamental building blocks of VQAs and their applications. Benedetti et al., 2019 reviewed QNNs as machine learning models for quantum supervised and unsupervised learning tasks.   Although these NISQ-oriented review articles mention quantum generative learning models more or less, none of them provides a comprehensive review of modern QGLMs by elaborating their fundamental mechanism and unveiling the intrinsic relations with GLMs as we did in this survey.

Some reviews working on the quantum extension of discriminative learning models. Li and Deng, 2022, Ablayev et al., 2019, Abohashima et al., 2020 reviewed fault-tolerate quantum classifiers like quantum support vector machines [Rebentrost et al., 2014] and variational quantum classifiers utilizing QNN in NISQ era. Contrary to these studies concentrating on discriminative learning, our survey focuses on quantum generative learning models. Another branch of surveys is summarizing how classical generative learning models can be used in understanding fundamental problems in quantum physics [Carleo et al., 2019, Dunjko and Briegel, 2018]. There are also several reviews on specific applications, e.g., Herman et al., 2022 for financial applications, Fedorov et al., 2022 for VQE, and Guan et al., 2021 for high energy physics. All of these reviews can be regarded as the complement of our survey.

§ PRELIMINARIES

To accommodate the diverse backgrounds of readers, this section presents a brief introduction of neural networks, classical generative learning models, quantum computing, and variational quantum algorithms. Unless explicitly stated, the notations used in this survey are summarized in Table <ref> and the frequently used acronyms are summarized in Table <ref>.

Summary of Notations

Notation     Description

$\vect{x},\vect{y},\vect{z}$      Vectors

$\vect{A},\vect{B},\vect{C}$       Matrices or tensors

$\vect{A}^{\dagger}$      Hermitian adjoint of a matrix $\vect{A}$

$\mathcal{X},\mathcal{Y},\mathcal{Z}$      Sets

$\otimes$      Tensor products, e.g., $|0\rangle^{\otimes n}$ means tensor products of n qubits in state $|0\rangle$

$\tr(\cdot)$       Trace operation

$\mathbb{1}_n$     An $n \times n$ identity matrix

$\{\Pi_i\}$       Measurement operator

$p_{\vect{\theta}}$       A generated distribution with the tunable parameters $\vect{\theta}$

$q$       A target distribution

$f \circ g (\vect x)$      Function composition

$\mathcal{C}_{model}$       Cost function of a model

$U(\vect\theta)$      A unitary operator (quantum gate) with parameters

$\sigma_x$, $\sigma_y$, $\sigma_z$     Standard Pauli matrices

$RX$, $RY$, $RZ$       Single-qubit rotation operators

$\mathbb{E}_{\vect{x} \sim P(\vect{x})}[f(\vect{x})]$       Expectation values of $f(\vect x)$ for random variable $\vect{x}$ following distribution $P(\vect x)$

Summary of Acronyms

Terminology     Acronym

Quantum generative learning model      QGLM

Quantum circuit Born machine     QCBM

Quantum generative adversarial network     QGAN

Quantum Boltzmann machine     QBM

Quantum autoencoder     QAE

Quantum variational autoencoder     QVAE

Quantum neural network     QNN

Variational quantum algorithm     VQA

Parameterized quantum circuit     PQC

Noisy near-term intermediate-scale quantum     NISQ

Quantum approximate optimization algorithm     QAOA

Matrix product state     MPS

Multi-layer perceptron     MLP

Tree tensor network      TTN

Neural-network quantum state     NQS

Quantum state tomography     QST

Artificial neural network     ANN

Feedfoward neural network      FFNN

Generative adversarial network     GAN

Restricted Boltzmann machine     RBM

Variational autoencoder     VAE

Quantum evidence lower bound     Q-ELBO

semi-restricted QBM     semi-RQBM

An overview of classical and quantum generative learning models.
The left panel illustrates data distributions of interest in both classical and quantum generative learning.
The right panel illustrates the similar working mechanism for both classical and quantum generative learning models (i.e., implemented by classical neural networks and quantum neural networks). Concisely, both learning models aim to minimize the discrepancy between the target distribution and the estimated distribution they generate. The process of minimization is completed by a classical optimizer, which continuously updates the trainable parameters of the learning model.

§.§ Neural networks

Although machine learning has experienced challenges and setbacks in the past several decades, it has witnessed a recent resurgence because of the resounding success of neural networks. Neural networks are a type of machine learning framework, which are also called artificial neural networks (ANN). Inspired by the human nervous system, neural networks are designed to implement machine learning algorithms to process various type of data, including images, text, and speech. Relying on the advent of the relevant learning theory and hardware resources, we have witnessed the remarkable development of neural networks during the past decade. Nowadays, neural networks are extensively applied in various fields of artificial intelligence, including computer vision and natural language processing, which enable the research community to explore solutions for a plethora of challenging problems in the real world. In this subsection, we give a brief introduction to neural networks, beginning with the perceptron— a single-layer neural network.

Conceptually, the perceptron is a linear binary classifier, which has only one neuron. From the mathematical perspective, the perceptron is a linear function and thus can only process linearly separable data patterns. This limited capacity for modeling complex patterns hinders its real-world application. By concatenating a series of perceptrons and non-linear activation functions, the neural network, dubbed multi-layer perceptron (MLP) or feedforward neural network (FFNN), can achieve an enhanced capacity. Since MLP was proposed, it has been widely applied to different learning tasks, including image classification, machine translation, and speech recognition. The key components of an MLP are an input layer, an output layer, and some hidden layers. The input layer does not have learnable parameters, while the output and hidden layer contain a perceptron and a non-linear operation. An intuition of MLP is shown in the right subfigure of Fig. <ref> (classical NN). The mathematical formulation of MLP yields

\begin{equation}
\label{eq:nn}
\vect{y} = f_{\vect{w}} (\vect{x}) = \mathcal{L}^{(L)} \circ \cdots \circ \mathcal{L}^{(1)}(\vect{x}),
\end{equation}

where $\vect{x}$ and $\vect{y}$ are the input and output, respectively, and $\vect{w} = \{ \vect{W}^{(1)}, \vect{b}^{(1)},\dots,\vect{W}^{(L)}, \vect{b}^{(L)}\}$ is the set of trainable parameters. More specifically, $\vect{W}^{(i)} \in \mathbb{R}^{d_i \times d_{i-1}}$ and $\vect{b}^{(i)} \in \mathbb{R}^{d_i}$ are trainable parameters of the $i$-th layer and $d_i$ refers to the dimension of the $i$-th layer. Each layer $\mathcal{L}^{(i)}:\mathbb{R}^{d_{i-1}} \longrightarrow \mathbb{R}^{d_{i}}$ consists of a linear transformation followed by a non-linear activation function $\phi(\cdot)$, i.e.,

\begin{equation}
\vect{x}^{(i)} = \mathcal{L}^{(i)}(\vect{x}^{(i-1)})= \phi (\vect{W}^{(i)} \vect{x}^{(i-1)}+\vect{b}^{(i)}),
\end{equation}

where $ i \in \{1,2,\dots,L\}$ and $\vect{x}^{(0)} = \vect{x}$. For the hidden layer, $\phi(\cdot)$ can be ReLU, sigmoid, or tanh function, while for the output layer $\phi$ can be softmax for classification or sigmoid for regression. The weights are initialized randomly and the MLP can be trained with data through backpropagation.  The cost function which represents the discrepancy between the predicted results and the true label is designed to provide gradient information for parameter updates. The universal approximation theorem [Hornik et al., 1989] shows that an MLP with enough parameters can approximate an arbitrary function on a bounded subset of $\mathbb{R}^n$ to any degree of accuracy.

Apart from MLP, there are many other neural networks designed for specific data/tasks. For example, recurrent neural networks (RNN) [Rumelhart et al., 1985] are exploited to process the sequential data, like text data. Convolutional Neural Networks (CNN) with the weight sharing architecture [Yamashita et al., 2018] are proposed for image data analysis. Recently, the Transformer [Vaswani et al., 2017] consisting of MLPs has dominated the natural language processing (NLP) area [Devlin et al., 2019, Yang et al., 2019] and has further been extensively studied in the computer vision community [Dosovitskiy et al., 2020, Liu et al., 2021]. Celebrated by the remarkable development of Graphics Processing Units (GPUs), we can effectively train a neural network with over one billion parameters on a large amount of data.  For example,  in NLP, GPT [Radford et al., 2018] contains around 0.1 billion parameters and is trained on 5GB of data. Following the same manner, GPT-2 [Radford et al., 2019] is designed with over 1 billion parameters, and GPT-3 [Brown et al., 2020] has more parameters, at over 100 billion, and is learned on very large-scale text data, of around 45TB. In computer vision, the model usually contains fewer parameters than the NLP model. For example, a typical large-scale vision model, ConVit [d’Ascoli et al., 2021] has 145 million parameters.

§.§ Classical generative learning models

There are primarily three learning paradigms in machine learning : discriminative learning, generative learning, and reinforcement learning (RL). As illustrated in Fig. <ref>, generative learning models aim to find the underlying distribution of the training dataset and generate new samples of this distribution. For ease of understanding the quantum generative learning models, this subsection separately introduces four representative classical generative learning protocols, i.e., multi-layer perceptron, generative adversarial network, Boltzmann machine, and (variational) autoencoder.

§.§.§ Multi-layer perceptron generative network

Though the MLP is widely applied in the field of classification and regression  [Murtagh, 1991], it could be interpreted as the simplest generative model for estimating discrete distributions as well. Let us recall the description of MLP in Eqn. (<ref>), the input data $\vect{x} \in \mathbb{R}^{d_0}$ is mapped to the output $\vect{y}=f_{\bm{w}}(\vect{x}) \in \mathbb{R}^{d_L}$. When MLP is applied to estimate a discrete distribution $q$ with in total $n$ possible outcomes, the input data is keeping fixed during the training and the dimension of the output layer is set as $d_L=n >1 $. The normalized output $\vect{y}$ amounts to the estimated discrete distribution $p_{\bm{w}}$. For instance, when the softmax function is applied to the last layer, the output satisfies $\sum_{i}{y}_i=1$, where for $\forall i \in [n]$, the element ${y}_i$ corresponds to the probability of sampling $i$, i.e., $p_{\vect w}(i)=y_i$.

A generative learning model implemented by MLP in the task of discrete distribution estimation. The output layer of MLP corresponds to the estimated distribution. The value of the $i$-th neuron stands for the probability of sampling the outcome $i$. For simplicity, we use the notation $\vect{a}=\vect{W}\vect x^{L-1}+\vect b$, and the softmax function is $softmax(a_i)=e^{a_i}/\sum_{i=1}^n e^{a_i}$.

Let $\mathcal{D} =\{{x}^{m}\}$ be the set of training examples sampled form $q$, which forms the empirical distribution $\hat{q}$. In the training procedure, MLP updates the trainable parameters $\bm{w}$ to minimize the distance between $\hat{q}$ and $p$. This can be completed by minimizing the negative log-likelihood cost function $\mathcal{C}_{MLP}=-\frac{1}{|\mathcal{D}|} \sum_{m}\log[p_{\vect{w}}({x}^{m})]$. When the number of training examples is sufficient large and the cost function approaches to the minimum, $p_{\bm{w}}$ is close to $q$ with a   low estimation error.

§.§.§ Generative adversarial network

Since the seminal work of Goodfellow et al., 2014, Generative Adversarial Networks (GANs) have been extensively studied due to their powerful ability to simulate complex target distributions.  Different from most generative models adopting the unsupervised learning manner, GAN provides a novel adversarial learning scheme to frame the problem as a minimax training problem by introducing a discriminator, the adversary of the generator. Benefiting from their superiority, GANs have been exploited in a myriad of fields, such as image-to-image translation tasks [Isola et al., 2017, Wang et al., 2018, Zhu et al., 2017], image generation [Bao et al., 2017], and domain adaptation [Tzeng et al., 2017].

GAN models workflow. The generator generates fake data from some random inpcannotuts to imitate real-world data and tries to deceive the discriminator. The discriminator learns to find the fundamental difference between the generated data and the real data. When the loss converges towards the Nash equilibrium, the generator can generate data that cannot be distinguished by the discriminator.

A schematic workflow of GANs is exhibited in Fig. <ref>. There are two main components during the construction and training of a generative adversarial network: a generator $G$ and a discriminator $D$. The generator receives a random input vector $\vect{z} \sim p_z(\vect{z})$ (i.e., $p_z$ refers to a prior distribution like the uniform distribution or the Gaussian distribution) and generates data $\vect{x}=G(\vect{z})$ with learnable parameters $\vect{w_G}$. The goal of the generator is to simulate the target data distribution $q$. The real data sampled from the target distribution and the generated data are fed into the discriminator $D$ with parameters $\vect{w_D}$. The goal of the discriminator is to distinguish data from these two different sources by labeling the target data and the generated data with $1$ and $0$, respectively. In the learning procedure, $\vect{w_G}$ is optimized to generate data in a pattern mimicking the target data distribution, and $\vect{w_D}$ is optimized in the direction of assigning the right label for the target data $\vect{x} \sim q(\vect{x})$ and the generated data $\vect{x} \sim G(\vect{z})$, respectively. Mathematically, the two-player minimax game takes the form $ \min_{\vect{w_G}} \max_{\vect{w_D}} \mathcal{C}_{\text{GAN}} (\vect{w_G}, \vect{w_D})$, where the explicit form of the cost function $\mathcal{C}_{\text{GAN}} (\vect{w_G}, \vect{w_D})$ is

\begin{equation}
\label{gan}
\begin{aligned}
\mathbb{E}_{\vect{x} \sim q(\vect{x})}[\log D(\vect{x})] +\mathbb{E}_{\vect{z} \sim p_z(\vect{z})}[\log (1-D(G(\vect{z})))].
\end{aligned}
\end{equation}

When the training strategy reaches the Nash equilibrium, the discriminator cannot distinguish the generated data from the target data.

Optimizing such a minimax objective function could be a challenging task since the parameters of both generator and discriminator are dynamically  changed. For this reason, it is easy to encounter mode collapse and gradient vanish issues during GANs' training.  Many variants of the vanilla GAN [Goodfellow et al., 2014] are proposed to tackle specific problems with improved performance. For example, Deep Convolutional GAN (DCGAN) [Radford et al., 2016] implements the generator and the discriminator by using convolutional neural networks and de-convolutional neural networks respectively, which enhances the training stability. By involving extra information in the generator and the discriminator, e.g., class label, the vanilla GAN is transformed into the conditional GAN (CGAN) [Mirza and Osindero, 2014], which has the ability to control the outcome of the generator. To alleviate the vanishing gradient problem and overcome the mode collapse obstacle, Wasserstein GAN (WGAN) [Arjovsky et al., 2017] proposes to employ a cost function derived from the Wasserstein distance. Taking advantage of the coarse-to-fine scheme for high-quality image generation, Laplacian GAN (LapGAN) [Denton et al., 2015] develops a sequential image generation framework by adopting the Laplacian pyramid coding [Burt and Adelson, 1987] and conducting up-sampling and down-sampling for the generator and the discriminator respectively. By combining different objectives of GANs with the evolutionary strategy, Evolutionary GAN [Wang et al., 2019] not only alleviates the mode collapse issue, but further improved the generation performance. To explore the properties of unlabelled data, Information Maximizing GAN (InfoGAN) [Chen et al., 2016] introduces a regularization term, i.e., the mutual information, to the cost function, and improves the interpretability of input vectors for the generator.  By introducing a style-based generator, StyleGAN [Karras et al., 2019] is able to disentangle the feature representations and learn high-level attributes, which benefits from having controll over the image generation process. For large-scale and high-quality image generation, Big Generative Adversarial Network (BigGAN) [Brock et al., 2019] improves previous works concerning the training strategy and network structures.  For the recent improvements and trends of classical GANs, refer to Ref. [Gui et al., 2021, Jabbar et al., 2021, Pan et al., 2019].

§.§.§ Boltzmann machine

Paradigm of a fully connected BM (left) and a RBM (right). In a fully connected BM, units of visible layer $\vect{v}$  and hidden layer $\vect{h}$ are coupled both internally and externally with interaction weights $w$. In an RBM, internal connections in both the visible and hidden layers are forbidden. The term  $b$ refers to the local bias of each unit.

A Boltzmann machine (BM) [Ackley et al., 1985] is essentially a stochastic Ising model with an external field. Mathematically, a Boltzmann machine contains an array of visible units, $\vect{v}$, and an array of hidden units, $\vect{h}$. For simplicity, here, we only discuss the binary-valued BM, which means that all units $z_i \in \vect{z}=\{\vect{v}, \vect{h}\}$ are binary variables (i.e., $z_i =\pm 1$). As a type of energy-based model (EBM) [LeCun et al., 2006], the cost function of BM corresponds to the energy function, i.e.,

\begin{equation}
\label{eq:ising}
E_{\vect{z}} = -\sum_{i<j} w_{i j} z_{i} z_{j} - \sum_{i} b_{i} z_{i},
\end{equation}

which can also be represented in a matrix product form as $E_{\vect{z}} = - \vect{z}^T \vect{W} \vect{z} - \vect{b}^{T} \vect{z}$ with $\vect{W}$ ($w_{ij}$) and $\vect{b}$ ($b_i$) being trainable parameters. According to the Boltzmann distribution, the probability of observing a visible state $\vect{v}$ can be calculated by summing over the hidden variables,

\begin{equation}\label{bm-prob}
p_{\vect{\theta}}(\vect{v})=Z^{-1} \sum_{\vect{h}} e^{-E_{\{\vect{v,h}\}}}, \quad Z=\sum_{\vect{z}} e^{-E_{\vect{z}}}.
\end{equation}

Therefore, the parameters of the Boltzmann machine $\vect{w} = \{ \vect{W}, \vect{b}\}$ could be optimized towards the direction in which the generated distribution $p_{\vect{w}}$ is closer to the real distribution of dataset $q$ by performing gradient ascent [Ackley et al., 1985].  However, due to the expensive computational overhead, this learning strategy is usually impractical, especially when the number of hidden units is large. To overcome this issue, restricted Boltzmann machines (RBMs),  as shown in Fig. <ref> are introduced [Smolensky, 1986], where the connections between the hidden and visible units are allowed while the connections within the units, both visible and hidden, are restricted. The RBM can be optimized efficiently via contrastive divergence [Hinton, 2002] with Gibbs sampling since the update of hidden and visible units can be implemented in parallel.

§.§.§ (Variational) Autoencoder

A typical autoencoder [Bourlard and Kamp, 1988] contains an encoder that aims to compress the input data into a representation, called the bottleneck, and a decoder that seeks to decode the bottleneck to reconstruct the input. The autoencoder is one of the most prominent generative models in the context of unsupervised machine learning  [Goodfellow et al., 2016, LeCun et al., 2015]. It has been widely applied in dimension reduction [Wang et al., 2016, Baldi, 2012], image restoration [Vincent et al., 2008, Zhang et al., 2021], anomaly detection [Zhou and Paffenroth, 2017], information retrieval [Salakhutdinov and Hinton, 2009], and genomics [Eraslan et al., 2019]. As depicted in Fig. <ref>, given the input data $\vect{x}\in \mathbb{R}^{d_x}$, the encoder $f$ maps it to the hidden units $\vect{z} \in \mathbb{R}^{d_y}$, i.e., the bottleneck with a reduced dimension with $ d_y< d_x$. The mathematical expression is $\vect{z}=f(\vect{W}\cdot\vect{x}+\vect{b})$, where $\vect{W}$ is a $d_y\times d_x$ weight matrix and $\vect{b}$ is the local bias term.  Then the decoder $g$ reconstructs the output $\vect{x'}\in \mathbb{R}^{d_y}$ from the latent space representation $\vect{z}$, i.e.,  $\vect{x'}=g(\vect{W'}\cdot \vect{z}+\vect{b'})$. Here, $\vect{W'}$ is a $d_x\times d_y$ matrix and $\vect{b'}$ is a local bias term.  Commonly, the construction of $f$ and $g$ are realized by MLPs consisting of a bunch of linear projections and non-linear activation functions, like sigmoid and tanh. The optimization of autoencoders aims to reduce the reconstruction error between the input $\vect{x}$ and output $\vect{x'}$, where the squared error and the Kullback-Leibler (KL) divergence [Kullback and Leibler, 1951] cost functions are broadly used. The reduction in the dimensionality of the latent space enables the autoencoder to extract useful features and abandon the unimportant ones, in the same vein as principal component analysis (PCA) [Tipping and Bishop, 1999].

[The layout of a classical AE.]

[The layout of a VAE.]

In (a), the encoder and the decoder are denoted by $f(\cdot)$ and $g(\cdot)$, respectively. The notation $\bm{z}$ refers to the latent feature and the notation $\bm{x}'$ refers to the reconstructed data. In (b), both the probabilistic encoder $q_{{\vect{\theta}}}(\vect{z} | \vect{x})$ and the probabilistic decoder $p_{\vect{w}} (\vect{x}| \vect{z})$ are Bayesian networks. The model takes data from $\vect x$-space and passes forward through the inference model to $\vect z$-space, then by a generative model $p_{\bm{w}}(\vect{x},\vect{z})$, the variables $\vect {x'}$ are reconstructed.
Images adapted from  Ref. [Du and Tao, 2021].

Another typical generative model, the variational autoencoder (VAE) proposed by Kingma and Welling, 2014, leverages the variational Bayesian algorithm to learn the joint probability distribution $q(\vect{z},\vect{x})$ for a directed graph model with the latent variable $\vect{z}$ and observable variable $\vect{x}$. The marginal distribution $ p_{\vect{w}}(\vect{x})=\int p_{\vect{w}}(\vect{x}, \vect{z})d \vect{z}$ is intractable generally as there exists no analytical solution or efficient estimator to compute the integral, and this leads to the intractable true posterior distribution $p_{\vect{w}}(\vect{z} | \vect{x})=p_{\vect{w}} (\vect{x}, \vect{z})/ {p_{\vect{w}}(\vect{x})}$.
The intractability can be efficiently mitigated by introducing an inference (or a recognition) model $q_{{\vect\theta}}(\vect{z} | \vect{x})$ with parameters $\vect\theta$, i.e., the probabilistic encoder, which approximates the true posterior distribution. The log-likelihood function of a VAE model is

\begin{equation}
\log p_{\vect{w}}(\vect{x}) =
\mathcal{C}_{\vect{\theta},{\vect{w}}}(\vect{x})+D_{K L}\left(q_{{\vect\theta}}(\vect{z} | \vect{x}) \| p_{\vect{w}}(\vect{z} | \vect{x})\right),
\end{equation}

where the term $\mathcal{C}_{\vect{\theta},\vect{w}}(\vect{x}) = \mathbb{E}_{q_{{\vect{\theta}}}(\vect{z} | \vect{x})} \left[ \log \left[{p_{\vect{w}}(\vect{x}, \vect{z})} / {q_{{\vect{\theta}}}(\vect{z} | \vect{x})}\right]\right] $ is called the evidence lower bound (ELBO), and the second term is the KL divergence between the true posterior and the approximate one, which is equal to $\mathbb{E}_{q_{{\vect\theta}}(\vect{z} | \vect{x})}\left[\log \left[{q_{{\vect\theta}}(\vect{z} | \vect{x})}/{p_{\vect{w}}(\vect{z} | \vect{x})}\right]\right]$. Since the KL divergence  is always non-negative, the inequality $\log p_{\vect\theta}(\vect{x}) \geq \mathcal{C}_{\vect{\theta},\vect{w}}(\vect{x})$  holds. By maximizing the ELBO, we can maximize the log-likelihood of the VAE model and concurrently minimize the discrepancy between the two posteriors [Kingma and Welling, 2019]. The optimization routine requires the ELBO to be updated with the gradient information of both $\vect\theta$ and $\vect{w}$. However, computing the gradient $\nabla_{{\vect\theta}} \mathcal{C}_{\vect{\theta},\vect{w}}(\vect{x})$ is not as easy as computing the gradient $\nabla_{\vect{w}} \mathcal{C}_{\vect{\theta},\vect{w}}(\vect{x})$. By applying a reparameterization trick [Kingma and Welling, 2014, Kingma and Welling, 2019, Rezende et al., 2014], the latent variable $\vect{z}$ can be expressed as a deterministic and differentiable function $g$, where $\vect{z}=g_{\vect\theta}(\vect\epsilon,\vect{x})$, and the randomness in $\vect z$ is transferred to the auxiliary variable $\vect\epsilon$. This allows one to use the Monte Carlo (MC) estimation and direct differentiation. Two versions of the ELBO estimator are workable,

\begin{equation}\label{vae-a}
\widetilde{\mathcal{C}}^{A}_{\vect{w}, \vect\theta}(\vect{x})=\frac{1}{L} \sum_{l=1}^{L} \log p_{\vect{w}}(\vect{x}, \vect{z}^{(l)})-\log q_{{\vect\theta}}(\vect{z}^{(l)} | \vect{x})
\end{equation}

\begin{equation}\label{vae-b}
\widetilde{\mathcal{C}}^{B}_{\vect\theta, \vect\phi}(\vect{x})=-D_{K L}(q_{{\vect\theta}}({\vect{z}} |\vect{x})|| p_{\vect{w}}(\vect{z}))+\frac{1}{L} \sum_{l=1}^{L}\log p_{\vect{w}}(\vect{x} |\vect{z}^{(l)}),
\end{equation}

where the auxiliary variable $\vect\epsilon^{(l)} $ follows a distribution $ p(\vect\epsilon)$, e.g., the normal distribution or uniform distribution. These estimators are referred to as the stochastic gradient variational Bayes (SGVB) estimators [Kingma and Welling, 2014] and $\widetilde{\mathcal{C}}^{B}_{\vect{w}, \vect\theta}(\vect{x})$ generally has a lower variance than the generic one $\widetilde{\mathcal{C}}^{A}_{\vect{w}, \vect\theta}(\vect{x})$. Moreover, one can see the autoencoder structure implied by Eqn. (<ref>). As illustrated in Fig. <ref>, the first KL divergence term measures the encoding error of the approximate posterior $q_{{\vect\theta}}(\vect{z} | \vect{x})$  and the prior $p_{\vect{w}}(\vect{z})$, while the second term represents the reconstruction from the latent $\vect{z}$-space to the observed $\vect{x}$-space, through a probabilistic decoder $p_{\vect{w}}(\vect{x}|\vect{z})$. The encoder $q_{{\vect\theta}}(\vect{z} | \vect{x})$ could be comprised of various distributions [Kingma and Welling, 2014], such as exponential, uniform, triangular, Gaussian, and chi-Squared, etc. And different distributions usually correspond to specific choices of differentiable $g_{\vect\theta}(\vect{\epsilon}, \vect{x})$, as well as the choices of the auxiliary variable $\bm\epsilon$ . The probabilistic decoder could be Gaussian or Bernoulli MLP according to the type of data.

In recent years, many variants of VAE have been developed, and we refer to some important examples for interested readers. Ref. [Burda et al., 2016]  proposed an importance weighted autoencoder (IWAE) which increases the flexibility in approximating the true posterior distribution. By employing a GAN substructure in the inference stage, the adversarial autoencoders (AAE) [Makhzani et al., 2015] can match the aggregated posterior to an arbitrary prior distribution. The InfoVAE [Zhao et al., 2019] and $\beta$-VAE [Higgins et al., 2017] introduce regularizers into their ELBOs, which encourages disentanglement learning.
Treating the discrete latent variables as vectors, the vector quantised VAE (VQ-VAE) [Van Den Oord et al., 2017] could avoid the posterior collapse issue in training. Beyond learning in an unsupervised manner, some variants have been applied to process labeled data [Sohn et al., 2015, Makhzani et al., 2015, Kingma et al., 2014]. The VAE model and its variants are broadly applied to image generation [Gregor et al., 2015, Kulkarni et al., 2015], natural language processing [Bowman et al., 2016, Kusner et al., 2017], and molecular design [Gómez-Bombarelli et al., 2018], etc. For some recent developments of VAE models, refer to Refs. [Dai and Wipf, 2019, Kumar et al., 2020, Vahdat and Kautz, 2020].

§.§ Quantum mechanics and quantum computing

In this subsection, we introduce the background knowledge and notations of quantum mechanics, quantum computing, and quantum complexity theory. Refer to [Nielsen and Chuang, 2010] for details.

§.§.§ Quantum mechanics

Quantum mechanics provides a conceptual and mathematical framework for describing the physical world. In general, any isolated physical system can be completely represented by a normalized quantum state $|\psi\rangle$, which is a complex
unit vector in the system's state space (Hilbert space) $\mathcal{H}$. The evolution of such a quantum system can be described by a unitary operator $U$, with $|\psi'\rangle=U|\psi\rangle$ denoting the state after the evolution. In particular, the time evolution of a closed quantum system is characterized by the Schrödinger equation,

\begin{equation}
i \hbar \frac{d|\psi(t)\rangle}{dt} =H|\psi(t)\rangle,
\end{equation}

where $\hbar$ is Planck's constant, $|\psi(t)\rangle$ is the state at time $t$ and $H$ denotes the Hamiltonian of the quantum system. Given the state at some initial time $t=0$, if $H$ is independent of time, the state of the system can be derived as $|\psi(t)\rangle=e^{-iHt/\hbar}|\psi(0)\rangle$, with $U(t)=e^{-iHt/\hbar}$ named as the unitary time evolution operator.

The density matrix provides an alternative formulation for describing quantum systems in mixed states. Suppose a quantum system is in state $|\psi_i\rangle$ with  probability $p_i$, the density operator for this system is defined as $\rho=\sum_i p_i |\psi_i\rangle \langle \psi_i |$, where $\langle\psi_i|$ is the conjugate transpose of $|\psi_i\rangle$ and $\rho$ is a normalized, positive semi-definite Hermitian operator. The evolution of a mixed state $\rho$ is accordingly described as $\rho'=U\rho U^\dagger$.

Information contained within a quantum system can be extracted through quantum measurements. The most typical one is the projective measurement, which is described by an orthonormal basis $\{|i\rangle\}$. Performing this measurement on a quantum system $\rho$ will collapse the system to state $|i\rangle$ with a probability of $\langle i|\rho|i\rangle$.
Physical quantities such as position, momentum, and energy can be described by observables $O$, which act on the Hilbert space of the system. Since the observable is Hermitian, this implies, from the spectral decomposition theorem, that $O=\sum_i \lambda_i P_i$, where $P_{i}=|i\rangle \langle i|$ is the projector onto the eigenspace of $O$ with a real eigenvalue of $\lambda_i$. Note that $|i\rangle$ is the corresponding eigenvector and $\lambda_i$ also indicates the possible outcomes of the observable $O$. The expectation value of $O$ is quantified by $\langle O \rangle_\rho=\tr(\rho O)$.
Generally, a wide class of observables are formed by the Pauli matrices

\begin{equation}
\sigma_{x} \equiv\left(\begin{array}{rr}
0 & 1 \\
1 & 0
\end{array}\right),
\quad
\sigma_{y} \equiv\left(\begin{array}{rr}
0 & -i \\
i & 0
\end{array}\right),
\quad
\sigma_{z} \equiv\left(\begin{array}{rr}
1 & 0 \\
0 & -1
\end{array}\right).\nonumber
\end{equation}

And the eigenstates of $\sigma_{z}$ are denoted as

\begin{equation}
|0\rangle \equiv \begin{pmatrix} 1 \\ 0 \end{pmatrix} \ ,\
|1\rangle \equiv \begin{pmatrix} 0 \\ 1 \end{pmatrix} \ .
\end{equation}

Basic quantum gates and their mathematical expressions.

§.§.§ Quantum computing

Quantum computing is an inter-discipline of quantum physics and computation theory that  has recently gained popularity due to the possibility for it to  define the next generation of computers. The concept of quantum computing stems from the realization that simulating quantum evolution is infeasible for classical computers [Feynman, 2018], since the computational resources required for classical simulation scale exponentially.
Earlier work in the 1980s [Benioff, 1980] brought forward a quantum mechanical model of the Turing machine, and promoted research on quantum computing.  Although large fault-tolerant quantum computers are still absent, intermediate-scale quantum devices [Preskill, 2018] which can handle practical applications will arise in the foreseeable future.

Analogous to the way that a classical computer stores information in binary classical bits, quantum computers adopt quantum bits, referred to as qubits, as their basic working units.  A qubit is physically implemented by a two-level quantum system, described by a two-dimensional complex vector in the Hilbert space $\mathcal{H}$. Following the Dirac notation (a.k.a, bra–ket notation), a general single-qubit system can be described as

\begin{equation}
|\psi\rangle:=\alpha|0\rangle+\beta|1\rangle = \begin{pmatrix} \alpha \\ \beta \end{pmatrix} ,
\end{equation}

where $\alpha$ and $\beta$ are complex numbers with the normalization condition that $|\alpha|^{2}+|\beta|^{2}=1$.
Several qubits can be integrated into a multi-qubit quantum system via the tensor product. For example, an $n$-qubits system with each qubit in state $|0\rangle$ can be expressed as $|0\rangle^{\otimes n} \equiv \underbrace{\ket{0 \cdots 0}}_{n}=[1, \underbrace{0,...,0}_{2^n -1}]^{\top}$.

Quantum computers are built from quantum circuits, which consist of wires and quantum gates to transmit and manipulate quantum information. As basic building blocks of quantum circuits, quantum gates manipulate the states of the qubits, affecting the evolution of the overall quantum system. Generally, a unitary evolution is carried out via a series of elementary quantum gates, which are formed by single-qubit and two-qubit gates. Typical elementary quantum gates include the Pauli gates, which can be represented by the Pauli matrices $\sigma_x$, $\sigma_y$ and $\sigma_z$, the single-qubit rotation gates ($RX$, $RY$, $RZ$), the Hadamard gates $H$, and the CNOT gates. Some of the commonly used quantum gates with their matrix and graph representation are summarized in Table. <ref>. Note that the single-qubit rotation gates are defined as $RX(\theta) = \exp(-i\sigma_x\theta/2)$, $RY(\theta) = \exp(-i\sigma_y\theta/2)$ and $RZ(\theta) = \exp(-i\sigma_z\theta/2)$. In addition, for the sake of brevity, a Pauli gate with a subscript describes a gate operated on an $n$-qubit system where only one particular qubit is operated. Take $\sigma^{x}_i$ for example,

\begin{equation*}
\sigma_{i}^{x} \equiv \overbrace{I \otimes \cdots \otimes I}^{i-1} \otimes \sigma_{x} \otimes \overbrace{I \otimes \cdots \otimes I}^{n-i}.
\end{equation*}

In fact, the single-qubit rotation gates, together with the phase shift gate $P(\phi)$ and the CNOT gates, form a universal gate set. That is, any unitary operation $U$ of an arbitrary dimension can be implemented as a finite sequence of the gates from this set.

$\ket{0}^{\otimes n}$     [2mm] H^⊗n n step 1     [wires=2, style=fill=blue!20][1.7cm]U_f $x$ $x$ step 2      H^⊗n step 3     [draw=blue]0

$\ket{1}$      H     $y$$y\oplus f(x)$
The implementation of a quantum circuit for the Deutsch-Jozsa Algorithm.

Next, we explain how quantum circuits can be used to complete the Deutsch-Jozsa algorithm, which attains an exponential speedup over the best classical algorithms. The problem step is defined as follows.  Given a boolean function $f: \{0,1\}^n \rightarrow \{0,1\}$, we are promised that $f$ is either a constant function or a balanced function, where a balanced function means of $2^n$ distinct inputs in $\{0,1\}^n$, the function value of half of them is 1 and that of the other half is 0. In quantum computing models, the information of a given function can be encoded into an oracle, which is essentially a black box quantum computer. As shown in Fig. <ref>, the Deutsch-Jozsa algorithm can determine whether $f$ is constant or balanced within only one query of the oracle. The algorithm employs $n+1$ qubits and the initial state is $|0\rangle^{\otimes n}|1\rangle$. After the Hadamard transformation in step 1, the state evolves as $\left( 1/\sqrt{2^{n+1}} \right) \sum_{x=0}^{2^{n}-1}|x\rangle(|0\rangle-|1\rangle)$. The oracle $U_f$ which maps state $|x\rangle|y\rangle$ to $|x\rangle|y \oplus f(x)\rangle$ is applied at step 2.
After that, the state becomes $\left( 1/\sqrt{2^{n+1}} \right) \sum_{x=0}^{2^{n}-1} (-1)^{f(x)} |x\rangle(|0\rangle-|1\rangle)$.
At step 3, through applying Hadamard gates to the first $n$ qubits, the final state is

\begin{align*}
\frac{1}{2^{n}} \sum_{y=0}^{2^{n}-1}\left[\sum_{x=0}^{2^{n}-1}(-1)^{f(x)}(-1)^{x \cdot y}\right]|y\rangle,
\end{align*}

where $x \cdot y =  x_0y_0 \oplus \cdots \oplus x_{n-1}y_{n-1}$ and $\oplus$ is addition modulo 2.
The probability of measuring $|0\rangle^{\otimes n}$ is $\left|\frac{1}{2^{n}} \sum_{x=0}^{2^{n}-1}(-1)^{f(x)}\right|^{2}$, which is 1 if $f$ is constant and 0 if balanced.
Therefore, by a single measurement of the result, we can determine whether $f$ is constant or balanced with certainty.

§.§.§ Quantum complexity theory

A widely recognized relationship between some complexity classes. P: classically solvable in polynomial time; NP: classically verifiable in polynomial time; BQP: solvable in polynomial time on a quantum computer; QMA: verifiable in polynomial time on a quantum computer; PSPACE: classically solvable in polynomial space.

Quantum complexity theory is a subfield of computational complexity theory.
Theoretical works [Bremner et al., 2011, Bremner et al., 2016, Bremner et al., 2017, Farhi and Harrow, 2016] have proven the advantage of quantum computing over a classical computer on some tasks from the perspective of computational complexity theory.
Although there are many unsolved problems in computational complexity theory (e.g., a well-known open problem is whether P is equal to NP), the relation of some frequently used complexity classes shown in Fig. <ref> is widely believed.  Specifically, bounded-error quantum polynomial time (BQP) contains decision problems that are solvable by a quantum computer in polynomial time. While relationships between NP and BQP have not been mathematically proven, some problems are solvable in polynomial time by quantum algorithms and only verifiable in polynomial time classically, e.g., integer factorization. Shor's algorithm [Shor, 1999] solves the integer factorization problem in polynomial time which is exponentially faster than the best known classical algorithm. This quantum algorithm poses a real threat to the current cryptosystem.
Grover's algorithm [Grover, 1996], also known as the quantum search algorithm, searches an unstructured database with $N$ entries using only $\sqrt{N}$ queries. Amplitude amplification is a generalization of Grover's algorithm and the application of amplitude amplification usually leads to quadratic speedups over classical algorithms. However, noisy environments and qubit limitations prevent the implementation of the aforementioned algorithms. To fully utilize the currently available NISQ devices, a different algorithm design philosophy arose in recent years in the form of variational quantum algorithms.

§.§ Variational quantum algorithms

Variational quantum algorithms (VQAs) [Cerezo et al., 2021] are a class of quantum-classical hybrid algorithms whose mechanisms resemble deep neural networks. The applications of VQAs include  combinatorial optimization [Farhi et al., 2014], quantum chemistry [Peruzzo et al., 2014], quantum error correction [Roffe, 2019], and  machine learning  [Biamonte et al., 2017]. To fully leverage the power of both quantum and classical computers, VQAs implement parameterized quantum circuits on real quantum devices and use classical optimizers to update these trainable parameters. In this way, VQAs can readily adapt to the limitations of near-term quantum devices, which have restricted circuit depth and unavoidable gate noise. The superiority of VQAs stems from the fact that the state space represented by parameterized quantum circuits is unlikely to be efficiently simulated by classical computers. These properties ensure that VQAs are one of the most promising strategies to obtain quantum advantages in the NISQ era [Bharti et al., 2022].

The Schematic of VQAs. The elements of VQAs include the parameterized quantum circuit and the classical optimizer. The red and green boxes refer to the single-qubit and multi-qubit quantum gates, respectively. These gates can either be trainable or fixed.  In the training process, the optimizer continuously updates the trainable parameters to minimize the discrepancy between the quantum circuits' predictions and the true labels.

The schematic diagram of VQAs is outlined in Fig. <ref>. Analogous to NNs, VQAs are composed of three fundamental building blocks: the learning model, the optimizer, and the cost function. The key difference between classical machine learning algorithms and VQAs is in the way the learning model is implemented. Namely, the former adopts deep neural networks while the latter adopts the parameterized quantum circuit (as so-called quantum neural networks (QNNs) in the context of quantum machine learning), which is formed by the parameterized quantum gates and fixed quantum gates. Given a set of training data $\{\bm{x}_i, \bm{y}_i\}_{i=1}^N$, denote the prediction of QNN for the $i$-th example as $\bm{\hat{y}}_i=h(\bm{x}_i, \vect\theta)$ for $\forall i \in [N]$. The optimization of VQAs amounts to finding the optimal parameters $\vect\theta^*$ and minimizing the distance between the true labels and predictions according to a predefined cost function $\mathcal{C}(\cdot, \cdot)$, i.e., $\vect\theta^* =  \arg\min_{\vect\theta}\sum_{i=1}^N \mathcal{C}(\bm{y}_i, h(\bm{x}_i, \vect\theta))$. The possible choice of cost functions contains the mean square loss and the cross-entropy loss in discriminative learning and KL divergence in generative learning. The optimization can be completed via both gradient-free or gradient descent methods. The gradients can be acquired via the parameter shift rule [Schuld et al., 2019].

Next, we elucidate the mathmatical foundation of QNN $h(\bm{x}_i, \vect\theta)$, which is constructed by the initial state, the encoding unitary $U_{\bm{x}}$, the Ansatz $U(\vect\theta)$, and the measurement operator. Given the classical data, which can be the training example or the instance sampled from the prior distribution, QNN encodes it into the quantum state via the encoding unitary $U_{\bm{x}}$. Note that the method used to achieve $U_{\bm{x}}$ is flexible and can be via basis encoding, amplitude encoding, and gate encoding. For instance, when the gate encoding is adopted, the encoding unitary may take the form  $U_{\bm{x}}=\otimes_i RY(\bm{x}_i)$. Another key component in QNN is Ansatz $U(\vect\theta)$. As with deep neural networks, Ansatz obeys a multi-layer structure, i.e.,
\begin{equation}
\label{eq:vqa}
U(\boldsymbol{\theta})=U_{L}\left(\boldsymbol{\theta}_{L}\right) \cdots U_{2}\left(\boldsymbol{\theta}_{2}\right) U_{1}\left(\boldsymbol{\theta}_{1}\right).
\end{equation}

Particularly, the gate arrangement in each layer is diverse. As detailed below, a well-designed Ansatz can dramatically enhance the performance of VQAs for certain learning tasks. Let us denote the initial state as $\ket{\Psi_0}$ and the measurement operators as $\{O_i\}_{i=1}^d$ when the dimension of the prediction is $d$. There are two strategies to implement QNN. The first one only queries the data unitary once, i.e., $h(\bm{x}_i, \vect\theta)$ equals to
\[[\tr(O_1U(\vect\theta)U_{\bm{x}}\rho U_{\bm{x}}^{\dagger}U(\vect\theta)^{\dagger}),...,\tr(O_dU(\vect\theta)U_{\bm{x}}\rho U_{\bm{x}}^{\dagger}U(\vect\theta)^{\dagger})].\]

The second one is using $U_{\bm{x}}$ and $U(\vect\theta)$ multiple times, i.e., the $j$-th component of $h(\bm{x}_i, \vect\theta)$  for $\forall j \in [d]$ becomes

\[\tr(O_jU(\vect\theta)U_{\bm{x}}...U(\vect\theta)U_{\bm{x}}\rho U_{\bm{x}}^{\dagger}U(\vect\theta)^{\dagger}...U_{\bm{x}}^{\dagger}U(\vect\theta)^{\dagger}).\]

As mentioned above, the design of Ansätze is critical in VQAs. This is because some gates are costly to construct from native gates. Furthermore, employing more gates hints at introducing more noise into the quantum system in light of the immaturity of current quantum devices. Therefore, choosing effective Ansätze depending on the given learning tasks can alleviate these issues. Based on whether the problem Hamiltonian is available, Ansätze of VQAs can be roughly classified into two categories, i.e., Hamiltonian-informed Ansätze and Hamiltonian-agnostic Ansätze.

Hamiltonian-informed Ansatz.
For most quantum physics problems where the Hamiltonian is provided, we could tailor the Ansatz by using the information of the Hamiltonian.
Specifically, each unitary gate is the time evolution of a certain Hamiltonian $H$ in the form of $U(t) = e^{- i t H}$. Thus, we could control the size of the Ansatz by only keeping gates that are relevant to the problem Hamiltonian. For a Hamiltonian that is hard to simulate directly but can be expressed as the linear sum of easily-implemented Hamiltonians $H = \Sigma_k a_k h_k$, the Suzuki-Trotter expansion is commonly used to approximate the corresponding time evolution, i.e.,

\begin{equation}
e^{-i H t}=\lim _{m \rightarrow \infty}\left(\prod_{k} e^{-i \frac{a_{k} h_k}{m} t}\right)^{m}.
\end{equation}

A concrete example of the Hamiltonian-informed Ansatz is the quantum alternating operator Ansatz (QAOA) [Hadfield et al., 2019], which is exploited to solve combinatorial optimization problems. Concisely, the target graph is encoded into the problem Hamiltonian $H_P$, and the mixing Hamiltonian $H_M$ is defined as $H_M=\Sigma \sigma_x^{i}$.
The mathematical expression of QAOA is $U(\gamma, \boldsymbol{\beta})=\prod_{l=1}^{p} e^{-i \beta_{l} H_{M}} e^{-i \gamma_{l} H_{P}}$. The performance of QAOA improves monotonically with increasing $p$. Besides QAOA,  Hamiltonian-informed Ansätze are also widely applied in quantum chemistry problems, such as the unitary coupled-cluster Ansatz [Taube and Bartlett, 2006] and the factorized unitary coupled-cluster [Chen et al., 2021].

A possible implementation of the hardware-efficient Ansatz. It is composed of the single-qubit rotation gates and multi-qubit gates as native gates. $U_{\text{ENT}}$ represents entangling unitary operations.
Image taken from Ref. [Kandala et al., 2017].

Hamiltonian-agnostic Ansatz.
Hamiltonian-informed Ansätze may not ensure good  VQA performance due to challenges including the constrained qubit connectivity, the restricted gate sets, the imperfect gate fidelities, and limited coherence times of current quantum devices. Moreover, for most conventional machine learning problems, less is known about how to construct the corresponding Hamiltonian. In this scenario, Hamiltonian-agnostic Ansätze are broadly employed in VQAs instead of Hamiltonian-informed Ansätze.

The most commonly used Hamiltonian-agnostic Ansatz is the hardware-efficient Ansatz [Kandala et al., 2017] (see Fig. <ref>).
A hardware-efficient Ansatz consists of single-qubit rotation gates and multi-qubit gates, e.g., CNOT or CZ gates. The connectivity of the multi-qubit gates can readily adapt to the topology of the quantum hardware, which suppresses the influence of noise.
Two other classes of Hamiltonian-agnostic Ansätze are tensor-network Ansätze and neural-network Ansätze. The former is inspired by tensor network techniques, where the architecture of the Ansatz mimics classical tensor networks such as the matrix product state (MPS)
[Verstraete et al., 2008], the tree tensor network (TTN)
[Shi et al., 2006], and the multi-scale entanglement renormalization Ansatz (MERA) [Vidal, 2007]. Similarly, the latter is inspired by deep neural networks, where the architecture of the Ansatz mimics classical neural networks such as convolutional neural networks [Cong et al., 2019], recurrent neural networks [Bausch, 2020], and graph neural networks [Verdon et al., 2019].

Representative works of quantum generative learning models from both theoretical and experimental perspectives.

Category      Reference      Highlights

5*QCBM     Benedetti et al., 2019    Propose the first QCBM protocol and demonstrate its ability on a trapped ion quantum computer.

Liu and Wang, 2018    Introduce the gradient-based optimizers in QCBM and propose to tailor Ansatz with Chow-Liu tree topology.

Zhu et al., 2019    Implement QCBM [Benedetti et al., 2019]  on a seven-qubit fully programmable trapped ion quantum computer.

Du et al., 2020    Utilize Bayes inference with the equipment of ancillary qubits and show stronger expressive power than traditional PQCs.

Coyle et al., 2020    Devise QCIBM based on Ising Hamiltonians and propose to use SHD, SD, as well as the quantum kernel MMD as cost functions.

3*QGAN      Lloyd and Weedbrook, 2018        Propose four types of QGANs, categorized by whether the learning task and the implementations of generators and discriminators are quantum or not.

Dallaire-Demers and Killoran, 2018        A companion paper with Ref. [Lloyd and Weedbrook, 2018], which mainly focuses on demonstrating the feasibility of QGAN through numerical simulations.

Hu et al., 2019        Present the first proof-of-principle experimental demonstration of QGAN in a superconducting quantum circuit.

Zoufal et al., 2019        Exploit QGAN to learn and load generic probability distributions that are implicitly given by data samples into quantum states.

Huang et al., 2021        Devise Patch-GAN and Batch-GAN to generate images on a superconducting quantum computer.

4*QBM     Amin et al., 2018    Introduce the  noncommutative nature of quantum Hamiltonian into BMs and perform a bound-based training of fully-visible QBMs and semi-restricted ones.

Kieferová and Wiebe, 2017       Propose a state-based training scheme for QBMs, enabling quantum state estimation and the state copy reconstruction.

Crawford et al., 2018      Demonstrate the effectiveness of QBMs compared with classical RBMs in  RL tasks.

Zoufal et al., 2021       Design a variational QBM model implemented by PQCs, which enables the Gibbs state preparation and the exact gradient calculation of cost functions.

5*QAE     Romero et al., 2017     Propose the first QAE to compress particular quantum states from high dimensional Hilbert space to a low one.

Wan et al., 2017       Devise a quantum-neuron-based QAE model and discuss its possibility in discovering  quantum teleportation protocols.

Khoshaman et al., 2018       Design a QVAE model in which the latent space of a classical VAE is represented by a QBM, and the training is realized by minimizing Q-ELBO.

Steinbrecher et al., 2019       Introduce a QONN structure, which is likely to be used in the next-generation of quantum processors, since it integrates many quantum optics features with neural networks.

Pepper et al., 2019       Experimentally realize a QAE which compresses qutrits to qubits with a photonic device.

§ QUANTUM GENERATIVE LEARNING MODELS

In this section, we systematically review the current progress of quantum generative learning models (QGLMs), which can be interpreted as the quantum extension of classical generative learning models as illustrated in Fig. <ref>. In each subsection, we first elaborate on the seminar work of each class of QGLMs, followed by demonstrating their variants and potential applications. For comprehension, we summarize representative works of QGLMs in Table <ref> and the available source codes of QGLMs in Table <ref>.

A summary of open source codes for QGLMs.

QCBM     QGAN     QBM     QAE

TFQ [Broughton et al., 2020]      -     [Niu et al., 2021]       -     -

Pennylane [Bergholm et al., 2018]     -      [Li et al., 2021]      -     -

Qiskit [Aleksandrowicz et al., 2019]     -       [Stein et al., 2020, Zoufal et al., 2019]      -     [Achache et al., 2020]

Yao.jl [Luo et al., 2020]     -     [Zeng et al., 2019]      -     -

Pyquil [Smith et al., 2016]      [Coyle et al., 2020]      -     -     -

Others     [Liu and Wang, 2018]     [Chakrabarti et al., 2019]      -     -

§.§ Quantum circuit Born machine

The quantum circuit Born machine (QCBM) was first proposed by Benedetti et al., 2019 (which is also referred to as the data-driven quantum circuit learning framework). QCBM is the quantum counterpart of the MLP generative learning model formulated in Section <ref> in which that MLP is replaced with QNNs [Benedetti et al., 2019]. The key concept of QCBM is leveraging QNNs to generate a tunable and discrete probability distribution $p_{\vect\theta}$, which approximates the target  discrete probability distribution $q$. QCBMs inherit the Born rule naturally and can be efficiently implemented on NISQ devices due to the versatility of PQCs.

The QCBM learning framework with an illustrative task on Bars And Stripes (BAS) (2,2) image (a $2\times 2$ pixel synthetic dataset image) generation [MacKay et al., 2003]. Figure adapted from Ref. [Benedetti et al., 2019].

The paradigm of QCBM is illustrated in Fig. <ref>, which is formed by a QNN, a cost function, and a classical optimizer. In Ref. [Benedetti et al., 2019], these three components are realized by the hardware-efficient Ansatz [Kandala et al., 2017], the KL divergence, and the gradient-free particle swarm optimizer (PSO) [Kennedy and Eberhart, 1995], respectively. More specifically, an initial n-qubit state $|0\rangle^{\otimes n}$ is fed into the hardware-efficient Ansatz $U(\vect\theta)\in \text{SU}(2^n)$ formulated in Section <ref>.  In QCBM, the probability of sampling $\vect{x}\in\{1,2,...,2^n\}$ yields $p_{\vect\theta}(\vect{x})= \tr (\Pi_{\vect{x}} U(\vect\theta) (|0\rangle\langle0|)^{\otimes n} U(\vect\theta)^{\dagger})$,  where $\Pi_{\vect{x}} = |\vect{x} \rangle \langle \vect{x}|$ denotes the projection operator along the computational basis $\vect{x}$. The KL divergence is then adopted to measure the discrepancy between the generated discrete distribution $p_{\vect\theta}$ and the target discrete distribution $q$, i.e., $D_{KL}[q||p_{\vect\theta}]=\sum_{\vect{x}} q(\vect{x}) \log( q(\vect{x})/p_{\vect\theta} (\vect{x}))$. To better approximate $q$, the PSO is employed to continuously update $\vect\theta$, and minimize $D_{KL}[q||p_{\vect\theta}]$ until it converges.

Benedetti et al., 2019 applied QCBM to complete three learning tasks on both numerical simulators and a trapped-ion quantum computer [Debnath et al., 2016]. These learning tasks are BAS (2,2) image generation, 3-qubit Greenberger-Horne-Zeilinger (GHZ) state preparation  [Greenberger et al., 1990, Monz et al., 2011], and coherent Boltzmann probability distributed thermal state preparation. The experimental results for the image generation confirmed that the performance of QCBM depends on the topology of the adopted entangling layers in PQCs. That is, when the topology of PQCs accommodates the hardware architectures, QCBM can attain high performance. On the task of GHZ state preparation, the trained QCBM recovered the most efficient and compact protocols on trapped-ion computers [Monz et al., 2011].  On the task of thermal state preparation, experimental results indicated that a deeper circuit may achieve better performance when the learning tasks become difficult [Choromanska et al., 2015].

§.§.§ Variants

Since Benedetti et al., 2019, extensive studies exploring the enhancement of QCBM capabilities have been conducted. The related literature can be categorized into three classes, i.e., the design of different Ansätze, the selection of alternative cost functions, and the employment of powerful optimizers.

Ansätze design.  Several studies have investigated the possibility of tailoring the hardware-efficient Ansatz to improve the performance of QCBM. In particular, Liu and Wang, 2018 proposed a variant of hardware-efficient Ansatz whose entangling layers are realized by the Chow-Liu tree structure [Chow and Liu, 1968, Koller and Friedman, 2009]. Meanwhile, a differentiable learning method, which is completed by the parameter shift rule, was employed to optimize QCBMs. The simulation results conducted on the BAS (3,3) dataset and the double Gaussian peak model validated the feasibility of their approach. Hamilton et al., 2019 benchmarked the performance of QCBM implemented on IBMQ_Melbourne [153]. When the number of entangling layers is increased to $2$, a QCBM with sparse connectivity in the entanglement layer attained a better performance than the denser one. In addition, they identified that the optimization may be stuck into local minima for certain configurations of the entanglement layer.  Zhu et al., 2019 experimentally studied the performance of QCBM executed on a customized programmable trapped-ion system [Debnath et al., 2016], and the experimental results showed that the convergence behaviour is closely related to both the optimizer and hardware connectivity. Leyton-Ortega et al., 2021 performed a robust test of QCBM on the Rigetti Aspen superconductive quantum processor using a tailored hardware-efficient Ansatz, which is formed by RY gates and CZ gates. The abandonment of RZ gates allows for a reduced number of trainable parameters and thus facilitates accelerated optimization. Following the same routine, Hamilton et al., 2021 conducted extensive simulations to investigate how different parameterizations (i.e., RY rotation gates versus arbitrary rotation gates) and varied settings for the sparsity of the entangling layers (i.e., periodic closure versus unitary 2-designs [Cerezo et al., 2021]) affect the performance of QCBM. By analyzing the loss landscape, the authors unveiled that although employing RY gates enables fast training, this strategy unavoidably induces rigidity into the circuits. On the other hand, employing arbitrary rotation gates benefits a deeper circuit and generally yields better performance, since it improves the connectivity of the loss landscape. Besides engineering the layout of the hardware-efficient Ansatz, Du et al., 2020 enhanced the expressive power of QCBM by introducing ancillary qubits. Numerical simulations verified the effectiveness of their proposal. Recently, Gong et al., 2022 attempted to integrate tensor-network-based Ansätze [Huggins et al., 2019] with QCBM. The simulation results indicate that their proposal can attain a comparable generative capability with other QCBMs while require fewer qubit resources and parameters.

Initial attempts have been conducted to combine QCBM with the Hamiltonian-informed Ansatz. Specifically, Coyle et al., 2020 proposed the quantum circuit Ising Born machine (QCIBM). The authors argued that QCIBM could achieve quantum advantages when the employed cost function, i.e., total variation (TV) distance, is less than a small threshold. Experiments on the Regetti platform exhibited the expressive power of QCIBM to learn random instances of target probability distributions. Meanwhile, the authors claimed that QCIBM can be used to perform a type of `weak' quantum circuit compilation. Let us recall that the objective of quantum circuit compilation is to represent an arbitrary unitary $U$ as a sequence of native gates in a quantum device. With the limited quantum resources,  `weak' quantum circuit compilation aims at simulating the output of the target unitary instead of the unitary itself. They used QCIBM with QAOA [Farhi et al., 2014] to learn the output distribution of an instantaneous quantum polynomial time (IQP) [Shepherd and Bremner, 2009] circuit.

Cost functions. Another line of research in the context of QCBM is designing different cost functions. Besides KL divergence applied in Refs. [Benedetti et al., 2019, Liu and Wang, 2018, Zhu et al., 2019, Leyton-Ortega et al., 2021, Alcazar et al., 2020, Zhu et al., 2021, Gong et al., 2022], the maximum mean discrepancy (MMD) [Schölkopf et al., 2002, Gretton et al., 2012] has also been widely utilized in Refs. [Liu and Wang, 2018, Du et al., 2020, Hamilton et al., 2019, Coyle et al., 2020, Hamilton and Pooser, 2020, Coyle et al., 2021, Hamilton et al., 2021, Čepaitė et al., 2022, Gong et al., 2022] for QCBMs. The mathematical form of MMD is $\text{MMD} [p, q] =\mathbb{E}_{\vect{x},\vect{x}'\sim p}[k(\vect{x},\vect{x}')]
-2\mathbb{E}_{\vect{x}\sim p,\vect{y}\sim q}[k(\vect{x},\vect{y})]+\mathbb{E}_{\vect{y} ,\vect{y}'\sim q}[k(\vect{y},\vect{y}')]$,
where $k(\vect{x},\vect{y})$ is the kernel function (e.g., Gaussian kernel [Liu and Wang, 2018] or quantum kernel [Schuld and Killoran, 2019, Havlíček et al., 2019] applied in Refs. [Coyle et al., 2020, Čepaitė et al., 2022]). Other alternative cost functions include the Stein discrepancy (SD) [Stein, 1972], the Sinkhorn divergence (SHD) [Ramdas et al., 2017, Cuturi, 2013], and the Jensen-Shannon (JS) divergence [Leyton-Ortega et al., 2021]   derived from KL divergence.  Liu and Wang, 2018 pointed out that the MMD cost can be more efficiently applied in large-scale systems since KL divergence is usually inaccessible. Furthermore, Coyle et al., 2020 claimed that SHD is superior to MMD in the measure of accuracy and convergence rate. Numerical simulation results certified  the advantages of SHD on certain tasks.

Optimizers. Both the gradient-free and gradient-based optimizers have been broadly used in QCBM. For gradient-free optimizers, PSO [Kennedy and Eberhart, 1995] has been used in Refs. [Benedetti et al., 2019, Zhu et al., 2019], which enables faster training by using a small amount of memory. The covariance matrix adaptation evolution strategy (CMA-ES) [Hansen, 2006]  is capable of optimizing non-linear and non-convex cost functions [Rios and Sahinidis, 2009], and it has been exploited in Refs. [Liu and Wang, 2018, Alcazar et al., 2020] to attain better performance than the simultaneous perturbation stochastic approximation (SPSA) method [Spall, 1998], but it has nevertheless, underperformed in comparison to Adam when the quantum circuit noise is considered [Liu and Wang, 2018]. Bayesian optimization (BO) [Frazier, 2018], as a black-box derivative-free global optimization method, has been explored in Ref. [Zhu et al., 2019]. It constructed a surrogate Bayesian statistical model for the same objective function and queried an acquisition function consisting of the posterior distribution to decide the next sampling direction. The BO method can be applied to problems involving a large number of parameters but the number of queries for evaluating cost functions is limited. Refs. [Kondratyev, 2021, Coyle et al., 2021] adopted Genetic Algorithm (GA) [Holland, 1992]  to optimize QCBMs, which can avoid some local minima in principle. Last, a newly proposed zeroth-order optimization method called ZOOpt toolbox [Liu et al., 2017] has been used in Ref. [Leyton-Ortega et al., 2021], which is designed for large-scale systems and is competent at suppressing the influence of noise. It attained the lowest cost value in the robust test in comparison to Adam and the Stochastic Variation of Hill-Climbing type algorithm (SVHC) [Leyton-Ortega et al., 2021].

The gradient-based optimizers can search local optima efficiently towards deep circuits and large parameter spaces. In this regard, the Adam optimizer has been broadly applied to optimize QCBM models [Liu and Wang, 2018, Du et al., 2020, Coyle et al., 2020, Coyle et al., 2021, Hamilton et al., 2019, Leyton-Ortega et al., 2021, Gong et al., 2022].  The Adam optimizer generally requires a modest amount of computational resources and is well-adapted to most differentiable cost functions. The L-BFGS-B (bound limited memory BFGS) is another gradient-based optimizer adopted in Ref. [Liu and Wang, 2018]. It has a comparable efficiency to L-BFGS while its performance is superior when handling constrained problems [Nocedal and Wright, 1999]. Although it is not noise-tolerant, L-BFGS is particularly favored in large systems (e.g. $\geq 1000$ variables) due to its fast convergence rate. Liu and Wang, 2018 compared the performances of Adam and CMA-ES while treating the L-BFGS-B as a reference with an infinite batch size. The simulation results indicated that CMA-ES is more vulnerable to noise and converges more slowly than Adam.

Although the selection of a suitable optimizer is  typically learning task dependent, it can be concluded that gradient-based methods are capable of dealing with a large-scale QNN and are less sensitive to system noise. Gradient-free optimizers are suitable for a small-scale QNN with fewer parameters [Liu and Wang, 2018] and  highly non-smooth cost functions [Kondratyev, 2021].

A concrete example of $\QTQGQD$ to learn the classical XOR gate. The generator and the discriminator are all parameterized quantum circuits, hardware-efficient Ansätze to be specific.
For $\theta^{x/z}_{i,j,m}$, the superscript ($x$ or $z$) refers to the axis in the Bloch sphere around which the state of $Q_i$ is rotated by the angle $\theta$ in the $i$-th layer.
Image adapted from Ref. [Huang et al., 2020].

§.§.§ Applications

QCBM and its variants have been applied in finance, such as learning empirical financial data distributions [Alcazar et al., 2020, Kondratyev, 2021], generating synthetic financial data [Coyle et al., 2021, Kondratyev, 2021], and learning joint distributions [Coyle et al., 2021, Zhu et al., 2021]. Some recent works applied QCBM to real-life financial datasets and have shown better (or at least equivalent) performance than classical learning models like the RBMs [Kondratyev, 2021, Coyle et al., 2021, Alcazar et al., 2020, Zhu et al., 2021], especially when the scale of the problems increases.  Zhu et al., 2021 reported an exponential advantage of QCBM with a SPSA optimizer over classical methods. Their approach utilized an Ansatz called `qupola' and learned the joint probability distribution of two random variables of the stock market by modeling their copulas using the IonQ trapped-ion platform with up to 8 qubits. It is also possible to utilize QCBMs to efficiently prepare quantum states of interested financial data [Pistoia et al., 2021, Stamatopoulos et al., 2020] when certain conditions, e.g., the integrable property [Grover and Rudolph, 2002] are satisfied.

§.§ Quantum generative adversarial network

The concept of the quantum generative adversarial network (QGAN) was first conceived by Lloyd and Weedbrook, 2018. The underlying mechanism of QGAN accords with classical GANs introduced in Section <ref>, where the generator and the discriminator are employed to carry out a two-player minimax game. QGAN can be used to estimate both discrete and continuous distributions. The key difference between QGAN and its classical counterparts is how the generator and discriminator are constructed. As depicted in Fig. <ref>, classical GANs generally employ deep neural networks to implement these two players, while QGANs may exploit QNNs. Celebrated by the strong power of quantum computers, such a construction rule may enable QGANs to gain certain computational advantages over classical GANs. In this regard, Ref. [Lloyd and Weedbrook, 2018] discussed four types of QGANs, categorized by the learned tasks and the ways of implementing generators and discriminators. In what follows, we separately summarize these four types of QGANs and discuss their merits and limitations.

The first type of QGAN, abbreviated as $\QTQGQD$, orients to the $\mathsf{Q}$uantum $\mathsf{T}$ask and consists of both $\mathsf{Q}$uantum $\mathsf{G}$enerator and $\mathsf{Q}$uantum $\mathsf{D}$iscriminator. In this scenario, the generator $G$ and the discriminator $D$ refer to QNNs $U(\vect{\theta_G})$ and $U(\vect{\theta_D})$, respectively. The aim of $G$ is to generate a quantum state $\rho = U(\vect{\theta_G}) \rho_0 U(\vect{\theta_G})^{\dagger}$, where $\rho_0$ is the initial input state of $G$, to approximate the target state $\sigma$. Conversely, the goal of $D$ is to distinguish the target state $\sigma$ from the generated state $\rho$. The objective function $\mathcal{C}_\text{QGAN}(\vect{\theta_G}, \vect{\theta_D})$ for $\QTQGQD$ [Benedetti, 2019] can be defined as

\begin{equation}\label{eqn:loss_QTQGQD}
\text{tr}(\Pi U(\vect{\theta_D}) \sigma U(\vect{\theta_D})^{\dagger}) p_t  - \text{tr}(\Pi U(\vect{\theta_D})\rho  U(\vect{\theta_D})^{\dagger}) p_g,
\end{equation}

where $\Pi$ is the predefined measurement operator, and $p_t$ and $p_g$ refer to prior of feeding $\sigma$ and $\rho$ to $D$ with $p_t + p_g=1$. The optimization of QGAN follows $\min_{\vect{\theta_G}}\max_{\vect{\theta_D}}\mathcal{C}_\text{QGAN}(\vect{\theta_G}, \vect{\theta_D})$, which can be completed by using the methods introduced in Section <ref>. Specifically, QGANs are trained in a two-step strategy: the discriminator is updated first to obtain a better judgement while the generator fixed; then the generator is updated to be more deceptive while the discriminator is fixed. These two steps are conducted successively  until $\mathcal{C}_\text{QGAN}$ converges. Following optimization, the discriminator $D$ labels the input state as true if the posterior probability of $\sigma$ is greater than that of $\rho$ and vice versa. Fig. <ref> shows how to use $\QTQGQD$ to learn the classical  XOR  gate. Since the generated data refers to the density matrix, which can be interpreted as a discrete probability distribution, it can be concluded that $\QTQGQD$ is designed for estimating discrete distributions.

The theoretical foundation of $\QTQGQD$ is established in Ref. [Lloyd and Weedbrook, 2018]. Due to Naimark's dilation theorem, the role of the discriminator $U(\vect{\theta_D})^{\dagger}\Pi U(\vect{\theta_D})$ corresponds to a positive operator-valued measurement (POVM) $\{\Pi_T, \Pi_F\}$ with $\Pi_T+\Pi_F=\mathbb{1}$.  As such, for a fixed $G$, the minimization of $\mathcal{C}_\text{QGAN}$ in Eqn. (<ref>) with respect to $D$ can be achieved by the Helstrom measurement  [Helstrom, 1969].  The probability that the input data is sampled from the target distribution (or produced by the generator) refers to $p(T |\sigma) = \tr{(\Pi_T\sigma)}$ (or $p(T |\rho) = \tr{(\Pi_T\rho)}$). Moreover, the Nash equilibrium $\mathcal{C}_\text{QGAN}=0$ can only be achieved when the generated state exactly recovers the target state with $\rho=\sigma$. Moreover, as shown in Ref. [Lloyd and Weedbrook, 2018], if we can acquire the gradient information of $p(T |\sigma)$ or $p(T |\rho)$ through the  convex strategy space  at each iteration, the discriminator or generator can move directly towards the Nash equilibrium.

The second type of QGAN, abbreviated as $\QTCGQD$, targets the $\mathsf{Q}$uantum $\mathsf{T}$ask and consists of $\mathsf{C}$lassical $\mathsf{G}$enerator and $\mathsf{Q}$uantum $\mathsf{D}$iscriminator.  Considering that some distributions generated by quantum circuits (e.g., the output of IQP circuit [Bremner et al., 2016] and boson sampling [Aaronson and Arkhipov, 2011]) cannot be efficiently simulated by classical machines, classical $G$ may not fit the quantum target distribution precisely.  Consequently, following the theory of $\QTQGQD$, there exists a measurement for the discriminator to distinguish the target distribution from the generated distribution, and the Nash equilibrium can never be achieved.

The third type of QGAN, abbreviated as $\QTCGCD$, targets the $\mathsf{Q}$uantum $\mathsf{T}$ask and consists of both $\mathsf{C}$lassical $\mathsf{G}$enerator and $\mathsf{D}$iscriminator. Although the classical $G$ may not exactly recover the target quantum data, the classical $D$ may fail to detect the difference between the generated data from a classical generator and the complex quantum target data. To this end, the Nash equilibrium can still be achieved. Note that $\QTCGCD$ is closely associated with the topic of using deep neural networks to study quantum physics problems, including quantum state tomography and the entanglement identification [Carleo et al., 2019, Dunjko and Briegel, 2018].

The last type of QGAN discussed in Ref. [Lloyd and Weedbrook, 2018], abbreviated as $\CTQGCD$, targets the $\mathsf{C}$lassical $\mathsf{T}$ask and consists of $\mathsf{Q}$uantum $\mathsf{G}$enerator and $\mathsf{C}$lassical $\mathsf{D}$iscriminator. $\CTQGCD$ is designed for estimating continuous distributions, where the generated data is described by the expectation values when interacting the quantum state with different measurement operators.  As claimed by the authors, $\CTQGCD$ may possess computational advantages over classical GANs, warranted by the ability of quantum processors to represent $N$-dimensional vectors using $\log N$ qubits. In this way, advanced quantum algorithms can apply linear algebra on those vectors in time $O(poly(log N))$ to optimize both the generator and discriminators. By contrast, classical GANs generally request $O(poly(N))$ runtime complexity in optimization.

Variants of QGANs and their abbreviations. For example, $\QTCGQD$ stands for quantum target data, classical generator, and quantum discriminator.

GeneratorDiscriminator     Quantum     Classical

Quantum (CT)     $\CTQGQD$      $\CTQGCD$

Quantum (QT)     $\QTQGQD$     $\QTQGCD$

Classical (CT)     $\CTCGQD$     $\CTCGCD$

Classical (CT)     $\QTCGQD$     $\QTCGCD$

§.§.§ Variants

The development of powerful QGANs has attracted great attention in the past three years. To elucidate, here we follow the method used in Ref. [Lloyd and Weedbrook, 2018] to categorize QGANs. Specifically, according to whether quantum resources are involved in the learning task or the construction of learning models, previous literature related to QGANs can be cast into eight groups, as summarized in Table <ref>. Considering that the main focus of this
work is quantum learning models, we exclude the discussion about $\CTCGCD$ and $\QTCGCD$.

The potential of $\QTQGQD$ has been extensively explored from both algorithmic and experimental aspects. In particular, Dallaire-Demers and Killoran, 2018 proposed the quantum extension of conditional GANs [Mirza and Osindero, 2014], dubbed QuGAN, and claimed that the proposed model has a higher representation power than their classical counterparts. Potential applications of QuGAN include performing quantum chemistry calculations on quantum computers and compressing time evolution gate sequences.     Benedetti et al., 2019 utilized QGAN to estimate an unknown quantum pure state on near-term quantum computers. They suggested using resilient back-propagation as the optimizer and employing the entanglement entropy as the stopping criterion. Relating to the same task, Hu et al., 2019 experimentally demonstrated the first proof-of-principle QGAN on superconducting quantum devices to approximate a single-qubit state.  Then, Huang et al., 2020 implemented QGAN on a 5-qubit superconducting quantum device to learn multi-qubit quantum states and the classical XOR gate.  Yin et al., 2022 proposed a quantum adversarial solver to address quantum information processing tasks. By restricting the expressive power of the quantum generator, their proposal can efficiently detect the bipartite entanglement of quantum states. Experimental results on the linear optical network indicated the effectiveness of the proposal and exhibited potential quantum advantages. On par with designing different implementations of QGANs, some studies advised using different cost functions during training to attain robust performance.  Chakrabarti et al., 2019 studied the smoothness of the original cost function and proposed the Wasserstein semi-metric for quantum data, based on which they constructed the quantum WGAN model.  Stein et al., 2020 proposed a quantum-based cost function, called Quantum State Fidelity, to reduce the number of parameters.

$\QTQGCD$ & $\CTQGCD$. A large body of works falls into the regime of $\QTQGCD$ and $\CTQGCD$. In particular, Zoufal et al., 2019 proposed a type of QGAN that aims to efficiently learn and load random distributions. Experiments conducted on the IBMQ cloud validated the effectiveness of their proposal. Zeng et al., 2019 presented a QGAN model, as an adversarial training scheme for QCBM. Compared with the original QCBM, their proposal quadratically reduces the sample complexity of estimating the cost function. The proposed model can be applied to infer the unobserved data conditioned on partial observations such as image in-painting.   Nakaji and Yamamoto, 2021 proposed the quantum semi-supervised GAN (QSGAN). As with the classical semi-supervised GANs that train the discriminator as a good classifier [Odena, 2016], the main focus of QSGAN is training a good classical discriminator rather than the quantum generator. The simulation results showed that QSGAN can achieve comparable performance to classical semi-supervised GANs by using a fewer number of parameters.  Situ et al., 2020 designed a type of QGAN and demonstrated its potential to avoid the vanishing gradients problem encountered in classical GANs when generating discrete data distributions. Romero and Aspuru-Guzik, 2021 proposed a variational quantum generator, as shown in Fig. <ref>, to model continuous classical probability distributions.  Li et al., 2021 demonstrated how to use a quantum generator to significantly reduce the number of required parameters compared to its classical counterpart in the regime of drug discovery.

A quantum generator for continuous distribution.
The random variable $z$ is mapped to a quantum state by a data encoder $R$.
The output of $G$ in a quantum state is measured multiple times for an approximate distribution representation. And before input to the discriminator, a classical layer produces $x_{Fake}$ as generated data in the continuous space.
Figure adapted from Ref. [Romero and Aspuru-Guzik, 2021].

$\QTCGQD$ & $\CTCGQD$ & Others.
Niu et al., 2021 proposed an entangling QGAN model to overcome the issue of non-convexity and mode collapse. Despite adopting a quantum generator or a quantum discriminator or both, there are also works that add an auxiliary quantum neural network to assist the training of GANs. Associative adversarial networks (AAN) have been proposed to circumvent the imbalance in the training rates of generators and discriminators. Rather than using the uniform or Gaussian distribution in standard GANs, the prior distribution is gained from an additional RBM which is trained simultaneously with generators and discriminators. This RBM takes an intermediate layer of the discriminator as input. The authors claimed that sampling the distribution of the RBM is more meaningful than random noise. Refs. [Wilson et al., 2021, Anschuetz and Zanoci, 2019] extended classical AAN to quantum-classical hybrid architecture by transforming the associated RBM into QBM while leaving generators and discriminators classical. Ref. [Zoufal et al., 2019] explored how the varied optimizers, e.g., AMSGrad, another adaptive-learning-rate, gradient-based optimizer, affect the performance of QGANs. Ref. [Kiani et al., 2021] investigated different definitions of quantum Wasserstein distance and provided the implementation of quantum Wasserstein GAN.

Note that quantum generative adversarial networks discussed in this paper are different from another field called quantum adversarial learning which studies the effect of adversarial examples on a vulnerable model. Adversarial attack works by introducing certain perturbances, imperceptible to human eyes, to a normal sample, leading to a surprising result. Ref. [Lu et al., 2020] reasons about some adversarial scenarios in the context of quantum machine learning.

§.§.§ Applications

The potential applications of QGANs include quantum state tomography [D'Ariano et al., 2003], finance, image generation, and drug discovery. In particular, Benedetti et al., 2019 applied the proposed $\QTQGQD$ to approximate an unknown quantum pure state. In the domain of finance, Zoufal et al., 2019 applied QGANs to help financial derivative pricing and Assouel et al., 2021 applied QGAN models for volatility modeling. Huang et al., 2021 proposed patch-QGAN and batch-QGAN and experimentally demonstrated that these two strategies can generate images of real-world hand-written digits on super-conducting quantum machines. Last, the drug discovery science community has attempted to employ QGANs for drug discovery [Li et al., 2021, Li et al., 2021], which employ the patch strategy.

§.§ Quantum Boltzmann machine

The quantum Boltzmann machine (QBM) is first proposed by Amin et al., 2018. As the quantum generalization of the classical Boltzmann machine (BM) introduced in Section <ref>, it exploits quantum devices to prepare the Boltzmann distribution estimating the target discrete distributions. The main difference between QBM and classical BMs is that the units in Fig.<ref> are replaced by qubits and naturally the energy term appeared in Eqn. (<ref>) is replaced by a Hamiltonian. For a transverse-field Ising model, the Hamiltonian takes the form $H (\vect\theta)= - \sum_{i, j} w_{i j} \sigma_{i}^{z} \sigma_{j}^{z} - \sum_{i} b_{i} \sigma_{i}^{z} -\sum_{i} \Gamma_{i} \sigma_{i}^{x}$, where $\vect\theta=\{\vect{w}, \vect{b}, \vect{\Gamma}\}$ are the trainable parameters.  The implementation of a semi-restrict QBM (semi-RQBM) is depicted in Fig. <ref>, where the internal connection between hidden units are disallowed. For a general QBM, the probability of observing the state $|\vect{v}\rangle$ is $p_{\vect\theta}(\vect{v})= \tr (\Lambda_{\vect{v}} \rho)=Z^{-1}\tr (\Lambda_{\vect{v}} e^{-H (\vect\theta)})$, where $Z=\tr (e^{-H (\vect\theta)})$ is the partition function, $\rho = Z^{-1}e^{-H (\vect\theta)}$ is the density matrix, and the diagonal matrix $\Lambda_{\vect{v}}=|\vect{v}\rangle\langle\vect{v}| \otimes \mathbb{1}_{\vect{h}}$ is a standard projective measurement.  To approximate the target distribution $q$, QBM updates its trainable parameters $\vect{\theta}$ to minimize the negative log-likelihood, i.e.,
$\mathcal{C}_{\text{QBM}} = -\sum_{\vect{v}} q(\vect{v}) \log {p(\vect{v})}$. The gradients of $\mathcal{C}_{\text{QBM}}$ take the form

\begin{equation}
\label{qbm_differential}
\partial_{\vect\theta} \mathcal{C}_{\text{QBM}}=\sum_{\vect{v}} q(\vect{v})\left(\frac{\tr (\Lambda_{\vect{v}} \partial_{\vect\theta} e^{-H})}{\tr (\Lambda_{\vect{v}} e^{-H})}-\frac{\tr (\partial_{\vect\theta} e^{-H})}{\tr (e^{-H})}\right),
\end{equation}

where the first term is called the positive phase and the second term (negative phase) refers to the Boltzmann average and is equivalent to $\left\langle\partial_{\vect\theta} H\right\rangle =\tr (\rho \partial_{\vect\theta} H)$. Note that since the exact sampling of $\rho$ is NP-hard [Barahona, 1982], the calculation of the negative phase becomes intractable for large-scale problems. To this end, instead of exact sampling, quantum analogues of the classical constructive divergence method [Hinton, 2002] have been proposed [Poulin and Wocjan, 2009, Yung and Aspuru-Guzik, 2012].  By leveraging the Golden-Thompson inequality [Golden, 1965, Thompson, 1965],
Amin et al., 2018 argued that the training cost of QBM can be replaced by its upper bound $\tilde{\mathcal{C}}_{\text{QBM}}$, i.e., ${\mathcal{C}}_{\text{QBM}} \leq \tilde{{\mathcal{C}}}_{\text{QBM}} \equiv -\sum_{\vect{v}} q(\vect{v})\log [\tr ( e^{-H_{\vect{v}}})/\tr ( e^{-H} )]$,
where $H_{\vect{v}}=\langle\vect{v}|H| \vect{v}\rangle$ is the clamped Hamiltonian. In this way, the trainable parameters $\{\vect{b}$, $\vect{w}\}$ can be updated efficiently. However, this method does not allow the training of the transverse filed $\vect{\Gamma}$, which has to be preset as a hyper-parameter in this model.

A semi-RQBM model with variables of visible layer ($\vect{\sigma^z_v}$) and hidden layer ($\vect{\sigma^z_h}$) respectively.
Compared to the quantum counterpart of traditional RBM (as shown in Fig.<ref>, right panel), where all internal connections within visible and hidden units are disallowed, semi-RQBM is more suitable for further analysis. A transverse filed $\Gamma$ is also present in every unit to represent the noncommutative part in the Hamiltonian of the system.

Amin et al., 2018 further applied two types of QBMs, i.e., the fully visible QBM and the semi-restricted QBM (semi-RQBM), to simulate a Bernoulli mixture distribution. Experiments have shown that QBMs achieve better trainability than classical ones. A supervised generative task was also performed on a fully visible model, which takes an 8-qubit input and provides a 3-qubit output, where the input $\vect{x}$ and the output $\vect{y}$ are treated jointly as the visible pairs $\vect{v}=(\vect{x},\vect{y})$.  The numerical result indicated that QBM trained with a joint distribution $p(\vect{x}, \vect{y})$ obtained a much lower cost over classical BMs. The authors also discussed the potential of employing a quantum annealer as the processor to implement QBM. To this end, Benedetti et al., 2017 experimentally confirmed the feasibility of this proposal by implementing BM models on the D-Wave 2X quantum annealer with up to 940 qubits to accomplish unsupervised generative learning tasks.

The most problematic part of QBM models is the sampling of the positive and negative phases respectively. Regarding the positive phase, it could be numerically estimated using exact diagonalization or quantum Monte Carlo (QMC) techniques, or more efficiently, be approximated via the Golden-Thompson inequality [Anschuetz and Cao, 2019, Amin et al., 2018, Xiao et al., 2020]. However, it prevents the training of the transverse field and hence that has to be treated as a hyper-parameter. Though employing POVM  [Kieferova and Wiebe, 2016] mitigates this issue, it requires prior information on the data distribution and is generally difficult.
There might be other approximation methods that yield better performance like quantum mean-field methods [Xiao et al., 2020].
The negative phase sampling is a computationally NP-hard problem where the exact diagonalization needs exponential complexity.
Multiple works have been proposed to accelerate the sampling of the Gibbs state. The general approach to approximate thermal state sampling is by applying QMC techniques, including simulated quantum annealing (SQA) [Crawford et al., 2016] and the state-of-art CT-QCMC [Xiao et al., 2020].
With no known theoretical bound complexity, heuristic algorithms for thermodynamics or other physics systems can hopefully find more efficient solutions. For instance, Ref. [Anschuetz and Cao, 2019] adopted a combination system based on the eigenstate thermalization hypothesis, while it is not applicable for general interaction systems [Rigol et al., 2008]. Ref. [Zoufal et al., 2021] proposed a method using VarQITE and experimentally implemented QNN on quantum hardware, which provides a framework of quantum circuits with complex structures.

§.§.§ Variants

The variants of QBMs can be divided into three classes, depending on the training method. The first class is bound-based training in which the original cost function is replaced by its upper bound [Amin et al., 2018, Kieferová and Wiebe, 2017, Anschuetz and Cao, 2019, Khoshaman et al., 2018]. The second class is the state-based training by minimizing the relative entropy [Kappen, 2020, Kieferová and Wiebe, 2017, Wiebe and Wossnig, 2019, Wiebe et al., 2019]. The last class is the circuit-based training [Zoufal et al., 2021], which utilizes variational quantum imaginary time evolution (VarQITE) methods [Magnus, 1954, McArdle et al., 2019, Yuan et al., 2019].

Bound-based training. The key concept of the bound-based training is using Golden-Thompson inequality to impose an upper bound on the cost function. This allows an efficient calculation of the gradient information. Kieferová and Wiebe, 2017 proposed a POVM-based training scheme which is a generalization of Ref. [Amin et al., 2018], where the measurements $\Lambda_{\vect{v}}$ in  Eqn. (<ref>) are generalized to POVM. As such, the training in the transverse field can proceed. To explore potential quantum advantages, Ref. [Kieferová and Wiebe, 2017] applied QBMs to solve Hamiltonians with the fermionic form since the sign problem [Hangleiter et al., 2020, Li et al., 2015] prevents the efficient implementation of QMC techniques. Simulation results have indicated that QBMs can provide a significantly enhanced learning performance over classical BMs.

Puškarov and Cubero, 2018 argued that the generalized Gibbs ensembles [Rigol et al., 2007, Barthel and Schollwöck, 2008] could be leveraged as a basis for QBMs. In doing so, the gradient information can be effectively obtained due to the commutativity of the conserved charge in the integrable Hamiltonian by learning the optimal effective temperatures. Simulation results showed that their proposal could achieve a reasonably low error rate with much fewer parameters than RBM. Anschuetz and Cao, 2019 proposed an efficient method to approximately sample the  thermal states of the QBM negative phase, which is supported by the eigenstate thermalization hypothesis [Srednicki, 1994, Deutsch, 1991]. The numerical simulation results illustrated that their proposal has a comparable performance with the exact QBM and is superior to the classical RBM. Meanwhile, it is also robust against noise.  Xiao et al., 2020 proposed a general training scheme for various QBMs, which includes  general transverse-field Ising models and the stochastic $\kappa$-local ($\kappa \geq 2 $) Hamiltonians. The authors also verified the efficiency of their proposal through simulations on small-scale multi-mode Bernoulli distribution [Anschuetz and Cao, 2019, Juan and Vidal, 2004] and large-scale MNIST dataset.

State based training. Kieferová and Wiebe, 2017 first illustrated a state-based training scheme for QBM  without hidden units. The model is trained to minimize the relative entropy between a known quantum state $\rho$ prepared by an oracle and the generated observable state with density matrix $\sigma$, i.e., $S\left(\rho|\sigma\right)=\tr (\rho \log \rho)-\tr \left(\rho \log \sigma\right)$ [Carlen, 2010]. This protocol provides an alternative technique to quantum state tomography (QST) and can further generate copies of the learned quantum distributions. Based on the fully visible QBM model, the tomographic reconstructions of Haar-random pure states and mixed two-qubit states show a high level of accuracy using the state-based training. Wiebe and Wossnig, 2019 provided two training methods for QBM to minimize the relative entropy with the presence of hidden units. The visible part of the generated observable state $\sigma$ takes the form $\sigma_{v}(H)={\tr _{h}( e^{-H}})/{\tr (e^{-H})}$. The first approach is to propose a variational upper bound of the cost function, which is based on a constrain-form Hamiltonian with commutative hidden units. To obtain the gradient of this upper bound, the Gibbs state preparation, Hadamard test, and amplitude estimation subroutines are needed. The second approach is adaptive to general forms of Hamiltonians and is more up-to-date. A truncation on the term $\text {log} \sigma_{v}$ [Van Apeldoorn et al., 2020] is taken
and then Fourier series approximation is employed with $\sigma_{v}\approx \sum_{m} c_{m} \exp \left(i m \pi \sigma_{v}\right)$. In conjunction with the divided difference method, the gradients of the cost function can be efficiently estimated and the evaluation of which could be realized through the Hadamard test and sample-based Hamiltonian simulation [Lloyd et al., 2014, Kimmel et al., 2017] subroutines that are available on quantum devices.

Quantum circuit based training. Zoufal et al., 2021 proposed a variational QBM. Different from previous literature, the specified Hamiltonian takes a distinct form, i.e.,  $H_{\vect\theta}=\sum_{i=0}^{p-1} \vect\theta_{i} h_{i} \equiv \sum_{i=0}^{p-1} \vect\theta_{i} \bigotimes_{j=0}^{n-1} \sigma_{j, i}$, where $\vect\theta \in \mathbb{R}^p$ and the Pauli operator $\sigma_{j, i} \in\{I, X, Y, Z\}$ acts on the $j$-th qubit. Utilizing the VarQITE method, the approximated Gibbs states are prepared by quantum circuits, and the analytic gradients are computed using automatic differentiation method. The effectiveness of the VarQITE method is confirmed on quantum hardware by examining the closeness of the prepared Gibbs states and the target ones, and the experimental results on generative and discriminative tasks also demonstrated the feasibility and the noise-resilient property of variational QBMs.

§.§.§ Applications

Crawford et al., 2018 employed RBM, deep Boltzmann machine (DBM), and QBM models of clamped Hamiltonians to accomplish RL tasks of Maze Traversal problems [Sutton, 1990], which are Markov decision processes and are widely adopted to benchmark RL algorithms. As it is argued that the simulated quantum annealing (SQA) [Crosson and Harrow, 2016, Heim et al., 2015] could simulate the quantum annealing process due to its  behavioral similarity with quantum tunneling and entanglement [Albash et al., 2015, Isakov et al., 2016, Shin et al., 2014], it is utilized to generate samples approximating Boltzmann distributions. In the numerical simulations, the SQA method is applied to both the classical Hamiltonian of DBM (by setting the strength of the transverse field in the freeze-out point [Amin, 2015] $\Gamma_f \approx 0$ ) and the quantum Hamiltonian of QBM (by setting $\Gamma_f > 0$ and employing an effective Hamiltonian one dimensional higher). The results showed that the DBM outperforms RBM as the number of training samples increases, whereas the QBM has the best performance. Wiebe et al., 2019 exploited a Fock-space representation to encode linguistic structures in vector spaces.  In this way, the authors illustrated how QBM could be applied to solve language processing tasks.

§.§ Quantum autoencoder

The concept of quantum autoencoder (QAE) was first proposed by two pioneering works [Wan et al., 2017, Romero et al., 2017]. QAE inherited the spirit of classical autoencoders as described in Section <ref>. Namely, the central concept of QAE is compressing the input quantum state into a low-dimensional latent space such that the input can be recovered from this dimension-reduced representation.  Two core components of QAE are the encoder and the decoder, which are implemented by QNNs  [Romero et al., 2017]. The optimization of QAE amounts to minimizing the reconstruction error between the input quantum state and its reconstruction. Since QAE does not encounter the read-in and read-out bottleneck, it possesses potential computational advantages in the task of quantum information processing and quantum many-body physics.

The structure of QAE [Romero et al., 2017] is depicted in Fig. <ref>. In particular, an input state $\rho^{in}=|\psi_i\rangle \langle\psi_i|$ sampled from an ensemble of $(n_A+n_B)$-qubit states $\{p_i, |\psi_i\rangle\}$ is fed into the encoder $U({\vect\theta})$, where $A$ and $B$ are two subsystems with $n_A$ and $n_B$ qubits respectively. Applying the partial measurement to the subsystem $B$, the compressed state is $\sigma=\tr_B(U({\vect\theta})\rho^{in}U({\vect\theta})^{\dagger})$. This completes the encoding process.  Then, by interacting $\sigma$ with another subsystem $B'$ followed by operating the decoder $U^\dagger(\vect\theta)$, the recovered state takes the form  $\rho^{out}= U^{\dagger}(\vect\theta)(\sigma \otimes |0\rangle\langle 0|^{\otimes n_{B'}}) U(\vect\theta)$. The cost function of QAE is defined as the weighted average infidelity between the input ${\rho^{in}}$ and the output $\rho^{out}$, i.e.,

\begin{equation} \label{c1}
\mathcal{C}_{\text{QAE}}(\vect\theta)=1- \sum_{i} p_{i} \cdot F(\rho^{in}, \rho_{i}^{out}),
\end{equation}

where $F\left(\rho^{in}, \rho^{out}_{i}\right)=\tr(\rho^{in}_i\rho^{out}_i)$ is the expected fidelity [Wilde, 2013]. When $   \mathcal{C}_{\text{QAE}}=0$, the state ${\rho^{out}}$ exactly recovers the input $\rho^{in}$. From the view of generative learning, QAE is applied to estimate the discrete distribution (formalized by the density matrix $\rho^{in}$).

The structure of a QAE. The red lines and the black lines represent the qubits of subsystem $A$ and subsystem $B$ respectively.
The trash state of $B$ is measured before a reference state takes the place of the trash state. The compressed state of subsystem $A$ is denoted by $\sigma$.
Note that the reference state is not necessarily restricted to be in state $|0\rangle^{\otimes n}$.
Image adapted from Ref. [Du and Tao, 2021].

The authors applied the proposed QAE to tackle three learning tasks, i.e.,  reconstructing the ground states of molecular hydrogen, Hubbard models, and $H_4$ molecular. The implementation of QAE is achieved by adopting programmable quantum circuits [Daskin et al., 2012, Sousa and Ramos, 2007]. The L-BFGS-B and basin-hopping [Wales and Doye, 1997] optimizers are employed to minimize the cost function. The simulation results indicated the efficiency of compressing quantum states.

§.§.§ Variants

The variants of QAEs can be categorized by their applications. In the following sub sections, we separately introduce QAEs designed for quantum state compression, reconstruction, preparation, and denoising.

Quantum states compression. An efficient method of state compression can dramatically save the required quantum memory and thus has a practical value in quantum chemistry simulation [Peruzzo et al., 2014, O’Malley et al., 2016] as discussed in Refs. [Romero et al., 2017, Bravo-Prieto, 2021]. Due to this reason, there is a growing interest in designing powerful QAEs to complete state compression tasks. In particular,  Bravo-Prieto, 2021 proposed an enhanced feature quantum autoencoder (EF-QAE) with local cost functions to avoid the trainability issues [Cerezo et al., 2021, McClean et al., 2018]  incurred by global cost functions. The authors adopted an encoding strategy that encodes the feature vector of the input data into every single-qubit rotation gate implemented in QNNs [Pérez-Salinas et al., 2020]. The simulation results of compressing the ground states of transverse-field Ising (TFI) Hamiltonian [Bravo-Prieto, 2021] and classical handwritten digits showed that EF-QAE could reach a higher fidelity than standard QAEs. Besides,  Srikumar et al., 2021 proposed a hybrid QAE with a  QFFNN-ANN-QFFNN  structure, where the  quantum forward neural network (QFFNN)  [Beer et al., 2020] is implemented by coupling QNNs and measurements. Huang et al., 2020 proved that an optimal compression can never occur if the rank of the input states is greater than the dimension of the compressed latent space. Ma et al., 2020 proposed a closed-loop learning control strategy to optimize QAE, where the trainable parameters refer to the control field of the encoding unitary. Training QAE with four different optimizing control methods [Khaneja et al., 2005, Judson and Rabitz, 1992, Dong et al., 2019, Salimans et al., 2017] are simulated and compared.

Several studies have explored the possibility of using QAE to complete state compression on photonic systems [Pepper et al., 2019, Huang et al., 2020, Ma et al., 2020, Steinbrecher et al., 2019]. Specifically, Steinbrecher et al., 2019 integrated a quantum optical neural network (QONN) into QAE. The proposed optical QAE can compress quantum optical states by imposing layers of linear optical unitary and single-site nonlinearities with interaction strength.  Pepper et al., 2019 performed experiments with QAE based on the control of a photonic device. The results demonstrated that  QAE could achieve low error rates when compressing qutrits to qubits. Moreover, the proposed QAE is effective and robust during optimization under channel drift.

Quantum states reconstruction. Analogous to classical autoencoders, QAEs have been used to reconstruct quantum states, which is important in quantum communications [Wan et al., 2017, Zhang et al., 2021]. Particularly, Wan et al., 2017 proposed a theoretical scheme to realize the quantum-neural-based QAEs and suggested a quantum communication protocol. Their proposal has the same underlying structure as the autoencoder of FFNN.  Similar to Eqn. (<ref>), the cost function quantifies the differences between the input and output states through Pauli gate measurements.  The authors also discussed the physical feasibility of QAEs via the proposed quantum optical neuron module. Recently, Cao and Wang, 2021 have proposed a noise-assisted quantum autoencoder (N-QAE) to recover general quantum states, including high rank and mixed states. Since the perfect compression cannot be achieved when the rank of $\rho^{out}_{i}$ is larger than $n_A$ [Ma et al., 2020], N-QAE employs devised amplitude-damping channels to prepare mixed reference states, which re-utilize the measurement information of the trash state. By doing this, the  N-QAE can increase the rank of the output state. The authors also designed an adiabatic model of quantum autoencoder (A-QAE) to handle large-scale problems without the vanishing gradient issue. Numerical experiments on reconstructing the thermal states of the TFI model and Werner states have verified the feasibility of A-QAE. Zhang et al., 2021 first illustrated a QAE implementation on a silicon phonic chip, which facilitates the execution of a quantum-autoencoder-facilitated teleportation (QAFT) protocol. With QAFT, some high dimensional quantum states (e.g. qutrit) can be compressed into qubits on the transmitter chip and teleported to the receiver chip where the qutrit can be reconstructed with considerable fidelity.

Quantum states preparation. Another application of QAE is preparing certain quantum states that cannot be efficiently prepared by classical machines. Du and Tao, 2021 proved that the spectral information of the compressed state contains the spectral information of the input state. Supported by this property, the authors devised a method of using QAE to prepare the quantum Gibbs state [Brandao and Svore, 2017, Poulin and Wocjan, 2009]  and estimate the quantum Fisher information. Lamata et al., 2018 established the connection between the approximate quantum adders [Li et al., 2017] and QAEs. As the former enables encoding from a high  dimensional tensor product  state to one qubit state, it can be viewed as a trivial way to realize  QAE. To this end, a gate-limited quantum adder is proposed, where the internal structures of the encoder and decoder are optimized by the GA method. Subsequently, Ding et al., 2019 experimentally implemented the gate-limited quantum adders on a Rigetti cloud quantum computer with 2-qubit input states.

Quantum states denoising.   Bondarenko and Feldmann, 2020 proposed a QAE based on  QFFNN  following the approach developed in Ref. [Beer et al., 2020]. The authors examined different topologies of QFFNNs via numerical simulations and showed that QAEs can denoise the GHZ states under bit-flip error and random unitary error. In the same vein, Achache et al., 2020 also exploited  QFFNN-based QAEs  to denoise quantum states.  Zhang et al., 2021 proposed a detection-based QAE to conduct error mitigation. Their proposal does not require extra qubits and is resource-friendly to NISQ devices.

Others. Besides the above applications, QAEs have been exploited to achieve classical tasks such as reconstructing handwritten digits [Bravo-Prieto, 2021, Khoshaman et al., 2018], boosting high-dimensional search [Gao et al., 2020], and accomplishing   clustering [Srikumar et al., 2021]. Furthermore, recent advances in photonic techniques [Chung et al., 2017, Zhu et al., 2018] provide an opportunity to use QAEs [Pepper et al., 2019, Steinbrecher et al., 2019, Huang et al., 2020, Ma et al., 2020] to complete teleportation tasks with potential quantum advantages.  Further performance improvement can be deliberated in several aspects: taking hybrid schemes [Khoshaman et al., 2018, Gao et al., 2020, Srikumar et al., 2021], leveraging noise and quantum annealers [Cao and Wang, 2021], harness the encoding strategy [Bravo-Prieto, 2021], and taking different structures of encoder-decoder, e.g. QNNs and controlled unitary field [Ma et al., 2020]. The Ansatz may be delicately designed when utilizing PQCs, while the barren plateaus or narrow gorges [Cerezo et al., 2021, Arrasmith et al., 2021] problem still exist in deep PQCs. Besides the exploratory Ansatz used in Refs. [Romero et al., 2017, Zhang et al., 2021, Bravo-Prieto, 2021, Cao and Wang, 2021], the hardware efficient Ansatz has also been tested [Du and Tao, 2021, Srikumar et al., 2021], and the GA algorithm could assist Ansatz designing [Lamata et al., 2018, Ding et al., 2019]. When using QFFNN (QONN) circuits, improvement could be made concerning their topologies, circuit depth and training schemes. And being similar with the classical NNs, the issue of local minima may still exist when a lower depth of circuit is applied [Steinbrecher et al., 2019].

Khoshaman et al., 2018 proposed a quantum variational autoencoder (QVAE), by appending a QBM sub-model to represent the discrete latent space of the classical variational autoencoder.  With the QVAE model, Gao et al., 2020 explored an early applications in the earth science field to search high-dimensional similarity from satellite datasets. Implemented on   D-waves, the QVAE model attains   speedups and requires less storage space than classical methods.

§ CONCLUSIONS AND DISCUSSIONS

In this survey, we provide a comprehensive review of numerous QGLMs and elaborate on their potential to benefit both  conventional machine learning tasks and  quantum physics from the perspective of computational efficiency and model expressivity.  Despite the astonishing progress, quantum generative learning is still in its infancy, and many critical issues still remain unexplored. In the remainder of this section, we discuss these unsolved issues and present insights into the future prospects of quantum generative learning.

§.§ Challenges

Read-in & Read-out bottleneck. A common caveat of QGLMs is the read-in and read-out bottleneck presented in estimating  high-dimensional continuous distribution tasks [Aaronson, 2015]. Particularly, both QAE and QGAN (i.e., $\QTCGQD$ and $\CTCGQD$) encounter the read-in bottleneck when the training data is classical and sampled from a continuous  distribution, and the amplitude encoding is specified. That is, how to efficiently load the example $\vect x\in \mathbb{R}^{2^N}$ into an $N$-qubit state $\ket{\vect x}=\frac{1}{\|\vect x\|_2}\sum_{i=1}^{2^N} \vect{x}_i \ket{i}$ remains unknown. The read-out bottleneck concerns how to extract quantum information into classical registers. In QGAN, when $\CTQGCD$ is applied to estimate the continuous distribution, it suffers from the read-out bottleneck. For example, in the task of image generation, the features of the generated image are stored in the probability amplitudes of quantum states. To extract these features into the classical world, QST is required, where the computational complexity scales with the feature dimension. As a result, current QGLMs are inferior at processing high-dimensional continuous distribution tasks. The design of efficient read-in and read-out strategies can dramatically improve the capabilities of QGLMs in the regime of many conventional machine learning tasks.

Learning machines.
Another key challenge in the regime of QGLMs is exploring their learnability from the perspective of generalization, expressivity, and trainability. A deep theoretical understanding about these topics cannot only benefit the evaluation for the performance of different QGLMs but also provides guidelines to design more advanced QGLMs with computational advantages. For instance, a recent study [Gili et al., 2022] argued to take generalization as a measure to quantify the capability of GLMs and QGLMs in generating unseen quality and diverse data.  Nevertheless, contrary to quantum discriminative learning    [Abbas et al., 2021, Banchi et al., 2021, Du et al., 2022, Huang et al., 2021, Qian et al., 2021, Liu et al., 2022, Caro et al., 2021], very few studies have attempted to unveil the learnability of QGLMs, caused by the following reasons.

The main difficulty in studying the generalization and the expressivity of QGLMs is that, unlike (quantum) discriminative models, the definition of generalization in (quantum) generative learning is vague under different models' settings.  As a result, prior literature only focuses on the specified QGLMs. Concretely, Ref. [Gao et al., 2022] proved a theoretical proof of expressivity enhancement from Bayesian networks to their quantum counterpart.  Moreover, Du et al., 2022 analyzed the generalization of QCBMs and QGANs  under the maximum mean discrepancy loss and demonstrated the potential advantages of these QGLMs. However, less is known about the generalization of QGLMs in terms of different objective functions (e.g., KL divergence) and the varied protocols (e.g., QRBMs and QAE).

The hardness in investigating the trainability of QGLMs originates from the non-convex loss landscape for the objective function. When the number of trainable parameters becomes large, the analysis for the universal convergence behavior toward the global minima is intractable. This further incurs two unsolved but crucial issues. First, how to mitigate the barren plateaus phenomenon of QGLM in the training procedure? Concisely, barren plateaus refer that the gradients of QNN could be exponentially vanished when the number of qubits and the circuit depth are linearly increased. Although Kieferova et al., 2021 proved that unbounded loss may enable the absence of barren plateaus for QBMs and Unitary QNNs, the strategies to alleviate barren plateaus for other QGLMs with the varied loss functions are rather unclear. Second, how to ensure the optimization can locate the optimal or near-optimal result? A large discrepancy between the estimated and the optimal results hint the large difference between the estimated and the target distribution, which may make the potential advantages of QGLMs ambiguous.

The performance of QGLMs can be significantly degraded by the quantum hardware imperfection such as gate noise and measurement error. As discussed in Stilck França and Garcia-Patron, 2021, when the level of noise exceeds a threshold, the power of near-term quantum computers is inferior to the classical computers. Moreover, quantum system noise may result into the diverged optimization [Du et al., 2021]. Consequently, the unavoidable noise   forces us to redesign QGLMs, i.e., how to improve the robustness of QGLMs but keep the superiority of QGLMs? That is, when executed on NISQ machines, the output of QGLM is expected to be near to the solution under the ideal setting. Conventional approach is  adopting the hardware-efficient Ansätze with a shallow circuit depth to avoid the negative effects of quantum noise, while the price to pay is suppressing the power of QGLMs and diminishing the  computational advantages of QGLMs. More clever methods are demanded.

§.§ Prospects

There are several promising directions for the future study of quantum generative learning.

Read-in & Read-out bottleneck. The query of efficient state preparation methods is ubiquitous in quantum computing, which can tackle the read-in bottleneck of QGLMs as well as other quantum algorithms. Recently, Zhang et al., 2022 analyzed the optimal circuit depth in quantum state preparation. Namely, given an exponential number of ancillary qubits, any $N$-qubit quantum state can be prepared with $\Theta(N)$ depth circuit using only single- and two-qubit gates. Moreover, when the state is sparse with $d$ non-zero entries, the circuit depth can be reduced to $\Theta(\log(Nd))$ with $O(Nd\log d)$ ancillary qubits.   It is intrigued to generalize this result into the NISQ regime, i.e., under the tolerable error, is any  more efficient amplitude encoding method to load the classical data into quantum states?

As for mitigating the read-out bottleneck of QGLMs, there are two potential solutions. The first one is extending the ideas developed in the fault-tolerant regime to the NISQ regime [Zhang et al., 2021]. Another one is integrating random measurement techniques [Elben et al., 2022], e.g., shadow tomography [Huang et al., 2020] and measurement grouping [O’Malley et al., 2016] into QGLMs, where the target data can be extracted by the post-processing effectively.

Learning machines. To unveil the learnability of QGLM in terms of expressivity,   generalization, and trainability, we can follow the path of quantum discriminative learning. For instance, Du et al., 2022 have utilized the tool in statistical learning— covering number, to quantify the generalization of  QGANs under MMD loss. Concisely, they demonstrate how the number of training data, the architecture of QNNs, and the encoding methods effect the generalization of QGANs. Notably, such a tool has also been utilized in analyzing the expressivity and the generalization of QNNs in quantum discriminative learning [Du et al., 2022]. It is intrigued to exploit many other advanced statistical tools to understand the capabilities and limitations of QGLMs.

A philosophy in devising powerful underparameterized QGLMs is controlling the expressivity to be moderate. That is, the optimal solution is covered by the hypothesis space represented by QGLMs, while the size of this space is restricted to be relatively small. As such, the estimated solution can well approximate the optimal solution with both low empirical risk and low generalization error. Two leading paradigms in controlling the expressivity of QGLMs are quantum circuit architecture search [Du et al., 2020] and injecting prior knowledge such as invariance in Ansatz design [Larocca et al., 2022]. In a nutshell, the former continuously discards the unintended hypothesis functions in the training stage [Linghu et al., 2022, Grimsley et al., 2019, Du et al., 2020, Chivilikhin et al., 2020, Li et al., 2020, Ostaszewski et al., 2021], while the latter discards the unintended hypothesis functions in the initialization stage [Larocca et al., 2022, Skolik et al., 2022, Meyer et al., 2022]. In this regard, an interesting future direction is combining these two paradigms to further enhance the power of QGLMs. Meanwhile, the slimmed parameter space contributes to the alleviation of barren plateaus phenomenon.

Besides delving into underparameterized QGLMs, it is nontrival to unveil the abilities of overparameterized QGLMs. Recent studies have shown the optimal training behavior of the overparameterized quantum discriminative learning models [Liu et al., 2022]. Nevertheless, wether overparameterized QGLMs can preserve this desired property or not deserves to be further explored. Meanwhile, whether the initialization strategies designed for underparameterized quantum discriminative learning models are suitable for overparameterized QGLMs is unclear [Grant et al., 2019, Mitarai et al., 2020, Dborin et al., 2022, Zhang et al., 2022].

All in all, the developed theories related to the learnability of QGLM should indicate how different Ansätze, loss functions, and optimizers determine the performance of QGLMs and  contribute to pursue computational advantages.

Noise. To suppress the imperfection of NISQ machine, two possible ways are developing error mitigation techniques for QGLMs [Temme et al., 2017, Li and Benjamin, 2017, Ofek et al., 2016, Andersen et al., 2020, Endo et al., 2021] and designing problem-specific and hardware-oriented Ansätze [Du et al., 2020, Bilkis et al., 2021, Tang et al., 2021, Amaro et al., 2022]. The former aims to extract noise-free results from the noisy results, which could help compensate for the errors induced by readout and the quantum circuit itself [Hamilton and Pooser, 2020]. Refs. [Benedetti et al., 2019, Coyle et al., 2020] indicate a rough connection between a higher entanglement entropy [Sim et al., 2019, Meyer and Wallach, 2002] and a better performance of QCBM.  The latter aims to design problem-oriented and hardware-specific Ansatz to suppress the effects of noise.  The effectiveness of these two approaches has been validated in the regime of quantum discriminative learning, whereas little is known about QGLMs.

§ ACKNOWLEDGMENTS

§ ACKNOWLEDGMENT

This work was partially supported by the National Natural Science Foundation of China (No. 91948303-1, No. 61803375, No. 12002380, No. 62106278, No. 62101575, No. 61906210) and the National University of Defense Technology Foundation (No. ZK20-52).

[Goodfellow et al., 2016]
I. Goodfellow, Y. Bengio, and A. Courville, Deep learning.1em
plus 0.5em minus 0.4emMIT Press, 2016.

[Voulodimos et al., 2018]
A. Voulodimos, N. Doulamis, A. Doulamis, and E. Protopapadakis, “Deep learning
for computer vision: A brief review,” Computational intelligence and
neuroscience, vol. 2018, 2018.

[Otter et al., 2020]
D. W. Otter, J. R. Medina, and J. K. Kalita, “A survey of the usages of deep
learning for natural language processing,” IEEE transactions on neural
networks and learning systems, vol. 32, no. 2, pp. 604–624, 2020.

[Vamathevan et al., 2019]
J. Vamathevan, D. Clark, P. Czodrowski, I. Dunham, E. Ferran, G. Lee, B. Li,
A. Madabhushi, P. Shah, M. Spitzer et al., “Applications of machine
learning in drug discovery and development,” Nature reviews Drug
discovery, vol. 18, no. 6, pp. 463–477, 2019.

[Carleo et al., 2019]
G. Carleo, I. Cirac, K. Cranmer, L. Daudet, M. Schuld, N. Tishby,
L. Vogt-Maranto, and L. Zdeborová, “Machine learning and the physical
sciences,” Reviews of Modern Physics, vol. 91, no. 4, p. 045002,

[Thompson et al., 2020]
N. C. Thompson, K. Greenewald, K. Lee, and G. F. Manso, “The computational
limits of deep learning,” arXiv preprint arXiv:2007.05558, 2020.

[Bravyi et al., 2020]
S. Bravyi, D. Gosset, R. Koenig, and M. Tomamichel, “Quantum advantage with
noisy shallow circuits,” Nature Physics, vol. 16, no. 10, pp.
1040–1045, 2020.

[Arute et al., 2019]
F. Arute, K. Arya, R. Babbush, D. Bacon, J. C. Bardin, R. Barends, R. Biswas,
S. Boixo, F. G. Brandao, D. A. Buell et al., “Quantum supremacy using
a programmable superconducting processor,” Nature, vol. 574, no.
7779, pp. 505–510, 2019.

[Preskill, 2018]
J. Preskill, “Quantum computing in the NISQ era and beyond,”
Quantum, vol. 2, p. 79, 2018.

[Huang et al., 2021]
H.-L. Huang, Y. Du, M. Gong, Y. Zhao, Y. Wu, C. Wang, S. Li, F. Liang, J. Lin,
Y. Xu et al., “Experimental quantum generative adversarial networks
for image generation,” Physical Review Applied, vol. 16, no. 2, p.
024051, 2021.

[Hu et al., 2019]
L. Hu, S.-H. Wu, W. Cai, Y. Ma, X. Mu, Y. Xu, H. Wang, Y. Song, D.-L. Deng,
C.-L. Zou et al., “Quantum generative adversarial learning in a
superconducting quantum circuit,” Science advances, vol. 5, no. 1, p.
eaav2761, 2019.

[Jin et al., 2022]
Y.-X. Jin, J.-J. Hu, Q. Li, Z.-C. Luo, F.-Y. Zhang, H. Tang, K. Qian, and X.-M.
Jin, “Quantum deep learning for mutant COVID-19 strain prediction,”
arXiv preprint arXiv:2203.03556, 2022.

[Schuld et al., 2015]
M. Schuld, I. Sinayskiy, and F. Petruccione, “An introduction to quantum
machine learning,” Contemporary Physics, vol. 56, no. 2, pp.
172–185, 2015.

[Biamonte et al., 2017]
J. Biamonte, P. Wittek, N. Pancotti, P. Rebentrost, N. Wiebe, and S. Lloyd,
“Quantum machine learning,” Nature, vol. 549, no. 7671, pp.
195–202, 2017.

[Ciliberto et al., 2018]
C. Ciliberto, M. Herbster, A. D. Ialongo, M. Pontil, A. Rocchetto, S. Severini,
and L. Wossnig, “Quantum machine learning: a classical perspective,”
Proceedings of the Royal Society A: Mathematical, Physical and
Engineering Sciences, vol. 474, no. 2209, p. 20170551, 2018.

[Bharti et al., 2022]
K. Bharti, A. Cervera-Lierta, T. H. Kyaw, T. Haug, S. Alperin-Lea, A. Anand,
M. Degroote, H. Heimonen, J. S. Kottmann, T. Menke et al., “Noisy
intermediate-scale quantum algorithms,” Reviews of Modern Physics,
vol. 94, no. 1, p. 015004, 2022.

[Cerezo et al., 2021]
M. Cerezo, A. Arrasmith, R. Babbush, S. C. Benjamin, S. Endo, K. Fujii, J. R.
McClean, K. Mitarai, X. Yuan, L. Cincio et al., “Variational quantum