as a link or other access point to any supporting documentation. Some
responsible AI related evaluations were performed. Please refer to the main
document.

  * •

Any other comments? No

###  F.5 Preprocessing/cleaning/labeling

  * •

Was any preprocessing/cleaning/labeling of the data done (e.g., discretization
or bucketing, tokenization, part-of-speech tagging, SIFT feature extraction,
removal of instances, processing of missing values)? If so, please provide a
description. If not, you may skip the remainder of the questions in this
section. Yes, the detailed steps are as below:

    * –

Downloading and Sharding Commoncrawl Snapshots We downloaded 68 Commoncrawl
snapshots and divided the data in 240 shards based on web-domain. At this
stage, textual data gets extracted from the WET files provided by Common Crawl
which involves cleaning excessive tabs and newlines.

    * –

Language Identification (LID) at Document Level For this stage, we used the
fastText language identification (LID) model on the entire document which
helped further divide the data by language. In addition to the original
languages supported by fastText, we also added support for 28 romanized
languages. In total, the data for each language contains 240 shards.

    * –

Deduplicating Documents based on URL We aggregated the data based on URL which
yields 60% reduction in volume. In case two documents had the same URL, we
selected the document having more recent text content.

    * –

Document Splitting and LID at Paragraph Level We segmented the documents based
on newline and also stored the information about the order in which the
paragraphs were appearing in the original document (i.e. seq_num). Next, we
performed LID at the paragraph level again in order to divide the original
documents into clusters of paragraphs where each cluster represents sentences
belonging to a particular language.

    * –

Deduplicating Paragraphs Data extracted from Commoncrawl snapshots still have
a lot of duplicate text even if the document is different. In order to tackle
this, we applied the normalization function from CCNet Wenzek et al. (2020)
and then computed a SHA-1 hash of the normalized text. This helped in reducing
the content by 88%. Choosing which ¡paragraph, url¿ combination to keep can be
tricky as it can lead to a lot of fragmented documents. So we devised a
strategy to choose documents based on sorted ¡url, seq_num¿ order which would
help in preventing fragmentation as much as possible.

    * –

Language Model Scores We scored every paragraph using a Language Model trained
on data collected from OPUS Tiedemann (2012) (monolingual data collected from
the availble bitexts) using a 4-gram KenLM Heafield (2011). Note that since
the LMs were not trained on data belonging to a specific domain, this feature
helped in eliminating general non-fluent sentences.

    * –

Heuristic based approaches We use the following techniques to further refine
the filtering step (especially useful for Low resource languages having no or
poor quality LM)

      * *

Ratio of digit+punctuation to total characters (current threshold ¡0.25)

      * *

Maximum number of URLs per sentence (current value 1)

      * *

Type-token ratio (current threshold ¿0.6 + removing bottom 1% per language)

      * *

Minimum number of tokens per sentence (current value 3; not applied for
agglutinative languages)

    * –

Tagging profane words and removing instances containing such words

  * •

Was the “raw” data saved in addition to the preprocessed/cleaned/labeled data
(e.g., to support unanticipated future uses)? If so, please provide a link or
other access point to the “raw” data. The “raw” data is publiclly available in
in https://commoncrawl.org/the-data.

  * •

Is the software used to preprocess/clean/label the instances available? If so,
please provide a link or other access point. The software is proprietary to
Meta Platforms and currently unavailable publicly.

  * •

Any other comments? No

###  F.6 Uses

  * •

Has the dataset been used for any tasks already? If so, please provide a
description. Yes, this dataset and its precursor CC100 data have been used to
train machine translations and multilingual language models, which are
foundation to many downstream language tasks.

  * •

Is there a repository that links to any or all papers or systems that use the
dataset? If so, please provide a link or other access point. No.

  * •

What (other) tasks could the dataset be used for? This data can be used to
pretrain multilingual language models, which are foundation to many current
and future language tasks.

  * •

Is there anything about the composition of the dataset or the way it was
collected and preprocessed/cleaned/labeled that might impact future uses? For
example, is there anything that a future user might need to know to avoid uses
that could result in unfair treatment of individuals or groups (e.g.,
stereotyping, quality of service issues) or other undesirable harms (e.g.,
financial harms, legal risks) If so, please provide a description. Is there
anything a future user could do to mitigate these undesirable harms? The
pipeline for creating this dataset paves a way for building a scalable
infrastructure for mining datasets to be be used for training large-scale
models.

  * •

Are there tasks for which the dataset should not be used? If so, please
provide a description. No.

  * •

Any other comments? No.

###  F.7 Distribution

  * •

Will the dataset be distributed to third parties outside of the entity (e.g.,
company, institution, organization) on behalf of which the dataset was
created? If so, please provide a description. No.

  * •

How will the dataset will be distributed (e.g., tarball on website, API,
GitHub)? Does the dataset have a digital object identifier (DOI)? N/A

  * •

When will the dataset be distributed? No.

  * •

Will the dataset be distributed under a copyright or other intellectual
property (IP) license, and/or under applicable terms of use (ToU)? If so,
please describe this license and/or ToU, and provide a link or other access
point to, or otherwise reproduce, any relevant licensing terms or ToU, as well
as any fees associated with these restrictions. No.

  * •

Have any third parties imposed IP-based or other restrictions on the data
associated with the instances? If so, please describe these restrictions, and
provide a link or other access point to, or otherwise reproduce, any relevant
licensing terms, as well as any fees associated with these restrictions. No.

  * •

Do any export controls or other regulatory restrictions apply to the dataset
or to individual instances? If so, please describe these restrictions, and
provide a link or other access point to, or otherwise reproduce, any
supporting documentation. N/A

  * •

Any other comments? No.

###  F.8 Maintenance

  * •

Who is supporting/hosting/maintaining the dataset? Meta AI.

  * •

How can the owner/curator/manager of the dataset be contacted (e.g., email
address)? Refer to the main document.

  * •

Is there an erratum? If so, please provide a link or other access point.
Currently no.

  * •

Will the dataset be updated (e.g., to correct labeling errors, add new
instances, delete instances)? If so, please describe how often, by whom, and
how updates will be communicated to users (e.g., mailing list, GitHub)? No
plan for updating.

  * •

If the dataset relates to people, are there applicable limits on the retention
of the data associated with the instances (e.g., were individuals in question
told that their data would be retained for a fixed period of time and then
deleted)? If so, please describe these limits and explain how they will be
enforced. N/A

  * •

Will older versions of the dataset continue to be supported/hosted/maintained?
If so, please describe how. If not, please describe how its obsolescence will
be communicated to users. N/A

  * •

If others want to extend/augment/build on/contribute to the dataset, is there
a mechanism for them to do so? If so, please provide a description. Will these
contributions be validated/verified? If so, please describe how. If not, why
not? Is there a process for communicating/ distributing these contributions to
other users? If so, please provide a description. No.

  * •

Any other comments? No.


# Three years of muography at Mount Etna: results and perspectives

G. Gallo,11footnotetext: Corresponding author. D. Lo Presti  D.L. Bonanno  G.
Bonanno  C. Ferlito  P. La Rocca  S. Reito  F. Riggi  and G. Romeo

###### Abstract

The Summit Craters system represents the point of maximum expression of the
persistent tectonic activity at Mount Etna Volcano. The Muography of Etna
Volcano (MEV) Project began in 2016 as a pilot project for the successive
installation of a permanent muographic observatory. It aims to demonstrate the
detector’s capability to observe density anomalies inside the volcanic edifice
and monitor their time evolution. The first muon telescope built by the
collaboration and installed at the base of the North-East Crater from August
2017 to October 2019 was already able to get significant results. This work
describes the characteristics of the muon-telescope and summarizes the
principal outcomes obtained, with a quick look at the current status of the
project and future developments.

##  1 Introduction

Mount Etna covers about 1,200 square kilometers and is the highest terrestrial
volcano on the Eurasian plate, with a height of 3,357 meters a.s.l. [1]. Two
fault systems, one NE-SW oriented and the other NNW-SSE, both associated with
extensional tectonic activity, intersect at Mount Etna Central Crater (CC).
Together with the Northeast (NEC) and Southeast Craters (SEC) and a variable
number of fumaroles and vents, they form the “Summit Craters” system. Because
it is a permanently active volcano, with a surrounding area at high seismic
and volcanic hazard, but densely populated, Mount Etna is among the most
studied volcanoes in the world. In addition, Sicily’s Regional Civil
Protection Department and the Etnean Observatory of the National Institute of
Geophysics and Volcanology (INGV) monitor it constantly.

Nevertheless, some questions about Mount Etna and other active volcanoes
remain open, such as the “open-conduit” model, which describes their plumbing
system as an empty cavity filled by the rising magma during the eruptions.
Instead, recent observations suggest that the magma dynamically occupies the
conduit until it cools down and acts as a plug [2]. The plumbing system can be
thought of as divided into three vertical segments: a low-density, high-
pressure gas-rich magma fills the lowermost one; above this, there is a high-
density basaltic melt, through which gas bubbles can rise from the bottom
segment and slowly erode the upper solidified magma; a complex system of
surface fractures allowing permanent gas emission constitutes the uppermost
part. The vertical extension of each section is continuously varying according
to the dynamic equilibrium state until the local tectonics breaks it and an
eruption occurs.

Muography, or muon radiography, has already proved to be the most suitable
technique for studying the superficial layers of the volcanic edifice,
corresponding to the portion of the structure with a thickness limited to a
few kilometers of rock that the most energetic muons can pass through without
being stopped. Therefore, its inclusion in a permanent volcano monitoring
network could give a fundamental contribution to the understanding of the
plumbing system and, thus, to volcanic hazard mitigation [3, 4, 5, 6, 7].

##  2 The MEV project

In 2016 previously discussed reasons prompted a collaboration of physicists,
engineers, and volcanologists to start the Muography of Etna Volcano project
to demonstrate the feasibility of a muography experiment in the extreme
conditions on the top of Mount Etna. The first muon telescope prototype
developed within the project was built at the Department of Physics and
Astronomy of the University of Catania (DFA) and transferred to the INGV
department of Nicolosi (about $15\text{\,}\mathrm{km}$ far away from Catania)
for preliminary tests [8]. The initial target was the SEC, also to compare new
results with previous data [9], but, at the time of the installation, a lava
flow prevented access to it. Then, we moved to the NEC for the test and placed
the telescope in this area, as shown in figure 1.

(a)

(b)

Figure 1: (a) The telescope placed on the slope of Etna North-East crater at
$3100\text{\,}\mathrm{m}$ a.s.l. in October 2018. This figure was already
published in [10]. (b) Position and field of view of the telescope placed at
about $700\text{\,}\mathrm{m}$ from the NEC center. The image was elaborated
with MATLAB from a Digital Elevation Model updated to December 2015 [11].

###  2.1 The muon telescope

A muon telescope is essentially a stack of at least two position-sensitive
detectors arranged to get the impact points of the particles crossing it and
reconstruct their trajectories. Therefore, it allows measuring the particle
flux for each direction within its field of view to estimate the attenuation
due to the target object. For this reason, the telescope must be placed and
oriented so that the subject of interest is the unique cause of muon flux
attenuation. We designed our telescope to have its axis, perpendicular to the
detection modules, horizontally aligned to measure at the same time the muon
flux from the side of NEC and the one from the opposite direction without any
source of mitigation referred to in the following as “open-sky” flux.

The design of the first muon telescope built within the MEV project includes
all the requirements for an out-of-lab application: a container box ensures
ruggedness and water-tightness; solar panels and battery pack to be
independent of the power network; just $25\text{\,}\mathrm{W}$ of power
needed; remote control and data transfer over an internet connection. The
telescope has three position-sensitive modules with one square meter area and
a modular aluminum frame that allows the alignment. The detector and all the
stuff required weight about $300\text{\,}\mathrm{kg}$. Thus, it requires a
four-wheel-drive truck with a mechanical arm for transporting and installing
it already mounted. In principle, this design allows you to carry the pieces
one at a time and assemble the telescope in place. See ref. [8] for a more
detailed description of the telescope.

###  2.2 The position-sensitive modules

Each position-sensitive module consists of two orthogonal layers of 99
scintillating bars with nominal size $1\times 1\times 100$ $\mathrm{cm}$. They
have a central hole in which two rounded 1-millimeter Wavelength Shifting
fibers (WLS) are embedded to transport the scintillation light to a Multi
Anode PMT. A 3D printed plastic frame allows an easy coupling between the WLS
bundle and the PMT. Figure 2 shows some pictures taken during the assembly of
a module. The distance between the outer modules of the telescope, which is
$97\text{\,}\mathrm{cm}$, and the number and pitch of pixels for each module
define its geometric characteristics. The angular aperture is $\pm 45$
degrees; the resolution is about $10\text{\,}\mathrm{mrad}$. In the muographic
images shown in this paper a pixel corresponds to a $7\times 7$
${\mathrm{m}}^{2}$ target area because of the geometric characteristics of the
telescope just described and its position about $700\text{\,}\mathrm{m}$ away
from the central axis of the NEC.

(a)

(b)

(c)

(d)

Figure 2: Details of a telescope position-sensitive module assembly. (a) Black
painted aluminum frame enclosing the two layers of extruded scintillating
bars. (b) Detail of the two WLS fibers embedded in each bar. (c) Top view of
the 3D printed plastic frame for WLS-PMT coupling. (d) Bottow view of the
frame after cutting and lapping of the WLS.

###  2.3 Front-End, data processing & control unit electronics

Each module has its single Front-End (FE) board equipped with a 64 channels
Multi-Anode Photomultiplier (MAPMT, mod. Hamamatsu H8500) to read out the
scintillation light signal. The MAROC3 chip is the core element of the FE
architecture. It is an ASIC designed for reading MAPMT signals. It performs
the pre-amplification and shaping of the analog signal and the analog-to-
digital conversion, giving a time-over threshold response for each channel.

Counting both WLS for each scintillating bar, there are 396 ($4\times 99$)
optical channels for each module, but the sensor has 64 ones only. The
coupling is made possible by a proper routing of the WLS. It allows minimizing
the number of corresponding FE channels by a factor of 10 ($1/\sqrt{99}$).
Thus, the number of optical channels per module is equal to 40 (see figure
2(d)). The reduction mechanism is quite simple. The WLS fibers inside each bar
have two different labels, Group and Strip, respectively. If $i$ is the bar
progressive index from 1 to 99, the corresponding Group $(G)$ and Strip $(S)$
can be calculated as:

$\displaystyle G$ $\displaystyle=1+(i-1)\ \mathbf{div}\ n$ $\displaystyle S$
$\displaystyle=(i-1)\ \mathbf{rem}\ n$

using the integer division ($\mathbf{div}$) and reminder ($\mathbf{rem}$)
operators. The integer $n$ is equal to the number of bars belonging to the
same Group-set. In this case $n$ is equal to $10$, resulting in ten Group- and
as many Strip-sets, which are 20 channels per layer. The two WLS of each bar
are differently routed according to the Group and Strip labels. The bar hit by
the particle is unambiguously reconstructed as $i=(G-1)\times n+S$.

All sensitive modules share the unique data processing and control board. Its
main component is the System-On-Module (SOM) by National Instruments, an
embedded computer with a processor, a custom Linux Real-Time operating system,
and a programmable FPGA. A dedicated UI allows controlling all the parameters
of the system and managing the acquisition. The board holds an SD card to save
data locally, but the system has access to the internet using a 4G wireless
router and periodically transfers the data to the network storage hosted at
the DFA.

All the electronic boards are custom designed to remove the unnecessary
components found in MAROC3 and SOM’s evaluation boards, reducing the power
consumption. See ref. [8] for more details on the electronics.

##  3 State of the project and results

Figure 3(a) shows an example of muon imaging of the NEC in terms of integral
flux measured. In such an image, each ($\Delta x$, $\Delta y$) bin corresponds
to a particular direction. $\Delta x$ and $\Delta y$ are the differences in
the number of pixels between the entry and exit points of the particles on the
two outermost detection modules. The sign of $\Delta y$ distinguishes muons
coming from the two opposite sides of the telescope, as sketched in figure
3(b).

The permanence of the telescope at high altitude from August 2017 until
October 2019 has allowed demonstrating the feasibility of permanent monitoring
of the Etna Summit Craters system, the primary objective of the measurement
campaign, and the muographic results obtained are significant. During winter,
the snow buried the solar panels that powered the detector; it was necessary
to go to the installation site to restart the acquisition in spring. Thus, it
was only possible to acquire during the summer for 57 days in 2017, 95 days in
2018, and 51 days in 2019, respectively. However, this issue can easily be
overcome by a better installation of solar panels and by constantly removing
snow before it becomes too thick.

(a)

(b)

Figure 3: (a) Muon integral flux acquired in 2017, starting from August 1 till
the telescope shut-down due to the snow coverage on the solar panels. (b)
Sketch of telescope detection modules T1, T2, and T3, with the incoming
direction distinction by $\Delta y$.

The following muographic images show the results in terms of $R$, the daily
average of the ratio between the flux of particle surviving after traversing
the crater and the one before it. Because we have no direct access to this
last quantity, the muon flux of the open-sky, measured from the opposite side
of the telescope, replaces it. See refs. [12, 13] for the complete data
analysis procedure and the evaluation of the East-West effect at the
measurement site.

One of the main volcanological findings by this research is the evidence of a
cavity under the NEC roof, detected months before its collapse at the end of
2017. The comparison between 2017 and 2018 $R$ maps in figure 4 gives an
immediate hint of this anomaly. In 2017 muography, the region of $R$
abnormally higher than its surroundings (inside the red ellipse) is the
evidence of an unexpectedly high muon flux caused by a lower density material
along the muon path or an empty volume. In 2018 muography, there is a V-shaped
region of high $R$, extending from the surface to the previous location of the
cavity and, in fact, from the satellite views (figure 4, right panels) and the
visual evidence on-site, we can see the NEC without its roof after the
collapse. See ref. [10] for a comprehensive volcanological discussion of these
results.

Figure 4: Comparison between 2017, 2018, and 2019 muographic images on the
left panels, with the corresponding satellite views (Google Earth screen
captures) for 2017 and 2018. The bottom right corner picture was taken in
February, 2020 and shows a lava pit opened on the inner flank of the CC.

Another interesting phenomenon suggested by etnean models and confirmed by
muography and successive visual evidence is the fractures migration from the
North-East to the Central crater. In both the 2018 and 2019 muography, the
dashed red ellipses highlight some higher $R$ spots along the direction
connecting the NEC to the CC. The opening of a new lava pit on the inner flank
of the CC in February 2020, right along this line, further confirmed the
consistency of these observations (see figure 4, bottom right panel).

###  3.1 The time-of-flight module

The purpose of this measurement is the correct discrimination of near-
horizontal tracks. This very tiny flux suffers the noise by upward-going
muons. They are particles that seem to come from below the horizontal plane
before passing through the telescope so that they perfectly mimic particles
that come downwards in the opposite direction and produce a wrong increase of
the flux [14, 15].

The TOF module consists of an additional electronic board (TDC-GPX2 evaluation
board) which receives the OR signal output of the MAROC3 chip in each board
after a delay line, a monostable and a digital level translator. Counting the
time jitter of all elements involved in the TOF measurement chain, the time
resolution is about $1\text{\,}\mathrm{ns}$.

(a)

(b)

(c)

(d)

Figure 5: (a) 2019 NEC muography without TOF filtering. (b) Difference between
$R$ values in 2019 muographs without and with TOF filter. (c) Red: normalized
counts of particle flux incoming from the target side. Blue: normalized number
of events for which the incoming direction is uniquely determined by both
$\Delta y$ and TOF measure. Green: normalized number of rejected events. (d)
Overall (blue) and filtered (green) $\Delta t$ distributions for data acquired
during 2019. Red and cyan shaded areas represent two Gaussian distributions
used to fit independently filtered positive and negative $\Delta t$
histograms. Values indicated by crosses correspond to the peaks’ center
position.

The TOF measurement provides a further possibility to discriminate the
direction of arrival of the particles, in addition to the geometric criterion
of $\Delta y$. The comparison between the 2019 muographic images with the TOF
filter applied (figure 4) to the one without (figure 5(a), also shown as the
differential map in figure 5(c)), clearly shows its effect. As one would
expect, the percentage of rejected events increases approaching the horizontal
or decreasing $\Delta y$ (see the green line in figure 5(c)). However, with
this resolution and the external modules placed about 1 meter apart it is
impossible to completely separate the two distributions of particles entering
the detector from the front or the rear side (figure 5(d)).

##  4 Conclusion

Muographic results here discussed sustain the models of etnean dynamics
proposed by the volcanologists of the collaboration and vice-versa; visual
evidence confirmed both. The technology and the ingenious solution adopted
demonstrated an optimal fit for this application. The international
muographers community appreciated the MEV project such that the Universities
of Catania and Tokyo and the Wigner Research Center signed an international
research agreement in September 2019. The plans for this activity include the
TOF measurement improvement by increasing the telescope length up to
$2.5\text{\,}\mathrm{m}$, and the reinforcement of the collaboration with the
Italian Institute for Volcanology to integrate the muographic monitoring with
the existing sensors network.

## References

  * [1] C. I. section and P. I. section, _ETNA, Bollettino settimanale 02/08/2021 - 08/08/2021_ , Tech. Rep. 32/2021, Aug., 2021.
  * [2] C. Ferlito, _Mount Etna volcano (Italy). Just a giant hot spring!_ , _Earth-Science Reviews_ 177 (2018) 14.
  * [3] H. K. M. Tanaka, T. Kusagaya and H. Shinohara, _Radiographic visualization of magma dynamics in an erupting volcano_ , _Nature Communications_ 5 (2014) 3381.
  * [4] K. Jourde, D. Gibert and J. Marteau, _Improvement of density models of geological structures by fusion of gravity data and cosmic muon radiographies_ , _Geoscientific Instrumentation, Methods and Data Systems_ 4 (2015) 177.
  * [5] K. Jourde et al., _Muon dynamic radiography of density changes induced by hydrothermal activity at the La Soufrière of Guadeloupe volcano_ , _Scientific Reports_ 6 (2016) 33406.
  * [6] L. Oláh et al., _High-definition and low-noise muography of the Sakurajima volcano with gaseous tracking detectors_ , _Scientific Reports_ 8 (2018) 3207.
  * [7] L. Oláh, H. K. M. Tanaka, T. Ohminato, G. Hamar and D. Varga, _Plug Formation Imaged Beneath the Active Craters of Sakurajima Volcano With Muography_ , _Geophysical Research Letters_ 46 (2019) 10417.
  * [8] D. Lo Presti and et al., _The MEV project: Design and testing of a new high-resolution telescope for muography of Etna Volcano_ , _Nuclear Instruments and Methods in Physics Research Section A: Accelerators, Spectrometers, Detectors and Associated Equipment_ 904 (2018) 195.
  * [9] D. Carbone, D. Gibert, J. Marteau, M. Diament, L. Zuccarello and E. Galichet, _An experiment of muon radiography at Mt Etna (Italy)_ , _Geophysical Journal International_ 196 (2014) 633.
  * [10] D. Lo Presti, F. Riggi, C. Ferlito, D. L. Bonanno, G. Bonanno, G. Gallo et al., _Muographic monitoring of the volcano-tectonic evolution of Mount Etna_ , _Scientific Reports_ 10 (2020) 11351.
  * [11] G. Ganci, A. Cappello, G. Bilotta, A. Hérault, V. Zago and C. Del Negro, _Digital Elevation Model of Mt Etna updated to 18 December 2015_ , _Supplement to: Ganci, G et al. (2018): Mapping Volcanic Deposits of the 2011–2015 Etna Eruptive Events Using Satellite Remote Sensing. Frontiers in Earth Science, 6:83, https://doi.org/10.3389/feart.2018.00083_ (2019) .
  * [12] G. Gallo, D. Lo Presti, D. L. Bonanno, G. Bonanno, D. G. Bongiovanni, D. Carbone et al., _Improvements of data analysis and self-consistent monitoring methods for the MEV telescope_ , _Nuclear Instruments and Methods in Physics Research Section A: Accelerators, Spectrometers, Detectors and Associated Equipment_ (2019) .
  * [13] F. Riggi, D. Bonanno, G. Gallo, P. La Rocca, F. Longhitano, D. Lo Presti et al., _Investigation of the cosmic ray angular distribution and the East–West effect near the top of Etna volcano with the MEV telescope_ , _The European Physical Journal Plus_ 135 (2020) 280.
  * [14] K. Jourde, D. Gibert, J. Marteau, J. de Bremond d’Ars, S. Gardien, C. Girerd et al., _Experimental detection of upward going cosmic particles and consequences for correction of density radiography of volcanoes_ , _Geophys. Res. Lett._ 40 (2013) 6334.
  * [15] H. Gómez, et al., C. Goy, K. Jourde, Y. Karyotakis, S. Katsanevas et al., _Forward scattering effects on muon imaging_ , _Journal of Instrumentation_ 12 (2017) P12018.


# A Neural Network Assisted 171Yb+ Quantum Magnetometer

Yan Chen  CAS Key Laboratory of Quantum Information, University of Science and
Technology of China, Hefei 230026, China  CAS Center For Excellence in Quantum
Information and Quantum Physics, University of Science and Technology of
China, Hefei 230026, China  Yue Ban<EMAIL_ADDRESS>Department of Physical
Chemistry, University of the Basque Country UPV/EHU, Apartado 644, 48080
Bilbao, Spain  EHU Quantum Center, University of the Basque Country UPV/EHU,
Barrio Sarriena, s/n, 48940 Leioa, Biscay, Spain  TECNALIA, Basque Research
and Technology Alliance (BRTA), 48160 Derio, Spain  Ran He
<EMAIL_ADDRESS>CAS Key Laboratory of Quantum Information, University
of Science and Technology of China, Hefei 230026, China  CAS Center For
Excellence in Quantum Information and Quantum Physics, University of Science
and Technology of China, Hefei 230026, China  Jin-Ming Cui<EMAIL_ADDRESS>CAS Key Laboratory of Quantum Information, University of Science and
Technology of China, Hefei 230026, China  CAS Center For Excellence in Quantum
Information and Quantum Physics, University of Science and Technology of
China, Hefei 230026, China  Hefei National Laboratory, University of Science
and Technology of China, Hefei 230088, China
Yun-Feng Huang<EMAIL_ADDRESS>CAS Key Laboratory of Quantum Information,
University of Science and Technology of China, Hefei 230026, China  CAS Center
For Excellence in Quantum Information and Quantum Physics, University of
Science and Technology of China, Hefei 230026, China  Hefei National
Laboratory, University of Science and Technology of China, Hefei 230088, China
Chuan-Feng Li<EMAIL_ADDRESS>CAS Key Laboratory of Quantum Information,
University of Science and Technology of China, Hefei 230026, China  CAS Center
For Excellence in Quantum Information and Quantum Physics, University of
Science and Technology of China, Hefei 230026, China  Hefei National
Laboratory, University of Science and Technology of China, Hefei 230088, China
Guang-Can Guo  CAS Key Laboratory of Quantum Information, University of
Science and Technology of China, Hefei 230026, China  CAS Center For
Excellence in Quantum Information and Quantum Physics, University of Science
and Technology of China, Hefei 230026, China  Hefei National Laboratory,
University of Science and Technology of China, Hefei 230088, China  Jorge
Casanova  Department of Physical Chemistry, University of the Basque Country
UPV/EHU, Apartado 644, 48080 Bilbao, Spain  EHU Quantum Center, University of
the Basque Country UPV/EHU, Barrio Sarriena, s/n, 48940 Leioa, Biscay, Spain
IKERBASQUE, Basque Foundation for Science, Plaza Euskadi 5, 48009 Bilbao,
Spain

###### Abstract

A versatile magnetometer must deliver a readable response when exposed to
target fields in a wide range of parameters. In this work, we experimentally
demonstrate that the combination of 171Yb+ atomic sensors with adequately
trained neural networks enables to investigate target fields in distinct
challenging scenarios. In particular, we characterize radio frequency (RF)
fields in the presence of large shot noise, including the limit case of
continuous data acquisition via single-shot measurements. Furthermore, by
incorporating neural networks we significantly extend the working regime of
atomic magnetometers into scenarios in which the RF driving induces responses
beyond their standard harmonic behavior. Our results indicate the benefits to
integrate neural networks at the data processing stage of general quantum
sensing tasks to decipher the information contained in the sensor responses.

## Introduction

Quantum sensing Q-sensing  and metrology Q-metrology  are important branches
of modern quantum technologies with applications in different areas such as
imaging imaging1 ; imaging2  and spectroscopy spectroscopy1 ; spectroscopy2 ;
spectroscopy3 . In this scenario, atomic-sized sensors encoded in 171Yb+ Yb1 ;
Yb2 ; Yb3 ; Yb4 ; Yb5  and 40Ca+ Ca  ions provide spatial resolution and
sensitivity for the detection of external/target fields. In addition, 171Yb+
ions exhibit negligible emission rates Yb4  and extended coherence times due
to the stabilization provided by dynamical decoupling (DD) techniques DD1 ;
DD2 ; Munuera-Javaloy21 . In particular, DD methods that exploit the multi-
level structure in the ${}^{2}S_{\frac{1}{2}}$ manifold of the 171Yb+ ion have
lead to detection of radio frequency (RF) fields with sensitivity close to the
standard quantum limit Yb2 , while the resulting dressed state qubit was
proposed as a robust register for quantum information processing Yb1 ; Yb3 .
However, this approach is restricted to a narrow working regime leading to
harmonic sensor responses where RF target parameters are encoded. A departure
from such range leads to complex sensor responses where standard inference of
the external fields gets challenging. In another vein, machine learning (ML)
tools are incorporated to address distinct problems in quantum technologies.
In particular, neural networks (NNs) are valuable in distinct quantum sensing
scenarios leading to adaptive protocols for phase estimation phase-estimation-
ML1 ; phase-estimation-ML2 ; phase-estimation-ML3 , parameter estimation
parameter-estimation-ML1 ; parameter-estimation-ML2 ; parameter-estimation-ML3
; parameter-estimation-ML4 ; parameter-estimation-ML5 , and quantum sensors
calibration calibration-ML1 ; calibration-ML2 ; sensor-NN .

In this article, we experimentally demonstrate the ability of NNs to decode
complex sensor responses, thus significantly extending the operational regime
of quantum detectors. In particular, we infer RF target parameters from the
measured response of an 171Yb+ atomic sensor in distinct challenging
scenarios. These comprise the regime of non-harmonic sensor responses with a
large shot noise, and the continuous interrogation of the sensor (via single-
shot measurements) under always-on RF fields. With a careful modelling of the
sensor-target dynamics, we train NNs to relate intricate responses of the
sensor with RF parameters leading to estimations of the latter with high
accuracy.

## Results

### The quantum sensor

The sensor consists of four hyperfine levels
($|0\rangle,|\acute{0}\rangle,|1\rangle$, and $|-1\rangle$) in the
${}^{2}S_{\frac{1}{2}}$ manifold of the 171Yb+ ion, and in a static magnetic
field $B_{z}$. To enhance the coherence of the sensor, we use two microwave
(MW) fields with Rabi frequency $\Omega$ leading to the dressed basis set
$\\{|u\rangle,|d\rangle,|D\rangle,|\acute{0}\rangle\\}$ with
$|u\rangle=(|B\rangle+|0\rangle)/\sqrt{2}$,
$|d\rangle=(|B\rangle-|0\rangle)/\sqrt{2}$,
$|D\rangle=(|-1\rangle-|1\rangle)/\sqrt{2}$ and
$|B\rangle=(|-1\rangle+|1\rangle)/\sqrt{2}$ which is insensitive to magnetic
field fluctuations Yb1 ; Yb2 , see Fig. 1 (a) and (b).

Once a target field $\Omega_{\rm{tg}}\cos(\omega_{\rm{tg}}t+\phi_{\rm{tg}})$
is applied, one measures the dark state ($|D\rangle$) survival probability
$P_{D}(t)$ considered here as the sensor response. The standard working regime
of the sensor (leading to harmonic responses) implies
$\Omega_{\rm{tg}}\ll\Omega\ll\omega_{\rm{tg}}$ with $\omega_{\rm{tg}}$
resonant with, e.g., the $|\acute{0}\rangle\leftrightarrow|1\rangle$
transition Yb2 . This simplifies the total Hamiltonian (see Supplementary Note
1) into

$H=-\frac{\Omega_{\rm{tg}}}{2\sqrt{2}}(|D\rangle\langle\acute{0}|+|\acute{0}\rangle\langle
D|).$ (1)

From Eq. (1) one finds the harmonic sensor response $P_{D}(t)=\cos^{2}(\uppi
t/t_{\rm{R}})$, with $t_{\rm{R}}=2\uppi\sqrt{2}/\Omega_{\rm{tg}}$ establishing
a simple relation between $t_{\rm{R}}$ and the target field parameter
$\Omega_{\rm{tg}}$. In contrast, a departure from the standard working regime
leads to the loss of this type of simple dependencies between sensor responses
and target parameters, thus posing serious challenges for reliable field
characterization. We demonstrate that our setup combining a quantum sensor and
NNs can extract RF fields parameters from complex sensor responses.

Figure 1:  Schematic levels of the ${{}^{171}\rm Yb^{+}}$ atomic sensor and
the experimental setup. (a) Relevant levels of the ${{}^{171}\rm Yb^{+}}$
atomic sensor. Two resonant MW fields drive the sensor with a Rabi frequency
$\Omega$ leading to the configuration in (b) which is defined in the dressed
state basis $\\{|u\rangle$, $|d\rangle$, $|\acute{0}\rangle$, $|D\rangle\\}$
Yb2 . (c) Schematic configuration of the experimental setup. The ion is
trapped in a needle trap which consists of a pair of RF electrodes and four DC
electrodes. The MW fields for state manipulation are generated by mixing a
12.4428 GHz signal with the signal from an arbitrary waveform generator
(AWG1). The 12.6 GHz signal after a high pass filter (HPF) is amplified by an
amplifier (Amp1) and sent to the ion using a MW horn outside the vacuum
chamber. The target field around 10 MHz is generated by another arbitrary
waveform generator (AWG2) controlled by the computer and broadcast to the ion
through a coil after amplification. We place an extra RF switch after AWG2,
which can be used to remove the target field from the trap while keeping the
signal from AWG2 continuous. A photomultiplier tube (PMT) is used to detect
the state-dependent fluorescence. (d) Scheme of the NN. The response from PMT,
i.e. X, is processed by a number of hidden layers ($\rm{HL}_{1}$ …
$\rm{HL}_{k}$) leading to the outputs Y.

### Experimental setup

As schematically shown in Fig. 1 (c), our protocol is executed on a single
${}^{171}\rm Yb^{+}$ ion confined in a Paul trap which is shielded by
permalloy to reduce the surrounding magnetic noise setup1 ; setup2 . A
magnetic field $B_{z}$ is applied to the ion leading to a Zeeman shift
$\approx 10.0$ MHz between $|\acute{0}\rangle$ and $|1\rangle$. Two $\sim$12.6
GHz MW fields $\Omega_{j}\cos{(\omega_{j}t+\phi_{j})}$ $(j=1,2)$ respectively
resonant with transitions $|0\rangle\leftrightarrow|1\rangle$ and
$|0\rangle\leftrightarrow|-1\rangle$ are used for state manipulation. To
generate the dark state $|D\rangle$, we design pulses with the amplitudes
$\Omega_{1}$ and $\Omega_{2}$ evolving in the form of a hyperbolic tangent
(details available in the Supplementary Information). During the sensing
window, the amplitudes of dressing fields are kept constant at
$\Omega_{1}=\Omega_{2}=(2\uppi)\times 5.5$ kHz. Afterwards the state remaining
in $|D\rangle$ is transferred to $|0\rangle$ for detection.

A copper coil placed under the trap generates the target field once an RF
current is sent to the coil. As the original RF signal is produced by an
arbitrary waveform generator (AWG2), the amplitude, frequency, and the initial
phase of the target field can be set by adjusting the parameters of AWG2. An
RF switch is placed after the AWG2 output in order to remove interaction
between the field and the ion if necessary while keeping the signal source
continuously on. After amplification, the RF target field generated by the
coil has a maximum amplitude of ${\Omega_{\rm{tg}}^{\rm{max}}}=(2\uppi)\times
9.0$ kHz. A photomultiplier tube (PMT) is used to detect the state-dependent
fluorescence. As schematically shown in Fig. 1 (d), the response from PMT,
i.e. X, is processed through the well-trained NN leading to the outputs Y
which approach the targets A. We use data generated from numerical simulations
to create the NN. Then, by inputting experimentally collected responses into
the NN, we estimate the RF parameters.

Now, we demonstrate the good performance of an 171Yb+-magnetometer assisted by
a NN in two scenarios in which input data comprises $(i)$ average values
obtained from a reduced number of measurements, and $(ii)$ binary sequences
(including only 0, or 1) continuously acquired from single-shot measurements.
Both cases are demonstrated in regimes where the sensor delivers complex
responses that depart from the standard harmonic regime. Hence, we prove that
NNs significantly extends the versatility of quantum sensors.

Figure 2:  Estimation results from Scenario i, a reduced number of
measurements. (a-b) Regression of the NN outputs ($y_{1}$) with respect to the
targets $a_{1}\equiv\Omega_{\rm tg}$ for a number of shots $N_{m}=100$ (a) and
$N_{m}=30$ (b). The fit (solid-blue) overlaps with the line $y_{1}=a_{1}$,
while R is the correlation coefficient Correlation-coefficient  of $y_{1}$ and
$a_{1}$. This is $\rm{R}=0.9996$ (a), and $0.9994$ (b). (c-e) Sensor response
(diamonds) for the targets $\Omega_{\rm tg}=(2\uppi)\times 1.1487$ kHz (c) and
$\Omega_{\rm tg}=(2\uppi)\times 8.9493$ kHz (d, e) experimentally obtained for
$N_{m}=30$ shots. For comparison, in (c,d) the harmonic response
$P_{D}(t)=\cos^{2}(\uppi t/t_{\rm{R}})$ (solid-blue) is included. The plot in
(c) shows the case with $\Omega_{\rm tg}=(2\uppi)\times 1.1487$ kHz lying in
the harmonic regime, while in (d) the response for $\Omega_{\rm
tg}=(2\uppi)\times 8.9493$ kHz significantly deviates from the harmonic
behavior. In (e) we observe that the curve obtained from numerical simulations
(solid-red) fits experimental data for $\Omega_{\rm tg}=(2\uppi)\times 8.9493$
kHz. Error bars in (c-e) represent the standard error of the mean.

### Scenario i: Parameter estimation with a reduced number of measurements

We aim to estimate the Rabi frequency of a target field. In this case, the
input data string $\textbf{X}=\\{P_{1},P_{2},...,P_{N_{p}}\\}$ consist on the
average values $P_{i}$ ($i\in[1,N_{p}]$) collected at $N_{p}$ time instants
$t=t_{i}$ distributed in a time interval $[0,t_{f}]$ for a specific
$\Omega_{\rm{tg}}$. We use the Hamiltonian in the Supplementary Information to
numerically compute $P_{D}(t_{i})$, as each $P_{i}$ does not follow the
expression $P_{D}(t_{i})=\cos^{2}(\uppi t_{i}/t_{\rm{R}})$ in cases that
depart from the standard working regime. In addition, the binary outcome is
drawn from a Bernoulli distribution $z_{n}^{i}\sim
B(1,P_{D}(t_{i}))\in\\{0,1\\}$ such that each simulated average value is
$P_{i}=\sum_{n=1}^{N_{m}}z_{n}^{i}/N_{m}$ for a number of shots $N_{m}$. We
choose $N_{p}=151$, $N_{m}=100$ and $t_{f}=2.828$ ms (note that this value of
$t_{f}$ corresponds to one period of the sensor response for
$\Omega_{\rm{tg}}=(2\uppi)\times 0.5$ kHz, i.e. in the harmonic case). The
examples (i.e. the data strings X, Y, and A) are computed by selecting $96$
values for $\Omega_{\rm{tg}}/(2\uppi)$ in the range $[0.5,10]$ kHz. In
addition, as each $P_{i}$ fluctuates owing to the reduced number of
measurements, we perform $100$ repetitions for each simulated experimental
acquisition (i.e. for each $\Omega_{\rm{tg}}$). Therefore, our dataset
contains $96\times 100$ examples of which $70\%$/$15\%$/ $15\%$ lead to the
training/validation/test datasets. After training the NN (details are
available in Methods and the Supplementary Information) we can estimate the
Rabi frequency $\Omega_{\rm{tg}}$ of experimentally collected responses by
inputting them into the NN.

Table 1: Outputs $y_{1}$ obtained from the NN in Scenario i

$a_{1}$($\times 2\pi$ kHz) |  $y_{1}$ ($\times 2\pi$ kHz) with $N_{m}=100$ |  $y_{1}$ ($\times 2\pi$ kHz) with $N_{m}=30$
---|---|---
1.1487 | 1.1827 | 1.1731
1.7229 | 1.7473 | 1.8060
2.2566 | 2.3109 | 2.3207
2.8760 | 2.8616 | 2.8527
3.4429 | 3.4961 | 3.4947
4.0098 | 4.0391 | 4.0502
4.5778 | 4.6283 | 4.6386
5.1834 | 5.1856 | 5.2208
5.7140 | 5.7448 | 5.7297
6.2797 | 6.1482 | 6.2134
6.8397 | 6.8358 | 6.6896
7.3927 | 7.3086 | 7.3471
7.9319 | 8.0864 | 8.1129
8.4527 | 8.3775 | 8.3870
8.9493 | 8.8414 | 8.7825

The input data of the NNs are the experimental responses corresponding to the
targets $a_{1}=\Omega_{\rm{tg}}$. These comprise the average values collected
for $N_{p}=151$ time instants in the interval $t\in[0,t_{f}]$ with a finite
number of shots $N_{m}=100$ and $N_{m}=30$.

In particular, we harvest sensor responses for $N=15$ values of
$\Omega_{\rm{tg}}$ (while we select other RF parameters as $\phi_{\rm{tg}}=0$
and $\omega_{\rm{tg}}=(2\uppi)\times 10.56$ MHz) which do not belong to the
training/validation/test datasets, and for a number of shots $N_{m}=100$, and
$N_{m}=30$. In Table 1 we list the estimations $y_{1}$ from the NN for each
target $a_{1}\equiv\Omega_{\rm{tg}}$. Each output $y_{1}$ is obtained after
feeding the NN with the experimentally acquired response consisting of average
values measured during $t\in[0,t_{f}]$ with $N_{p}=151$. We show the results
for a number of shots $N_{m}=100$ and $N_{m}=30$. The regressions of the NN
outputs with respect to $\Omega_{\rm{tg}}$ are shown in Fig. 2 (a, b).

Figure 3:  Estimation results from Scenario ii, continuous data acquisition.
(a) Schematic configuration of the continuous data acquisition scheme. Each
binary value is obtained after completing the preparation, interaction, and
measurement stages. (b-d) Regression of the rescaled outputs $y_{1}^{r}$ from
the NN with respect to the targets $a_{1}^{r}=\Omega_{\rm{tg}}^{r}$. The
regression lines $y_{1}^{r}=\alpha a_{1}^{r}+\beta$ comprise (b)
$\alpha=0.9946$, $\beta=0.0032$, (c) $\alpha=0.9932$, $\beta=0.0040$, (d)
$\alpha=0.9925$, $\beta=0.0041$, while the correlation coefficients $\rm{R}$
between the outputs and the targets are all larger than $0.999$. All inputs
$\textbf{X}^{r}$, outputs $\textbf{Y}^{r}=\\{y_{1}^{r}\\}$, and targets
$\textbf{A}^{r}=\\{a^{r}_{1}\\}$ are rescaled into the range $[0,1]$.

The average accuracy in the estimation of the different $\Omega_{\rm{tg}}$ is
defined as $\bar{F}=\frac{1}{N}\sum_{j=1}^{N}F_{j}$, with
$F_{j}=1-|y_{1}^{j}-a_{1}^{j}|/a_{1}^{j}$, and $a_{1}=\Omega_{\rm{tg}}$. With
the values in Table 1 we find the results $\bar{F}=98.76\%$ for $N_{m}=100$
with a standard deviation ($\rm{SD}$) of the $F_{j}$ set ${\rm SD}=0.7762\%$.
In the case of $N_{m}=30$, we find $\bar{F}=98.31\%$ with ${\rm SD}=1.1483\%$.
We remark that these highly accurate estimations were obtained with examples
that comprise values of $\Omega_{\rm{tg}}$ leading to sensor responses that
depart from the harmonic case. In particular, in Fig. 2 (c,d,e) we show the
cases for $\Omega_{\rm{tg}}=(2\uppi)\times 1.1487$ kHz (c) and
$\Omega_{\rm{tg}}=(2\uppi)\times 8.9493$ kHz (d,e), leading to harmonic and
non-harmonic responses respectively (both cases comprise $N_{m}=30$). On the
one hand, in Fig. 2 (c) we show that the sensor response (diamonds) follows
the harmonic function $P_{D}(t)=\cos^{2}(\uppi t/t_{\rm{R}})$ (blue-solid
line). On the other hand, in Fig. 2 (d) one can observe that the response
(diamonds) deviates from the harmonic case, while Fig. 2 (e) shows that the
same response fits to a non-harmonic function (red-solid curve) obtained via
numerical simulations of the Hamiltonian (see Supplementary Note 1). By
introducing these two responses into our NN, we get the outputs
$y_{1}=(2\uppi)\times 1.1731$ kHz and $y_{1}=(2\uppi)\times 8.7825$ kHz which
result in large accuracies $F=|y_{1}-a_{1}|/a_{1}=97.84\%,98.14\%$,
respectively. In the Supplementary Information, we show further examples
including both Rabi frequency $\Omega_{\rm{tg}}$ and potential detunings $\xi$
between the target frequency and the sensor hyperfine transition.

### Scenario ii: Continuous data acquisition

Now we consider a scenario that comprises single-shot measurements on the ion
(i.e. $N_{m}=1$). This scheme is relevant in situations where no
reinitialization of the RF field is possible. We demonstrate that estimation
of RF parameters is still feasible in these conditions.

We get one binary value from the atomic sensor (0 or 1) after completing the
three experimental stages illustrated in Fig. 3 (a). More specifically, at
stage $1$ we cool the ion and prepare the $|D\rangle$ state in a time
$t_{1}=6.097$ ms. At stage $2$ the ion is allowed to interact with the target
field for a time $t_{2}\in[0,6]$ ms. At stage $3$ we readout the ion in a time
$t_{3}=2.447$ ms. We repeat these three stages $251$ times (leading to a
binary string comprising 251 numbers) where $t_{2}$ varies in the interval
$[0,6]$ ms with a step $0.024$ ms. Note that during the three stages the RF
source is always on, thus to avoid potential damage on initialization and
readout we switch the RF signal to a dummy load at stages 1 and 3.

Via numerical simulations we train a NN in accordance to the scheme in Fig. 3
(a). In particular, we use $96$ values for $\Omega_{\rm{tg}}$ in the range
$(2\uppi)\times[0.5,10]$ kHz (with a step of $(2\uppi)\times 0.1$ kHz) and
repeat the data acquisition process $1800$ times for each $\Omega_{\rm{tg}}$.
Thus we generate $96\times 1800=172800$ examples of which $70\%$/$15\%$/$15\%$
are used to build the training/validation/test datasets. After training the
NN, we find the regression accuracy of the training/validation/test datasets
shown in Fig. 3 (b-d). Note that data in Fig. 3 (b-d) is rescaled into $[0,1]$
as this is a standardized procedure in NNs.

Now, we experimentally obtain the sensor responses for 8 randomly chosen
values of $\Omega_{\rm{tg}}$ in the range $(2\uppi)\times[0.5,10]$ kHz which
do not belong to the training/validation/test datasets (in addition, we select
other RF parameters as $\phi_{\rm{tg}}=0$ and $\omega_{\rm{tg}}=(2\uppi)\times
10.03$ MHz). We remark that the obtained responses range from the harmonic
shape to those deviating from it. After 251 measurements for each
$\Omega_{\rm{tg}}$, we get binary strings including 251 numbers (0 or 1) where
each number is obtained according to the scheme in Fig. 3 (a). When inputting
each string into the trained NN, we get one output $y_{1}$ from the NN. In
order to study the stability of the NN prediction, we have repeated 20 times
the data acquisition for each $\Omega_{\rm{tg}}$. In Table. 2 we show the
average value $\bar{y}_{1}$ of the results from the NN and the standard
deviation (SD) based on $20$ experimentally obtained strings.

Table 2: Estimation results from the NN in Scenario ii

Targets $a_{1}$($\times 2\pi$ kHz) |  Average values $\bar{y}_{1}$ ($\times 2\pi$ kHz) |  Standard deviation SD ($\times 2\pi$ kHz)
---|---|---
0.7542 | 0.8417 | 0.0690
1.1840 | 1.2759 | 0.0833
1.4044 | 1.4384 | 0.0222
1.6206 | 1.6542 | 0.0660
2.1572 | 2.1720 | 0.0543
4.2265 | 4.2761 | 0.0594
6.3960 | 6.2988 | 0.0776
8.3689 | 8.2255 | 0.1531

Average value of the estimation $\bar{y}_{1}$ provided by the NN and its
corresponding standard deviation based on 20 experimental acquisitions.

In addition, the regression of the outputs $\bar{y}_{1}$ with respect to the
targets is in Fig. 4 (a). Finally, in Fig. 4 (b) we illustrate for
$a_{1}=(2\uppi)\times 2.1572$ kHz the histogram of the NN outputs $y_{1}$
obtained after feeding the NN with $20$ strings of experimental data. The
above analysis illustrates the ability of NNs to achieve accurate estimations
in scenarios involving single-shot measurements (thus, when the RF field is
not controllable) leading to highly versatile quantum sensors.

Figure 4:  Acccuracy analysis for continuous data aqcuisition. (a) Regression
of $\bar{y}_{1}$ obtained from the NN with respect to each target. In
addition, the fit line (blue) and the correlation coefficient $\rm{R}$ are
shown. (b) Histogram of 20 outputs $y_{1}$ from the NN for the case
$a_{1}=(2\uppi)\times 2.1572$kHz denoted with a vertical red line.

## Discussion

One can resort to other estimators for predicting parameters, e.g., using
Bayesian inference. Following the well-known Bayes theorem, one may compute
the posterior distribution $p(\Theta|\textbf{X})\propto
p(\textbf{X}|\Theta)p(\Theta)$ where $p(\Theta)$, $p(\textbf{X}|\Theta)$
denote the prior and likelihood respectively, while X refers to the data
obtained by interrogating the quantum sensor at different time instances, and
$\Theta=\\{\theta_{1},...,\theta_{k}\\}$ denotes $k$ unknown parameters which
we aim to estimate by our quantum sensor. For a Bayesian estimator, an
accurate microscopic model is needed in order to calculate the likelihood
$p(\textbf{X}|\Theta)$. More specifically, this is

$\displaystyle
p(\textbf{X}|\Theta)=\Pi_{i=1}^{N_{p}}f(X_{i},N_{m},\tilde{P}_{i}(t_{i};\Theta))$
with $\displaystyle f(x,n,p)=\frac{n!}{x!(n-x)!p^{x}(1-p)^{(n-x)}},$ (2)

where the function $f(x,n,p)$ refers to the probability of observing $x$
success outcomes through $n$ trials from the Binomial distribution with
success probability $p$. $\tilde{P}_{i}(t_{i};\Theta)$ is the survival
probability $P_{D}$ computed using the total Hamiltonian $H$ (see
Supplementary Note 1: Eq. (3)) at time $t_{i}$ whose obtention requires to
load a string of values for the $\Theta$ parameters in the microscopic model
and then compute its dynamical evolution. Note this is a procedure that has to
be repeated for each value of the $\Theta$ parameters. Finally, via the
marginal distribution $p(\theta_{j}|\textbf{X})=\int\Pi_{i\neq
j}d\theta_{i}p(\Theta|\textbf{X})$, one could derive the average value and
standard deviation as

$\displaystyle\theta_{j}^{\textrm{est}}=\int
d\theta_{j}\theta_{j}p(\theta_{j}|\textbf{X}),$
$\displaystyle(\delta\theta_{j}^{\textrm{est}})^{2}=\int
d\theta_{j}(\theta_{j}-\theta_{j}^{\textrm{est}})^{2}p(\theta_{j}|\textbf{X}).$
(3)

In contrast, less prior knowledge of the microscopic model is needed when
using NNs. This owes to NNs learn the input-output relation from the
training/validation/test datasets that can be obtained from numerical
simulations, or directly from experiments. The latter is especially useful
when numerical simulation of the system dynamics becomes challenging (for
instance, in a sensor that consists on several entangled ions).

In this manner, our work demonstrates the good performance in parameter
estimation that results from an appropriate hybridization of machine learning
tools with quantum sensing techniques. This is a strategy that can be easily
extended to other quantum platforms such as, e.g., nitrogen vacancy (NV)
centers in diamond, to decipher complex NV responses emerging from dense
nuclear samples comprising nuclear spins which are strongly coupled to the
sensor and/or among them.

## Methods

### Neural-Network-based magnetometer

A NN enables to find the relation between $N_{p}$ measured data
$\textbf{X}=\\{x_{1},x_{2},...,x_{N_{p}}\\}$, and $n$ output data
$\textbf{Y}=\\{y_{1},y_{2},...y_{n}\\}$ that approach the targets
$\textbf{A}=\\{a_{1},a_{2},...,a_{n}\\}$. During the training stage of the NN,
the following cost function

$C=\frac{1}{nN}\sum_{j=1}^{N}\sum_{i=1}^{n}(y_{i}^{j}-a_{i}^{j})^{2}$ (4)

is minimized for a training set that comprises $N$ examples. This is done by
using gradient descent methods such that the NN parameters (i.e., weights and
biases) are adjusted to satisfy $F(\textbf{X})=\textbf{Y}\approx\textbf{A}$.

In our case, we deal with an 171Yb+-magnetometer where we aim to estimate RF
parameters from experimentally collected responses by inputting them into the
NN. The input data contains, in Scenario i, average values obtained from a
reduced number of measurements and, in Scenario ii, a sequence containing
binary values continuously acquired from single-shot measurements. For the
first case, the input data string $\textbf{X}=\\{P_{1},P_{2},...,P_{N_{p}}\\}$
consist on the average values $P_{i}$ ($i\in[1,N_{p}]$) collected in a time
interval $[0,t_{f}]$ for a specific set of targets A. The simulated average
value is $P_{i}=\sum_{n=1}^{N_{m}}z_{n}^{i}/N_{m}$ for a number of shots
$N_{m}$, where the binary outcome is drawn from a Bernoulli distribution
$z_{n}^{i}\sim B(1,P_{D}(t_{i}))\in\\{0,1\\}$. In the second scenario that
comprises continuous data acquisition, the input data string X is made of
binary numbers, $0$ and $1$, which are obtained according to the scheme in
Fig. 3 (a). Repeating this procedure $N$ times, we achieve the whole dataset
that comprises $N$ examples. In both cases, the examples with the data strings
X, Y, and A are computed by selecting a number of values of the targets in,
and beyond, the regime leading to harmonic sensor responses. Among all the
examples of the total datasets, $70\%/15\%/15\%$ lead to the
training/validation/test sets. A number of repetitions for each data
acquisition is repeated such that the NN learns the statistical fluctuations
resulted from a reduced number of measurements,

### Experimental timing sequence

Figure 5: The sequence diagram of the experiment. The whole cycle could be
divided into three stages. Stage 1 consists of cooling, initialization and
preparation of the state $|1\rangle$ (the first blue zone) and the state
$|D\rangle$ (the first green zone). At Stage 2 (the pink zone of legth
$t_{D}$) we allow the ion interact with the target field at the interval
$[0,t_{2}]$ (the yellow zone), where $t_{2}\leq t_{D}$. In stage 3, we
transfer the state $|D\rangle$ back to $|0\rangle$ and detect the probability
of $|0\rangle$.

As shown in Fig. 5, in each cycle (each period to obtain one value $P_{i}$
($i\in[1,N_{P}]$) of a response / input data string), the ion is cooled down
approximately in the Doppler limit by a red-detuning 369.5 nm laser starting
from stage 1. After that, the state of the ion is initialized to $|0\rangle$
by an optical pumping process. After a 0.5 $\rm{\mu s}$ ’MW trigger’ signal, a
microwave $\uppi$-pulse resonant with $|0\rangle\leftrightarrow|1\rangle$
transfers the state from $|0\rangle$ to $|1\rangle$. Subsequently, the STIRAP
pulses drive the system from the state $|1\rangle$ to the dark state
$|D\rangle$. At stage 2, the amplitudes of MW fields are held at a constant
$\Omega$ within the fixed time interval $[0,t_{D}]$. Simultaneously, the
target RF field is applied for the time interval $[0,t_{2}]$, where $t_{2}\leq
t_{D}$. For the scheme of a finite number of measurement (Scenario i), after
the time instant $t_{2}$ the RF field is removed by turning off the AWG2
output. The RF target field is restarted at the next cycle such that the
repetition of measurement can be done. For the scheme of single-shot
measurement, Scenario ii, the RF signal is switched to a dummy load after the
time instant $t_{2}$ while the origin RF source is always on. At stage 3, the
STIRAP pulses transfer the rest of population of $|D\rangle$ back to
$|1\rangle$. Another $\uppi$-pulse transfers the population of state
$|1\rangle$ to $|0\rangle$. Thus, we can get the response of $|D\rangle$ by
measuring the probability of $|0\rangle$, and a state dependent fluorescence
detection could be used to determine it. Before and after the cycle, there are
extra ’idle’ steps (1 $\rm{\mu s}$) needed to end this cycle and start the
next cycle. In our experiments, the timings are all controlled by a TTL pulse
generator (Spincore PB24-100-4k-PCIe) see TABLE 3 for the specific values of
the time intervals invested on each process.

Table 3:  Experimental timings for two scenarios (’Idle’ and ’MW trigger’ are not shown) |  Scenario i |  Scenario ii
---|---|---
Cooling | 2 ms | 4 ms
Pumping | 50 $\rm{\mu s}$ | 50 $\rm{\mu s}$
$\pi$ \- pulse |  $\sim$45.45 $\rm{\mu s}$ |  $\sim$45.45 $\rm{\mu s}$
$|1\rangle\rightarrow|D\rangle$ | 2 ms | 2 ms
Sensing window | 2.828 ms | 6 ms
$|D\rangle\rightarrow|1\rangle$ | 2 ms | 2 ms
$\pi$ \- pulse |  $\sim$45.45 $\rm{\mu s}$ |  $\sim$45.45 $\rm{\mu s}$
Detecting | 400 $\rm{\mu s}$ | 400 $\rm{\mu s}$

## Data availability

The authors declare that the data supporting the findings of this study are
available within the article and its Supplementary Information Files. Extra
data are available from the corresponding author upon request.

## References

  * (1) Degen, C. L., Reinhard, F., & Cappellaro, P., Quantum sensing, Rev. Mod. Phys. 89, 035002 (2017).
  * (2) Giovannetti, V., Lloyd, S., & Maccone, L., Quantum metrology, Phys. Rev. Lett. 96, 010401 (2006).
  * (3) Brida, G., Genovese, M., & Berchera, I. R., Experimental realization of sub-shot-noise quantum imaging, Nat. Photonics. 4, 227-230 (2010).
  * (4) Plewes, D. B. & Kucharczyk, W., Physics of MRI: a primer, J. Magn. Reson. Imaging 35, 1038-1054 (2012).
  * (5) Kira, M., Koch, S. W., Smith, R. P., Hunter, A. E., & Cundiff, S. T., Quantum spectroscopy with Schrödinger-cat states. Nat. Phys. 7, 799-804 (2011).
  * (6) Müller, C., et al., Nuclear magnetic resonance spectroscopy with single spin sensitivity, Nat. Commun. 5, 4703 (2014).
  * (7) Schmitt, S., et al.,Submillihertz magnetic spectroscopy performed with a nanoscale quantum sensor, Science 356, 832-837 (2017).
  * (8) Timoney, N., et al.,Quantum gates and memory using microwave-dressed states, Nature 476, 185-188 (2011).
  * (9) Baumgart, I., Cai, J.-M., Retzker, A., Plenio, M. B., & Wunderlich, C., Ultrasensitive Magnetometer using a Single Atom, Phys. Rev. Lett. 116, 240801 (2016).
  * (10) Weidt, S., et al.,Trapped-Ion Quantum Logic with Global Radiation Fields, Phys. Rev. Lett. 117, 220501 (2016).
  * (11) Olmschenk, S., et al., Manipulation and detection of a trapped Yb+ hyperfine qubit, Phys. Rev. A 76, 052314 (2007).
  * (12) Puebla, R., et al., Versatile Atomic Magnetometry Assisted by Bayesian Inference, Phys. Rev. Applied 16, 024044 (2021).
  * (13) Ruster, T., et al., Entanglement-Based DC Magnetometry with Separated Ions, Phys. Rev. X 7, 031050 (2017).
  * (14) Khodjasteh, K. & Lidar, D. A., Fault-tolerant quantum dynamical decoupling, Phys. Rev. Lett. 95, 180501 (2005).
  * (15) Lang, J. E., Liu R. B., & Monteiro, T. S., Dynamical-decoupling-based quantum sensing: floquet spectroscopy, Phys. Rev. X 5, 041016 (2015).
  * (16) Munuera-Javaloy, C., Puebla, R., & Casanova, J., Dynamical decoupling methods in nanoscale NMR, EPL 134, 30001 (2021).
  * (17) Lumino, A., et al., Experimental Phase Estimation Enhanced by Machine Learning, Phys. Rev. Applied 10, 044033 (2018).
  * (18) Xiao, T., Huang, J., Fan, J., & Zeng, G., Continuous-variable Quantum Phase Estimation based on Machine Learning, Sci. Rep. 9, 12410 (2019).
  * (19) Palittapongarnpim, P. & Sanders, B., Robustness of quantum enhanced adaptive phase estimation, Phys. Rev. A 100, 012106 (2019).
  * (20) Xu, H., et al.,Generalizable control for quantum parameter estimation through reinforcement learning, npj Quntuam Inf. 5, 82 (2019).
  * (21) Peng, Y. & Fan, H., Feedback ansatz for adaptive feedback quantum metrology training with machine learning, Phys. Rev. A 101, 022107 (2020).
  * (22) Schuff, J., Fiderer, L. J., & Braun, D., Improving the dynamics of quantum sensors with reinforcement learning, New J. Phys. 22, 03500 (2020).
  * (23) Fiderer, L. J., Schuff, J., & Braun, D., Neural-Network Heuristics for Adaptive Bayesian Quantum Estimation, PRX Quantum 2, 020303 (2021).
  * (24) Xiao, T., Fan, J., & Zeng, G., Parameter estimation in quantum sensing based on deep reinforcement learning, npj Quantum Inf. 8, 2 (2022).
  * (25) Cimini, V., et al.,Calibration of Quantum Sensors by Neural Networks, Phys. Rev. Lett. 123, 230502 (2019).
  * (26) Nolan, S., Smerzi, A., & Pezzé, L., A machine learning approach to Bayesian parameter estimation, npj Quantum Inf. 7, 169 (2021).
  * (27) Ban, Y., Echanobe, J., Ding, Y., Puebla, R., & Casanova, J., Quantum Sci. Technol. 6, 045012 (2021).
  * (28) Ai, M.-Z., et al.,Experimentally Realizing Efficient Quantum Control with Reinforcement Learning, Sci. China: Phys. Mech. Astron. 65, 1-8 (2022).
  * (29) He, R., et al.,Riemann zeros from Floquet engineering a trapped-ion qubit, npj Quantum Inf. 7, 109 (2021).
  * (30) The correlation coefficient is taken directly from MATLAB. See MathWorks support file, https://www.mathworks.com/help/matlab/ref/corrcoef.
html.

## acknowledgments

This work was supported by the National Key Research and Development Program
of China (No. 2017YFA0304100), National Natural Science Foundation of China
(Nos. 11774335, 11734015), the Key Research Program of Frontier Sciences, CAS
(No. QYZDY-SSWSLH003), Innovation Program for Quantum Science and Technology
(Nos. 2021ZD0301604, 2021ZD0301200). Y.C. acknowledges to the support of
Students’ Innovation and Entrepreneurship Foundation of USTC. This work was
partially carried out at the USTC Center for Micro and Nanoscale Research and
Fabrication. Y.B. acknowledges to the EU FET Open Grant Quromorphic (828826),
the QUANTEK project (ELKARTEK program from the Basque Government, expedient
no. KK-2021/00070), the project “BRTA QUANTUM: Hacia una especialización
armonizada en tecnologías cuánticas en BRTA” (expedient no. KK-2022/00041). J.
C. acknowledges the Ramón y Cajal (RYC2018-025197-I) research fellowship, the
financial support from Spanish Government via EUR2020-112117 and Nanoscale NMR
and complex systems (PID2021-126694NB-C21) projects, the EU FET Open Grant
Quromorphic (828826), the ELKARTEK project Dispositivos en Tecnologías
Cuánticas (KK-2022/00062), and the Basque Government grant IT1470-22.

## Competing interests

The authors declare no competing interests.

## Author contributions

Y.C and Y. B. are the co-first authors. Y.C., R.H, Y.-F. H. performed the
experimental measurements. Y.B. and J.C. developed the theoretical model and
analyzed the data. All authors drafted the work, wrote the manuscript and
approved the completed version.

Supplemental Information for
A Neural Network Assisted 171Yb+ Quantum Magnetometer

##  A  Supplementary Note 1: Hamiltonian

For an 171Yb+ ion in an external static magnetic field $B_{z}$, external
drivings $B_{x}^{j}\cos{(\omega_{j}t+\phi_{j})}$ can be applied, leading to
the Hamiltonian

$H=A\ {\bf J}\cdot{\bf
I}+\gamma_{e}B_{z}J_{z}-\gamma_{n}B_{z}I_{z}+\sum_{j}(\gamma_{e}B_{x}^{j}J_{x}-\gamma_{n}B_{x}^{j}I_{x})\cos{(\omega_{j}t+\phi_{j})},$
(A.1)

where $A\approx(2\uppi)\times 12.643$ GHz, the electronic/nuclear gyromagnetic
ratios are $\gamma_{e}=(2\uppi)\times 2.8024$ MHz/G and
$\gamma_{n}\equiv\gamma_{{}^{171}\rm Yb^{+}}=(2\uppi)\times 4.7248$ kHz/G.
${\bf J}$ and ${\bf I}$ are electron and nuclear spin-1/2 operators that can
be written in a basis $\\{|11\rangle,|10\rangle,|01\rangle,|00\rangle\\}$ such
that $J_{z}|0\ m\rangle=-\frac{1}{2}|0\ m\rangle$, $J_{z}|1\
m\rangle=\frac{1}{2}|0\ m\rangle$ and $I_{z}|m\ 0\rangle=-\frac{1}{2}|m\
0\rangle$, $I_{z}|m\ 1\rangle=\frac{1}{2}|m\ 1\rangle$ for $m=0,1$. In the
basis $\left\\{|1\rangle,|\acute{0}\rangle,|-1\rangle,|0\rangle\right\\}$
obtained after diagonalizing $A\ {\bf J}\cdot{\bf
I}+\gamma_{e}B_{z}J_{z}-\gamma_{n}B_{z}I_{z}$ we have

$\displaystyle H$ $\displaystyle=$ $\displaystyle\omega_{1}|1\rangle\langle
1|+\omega_{\acute{0}}|\acute{0}\rangle\langle\acute{0}|+\omega_{-1}|-1\rangle\langle-1|+\omega_{0}|0\rangle\langle
0|+\sum_{j}\Omega_{j}\bigg{[}|1\rangle\langle\acute{0}|+|1\rangle\langle
0|+|\acute{0}\rangle\langle-1|+|0\rangle\langle-1|+{\rm
H.c.}\bigg{]}\cos{(\omega_{j}t)}$ (A.2)

with $\omega_{1}=\frac{A}{4}+(\gamma_{e}-\gamma_{n})\frac{B_{z}}{2}$,
$\omega_{-1}=\frac{A}{4}-(\gamma_{e}-\gamma_{n})\frac{B_{z}}{2}$,
$\omega_{\acute{0}}\approx\frac{A}{4}+\frac{(\gamma_{e}+\gamma_{n})^{2}}{4A}B_{z}^{2}$,
and
$\omega_{0}\approx-\frac{3A}{4}-\frac{(\gamma_{e}+\gamma_{n})^{2}}{4A}B_{z}^{2}$.

Our scheme includes two MW driving fields ($j=1,2$) resonant with the
$|0\rangle\leftrightarrow|1\rangle$ and $|0\rangle\leftrightarrow|-1\rangle$
hyperfine transitions with phases $\phi_{1}=\phi_{2}=0$ and Rabi frequencies
$\Omega_{1}=\Omega_{2}$ (where
$\Omega=\Omega_{1,2}=B_{x}^{j}\gamma_{e}/2\sqrt{2}=(2\uppi)\times 5.5$kHz)
that cancel magnetic field fluctuations.

Figure S1: MW drivings and population transfer. (a) To generate the dark state
$|D\rangle$, two MW drivings $\Omega_{1}(t)$ (solid blue) and $\Omega_{2}(t)$
(dashed red) are applied on the $|0\rangle\leftrightarrow|1\rangle$ and
$|0\rangle\leftrightarrow|-1\rangle$ transitions. During the time interval
that comprises $2-8$ ms we have $\Omega=\Omega_{1}=\Omega_{2}=2\uppi\times
5.5$kHz. (b) Numerical simulation of population transfer of the states
$|1\rangle$ (solid blue), $|-1\rangle$ (solid red) and $|\acute{0}\rangle$
(dot-dashed black), $|0\rangle$ (dotted purple), where the dark state is
maintained in the interval $[2,8]$ ms. For comparison, experimentally obtained
population of the states $|1\rangle$ (blue diamond) and $|-1\rangle$ (red
diamonds) are shown.

When an RF target field near to the
$|\acute{0}\rangle\leftrightarrow|1\rangle$ transition is included, we get the
the following Hamiltonian in the dressed state basis
$|u\rangle,|d\rangle,|D\rangle,|0\rangle$

$\displaystyle H(t)$ $\displaystyle=$
$\displaystyle\frac{\Omega}{\sqrt{2}}(|u\rangle\langle u|-|d\rangle\langle
d|)+\left[\frac{\Omega}{4}(|u\rangle\langle\acute{0}|+|d\rangle\langle\acute{0}|)-\frac{\Omega_{\rm{tg}}}{2\sqrt{2}}|D\rangle\langle\acute{0}|\right]e^{-i\xi
t}+\rm{H.c.}$ (A.3)
$\displaystyle-\left[\frac{\Omega}{2\sqrt{2}}(|u\rangle\langle
u|-|d\rangle\langle d|)+\frac{\Omega}{4}(|u\rangle\langle D|+|D\rangle\langle
d|)-\frac{\Omega}{4}(|D\rangle\langle u|+|d\rangle\langle
D|)\right]e^{i\gamma_{e}B_{z}t}+\rm{H.c.}$
$\displaystyle+\frac{\Omega_{\rm{tg}}}{2}\left(\frac{1}{2}|u\rangle\langle\acute{0}|+\frac{1}{2}|d\rangle\langle\acute{0}|-\frac{1}{\sqrt{2}}|D\rangle\langle\acute{0}|\right)e^{2i(\frac{\gamma_{e}B_{z}}{2}-\frac{\gamma_{e}^{2}}{4A}B^{2}_{z})t}e^{i\xi
t}+\rm{H.c.}$
$\displaystyle+\frac{\Omega_{\rm{tg}}}{2}\left(\frac{1}{2}|\acute{0}\rangle\langle
u|+\frac{1}{2}|\acute{0}\rangle\langle
d|+\frac{1}{\sqrt{2}}|\acute{0}\rangle\langle
D|\right)e^{i\gamma_{e}B_{z}t}e^{i\xi t}+\rm{H.c.}$
$\displaystyle+\frac{\Omega_{\rm{tg}}}{2}\left(\frac{1}{2}|\acute{0}\rangle\langle
u|+\frac{1}{2}|\acute{0}\rangle\langle
d|+\frac{1}{\sqrt{2}}|\acute{0}\rangle\langle
D|\right)e^{i\frac{\gamma^{2}_{e}}{2A}B^{2}_{z}t}e^{-\xi t}+\rm{H.c.},$

where $\xi=\omega_{\rm{tg}}-(\omega_{1}-\omega_{\acute{0}})$ is a potential
detuning between the target frequency and the sensor hyperfine transition.

##  B  Supplementary Note 2: Pulse design to generate the state $|D\rangle$.

Stimulated Raman adiabatic passage (STIRAP) pulses applied on the
$|0\rangle\leftrightarrow|1\rangle$ and $|0\rangle\leftrightarrow|-1\rangle$
transitions are used to create and detect the dark state
$|D\rangle=(|-1\rangle-|1\rangle)/\sqrt{2}$. In particular, these are designed
in the following shape

$\displaystyle\Omega_{1}(t)$ $\displaystyle=$
$\displaystyle\frac{A}{2}\left[\tanh\left(\frac{t-b_{1}}{c}\right)+1\right]+\frac{A}{2}\left[\tanh\left(\frac{t-b_{2}}{c}\right)+1\right],$
$\displaystyle\Omega_{2}(t)$ $\displaystyle=$
$\displaystyle-\frac{A}{2}\left[\tanh\left(\frac{t-b_{1}}{c}\right)+1\right]$
(B.1)
$\displaystyle-\frac{A}{2}\left[\tanh\left(\frac{t-b_{2}}{c}\right)+1\right]+2A$

We may slightly tune the parameters $b_{1}$, $b_{2}$, $c$ to adjust the time
duration of keeping $\Omega_{1}=\Omega_{2}$. For instance, for a process
lasting $t_{f}=10$ms, with $A=5.5\times 2\uppi$ kHz, $b_{1}=1$ms, $b_{2}=9$ms,
and $c=3\uppi/A$. it takes about $2$ ms to generate the state $|D\rangle$.
This is maintained from $t=2$ ms to $t=8$ ms with
$\Omega=\Omega_{1}=\Omega_{2}=2\uppi\times 5.5$kHz. In Supplementary Figure 1
(a) we show the controls that adiabatically evolve the initial state
$|\Psi(0)\rangle=|1\rangle$. The state population evolution of theoretical and
experimental data is shown in Supplementary Figure 1 (b).

##  C  Supplementary Note 3: Training of the neural network and estimation
results for $\Omega_{\rm{tg}}$ from a finite number of measurement

The data generated from numerical simulations is used to establish the NN.
During the training stage, all the inputs X and the targets A are rescaled
into the range $[0,1]$ before being used in the NN (note the notation
$\textbf{A}^{r}$ and $\textbf{X}^{r}$). Correspondingly, From the outputs
$\textbf{Y}^{r}$ (also in the range $[0,1]$) obtained from the NN, we can get
the results of the estimation Y with the real units. The training result for
estimating $\Omega_{\rm{tg}}$ via standard gradient descent are shown in
Supplementary Figure 2. The fit line of the outputs of the NN of the whole
(including training/validation/test) dataset with respect to the targets is
$y^{r}_{1}=\alpha a_{1}^{r}+\beta$, where $1-\alpha\approx 10^{-5}$ and
$\beta\approx 7.7\cdot 10^{-6}$, as well as the correlation coefficient
$\rm{R}=0.99999$, prove the regression with high fidelity.

Figure S2:  Training results of the NN to estimate $\Omega_{\rm{tg}}$, where
the input data $\textbf{X}=\\{P_{1},P_{2},...,P_{N_{p}}\\}$ is numerically
derived from $96$ different values for $\Omega_{\rm{tg}}/(2\uppi)\in[0.5,10]$
kHz with $100$ repetitions. (a) Cost function values for training (blue) /
validation (green) / test (red) datasets and (b) Gradient of the training set
at each epoch. At the 10th epoch, we show the error histogram in panel (c),
and (d) the comparison between the NN outputs $y_{r}^{1}$ and the targets
$a_{1}^{r}$. The fit in (d) shows the linear relation between the outputs
$y_{1}^{r}$ and the target $a_{1}^{r}=\Omega_{\rm{tg}}$, i.e.
$y^{r}_{1}=\alpha a_{1}^{r}+\beta$ (solid), where $1-\alpha\approx 10^{-5}$
and $\beta\approx 7.7\cdot 10^{-6}$. The fit, the linear (ideal) case
$y_{1}^{r}=a_{1}^{r}$ (dotted) almost coincide. The correlation coefficient is
$\rm{R}=0.99999$.

Figure S3: Estimation results for $\Omega_{\rm{tg}}$ and $\xi$ with a finite
number of measurement. (a-b) Comparison between the rescaled outputs of the NN
$\textbf{Y}=(y_{1}^{r},y_{2}^{r})$ and the targets
$\textbf{A}=(a_{1}^{r},a_{2}^{r})=(\Omega_{\rm{tg}}^{r},\xi^{r})$, with
different range of $\Omega_{\rm{tg}}$, namely: (a)
$\Omega_{\rm{tg}}^{r}\in[0,1]$, (b) $[0.67,1]$, while keeping the same
detuning range $\xi^{r}\in[0,1]$ (i.e. $\xi/(2\uppi)\in[-0.6,0.6]$ kHz). All
the data is renormalized to $[0,1]$ (note the superscript $r$). In both plots,
the fit $y_{1}^{r}=\alpha a_{1}^{r}+\beta$ and $y_{2}^{r}=\alpha
a_{2}^{r}+\beta$ (solid blue) coincide with the ideal dependences
$y_{1}^{r}=a_{1}^{r}$ and $y_{2}^{r}=a_{2}^{r}$ (dashed red) for both
parameters where (a) $\alpha=0.9858$, $\beta=0.007377$, (b) $\alpha=0.9997$,
$\beta=0.0002507$ and the correlation coefficient (a) $\rm{R}=0.99319$, (b)
$\rm{R}=0.99999$. (c-d) Numerical simulation of the responses $P_{D}(t)$ under
$100$ shots. Comparisons of responses when (c) $\Omega_{\rm{tg}}/(2\uppi)=1.5$
kHz (red circle), $\Omega_{\rm{tg}}/(2\uppi)=1.6$ kHz (blue squared) at the
same $\xi=0$, (d) $\xi=0$ (red circle), $\xi/(2\uppi)=0.05$ kHz (blue star) at
the same $\Omega_{\rm{tg}}/(2\uppi)=1.5$ kHz, (e)
$\Omega_{\rm{tg}}/(2\uppi)=7.4$ kHz (red circle),
$\Omega_{\rm{tg}}/(2\uppi)=7.5$ kHz (blue squared) at the same $\xi=0$, (f)
$\xi=0$ (red circle), $\xi/(2\uppi)=0.05$ kHz (blue star) at the same
$\Omega_{\rm{tg}}/(2\uppi)=7.4$ kHz.

##  D  Supplementary Note 4: Estimation results for $\Omega_{\rm{tg}}$ and
$\xi$ with a finite number of measurement

We can also train a NN to recognize two parameters, namely potential detunings
$\xi$ between the target frequency and the sensor hyperfine transition, and
the Rabi frequency of the target field $\Omega_{\rm{tg}}$. In particular, we
inspect two ranges for the parameters $\Omega_{\rm{tg}}$ and $\xi$: Firstly,
we consider $\Omega_{\rm{tg}}/(2\uppi)\in[0.5,10]$ kHz and
$\xi/(2\uppi)\in[-0.6,0.6]$ kHz by extracting $96$ values of
$\Omega_{\rm{tg}}$ with a step $0.1$ kHz and $51$ values of $\xi$ separated by
$0.024$kHz. The input data $\textbf{X}=\\{P_{1},P_{2},...,P_{N_{p}}\\}$ in
each example consists of $N_{p}=201$ values collected in the range
$t\in[0,t_{f}]$, where $t_{f}=2.828$ ms. To enable the NN learning statistical
fluctuation from shot noise, $100$ repetitions are done for each numerical
acquisition. Secondly, we keep the same range of detuning
$\xi/(2\uppi)\in[-0.6,0.6]$ kHz, and set another range for
$\Omega_{\rm{tg}}/(2\uppi)\in[6.9,10]$ kHz. In both cases, $70\%$, $15\%$,
$15\%$ of examples in each dataset mentioned above are randomly extracted to
create the training/validation/test set in order to build the respective NN.
The regression plots of the outputs from the above two NNs and the targets are
illustrated in Supplementary Figure 3 (a-b).

We observe that the regression relation experiences less fluctuations in the
regime in which $\Omega_{\rm{tg}}$ is far away from harmonic shape. In
particular, at small $\Omega_{\rm{tg}}$ shot noise hinders the identification
of the sensor response, as the slight tuning in $\xi$ already mixes the
responses. Meanwhile, the accuracy to estimate $\Omega_{\rm{tg}}$ is always
high. This is proved in the numerical simulation in Supplementary Figure 3
(c-f): when adopting the same $\xi$, the responses obtained numerically under
$100$ times of shots, can be identified in the presence of a small variation
in $\Omega_{{\rm{tg}}}$ both at small values $\Omega_{\rm{tg}}$ (c) and large
ones (d). Provided by the same $\Omega_{{\rm{tg}}}$ and a small variation in
$\xi$, the responses show little difference at a small $\Omega_{{\rm{tg}}}$,
whereas large difference at large $\Omega_{\rm{tg}}$. Here, we choose the
response with large $\Omega_{\rm{tg}}$ from experiments as test examples, when
fixing $\omega_{\rm{tg}}=10.03$ MHz and $N_{m}=50$. Inputing it into the NN
established in the range $\Omega_{\rm{tg}}/(2\uppi)\in[6.9,10]$ kHz and
$\xi/(2\uppi)\in[-0.6,0.6]$ kHz, we can get the results demonstrated in
Supplementary Table 1.

It is possible to separate the responses with different $\xi$ under shot noise
by allowing for a longer evolution time and an increased number of shots.
Consequently, the detection scheme via NNs can be improved. However, high
accuracy comes at the cost of the increased time to generate the datasets.

Table 1: Estimation results for $\Omega_{\rm{tg}}$ and $\xi$ with a finite
number of measurement.

targets |  $a_{1}/(2\uppi)=7.3920$ kHz |  $a_{2}/(2\uppi)=-0.6$ kHz
---|---|---
outputs |  $y_{1}/(2\uppi)=7.5614$ kHz |  $y_{2}/(2\uppi)=-0.5865$ kHz
targets |  $a_{1}/(2\uppi)=7.3920$ kHz |  $a_{2}/(2\uppi)=0$ kHz
outputs |  $y_{1}/(2\uppi)=7.4520$ kHz |  $y_{2}/(2\uppi)=0.019$ kHz
targets |  $a_{1}/(2\uppi)=7.3920$ kHz |  $a_{2}/(2\uppi)=0.6$ kHz
outputs |  $y_{1}/(2\uppi)=7.4575$ kHz |  $y_{2}/(2\uppi)=0.3969$ kHz

Comparison of the outputs $\textbf{Y}=\\{y_{1},y_{2}\\}$ from the NN
established for the range $\Omega_{\rm{tg}}/(2\uppi)\in[6.9,10]$ kHz and
$\xi/(2\uppi)\in[-0.6,0.6]$ kHz with the targets
$\textbf{A}=\\{a_{1},a_{2}\\}$, while the input data are experimentally
obtained response where $a_{1}=\Omega_{\rm{tg}}$ and $a_{2}=\xi$.

##  E  Supplementary Note 5: Precision analysis.

The measurement precision for a parameter $\theta$ encoded in a state
$|\Psi\rangle$ is upper bounded by the quantum Fisher information (QFI) QFI
defined as
$I_{\theta}=4\left[\langle\partial_{\theta}\Psi|\partial_{\theta}\Psi\rangle-|\langle\Psi|\partial_{\theta}\Psi\rangle|^{2}\right].$
Consequently, the variance of the parameter estimator is lower bounded as

$\displaystyle\Delta^{2}_{\theta}\geq\Delta^{2}\theta(t_{0})^{\rm{QFI}}=\frac{1}{N_{T}I_{\theta}(t_{f})}.$
(E.1)

The term at the right hand side of Eq. (E.1) is accesible by computing the
state at the final time $t_{f}$, where $N_{T}=N_{p}\times N_{m}$ with $N_{p}$
the time instants at which the state is interrogated, and $N_{m}$ the number
shots at each time instant. For instance, taking
$\Omega_{\rm{tg}}=(2\uppi)\times 4.2265$ kHz from the scheme of continuous
data acquisition, we get the lower bound for the variance
$\Delta{\Omega_{\rm{tg}}}^{\rm{QFI}}=(2\uppi)\times 0.003294$ kHz. Our NN
gives $20$ results for $y_{1}$ based on $20$ strings of experimental responses
leading to $\bar{y}_{1}=(2\uppi)\times 4.2761$ kHz, with
$\rm{SD}=(2\uppi)\times 0.0594$ kHz, see Table II in the main text. This
proves that the estimation precision via the NN from the experimentally
acquired responses is, as expected, below the limit imposed by QFI.

## References

  * (1) Pang, S. & Jordan, A. N., Optimal adaptive control for quantum metrology with time-dependent Hamiltonians, Nat. Commun. 8, 14695 (2016).