NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Quantum Bayesian Neural Networks

Noah Berner, Vincent Fortuin, Jonas Landman

TL;DR

Quantum algorithms for neural networks can evaluate matrix operations faster than classical computers, but their outputs are inherently noisy and usually require repeated executions to achieve high precision. This paper shows that Bayesian neural networks (BNNs)—which sample from posterior distributions rather than estimating exact point values—are naturally robust to this quantum noise. By omitting the repeated measurements traditionally used to suppress quantum error, the authors demonstrate that quantum BNNs can approximate true posteriors with as few as 10 phase-estimation qubits while fully preserving theoretical quantum speedups.

What Problem Does This Paper Address?

Standard deep learning on fault-tolerant quantum computers relies heavily on Quantum Inner Product Estimation (IPE). While IPE dramatically cuts the asymptotic complexity of vector multiplications, it produces low-accuracy, noisy approximations. In classical point-estimation training (like finding a single maximum-likelihood weight vector $\theta^*$), practitioners must repeat the quantum routine multiple times and take the median to boost confidence, diminishing the overall speedup.

The authors ask: Can Bayesian learning tolerate this noise without repeated sampling? Because Bayesian inference aims to sample from an already uncertain parameter posterior $p(\theta \mid \mathcal{D})$, the authors hypothesize that the inherent quantum noise of single-shot IPE can be absorbed directly into the sampling process.

Methods

The authors build on the quantum deep learning framework of Allcock et al. (2020) and introduce several key adaptations:

  • Single-Shot Quantum IPE: In standard IPE, an algorithm is executed repeatedly to guarantee error $\epsilon$ with probability $1 - \Delta$, incurring a $\log(1/\Delta)$ overhead. The authors drop the median evaluation completely, using a single quantum measurement per inner product.
  • Quantum Gradient & Prediction Computation: For inference (gradient-based MCMC sampling such as NUTS or SGLD), gradients are expressed via Jacobian-vector products (JVPs), which decompose into inner products handled by IPE. Predictions on unseen data are similarly evaluated via quantum inner products.
  • Implicit Weight Storage: To prevent an $\mathcal{O}(\Omega^2)$ classical write bottleneck when updating weights in Quantum RAM (QRAM), weights are maintained implicitly via low-rank representations.
  • Four Evaluation Regimes: The authors compare fully classical inference and prediction (CICP), classical inference with quantum prediction (CIQP), quantum inference with classical prediction (QICP), and end-to-end quantum inference and prediction (QIQP).

Datasets

The simulations were performed on classical hardware emulating the quantum subroutines:

  • Synthetic 1D Linear Regression: To observe how quantum noise alters posterior mean and 90% confidence bands.
  • Synthetic 2D Binary Classification: Evaluated for class boundary accuracy and posterior predictive standard deviation.
  • UCI Machine Learning Repository Benchmarks: Four standard regression datasets—Boston Housing, Concrete, Energy, and Wine—split 20 times across train/test sets to evaluate predictive log-likelihood across different network sizes and qubit counts.

Key Insights and Ideas

  • Inherent Noise Tolerance: Bayesian inference is forgiving of the discrete, periodic, and non-isotropic errors introduced by quantum phase estimation. Single-run quantum estimates are sufficient to form accurate posterior predictive distributions.
  • Asymmetric Sensitivity: Prediction is significantly more resilient to low qubit counts than gradient-based inference. In tests, CIQP achieved high accuracy with fewer qubits than QICP.
  • The Compounding Error Trade-off: On datasets like Energy and Wine, larger networks degraded quantum predictive accuracy. Because quantum IPE adds small errors at each neuron, larger models computed more inner products without gaining representational power, ultimately compounding the total error.
  • Low-Rank Viability: Restricting network weights to low-rank approximations (rank-3 vs. rank-5) to satisfy QRAM computational requirements retained comparable predictive fidelity to full-rank models.

Key Results

  • Qubit Scaling: For both synthetic regression and classification, simulated quantum models with $n = 10$ qubits achieved posterior predictions and predictive uncertainties virtually indistinguishable from the exact classical baseline (CICP).
  • UCI Performance: On the Boston and Concrete datasets, quantum prediction log-likelihood steadily matched classical baselines as the phase estimation register reached $n = 13$ qubits.
  • Asymptotic Advantage: The end-to-end quantum inference algorithm achieves a runtime of $\tilde{\mathcal{O}}\left((KN)^{1.5} \Omega \frac{1}{\epsilon} R\right)$ (where $K$ is the number of posterior samples, $N$ is dataset size, and $\Omega$ is neuron count), outpacing the classical $\mathcal{O}(KN\Omega^2)$ scaling whenever $\sqrt{KN} \ll \Omega$.

Limitations and Future Work

  • Classical Simulation Only: The algorithms were evaluated via numerical simulations on classical hardware rather than on physical, fault-tolerant quantum devices.
  • Hardware & Memory Assumptions: The proposed speedups rely on the availability of efficient Quantum RAM (QRAM) and exact low-rank compatibility with Bayesian priors.
  • Future Directions: The authors highlight extending empirical validations to larger, more realistic architectures and integrating native Quantum Monte Carlo algorithms to accelerate the MCMC inference chain itself.

Summary updated

BibTeX
@inproceedings{berner2022quantum,
  author = {Noah Berner and Vincent Fortuin and Jonas Landman},
  title = {{Quantum Bayesian Neural Networks}},
  booktitle = {AABI},
  year = {2022},
  url = {https://openreview.net/forum?id=MlmbNOw36QL},
}
Figure