ApX logoApX logo
ModelsCalculatorHardwareCoursesPricing
ApX logoApX logo
ModelsCalculatorHardwareCoursesPricing

All Courses

Advanced Quantum Machine Learning Algorithms and Implementation
Chapter 1: Revisiting Quantum Computing and ML Foundations
Advanced Linear Algebra for Quantum States
Quantum Circuits and Universal Gate Sets Revisited
Entanglement and Non-locality Implications for QML
Density Matrices and Mixed States in QML
Classical ML Optimization Techniques Refresher
Information Geometry in Classical and Quantum Models
Complexity Theory for Classical and Quantum Algorithms
Chapter 2: Advanced Quantum Data Encoding and Feature Maps
Mathematical Foundations of Quantum Feature Maps
Higher-Order Polynomial Quantum Feature Maps
Data Re-uploading Techniques for Expressivity
Analyzing Feature Map Expressibility and Entangling Capability
Kernel Alignment and Quantum Feature Spaces
Encoding High-Dimensional Classical Data
Hands-on Practical: Implementing Custom Quantum Feature Maps
Chapter 3: Quantum Kernel Methods: Theory and Implementation
The Quantum Kernel Trick Formalism
Calculating Quantum Kernel Matrices
Properties of Quantum Kernels
Geometric Differences between Classical and Quantum Kernels
Kernel Concentration Phenomena and Mitigation
Support Vector Machines with Quantum Kernels (QSVM)
Implementation of QSVM for Complex Datasets
Hands-on Practical: Comparing Quantum Kernels
Chapter 4: Variational Quantum Algorithms for Machine Learning
The Variational Principle in Quantum Computation
Parameterized Quantum Circuits (PQC) Design Strategies
Cost Functions for QML Tasks
Gradient Calculation Methods
Advanced Classical Optimizers for VQAs
Quantum Natural Gradient Descent
Barren Plateaus Analysis and Mitigation
Hands-on Practical: Implementing a Variational Quantum Classifier
Chapter 5: Quantum Neural Networks: Architectures and Training
Models of Quantum Neurons and Layers
Quantum Circuit Born Machines (QCBMs)
Quantum Convolutional Neural Networks (QCNNs)
Quantum Graph Neural Networks (QGNNs)
Hybrid Quantum-Classical Neural Network Architectures
Training QNNs Challenges and Strategies
Overfitting and Generalization in QNNs
Practice: Building and Training a Simple QNN
Chapter 6: Quantum Generative Models
Classical Generative Models Review
Quantum Circuit Born Machines for Distribution Learning
Quantum Generative Adversarial Networks (QGANs)
Training QGANs Challenges and Architectures
Evaluating Quantum Generative Models
Sampling from Quantum Generative Models
Hands-on Practical: Implementing a Basic QGAN
Chapter 7: Hardware Considerations and Error Mitigation in QML
Characterizing Quantum Hardware Noise
Impact of Noise on QML Algorithm Performance
Quantum Error Mitigation Techniques
Circuit Optimization and Transpilation
Hardware-Efficient Ansätze Design
Benchmarking QML Algorithms on Real Quantum Devices
Practice: Applying Error Mitigation to a VQC

Quantum Circuit Born Machines (QCBMs)

Building on the concept of using parameterized quantum circuits (PQCs) as trainable components, we now look at a specific type of Quantum Neural Network designed for generative modeling: the Quantum Circuit Born Machine (QCBM). Unlike discriminative models that learn decision boundaries (like the Variational Quantum Classifiers discussed previously), QCBMs aim to learn an unknown probability distribution underlying a given dataset and generate new samples resembling the data. The name "Born Machine" comes from the reliance on Born's rule to interpret the measurement outcomes of a quantum state as probabilities.

The Core Idea: Sampling from Quantum States

Essentially, a QCBM is an implicit generative model. It doesn't explicitly compute the probability density function, but rather provides a mechanism to draw samples according to a probability distribution learned by the quantum circuit. The process involves these main steps:

  1. State Preparation: A PQC, denoted by U(θ)U(\theta)U(θ), is applied to a standard initial state, usually the all-zeros state ∣0⟩⊗n|0\rangle^{\otimes n}∣0⟩⊗n for an nnn-qubit system. This prepares a parameterized quantum state ∣ψ(θ)⟩=U(θ)∣0⟩⊗n|\psi(\theta)\rangle = U(\theta)|0\rangle^{\otimes n}∣ψ(θ)⟩=U(θ)∣0⟩⊗n. The parameters θ\thetaθ are the tunable weights of our quantum "network".
  2. Measurement: The resulting state ∣ψ(θ)⟩|\psi(\theta)\rangle∣ψ(θ)⟩ is measured in the computational basis {∣x⟩}\{|x\rangle\}{∣x⟩}, where xxx represents a bitstring of length nnn (e.g., x=0110...1x = 0110...1x=0110...1).
  3. Probability Interpretation (Born's Rule): According to Born's rule, the probability of obtaining the measurement outcome xxx is given by: pθ(x)=∣⟨x∣ψ(θ)⟩∣2p_\theta(x) = |\langle x | \psi(\theta) \rangle|^2pθ​(x)=∣⟨x∣ψ(θ)⟩∣2
  4. Sampling: By repeatedly preparing the state ∣ψ(θ)⟩|\psi(\theta)\rangle∣ψ(θ)⟩ and measuring it, we obtain a collection of samples {x1,x2,...,xM}\{x_1, x_2, ..., x_M\}{x1​,x2​,...,xM​} which are distributed according to pθ(x)p_\theta(x)pθ​(x).

The goal of training a QCBM is to adjust the parameters θ\thetaθ so that the probability distribution pθ(x)p_\theta(x)pθ​(x) defined by the circuit closely approximates a target probability distribution ptarget(x)p_{\text{target}}(x)ptarget​(x), often represented implicitly by a set of training data samples S={s1,s2,...,sN}S = \{s_1, s_2, ..., s_N\}S={s1​,s2​,...,sN​}.

Basic workflow of training a Quantum Circuit Born Machine. The PQC generates samples, which are compared to target data via a loss function. A classical optimizer updates the PQC parameters θ\thetaθ.

Training QCBMs: Matching Distributions

Since we typically only have samples SSS from the target distribution ptarget(x)p_{\text{target}}(x)ptarget​(x), we cannot directly minimize divergences like the Kullback-Leibler (KL) divergence, which require explicit knowledge of ptarget(x)p_{\text{target}}(x)ptarget​(x). Instead, common approaches rely on comparing the samples generated by the QCBM, {xi}\{x_i\}{xi​}, with the training data samples {sj}\{s_j\}{sj​}.

A widely used loss function for this purpose is the Maximum Mean Discrepancy (MMD). MMD is a distance metric between probability distributions based on the idea that two distributions are identical if and only if the mean embeddings of the distributions in a Reproducing Kernel Hilbert Space (RKHS) are identical. For training QCBMs, we typically compute a sample-based estimate of the MMD:

LMMD(θ)=∥1N∑j=1Nϕ(sj)−1M∑i=1Mϕ(xi(θ))∥H2\mathcal{L}_{\text{MMD}}(\theta) = \left\| \frac{1}{N} \sum_{j=1}^{N} \phi(s_j) - \frac{1}{M} \sum_{i=1}^{M} \phi(x_i(\theta)) \right\|_{\mathcal{H}}^2LMMD​(θ)=​N1​j=1∑N​ϕ(sj​)−M1​i=1∑M​ϕ(xi​(θ))​H2​

Here, ϕ\phiϕ is a feature map associated with a classical kernel k(x,x′)=⟨ϕ(x),ϕ(x′)⟩Hk(x, x') = \langle \phi(x), \phi(x') \rangle_{\mathcal{H}}k(x,x′)=⟨ϕ(x),ϕ(x′)⟩H​ (e.g., a Gaussian kernel), {sj}\{s_j\}{sj​} are samples from the target data, and {xi(θ)}\{x_i(\theta)\}{xi​(θ)} are samples generated by the QCBM with parameters θ\thetaθ. The goal is to minimize LMMD(θ)\mathcal{L}_{\text{MMD}}(\theta)LMMD​(θ) with respect to θ\thetaθ.

Training involves an iterative optimization loop:

  1. Generate a batch of MMM samples {xi(θ)}\{x_i(\theta)\}{xi​(θ)} from the QCBM by preparing and measuring U(θ)∣0⟩⊗nU(\theta)|0\rangle^{\otimes n}U(θ)∣0⟩⊗n.
  2. Take a batch of NNN samples {sj}\{s_j\}{sj​} from the training dataset.
  3. Compute the MMD loss LMMD(θ)\mathcal{L}_{\text{MMD}}(\theta)LMMD​(θ) (or another suitable loss) using these batches.
  4. Estimate the gradient of the loss ∇θLMMD(θ)\nabla_\theta \mathcal{L}_{\text{MMD}}(\theta)∇θ​LMMD​(θ). This often requires techniques like the parameter-shift rule, as discussed for general VQAs, applied carefully to the MMD objective.
  5. Update the parameters θ\thetaθ using a classical optimizer (e.g., Adam, SGD, SPSA).
  6. Repeat until convergence.

Challenges

While elegant, training QCBMs faces significant practical challenges, many shared with other VQAs and QNNs:

  • Choice of Ansatz: The expressibility and trainability of the QCBM heavily depend on the structure of the PQC U(θ)U(\theta)U(θ). A poorly chosen ansatz might not be capable of representing the target distribution or might suffer severely from issues like barren plateaus.
  • Optimization: Finding the optimal parameters θ\thetaθ can be difficult due to non-convex loss landscapes, the potential for barren plateaus (especially with deep circuits or global loss functions), and the stochastic nature of gradient estimation based on finite samples.
  • Gradient Estimation: Calculating gradients, often via the parameter-shift rule, requires executing additional circuits, increasing the computational cost per optimization step. The variance in gradient estimates due to finite measurement shots can also slow down convergence.
  • Loss Function Estimation: Estimating loss functions like MMD requires a sufficient number of samples (MMM and NNN) from both the QCBM and the target data in each step to get a reliable estimate, adding to the overall measurement budget.
  • Evaluation: Quantifying how well the trained QCBM pθ(x)p_\theta(x)pθ​(x) approximates ptarget(x)p_{\text{target}}(x)ptarget​(x) is non-trivial, especially in high dimensions. Metrics often rely on comparing moments, evaluating performance on downstream tasks, or using other statistical tests on generated samples.

Despite these challenges, QCBMs represent an important class of QNNs focused on generative tasks. They provide a framework for leveraging quantum circuits to learn and sample from complex probability distributions potentially intractable for classical methods. Their study illuminates the possibilities and difficulties of using quantum computation for unsupervised learning problems. We will encounter related concepts when discussing Quantum Generative Adversarial Networks (QGANs) in the next chapter.

  • Barren plateaus in quantum neural networks, Jarrod R. McClean, Sergio Boixo, Vadim N. Smelyanskiy, Ryan Babbush, and Hartmut Neven, 2018 Nature Communications, Vol. 9 DOI: 10.1038/s41467-018-07090-4 - A key paper that identifies and analyzes barren plateaus, a significant training challenge for many variational quantum algorithms such as QCBMs.

© 2026 ApX Machine Learning