Repetitive Readout Enhanced by Machine Learning
Genyue Liu Mo Chen Yi-Xiang Liu David Layden Paola Cappellaro
quant-ph

UTF8 



These authors contributed equally to this work.

Research Laboratory of Electronics, Massachusetts Institute of Technology, Cambridge, Massachusetts 02139, USA



These authors contributed equally to this work.

Research Laboratory of Electronics, Massachusetts Institute of Technology, Cambridge, Massachusetts 02139, USA


Department of Mechanical Engineering, Massachusetts Institute of Technology, Cambridge, Massachusetts 02139, USA




Research Laboratory of Electronics, Massachusetts Institute of Technology, Cambridge, Massachusetts 02139, USA


Department of Nuclear Science and Engineering, Massachusetts Institute of Technology, Cambridge, Massachusetts 02139, USA




Research Laboratory of Electronics, Massachusetts Institute of Technology, Cambridge, Massachusetts 02139, USA


Department of Nuclear Science and Engineering, Massachusetts Institute of Technology, Cambridge, Massachusetts 02139, USA



pcappell@mit.edu

Research Laboratory of Electronics, Massachusetts Institute of Technology, Cambridge, Massachusetts 02139, USA


Department of Nuclear Science and Engineering, Massachusetts Institute of Technology, Cambridge, Massachusetts 02139, USA




Single-shot readout is a key component for scalable quantum information processing. However, many solid-state qubits with favorable properties lack the single-shot readout capability. One solution is to use the repetitive quantum-non-demolition readout technique, where the qubit is correlated with an ancilla, which is subsequently read out. The readout fidelity is therefore limited by the back-action on the qubit from the measurement. Traditionally, a threshold method is taken, where only the total photon count is used to discriminate qubit state, discarding all the information of the back-action hidden in the time trace of repetitive readout measurement. Here we show by using machine learning (ML), one obtains higher readout fidelity by taking advantage of the time trace data. ML is able to identify when back-action happened, and correctly read out the original state. Since the information is already recorded (but usually discarded), this improvement in fidelity does not consume additional experimental time, and could be directly applied to preparation-by-measurement and quantum metrology applications involving repetitive readout.

Repetitive Readout Enhanced by Machine Learning
    Paola Cappellaro 
    December 30, 2023
===============================================





§ INTRODUCTION





Single-shot readout is a key component for scalable quantum information processing <cit.>, for its close connection to state initialization and fault-tolerant quantum error correction <cit.>. Indeed, it is one of the main deciding factors in the selection of potential qubits. 
Single-shot readout has been achieved in various physical qubit systems, ranging from neutral atoms <cit.>, to trapped ions <cit.>, superconducting qubit <cit.>, and solid-state defect centers <cit.>.  
There are however situations where a candidate qubit has favorable coherence properties, but does not naturally come with single-shot readout capabilities. Examples include Al^+ ions <cit.> 
and room-temperature nitrogen-vacancy (NV) centers in diamond <cit.>, where a closed optical cycle for readout is either lacking, or experimentally challenging. 
A solution to this problem is through repetitive quantum-non-demolition (QND) measurements <cit.>.

In the repetitive QND protocol, a Controlled-NOT (CNOT) gate is applied to correlate the qubit state to an ancilla, which is subsequently read out (Fig. <ref> (a)). If the readout operator commutes with the qubit's intrinsic Hamiltonian, in other words, if the readout is QND, one can repeat the above process multiple times to increase signal-to-noise ratio, until the desired fidelity is reached. 

This protocol is also known as the repetitive readout technique widely adopted in NV research at room-temperature, where the nuclear spin state (here the or a ) is repetitively read out with the help of the NV electronic spin <cit.>.
In its implementations so far, the spin state was determined by comparing the total photon number collected through all the repetitive readouts with a previously established threshold (Fig. <ref> (b)). The detected photon count numbers are thus divided into two classes,  referred to as bright (dark) state of the qubit.

In this threshold method (TM), the readout infidelity can be evaluated from the overlap  between the photon count distributions of bright and dark states. Two factors contribute to this overlap: inefficient optical readout, including photon shot noise and limited photon collection efficiency; and deviation from the QND condition. 
The first factor can be improved by embedding the emitter into photonic structures and by using better single photon detectors. 
The second factor imposes a more fundamental constraint.
Indeed, if the readout operator does not fully commute with the system Hamiltonian, back-action from the measurement will eventually limit the number of photons that can be collected before quantum information is destroyed <cit.>. 

To mitigate this effect, we propose to use the additional information carried by the measurement-induced state perturbation itself. Information about the perturbation is already recorded during typical experiments, in the form of the time trace of photon clicks from the repetitive readouts (Fig. <ref> (c)), but is usually discarded in the TM after extracting the total photon number. Identifying the perturbation and tracing back to the unperturbed original state using this information is the key to improving the fidelity of readout.

Unfortunately, finding an elegant analytical approach proves difficult–the complexity of the photodynamics exhibits intrinsic randomness, and the inefficient photon collection process yields noisy data, precluding clean analytical analysis that would take advantage of the additional information. 
On the other hand, machine learning (ML) is designed to discover hidden data correlations, and it is widely used in classification problems <cit.>. It has been recently introduced in quantum information tasks to mitigate crosstalks in multi-qubit readout <cit.>, to enhance quantum metrology <cit.>, and to identify quantum phases <cit.>.

In this work, we apply ML to  state discrimination  for the repetitive readout of NV center. To design and evaluate the ML method, we use the full information from  time trace data generated by quantum Monte-Carlo simulation. We tried different supervised ML methods and mainly focused on a shallow neural network realized using MATLAB® Neural Net Pattern Recognition tool (npartool).
We observed consistent increase in readout fidelity using ML over TM. The improvement in readout fidelity albeit small is robust over a parameter space that covers individual NV differences. One application of our results is in preparation-by-measurement: when one discards less trustworthy measurements, ML yields a more efficient initialization process than TM.

Since in our method the training labels are readily available in experiments with very high fidelity <cit.>, it can be readily applied to current experiments. Together with the robustness of our method over NV photodynamic parameters, we expect that the improved readout fidelity can be achieved in experiments.





§ REPETITIVE READOUT MODEL AND SIMULATION


We consider reading out the native nuclear spin state through the electronic spin of NV center at room-temperature as an example. 
The NV center's ground state is an electronic spin triplet (S=1), and can be optically polarized to the |m_s=0⟩ state. 
The other two sublevels |m_s=± 1⟩ have additional non-radiative decay channels under optical illumination, allowing optical readout of spin state by fluorescence intensity. 
The native nuclear spin is a nuclear spin-1 (I=1), and couples to the NV center through hyperfine interaction. 
does not have optical readout, but it supports a C_nNOT_e operation (control on nuclear spin and NOT gate on electronic spin): |m_s=0,m_I=+1⟩↔|m_s=+1,m_I=+1⟩, and |m_s, m_I=0,-1⟩↔|m_s, m_I=0,-1⟩, which correlates the to the NV state.

In the repetitive readout protocol, the NV starts in |m_s=0⟩, and a CNOT gate correlates the nuclear spin state to NV. A green laser then reads out the NV state, while also  repolarizing it back to |m_s=0⟩. 
Under high magnetic field, where the NV and energies are well separated, this process is approximately QND and can be repeated a few thousand times to accumulate signal, discriminating the bright |m_I=0,-1⟩ (dark |m_I=+1⟩) state of in a single shot (Fig. <ref>). Still, the high magnetic field cannot fully eliminate back-action of the measurement on , which is caused by the relatively strong excited state transverse hyperfine interaction A_⊥(S_+I_-+S_-I_+). 
This perturbation causes flip-flips between NV and the destroying the quantum information lost. In the TM, this perturbation prevents us from keeping to accumulate useful signal and reduces the fidelity of state discrimination.  ML, instead, as we find out, can identify the majority of such flips and therefore improve the readout fidelity. Ultimately, the readout fidelity is limited by flips that occur very early during repetitive readout.

We used simulated data to explore the effectiveness of ML in repetitive readout and to better analyze the source of improvement.
To fully capture the photodynamics involved in the repetitive readout process, we employed a 33-level model, considering the  electronic and  nuclear spins and the neutrally charged   state. The model is described in more detail in the Appendix. Most transition rates in the model were accurately measured from independent experiments <cit.> and we use values from Gupta et al <cit.>. 
The excited state NV- transverse hyperfine interaction strength and NV^- to  (de)ionization rate at strong laser power were not precisely determined before, and therefore a reasonable range is explored to cover possible variations in individual NVs, based on the results from <cit.>.


In the simulation, we assumed an intermediate magnetic field of 7500 G typical for repetitive readout experiments, and a photon collection efficiency of 30%, standard with photonic structures like solid immersion lens or parabolic mirrors on the diamond <cit.>. A perfect CNOT gate connecting |m_s=0,m_I=+1⟩↔|m_s=+1,m_I=+1⟩ was assumed. Correspondingly, the dark state is |m_I=+1⟩, and bright state is |m_I=0,-1⟩.

We remark that it is possible to use the same protocol to read out rather than  <cit.>, given well-characterized hyperfine interaction strengths <cit.>.





§ NEURAL NETWORK ARCHITECTURE


The network in  is a two-layer feed-forward neuron network (Fig. <ref> (c)). In all trainings, we used a training set of size 10,000 with a random portion of 15% for validation. The input data is the time trace of single photon detector clicks through the repetitive readout process (Fig. <ref> (c)). Because the total photon count is a good metric for state discrimination, we take the cumulative sum of the time trace before feeding it to the neural network.
Out of the 10,000 data, half are dark state |m_I=+1⟩, while the other half are bright with a 1:1 ratio between |m_I=0⟩ and |m_I=-1⟩. After training, we used a test set of size 4,000, which was generated in the same way as the training set but not used in training, to independently test the network. 
This process is typically repeated 10 times and the average accuracy was used throughout this work. Error bars represent the standard deviation of the 10 results.

We found that approximately 12.5 neurons per 1000 repetitions was a good balance between the increase in fidelity and avoidance of overfitting.






§ RESULTS


We first investigate the influence of the repetition number on readout fidelity. The fidelity F across this manuscript is defined as

    F=F_bright+F_dark/2

where F_bright and F_dark are the percentage of bright and dark states that are correctly read out, respectively.

The number of repetition influences the readout fidelity in two ways: 1. A larger repetition number means more photons detected and better separation between photon count distributions of the bright (dark) states (Fig. <ref> (b)).  2. A larger repetition number, however, also implies a longer illumination time and a higher probability of the  nuclear spin to flip, due to the large transverse hyperfine interaction in the excited state, which mixes the photon count distributions of two initially different states. As a result of these competing effects, there is an optimal repetition number N_opt for the TM. 
On the other hand, the readout fidelity from ML keeps improving as we increase the repetition number even if the increase rate slows down (Fig. <ref> (a)). 
At N_opt, we observed a 0.34% increase in fidelity with ML. 
Since the time trace input for ML is recorded in all experiments even when intended for TM, this improved fidelity does not consume additional experimental time. One can add more repetitions in the experiment, and harness a further increase as much as 0.57% in readout fidelity (compared to TM at N_opt). The improvement at N>N_opt suggests that ML is not only more robust against  flips, but rather extracts useful information from the flips. This is investigated in more detail later.

As mentioned earlier,  the excited state transverse hyperfine interaction strength A_⊥ between NV and  , and (de)ionization rate k_ion(k_deion) between NV^- and  under strong illumination have been not yet determined to satisfactory precision. 
We therefore explored a parameter range to cover realistic values one might encounter in experiment: A_⊥={-30,-40,-50} MHz and k_ion={70,90,100}×β MHz, where β is a unit-less value proportional to laser power. In the simulation, we choose β
 such that for any combination of parameters the NV would emit the same total number of photons in the bright state during repetitive readout. 
Comparisons of TM at N_opt, ML at N_opt and ML at N=8000 are shown in Fig. <ref> (b) under different A_⊥, k_ion. The trend matches Fig. <ref> (a). ML consistently outperforms TM with both repetition numbers chosen. 




To better understand how ML achieves higher fidelity, we take a closer look at cases where  experienced flip-flops in the excited state, which is a major limit to the TM fidelity. 
We find the neural network is able to extract information from the time trace input to recognize if a flip has occurred, and recover the original state. Such flips could bring the photon count across the threshold, yielding misclassification when using TM. This is shown in Fig. <ref>, where we plot the cumulative sum of the time traces in cases where flip(s) occurred. 
In Fig. <ref> (a), ML correctly assigns all these time traces to their original states, while TM looks only at the total photon count at the end and compares it to the threshold (dashed line), making ∼ 25% wrong decisions. In Fig. <ref> (b), we show instances when ML gave the wrong classification. 
We notice that in those cases, the  flip-flops  happen at the very beginning, making the time traces indistinguishable from those of the opposite initial state with no flips. There is little hope in correctly reading out these states, posing an ultimate limit to the readout fidelity.






§ APPLICATION TO INITIALIZATION BY READOUT


One scenario where even a modest increase in the fidelity can be beneficial is in state preparation-by-measurement <cit.>. In this is a widely adopted technique, to achieve a higher fidelity of state preparation with the TM, two distinct thresholds are set, N_dark<N_th and N_bright>N_th, where N_th is the readout threshold.
Measurements in between the two thresholds are discarded, as they cannot be assigned to either bright or dark state with enough confidence. This leads to a lengthier state preparation routine. 
In ML, the neural network assigns each input to a probability p_bright (p_dark) of the state being bright (dark). A final step compares p_bright, p_dark and classifies accordingly. 
To achieve a higher fidelity, we discard cases where 0.5-t<p_dark/bright<0.5+t, with an adjustable threshold t. 
We compare the state preparation fidelity from TM and ML, when discarding the same amount of data, and observe that ML maintains its advantage over TM, and scales more favorably than TM with the ratio of discarded measurements (Fig. <ref>). This enables preparing a high fidelity initial state more efficiently. We observed similar improvement from unsupervised learning (see Appendix), agreeing with <cit.>.



§ CONCLUSION AND OUTLOOK


In conclusion, we have shown that ML techniques can exploit the hidden structure in the repetitive readout data of NV center at room-temperature to improve the state measurement fidelity. We used Quantum Monte-Carlo simulation based on a 33-level NV model to generate data for machine learning, and found improved single-shot readout fidelity over the traditional threshold method, that can be attributed to the ML ability to correctly classify a larger number of readout trajectory that are perturbed by the measurement process itself. 

While we used simulations, generally the training process does not depend on knowledge of the model. In fact, the only information required is the label for the state (|m_I=+1⟩ or |m_I=0,-1⟩), which is readily available in experiments by discarding less trustworthy data <cit.>. 
One can then use this data to train a network specific to the NV of interest, and expect an increase in readout fidelity in all subsequent repetitive readout experiments, free of any additional experimental time.
Although individual NVs may have slightly different photodynamic parameters, they should be covered by the range we explored in this work, and therefore the improvement in fidelity is expected to be ubiquitous.

In addition, the off-the-shelf MATLAB® deep learning toolbox we employed greatly reduces the complexities in the neuron network architecture, making this improvement easily reproducible and more accessible to experimentalists.

Though small, the increase in fidelity does not require any additional experimental time, and is readily compatible with experiments using repetitive readout of nuclear spins, including in quantum metrology <cit.> to improve sensitivity.

To further shed light on the  bright/dark decisions that affect the  ML readout fidelity, one could use decision tree learning instead of a neuron network. This could potentially inform optimized readout protocols, with varying illumination times, or help further improve the neuron network architecture.
More broadly, ML could be applied to more complex systems, for example to help mitigate crosstalk of fluorescence signals in a solid-state register consisting of a few nearby NV or other color centers <cit.>.




§ APPENDIX I: NV MODEL AND QUANTUM MONTE-CARLO SIMULATION

We used a 33-level model to fully describe the dynamics of NV- in the repetitive readout process. This model includes the spin-1 triplet ground and excited states, and singlet metastable state for , the spin-1/2 ground and excited states for , and the nuclear spin-1 of , as illustrated in Fig. <ref>. The transition rates directly related to the NV photoluminescence  have been precisely determined and reported in various works <cit.>, although with some significant variations. 
For the simulation we took the values from Gupta et al. <cit.> listed in Table. <ref>. 



The exact (de)ionization mechanisms under 532 nm laser illumination have not been yet determined experimentally, neither have the (de)ionization rate under laser-power comparable to the saturation power (measurement under weak power can be found in  <cit.>). Here we assume the (de)ionization k_ion(k_deion) occurs only in the excited states, and obeys  selection rules as illustrated in Fig. <ref>. To maintain the experimentally determined 70/30 ratio <cit.> between the charge states, we set k_deion=2k_ion. The ionization rate is proportional to the  laser intensity, which is swept around k_ion≈ 90β MHz, in accordance with <cit.>. 


When the magnetic field is applied along the NV-axis, the ground state NV- Hamiltonian has negligible effect on the repetitive readout, thus it is not considered in the numerical simulation. The  excited state Hamiltonian reads:

    H_-=Δ_es S_z^2+Q I_z^2+γ_e B S_z+γ_n B I_z+𝐒·𝐀·𝐈

where 𝐒 and 𝐈 are the electronic and nuclear spin operators, Δ_es=1.42 GHz is the zero-field splitting of the electronic spin, Q=-4.945 MHz the nuclear quadrupole interaction <cit.>, and γ_e=2.802 MHz/G and γ_n=-0.308 kHz/G the electronic and nuclear gyromagnetic ratios. The hyperfine interaction term is diagonal due to symmetry:

    𝐒·𝐀·𝐈=A_∥ S_zI_z+A_⊥(S_xI_x+S_yI_y)

where A_∥=-40 MHz were determined via ODMR experiment <cit.>. A_⊥ was believed to be similar to A_∥ and is recently measured between -40 and -50 MHz <cit.>. 

The  excited state Hamiltonian takes the form:

    H_0=Q I_z^2+γ_e B S_z+γ_n B I_z+𝐒·𝐂·𝐈

with the hyperfine interaction term:

    𝐒·𝐂·𝐈=C_∥ S_zI_z+C_⊥(S_xI_x+S_yI_y)

The hyperfine interaction strengths were considered similar to those in the  excited state <cit.>, and we set C_∥=C_⊥=-40MHz. 



To simulate repetitive readout experiments for both the training and testing data, we used the quantum Monte-Carlo method based on the aforementioned 33-level model. One challenge lies in the various time scales involved in the numerical simulation, from the electronic spin's fast oscillation ω∼ (2π)· 10 GHz, to the optical transition rates k_ij∼ 100 MHz, to the flip-flop rate of  nuclear spin 1/T_1^n ∼ kHz. We mitigate this issue by employing the Born-Oppenheimer approximation <cit.> in our numerical simulation, and average out the fast oscillation at ω as following.

We define δ p_mn as the transition probability from the state |m⟩ to |n⟩ in the time step δ t. 
Starting from |ψ(t=0)⟩=|m⟩, we have

    δ p_mn   =∫^δ t_0 ( ∑^33_i=1|⟨n|i⟩|^2 |⟨i|ψ(t)⟩ |^2 )dt 
        = ∑^33_i=1( k_in∫^δ t_0 |⟨i|ψ(t)⟩|^2 dt )

Notice that |⟨i|ψ(t)⟩|^2 is periodic with period 2 π/ ω, which is much smaller than the time step δ t ∼ 1/k_ij. Thus, we assume only the average effect of this oscillation is seen in each time step, and numerically find ⟨δ p_mn/δ t⟩. This allows us to efficiently perform the quantum Monte-Carlo simulation.



§ APPENDIX II: MACHINE LEARNING DISCUSSIONS



 §.§ Recurrent Neural Network

Recurrent neural network (RNN) is a commonly used architecture specializing in time-series data with the capability to understand the correlation within the time-series. In the main text, we showed results obtained using shallow neural network. In order to see if we gain by exploiting the correlation within the time series we also tested the performance of an advanced recurrent neural network: long short-term memory (LSTM).
 Due to the nature of recurrent neural network, the training process is very time-consuming and therefore not suitable for exploring multiple parameters in our model. To speed up the training process, we averaged the input time trace data over 100 realizations, to greatly reduce the training set dimension. Indeed, this may have caused some loss of information. The result though still consistently outperforms the TM and is comparable to the shallow neural network shown in the main text (see Table. <ref>). One remark is that we did not take the cumulative sum for the input data, because LSTM specializes in time series data and is able to recognize some quasi-periodic patterns.






 §.§ Unsupervised learning

In the main text we compared the enhanced fidelities of TM and supervised learning after discarding less trustworthy data. Another possibility is to use unsupervised learning <cit.>. This method is of interest because unsupervised learning does not require any well-labelled data. We implemented the  algorithm that classifies a given data set into k different groups.

We first use the TM readout  to obtain a bright (dark) group of measurement trajectories. We then perform  on the bright (dark) group to further classify it into k subgroups. 
The fidelity increases when we discard the smallest subgroup. Compared to the TM,  gives better  fidelity as shown in Fig. <ref>, because the unsupervised learning  extracts some information about flips through the hidden structures in time trace data, in agreement with <cit.>.   
Note that unlike TM or supervised learning, we cannot control the ratio of discarded data. Therefore, the fidelity defined by Eq. <ref> is not available, and only the fidelity of dark state is shown. We also remark that in rare cases,  gives outlier results with fidelity much worse than TM. 





 §.§ Robustness of trained network


In addition to the universal improvement from ML over TM with different photodynamic parameters explored in the main text, we here explore the robustness of a network to  a change in parameters. In particular, we use the network R trained by {k_ion=-90 βMHz, A_⊥=-50MHz} data, to classify data generated with different parameters.

First, we test the network R on different (de)ionization rate {k_ion=-100 βMHz, A_⊥=-50MHz}, obtaining a fidelity of 97.93(5)% from the network R, compared to 98.07(5)% from TM. 
We attribute this deteriorated performance of ML to the change in the photodynamics. 
Under the same condition, different k_ion change the relative distributions of bright and dark states.  This change cannot be compensated by laser intensity, and makes the network R obsolete.

We then tested the network R robustness to different transverse hyperfine strengths, A_⊥=-40, -30 MHz. 
Intuitively, a small change in A_⊥ does not change the photoluminescence pattern, but rather modifies the  flip-flop rate a little, which could be captured by the network, given its ability to recognize the occurrence of flip-flops. Indeed, we observed better fidelity from the network R on A_⊥=-40 MHz data than TM, and comparable fidelity to TM on A_⊥=-30 MHz, where the parameter has changed by 40% (Table. <ref>). Here we used N_opt for the test data for both ML and network R. These results indicated that provide variations in the NV parameters are small, it is possible to use a fixed network R to directly read out any NV, without the need to run experiments to generate the traning data.





 
apsrev4-1

