---
title: Bernoulli Micro-Kernel for Quantum PDE Sampling
url: https://www.emergentmind.com/topics/bernoulli-micro-kernel
type: topic
---

# Bernoulli Micro-Kernel for Quantum PDE Sampling

The Bernoulli micro-kernel is a quantum computational primitive designed to perform explicit stencil node updates arising in finite-difference solvers for Partial Differential Equations (PDEs). In this context, it serves as a localized, constant-resource Monte Carlo subroutine—implementable via shallow, single-qubit quantum circuits—for accelerating the sampling of convex-sum stencil updates. Its resource cost in qubits and circuit depth does not scale with the problem size, rendering it suitable for orchestrated, massively parallel applications over computational grids. The Bernoulli micro-kernel is a realization of the broader QPU micro-kernel concept, wherein a quantum processor (QPU) acts as a sampling accelerator, invoked by a classical host that maintains the outer iteration structure [2511.12617].

## 1. Stencil Computation Framework and the Micro-Kernel Paradigm

Explicit finite-difference PDE solvers, such as the Forward-Time Centered-Space (FTCS) method for the 1D Heat equation, update the value at each spatial node $i$ at time $n+1$ according to a convex combination of neighbor values at time $n$:

\[
u_i^{n+1} = w_L\,u_{i-1}^n + w_C\,u_i^n + w_R\,u_{i+1}^n, \qquad w_L + w_C + w_R = 1, \quad w_b\ge0.
\]

In the QPU micro-kernel framework, the classical host iterates over time steps $n$ and nodes $i$, invoking the quantum micro-kernel only to obtain unbiased Monte Carlo estimates of the stencil update for each node. This approach offloads the local convex-sum operation to the quantum device, leaving the global time loop and grid iteration on the classical host [2511.12617].

## 2. Bernoulli Micro-Kernel Circuit Structure

The Bernoulli micro-kernel operates via single-qubit circuits for each stencil branch $b\in\{L,C,R\}$:

- The qubit is initialized in $\ket{0}$.
- A single-qubit $R_y$ rotation is applied with angle $\theta(u_b) = 2\arcsin\sqrt{u_b'}$, where $u_b'$ is the affine-normalized neighbor value mapped to $[0,1]$.
- The qubit is measured in the computational basis, yielding a Bernoulli sample with $\Pr(\text{outcome }=1)=u_b'$.
- This process is repeated $M_b$ times per branch to obtain an empirical mean $\hat{u}_b$.

No entanglement or multi-qubit operations are involved; each branch is executed independently [2511.12617].

## 3. Data Encoding and Shot Allocation

Neighbor values $u_b$ originally in $[u_{\min}, u_{\max}]$ are linearly normalized to $u_b'$ in $[0,1]$:

\[
u_b' = \frac{u_b - u_{\min}}{u_{\max}-u_{\min}} \in [0,1].
\]

Given a per-node shot budget $M$, shots are allocated proportionally to the stencil weights:

\[
M_b = \lfloor w_b\, M \rceil, \quad \sum_b M_b = M.
\]

Each branch executes its $R_y$ circuit $M_b$ times, enabling shot-based statistical estimation respecting the convex weights [2511.12617].

## 4. Estimator Construction and Statistical Properties

Let $X_b^{(s)}\in\{0,1\}$ be the outcome of the $s$-th measurement for branch $b$. The convex-sum estimator for $u_i^{n+1}$ is

\[
\hat{u}_i^{n+1} = \frac{1}{M}\sum_{b\in\{L,C,R\}} \sum_{s=1}^{M_b} X_b^{(s)} = \sum_{b\in\{L,C,R\}} \frac{M_b}{M}\, \hat{u}_b,
\]
where $\hat{u}_b = \frac{1}{M_b}\sum_{s} X_b^{(s)}$.

The estimator is unbiased:

\[
\mathbb{E}[\hat{u}_i^{n+1}] \approx \sum_b w_b\, u_b'
\]

and its variance is

\[
\mathrm{Var}[\hat{u}_i^{n+1}] = \frac{1}{M}\sum_b w_b u_b'(1-u_b') \leq \frac{1}{4M}.
\]

The standard error vanishes as $\mathcal{O}(1/\sqrt{M})$ [2511.12617].

## 5. Resource Requirements and Scaling

The Bernoulli micro-kernel achieves resource independence from grid size:

- Qubit count per branch: 1 qubit.
- Circuit depth per shot: one $R_y$ gate plus measurement.
- No entanglement between qubits; no increase in circuit complexity with additional grid points.

This constancy makes micro-kernels amenable to large-scale grid parallelization, with classical orchestration handling all node and branch-level iteration [2511.12617].

## 6. Error Behavior and Convergence

The standard error for each branch's mean estimator is

\[
\mathrm{SE}(\hat{u}_b) = \sqrt{\frac{u_b'(1-u_b')}{M_b}} \leq \frac{1}{2\sqrt{M_b}},
\]

and propagates through the convex-sum to

\[
\mathrm{SE}(\hat{u}_i^{n+1}) \leq \frac{1}{2\sqrt{M}}.
\]

Empirical studies using noiseless simulators confirm the $O(1/\sqrt{M})$ convergence: doubling $M$ reduces the estimator noise by approximately $\sqrt{2}$ [2511.12617].

## 7. Empirical Evaluation on Simulators and Quantum Hardware

Benchmarks were conducted for both the Heat and viscous Burgers’ equations:

| Hardware        | Circuit Depth | Gates            | Errors (\(L_\infty, L_2\)) | Per-Node Wall Time |
|-----------------|--------------|------------------|----------------------------|--------------------|
| Simulator       | 1            | 1 × $R_y$        | $O(M^{-1/2})$              | Not reported       |
| IBM Brisbane    | 3            | 1 × $R_y$, 1 × X | 0.0848, 0.0368 (raw)       | ≈ 4.7 s (M=4000)   |
|                 |              |                  | 0.0756, 0.0378 (mitigated) |                    |

On IBM Brisbane, the Bernoulli micro-kernel with $M=4000$ shots per node achieved $L_\infty=0.0848$, $L_2=0.0368$ without readout mitigation and $L_\infty=0.0756$, $L_2=0.0378$ after applying single-qubit readout calibration. Circuit depth after transpilation was 3, with no two-qubit gates, and per-node wall time was approximately 4.7 s. In contrast, the branching micro-kernel exhibited higher error and deeper, more resource-intensive circuits [2511.12617].

The results demonstrate that on present-day NISQ devices, the shallow, single-qubit Bernoulli micro-kernel consistently yields lower bias and higher accuracy relative to deeper, entangling alternatives, which are more susceptible to device noise [2511.12617].

Source: https://www.emergentmind.com/topics/bernoulli-micro-kernel