{'fraction_non_alphanumeric': 0.022959365850174964, 'fraction_numerical': 0.013247161322573734, 'mean_word_length': 4.742669673979906, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Convergence of reconstructed density matrix to a pure state using maximal entropy approach

Impressive progress has been made in the past decade in the study of technological applications of varied types of quantum systems. With industry giants like IBM laying down their roadmap for scalable quantum devices with more than 1000-qubits by the end of 2023, efficient validation techniques are also being developed for testing quantum processing on these devices. The characterization of a quantum state is done by experimental measurements through the process called quantum state tomography (QST) which scales exponentially with the size of the system. However, QST performed using incomplete measurements is aptly suited for characterizing these quantum technologies especially with the current nature of noisy intermediate-scale quantum (NISQ) devices where not all mean measurements are available with high fidelity. We, hereby, propose an alternative approach to QST for the complete reconstruction of the density matrix of a quantum system in a pure state for any number of qubits by applying the maximal entropy formalism on the pairwise combinations of the known mean measurements. This approach provides the best estimate of the target state when we know the complete set of observables which is the case of convergence of the reconstructed density matrix to a pure state. Our goal is to provide a practical inference of a quantum system in a pure state that can find its applications in the field of quantum error mitigation on a real quantum computer that we intend to investigate further.

where not all mean measurements are available with high fidelity. We, hereby, propose an alternative approach to QST for the complete reconstruction of the density matrix of a quantum system in a pure state for any number of qubits by applying the maximal entropy formalism on the pairwise combinations of the known mean measurements.
This approach provides the best estimate of the target state when we know the complete set of observables which is the case of convergence of the reconstructed density matrix to a pure state. Our goal is to provide a practical inference of a quantum system in a pure state that can find its applications in the field of quantum error mitigation on a real quantum computer that we intend to investigate further.

Introduction
The rapid advancements towards the development of large scale quantum computing devices in recent years require efficient methods that can validate information processing on these devices. Quantum state tomography (QST) is one such standard data-driven technique that can characterize the quantum mechanical state of the system based on the information of the expectation values of a complete set of observables [1,2,3,4,5]. However, the increase in the size of quantum systems poses a critical limitation on QST due to the exponential scaling of the number of parameters required to reconstruct a quantum state that is a tensor product of qubits. In practice, full QST for large quantum systems has been performed on not more than 10-qubits [6].
We are currently in the era of noisy intermediate-scale quantum (NISQ) computing [7] which restricts the use of a large quantum device for practical purposes such as recovering the true quantum state, owing to the inherent noise in the result. Measurements on these NISQ devices are therefore of limited fidelity and in certain cases we have access to only a limited number of observations. This along with the scaling problem makes QST intractable in real experiments except for small quantum systems. Various techniques have been suggested to address the underlying scaling problem as well as to mitigate against imperfect measurements [8]. Some of the proposed tomography methods are matrix product state tomography [5], neural network tomography [9,10,11,12], quantum overlapping tomography [13], shadow tomography [14,15]. Apart from the conventional tomography techniques, there have been approaches that try to estimate the quantum state based on incomplete measurements [16,17,18]. Some of these methods include quantum state estimation using maximum likelihood estimation [19,20], and Bayesian state estimation [21,22].
In our previous work [23] we proposed an alternative approach to QST based on the maximal information entropy formalism [17,24,25] using finite but incomplete set of measurements that serve as the constraints of the problem. These are special kinds of constraints that correspond to the mean values of populations and coherences.We showed that using the maximal entropy approach we can obtain an accurate prediction of an unknown mean measurement (a probability) using a pair of known mean measurements (a probability and a coherence). In addition to the validation of the results of quantum calculations performed on NISQ devices using QST, there are a variety of further circumstances where the mean values of populations and coherences are of primary interest [26,27,28]. With an incomplete set of known mean measurements, maximizing the von Neumann entropy [16,29,30,31] of the system provides an additional constraint to obtain a unique solution for the state determination. In this paper, we extend this approach to reconstruct the complete density matrix of an n-qubit quantum system with a special reference to a pure state using the expectation values of N observables where N =2 n . The unique feature of our approach is that we consider pairwise combination of the known probability with the known coherence to predict an unknown probability using the maximal entropy formalism and repeat this process until all the probabilities for all the n qubits have been determined. Once all the probabilities have been calculated, we employ the same approach on the pairwise combinations of the probabilities to determine all the unknown coherences. The detailed description of the method is provided in Section 2.
To validate and support our theoretical proposition we conducted numerical simulations in IBM's qiskit [32]. We also implemented our approach on IBM quantum computing chip that can be easily accessed through IBM quantum experience [33]. The results in Section 3 show the accuracy of our approach when we use the expectation values of observables obtained from noise-free statevector simulator backend in Qiskit for the reconstruction of the complete density matrix for quantum systems ranging from 2-10 qubits using the proposed approach.
We intend to further analyse this approach for applications in the field of quantum error correction and compare it with the available error correction codes [34,35].

Method
A unique characterization of a quantum state requires measuring the expectation values of a complete set of observables. For the state vector of a quantum state with N entries, this complete set is defined by 2N-1 independent parameters whose knowledge is required to uniquely characterize the quantum state. For example, measurements of expectation values of 16 operators are required to completely describe a 2-qubit quantum system in pure state: The expectation values of the above operators correspond to the probabilities and coherences in the 2-qubit system [30]. The maximal entropy formalism [24] seeks to determine a probability distribution that is consistent with the known average values of certain operatorsf k as well as ensuring that the von Neumann entropy of the distribution be maximal. Combining it with the method of Lagrange multipliers λ k [17,25] yields the following form of the density operator [16,31]:ρ where Z(λ 1 , . . . , λ k ) = T r(exp{− k λ kfk }) insures the normalization as T r(ρ) = 1. Thus, even when a complete set of observables is not available, the maximal entropy formalism provides a unique characterization of the quantum state consistent with the given constraints.
In this current work, we start by reconstructing the density matrix of maximal entropy that corresponds to the case when only two measurements are available, specifically, a probability and a coherence. In general the coherence will be a complex number so it is equivalent to two Hermitian observables. Based on the maximal entropy formalism we can write the Hermitian density operator in terms of the operators corresponding to the available observables as: where the Lagrange multipliers λ k satisfy λ 21 = λ * 12 so that the density matrix is Hermitian.
One can satisfy this by writing the Lagrange multiplier of the coherences in terms of an amplitude and a phase, λ 12 = |λ 12 | exp{iθ 12 }. The details of the prediction of an unknown probability from a known probability and a coherence are presented in our previous work [23]. The operators in the exponent of Eq. (3) do not commute so to obtain an explicit form for the density matrix we first diagonalize the Hermitian matrix A corresponding to the exponent term in Eq. (3) and then express the density operator in terms of the eigenvalues and eigenvectors of A:ρ where { i , φ i } are the eigenvalues and eigenvectors of A expressed as a function of the unknown Lagrange multipliers in Eq. (3). For a 2-qubit system the density operator, upon reconstruction from a known probability and a coherence, so that there is only one phase, was shown to take the explicit form: where Z= i exp{ i }, k 3 = -3 λ *

12
, a= Since the basis operators are orthogonal, the mean measurements correspond to the coefficients of the operators in the reconstructed density matrix. Therefore, The state defined in Eq. (5) is a mixed state. This is to be expected since we only provided information sufficient to define a pure state of the first qubit. In our previous work, we have already established that from Eq. (5) the information about x 22 can be obtained using x 11 and x 12 following the determination of the unknown Lagrange multipliers in Eq. (3).
However, in the case that the density matrix is real valued, we can also propose that the mean measurement value x 12 can be determined using the same expression if we know x 11 and x 22 as the mean measurements in Eq. (6-8) are functions of the Lagrange multipliers (λ 11 , λ 12 , λ 21 ) that can be determined using the expectation values of x 11 and x 22 .
After determining x 12 using the proposed approach we can similarly determine x ij , for real valued coherences, using the corresponding two probabilities, x ii and x jj , at a time. The full density matrix of a quantum system can be deduced if we have determined all the coefficients c ij in the definition of density operator in Eq. (9): The coefficient c ij is the expectation value of the corresponding operator |i j| which can be determined, if the density matrix is real valued, by applying the maximal entropy approach on the pair of known mean measurements for the operators: |i i| and |j j|: Therefore, if the density matrix is real valued, by considering all the pairwise combinations of the N probabilities |i i| and |j j| and applying the maximal entropy approach over each such combination we can determine all the real valued coherences and determine the state.
The number of times the maximal entropy approach is applied on the pairwise combinations of the N probabilities to determine all the coherences is N(N-1)/2 that is the number of unknown coherences. In Section 2.2.1 we show a more general result namely that also when the coherences are complex valued, it follows from the representation λ 12 = |λ 12 | exp{iθ 12 } with θ 21 = −θ 12 that it is sufficient to know the phases of half of the coherences in order to construct the phases of the other half. We show the application of this approach first by reconstructing the density matrix for the maximally entangled 2-qubit Bell state followed by the reconstruction of a 3-qubit multipartite entangled wave function. Thereby, we propose a scheme to also reconstruct the phases of the coherences and combine it with the maximal entropy approach to reconstruct the full density matrix for a quantum system in pure state.
To summarize the method, we start with a certain number of known mean measurements (for example, N probabilities if the target state is real; 1 probability and N-1 coherences if the target state is complex) and apply the formalism of maximal entropy on each pairwise combination of the known mean measurements. Each time we consider a pair of known mean measurements and apply the maximal entropy formalism we get a mixed state with an accurate description of an unknown mean measurement that is the coefficient of the corresponding operator term in Eq. (5). We repeat this process for all the different pairs of the known mean measurements and determine all the unknown coefficients c ij in Eq. (10) and thereby combine everything together to reconstruct the complete density matrix of the quantum system in a pure state. To verify that such a process gives us a pure state in the absence of noise as well as the known mean measurements belonging to a pure state, we calculate the entropy and trace of the square of the density matrix at each step of the process as a measure of its convergence to a pure state in the Results and discussion section.

Bell state
To reconstruct the density matrix of the 2-qubit Bell state: |B = 1 √ 2 (|00 + |11 ), we just need to determine the amplitude of the coherences as the target state is real. Following the approach of considering two probabilities at a time and applying the maximal entropy formalism to predict a coherence and repeating this process for all the six pairwise probability combinations for Bell state, we determine each of the coherence and combine it as per Eq.
(9) to obtain the following density matrix: The predicted coherences match exactly with the coherences of the original Bell state density matrix and therefore, supports our approach of reconstruction of the density matrix.

Reconstructing density matrix for multipartite entangled states
Moving forwards, we consider a system with more than two non-zero coefficients in the maximally entangled state. For example, let us consider a 3-qubit entangled state: |ψ = 1 √ 3 (|100 + |010 + |001 ). Clearly, in the true density matrix defined for this state, all the coherence terms will be zero except for the cross terms ( |010 100| , |001 100| , |001 010| , and their complex conjugate) that will be 0.3333. However, when we reconstruct the density matrix as per the above approach, we obtained the following density matrix: We see that some errors show up in the determination of coherences using the maximal entropy approach. The predicted coherence values further diverge from the true value if we have more non-zero coefficients of the basis states defining the maximally entangled state. To further demonstrate this we consider a general 2-qubit quantum state with real amplitudes: |ψ = 1 √ N (|00 + α |01 + β |10 + γ |11 ) and try to predict the coherence x 12 using the probabilities x 11 and x 22 for various values of α and for fixed values for β and γ.
As can be seen in Figure 1a the prediction of the unknown mean measurement is highly inaccurate for smaller coefficient values of α and it improves considerably for larger values. This is primarily because upon solving the transcendental Eq. (6) and (7), the determined value of the Lagrange multiplier λ 12 is close to zero that leads to a numerical singularity while reconstructing the density matrix as λ 12 is in the denominator when we calculate the projection operators in the eigen basis. To address this problem we used a simple scaling approach described in detail in the Supplementary Information. We then apply the maximal entropy formalism to determine the unknown coherence. The maximal entropy approach is invariant under this scaling technique and it is done to make sure that the trace of the scaled pairwise density matrix is unity. Figure 1b shows the accuracy of the prediction of the coherence using the maximal entropy formalism combined with the scaling technique for a general 2-qubit quantum system.  This approach can be followed to reconstruct the full density matrix of a quantum system with any number of qubits. In case of quantum states with real coherences, for the prediction of an unknown coherence from two known probabilities, we just need to determine the unknown Lagrange multipliers (λ 11 , λ 12 , λ 21 ) and apply this approach. We repeat this procedure to consider all possible pairwise combinations of probabilities and predict all the unknown coherences. Once we determine all the unknowns, we combine everything together to obtain the reconstructed density matrix given by Eq. (9). Therefore, we can reconstruct the complete density matrix of an N -qubit quantum system in case of real coherences from N probabilities.

Complex coherence and phase estimation
So far we have established that the maximal entropy formalism combined with the scaling technique accurately predicts the amplitude of coherence from the known probabilities. However, in the case of complex coherence we need more information than just the probabilities as we also need to determine the phase of coherence which is specific to a quantum system.
To estimate the phase of every coherence term in the reconstruction of the density matrix, the following phase estimation algorithm is employed. To demonstrate it, let us consider a 2-qubit quantum system defined by: where α, β, γ, δ are real coefficients. The coherences are then defined as: and so on. The p 12 , p 13 , p 14 correspond to the phases of the coherences x 12 , x 13 , x 14 : Now, the phase of the remaining coherence terms of the density matrix can be estimated if we have information about the phases p 12 , p 13 , p 14 : Thus, we can determine the phases of all the remaining coherences using the above approach and then combine it with the determined amplitudes from maximal entropy approach to reconstruct the entire density matrix.
Therefore, in case of complex coherences, for the prediction of an unknown coherence from two known probabilities, apart from the determination of the unknown Lagrange multipliers (λ 11 , λ 12 , λ 21 ), we also need to determine the phase (θ) of coherence. For determining the phase of all the coherence terms of the density matrix, we need information about the phase of N-1 coherence terms as seen in Eq. (14). In our previous work we have shown that we can accurately predict an unknown probability from a known probability and a coherence.
Therefore, given N-1 coherences and a probability we can construct all the probabilities using the pairwise combination of the known probability with the known coherences and applying the maximal entropy approach. After the determination of all the probabilities, we take the pairwise combination of all the probabilities and using the above approach for phase estimation and amplitude determination using maximal entropy formalism, we construct all the unknown coherences and combine everything to obtain the complete density matrix for a general pure state with complex amplitudes from N observables (N-1 coherences and 1 probability).

Results and discussion
In this current work we propose to reconstruct the complete density matrix for a general pure state with complex amplitudes from N observables (N-1 coherences and 1 probability) using the method discussed in Section 2. The approach that we follow can work for a quantum system with any number of qubits. To test and validate the proposed theory, we conducted numerical experiments in IBM's Qiskit [32] which is an open-source quantum computing platform with prototype quantum devices to run and simulate quantum programs. We also implemented the theory on IBM's quantum computing chip [36] and used the measurement data to reconstruct the density matrix and then compare it with the true result.

Trace distance and fidelity
We considered different quantum circuits comprising of 2-10 qubits with random quantum gates as shown in Figure 3 for one sample 6-qubit circuit, and tried to reconstruct the density matrix followed by its comparison with the true density matrix. The mean measurements necessary for reconstruction of the density matrix are obtained from simulating the quantum circuits. We used the statevector simulator backend in IBM's Qiskit that simulates the quantum circuit without the consideration of errors and noise. To distinguish between the two states, the trace distance and fidelity between the reconstructed density matrix and true density matrix is calculated for different number of qubits. The results in Figure 3 show that the states match exactly as the trace distance between the reconstructed state and the true state is zero and the fidelity is one.

Convergence to pure state
Two of the most common parameters to characterize a pure state from its density matrix (ρ) are: Entropy(ρ) = 0 and Tr(ρ 2 ) = 1. Our approach is to reconstruct the density matrix of a quantum system using two observables at a time and then repeat the process with different  where N =2 n . Figure 4 shows the plots of entropy(ρ) and trace(ρ 2 ) at each step for a 6-qubit system for the sample circuit shown in Figure 2. The plots validate the convergence of the reconstructed density matrix to a pure state at the end of the complete procedure. Figure 4: Entropy of the reconstructed density matrix (ρ) and trace of ρ 2 as a function of number of steps for reconstructing the full density matrix.

Error analysis
As we saw in the previous section, we considered trace distance, between the reconstructed state and the true state, as a measure to test the performance of our approach. The first step towards the reconstruction of the density matrix is to obtain the mean measurement values of the minimum number of observables required to reproduce the quantum state.
These expectation values can be obtained by running the quantum circuit on a quantum computing chip or using an efficient simulator to simulate the expected results. An online platform for cloud-based quantum computing is provided by IBM Quantum Experience on which we conducted numerical experiments to validate our work.
The first method that we employed to obtain the mean measurements was the statevector simulator backend in Qiskit in which we can get the final wave function of the simulated state and therefore, the probabilities and coherences can be calculated directly. Since no noise is accounted for in this procedure so the reconstructed state matches exactly with the true state and hence, the trace distance is zero.
Next we considered the noisy quantum circuit simulator backend in Qiskit which is the qasm simulator that encompasses statistical errors inversely proportional to the square root of the number of shots given for the circuit to be simulated. As can be seen in Figure 5 these statistical fluctuations are reflected in the trace distance which is slightly deviated from zero.
Also, the operator for calculating coherence unlike probability is not directly available for qasm simulator as well as for the IBM machine and so we decompose the coherence operator into tensor products of Pauli matrices as discussed in [23,37,38] and thereby, obtain the coherences.
Lastly, we implemented our approach to reconstruct the density matrix for the quantum system corresponding to the state obtained upon running the circuit shown in Figure 5 on the 5-qubit IBM quantum computing chip: IBM Q 5 Yorktown [36]. In order to mitigate the measurement errors we also employed the Qiskit's ignis.mitigation.measurement module which does so by constructing a calibration matrix. Considering the presence of noise in the quantum chips the trace distance plot corroborates our approach of carrying out quantum state tomography for a general pure state with any number of qubits.  We intend to further study this approach to characterize and mitigate quantum gate errors that occur when running circuits on IBM's quantum computing chips. Also, the current approach to reconstruct the density matrix is applied and tested for pure states but it can be a good starting point for the reconstruction of mixed states as well.
Convergence of reconstructed density matrix to a pure state using maximal entropy approach Our approach of reconstructing the density matrix of a quantum system is based on using the pairwise combination of the available known mean measurements to predict an unknown mean measurement. Based on the maximal entropy formalism combined with the method of Lagrange multipliers, given a probability and a coherence, the density operator is given as: Since the available operators do not commute so we first diagonalize the exponent term in Eq. (1): Now, the density operator based on just two known mean measurements is given as: Giving the final form of the density operator: where Z= i exp{ i }, k 3 = -3 λ *

12
, a= The unknown mean measurement value is determined using the coefficient of the corresponding operator in Eq. (2). If we consider the maximally entangled state: |ψ = 1 √ N (|00 +α |11 ) and try to predict the coherence terms based on the above approach we get very accurate results for all values of α as shown in Figure 1 more than 2 non-zero coefficients of basis states are present, the accuracy of prediction of coherence falls for smaller coefficients. This is because in such cases the determined value of Lagrange multiplier λ 12 is very small. This leads to numerical instability in the calculation of the projection operator |φ i φ i | where λ 12 comes in the denominator. Seeking motivation from the accuracy of the result of density matrix reconstruction for the Bell state and also accounting for the fact that in our approach we consider two known mean measurements at a time we propose that we can scale the probabilities and the unknown coherence such that the probabilities correspond to the probabilities of a two level system i.e. the sum of the probabilities is one. For example, if we want to determine x 12 from x 11 and x 22 but the usual (a) Prediction of x 12 using maximal entropy formalism (b) Prediction of x 12 using maximal entropy formalism combined with scaling technique Figure 2: Plot of the predicted and true mean measurement x 12 versus the coefficient α of the state |01 using the maximal entropy formalism from: (a) two known probabilities x 11 and x 22 (b) two known probabilities x 11 and x 22 and also employing the scaling approach. before and after scaling shows that the eigenvalues of the initial density matrix without scaling are all zero except for one eigenvalue which is one. After using the scaling technique, two of the eigenvalues are zero and the remaining are non-zero for the density matrix of a 2-qubit quantum system. However, since the accuracy of prediction is excellent so a further investigation is going on to figure out the origin of this scaling technique at a fundamental level.
To verify this approach, we considered the maximally entangled state for 3-qubits: |ψ = 1 √ 8 (|000 + |001 + |010 + . . . + |111 ). We reconstructed the density matrix, first by using the maximal entropy approach without the use of the scaling technique as mentioned above and obtained the following density matrix: All the coherences turned out to be zero as the determined Lagrange multipliers in each case were zero. However, if we use the above scaling technique and combine it with the maximal entropy approach, we do get an accurate reconstructed density matrix: Therefore, we can use this method to reconstruct the full density matrix for any general pure state with real amplitudes and for any number of qubits using only N probabilities. In case of complex coherences, this approach can be used to determine the amplitude of the coherence that can then be combined with the phase estimation algorithm as discussed in the main body of the paper. Thus, using the mean measurement values of N observables we can reconstruct the full density matrix of a quantum system in pure state using this approach.