Table of Contents
Fetching ...

Sample-based training of quantum generative models

Maria Demidik, Cenk Tüysüz, Michele Grossi, Karl Jansen

TL;DR

The paper tackles the challenge of efficiently training quantum generative models, specifically quantum and semi-quantum Boltzmann machines, where gradient evaluation is costly. It develops a generalized contrastive-divergence (CD) framework that leverages conditional sampling circuits to realize CD-k with a constant forward-pass cost, enabling training directly on quantum hardware. A key theoretical result provides closed-form conditional probabilities $p(h^P\mid v)$ and $p(v\mid h^P)$ and corresponding quantum circuits, while only $p(v\mid h^P)$ requires quantum resources; classical sampling handles $p(h^P\mid v)$. Numerical experiments on Bars-and-Stripes and Gaussian data show that generalized CD achieves comparable accuracy to likelihood-based training with substantially fewer samples, and sqRBMs can be trained with fewer hidden units than RBMs. Overall, the framework offers a scalable, sample-efficient route to training expressive quantum generative models on quantum hardware, advancing practical quantum machine learning capabilities.

Abstract

Quantum computers can efficiently sample from probability distributions that are believed to be classically intractable, providing a foundation for quantum generative modeling. However, practical training of such models remains challenging, as gradient evaluation via the parameter-shift rule scales linearly with the number of parameters and requires repeated expectation-value estimation under finite-shot noise. We introduce a training framework that extends the principle of contrastive divergence to quantum models. By deriving the circuit structure and providing a general recipe for constructing it, we obtain quantum circuits that generate the samples required for parameter updates, yielding constant scaling with respect to the cost of a forward pass, analogous to backpropagation in classical neural networks. Numerical results demonstrate that it attains comparable accuracy to likelihood-based optimization while requiring substantially fewer samples. The framework thereby establishes a scalable route to training expressive quantum generative models directly on quantum hardware.

Sample-based training of quantum generative models

TL;DR

The paper tackles the challenge of efficiently training quantum generative models, specifically quantum and semi-quantum Boltzmann machines, where gradient evaluation is costly. It develops a generalized contrastive-divergence (CD) framework that leverages conditional sampling circuits to realize CD-k with a constant forward-pass cost, enabling training directly on quantum hardware. A key theoretical result provides closed-form conditional probabilities and and corresponding quantum circuits, while only requires quantum resources; classical sampling handles . Numerical experiments on Bars-and-Stripes and Gaussian data show that generalized CD achieves comparable accuracy to likelihood-based training with substantially fewer samples, and sqRBMs can be trained with fewer hidden units than RBMs. Overall, the framework offers a scalable, sample-efficient route to training expressive quantum generative models on quantum hardware, advancing practical quantum machine learning capabilities.

Abstract

Quantum computers can efficiently sample from probability distributions that are believed to be classically intractable, providing a foundation for quantum generative modeling. However, practical training of such models remains challenging, as gradient evaluation via the parameter-shift rule scales linearly with the number of parameters and requires repeated expectation-value estimation under finite-shot noise. We introduce a training framework that extends the principle of contrastive divergence to quantum models. By deriving the circuit structure and providing a general recipe for constructing it, we obtain quantum circuits that generate the samples required for parameter updates, yielding constant scaling with respect to the cost of a forward pass, analogous to backpropagation in classical neural networks. Numerical results demonstrate that it attains comparable accuracy to likelihood-based optimization while requiring substantially fewer samples. The framework thereby establishes a scalable route to training expressive quantum generative models directly on quantum hardware.

Paper Structure

This paper contains 20 sections, 1 theorem, 26 equations, 6 figures.

Key Result

Theorem 1

Let $H$ be the Hamiltonian of an sqRBM acting on $\mathcal{H}_{\mathrm{vis}} \otimes \mathcal{H}_{\mathrm{hid}}$ with $n$ visible and $m$ hidden qubits, and let $\beta>0$. Denote by $\mathbb{1}^{\otimes n}$ and $\mathbb{1}^{\otimes m}$ the identity operators on $\mathcal{H}_{\mathrm{vis}}$ and $\mat Then the conditional distributions of the sqRBM Gibbs state at inverse temperature $\beta$ are give

Figures (6)

  • Figure 1: Quantum circuits for conditional sampling in sqRBMs. (a) Circuit realizing sampling from the conditional distribution $p(h^P\,\mid\,v)$. The visible subsystem is initialized in the computational basis state $\ket{v}$, tensored with a maximally mixed hidden register, and evolved under $\Gamma_\beta$, which is described by $\mathrm{exp}(-(\beta/2)H)$. (b) Circuit realizing sampling from the conditional distribution $p(v\,\mid\,h^P)$, where the hidden subsystem is prepared in the Pauli basis state $\ket{h}_P$ and the same evolution is applied. In both cases, measurement of the corresponding subsystem in its preparation basis yields statistics consistent with the conditional probabilities described in Theorem \ref{['theorem:cond-probs']}.
  • Figure 2: KL divergence comparison between RBM and sqRBM trained with contrastive divergence. Orange squares and blue circles denote RBM and sqRBM results on the bars and stripes (BAS) dataset, with shaded areas indicating one standard deviation over ten random initializations. The sqRBM reaches lower KL divergence with fewer hidden units.
  • Figure 3: Training curves comparing generalized contrastive divergence (CD) and negative log-likeligood (NLL) minimization. The $\mathrm{sqRBM}_{9,3}$ model is trained on a Gaussian target distribution. The green line represents the proposed CD method, while pink lines of decreasing transparency correspond to NLL training (cf. Definition \ref{['def:sqbm-grads']}) with 1 to $10^4$ shots per expectation value evaluation. The x-axis (log scale) indicates the total number of samples used to train models. The CD method achieves comparably low KL divergence during training while requiring significantly fewer samples.
  • Figure 4: Pseudocode to train RBM using contrastive divergence (CD-$k$). Parameter updates are obtained from the difference between the positive phase, computed from data samples, and the negative phase, approximated via a $k$-step Gibbs chain.
  • Figure 5: Pseudocode to train sqRBM using the generalized contrastive divergence (CD-$k$).
  • ...and 1 more figures

Theorems & Definitions (4)

  • Definition 1: Semi-quantum RBM demidik2025expressive
  • Definition 2: Gradients of $\mathrm{sqRBM}$ demidik2025expressive
  • Theorem 1: Conditional probabilities of sqRBMs, informal
  • proof