The magnetic field you want to measure is like a melody played in a noisy hall. A quantum sensor is a microphone that can pick up the faintest notes, but it also hears more than just the music: rustles, creaks, the breathing of neighbors. All of that mixes into the signal and spoils the recording.
To separate the melody from the noise, engineers usually build a model: they describe how the sensor should respond to the field and compare it with the actual response. Such a model is like a score that lists only the notes but doesn't mention that the hall hums at the frequency of the air conditioner or that the strings sometimes go out of tune. The scientists behind this work went further: instead of filling in the score by hand, they let the model listen to real recordings — about ten thousand short snippets. The model learned on its own what the hall sounds like and how to subtract that noise.
This approach is called a gray box: physics provides the framework, and data fill in the gaps. A purely physical model, a white box, made large errors because it didn't know about the imperfections. A fully trainable neural network, a black box, would require far more data. The gray box turned out to be the sweet spot: with ten thousand examples, the error dropped by several orders of magnitude. It's as if the microphone suddenly heard only the music, and the hall noise vanished.
The practical payoff is huge. Quantum sensors are already used in medicine to map neural activity, in materials science to find defects, and in navigation without GPS. But all of them suffer from inaccurate models, especially when they need to adapt quickly to changing conditions. The gray box allows this in real time: the sensor itself realizes its model is imperfect and corrects it on the fly. This is a step toward quantum sensors that work not in a pristine lab but in the real world — noisy, imperfect, and unpredictable.
as written by the authors arXiv:2601.17465
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.
A single spin in diamond can measure a magnetic field with precision down to one nanotesla — a billion times weaker than the field of a refrigerator magnet.