{'fraction_non_alphanumeric': 0.0279308684252769, 'fraction_numerical': 0.013430360104874525, 'mean_word_length': 4.599161174355902, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Experimental demonstration of loop state-preparation-and-measurement tomography

We have performed an experiment demonstrating that loop state-preparation-and-measurement (SPAM) tomography [C. Jackson and S. J. van Enk, Phys. Rev. A 92, 042312 (2015)] is capable of detecting correlated errors between the preparation and the measurement of a quantum system. Specifically, we have prepared pure and mixed states of single qubits encoded in the polarization of heralded individual photons. By performing measurements using multiple state preparations and multiple measurement device settings we are able to detect if there are any correlated errors between them, and are also able to determine which state preparations are correlated with which measurements. This is accomplished by going around a 'loop' in parameter space, which allows us to check for self-consistency. No assumptions are made concerning either the state preparations or the measurements, other than that the dimensions of the states and the positive-operator-valued measures (POVM) describing the detector are known. In cases where no correlations are found we are able to perform quantum state tomography of the polarization qubits by using knowledge of the detector POVMs, or quantum detector tomography by using knowledge of the state preparations.


I. INTRODUCTION
Quantum mechanics is on the threshold of fundamentally changing modern technology in a number of areas. Commercial quantum cryptographic systems already exist, and are being used for secure communications [1]. High fidelity quantum logic gates have been constructed [2], which is an important step in the construction of a true quantum computer. As these systems improve, better methods for verifying their performance are needed. One such improvement will be minimizing the number of assumptions that are used when characterizing these systems; this will increase our confidence in the reliability of quantum technology.
Quantum tomography is an important tool for characterizing small quantum systems, and presently it comes in several different forms. One form is quantum-state tomography (QST), which estimates the state of a quantum system [3][4][5][6][7]. The system is prepared on many trials, and measurements are performed with a detection system that has many different settings. If enough settings are used the state can be reconstructed. In QST it is assumed that the state is initially unknown, but the detector is completely known and specified.
Another form of tomography is quantum-detector tomography (QDT), which estimates There are forms of tomography that lie between QST and QDT. In self-calibrating tomography some state parameters and some detector parameters are assumed known, in order to determine the unknown state and detector parameters [18]. In data-pattern tomography known states are used to calibrate the response of a detector, and this calibration can be incorporated into the state reconstruction procedure [19,20].
One last form of quantum tomography is state-preparation-and-measurement (SPAM) tomography [21][22][23][24][25]. SPAM tomography attempts to estimate both the state and measurement parameters in a self-consistent manner. Here we are interested in loop (or non-holonomic) SPAM tomography, which involves three separate steps. First, measurements are performed as both the state and detector settings are varied. The Hilbert space dimension is assumed to be known, but neither the states nor the detectors are known, and no other assumptions are made about them.
Second, with only this minimal assumption it is possible to determine whether or not there are correlations between the state preparations and the measurements by analyzing the data to look for self-consistency while going around a loop in parameter space, without the need to estimate any state or measurement parameters [23]. Correlated errors are especially detrimental to fault tolerance in quantum computation, so detecting them is important. Finally, if it is determined that there are no correlated SPAM errors, it is then possible to estimate the states using information about the detectors, or vice versa [21,22].
Here we demonstrate that loop SPAM tomography is capable of detecting correlated errors in the preparation and measurement of qubits encoded in the polarizations of individual photons. Furthermore, we show that it is possible to determine which state preparations are correlated with which measurements.

A. SPAM Correlations
We begin with a brief review of the theory of loop SPAM tomography, based on the discussion in Refs. [23] - [25]. Suppose we have a source that can be prepared in states that are described by density operators ρ a , where the subscript labels the different possible state preparations. We also have a detector that is described by the POVM elements Π i , where the superscript labels the different possible measurements (detector settings). The probability i a p of a detection for state preparation a and detector setting i is then given by the Born rule ( ) so we cannot estimate ˆa ρ or ˆi Σ individually. The first question that loop SPAM tomography addresses is the detection of such correlated errors, with the only assumption being that the system dimensions are known.
Loop SPAM tomography is useful because new ways to perform tomography [26], and the ability to detect possible tomographic errors are important for quantum information processing applications [17,22,27,28]. For example, new technology is improving the fidelity of quantum logic operations [2]. High precision tomographic measurements are needed to characterize such gates, and experimenters need to be able to place limits on systematic errors in these measurements.

B. Single-Qubit Loop SPAM Tomography
In this section we will introduce the notation we use for describing loop SPAM tomography. If there are no SPAM correlated errors, then we can write the expression for the expectation values in Eq. (3) as a matrix equation [23] S PW = . 6 The overbar indicates a quantity that is expressed as a matrix; it is not an average. The matrix elements for a particular state preparation a and measurement setting i are [25] i i a a S P W In this section we are interested in single qubits. We can represent a general density operator as We take the operators ˆµ σ to be the Pauli matrices Here we assume unbiased measurements. For polarization qubits the "direction" of the three- If we examine Eq. (4), we find that the measured expectation values are unchanged under the substitutions It can be shown that G consists of 9 parameters that are undeterminable by the measurements; these parameters are referred to as blame gauge degrees of freedom [23]. Three of these parameters determine properties such as the choice of Hilbert-space basis, but the others have more interesting interpretations. Despite the fact that these parameters are undeterminable, we will see that it is still possible to detect correlated SPAM errors.
We now turn our attention to detecting correlated SPAM errors. Let M be the number of different state preparations, and N be the number of different detector settings used during the measurements. For the single-qubit case we are considering the state is assumed to be determined by three independent parameters and measurements with 3 N = detector settings are sufficient to perform QST. Similarly, the detector POVM is assumed to be determined by three independent parameters and 3 M = state preparations are sufficient to perform QDT.
In writing Eq. (4) we assumed that there were no correlated errors between the state preparation and the measurements. However, for 3 N > and 3 M > the data cannot be completely uncorrelated because there are not enough underlying independent parameters that describe the states and the detectors. Thus, for larger data sets we need to determine when the state preparations and the measurements are effectively uncorrelated, and consistent with the number of independent parameters.
Recall that the rows of S refer to a fixed state preparation, while the columns of S refer to a fixed detector setting. tomographically complete, but because of the undeterminable gauge parameters it is not possible to uniquely determine the states or the detector settings without further assumptions. However, matrix A is connected to matrix B in the sense that they share a common set of state preparations, and the measured matrix elements of B must be consistent with that fact. Matrices B and D share a common set of detector settings, and their measured matrix elements must be consistent with that fact. Furthermore, C and D must be consistent with a common set of state preparations, and A and C must be consistent with a common set of measurement settings.
Another way to look at the connectedness of the corner matrices in Eq. (12) is as follows.
If one knew the detector POVM's for settings 1 Jackson and van Enk have shown that the measured data are internally consistent as described above, and free of correlated SPAM errors under the condition that where 1 is the 3x3 identity matrix [23].
Thus, the procedure to detect correlated SPAM errors for a single qubit is as follows.
Measure expectation values for Finally, it is possible to reduce the number of needed state preparations and measurement settings from 2 6 n = to 1 4 n + =, which reduces the total number of measurements from 36 to 16. For example, consider the matrix B , which has the same state preparations as A . We need at least one of the detector settings that determine B to be different from those that make up A , but we don't need to change all of the detector settings. Thus, for example, the first column of B could use a different detector setting than the first column of A , but the data in the other columns of B can simply be duplicates of the other columns of A .
Thus, S is a 2nx2n matrix, but it can be constructed from 2 ( 1) n + measured expectation values as follows. The first ( 1) n + rows and ( 1) n + columns are made up of the independent elements. Columns ( 2) n + through 2n are copies of columns 2 through n, and rows ( 2) n + through 2n are copies of rows 2 through n.

A. The Experimental Apparatus
In our experiments we use a 150 mW, 405 nm laser diode to pump a 3 mm long betabarium borate (BBO) crystal. This produces type-I spontaneous parametric downconversion at 810 nm, with signal and idler beams making angles of 3° from the pump. The idler beam is focused into a single-mode, polarization-preserving optical fiber, filtered by a 10 nm bandpass filter centered at 810 nm, and detected by a single photon counting module (SPCM). Detection of an idler photon heralds the production of a single photon in the signal beam. For heralding we use a coincidence unit based on a Xilinx SP605 development board that has a coincidence window of 2.5 ns [31]. The signal beam is filtered with RG780 colored glass and focused into a single-mode, polarization-preserving optical fiber. The output of this fiber is then collimated, and emerges as the "Source" in Fig. 1. Our source has a heralding efficiency of approximately 13%, a heralded single-photon production rate of ~9,000 s -1 , and a degree of second-order coherence Here λ/2 denotes a half-wave plate, λ/4 denotes a quarter-wave plate, BDP denotes a beam-displacing polarizer, PBS denotes a polarizing beam splitter, and E and E ¬ are single-photon-counting modules.
The experimental arrangement for loop SPAM tomography is shown in Fig. 1. Linearly polarized photons from the source pass through a half-wave plate that rotates their polarization. In order to construct the matrix S in a given experiment, the state emerging from the BDPs is fixed to be either ˆH ρ or ˆM ρ , and the state for preparation a is determined by the rotation angles of the half-and quarter-wave plates that immediately follow the second BDP (Fig. 1). The detector POVM for a given setting i is determined by the rotation angles of the quarter-and halfwave plates that immediately precede the polarizing beam splitter (PBS). The settings are chosen to sample the Hilbert spaces of both the states and the detector POVMs; for both the state preparations and the measurements the quarter-wave plate rotation angles are {0, π/4, π/4, π/16, 5π/16, 5π/16} and the half-wave plate angles are {0, 0, π/8, π/16, π/16, 3π/16}. We have performed experiments using both 2n and 1 n + state and measurement settings; when using 1 n + settings we use the first four wave-plate angles listed above. In order to calculate statistical errors we perform 10 sequential measurements of S , and we quote our errors as standard deviations of these measurements.

B. No Correlated Errors
First we performed measurements with the source in the pure state ˆH ρ using 1 n + state and measurement settings. In these measurements the states and measurements were, to the best of our knowledge, independent of each other, so there should be no correlated SPAM errors.  Other than assuming that the Hilbert space dimension is known, no assumptions about the state preparation or detector observables were made when processing the measured expectation values to obtain the results shown in Fig. 2 The fidelity takes on values 0 1 F ≤ ≤ , with 1 F = corresponding to ( ) ( )th rec a a ρ = ρ . Using the same data used to produce Fig. 2, we find that the fidelities of the reconstructed states are all greater than 0.99.
We also reconstruct the POVM elements ( ) where is the Frobenius norm. We find that the relative errors are all less than 0.023.
We have also performed measurements in which the state after the BDPs is the mixed state ˆM ρ . Again we find that ( ) 1 S D − differs from 0 by less than half a standard deviation, and the fidelities and relative errors of the reconstructed states and POVMs are essentially the same as those described above for the pure state ˆH ρ .
Finally, we have performed experiments using 2n state and measurement settings, for both pure and mixed state preparations. The results are similar to those described above, the only difference being that the fidelities are slightly lower (> 0.97) and the relative errors are slightly larger (< 0.060). With 2n settings we reconstruct 6 different states and POVMs, while for 1 n + settings we reconstruct only 4. Furthermore, 2n settings require more than twice as many measurements as 1 n + settings (36 versus 16). Both of these factors allow experimental imperfections more opportunities to influence the results.

C. Correlated Errors
We have performed an experiment where for state preparation In the above paragraph we described an experiment in which a correlated error changed 1 1 S from 1 to 1 − , which is a large error. In order to determine if we could detect smaller errors, we performed measurements in which we'd expect 1 1 S to change from 1 to 0.81 (corresponding to a rotation of the detector half-wave plate by π/20). Increasing the averaging time of the measurements will decrease errors due to fluctuations in the photon counting statistics. As such, we expect the ultimate sensitivity to correlated errors to be limited by repeatability and long-term drifts of the state preparation and measurement settings. Note that the numerical processing uses the measured expectation values i a S , not the settings themselves. Thus, it will be easier to detect correlated errors in matrix elements that are more sensitive to changes in the state preparation and measurement settings.
We have repeated the experiments described above by replacing the pure state ˆH ρ with the mixed state ˆM ρ , and also by using 2n settings instead of 1 n + . With these changes we find no difference in the final results, as they look essentially the same as those shown in Fig. 3. We are able to detect a correlated error where 1 1 S is changed from 1 to 0.81, but do not detect the error if 1 1 S is changed from 1 to 0.95.

D. Locating Correlated Errors
In the previous section we showed how we could detect correlated errors introduced into 1 1 S , which corresponds to the first state preparation (row 1) and the first measurement setting (column 1). In this case the partial determinant differed from its expected value in the first row and column, for measurements with both 2n and 1 n + settings, which agrees with theory for a correlated error at 1 1 S . This helps us to identify the location of the correlated error with respect to the state and detector settings.  When using 1 n + settings, if the correlated error appears in row or column 2 or 3 of S (assuming 3 n = ), this error is duplicated into rows and columns 5 and 6 when embedding the measured data into a 2nx2n matrix. As such, this error would appear 4 times in S , whereas it only appears a single time when using 2n settings. This is the likely difference between the results for 2n and 1 n + settings. Furthermore, we have performed measurements with two and three different correlated errors present. We are able to identify the presence of correlated errors with both 2n and 1 n + settings, and to identify the location of all of the errors when using 2n settings. In all cases the experiments agree with the theoretical predictions.
Since using 1 n + settings requires less than half the number of measurements, and is able to detect correlated SPAM errors, we suggest that any experiment looking for SPAM correlations start by using 1 n + settings to determine if there are any errors. If an error is found then measurements can be performed with 2n settings to better identify which state is correlated with which measurement.

IV. CONCLUSIONS
We have performed experiments demonstrating that we can detect correlated errors between the state preparations and the measurements of a qubit using loop SPAM tomography. This determination is made by checking for self-consistency while going around a loop in parameter space. To do this one needs no knowledge about the state preparations or the measurements, other than knowing the dimensions of their Hilbert spaces. Indeed, we do not even need to estimate any state or measurement parameters in order to detect correlated errors.
We find that when using 2n state preparations and measurement settings we are able to determine which state preparation is correlated with which measurement. When using 1 n + settings we can determine the presence of a correlated error, but it is not clear which state preparation is correlated with which measurement. Furthermore, by having sufficient knowledge about some of the state preparations or measurement settings, we are able to use QST and QDT to estimate the rest of density operators and POVMs.