---
abstract: 'We experimentally implement a machine-learning method for accurately identifying unknown pure quantum states. The method, called single-shot measurement learning, achieves the theoretical optimal accuracy for $\epsilon = O(N^{-1})$ in state learning and reproduction, where $\epsilon$ and $N$ denote the infidelity and number of state copies, without employing computationally demanding tomographic methods. This merit results from the inclusion of weighted randomness in the learning rule governing the exploration of diverse learning routes. We experimentally verify the advantages of our scheme by using a linear-optics setup to prepare and measure single-photon polarization qubits. The experimental results show highly accurate state learning and reproduction exhibiting infidelity of $O(N^{-0.983})$ down to $10^{-5}$, without estimation of the experimental parameters.'
author:
- Sang Min Lee
- Hee Su Park
- Jinhyoung Lee
- Jaewan Kim
- Jeongho Bang
title: 'Experimental Learning of Pure Quantum States using Sequential Single-Shot Measurement Outcomes'
---

[*Introduction.*]{}—Recently, there has been increasing interest in applying machine learning to quantum information tasks [@Carleo2019]. This is apparent from the increased use of, for example, state identification and tomography methods based on a Bayesian model [@Huszar2012], neural networks [@Torlai2018; @Palmieri2020], and other learning approaches [@Mahler2013; @Ferrie2014; @Qi2017]. These machine-learning-based methods can retrieve critical information on the quantum state through stepwise data processing, even without *a priori* knowledge of the state. Importantly, the optimal accuracy can be achieved with Heisenberg-limited scaling, namely, the infidelity of $O(N^{-1})$ for a finite number $N$ of resources [@Kravtsov2013; @Lee2018]. Experimental implementation of learning-based state identification methods is generally challenging since the achievable accuracy is limited by imperfections in the learning apparatus, say ${\cal L}$. A set of measurement data ${\cal D} = \{ m(\{\alpha\}_{\cal L}) \}$ for experimental parameters $\{\alpha\}_{\cal L}$ are mapped to new parameters $\{\alpha^{\text{new}}\}_{\cal L}$ in each learning step. Algorithms determine the procedure to choose the next $\alpha^{\text{new}}$ during iterations. Under realistic conditions, the measurement datasets are affected by systematic errors [^1] and the resulting decision system shows the effect of accumulated errors. When original unknown states need to be reproduced, for example, in some cryptographic tasks [@Liang2003; @Bogdanov2010], their accuracy is further reduced by imperfections in the reproduction setup components.

We experimentally implement an error-robust and generally applicable learning algorithm, called single-shot measurement learning (SSML), in which decision-making is based on sequential single-shot measurement outcomes [@Lee2018]. The algorithm involves trial operator variations with weighted amounts of randomness. Conceptually, the magnitude of the random variation decreases according to the number of consecutive [*success*]{} events before encountering a [*failure*]{} event, after which the variation of the learning operator is applied to the experimental setup. The SSML estimator is applicable to arbitrary unknown pure states with minimal free parameters, and it can achieve $O(N^{-1})$ accuracy without procedures requiring extensive computational loads. Our algorithm adaptively identifies the unitary operator to inter-convert between a fixed initial state and an unknown state, and can reproduce highly accurate copies of the unknown state despite imperfections in the practical components. The experimental demonstration uses polarization qubits of single photons, ${\left|0\right>}={\left|H\right>}$ (horizontal) and ${\left|1\right>}={\left|V\right>}$ (vertical). The measured infidelities scale as $O(N^{-0.983})$ on average down to the accuracy level of $<10^{-5}$.

[*Method.*]{}—Our algorithm learns a unitary $\hat{U}$ that maps an unknown state ${\left|\psi\right>}$ to a known fiducial state ${\left|\mathbb{0}\right>}$; ${\left|\psi\right>}$ is identified as ${\left|\psi\right>} \simeq {\left|\psi_\text{est}\right>} = \hat{U}^\dagger{\left|\mathbb{0}\right>}$. The basic building blocks of the algorithm are preparation ($\mathbf{P}$), operation ($\mathbf{U}$), measurement ($\mathbf{M}$), and feedback ($\mathbf{F}$). The fiducial state ${\left|\mathbb{0}\right>}$ is freely chosen as the most accurately detectable state. $\mathbf{U}$ and $\mathbf{M}$ constitute the learning apparatus ${\cal L}$, and $\mathbf{P}$ is regarded as a black box that repeatedly generates ${\left|\psi\right>}$ [^2]. $\mathbf{U}$ implements an arbitrary unitary operation $\hat{U}(\{ \alpha \}_\mathbf{U})$, where the experimental parameters $\{ \alpha \}_\mathbf{U}$ are updated in each learning step by using the measured data ${\cal D}=\{ m(\{\alpha\}_{\cal L} )\}$. ${\cal D}$ is the output of $\mathbf{M}$, which comprises “yes-or-no” questions on the desired target’s detection. If $\mathbf{M}$ projects the state onto ${\left|\mathbb{0}\right>}$ in a trial, “success ($s$)” is tagged to the outcome $m$; otherwise, $m$ is labeled “failure ($f$).” The number of consecutive successes $M_S$ directly indicates the current learning status [^3].

![image](fig1setup.pdf){width="85.00000%"}

The learning rule for updating $\{ \alpha \}_\mathbf{U}$, which is the set of all experimental parameters used to control $\mathbf{U}$, are as follows: \[[**F.1**]{}\] if $m=s$, we retain $\{ \alpha \}_\mathbf{U}$ and set $M_S \leftarrow M_S +1$, and \[[**F.2**]{}\] if $m=f$, we change each $\alpha$ to $\alpha^{\text{new}} \leftarrow \alpha + \omega r$, where $r$ is a [*random*]{} number and $\omega = a ( M_S+1 )^{- b}$ is the weight for the random walk; $a$ and $b$ are free parameters chosen to optimize learning performance [^4]. The learning is complete when the halting condition $M_S = M_H$ is reached. From the learned parameters $\{ \alpha_\text{learn} \}_\mathbf{U}$, we identify ${\left|\psi\right>}$ such that ${\left|\psi_\text{est}\right>} = \hat{U}(\{ \alpha_\text{learn} \}_\mathbf{U})^\dagger {\left|\mathbb{0}\right>}$ with a sufficiently small infidelity $\epsilon = 1- {\left|{\left<{\psi_\text{est}}|{\psi}\right>}\right|}^2 \ll 1$. This method is schematically summarized in Fig. \[fig:scheme\_n\_exp\](a). As the preset $M_H$ increases, the number of state copies $N$ increases and the final $\epsilon$ decreases. The resulting trade-off relation between $N$ and $\epsilon$ determines the overall learning efficiency. [*Experiments.*]{}—Figure \[fig:scheme\_n\_exp\](b) shows the experimental setup. We prepare heralded single photons through type-I spontaneous parametric down-conversion (SPDC) in a BBO ($\beta$-BaB$_2$O$_4$) crystal pumped by mode-locked laser pulses (wavelength $390$ nm, repetition $76$ MHz, pulse width $150$ fs, average power $35$ mW). The down-converted photons are filtered by interference filters (half-maximum bandwidth $3$ nm) and coupled into single-mode fibers. The upward-propagating photons are detected by a trigger single-photon detector (SPD), and the downward-propagating photons are initialized by $\mathbf{P}$ and transformed by $\mathbf{U}$ before being measured by $\mathbf{M}$. The data are recorded as coincidence counts (time window $\simeq 2$ ns) of the two photons to minimize the effects of detector dark counts and stray light. An arbitrary polarization qubit ${\left|\psi\right>}$ is prepared (part $\mathbf{P}$) using a Glan-Thompson polarizer (extinction ratio $>10^5$), a half-wave plate (HWP), and a quarter-wave plate (QWP). Another QWP-HWP-QWP set constitutes a unitary operator (part $\mathbf{U}$), and the rotation angles $\{ \alpha_1, \alpha_2, \alpha_3 \}_\mathbf{U}$ of the three wave plates are the learning parameters updated according to \[[**F.1**]{}\] and \[[**F.2**]{}\]. The photons are finally split by a Wollaston prism (extinction ratio $>10^5$) into horizontal- and vertical-polarization modes, which are detected by two low-noise SPDs (Excelitas SPCM-AQRH-16). We define the detection of horizontal (vertical) polarization ${\left|H\right>}$ (${\left|V\right>}$) as success $s$ (failure $f$) (part $\mathbf{M}$). Procedures $\mathbf{U}$ and $\mathbf{M}$ are repeated with $\omega$-weighted random feedback to \[[**F.2**]{}\] until the halting condition is satisfied.

![\[fig:SNR\] (a) Arrival time distribution of output photons relative to the trigger signal (bin size is about $81$ ps, collection time: 10 h, quTAU). Photons are initialized to horizontal polarization and the wave plates in $\mathbf{P}$ and $\mathbf{U}$ are omitted during this measurement. The curves are Gaussian fits to the measured data. The center peak of the $f$ counts shows the (nonideal) extinction ratio of polarizers. (b) Dependence of the SNR of the measurement setup on the coincidence window. The window size (25 bins $\simeq$ 2 ns) sets an SNR of $1.55(24) \times 10^6$.](fig2sandf.pdf){width="48.00000%"}

Experimental imperfections in all the procedures of $\mathbf{P}$, $\mathbf{U}$, $\mathbf{M}$ are suppressed to ensure high accuracy of the experiments. Since our scheme depends on every single detection of photons, false negative signals due to detector dark counts or finite extinction ratios of polarizers critically limit the eventual learning accuracy. $M_S$ exceeding the signal-to-noise ratio (SNR) $\sim 1/q$, where $q$ is the probability to have a false negative (failure) signal, cannot be measured because the noises readily interfere the learning step before $M_S$ successes in a row can be collected. To raise the SNR, we first use polarizers with extinction ratio $> 10^5$ and SPDs with a low dark count rate $\simeq11$ cps. The time window size for coincidence detection of a signal photon and a trigger photon is chosen to compromise between the SNR and the overall detection efficiency. Figure \[fig:SNR\](a) shows the temporal distributions of success ($s$) and failure ($f$) signals with respect to trigger signals. For this measurement all the wave plates for $\mathbf{P}$ and $\mathbf{U}$ are removed not to perturb the initial state ${\left|\mathbb{0}\right>}$ ideally leading to the $s$ detector. The ratio between the $s$ and $f$ counts according to the window size is plotted in Fig. \[fig:SNR\](b). As the SNR decreases in the large window size regime, we set the width as 2 ns that is close to the minimum to enclose the main peak in Fig. \[fig:SNR\](a). This yields an SNR ($s/f$) of $1.54(24) \times 10^{6}$.

To evaluate the infidelity $\epsilon = 1- {\left|{\left<{\psi_\text{est}}|{\psi}\right>}\right|}^2$ experimentally, we compare Stokes vectors of the auxiliary classical lights (sub-mW) whose center wavelength is same as the photons. We set ${\left|\psi\right>}=\hat{V}{\left|\mathbb{0}\right>}$, where ${\left|\mathbb{0}\right>}={\left|H\right>}$ and $\hat{V}$ is given by the pre-aligned HWP and QWP of $\mathbf{P}$. The overlap ${\left<{\psi_\text{est}}|{\psi}\right>}$ after learning runs is ${\left<\mathbb{0}\right|}\hat{U}\hat{V}{\left|\mathbb{0}\right>}$. A polarimeter (Thorlabs PAX1000IR1) measures the Stokes vectors $\vec{S}_{H'}$ and $\vec{S}_H$ of the classical light with and without passing through the wave plates in $\mathbf{U}\mathbf{P}$, respectively. We then obtain $\epsilon = \sin^2{\frac{\phi}{2}}$, where $\phi$ is the angle between $\vec{S}_{H'}$ and $\vec{S}_H$. Notably, $\epsilon$ is evaluated without estimating $\alpha_\text{learn}$ or identifying ${\left|\psi_\text{est}\right>}$. The standard deviation of the direction of Stokes vectors was $2$ mrad in our operation mode (50 Hz, 2048 pts FFT), and each measurement was repeated 100 times. Therefore the accuracy limit of $\epsilon$ owing to our experimental setup is estimated to be about $10^{-8}$ [^5]. Note that this direct comparison method avoid the errors caused by non-ideal retardation or angle offsets of the wave plates, in contrast to the evaluation of the infidelity using the experimentally obtained $\alpha_\text{learn}$.

![image](fig3results.pdf){width="98.00000%"}

The experiments were repeated for $35$ random unknown input states. We set $M_H=6 \times 10^4$ as a halting condition. Whenever $M_S$ after detection of an $f$-signal exceeds the previous maximum of $M_S$, $\epsilon$ is experimentally measured and $N$ is recorded as the total copies consumed until that instant. At the moment $M_S$ passes $M_H$, a decision is made to stop the learning at the current $\mathbf{U}$ when the next $f$ is fired. The maximum $M_S$ observed in our experiment in this way was $451216$. The final halting condition was reached after $6$ to $18$ renewals of $M_S$. Data for $N$ and $\epsilon$ are plotted in Fig. \[fig:EXP\_results\](a) and they fit a curve $\epsilon = C (N+N_0)^{-\gamma}$ on a log-log scale, with $\gamma \simeq 0.983(19)$ (blue solid line), implying that our learning accuracy was $O(N^{-0.983})$ for $N$ unknown state copies. Remarkably, this tendency is maintained under the level of $10^{-5}$. The standard uncertainty (SU) of $\epsilon$ is smaller than the point size (except for the two at the bottom right). The minimum of observed $\epsilon$ was $2.4(4) \times 10^{-7}$. Our experimental precision excels the previous methods as summarized in Table \[tab:comparison\].

=0.1in

[max width=]{}

           Method           $\gamma$     $\epsilon_\text{min}$        Dim
  ------------------------ ----------- -------------------------- ------------
    ABQT [@Kravtsov2013]     0.98(1)     $> 6$$\times$$10^{-5}$        2
    SAQST [@Mahler2013]      0.90(4)     $> 5$$\times$$10^{-5}$        2
    SGQT [@Chapman2016]     NA$^{1)}$   $ 7(2)$$\times$$10^{-3}$       2
      RAQST [@Qi2017]       NA$^{2)}$    $> 3$$\times$$10^{-4}$    2$\times$2
   ABQT [@Struchalin2018]   0.703(16)    $> 2$$\times$$10^{-3}$    9$\times$9
      SSML (This work)      0.983(19)     $< 1 \times 10^{-5}$         2

  : \[tab:comparison\] Comparison with the previous learning-based schemes. ABQT: adaptive Bayesian quantum tomography, SAQST: single adaptive quantum state tomography, SGQT: self-guided quantum tomography, RAQST: recursively adaptive quantum state tomography. $\gamma$ is the scaling factor of the accuracy defined as $\epsilon = O(N^{-\gamma})$. $\epsilon_\text{min}$ is the minimum infidelity achieved in the experiment. Dim denotes the Hilbert-space dimension of the unknown state. $^{1)}$Not calculated. $^{2)}$Multiple slopes.

We next consider state reproduction based on our scheme. Usually, an unknown state is reproduced by sequentially split procedures for identification and reconstruction. However, our SSML method does not require information on the learned state to configure a state preparation unit since $\mathbf{U}$ learns the unitary corresponding to an experimental setup used for transforming a fiducial state ${\left|\mathbb{0}\right>}$ to the unknown state ${\left|\psi\right>}$. Therefore, reproduction is realized directly by applying $\mathbf{U}^{-1}$ to ${\left|\mathbb{0}\right>}$, i.e. sending a photon in ${\left|\mathbb{0}\right>}$ through $\mathbf{U}$ [*backward*]{}, after the learning. The accuracy of reproduction can be estimated from the $M_S$ value. Figure \[fig:EXP\_results\](b) plots the reproduction accuracy $(1+M_S)^{-1}$ on a log-log scale. Figures  \[fig:EXP\_results\](a) and  \[fig:EXP\_results\](b) agree with each other as shown in the inset. Adoption of $(1+M_S)^{-1}$ as the learning accuracy is useful because the infidelity of ${\left|\psi_\text{est}\right>}$ needs not be independently estimated. This benefits extension to higher dimensions or multiple particles where standard quantum state tomography becomes more costly.

We compare the infidelities simply deduced from the wave plate angles comprising $\mathbf{P}$ and $\mathbf{U}$, as shown in Fig. \[fig:EXP\_results\](c). Experimentally, the rotation angles of the wave plates were calibrated using an auxiliary laser light with an accuracy of $0.02^\circ$. The data in Fig. \[fig:EXP\_results\](c) show that it is difficult to maintain $\epsilon = O(N^{-1})$ below $10^{-2}$. Considering the rotational accuracy of the wave plates, we expect that a finite accuracy ($<\lambda/300$) and incidence angle sensitivity of phase retardations in the zero-order Quartz wave plates limit the estimation accuracy of the polarization states in this indirect method.

[*Summary and discussions.*]{}—We have experimentally realized single-shot-based learning of unknown pure states with an unprecedented level of precision. The linear-optics setup has exploited the merits of the proposed scheme over its fullest potential, to our belief. The fidelities of the learned states with various input states were verified by a devised method using auxiliary classical light. Experimentally achieved infidelities decreased as $O(N^{-0.983})$ almost reaching the theoretical accuracy limit, below $10^{-5}$. We have also verified that the learning accuracy calculated by the number of consecutive successes agrees with the independently measured fidelity between the input and output states. These results suggest that adaptive or machine-learning methods operated by shot-by-shot feedbacks can have practical merits for quantum measurement applications at the highest precision regime.

[*Acknowledgments.*]{}—S.M.L. and H.S.P. acknowledge the support of the R&D Convergence program of NST of Republic of Korea (CAP-15-08-KRISS), the KRISS project (GP2020-0010-02, -0013-30) and National Research Foundation of Korea (NRF) grants (No. 2019M3E4A1079894). J.K. was supported in part by KIAS Advanced Research Program (CG014604). J.B. was supported by a KIAS Individual Grant (CG061003). J.L. and J.B. acknowledge the support of NRF grants (2019R1A2C2005504 and NRF-2019M3E4A1079666). J.B. also acknowledge the research project on developing quantum machine learning and quantum algorithm (No. 2019-100) by the ETRI affiliated research institute.

[18]{}ifxundefined \[1\][ ifx[\#1]{} ]{}ifnum \[1\][ \#1firstoftwo secondoftwo ]{}ifx \[1\][ \#1firstoftwo secondoftwo ]{}““\#1””@noop \[0\][secondoftwo]{}sanitize@url \[0\][‘\
12‘\$12 ‘&12‘\#12‘12‘\_12‘%12]{}@startlink\[1\]@endlink\[0\]@bib@innerbibempty @noop [****, ()]{} [****,  ()](\doibase 10.1103/PhysRevA.85.052120) @noop [****,  ()]{} @noop [****, ()]{} [****,  ()](\doibase
  10.1103/PhysRevLett.111.183601) [****,  ()](\doibase 10.1103/PhysRevLett.113.190404) @noop [****,  ()]{} [****,  ()](\doibase 10.1103/PhysRevA.87.062122) [****,  ()](\doibase
  10.1103/PhysRevA.98.052302) @noop [****,  ()]{} @noop [****,  ()]{} [****,  ()](\doibase 10.1103/PhysRevLett.117.040402) [****, ()](\doibase 10.1103/PhysRevA.98.032330)

[^1]: For example, systematic errors can arise due to non-ideal $\pi/2$ or $\pi$-pulse in (quasi-)atomic system. In optical system, non-exact phase retardation of waveplates and finite extinction ratio of polarizers can cause these errors.

[^2]: The only given information about $\mathbf{P}$ is the Hilbert-space dimension $d$ of ${\left|\psi\right>}$. Such an assumption is commonly used by estimation problems.

[^3]: Let us consider the probability $p$ to have $M_S$ consecutive $s$ signals for a learned state ${\left|\psi_\text{est}\right>}$. With the infidelity being $\epsilon = 1 - {\left|{\left<{\psi}|{\psi_\text{est}}\right>}\right|}^2$, the probability $p$ is $\epsilon(1-\epsilon)^{M_S}$, and the expectation value of the number of successes $\overline{M_S}$ is $\sum_{m = 0}^{\infty } m \epsilon (1-\epsilon)^m = \epsilon^{-1}-1$. We thus have $\epsilon = (1+\overline{M_S})^{-1}$, and can estimate $\epsilon$ by counting $M_S$.

[^4]: In the current experiments, we set $a=0.3$, $b=0.5$, and $r \in [-\frac{\pi}{2}, \frac{\pi}{2}]$. The $a$ value was found by trial and error. The $b$ value was chosen by noting that $\epsilon$ is a quadratic function of $\{\alpha\}$ near the optimal solution $\{\alpha_\text{sol}\}$).

[^5]: The $\epsilon$-estimation limit from uncertainty of polarimeter is $\sin^2\frac{u(\phi)}{2} \simeq \frac{s(\phi)^2}{4n} \simeq \frac{(2 \times10^{-3})^2}{4 \times 100}=10^{-8}$, where $u(\phi)$ and $s(\phi)$ denote the standard uncertainty and the standard deviation, respectively. It can be further improved by increasing the number $n$ of samples
