Part I Summary: The Core Bottleneck and the Path Forward#

The prerequisite knowledge established in Part I forms the conceptual backbone for understanding Boltzmann machines:

  • Statistical Physics provided the Boltzmann distribution, linking low energy to high probability, and introduced the energy landscape metaphor.

  • Neural network fundamentals supplied the architectural building blocks (units, biases, weights) and the biological inspiration (Hebbian learning).

  • Energy-Based Models formalized the learning objective: shape the energy function so that real data occupies deep valleys. The gradient involves an expectation under the model distribution, which is intractable to compute exactly due to the partition function sum over exponentially many configurations.

  • Boltzmann Machine Architecture evolved from the computationally prohibitive full Boltzmann Machine to the Restricted Boltzmann Machine (RBM), which serves as the critical building block for stacking deep generative architectures.

The Core Tension: Expressiveness vs. Sampling Tractability#

Despite architectural simplifications, all Boltzmann machines share a fundamental bottleneck: sampling from high‑dimensional Boltzmann distributions is hard. Classical Markov Chain Monte Carlo (MCMC) methods, such as Gibbs sampling, suffer from:

  • Slow mixing at low temperatures, where energy barriers trap the chain in isolated modes.

  • Mode collapse in short‑run approximations like Contrastive Divergence (CD).

  • Bias that accumulates when persistent chains fail to fully equilibrate.

This is not merely a software optimisation problem; it is a physical phenomenon deeply rooted in statistical mechanics. Near a critical point, correlation lengths diverge, causing the Markov chain to mix extremely slowly (critical slowing down). The same physics that makes it hard to simulate a critical Ising model also makes it hard to sample from a well-trained Boltzmann machine that has learned a rich, multimodal data distribution.

These sampling limitations cap the practical expressiveness of energy‑based models and motivate the search for fundamentally different sampling strategies.

A Principled Classical Alternative: Simulated Annealing#

Simulated annealing (SA) is a classical metaheuristic that can be used to sample from Ising Hamiltonians. Instead of relying on a single Markov chain, SA mimics the physical annealing process:

  • Start at a high temperature, allowing the system to explore the energy landscape freely.

  • Gradually lower the temperature according to a cooling schedule.

  • At each temperature, perform Metropolis updates to move toward low-energy configurations.

When the system is cooled sufficiently slowly, the final distribution of states approximates the Boltzmann distribution at the effective temperature. SA is a powerful baseline for sampling in Boltzmann machines and is implemented in the Kaiwu-PyTorch-Plugin as the SimulatedAnnealingOptimizer. It requires no specialized hardware and can be run entirely on CPU.

However, SA still relies on thermal activation to escape local minima, which becomes exponentially slow for high energy barriers (the critical slowing down phenomenon). This limitation opens the door to more advanced methods, including quantum sampling.

Beyond Classical Sampling: Quantum Sampling#

Quantum sampling offers a physically grounded alternative that can overcome the limitations of classical MCMC and simulated annealing. Instead of simulating a Markov chain, one can encode the energy function as an Ising Hamiltonian and let a quantum physical system evolve toward its low‑energy states. Devices such as quantum annealers, i.e. Coherent Ising Machines (CIMs), realize this principle in hardware.

The full details of quantum sampling, including its physical implementation, integration with PyTorch, and practical performance benefits, are covered in the hands‑on tutorials of Part II. You will learn how to replace the classical SimulatedAnnealingOptimizer with a quantum sampler (e.g., CIMOptimizer) and observe the potential speed‑up and improved sample quality.

Part II Preview: Quantum‑Enhanced Hands‑on Tutorials#

Part II KPP Hands-on Tutorials shifts from theory to practice. you will use the Kaiwu-PyTorch-Plugin to replace classical sampling (Gibbs, CD, and simulated annealing) with quantum‑enhanced sampling. The plugin abstracts away the hardware details, allowing you to switch between classical and quantum samplers with minimal code changes.

Moreover, four sophisticated tasks will be covered:

  1. Quantum Sampling for EBMs: Understand the annealing principle and integrate quantum samplers into PyTorch.

  2. Full Boltzmann Machine: Model a 2D mixture distribution and observe quantum speed‑up.

  3. RBMs and DBNs: Learn hierarchical features from MNIST digits; compare quantum‑accelerated training against classical CD.

  4. Quantum Variational Autoencoder (Q‑VAE): Replace the Gaussian prior of a VAE with a discrete quantum RBM and apply it to image generation and single‑cell transcriptomics.

Each tutorial is self‑contained in a Jupyter notebook that you can run, modify, and extend. By the end of Part II, you will have experienced first‑hand how quantum sampling alleviates the classical mixing bottleneck and enables more expressive generative models.