Adaptive quantum state tomography via linear regression estimation: Theory and two-qubit experiment

Adaptive techniques have great potential for wide application in enhancing the precision of quantum parameter estimation. We present an adaptive quantum state tomography protocol for finite dimensional quantum systems and experimentally implement the adaptive tomography protocol on two-qubit systems. In this adaptive quantum state tomography protocol, an adaptive measurement strategy and a recursive linear regression estimation algorithm are performed. Numerical results show that our adaptive quantum state tomography protocol can outperform tomography protocols using mutually unbiased bases and the two-stage mutually unbiased bases adaptive strategy, even with the simplest product measurements. When nonlocal measurements are available, our adaptive quantum state tomography can beat the Gill–Massar bound for a wide range of quantum states with a modest number of copies. We use only the simplest product measurements to implement two-qubit tomography experiments. In the experiments, we use error-compensation techniques to tackle systematic error due to misalignments and imperfection of wave plates, and achieve about a 100-fold reduction of the systematic error. The experimental results demonstrate that the improvement of adaptive quantum state tomography over nonadaptive tomography is significant for states with a high level of purity. Our results also show that this adaptive tomography method is particularly effective for the reconstruction of maximally entangled states, which are important resources in quantum information. Quantum state tomography is an essential task in the development of quantum technology. The key problem is to find a strategy that has a high level of estimation accuracy and is easy to experimentally implement. A group of international scientists from China and Australia presented, and experimentally tested, such a strategy, called recursively adaptive quantum state tomography (RAQST). In RAQST, no prior assumption on the state is made. Numerical results show that RAQST, even with the simplest product measurements, outperforms other proposed protocols wherein nonlocal measurements are involved. With error-compensation techniques, the authors experimentally demonstrated its superiority for two-qubit optical tomography. RAQST is particularly effective when reconstructing states with high purity, which are important resources in quantum information. Their method offers a new basis for designing effective approaches for determining a quantum state and can be widely used in quantum information experiments.


INTRODUCTION
One of the central problems in quantum science and technology is the estimation of an unknown quantum state. 1 Quantum state tomography (QST) as the procedure of experimentally determining an unknown quantum state has become a standard technology for verification and benchmarking of quantum devices. [2][3][4][5][6][7] Two key tasks in QST are data acquisition and data analysis. The aim of data acquisition is to devise appropriate measurement strategies to acquire information for reconstructing the quantum state. Then, in the step of data analysis, the acquired data generates an estimate of the unknown quantum state by use of an estimation algorithm.
In order to enhance the efficiency in data acquisition, it is desired to develop optimal measurement strategies for collecting data. However, an optimal measurement strategy, which is only known for a few special cases, 2,8,9 depends on the unknown state. To circumvent this issue, many kinds of fixed sets of measurement bases have been designed to be optimal either in terms of the average over a certain quantum state space [10][11][12][13][14] or in terms of the worst case in the quantum state space. 6 For instance, improved state estimation can be achieved by taking advantage of mutually unbiased bases (MUB) 10,14 and symmetric informationally complete positive operator-valued measures (SIC-POVM). 15,16 For multi-partite quantum systems, MUB and SIC-POVM are difficult to experimentally realize since they involve nonlocal measurements. There are also other choices of optimal measurement bases in terms of robustness against errors. 17,18 The question of how to efficiently acquire information of an unknown quantum state using simple measurements that are easy to realize experimentally remains open.
For data analysis in tomography, although many methods, such as maximum-likelihood estimation, 4,19,20 Bayesian mean estimation, 21,22 and least-squared inversion, 23 have been used to reconstruct the quantum state, this task can be computationally intensive, and may take even more time than the experiments themselves. It has been reported in ref. 5 that using the maximumlikelihood method to reconstruct eight-qubit took weeks of computation. Therefore, the development of an efficient data analysis algorithm is also a critical issue in QST. 6,24 In ref. 6, a recursive linear regression estimation (LRE) algorithm was presented which is much more computationally efficient in the sense that it can greatly save the cost of computation as compared to the maximum-likelihood method with only a small amount of accuracy sacrificed. This method has even further optimized to fully reconstruct a 14-qubit state within four hours via parallel GPU programming. 25 For a given number of copies of the system, in order to improve the tomography accuracy by better tomographic measurements, a natural idea is to develop an adaptive tomography protocol where the measurement can be adaptively optimized based on data collected so far. Adaptive measurements have shown more powerful capability than nonadaptive measurements in quantum phase estimation, [26][27][28] phase tracking, 29 quantum state discrimination, 30,31 and Hamiltonian estimation. 32,33 Actually, adaptivity has been proposed for QST in various contexts. 2,21,24,[34][35][36][37][38][39] For example, the results on one qubit have demonstrated that adaptive QST can improve the accuracy quadratically considering the infidelity index. 24 However, when generalizing their results to n-qubit systems, the adaptive tomography protocol will involve nonlocal measurements which are hard to realize in experiments. Adaptive QST based on Bayesian estimation 21,38 has been presented and experimental results of factorized adaptive measurements have been demonstrated in two-qubit systems. 40 However, Bayesian algorithm estimation algorithm has usually a much higher computational complexity than LRE for QST.
In this paper, we combine the computational efficiency of the recursive technique of ref. 6 with a new adaptive protocol that does not necessarily require nonlocal measurement to obtain a new protocol: adaptive QST via LRE. In this paper, we call it recursively adaptive quantum state tomography (RAQST) because the parameter estimation is recursively updated 41 and adaptive measurements are used. In our RAQST protocol, no prior assumption is made on the state to be reconstructed. The state estimate is updated based on the current estimate and the new measurement data. Thus, we do not have to combine all the historical information with the new acquired data to update the estimate as the maximum-likelihood method. Thanks to the simple recursive estimation procedure, we can obtain the estimate state in a realtime way, and using the estimate we can adaptively optimize the measurement strategies to be performed in the following step. In our RAQST protocol, the measurement to be performed at each step is optimized upon the corresponding admissible measurement set determined by the experimental conditions.
It is first demonstrated numerically that our RAQST, even with the simplest product measurements, can outperform the tomography protocols using MUBs and the two-stage MUB adaptive strategy. For maximally entangled states (MESs), the infidelity can even be reduced to beat the Gill-Massar (GM) bound which is a type of quantum Cramér-Rao inequality. 2 This is possible because the GM bound assumes an unbiased estimator, whereas our experiments are biased because they are constrained to satisfy the positivity condition, which is particularly relevant in the case of high purity. Moreover, if nonlocal measurements are available, with our RAQST the infidelity can be further reduced. For a wide range of quantum states, the infidelity of our RAQST can be reduced to beat the Gill-Massar bound with a modest number of copies. We perform the two-qubit state tomography experiments using only the simplest product measurements, and the experimental results demonstrate that the improvement of our RAQST over nonadaptive tomography is significant for states with a high level of purity. This limit (very high purity) is the one relevant for most forms of quantum information processing.

Adaptive LRE
A LRE method for QST was proposed in ref. 6, and the results have shown that the LRE approach has much lower computational complexity than the maximum-likelihood estimation method for quantum tomography. Here, we further develop this LRE method to present an adaptive QST protocol that can greatly improve the precision of tomography.
We first convert a QST problem into a parameter estimation problem of a linear regression model. Consider a d-dimensional quantum system with Hilbert space H. Let fΩ i g d 2 À1 i¼1 denote a set of Hermitian operators satisfying (i) Tr(Ω i ) = 0 and (ii) Tr(Ω i Ω j ) = δ ij , where δ ij is the Kronecker function. Using this set, the quantum state ρ to be reconstructed can be parameterized as where I is the identity matrix and θ i = Tr(ρΩ i ). Let Θ ¼ ðθ 1 ; Á Á Á ; θ d 2 À1 Þ T , where T denotes the transpose operation.
A quantum measurement can be described by a positive operator-valued measure (POVM) fE i g M i¼1 , which is a set of positive semidefinite matrices that sum to the identity, i.e., E i ≥ 0 and P M i¼1 E i ¼ I. In QST, different sets of POVMs should be appropriately combined to efficiently acquire information of the unknown quantum state. Let M ¼ ∪ j¼1 M ðjÞ denote the admissible measurement set, which is a union of POVMs determined by the experimental conditions. Each POVM is denoted as M ðjÞ ¼ fE . Using the set of fΩ k g d 2 À1 k¼1 , elements of the POVM can be parameterized as : When we perform the POVM M ðjÞ on copies of a system in state ρ, the probability that we observe the result m is given by Assume that the total number of experiments is N, and we perform a measurement described by M ðjÞ ¼ fE To give an estimate with a high level of accuracy, the basic idea of LRE is to find an estimateΘ t such that Here, M ðj k Þ denotes the POVM M ðj k Þ ¼ fE being performed at the k-th step. The notation W A recursive LRE algorithm 6 can be utilized to find the solution of Θ t . For completeness, we present the recursive LRE algorithm in section A of the Supplementary Material. Its basic idea is that one only needs to store the best estimate state so far, and then update it using a bunch of new measurement results with a fixed setting. This is quite different from the maximum-likelihood estimation method since there one has to combine all the historical Adaptive QST via linear regression estimation B Qi et al.
information with the new collected data to update the estimate, which is quite computationally intensive. It has been demonstrated in Fig. 1 of 6 that the LRE tomography algorithm can greatly reduce the total cost of computation with only a small amount of accuracy sacrificed in comparison with the maximum-likelihood estimation method. As demonstrated in Section B of the Supplementary Material, when the number of copies N of the unknown quantum state becomes large, the only relevant measure of the quality of estimation becomes the mean squared error matrix EðΘ t À ΘÞðΘ t À ΘÞ T . The mean squared error matrix depends upon the state ρ (i.e., Θ) to be reconstructed and the chosen POVMs. Thanks to the iterative algorithm, we can obtain the estimate of the state ρ recursively, and then adaptively optimize the POVM measurements that should be performed in order to minimize the mean squared error in the next step. By doing so, the accuracy of the tomography can be greatly improved. The details of how to adaptively choose POVMs are presented in Section C of the Supplementary Material. Using the solutionΘ t in (4) and the relationship in (1), we can obtain a Hermitian matrixμ with Trμ ¼ 1. However,μ may have negative eigenvalues and be nonphysical due to the randomness of measurement results. In this work, the physical estimateρ is chosen to be the closest density matrix toμ under the matrix 2norm. In standard state reconstruction algorithms, this task is computationally intensive 20 . However, we can employ the fast algorithm in ref. 20 with computational complexity O(d 3 ) to solve this problem since we have a Hermitian estimateμ with Trμ ¼ 1. It can be verified that pullingμ back to a physical state can further reduce the mean squared error. 7 Numerical results In this section we present the numerical results. First of all, we would like to stress two advantages of the LRE method: (a) as we have demonstrated in ref. 6, the LRE method can greatly reduce the cost of computation in comparison with the maximumlikelihood method; (b) the recursive LRE algorithm is naturally suitable for optimizing measurements adaptively. The argument for the advantage (b) can be explained as follows. For state tomography the optimal measurements generally depend upon the state to be reconstructed. By utilizing the LRE algorithm, we can obtain the estimate of the real state in a computationally efficient way. Using the state estimate, the measurements to be performed can be adaptively optimized. In the following, we perform numerical simulations of two-qubit tomography using only the LRE method while with six different measurement strategies: (i) standard cube measurements 11 ; (ii) mutually unbiased bases (MUB) measurements; (iii) MUB half-half 24 ; (iv) "known basis" 24 ; (v) RAQST1, in which the admissible measurement set only contains the simplest product measurements; (vi) RAQST2, in which the admissible measurement set is not limited.
Each of the tomography protocols (iii)-(vi) consists of two stages. In the first stage, they all use the standard cube measurements. Standard cube measurements for multi-qubit systems are defined in 11 as product cube measurements on each qubit, such as the tensor product of three Pauli measurements. For the MUB half-half, we first perform standard cube measurements on N/2 copies and obtain a preliminary estimateρ 0 via LRE, and then measure the remaining half of copies so that one set of the bases is adaptively adjusted to diagonalizeρ 0 and it together with another four sets of bases constitutes a complete set of MUB as proposed in ref. 24. In contrast to the MUB half-half, for the "known basis", 24 in the second stage, we perform a set of measurements so that one of the five bases of the MUB is the eigenbasis of the state to be reconstructed. Although it is impossible physically (since the state is not known), this is a useful comparison. For the RAQST, we first perform standard cube measurements on N 1 copies and obtain a preliminary estimate. Then we adaptively optimize the measurement to be performed at each iteration step upon the corresponding admissible measurement set (see Section D of the Supplementary Material). In RAQST1, the basic admissible measurement set is the standard cube measurement bases. At each iteration step, we add another set of product measurements obtained by solving a conditional extremum problem to the basic admissible measurement set (see Section E of the Supplementary Material). In RAQST2, at each iteration step, the set of the eigenbases of the current estimate state is also added into the admissible measurement set. Note that the admissible measurement set in RAQST2 will involve nonlocal measurements in general if there are more than one particle. The details can be found in Section D of the Supplementary Material.
For the RAQST, we need to specify N 1 , which is the number of copies measured in the first stage, and the number K of the iteration steps such that N = N 1 + K⋅N 2 , where N 2 is the number of copies for each POVM in the second stage. In principle, the number K of the iteration steps in the second stage may depend on the preliminary estimate in the first stage. For simplicity, in this work, we give empirical formulas depending only upon the total number N of the copies. Note that in RAQST1 and RAQST2, the admissible measurement sets are different, and so are their empirical formulas. For RAQST1, N ð1Þ 1 ¼ N=ð1:3 þ 0:1log 10 NÞ, K ð1Þ ¼ blog 10 N À 1c, and for RAQST2, N ð2Þ 1 ¼ Nð0:8 À 0:01 log 10 NÞ, K ð2Þ ¼ b1:5 log 10 N À 2c where bxc returns the maximum integer that is less than or equal to x. Obviously the formula for the resource distribution for RAQST2 applies only when N is not too large.
We use Monte Carlo simulations to demonstrate the results. The figure of merit is the particularly well-motivated quantum infidelity, 24 Fig. 1a depicts average infidelity vs. N for the maximally entangled state HV j iÀ VH j i= ffiffi ffi 2 p , where |H〉 and |V〉 correspond to the horizontal and vertical photon polarization states, respectively. It can be seen that the average infidelity of the static tomography protocols (i.e., (i) and (ii)) vs. N is in the order of Oð1= ffiffiffi ffi N p Þ. However, the Gill-Massar bound 2 for the infidelity in two-qubit state tomography is 75=4N. This can be obtained by combining the equations (5.29) and (A.8) in ref. 9 (see Supplementary Material). It is clearly seen that, as compared to the static tomography protocols and the adaptive MUB half-half, the average infidelity using our RAQST protocol can be reduced to beat the Gill-Massar bound even only with the simplest product measurements. Furthermore, if there is no limitation on the admissible measurement set, the RAQST2 can outperform the "known basis" tomography. It can be seen that the average infidelity of RAQST1 and RAQST2 vs. N can be significantly reduced to the order of the Gill-Massar bound, i.e., O(1/N). Fig. 1b shows the histogram for RAQST over 200 randomly selected pure states and 200 MESs when the total number of copies is N = 10 4 for each random state. Random pure states are created using the algorithm in ref. 42. Since all the MESs are equivalent under local unitary operations, they are randomly selected by applying randomly generated local unitary operators 43 on the same MESs. We adopt the index Υ = (C−A)/(C−G) to evaluate the performance of our RAQST protocol. Here, C and A represent the log 10 of the average infidelity between the corresponding estimate and the true state when the standard cube measurement bases and the RAQST are utilized, respectively, while G is the Gill-Massar bound. Note that if ϒ > 0, our adaptive protocol surpasses the standard measurement strategy, while if ϒ > 1, our adaptive protocol beats the Gill-Massar bound. From Fig. 1b we can see that our RAQST protocol is particularly effective for the class of MESs which are important resources in quantum information. Fig. 2a depicts average infidelity vs. N for the Werner states in the form of In this case we produce a state with p = 0.997, which has purity Tr(ρ 2 ) = 0.9955. Note that there are kinks in the four curves corresponding to the four different adaptive protocols (iii)-(vi). We can see that each of the four curves can be divided into three segments from left to right. In the first segment, the infidelity decreases quickly as N increases until the infidelity is reduced to the order of the small eigenvalues of the state to be reconstructed, then the curves go into the second segment where the infidelity decreases slowly. After the infidelity is smaller than the smallest eigenvalues, the infidelity decreases quickly again as N increases. This is because infidelity is hypersensitive to misestimation of small eigenvalues, as pointed out in ref. 24. Hence, we must accurately estimate the eigenvalues that appear to be zero. When the infidelity is of the order of the smallest eigenvalues, it will be hard to estimate them accurately, so the decay rate of the infidelity will become slow. Once the infidelity decreases to be smaller than the smallest eigenvalues, we can estimate them more accurately as N increases, and then the infidelity decreases quickly. It can be seen that our RAQST1 can beat the static tomography protocols and the adaptive MUB half-half protocol even with the simplest product measurements. The infidelity can be further reduced by using RAQST2, and when the total copies N ≥ 10 4.5 , the infidelity can be reduced to O(1/N). Fig. 2b shows average infidelity vs. different purity when the total number of the copies for each state is N = 10 4 . The quantum states are chosen as Werner states in Eq. 5 with different p. The occurrence of the peak at the purity value around 0.95 is due to the issue of misestimation of small eigenvalues, similar to that in Fig. 2a. The results show that when the states have a high level of purity, our RAQST1 with the simplest product measurements can beat the MUB protocol. However, as the state becomes more mixed (Tr(ρ 2 ) decreases), using MUB measurements for state tomography can do better than using the adaptive product measurements. This fact is due to the essential limit of product measurements on mixed states. As pointed out in ref. 2, nonlocal measurements on a mixed state can extract more information. Thus, to reconstruct mixed states, it is better to use nonlocal measurements, e.g., MUB measurements. It is also clear that the infidelity achieved by using RAQST2 is much lower than that using MUB, and can beat the Gill-Massar bound for a wide range of quantum states.

Experimental results
In this section, we report the experimental results using our RAQST protocol for two-qubit QST. Since it is hard to perform nonlocal measurements in real experiments, we only experimentally implement tomography protocols using (i) standard cube measurements and (v) RAQST1.As shown in Fig. 3, the experimental setup includes two modules: state preparation (gray) and adaptive measurement (light blue). In the state preparation module, an arbitrary Werner state ρ W (p) in Eq. 5 can be generated.
In the adaptive measurement module, the two-photon product measurements can be adaptively adjusted according to the analysis of the collected coincidence data.
In the first experiment, as shown in Fig. 4a, we realize RAQST1 and standard cube measurements tomography protocols for entangled states with a high level of purity with respect to different number of resources N ranging from 251 to 251,189. First, we calibrate the true state ρ using RAQST1 with N = 10 7 copies so that the infidelity of the calibrated true state is 10 times smaller even than the estimate accuracy achieved at N = 251,189 with RAQST1. The purity of the calibrated state is 0.983. Systematic error is crucial in the experiments. Beam displacers, which separate extraordinary and ordinary light, act as PBSs and have an extinction ratio of about 10,000:1. As the precision of rotation stages of QWPs and Half-wave plates (HWPs) are 0.01°, the rotation error is determined by the calibration error of optic axes, which is 0.1°in our experiment. Phase errors of the currently used true zero-order QWPs and HWPs are 1.2°, which dominate the systematic error of practically realized measurements. These error sources induce a systematic error to the estimate state, which can be characterized by its infidelity from the true state. The systematic error is in the order of 10 −3 when the error sources take the above values. For resource number N ≥ 10 3 , the systematic error is of the same scale as or even larger than the statistical error due to finite resources (N copies). To deal with this problem, we employ error-compensation measurements 44 to reduce the systematic error to the order of 10 −5 . In errorcompensation measurement technique, multiple nominally equivalent measurement settings are applied to sub-ensembles such that the systematic errors can cancel out in first order. Tomography experiments using both RAQST1 and standard cube measurements are repeated 10 times for each number of photon resources.
In the second experiment, as shown in Fig. 4b, we realize tomography protocols using RAQST1 and standard cube measurements for Werner states with purities ranging from 0.25 to 0.98. The purities are changed by adjusting the apertures. Since the photon resource for each run of tomography protocols is 10 4 , we use 10 6 copies to calibrate the true state. There are 40 experimental runs and 1000 simulation runs for each of nine Werner states. In each RAQST experiment, four adaptive steps are used to optimize the measurements. To ensure measurement accuracy, error-compensation measurements are also employed.
In both of these two experiments, our experimental results agree well with simulation results. The improvement of RAQST1 protocol over the standard cube measurements strategy is significant. According to the simulation results of MUB protocol and the experimental results of RAQST1, even with only the simplest product measurements, our RAQST1 can outperform the tomography protocols using MUB for states with a high level of purity. Taking into account the trade-off between accuracy and implementation challenge, from Figs 2 and 4, RAQST using the simplest product measurement seems to be the best choice for reconstructing entangled states with a high level of purity.

DISCUSSION
We have presented a new adaptive QST protocol using an adaptive LRE algorithm and reported a two-qubit experimental realization of the adaptive tomography protocol. In our RAQST protocol, no prior assumption is made on the state to be reconstructed. The infidelity of the adaptive tomography is greatly reduced and can even beat the Gill-Massar bound by adaptively optimizing the POVMs that are performed at each step. We demonstrated that the fidelity obtained by using our RAQST with only the simplest product measurements can even surpass those obtained by using MUB and the two-stage MUB adaptive strategy, for states with a high level of purity. Considering the trade-off between accuracy and difficulty of implementation, it seems that RAQST using the product measurements is the best choice for reconstructing pure and nearly pure entangled states, which are Fig. 3 Experimental setup. The experimental setup can be divided into two modules: state preparation (gray) and adaptive measurement (light blue). In state preparation module, arbitrary Werner states ρ W (p) in can be generated. In adaptive measurement module, the two-photon product measurements are realized and can be adaptively changed by a Labview program. Key to components: HWP, half-wave plate; QWP, quarter-wave plate; BS, beam splitter; IF, interference filter; SPD, single photon detector; PBS, polarizing beam splitter It is worth stressing that our RAQST protocol is flexible and extensible. For any finite dimensional quantum systems, once the admissible measurement set is given, we can utilize the adaptive measurement strategy to estimate an unknown quantum state. As demonstrated by numerical results, if nonlocal measurements can be experimentally realized through some breakthrough in technology, the admissible measurement set M can be enlarged, and our RAQST protocol can be better utilized accordingly. How to give a more effective empirical formula for the parameters defining the second stage is worthy of further exploration, in particular allowing the parameters to depend upon the estimate state of the first stage. This is actually related to the tomography problem wherein some prior information is already known, e.g., pure entangled states, matrix-product states, low-rank states. By taking full advantage of the prior information, an even more efficient RAQST protocol may be designed. Thus, our RAQST protocol may have wide applications in practical quantum tomography experiments.
Note added After we completed the experiments, we became aware of a highly relevant work 40 taking a Bayesian estimation approach to realize two-qubit adaptive QST using factorized measurements. The updated optimal measurements are determined in terms of maximum information gain in ref. 40. Since Bayesian estimation yields posterior distribution of quantum states, it always gives a physical point estimate and can easily generate reliable regions. Compared with the adaptive algorithm based on Bayesian approach, our method via LRE is typically much more computationally efficient.

Experimental setup
As shown in Fig. 3, the experimental setup includes two modules: state preparation (gray) and adaptive measurement (light blue). In the state preparation module, a pair of polarization-entangled photons with a central wavelength at λ = 702.2 nm is first generated after the continuous Ar + laser at 351.1 nm with diagonal polarization pumps a pair of type I phase-matched β-barium borate crystals whose optic axes are normal to each other. 45 The generation rate is about 3000 two-photon coincidence counts per second at a pump power of 60 mW. HWPs at both ends of the two single mode fibers are used to control polarization. Then, one photon is either reflected by or transmits through a 50/50 beam splitter (BS). In the transmission path, a QWP is tilted to compensate the phase of the two-photon state for the generation of HV j iÀ VH j i= ffiffi ffi 2 p . In the reflected path, three 446 λ quartz crystals and a half wave plate with 22.5°are used to dephase the two-photon state into a completely mixed state I/4. The ratio of the two states mixed at the output port of the second BS can be changed by the two adjustable apertures for the generation of an arbitrary Werner state ρ W (p) in Eq. 5. Since the coherence length of the photon is only 176 λ (due to the 4 nm bandwidth of the interference filter (IF)), much smaller than the optical path difference of 0.5 m, two states from the reflected and transmission paths only mix at the second BS rather than coherently superpose. In the adaptive measurement module, the twophoton product measurements are realized by the combinations of quarter-wave plates (QWPs), HWPs, polarizing beam splitter (PBS), single photon detector (SPDs) and a coincidence circuit. The rotation angles of QWPs and HWPs can be adaptively adjusted by a controller according to the analysis of the collected coincidence data on a computer.