Source-linked AI summary
Differentiable Learning of Quantum Circuit Born Machine
Jin-Guo Liu, Lei Wang
TL;DR
Quantum circuit Born machines can generate expressive discrete distributions, but their implicit nature prevents direct likelihood evaluation and complicates training. The paper introduces gradient-based optimization using a kernel MMD loss and demonstrates learning on Bars-and-Stripes and Gaussian-mixture tasks, with deeper circuits and suitable optimization improving performance.
Problem
QCBMs generate discrete samples without accessible likelihoods, while direct gradient-based learning remains non-trivial for high-dimensional discrete outputs.
Method
The paper trains QCBMs with an efficient gradient-based algorithm that minimizes kernel MMD using quantum measurements and classical optimization.
Results
The experiments show that moderate sampling noise is tolerated, deeper circuits improve representational power, and gradient-based optimization learns both Bars-and-Stripes and smooth Gaussian-mixture distributions.
Takeaways & Limitations
The proposed learning scheme is runnable on near-term quantum devices and supports generative modeling with discrete bit-string outputs.
Abstract
from arXiv · showhide
Quantum circuit Born machines are generative models which represent the probability distribution of classical dataset as quantum pure states. Computational complexity considerations of the quantum sampling problem suggest that the quantum circuits exhibit stronger expressibility compared to classical neural networks. One can efficiently draw samples from the quantum circuits via projective measurements on qubits. However, similar to the leading implicit generative models in deep learning, such as the generative adversarial networks, the quantum circuits cannot provide the likelihood of the generated samples, which poses a challenge to the training. We devise an efficient gradient-based learning algorithm for the quantum circuit Born machine by minimizing the kerneled maximum mean discrepancy loss. We simulated generative modeling of the Bars-and-Stripes dataset and Gaussian mixture distributions using deep quantum circuits. Our experiments show the importance of circuit depth and gradient-based optimization algorithm. The proposed learning algorithm is runnable on near-term quantum device and can exhibit quantum advantages for generative modeling.
I. INTRODUCTION
Quantum circuit Born machines offer expressive quantum generative modeling, but training is difficult because they generate discrete samples without accessible likelihoods. The paper addresses this gap with gradient-based QCBM learning and studies its behavior on representative datasets.
- Born machines represent classical probability distributions with quantum pure states and generate samples through projective measurements on qubits.
- QCBMs are implicit generative models because their generated samples are available without access to the wavefunction or likelihoods.
- Scaling QCBM training requires an objective function that does not explicitly reference model probabilities and a more scalable alternative to gradient-free optimization.
- Gradient-based methods are difficult to apply directly because QCBM outputs are discrete bit strings following high-dimensional probability distributions.
- The paper develops an efficient gradient-based QCBM learning algorithm and evaluates it on Bars-and-Stripes and double Gaussian peaks datasets.
II. MODEL AND LEARNING ALGORITHM
The QCBM transforms an input product state into a parameterized quantum state, samples its computational-basis distribution, and trains through a classical-quantum feedback loop using a differentiable two-sample loss.
- A QCBM evolves |0⟩ into |ψθ⟩ and produces bit samples x ∼ pθ(x) = |⟨x|ψθ⟩|2 by computational-basis measurement.
- Training seeks to make the model distribution pθ approach the unknown target distribution π using i.i.d. samples from a dataset.
- The hybrid feedback loop repeatedly collects QCBM samples, compares them with training data using a two-sample test, and uses the resulting loss for optimization.
- The circuit-training scheme outputs a loss and corresponding gradients, which a classical optimizer uses to compute parameter updates Δθ.
A. Quantum Circuit Architecture Design
The QCBM architecture interleaves parameterized single-qubit rotations with sparse, tree-structured CNOT entanglers. This design incorporates hardware connectivity constraints and shows better performance than most equally sized random connections.
- The circuit interweaves single-qubit rotation layers with entangler layers, following a variational quantum eigensolver-like layout.
- Rotation layers are parameterized by angles θ indexed by circuit depth, qubit, and rotation-gate position.
- The QCBM contains (3d + 1)n parameters, where d is circuit depth and n is the number of qubits.
- CNOT entanglers induce qubit correlations, while a sparse tree topology accommodates limited hardware connectivity.
- The data-driven entangler architecture performs better than most random connections using the same number of gates.
B. Loss Function and Gradient-based Optimization
The method trains QCBMs with a kernel two-sample loss and an unbiased quantum gradient estimator, using repeated measurements and classical optimization. This addresses the difficulty of differentiating implicit models with discrete outputs.
- The squared maximum mean discrepancy compares target and generated samples in a kernel feature space without requiring explicit likelihoods.
- A mixture of Gaussian kernels measures distribution differences across multiple bandwidth scales, and its MMD loss asymptotically vanishes exactly when distributions match.
- The gradient estimator evaluates QCBM output probabilities at shifted circuit parameters θ± to compute derivatives with respect to circuit parameters.
- Unlike finite-difference SPSA, the proposed estimator is unbiased for the exact gradient.
- Gradients are estimated from repeated projective measurements at shifted parameters, with batch size N controlling sampling noise before classical parameter updates.
- The QCBM gradient uses unitary structure and MMD despite unknown outcome probabilities, unlike the classical chain-rule approach for discrete outputs.
III. NUMERICAL EXPERIMENTS
Numerical simulations show that gradient-based optimization offers advantages over gradient-free optimization, while deeper quantum circuits provide stronger expressibility.
- Gradient-based optimization outperforms gradient-free optimization in the simulated QCBM learning experiments.
- Deeper quantum circuits exhibit stronger expressibility than shallow circuits in the simulations.
A. Bars-and-Stripes Dataset
On the 3 × 3 Bars-and-Stripes dataset, gradient-based QCBM training achieves low MMD loss and high valid-sample rates, with performance shaped by sampling noise, optimizer choice, and circuit depth.
- Gradient-based training: A loss of 2.4 × 10^-7 is achieved with depth d = 10 using L-BFGS-B and exact gradients, demonstrating strong circuit expressibility.
- Gradient-based training: Adam training becomes more accurate as measurement batch size increases, with lower final MMD loss and closer alignment between model and target probabilities.The evaluated batch sizes are N = 2000, 20000, and ∞.
- Sample quality: A valid rate χ = 88.6% is achieved with N = 2000, while L-BFGS-B with N = ∞ reaches χ = 99.9%.The valid rate measures the proportion of generated samples that are bars or stripes.
- Optimizer comparison: CMA-ES matches Adam only without sampling noise and deteriorates significantly for N = 2000 and N = 20000.With N = ∞, CMA-ES reaches similar performance after 10^4 steps using population size 50.
- Circuit depth: After 500 optimization steps, deeper circuits achieve lower MMD loss, while the corresponding KL divergence remains consistent with MMD loss.The depth comparison uses L-BFGS-B with exact gradients for d = 1, ..., 10.
- Circuit depth: The simulations also report that deep quantum-circuit training avoids gradient vanishing or exploding as circuit depth increases because of unitary time evolution.
B. Mixture of Gaussians
The QCBM learns a smooth Gaussian-mixture distribution encoded by qubit indices using MMD loss and Adam, achieving a close histogram match while revealing some local spikiness.
- Setup: The Gaussian mixture uses integer samples x = 1, . . . , xmax encoded by n qubits, unlike the bit-string representation of Bars-and-Stripes.Here, xmax = 2^n.
- Setup: The experiment uses n = 10 qubits, circuit depth d = 10, and 10^5 training samples drawn independently from the target distribution.The target is smooth and non-zero for every basis state.
- MMD training: The MMD loss combines Gaussian kernels with bandwidths σ = 0.25, 10, 1000 to capture local and overall distributional differences.σ = 0.25 captures local differences, while σ = 1000 captures differences on the scale of xmax.
- Results: After 2000 Adam steps, the MMD loss decreased from 9.6 × 10^-2 to 6.4 × 10^-4 with sample size N = 20000.The generated histogram showed an excellent match to the exact target probability distribution.
- Results: The unbinned histogram remained spiky, partly because MMD does not capture local probability variation.The paper suggests that improved circuit architecture could alleviate this issue.
IV. DISCUSSIONS
The discussion presents unbiased MMD-gradient training as a practical QCBM approach, while identifying scaling, generalization, and objective-function limitations for future work.
- Discussion: The proposed QCBM scheme measures unbiased MMD-loss gradients on quantum hardware and supports efficient training and sampling with fewer hardware restrictions than some quantum generative models.The paper also reports stronger representation power and no gradient vanishing or exploding as circuit depth increases compared with classical deep neural networks.
- Limitations: Gradient amplitudes may decrease exponentially as qubit count increases in random quantum circuits, so large-scale gradient-based QCBM training requires further investigation.The paper suggests better circuit structure, parametrization, or shared weights may alleviate this problem.
- Limitations: The simulations use few qubits and training sets containing all patterns, placing the experiments near the memorization limit rather than testing generalization.Future applications should examine how circuit structure and depth can provide regularization and inductive bias.
- Future directions: Alternative training schemes, including adversarial training, and learned kernels are identified as possible ways to improve generation quality.These alternatives extend beyond the two-sample loss used in this paper.
- Applications: Differentiable QCBM learning may also support combinatorial optimization and structure learning when outputs are encoded as discrete bit strings.
Appendix A: Unbiased gradient estimator of the probability of a quantum circuit
The appendix derives an unbiased QCBM probability-gradient estimator by applying parameter-shift gradients to computational-basis observables and substituting them into the MMD derivative.
- Derivation: The appendix derives the main-text gradient equation by differentiating the MMD loss and applying an unbiased gradient method to circuit parameters.
- Parameter-shift rule: For a unitary U(η) = e^(-iηΣ^2/2) with Σ^2 = 1, the observable gradient is evaluated through shifted circuit parameters.
- Estimator property: The estimator is unbiased, unlike finite differences, which are sensitive to quantum-circuit noise.
- Application to QCBM: For QCBMs, the computational-basis projector |x⟩⟨x| is identified as the observable, yielding gradients of output probabilities despite inaccessible wavefunctions.
- Final gradient: Using the symmetric kernel condition produces the final MMD gradient, whose circuit-depth scaling is O(d^2).This is less efficient than linear-scaling back-propagation for classical neural networks, although comparable quantum scaling remains unresolved.
2. Generalization to V-statistic
The analysis extends the gradient treatment to expectations of arbitrary functions over sequences of bit strings and derives simplifications for symmetric functions. It also identifies why KL-divergence-based training is not directly compatible with quantum-circuit sampling.
- Generalization to arbitrary functions: The generalized expectation considers an arbitrary function f(X) whose arguments are a sequence of bit strings X = {x1, x2, . . . , xr}.The offset angles Γ determine the shifted parameter distributions {pθ+γ1, pθ+γ2, . . . , pθ+γr} used for generated samples.
- V-statistic simplification: For symmetric f, Ef(0) becomes a V-statistic, allowing Eq. (A8) to be simplified to two terms.The simplification follows from the symmetry of f and the V-statistic structure.
- Gradient diagnostics: Figure 7 examines gradient-element distributions across circuit depths and the variance of MMD loss gradients as sample size N changes.The caption specifies random circuit parameters for the layerwise gradient distributions.
- Application to MMD: The MMD loss gradient is a degree-2 V-statistic, so repeatedly applying Eq. (A8) yields higher-order gradients.This connects the generalized result directly to differentiating the MMD objective.
- KL-divergence limitation: KL-divergence gradients contain a pθ(x) term that cannot be transformed into a sampling problem on the quantum circuit.The same obstacle applies to negative-log-likelihood minimization because it is equivalent to minimizing KL divergence.
Appendix B: Gradient Analysis
The appendix analyzes gradient behavior in a deep random-parameter circuit and explains it through the response of the wavefunction to parameter perturbations. For the tested 9-qubit, depth-100 circuit, gradient distributions do not significantly differ across layers.
- Empirical gradient behavior: For a 9-qubit circuit with depth d = 100, gradient histograms for different layers show no significant distributional differences.The circuit uses random parameters and generates the Bars-and-Stripes dataset.
- Empirical gradient behavior: The analysis concludes that the tested deep QCBM does not suffer from vanishing or exploding gradients as layers go deeper.This conclusion is based on the comparable gradient distributions across layers.
- Physical interpretation: The appendix attributes this gradient behavior to how the quantum wavefunction changes when a circuit parameter θα is perturbed.The subsequent argument models the circuit evolution and compares perturbed and unperturbed wavefunctions through fidelity.
- Physical interpretation: In a deep circuit, the intermediate state |φ⟩ = Uk−1:1|0⟩ can be assumed to be random, motivating a fidelity-susceptibility analysis.The fidelity is evaluated relative to the unperturbed wavefunction.