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

Classical Generative Models Review

Before we examine quantum approaches to generative modeling, let's briefly review two influential classical frameworks: Generative Adversarial Networks (GANs) and Variational Autoencoders (VAEs). Understanding their core ideas provides valuable context for their quantum counterparts. The goal in both cases is to learn a model distribution pmodel(x)p_{\text{model}}(x)pmodel​(x) that approximates an unknown data distribution pdata(x)p_{\text{data}}(x)pdata​(x), allowing us to generate new samples resembling the original data.

Generative Adversarial Networks (GANs)

GANs, introduced by Ian Goodfellow and colleagues in 2014, employ a clever adversarial training process involving two neural networks:

  1. Generator (G): This network takes a random noise vector zzz, typically sampled from a simple distribution like a Gaussian or uniform distribution (z∼pz(z)z \sim p_z(z)z∼pz​(z)), as input. Its goal is to transform this noise into a data sample G(z)G(z)G(z) that looks like it came from the real data distribution pdata(x)p_{\text{data}}(x)pdata​(x).
  2. Discriminator (D): This network acts as a classifier. It takes a sample xxx (which could be a real sample from the training data or a fake sample produced by the Generator) and outputs a probability D(x)D(x)D(x) representing the likelihood that xxx is a real sample, not a fake one.

The training process is formulated as a minimax game. The Discriminator is trained to maximize its accuracy in distinguishing real samples from fake samples generated by GGG. Simultaneously, the Generator is trained to minimize the probability that the Discriminator correctly identifies its outputs as fake. Essentially, GGG tries to fool DDD.

The objective function for this game is typically expressed as:

min⁡Gmax⁡DV(D,G)=Ex∼pdata(x)[log⁡D(x)]+Ez∼pz(z)[log⁡(1−D(G(z)))]\min_G \max_D V(D, G) = \mathbb{E}_{x \sim p_{\text{data}}(x)}[\log D(x)] + \mathbb{E}_{z \sim p_z(z)}[\log(1 - D(G(z)))]Gmin​Dmax​V(D,G)=Ex∼pdata​(x)​[logD(x)]+Ez∼pz​(z)​[log(1−D(G(z)))]

Here, E\mathbb{E}E denotes expectation. The Discriminator DDD wants to maximize this value (making D(x)D(x)D(x) close to 1 for real xxx and D(G(z))D(G(z))D(G(z)) close to 0 for fake samples). The Generator GGG wants to minimize this value (by making D(G(z))D(G(z))D(G(z)) close to 1, effectively fooling the Discriminator).

Basic architecture of a Generative Adversarial Network (GAN), illustrating the interaction between the Generator and Discriminator.

Training GANs can be challenging due to potential instabilities like mode collapse (where the generator produces only a limited variety of samples) or vanishing gradients. However, when successful, GANs are known for generating high-fidelity samples, particularly in domains like image generation.

Variational Autoencoders (VAEs)

VAEs, introduced by Diederik Kingma and Max Welling in 2013, approach generative modeling from a probabilistic perspective, combining ideas from variational inference and autoencoders. A VAE consists of two main parts, often implemented as neural networks:

  1. Encoder (Recognition Model): This network, denoted qϕ(z∣x)q_\phi(z|x)qϕ​(z∣x), takes an input data point xxx and outputs parameters (typically the mean μ\muμ and variance σ2\sigma^2σ2) for a probability distribution in a lower-dimensional latent space ZZZ. This distribution represents an approximation of the true posterior p(z∣x)p(z|x)p(z∣x). Often, qϕ(z∣x)q_\phi(z|x)qϕ​(z∣x) is chosen to be a Gaussian: N(z∣μϕ(x),σϕ2(x)I)\mathcal{N}(z | \mu_\phi(x), \sigma^2_\phi(x)I)N(z∣μϕ​(x),σϕ2​(x)I).
  2. Decoder (Generative Model): This network, denoted pθ(x∣z)p_\theta(x|z)pθ​(x∣z), takes a point zzz sampled from the latent space (either from the approximate posterior qϕ(z∣x)q_\phi(z|x)qϕ​(z∣x) during training or from a prior distribution p(z)p(z)p(z), usually N(0,I)\mathcal{N}(0, I)N(0,I), during generation) and reconstructs the data point xxx. It defines a distribution over the data space conditioned on the latent variable.

The goal of training a VAE is to maximize the log-likelihood of the data, log⁡p(x)\log p(x)logp(x). Since this is often intractable, VAEs maximize a lower bound instead, known as the Evidence Lower Bound (ELBO):

L(θ,ϕ;x)=Ez∼qϕ(z∣x)[log⁡pθ(x∣z)]−DKL(qϕ(z∣x)∣∣p(z))\mathcal{L}(\theta, \phi; x) = \mathbb{E}_{z \sim q_\phi(z|x)}[\log p_\theta(x|z)] - D_{KL}(q_\phi(z|x) || p(z))L(θ,ϕ;x)=Ez∼qϕ​(z∣x)​[logpθ​(x∣z)]−DKL​(qϕ​(z∣x)∣∣p(z))

The ELBO consists of two terms:

  • Reconstruction Loss: Ez∼qϕ(z∣x)[log⁡pθ(x∣z)]\mathbb{E}_{z \sim q_\phi(z|x)}[\log p_\theta(x|z)]Ez∼qϕ​(z∣x)​[logpθ​(x∣z)] encourages the decoder to accurately reconstruct the input xxx from its latent representation zzz. For continuous data, this often corresponds to minimizing mean squared error; for binary data, binary cross-entropy is common.
  • KL Divergence Regularizer: DKL(qϕ(z∣x)∣∣p(z))D_{KL}(q_\phi(z|x) || p(z))DKL​(qϕ​(z∣x)∣∣p(z)) measures the Kullback Leibler divergence between the approximate posterior distribution learned by the encoder and a predefined prior distribution p(z)p(z)p(z) over the latent space (e.g., a standard Gaussian). This term acts as a regularizer, forcing the encoded distributions to stay close to the prior, which helps in generating new samples by drawing zzz directly from p(z)p(z)p(z).

A specific technique called the "reparameterization trick" is used to allow gradients to flow back through the sampling process within the encoder, enabling training via standard backpropagation.

Basic architecture of a Variational Autoencoder (VAE), showing the encoding, latent sampling, and decoding stages.

VAEs typically provide more stable training compared to GANs and offer an explicit probabilistic model with a well-defined likelihood objective (the ELBO). However, the samples generated by VAEs are sometimes perceived as less sharp or realistic than those from state-of-the-art GANs, potentially due to the simplifying assumptions made (e.g., Gaussian posteriors) and the influence of the reconstruction term.

These classical models establish fundamental concepts in generative modeling: representing distributions implicitly (GANs) or explicitly via latent variables (VAEs), defining objective functions, and navigating training dynamics. As we move into the quantum domain, we'll see how quantum circuits can be used as components within similar frameworks, potentially offering new ways to capture complex data distributions.

  • Generative Adversarial Networks, Ian J. Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio, 2014 Advances in Neural Information Processing Systems 27 (Curran Associates, Inc.) DOI: 10.55982/tjc.2014.288 - The original paper introducing Generative Adversarial Networks, detailing their architecture and minimax training framework.
  • Auto-Encoding Variational Bayes, Diederik P. Kingma and Max Welling, 2013 arXiv preprint arXiv:1312.6114 DOI: 10.48550/arXiv.1312.6114 - The original paper introducing Variational Autoencoders, explaining the probabilistic framework and the Evidence Lower Bound objective.
  • Deep Learning, Ian Goodfellow, Yoshua Bengio, and Aaron Courville, 2016 (MIT Press) - A comprehensive textbook providing a theoretical and practical foundation in deep learning, with dedicated chapters on generative models such as GANs and VAEs.

© 2026 ApX Machine Learning