---
title: Variational Quantum Generator
url: https://www.emergentmind.com/topics/variational-quantum-generator
type: topic
---

# Variational Quantum Generator

Searching arXiv for the cited VQG and related generative quantum modeling papers.
{"query":"Variational quantum generators generative adversarial quantum machine learning for continuous distributions 1901.00848", "max_results": 5}
{"query":"measurement-based quantum computation generative modeling 2310.13524 variational measurement-based quantum computation for generative modeling", "max_results": 5}
{"query":"Generating probability distributions using variational quantum circuits 2307.09147", "max_results": 5}
A variational quantum generator (VQG) is a hybrid quantum–classical generative model in which a classical random variable is encoded into a quantum state, processed by a parameterized quantum circuit, measured to obtain classical features, and optionally transformed by a classical post-processing map into the final sample. In its original formulation, the VQG was introduced as a method for modeling continuous classical probability distributions with a variational quantum circuit and training the generator through generative adversarial learning, using either a classical neural network or a variational quantum circuit as the discriminator [1901.00848].

## 1. Origin and problem setting

The formulation introduced in "Variational quantum generators: Generative adversarial quantum machine learning for continuous distributions" treats generation as a hybrid pipeline from a simple prior $p_z(z)$ over latent variables $z \in \mathbb{R}^O$ to samples intended to mimic a target data distribution [1901.00848]. The central objective is not state preparation for its own sake, but the modeling of classical probability distributions by exploiting parameterized quantum dynamics together with classical optimization.

The original VQG is explicitly designed for **continuous classical probability distributions**. A sample $z$ is drawn from a simple prior, such as a uniform or Gaussian distribution, encoded into a quantum state, evolved by a variational circuit, and decoded through measurement of a fixed operator set. The measured expectation values may then be passed through a classical function, such as a neural network, to produce the final generated sample. This architecture is therefore neither a purely quantum Born machine nor a purely classical GAN; it is a compositional hybrid model whose trainable components can span both quantum and classical layers [1901.00848].

A defining feature of the original proposal is its adversarial training protocol. The generator is optimized through interaction with a discriminator that compares generated samples against real data. Two discriminator schemes are considered: a classical neural network discriminator and a variational quantum classifier discriminator. The framework was presented as a blueprint for designing hybrid quantum–classical architectures for machine learning on near-term quantum devices [1901.00848].

## 2. Architectural decomposition

In the original construction, the generator can be written as a sequence
\[
z \mapsto |\phi(z)\rangle \xrightarrow{\,G(\theta)\,} |\psi(z;\theta)\rangle \xrightarrow{\text{measure}} P(z;\theta) \xrightarrow{\,f_g(\Omega_g)\,} x_{\mathrm{fake}}.
\]
The latent variable is first encoded by a fixed circuit $R(z)$ on $r$ qubits,
\[
|\phi(z)\rangle = R(z)\,|0\rangle^{\otimes r},
\]
and the encoded state is then processed by an $n$-qubit variational circuit $G(\theta)$, with $n \ge r$ [1901.00848].

Two encoder families are described. In **amplitude encoding**, a normalized $2^r$-dimensional vector $\psi(z)$ is classically prepared and compiled into a gate sequence. In **variational encoding**, or a quantum feature map, the rotation angles are classical functions of the components of $z$. An explicit example is
\[
R(z) = \prod_{k=1}^O \prod_{i=1}^{n_k} R_Z^i\bigl(f(z_k)\bigr)\,R_Y^i\bigl(g(z_k)\bigr),
\]
with $R_V^i(\alpha)=\exp[-i\alpha V_i/2]$ for $V\in\{X,Y,Z\}$ [1901.00848].

The variational transformation is implemented by a layered parameterized quantum circuit,
\[
|\psi(z;\theta)\rangle
= W_L(\theta^{(L)})\,U_{\mathrm{ent}}\cdots W_2(\theta^{(2)})\,U_{\mathrm{ent}}\,W_1(\theta^{(1)})\,|\phi(z)\rangle,
\]
where each layer may consist of single-qubit rotations such as
\[
W_\ell(\theta^{(\ell)})=\bigotimes_{j=1}^n R_Y^j(\theta^{(\ell)}_{j,1})\,R_Z^j(\theta^{(\ell)}_{j,2})\,R_Y^j(\theta^{(\ell)}_{j,3}),
\]
interleaved with a fixed entangling layer, for example a pattern of CNOT or CZ gates [1901.00848].

A fixed set of Hermitian operators $\{P_i\}_{i=1}^M$ is chosen to decode the quantum state into a real vector through expectation values,
\[
P_i(z;\theta)=\langle\psi(z;\theta)|P_i|\psi(z;\theta)\rangle,\qquad
P(z;\theta)=[P_1,\dots,P_M]^T\in\mathbb{R}^M.
\]
Each expectation value requires $O(\mathrm{Var}(P_i)/\epsilon^2)$ repeated circuit runs to reach precision $\epsilon$ [1901.00848].

An optional classical map then converts the measured vector into the final output,
\[
x_{\mathrm{fake}} = f_g(P;\Omega_g)=h(WP+b),
\]
where $W$ and $b$ are trainable classical parameters and $h$ may be nonlinear [1901.00848].

| Component | Definition | Function |
|---|---|---|
| Quantum encoder | $|\phi(z)\rangle=R(z)|0\rangle^{\otimes r}$ | Encodes classical latent input |
| Variational circuit | $|\psi(z;\theta)\rangle=G(\theta)|\phi(z)\rangle$ | Introduces trainable quantum transformation |
| Measurement decoder | $P_i=\langle \psi|P_i|\psi\rangle$ | Produces classical features |
| Classical post-processing | $x_{\mathrm{fake}}=f_g(P;\Omega_g)$ | Maps features to final sample |

This decomposition makes clear that the VQG is defined less by a single circuit template than by a modular interface between latent sampling, quantum transformation, measurement, and classical decoding. This suggests a broader architectural reading of the term: the VQG is a hybrid generative pattern whose concrete instantiation depends on the choice of encoding, ansatz, observables, and output map.

## 3. Adversarial objective and gradient flow

The original training protocol employs a discriminator $D(x;\Theta_d)$ to distinguish real samples $x\sim p_{\mathrm{data}}$ from generated samples. In **Scheme I**, the discriminator is a classical neural network producing $p_{\mathrm{real}}=D(x;\Theta_d)\in(0,1)$. In **Scheme II**, the discriminator is a variational quantum classifier on $m$ qubits: the input is encoded with $E(x)$, a variational circuit $D(\Theta_d)$ is applied, and a $\sigma_p^Z$ measurement on a chosen qubit yields
\[
p_{\mathrm{real}}=\frac{1}{2}\bigl[1+\langle \sigma_p^Z\rangle_{E,D(\Theta_d)}\bigr].
\]
The generator and discriminator are trained with the standard GAN minimax losses
\[
C_d
=-\frac12\,\mathbb{E}_{x\sim p_{\mathrm{data}}}[\log D(x;\Theta_d)]
-\frac12\,\mathbb{E}_{z\sim p_z}[\log(1-D(G(z;\theta,\Omega_g);\Theta_d))],
\]
\[
C_g
=-\mathbb{E}_{z\sim p_z}[\log D(G(z;\theta,\Omega_g);\Theta_d)].
\]
Alternating gradient steps update $\Theta_d$ and $(\theta,\Omega_g)$ with learning rates $\eta_d$ and $\eta_g$ [1901.00848].

The gradient path traverses the entire hybrid composition
\[
D\circ f_g\circ \mathrm{measure}\circ G(\theta)\circ R(z).
\]
For quantum parameters, the paper uses the parameter-shift rule. For a gate
\[
U_j(\theta_j)=\exp(-i\theta_j V_j/2),
\]
the derivative of a measured expectation value is
\[
\frac{\partial \langle P_i\rangle}{\partial \theta_j}
=
\frac12\Bigl[\langle P_i\rangle_{\theta_j+\pi/2}-\langle P_i\rangle_{\theta_j-\pi/2}\Bigr].
\]
These derivatives are then passed to a classical automatic-differentiation engine, which also handles the gradients of the classical post-processing function and, in Scheme I, the classical discriminator [1901.00848].

The end-to-end training loop alternates discriminator and generator updates over minibatches. For each latent sample, quantum hardware prepares $|\phi(z)\rangle$, applies $G(\theta)$, measures $P(z;\theta)$, and forms $x_{\mathrm{fake}}=f_g(P;\Omega_g)$. Convergence can be monitored through $D_{\mathrm{KL}}(p_{\mathrm{data}}\|p_G)$ computed from histograms of generated samples, by sample-moment matching such as means and variances, or by the discriminator loss approaching $\ln \tfrac12 \approx -0.693$ [1901.00848].

A recurrent misconception is that the VQG is simply a variational circuit followed by sampling. In the original formulation, measurement produces a vector of expectation values rather than a bit-string sample, and the generator may include a nontrivial classical readout stage. The model is therefore a hybrid computational graph rather than a stand-alone quantum circuit.

## 4. From continuous outputs to direct probability generation

Although the original VQG targets continuous distributions through measured observables and optional classical post-processing, closely related work studies direct generation of **discrete probability distributions** from variational quantum circuits. In "Generating probability distributions using variational quantum circuits," the generator state is
\[
|\psi(\theta)\rangle = U(\theta)|0^n\rangle,
\]
with model probabilities obtained directly in the computational basis,
\[
p(x;\theta)=|\langle x|\psi(\theta)\rangle|^2,\qquad x\in\{0,1\}^n.
\]
The target distributions are Uniform, Normal, Binomial, and Poisson, and training minimizes the Jensen–Shannon divergence $D_{JS}(P\|Q)$ [2307.09147].

That work tests three ansatz families for $n=2,3,4$ qubits: **Param**, **Param+Ent**, and **Param–Ent–Param**. The four-, three-, and two-qubit cases consist respectively of a parameterized layer followed by an entangling layer; a parameterized layer followed by an entangling layer, which is followed by a parameterized layer; and only parameterized layers as the best-performing architectures for those system sizes. Gradients are computed with a modified parameter-shift rule for probabilities,
\[
\partial_{\theta_j} p(x;\theta)
=
\frac12\bigl[p(x;\theta_j+\pi/2)-p(x;\theta_j-\pi/2)\bigr],
\]
and optimization uses gradient descent with momentum rather than conventionally used gradient descent [2307.09147].

The reported behavior is structurally informative for the VQG literature. Parameterized-only ansätze succeed at skewed distributions such as Binomial and Poisson but fail at symmetric Normal targets; Param+Ent ansätze succeed at Normal but fail for Binomial and Poisson; and the three-layer Param–Ent–Param ansatz consistently yields the lowest $D_{JS}$ across all four target distributions [2307.09147]. This suggests that, once output probabilities are taken as the primitive object, the expressive balance between local rotations and entangling structure becomes highly distribution-dependent.

## 5. Measurement-based and mixed-unitary generalizations

A distinct generalization appears in "Variational measurement-based quantum computation for generative modeling," where the generator is implemented in the MBQC paradigm rather than in the circuit model [2310.13524]. The resource state is an $n$-qubit cluster state
\[
|C_n\rangle=\prod_{(u,v)\in E} CZ_{u,v}\,|+\rangle^{\otimes n},
\]
defined on a graph $G=(V,E)$. Each qubit is measured in an $X$–$Y$ plane basis parameterized by an angle $\alpha_i(\theta)$, with projectors onto the states
\[
|\pm_{\alpha_i}\rangle=(|0\rangle \pm e^{i\alpha_i}|1\rangle)/\sqrt2.
\]
Instead of removing measurement randomness through adaptive correction, the byproduct outcomes are retained as a computational resource, yielding a Born distribution over outcome strings [2310.13524].

The model further introduces a controlled-randomness parameterization. A trainable soft-correction variable with probability
\[
p_i=\sigma(\beta \zeta_i),\qquad \sigma(u)=\frac{1}{1+e^{-u}},
\]
uses $\beta\ge 0$ as an inverse temperature that controls the degree of byproduct retention. The resulting channel is a mixture of unitaries,
\[
\mathcal{E}(\theta,p)[\rho]=\sum_{s\in\{0,1\}^n} p(s|p)\,U(\theta,s)\rho U(\theta,s)^\dagger.
\]
Training uses either Maximum Mean Discrepancy,
\[
L_{\mathrm{MMD}}(\theta,p),
\]
or Kullback–Leibler divergence,
\[
L_{\mathrm{KL}}(\theta,p)=\sum_x P_{\mathrm{data}}(x)\log\!\left[\frac{P_{\mathrm{data}}(x)}{P_\theta(x)}\right],
\]
with parameter-shift updates for measurement angles and a corresponding estimator for the $p$-parameters [2310.13524].

The MBQC formulation changes the interpretation of randomness in a way that is conceptually important. In ordinary fully adaptive MBQC, measurement randomness is corrected away to recover deterministic unitary computation. Here, randomness is elevated to a trainable ingredient of the ansatz. The reported numerical findings state that, when learning a random mixed-unitary target, the mixed-unitary model with trainable $p$ converges approximately $30\%$ faster than the unitary model; for a double-Gaussian target on $N=8$ qubits and depth $D=7$, the final MMD is lower by a factor of approximately $2$; and only the fully mixed-unitary model can faithfully learn targets generated by itself [2310.13524]. A plausible implication is that VQG architectures need not treat stochasticity as a nuisance parameter; in some settings, trainable stochasticity is part of the expressive mechanism.

## 6. Relation to broader hybrid quantum generative modeling

The VQG sits within a wider family of hybrid quantum generative models that share its architectural logic while differing in objective, decoder semantics, and output modality. In "Variational Quantum Circuits Enhanced Generative Adversarial Network," the generator again follows the pattern of latent encoding, variational quantum evolution, measurement of single-qubit $Z$ expectations, and classical readout through a one-layer neural network. On the handwritten-image task, the generator uses $N=5$ qubits and $M=4$ layers; the paper reports $60$ quantum parameters together with approximately $2.6\times 10^4$ classical parameters in the generator, compared with $7.7\times 10^5$ to $8.2\times 10^5$ total parameters in DCGAN. On single-digit generation, the reported FID is approximately $30$ in about $10\,\mathrm{k}$ iterations for QC-GAN, whereas a small fully connected baseline plateaus near FID approximately $50$ even after $20\,\mathrm{k}$ iterations, and DCGAN reaches FID approximately $28$ only after about $25\,\mathrm{k}$ iterations [2402.01791].

A different neighboring line is the variational-autoencoding family. "Learning hard distributions with quantum-enhanced Variational Autoencoders" introduces a hybrid model with a classical encoder and a parameterized quantum circuit decoder, where
\[
p_\theta(x|z)=|\langle x|V_\theta U_\phi(z)|0^n\rangle|^2
\]
and the full model distribution can be written as
\[
p_\tau(x)=\langle x|V_\theta \rho V_\theta^\dagger|x\rangle.
\]
The decoder uses a number of quantum parameters that scales linearly as $O(n\cdot L)$, and benchmark results report higher fidelity than a classical VAE on random quantum-circuit states, Haar-random states, and quantum-kicked-rotor states, while product states remain a case where the classical model is slightly better [2305.01592]. This is not the original VQG formalism, but it exemplifies the same broader strategy of using quantum generative structure to model distributions that are difficult for classical decoders.

"Quantum Variational Autoencoder" places a quantum Boltzmann machine in the latent prior of a VAE, with
\[
H_\theta=\sum_{l<m} W_{lm}\sigma_l^z\sigma_m^z+\sum_l h_l\sigma_l^z+\sum_l \Gamma_l\sigma_l^x,
\qquad
p_\theta(z)=\frac{\mathrm{Tr}[|z\rangle\langle z|e^{-H_\theta}]}{Z_\theta}.
\]
Training proceeds by maximizing a quantum variational bound and estimating partition-function terms through quantum Monte Carlo and population annealing [1802.05779]. This model is again distinct from the adversarial VQG, yet it reinforces the same theme: quantum generative modeling often couples a structured quantum distribution with classical inference or decoding machinery.

Taken together, these developments suggest that the term *variational quantum generator* is most precise when reserved for a generator built from trainable quantum transformations and classical optimization, but that the surrounding literature has expanded the design space along several axes: continuous versus discrete outputs, circuit-model versus MBQC execution, adversarial versus likelihood-based objectives, and purely quantum versus explicitly hybrid readout layers. The original VQG remains the canonical formulation for continuous-distribution GAN-style generation, while later work shows that the same design principles extend to Born machines, MBQC mixed-unitary models, image generators, and quantum-enhanced autoencoders [1901.00848].

Source: https://www.emergentmind.com/topics/variational-quantum-generator