---
title: Semi-Quantum Restricted Boltzmann Machines
url: https://www.emergentmind.com/topics/semi-quantum-restricted-boltzmann-machines-sqrbm
type: topic
---

# Semi-Quantum Restricted Boltzmann Machines

A semi-quantum Restricted Boltzmann Machine (sqRBM) is a generative graphical model in which the visible layer remains a classical system while the hidden layer is fully quantum. This hybrid quantum-classical architecture preserves the bipartite structure and conditional independence of classical RBMs but enhances expressivity and modeling power through non-commuting quantum hidden units. Key features of sqRBMs include analytically tractable marginal probabilities, closed-form gradients for efficient training, and significant expressive advantages over their fully classical counterparts. This model class has been developed to enable quantum-inspired machine learning with practical, classically tractable training algorithms, and results indicate improved log-likelihood and compactness relative to classical RBMs of comparable parameter count [2001.08997, 2502.17562, 2507.21569].

## 1. Model Architecture and Hamiltonian Definitions

The defining trait of sqRBMs is the strict classical/quantum separation:

- **Visible Layer:** $n$ classical binary units $v_i\in\{0,1\}$ (or $\{\pm1\}$ in some conventions).
- **Hidden Layer:** $m$ quantum degrees of freedom — either fermionic modes ($\hat h_j, \hat h_j^+$) [2001.08997] or qubits (spin-$1/2$; Pauli operators $\sigma^z_j,\sigma^x_j$) [2502.17562, 2507.21569].

The generic Hamiltonian takes the form:
\[
\hat H(\mathbf v) =
  -\sum_{i=1}^n b_i\,v_i
  \;-\;
  \sum_{j,j'} c_{j j'}\,\hat h_j^+\hat h_{j'}
  \;-\;
  \sum_{i=1}^n\sum_{j,j'} v_i\,w_{i j j'}\,\hat h_j^+\hat h_{j'}
\]
where:
- $b_i$ are visible biases,
- $c_{jj'}$ is the hidden bias matrix,
- $w_{ijj'}$ represents classical-to-quantum couplings.

In Pauli-based sqRBMs, the Hamiltonian is
\[
H = -\sum_{i\in V} b_i\,\sigma^z_i
    -\sum_{j\in H}\bigl(b_j\,\sigma^z_j + \Gamma_j\,\sigma^x_j\bigr)
    -\sum_{(i,j)}w_{ij}\,\sigma^z_i\sigma^z_j
\]
with $\Gamma_j$ parametrizing transverse fields and $w_{ij}$ coupling visible and hidden layers [2507.21569].

The key constraint in all constructions is that the visible subspace remains classical: all non-commutativity and quantum correlations are localized within the hidden layer.

## 2. Gibbs States, Probability Measures, and Partition Functions

The joint system is modeled as a (classical) probability over visible configurations, with each visible string $\mathbf v$ defining a conditional quantum Hamiltonian over the hidden subspace. The canonical (inverse temperature $\beta = 1$) state is the quantum Gibbs state:
\[
\hat\rho(\mathbf v) = \frac{e^{-\hat H(\mathbf v)}}{Z}
\]
with global partition function
\[
Z = \sum_{\mathbf v} \operatorname{Tr}_h [e^{-\hat H(\mathbf v)}].
\]

The marginal probability for $\mathbf v$ is:
\[
p(\mathbf v) = \frac{Z_v(\mathbf v)}{Z}
\]
with "visible-fixed" partition function $Z_v(\mathbf v) = \operatorname{Tr}_h [e^{-\hat H(\mathbf v)}]$.

For fermionic hidden layers, $Z_v(\mathbf v)$ admits a closed form:
\[
Z_v(\mathbf v) = e^{\sum_i b_i v_i} \det[I + e^{H_h(\mathbf v)}]
\]
where $H_h(\mathbf v) = -C - \sum_i v_i W_i$ [2001.08997]. In Pauli-based models, each hidden qubit $j$ experiences an effective field $\Phi_j(\mathbf v)$, leading to the marginal
\[
\tilde p(\mathbf v) = \left(\prod_i e^{-(-1)^{v_i}a_i^Z}\right) \prod_{j=1}^m 2\cosh(\|\Phi_j(\mathbf v)\|_2)
\]
with normalization over all visible strings [2502.17562].

## 3. Training: Closed-Form Gradients and Information-Geometric EM

Trainability is a core advantage of sqRBMs. The log-likelihood $\mathcal L = \frac{1}{N} \sum_k \ln p(\mathbf v^{(k)})$ admits an exact, efficiently computable gradient with respect to all model parameters due to the block-diagonal (clamped) structure in the visible basis. The gradient with respect to couplings $w_{ijj'}$ is:
\[
\partial_{w_{i\,jj'}} \mathcal L =
  \frac{1}{N}\sum_{k=1}^N \langle v_i\,\hat h_j^+\hat h_{j'} \rangle_{p(h|\mathbf v^{(k)})}
  - \sum_{\mathbf v} p(\mathbf v) \langle v_i\,\hat h_j^+\hat h_{j'} \rangle_{p(h|\mathbf v)}.
\]

For Pauli-based sqRBMs, gradients w.r.t. any parameter $\theta$ are:
\[
\theta \leftarrow \theta + \eta \left[ \overline{\langle \partial_\theta H \rangle} - \langle \partial_\theta H \rangle \right]
\]
with means either over data (positive phase) or the model (negative phase), and operator expectations computed analytically for each visible input.

The semi-quantum structure allows for application of an information-geometric quantum EM algorithm, in which the E-step amounts to clamping visible marginals, and the M-step optimizes over the exponential family of quantum Gibbs states. These steps yield strictly convex updates and robust convergence profiles [2507.21569].

## 4. Expressive Power and Relationship to Classical RBMs

A well-defined equivalence theorem relates the representational capacity of sqRBMs and classical RBMs. For $m$ hidden qubits in the sqRBM—each with $|W|$ non-commuting Pauli operators—the expressive equivalence is:
\[
sqRBM_{n,m} \simeq RBM_{n,|W|\,m}
\]
where $|W|$ (number of Pauli observables per hidden) quantifies expressive gain. For $|W|=3$ ($\{X,Y,Z\}$), an sqRBM with $m$ hidden qubits can match the output distributions of a classical RBM with $3m$ hidden units, given equal parameter counts [2502.17562].

Closed-form expressions for $p(\mathbf v)$ in both cases reveal that each quantum hidden unit in the sqRBM contributes at least as much modeling power as multiple classical ones, via factors such as $2\cosh(\|\Phi_j(\mathbf v)\|_2)$. This effect persists over a variety of synthetic datasets, and empirical tests confirm the predicted reduction in necessary hidden units for a given generative complexity.

## 5. Algorithms, Computational Complexity, and Practical Training

Training sqRBMs by stochastic methods—contrastive divergence (CD-k), persistent contrastive divergence (PCD)—is tractable because each update can be computed by diagonalizing an $m \times m$ matrix. The main computational steps per gradient calculation are:

- Diagonalization: $O(m^3)$
- Reconstructing quantum single-particle densities: $O(m^2)$
- Projecting onto $n$ visible units: $O(n m^2)$
- Total per persistence chain: $O(m^3 + n m^2)$

Pseudocode for block-Gibbs or PCD training alternates between visible and quantum hidden updates, with quantum moments computed analytically [2001.08997].

The quantum EM method for sqRBMs involves (1) constructing the conditional clamped hidden state for each data point (E-step) and (2) minimizing the strictly convex model free energy w.r.t. parameters (M-step), leveraging closed-form expressions for all required traces and expectations [2507.21569].

## 6. Empirical Results and Comparative Analysis

Evaluation across benchmark datasets—including Bars & Stripes, Optdigits, uniform random subsets, Hamming weight-constraint (Cardinality), and Parity—demonstrates that sqRBMs consistently outperform classical RBMs of the same hidden dimension in both speed of convergence and ultimate log-likelihood, often matching the performance of larger classical RBMs with up to $|W|$-fold more hidden units for the same total parameter count [2001.08997, 2502.17562]. Overfitting tests indicate that generalization properties are comparable or slightly superior to classical RBMs.

The systematic modeling gain is attributed to enhanced hidden correlation structure, mediated by off-diagonal quantum coherences ($\langle \hat h_j^+\hat h_{j'} \rangle$ or non-commuting Pauli traces), allowing compact encoding of higher-order dependencies in the visible data.

## 7. Limitations, Open Directions, and Theoretical Considerations

Several open questions and practical limitations persist:

- **Scalability:** Each parameter update scales as $O(m^3)$ (for diagonalization), limiting applicability to large $m$. Large-scale real-world applications and extensions to continuous or high-dimensional data remain untested [2001.08997].
- **Quantum Interactions:** Current sqRBM constructions restrict the hidden layer to non-interacting fermionic or decoupled Pauli-spin modes. The potential benefits of adding intra-hidden quantum interactions or considering bosonic modes are undetermined.
- **Quantum Hardware Implementation:** While algorithms are trainable on classical machines, experiments on physical quantum devices could test whether the same expressive and training benefits carry over beyond classical simulation [2001.08997].
- **Theoretical Understanding:** The conditions under which quantum coherences in the hidden layer yield a strict advantage over classical RBMs, and whether further quantum generalizations give even greater expressive power, remain subjects for further theoretical study [2002.17562].

Overall, the semi-quantum RBM architecture bridges classical machine learning, quantum statistical mechanics, and information geometry, resulting in models that are both efficiently optimizable and strictly more expressive than their classical analogues for generative modeling tasks.

Source: https://www.emergentmind.com/topics/semi-quantum-restricted-boltzmann-machines-sqrbm