Code
qcr:2606.65720.1

Quantum Circuit Born Machines

This PennyLane demo implements the Quantum Circuit Born Machine (QCBM), a generative model that uses a parameterized quantum circuit to learn and sample from a target probability distribution. The model takes its name from the Born rule of quantum mechanics: the probability of measuring a given bitstring is the squared amplitude of the circuit's output state, so a parameterized circuit naturally defines a probability distribution over bitstrings, and training the circuit shapes that distribution to match data. The tutorial builds a QCBM in PennyLane, choosing an expressive ansatz, and trains it to reproduce a target distribution by minimizing a distance measure between the circuit's output distribution and the target, such as the maximum mean discrepancy, using gradient-based optimization. It walks through defining the model and loss, optimizing the parameters, and comparing the learned distribution against the target, and discusses why gradient estimation for distribution-matching losses requires care. As a purely generative, sampling-based model that needs no labels, the QCBM illustrates a distinct paradigm of quantum machine learning, generative modeling via the Born rule, presented hands-on in PennyLane.
QML
Qubit
Circuit-based
Uploaded 4 days ago
13
Views
Citing this entry? Use this QCR ID
Uploaded by
QL
QCR Librarian

Overview

https://github.com/PennyLaneAI/demos/blob/c52c0abeb5122218aa96b38eea848864cce7323f/demonstrations_v2/tutorial_qcbm/demo.py
README.md

Quantum Circuit Born Machines

This PennyLane demo implements the Quantum Circuit Born Machine (QCBM), a generative model that uses a parameterized quantum circuit to learn and sample from a target probability distribution. The model takes its name from the Born rule of quantum mechanics: the probability of measuring a given bitstring is the squared amplitude of the circuit's output state, so a parameterized circuit naturally defines a probability distribution over bitstrings, and training the circuit shapes that distribution to match data. The tutorial builds a QCBM in PennyLane, choosing an expressive ansatz, and trains it to reproduce a target distribution by minimizing a distance measure between the circuit's output distribution and the target, such as the maximum mean discrepancy, using gradient-based optimization. It walks through defining the model and loss, optimizing the parameters, and comparing the learned distribution against the target, and discusses why gradient estimation for distribution-matching losses requires care. As a purely generative, sampling-based model that needs no labels, the QCBM illustrates a distinct paradigm of quantum machine learning, generative modeling via the Born rule, presented hands-on in PennyLane.

Run it

pip install -r requirements.txt
python demo.py

Source and license

Imported from demonstrations_v2/tutorial_qcbm/demo.py in PennyLaneAI/demos at c52c0abeb5122218aa96b38eea848864cce7323f, under the Apache License 2.0. Original authors: Xanadu and the PennyLane community. The upstream LICENSE is included alongside this example.

Join the Discussion

Comments (0)

No comments yet. Be the first to share your thoughts!

Indexed by QCR Librarian

This entry was created automatically from publicly available records. QCR links to public sources and only stores repository content where the license permits redistribution.

Versions

v1 Latest
Jun 15, 2026
qcr:2606.65720.1

Cite all versions? Use the base QCR ID to always reference the latest version of this entry.

Tools used

PennyLane

Keywords

born-machine
generative
quantum-machine-learning
pennylane
sampling

You may also like5