Efficient Quantum State Tracking in Noisy Environments

Quantum state tomography, which aims to find the best description of a quantum state -- the density matrix, is an essential building block in quantum computation and communication. Standard techniques for state tomography are incapable of tracking changing states and often perform poorly in the presence of environmental noise. Although there are different approaches to solve these problems theoretically, experimental demonstrations have so far been sparse. Our approach, matrix-exponentiated gradient tomography, is an online tomography method that allows for state tracking, updates the estimated density matrix dynamically from the very first measurements, is computationally efficient, and converges to a good estimate quickly even with noisy data. The algorithm is controlled via a single parameter, its learning rate, which determines the performance and can be tailored in simulations to the individual experiment. We present an experimental implementation of matrix-exponentiated gradient tomography on a qutrit system encoded in the transverse spatial mode of photons. We investigate the performance of our method on stationary and evolving states, as well as significant environmental noise, and find fidelities of around 95% in all cases.


INTRODUCTION
Characterising quantum systems becomes increasingly important as quantum technologies begin to scale up. Experiments often require verification of the prepared quantum state and detection of errors as the state evolves, e.g., through deliberate evolution or environmental perturbations. Thus, quantum state tomography-finding the density matrix that best describes a quantum system-is a task central to quantum information processing. However, quantum state tomography (QST) is notoriously resource-intensive [1]. Reconstructing the d-by-d density matrix of a d-dimensional quantum system up to a fixed precision requires O(d 2 ) parameters that can only be obtained after measuring at least O(d 3 ) copies of the quantum state [2]. Most common algorithms for QST (e.g. maximum likelihood estimation [3] and least squares regression [4]) require a tomographically complete set of measurements and are done in post-processing, thus precluding real-time control of experiments based on the QST results.
Current experimental realisations of quantum devices often suffer from perturbations that change over time which might happen faster than a complete set of measurements can be performed. It might also be of interest to the experimentalist to observe the evolution of states in an experiment. Both these scenarios require online QST-learning algorithms that continuously update the estimate of the state description [5], and thus enable real-time control and diagnosis of errors. Recent proposals for this include Bayesian approaches [6,7], adaptive measurements [8][9][10][11], and machine learning techniques [11][12][13][14][15]. All these techniques are also closely related to continuous learning [16,17]weak measurements over time to characterise a systems evolution, motivated by feedback control to correct errors-and Hamiltonian identification/learning [18,19]-algorithms to determine Hamiltonian parameters governing the dynamics or unknown structures in the system, motivated by distinguishing and quantification of errors.
Moreover, arbitrary noise from the environment or from imperfect measurements can easily surpass the signal strength in experiments. This degrades our ability to accurately estimate the quantum state, hence the robustness of techniques is crucial. Usual efforts to circumvent this issue experimentally try to improve the signal-to-noise ratio (SNR), which is not always feasible or indeed possible. Some theoretical work exist, e.g., Ref. [20,21] where the noise is formalised into the measurement, or Ref. [22] where an algorithm robust to noisy data is designed. However, none of these consider dynamical states and we are not aware of any experimental demonstrations.
Here, we focus on quantum state tomography using the matrix-exponentiated gradient method (MEG) [13,14]. The reduced computational complexity per iteration of MEG, O(d 3 ) in contrast to maximum likelihood and least squares regression which are both O(d 4 ), makes it a good candidate for online quantum state tomography. The MEG algorithm is also efficient-it does not require a full set of measurements for each state estimate-and robust-simulations show convergence even with very noisy measurements. Additionally, the MEG update rule ensures that the estimated state is physical (i.e., a positive-semi definite density matrix), which is generally not guaranteed in most tomography methods unless the estimate is projected back into the physical space, causing a bias towards low-rank states in the estimator [23].
In this work, we experimentally demonstrate real-time, online quantum state tomography based on MEG using a high-dimensional quantum system encoded in the transverse spatial mode of single photons. We achieve fidelities of up to 95% even in the presence of significant noise due to statistical fluctuations (e.g. very low count rates) and environmental effects (e.g. an ambient light source). To our knowledge, this is the first experimental O(d 3 ) online tomography implementation to date. A similar O(d 3 ) online algorithm has been proposed recently [15], however, an experiment is still lacking.

Overview
Matrix-exponentiated gradient tomography (MEG) [13,14] is an online algorithm that can estimate and track quantum states, adapted from machine learning techniques. The idea is to construct an iterative procedure, in which an estimateρ t of the (mixed or pure) quantum state at the iteration t is updated to a more accurate estimateρ t+1 , given a new measurement performed on the unknown quantum state. The matrix-exponentiated gradient update rule [14] for the estimateρ t+1 is given bŷ where η t is the learning rate, and L t is the loss function, and its gradient is given by The pair (X t , y t ) denotes the measurement record where X t is the measurement operator and y t is the experimentally obtained average value of measuring the state with operator X t . The measurements have to be informationally-complete as a requirement for performing any quantum tomography procedure. Therefore, at each iteration, a measurement operator X t is chosen at random from a complete set of bases, and together with the measurement result y t , the estimate of the stateρ t is updated toρ t+1 . The learning rate η t determines the weight given to the new obtained information at each iteration. For tomography on stationary states, η t can be chosen to decrease continuously with the number of iterations while for online state tracking it needs to be constant or adaptive, depending on former measurement outcomes. Compared to the originally proposed MEG in Ref. [14], we made a few changes and extensions to reflect the conditions in our experiment (more details in the METHODS section). First, we extended MEG to work with general higher-dimensional systems d > 2, beyond qubit systems and local Pauli measurements, by measuring mutually unbiased bases (MUBs) [24]. However, not all MUBs are known for arbitrary dimensions so we introduced a second scheme which uses generalised Pauli operator measurements [25]. These operators form an orthonormal informationally-complete basis set and can be used to expand MEG to arbitrary high dimensions. Second, we modified the update rule in order to make better use of the experimental data. MEG originally drew on the probability of one measured state per iteration to update its estimate. Experimentally, we measure photon counts and need the counts of all d states of a given basis to calculate probabilities. This means that in each iteration we can calculate d probabilities which are now all employed to update the estimate. Third, we also adapted MEG to account for the fact that the prepared states in our experiment are very close to pure states-true for systems that have very high control over their preparation. In each iteration t, we find the eigenvalues and eigenvectors of the estimated density matrixρ t and pick the eigenvector with the largest eigenvalue as our estimated state |φ t (density matrixρ φ ) for benchmarking. We is the fidelity andΩ ψ is the density matrix of the theoretical prepared state |ψ t . Our results show convergence to the unknown state within experimental limitations, most prominently mode-dependent losses, in all investigated situations and even for excessive experimental noise.

State Estimation and Online Tracking
We investigated the qutrit (d = 3) state estimation and online tracking performance of MEG using mutually unbiased bases (MUBs) and generalised Pauli operator measurements, which makes the algorithm applicable to higher dimensions. We also investigated MEG performance in the presence of small and large statistical and environmental noise. In all cases we continuously evolve the prepared state in time following with σ a Hermitian matrix and ω = 1.3 ttot the rate of change dependent on the total amount of iterations t tot . The rate of change was chosen to allow the state to evolve to a minimum fidelity compared to the initial state and then back to its initial state. We studied three possible cases of σ: 0 3,3 which is the 3-dimensional zero matrix, σ z which is the generalised 3-dimensional Pauli Z matrix given by and σ r which is a general random Hermitian matrix. The zero matrix results in the identity evolution leaving the initial state stationary, while the other two matrices simulate a rotation in the Hilbert space of a qutrit. To ensure a fair comparison, the learning rate-a crucial parameter for performance and convergence of the algorithm-is kept constant at η = 5, which shows good performance in all cases albeit not optimal for σ = 0 3,3 . The learning rate can be optimised individually, dependent on investigated scenario and physical system. An initial baseline measurement using MUBs and high signal rates (N ≈ 10 6 photons per measurement) is shown in Fig. 1(a). The high count rate ensures that statistical Poissonian distributed counting noise (∆N = √ N ≈ 10 3 ), background (N back ≈ 50) and dark counts (N dark ≈ 100), are negligible and do not deteriorate the performance. For this case, the algorithm finds density matrices with a median purity above 99.6% in all investigated scenarios, as to be expected for our system where we have a high degree of control over the state preparation. Since the fidelities in the experiments are very high, we plot the infidelity, 1 − f (ρ φ ,Ω ψ ), for clarity. The solid lines in Fig. 1(a) are the median infidelities of 50 randomly chosen states of qutrits (according to Haar measure), with the shaded regions bounded by the upper and lower quartile (50 ± 25)%.
In theory, MEG can estimate any quantum state with arbitrary precision and accuracy given an infinite amount of iterations. However, experimental imperfections such as misalignment and modedependent loss significantly limit the minimum infidelities achievable by QST algorithms (not just MEG). The infidelities for MEG listed in Tab. 1 are similar to those obtained using other quantum state tomography algorithms applied to our system, e.g. root-approach and maximum-likelihood estimators [26] where we set set the rank to 1. We next show the robustness of MEG to noise using MUBs, reducing the count rate per iteration to N ≈ 10 2 . This means that the values for Poissonian, dark, and background noise become comparable and play a significant role in state estimation and tracking. Robustness to noise in the limit of a small number of repeated preparations of the unknown state-here the number of photons-is especially interesting for systems like ions and superconducting qubits, as the preparation is considerably more time consuming compared to our system. Again, we benchmark the performance of MEG by calculating the infidelity in each iteration, see Fig. 1(b). State estimation and online tracking are in excellent agreement with an overall mean infidelity ∼ 5.5%, slightly higher than in the high count rate case, but well within the uncertainty bars. This already shows the robustness of the modified algorithm to noise. Infidelities below 10% are achieved within around 15 iterations, four times more than in the baseline measurement with high count rates (see Tab. 1 for details).
We furthermore studied the performance of MEG under high noise, but using generalised Pauli operator measurements rather than MUBs, shown in Fig. 1(c). As generalised Pauli operators can be mathematically defined using them instead of MUBs is a powerful tool to describe states far beyond the qubit. We observe that state estimation and online tracking are again in excellent agreement and the overall mean infidelity ∼ 5.1% is slightly better than in the MUB case, but overlapping within uncertainty bars. This demonstrates that generalised Pauli measurements is a viable path to extend MEG towards arbitrary high dimensions in realistic experimental settings. The initial convergence towards the unknown state is slower with around 25 iterations necessary to reach an infidelity of 10%. This is to be expected as MUBs span the qutrit state space more efficiently compared to the Pauli operator measurements. Tab. 1 shows details of the performance.
Since a changing state leads to changing probabilities of finding a system in a particular state, we also show that we are able to follow these probabilities. Fig. 2 illustrates one example of these probabilities p i = | i|ψ t | 2 for the logical basis states |i , i = 0, 1, 2, out of the 50 randomly chosen qutrits analysed in Fig. 1. The theoretically expected probabilities in the experiment (dashed lines) are followed nicely by online state tracking of the deterministic evolution in the experiment (solid lines). This confirms that the low infidelities directly correspond to the capability to predict measurement outcomes on the states well. We also highlight that MEG quickly converges to a useful estimate (after 3-4 iterations), even though the initial guess is a completely mixed qutrit (p i = 1/3 ∀ i) to avoid bias in the results. The small offset between theory and experiment could be further decreased by using an adaptive learning rate.

Noisy MEG
We tested the efficacy of MEG under significant environmental noise experimentally-by adding a light bulb close to the detector while keeping the signal rate at N ≈ 10 2 photons per measurement-and in simulations-adding Poissonian distributed noise to the raw data. The strength of the noise in the experiment is controlled via the distance and angle of the light bulb to the single photon detector. As a proof of principle demonstration, we only looked at stationary states using MUBs in our experiment, yet the simulations show similar behaviour for all estimation and online tracking scenarios investigated in the previous section. The median infidelities of 50 randomly chosen states for different methods (solid-experiment, dashed-simulation) and noise strengths (colours) are shown in Fig. 3. Shaded uncertainty ranges similar to Fig. 1 are omitted for clarity. As expected, the achievable infidelity and number of iterations to get there both become higher as the noise increases, however, MEG is showing  We observe that up to N back ≈ 2 kHz of experimental and simulated noise (not shown explicitly in the figure), the infidelities are comparable to the no noise case within uncertainty bars. This corresponds to a signal-to-noise ratio SNR ≈ 0.05, so only one in 20 photons carry the actual information on the unknown quantum state prepared in the experiment. It is noteworthy that even at 0 kHz of artificially introduced noise, the naturally occurring counting noise together with background and dark count rates are almost double the signal count rate, i.e., ∼ 170 compared to ∼ 100 photons per measurement. Experimental and simulated data for N back = [1, 2.5] kHz show good overlap within uncertainty bars, indicating the validity of the noise model in simulation. Therefore we expect to achieve infidelities of around 10% up to SNR ≈ 0.01 (orange dashed line). The seemingly smoother performance of the simulations stems from 20 runs of randomly added shot-to-shot noise for each of the 50 investigated states. In other words, the results from simulations reflect the median infidelity of 50 × 20 = 1000 traces, compared to 50 in the experiment.

DISCUSSION
We have presented an efficient tomography algorithm to track the continuous evolution of quantum states despite significant environmental noise. Our approach, matrix-exponentiated gradient tomography (MEG), uses machine learning techniques to iteratively update an estimate of a quantum state in real time. We have extended the original online tomography proposal [14] to arbitrary highdimensional systems (qudits) and experimentally demonstrated the algorithm with a qutrit encoded in the shape of photons. We have shown that MEG is highly resilient to noise: we are able to estimate the quantum state with high fidelities, and accurately predict probabilities of measurement outcomes for different types of evolution and signal strengths. Our technique will enable applications that benefit from efficient online tomography, e.g., quantum process tomography [27,28] and quantum error mitigation [29]/correction [30].
Our results can be extended to process tomography through the Choi-Jamio lkowski isomorphism [31,32], which allows us to represent a channel using a quantum state that lives in a d 2 -dimensional Hilbert space. In this case, the process estimation becomes state estimation, and MEG could be utilised for the procedure. This provides a more efficient solution compared to standard process tomography which requires computational complexity O(d 8 ) by using a tomographically complete set of states in preparation and measurement, even O(d 10 ) for an over-complete set [33]. The bottleneck of the standard procedure comes from the matrix-vector multiplications required for the estimation procedure. On the other hand, for the MEG update rule, the bottleneck operation is the matrix exponential which is computationally more efficient (see [14] and references within).

Experimental Setup and Measurement
The quantum states are encoded in the transverse spatial mode-the shape-of single photons. We describe these modes in the Laguerre-Gaussian basis {|l i , p i } [34], where each randomly chosen state is given by the superposition |ψ = i c i |l i , p i (with i |c i | 2 = 1). For the investigated qutrits in the experiment we use the three logical basis states {|0 ≡ |−1, 0 , |1 ≡ |0, 2 , |2 ≡ |1, 0 }, keeping the Gouy phase of the same order and therefore preventing the shape from rotating as the photons propagate [35]. The experiment is conducted with highly attenuated CW laser light (Thorlabs, mean photon number |α| 2 = 0.01) together with two spatial light modulators (SLM, Meadowlark Optics) and a single photon detector (Perkin-Elmer, ∼ 100 Hz dark count rate). The first SLM is used to prepare the unknown quantum state |ψ t via a hologram that changes phase and amplitude of the initial state |l = 0, p = 0 from the laser source. A second hologram displayed on the other SLM is then measuring the state |ψ m from one randomly chosen basis set (see MEG Estimation Extensions section for details). Finally, a single-mode fibre and the detector are acting as a local filter with the number of detected photons proportional to the overlap | ψ m |ψ t | 2 between the prepared and measured mode. The schematic, details, and characterisation of the simple but effective prepare-and-measure experiment are described extensively in Ref. [36] and its supplemental material.

Measurement Schemes
We use two measurement schemes to perform our state estimation and online tracking. The first scheme is utilising Mutually Unbiased Bases (MUBs) [24], measurements that are convenient to perform on the photonic system in our experiments. For a d-dimensional quantum system, we have d + 1 basis sets, each set consists of d states. However, complete sets of MUBs are not know for every dimension and so, we also introduced a second scheme using generalised Pauli operators [25]. These operators are given by the set {u jk , v jk , w l } The operators reduce to the Pauli and Gell-Mann matrices for d = 2 and d = 3, respectively. The total number of operators is d 2 − 1, and for each operator, there are d eigenstates that could be measured. The generalised Pauli operators form an orthonormal basis set, and thus are informationally-complete.

Modified update rule
The learning rate is usually chosen to be adaptive to guarantee convergence in the case of noisy measurements as shown in [14]. However, upon exploring the effect of choosing different learning rates, we found that a constant learning rate is sufficient to obtain an estimate with the maximum possible accuracy obtainable given our experimental capabilities. Thus, we fix the learning rate to be η t = η = 5. The measurement schemes we use provide us with more information at each iteration. In the case of MUB measurements, we randomly select a basis at each iteration. In order to calculate the probabilities, we need to projectively measure all states of that basis for normalisation of the measurement counts. The same holds when we use generalised Pauli measurements, we still need to measure all the eigenstates of a given Pauli operator. Therefore, we modify the loss function to include multiple measurement results obtained at a given iteration as follows.
with gradient where X (i) t = |ψ i ψ i | is the projector of the i th state of the MUB (or Pauli operator) basis that was randomly chosen at iteration t out of d + 1 (or d 2 − 1) possible bases, and y (i) t is the measured probability.
Since we are restricting the experiments to pure states in our investigations, we can increase the estimation accuracy using this prior information. The method we use is to project the state into the subspace of its largest eigenvalue, or equivalently, finding the pure state closest to our estimate in fidelity. We illustrate this method with an example: we can write the estimated density matrixρ t of a pure quantum state |φ t in the form where the parameter λ ∈ [0, 1] indicates the noise strength, andρ noise = I d /d is the completely mixed state representing the noise in the estimate, with I d the d dimensional identity matrix. The special cases λ = 0 and λ = 1 correspond to the noiseless and completely noisy states respectively. Now, let |γ t be an eigenstate ofρ t with eigenvalue γ t , i.e.,ρ t |γ t = γ t |γ t . Then, we can write From there, we can see that the maximum eigenvalue is which is obtainable when there is maximum overlap between γ t and φ t , in the best case | γ t |φ t | 2 = 1, i.e., |γ t = |φ t . This shows that the true pure state |φ t is an eigenvector of the density matrixρ t corresponding to the maximum eigenvalue, in other words, closest to our estimator in fidelity. So, after each iteration we calculate the eigenvalues of the state estimate and select the corresponding eigenvector to be the estimate of the pure state |φ t .

DATA AVAILABILITY
All the generated datasets used in this study are publicly available on Figshare at https://figshare. com/projects/Efficient_Tracking_of_Noisy_Quantum_States/130433.

CODE AVAILABILITY
The source code for the proposed theoretical methods is publicly available on github at https:// github.com/akramyoussry/MEG_state_tracking.