Table of Contents
Fetching ...

Bayesian quantum sensing using graybox machine learning

Akram Youssry, Stefan Todd, Patrick Murton, Muhammad Junaid Arshad, Alberto Peruzzo, Cristian Bonato

TL;DR

The paper tackles the challenge of accurate parameter estimation in quantum sensing under realistic, noisy conditions by introducing a graybox modeling framework that merges physics-based sensor dynamics with data-driven imperfection modeling within a Bayesian inference loop. The graybox is trained on experimental Ramsey data to predict the readout probability $P_{cl}$ from pulses and ambient parameters, and is then used to construct a likelihood $P(r|f_B)$ for Bayesian frequency estimation. In an NV-center experiment measuring static magnetic fields, the graybox approach significantly outperforms a traditional whitebox model, achieving orders-of-magnitude reductions in mean-squared error with roughly $10^4$ training datapoints and enabling robust, real-time adaptive sensing. The work provides a general methodology for enhancing quantum sensors across platforms and paves the way for model-aware real-time feedback and transferability to more complex pulse sequences and environments.

Abstract

Quantum sensors offer significant advantages over classical devices in spatial resolution and sensitivity, enabling transformative applications across materials science, healthcare, and beyond. Their practical performance, however, is often constrained by unmodelled effects, including noise, imperfect state preparation, and non-ideal control fields. In this work, we report the first experimental implementation of a graybox modelling strategy for a solid-state open quantum system. The graybox framework integrates a physics-based system model with a data-driven description of experimental imperfections, achieving higher fidelity than purely analytical (whitebox) approaches while requiring fewer training resources than fully deep-learning models. We experimentally validate the method on the task of estimating a static magnetic field using a single-spin quantum sensor, performing Bayesian inference with a graybox model trained on prior experimental data. Using roughly 10,000 training datapoints, the graybox model yields several orders of magnitude improvement in mean squared error over the corresponding physics-only model. These results are broadly applicable to a wide range of quantum sensing platforms, not limited to single-spin systems, and are particularly valuable for real-time adaptive protocols, where model inaccuracies can otherwise lead to suboptimal control and degraded performance.

Bayesian quantum sensing using graybox machine learning

TL;DR

The paper tackles the challenge of accurate parameter estimation in quantum sensing under realistic, noisy conditions by introducing a graybox modeling framework that merges physics-based sensor dynamics with data-driven imperfection modeling within a Bayesian inference loop. The graybox is trained on experimental Ramsey data to predict the readout probability from pulses and ambient parameters, and is then used to construct a likelihood for Bayesian frequency estimation. In an NV-center experiment measuring static magnetic fields, the graybox approach significantly outperforms a traditional whitebox model, achieving orders-of-magnitude reductions in mean-squared error with roughly training datapoints and enabling robust, real-time adaptive sensing. The work provides a general methodology for enhancing quantum sensors across platforms and paves the way for model-aware real-time feedback and transferability to more complex pulse sequences and environments.

Abstract

Quantum sensors offer significant advantages over classical devices in spatial resolution and sensitivity, enabling transformative applications across materials science, healthcare, and beyond. Their practical performance, however, is often constrained by unmodelled effects, including noise, imperfect state preparation, and non-ideal control fields. In this work, we report the first experimental implementation of a graybox modelling strategy for a solid-state open quantum system. The graybox framework integrates a physics-based system model with a data-driven description of experimental imperfections, achieving higher fidelity than purely analytical (whitebox) approaches while requiring fewer training resources than fully deep-learning models. We experimentally validate the method on the task of estimating a static magnetic field using a single-spin quantum sensor, performing Bayesian inference with a graybox model trained on prior experimental data. Using roughly 10,000 training datapoints, the graybox model yields several orders of magnitude improvement in mean squared error over the corresponding physics-only model. These results are broadly applicable to a wide range of quantum sensing platforms, not limited to single-spin systems, and are particularly valuable for real-time adaptive protocols, where model inaccuracies can otherwise lead to suboptimal control and degraded performance.
Paper Structure (13 sections, 24 equations, 5 figures)

This paper contains 13 sections, 24 equations, 5 figures.

Figures (5)

  • Figure 1: Addressing experimental imperfections in quantum sensing. a) The experimental implementation of quantum sensors faces several non-idealities, including include imperfect quantum state initialization; the effect of the (classical and/or quantum) environment, resulting in generally unknown non-Markovian dynamics; unmodeled external factors, such as temperature or vibrations, that can affect the sensor dynamics; and non-ideal control pulses resulting in unknown deviations in the dynamics. b) Our proposed method to target these non-idealities incorporates a graybox (GB) model in a Bayesian estimation procedure. The first step is to create an experimental dataset of Ramsey experiments with randomized parameters (i.e. random pulse parameters $\tau$, $\phi$, $f_B$). The second step is to train a GB model that takes the the pulse parameters and calibration coefficients as inputs, and outputs the prediction of the probability of click. The training procedure is based on minimizing a loss function that computes the error between the predictions of the model and the ground truth output. The third step is to apply the Bayesian procedure iteratively to estimate unknown Larmor frequency $\hat{f}_B$ during operation mode. In each iteration, we execute a Ramsey experiment with random delay and phase shift, while the true unknown Larmor frequency $f_B$ is on. The qubit is measured, and the pulse sequence parameters are fed to the trained GB to predict $\hat{P}_{\text{cl}}(f)$ for a set of frequencies $f\in [f_{\min}, f_{\max} ]$ which we assume the true $f_B$ lies in. This prediction together with the measured number of clicks $r$ and batch size $R$, are used in the Bayes update rule to find an update posterior distribution of $P(f_B|\vec{r}_n)$, from which the estimate of the Larmor frequency $\hat{f}_B$ is estimated. The iterations are repeated until convergence.
  • Figure 2: The proposed Graybox model architecture. The input to the model is the ideal Ramsey pulse sequence parameters: (time delay $\tau$, phase shift $\phi$, and Larmor frequency $f_B$, the external parameters $\vec{\chi}$, as well as the readout calibration coefficients $\pi_0$ and $\pi_1$. The pulse parameters and the external parameters are processed through a BB in the form of a neural network of 9 layers. The output of the BB is the matrix parameterization of the noise operator $V_Z$, which is then used to reconstruct the operator itself in the next WB layer. The pulse parameters are also processed in a WB layer that computes the ideal Ramsey circuit unitary $U_{\text{Ramsey}}$. The two paths then merge in WB layer that computes the Pauli-Z expectation $\braket{Z}$. The output layer of the model then computes the probability of click $P_{\text{cl}}$ given the calibration coefficients and the expectation value.
  • Figure 3: Sketch of the NV center experiment. The electron spin associated to an NV center in diamond is initialised and readout by optical pulses at 532nm, created by an acousto-optic modulator (AOM), and controlled by a microwave pulse sequence. We consider a Ramsey experiment consisting of two $\pi/2$ microwave pulses with tunable inter-pulse delay $\tau$ and relative phase $\phi$ of the second pulse. The microwave pulses are created by single-sideband modulation of a carrier at 1.43 GHz with 40 MHz pulses from an arbitrary waveform generator. All experiments are performed at room temperature. A detailed description of the experimental setup can be found in arshad_RealtimeAdaptiveEstimation_2024b.
  • Figure 4: The results of estimating unknown Larmor frequencies. A violin plot of the MSE at the final iteration of the Bayesian procedure, as well as variance of the estimate, averaged over randomized ordering of the data for both whitebox (WB) and graybox (GB) models. The horizontal lines represent minimum, median, and maximum, while the blob represent a kernel distribution estimation of the data.
  • Figure 5: Examples of the Bayesian estimation procedure for best-case, average-case, and worst-case. The MSE of the estimation at each iteration averaged over the randomization of the sequence is plotted versus iteration for a) best-case b) average-case, and c) worst-case.The estimated frequency is then plotted at each iteration for d) best-case e) average-case, and f) worst-case. The dotted line represents the true frequency. The performance is compared for whitebox (WB) and graybox (GB) models.