1 Introduction

Noisy intermediate-scale quantum (NISQ) devices consisting of hundreds of qubits will be available soon [1]. Several technologies for these NISQ devices are being pursued such as superconducting quantum circuits [2], trapped ions [3], quantum dot [4], cold atoms [5], and photonic platforms [6]. These NISQ computers are expected to perform tasks that surpass the capability of the most powerful classical computers available today [79]. However, noisy quantum gates and decoherence limits the desired level of improvement over the existing current classical computing devices for complex algorithms. Bearing this in mind, the development of NISQ devices has posed a paradox: how to validate that the device produces the desired result? For characterization, certification, and benchmarking [10] of these noisy devices, quantum state tomography comes into play, which is the gold standard for the reconstruction of a quantum state [11]. Reconstruction of the quantum state from measurements on the replica of an unknown given quantum state is termed as the quantum state tomography. Quantum state tomography generally consists of a two-step process: the first is collecting the data from optimized measurement design on quantum systems; the second is the classical post-processing of the gathered data. Quantum state tomography problem becomes intractable due to an exponential growth of the system size with increase in the number of qubits under consideration [12, 13].

A conventional state standard tomography employs \(d^{2}\) or more measurement settings, where \(d=2^{n}\) for n qubits [1417]. A simple counting argument suggests that only \(O (d )\) measurement settings are sufficient to perform the tomography of pure quantum states [18, 19]. Compressed sensing and low-rank matrix recovery from sparse matrix algorithms have been developed to achieve this bound [2022]. In [23, 24], the authors proposed \(d+1\) mutually unbiased bases measurements for full quantum state reconstruction. The states with special properties, for instance, matrix product states [25] or permutationally invariant quantum states [26] also lead to a significant reduction in the number of quantum measurement settings. The pure quantum state can also be retrieved with only five and three measurement settings given in [2729]. Recently, noise resilient and robust self-guided quantum state tomography is proposed [3032].

The use of entangled bases in most of the aforementioned tomography algorithms is common, however, their implementation on NISQ devices is difficult due to errors introduced by the controlled-NOT (CNOT) gate and the high circuit depth leading to qubit decoherence. The CNOT gate is an essential transformation required for implementing these sets of entangled measurements. Hence, these entangled bases significantly reduce the performance of state estimation task. The introduction of local basis measurement for state reconstruction can be a massive catalyst for the benchmarking of quantum devices. For this purpose, local basis measurements are introduced in [33]. They have demonstrated the task of tomography of pure quantum state by using \(kn+1\) measurement bases, where \(k \geq 2\). Their algorithm is based on solving several systems of linear equations. The required number of bases increases (\(k > 2\)) if the determinant of the linear system of equations vanishes. The performance is quite low as compared to the numerical results of entangled measurement algorithms. Given the rank of a quantum state, the projected least squares can be used to achieve higher accuracy with the minimum number of copies. However, this comes at the cost of the local Pauli basis measurement settings increasing exponentially. The success of tomography algorithms, therefore, relies on the efficient use of resources to balance accuracy, efficiency, and fidelity.

The paper proposes a novel approach to quantum state tomography called low-rank matrix-completion (LRMC) quantum state tomography. This approach allows for the estimation of pure quantum states with only a minimum of \(2n + 1\) local Pauli measurements for an n-qubit state. The algorithm makes use of experimental measurements to provide the necessary density matrix elements and then uses singular value shrinkage to fill in the missing entries. The method outperforms the existing techniques, as illustrated by simulations and experiments, and is capable of accurately detecting pure states with computational basis and local Pauli measurements.

2 Method

The method used in this paper for pure quantum state tomography involves a matrix filling technique involving \(2n +1\) local measurements for an n-qubit system. This technique utilizes the algorithm for low-rank matrix completion [34]. The algorithm begins by experimentally acquiring enough entries of the pure state’s density matrix. This data is then used by the matrix completion algorithm to obtain the complete density matrix of the desired state using a rank-1 approximation.

Filling in the missing entries of a rank-1 matrix is directly connected to the problem of finding cycles in a graph [34]. The rank-1 matrix of dimension \(d\times d\) can be completely reconstructed by knowing only \(2d-1\) entries of the matrix. These \(2d-1\) elements form a spanning tree in the row-column graph, as demonstrated in Fig. 1. The successful reconstruction of the missing entries of the given matrix depends on the tree reaching all nodes without forming a loop. If a loop exists in the row-column graph, then it is not possible to reconstruct the rank-1 matrix. However, if the \(2d-1\) entries of the matrix do not form a cycle, then we can optimally impute all the missing entries using matrix completion techniques.

Figure 1
figure 1

The figure above shows three different examples of \(4 \times 4\) matrix tree diagrams representing the criteria to construct a rank-1 \(d \times d\) matrix from \(2d-1\) entries. In \(\mathbf{(a)}\) and \(\mathbf{(b)}\), no complete cycles are formed between the row-column nodes, meaning that a rank-1 \(d \times d\) matrix can be constructed from the given entries. In \(\mathbf{(c)}\), a complete loop is formed, meaning that the given entries cannot be used to construct a rank-1 matrix

In this paper, we use the rank shrinkage procedure known as the Eckart-Young theorem [35] to compute the rank-1 density matrix from less measurement setting. This theorem states that the best low-rank approximation of a given matrix can be achieved by taking its singular value decomposition (SVD) and preserving only the largest singular values and their respective singular vectors. For a matrix A, the rank-k approximation of \(A_{k}\) is obtained by retaining only the k largest singular values and their corresponding singular vectors:

$$\begin{aligned} A_{k}=\sum_{i=1}^{k} \lambda _{i}u_{i}v_{i}^{\dagger }, \end{aligned}$$
(1)

where \(\lambda _{i}\) are the singular values, \(u_{i}\) and \(v_{i}\) are the corresponding left and right singular vectors. For any matrix A, its best rank-k approximation is given as

$$\begin{aligned} \Vert A-A_{k} \Vert _{F}\leq \Vert A-B \Vert _{F}, \end{aligned}$$
(2)

where \(\|\cdot \| _{F}\) is the Frobenius norm and B any rank-k matrix. This remarks that SVD also gives the best low rank approximation in spectral norm [36]. This technique find applications in data compression, noise reduction, and dimensionality reduction. In the context of quantum state tomography, the theorem facilitates the reconstruction of best low-rank quantum states from incomplete measurements settings.

In our algorithm, we perform local Pauli measurements on each subsystem of multipartite pure quantum state. We first employ the computational basis measurement to obtain the diagonal elements of the unknown density matrix. Next, we measure n-qubit systems in Pauli measurement setting

$$\begin{aligned} \Lambda _{j}^{i}=\sigma _{z}^{\otimes i-1} \otimes \sigma _{j}^{i} \otimes \sigma _{z}^{\otimes n-i}. \end{aligned}$$
(3)

Here, i denotes the qubits’s index and j denotes the Pauli operator index, which can be either 1 or 2. The index i ranges \(i=1,2,\ldots ,n\), where \(\sigma _{j}^{i} \in \{\sigma _{1} ,\sigma _{2} \}\) represents Pauli X (\(\sigma _{1}\)) and Pauli Y (\(\sigma _{2}\)) matrices.

We begin by assuming that we have access to N copies of a n-qubit multipartite unknown pure state . In the simulation presented in the following section, for the sake of simplicity, we allocate an equal number of copies for all measurement settings. Specifically, we measure each of the \(2n+1\) bases using \(N/(2n + 1)\) shots. In the first step of our algorithm, we obtain the diagonal elements of ρ by measuring \(N/(2n + 1)\) of its copies in the computational basis of the d-dimensional Hilbert space. From the measurement results, diagonal elements of ρ can be directly obtained as

$$\begin{aligned} \hat{\rho}_{i,i} = \frac{ ( 2n + 1 )N_{i}}{N}, \quad \text{for } i \in \mathbb{Q}_{d}, \end{aligned}$$
(4)

where \(\mathbb{Q}_{d} = \{0, 1, \ldots , d - 1 \}\), \(N_{i}\) is the number of times measurement result corresponding to was obtained in the first step and ρ̂ denotes an estimate of ρ.

The off-diagonal element \(\rho _{j, k}\) of ρ can be obtained by measuring it in the eigenbasis of Pauli operators pair \(\Lambda _{1}^{i}\) and \(\Lambda _{2}^{i}\). This can be seen by first noticing that the eigenvectors of \(\Lambda _{1}^{i}\) and \(\Lambda _{2}^{i}\) are

(5)
(6)

where \(\nu \in \mathbb{Q}_{\frac{d}{2^{i}}}\), \(\zeta \in \mathbb{Q}_{2^{i - 1}}\) and the basis sets are constructed from all possible combinations of values in ν, ζ and i qubits.

These orthonormal bases build a complete projector system with elements

(7)
(8)

where \(x\in \{1, 2 \}\), \(j=2^{i} \nu +\zeta \) and \(k=2^{i} \nu +\zeta +2^{i-1}\). Let \(p_{x, m}^{j, k}\) be the probability of obtaining the measurement outcome corresponding to the projector \(\Pi _{x, m}^{j, k}\). Then, we have

$$\begin{aligned} &p_{1, -1}^{j, k}= \frac{1}{2} ( \hat{\rho}_{j, j} - \hat{\rho}_{j, k} - \hat{\rho}_{k, j} + \hat{ \rho}_{k, k} ) \end{aligned}$$
(9)
$$\begin{aligned} &p_{1, 1}^{j, k}= \frac{1}{2} ( \hat{\rho}_{j, j} + \hat{\rho}_{j, k} + \hat{\rho}_{k, j} + \hat{ \rho}_{k, k} ) \end{aligned}$$
(10)
$$\begin{aligned} &p_{2, -1}^{j, k}= \frac{1}{2} ( \hat{\rho}_{j, j} +\dot{\iota} \hat{\rho}_{j, k} - \dot{\iota}\hat{\rho}_{k, j} + \hat{\rho}_{k, k} ) \end{aligned}$$
(11)
$$\begin{aligned} &p_{2, 1}^{j, k}= \frac{1}{2} ( \hat{\rho}_{j, j} -\dot{\iota} \hat{\rho}_{j, k} + \dot{\iota}\hat{\rho}_{k, j} + \hat{\rho}_{k, k} ) , \end{aligned}$$
(12)

where is the element of ρ at \((j, k)\)th index. From the hermiticity of ρ, we have \(\rho _{k, j} = \rho _{j, k}^{*}\). Using this fact, we get \(\rho _{j, k} + \rho _{k, j} = 2 \operatorname{Re} \{ \rho _{j, k} \}\) and \(\rho _{j, k} - \rho _{k, j} = 2 \operatorname{Im} \{ \rho _{j, k} \}\). By subtracting equation (9) from (10) and equation (11) from (12), and then combining the results while utilizing the facts about the real and imaginary components of \(\hat{\rho }_{j, k}\), we can derive the value of \(\hat{\rho }_{j, k}\) as

$$\begin{aligned} \hat{\rho }_{j,k}=\frac{1}{2} \bigl(-p_{1,-1}^{jk}+p_{1,1}^{jk}- \dot{\iota } p_{2,-1}^{jk}+\dot{\iota } p_{2,1}^{jk} \bigr). \end{aligned}$$
(13)

From \(\hat{\rho}_{j,k}\), we can easily get \(\hat{\rho}_{k,j}=\hat{\rho}_{j,k}^{*}\). This setup provides us with a sufficient number of elements to fill in the missing entries of the density matrix. Let ρ̂ be \(d \times d\) matrix containing all entries obtained from measurement operators along with missing entries at \((i,j ) \in \Delta \), i.e.,

$$\begin{aligned} \Delta =\bigl\{ (i,j ): \hat{\rho}_{i,j} \text{ is missing entry}\bigr\} . \end{aligned}$$
(14)

Several methods exist for imputing missing entries in a density matrix, such as substituting them with zeros or calculating the average of the respective column or row. However, the choice of initial imputation is less critical since our algorithm will update only these missing values while preserving the values obtained from measurement operators [37, 38]. Let \(\hat{\rho }_{:,j}\) denotes the j-th column of the density matrix ρ̂. We calculate the missing entries by taking the average of the each column in the density matrix as

$$\begin{aligned} \hat{\rho } (\Delta )=\operatorname{mean} ({\hat{\rho }}_{:,j} ), \quad \forall (i,j) \in \Delta . \end{aligned}$$
(15)

We can also detect if an unknown quantum state is pure using our algorithm without the need for additional measurements. A density matrix ρ is considered pure if the equation

$$\begin{aligned} \vert \rho _{i,j} \vert ^{2}= \vert \rho _{i,i} \vert \vert \rho _{j, j} \vert \end{aligned}$$
(16)

holds for every \(i,j=1,2,\ldots ,d\). We can verify the purity of the unknown state by using Equation (16) on the measured structure from Fig. 2 and applying it to elements of the constructed density matrix.

Figure 2
figure 2

Experimental setup of the low-rank matrix-completion quantum state tomography. The green color represents the entries that are obtained experimentally. The light green color shows only the real part of the entries of the matrix. We first obtain the diagonal entries of the rank-one matrix using computational-basis measurement. Using \(U=H\) in the above circuit enables us to obtain the real component of the entries while using \(U=S^{\dagger}H\) provides the Imaginary components of entries

The complete algorithm for constructing the density matrix of a pure quantum state ρ is as follows:

  1. 1.

    Measure ρ in the computational basis to obtain the diagonal entries of the density matrix through Equation (4).

  2. 2.

    Obtain entries of the density matrix \(\hat{\rho}_{j,k}\). These entries are obtained by measuring in all Pauli operators measurement setting of Equation (3) and using Equation (13) as described above.

  3. 3.

    Fill all the missing entries \(\hat{\rho}_{i,j}\) using (15).

  4. 4.

    Perform the singular value decomposition of the density matrix

    $$\begin{aligned} \hat{ \rho }=L\Sigma R^{\dagger }, \end{aligned}$$
    (17)

    where Σ is a diagonal matrix containing singular values entries on its diagonal as \(\lambda _{1},\lambda _{2}, \ldots ,\lambda _{d}\) and L (and R) is the left (and right) orthogonal matrix of dimension d.

  5. 5.

    Shrink the singular values of ρ̂ by setting singular-values as

    $$\begin{aligned} \hat{\lambda }_{i}= \textstyle\begin{cases} \lambda _{i}-\lambda _{r+1}, & \text{for } i\leq r \\ 0 , & \text{for } i> r \end{cases}\displaystyle \end{aligned}$$
    (18)

    where r is the rank of the density matrix and we obtain the new diagonal matrix Σ̂ with entries \(\hat{\lambda }_{1},\hat{\lambda }_{2}, \ldots ,\hat{\lambda }_{d}\). Since a pure state in quantum mechanics has a density matrix with only one non-zero eigenvalue, its rank is equal to 1, meaning \(r=1\).

  6. 6.

    Replace diagonal matrix Σ with Σ̂ to obtain

    $$\begin{aligned} \hat{\sigma }=L\hat{\Sigma } R^{\dagger }. \end{aligned}$$
    (19)
  7. 7.

    Update only the missing entries while keeping the entries obtained from measurement unchanged

    $$\begin{aligned} \hat{\rho } (\Delta )=\hat{\sigma } (\Delta ) , \quad \forall (i,j) \in \Delta . \end{aligned}$$
    (20)
  8. 8.

    Repeat steps 4-7 until \(\|\hat{\rho }_{\mathrm{iter}}-\hat{\rho }_{\mathrm{iter}-1}\|_{F} \leq \epsilon \), where ϵ is some tolerence, is reached either after p times or after K iterations.

A schematic diagram of the experimentally obtained density matrix is shown in Fig. 2 where

$$\begin{aligned} H=\frac{1}{\sqrt{2}} \begin{bmatrix} 1 &1 \\ 1&-1 \end{bmatrix}, \quad \text{and} \quad S^{\dagger}= \begin{bmatrix} 1 &0 \\ 0&e^{-\frac{\dot{\iota}\pi}{2}} \end{bmatrix}. \end{aligned}$$
(21)

and the complete procedure is outlined in Algorithm 1. The convergence of this iterative approach is discussed in [3739], which addresses the norm minimization problem. Here, the iterative process is governed by two main stopping criteria:

  • Tolerance: A predefined threshold for the Frobenius norm of the difference between successive density matrix estimates, ensuring that iterations continue until the estimate stabilizes within this threshold.

  • Patience: A limit on the number of iterations to perform without significant improvement, preventing endless iteration in cases of slow convergence.

Algorithm 1
figure a

Pure State Quantum Tomography by Matrix Completion

Our proposed algorithm demonstrates effective performance across a broad spectrum of quantum states. However, the algorithm struggles to reconstruct excessively sparse quantum states. It can accurately reconstruct Greenberger-Horne-Zeilinger (GHZ) states of the form , but it encounters difficulties with states like , failing to account for the imaginary component. We obtain the same density matrix from the reconstruction of the and states.

3 Results

To gauge the accuracy of state tomography, we use the common figure of merit, infidelity, which characterizes the distance between these states. Infidelity is defined as

$$\begin{aligned} 1-F (\rho ,\sigma )=1- (\operatorname{\mathrm{tr}}\sqrt{\sqrt{\sigma}\rho \sqrt{\sigma}} )^{2}, \end{aligned}$$
(22)

where \(F (\rho ,\sigma )\) is the fidelity between ρ and σ.

Our proposed algorithm is compared to two existing techniques, the five-basis method, and the scalable estimation method, in order to evaluate its performance. The five-basis method employs entangled basis measurements to reconstruct pure quantum states, while the scalable estimation method relies on local basis measurements. To assess the accuracy of each method, we generated 102 randomly selected pure quantum states according to the Haar distribution, with n varying from 2 to 5, and plotted the median infidelity as a function of the number of shots for each. The comparison of these experimental simulated results is demonstrated in Fig. 3 and shows that our algorithm outperforms both the five-basis and scalable estimation methods, as it exhibits lower median infidelity.

Figure 3
figure 3

Median Infidelities of 102 randomly generated pure state of qubits \(n=2,3,4,5\) from LRMC (proposed), Scalable Estimation [33] and Five Basis [27] as a function of a number of total measurements. The performance of LRMC improves as compared to the Scalable Estimation and Five Basis as the number of qubits increases

Our technique has been experimentally verified using a 7-qubit IBMQ-Jakarta superconducting quantum computer [40]. This device, with average measurement and CNOT errors of \(2.220e^{-2}\) and \(7.511e^{-3}\) respectively, is used to implement our algorithm. The circuit design, shown in Fig. 2, is used to generate 102 Haar-random pure three-qubit states on the real IBMQ-Jakarta device. The median fidelity results are then plotted as a kernel density estimate (KDE) in Fig. 4, along with the least square with known rank one projection. These numerical results demonstrate the precision of our algorithm in benchmarking cloud-based IBM quantum devices, as compared to the projected least square.

Figure 4
figure 4

Fidelities of 3-qubit Haar-random states for different number of experiments. The median values were computed for 102 states on real IBMQ-Jakarta device. The random states were generated using the Haar measure. The graph compares the performance of LRMC with the projected least squares (LSTSQ) [15] of known rank one. It’s evident that our algorithm (LRMC) is performing better in terms of state reconstruction when the state preparation error gets higher on a real quantum computer

We observe that the state preparation error associated with generating random quantum states on a real quantum computer becomes increasingly dominant as the number of qubits increases. To overcome this challenge, we utilized GHZ states, which are a class of entangled quantum states that are easy to prepare on real quantum hardware. An n-qubit GHZ state is shown as

(23)

In Fig. 5, we employ a different device, IBMQ-Manila, for our experiment. The KDE of the median fidelity for 11 GHZ states with \(n=3,4,5\) qubits is plotted, using 213 shots. This device has an average readout and CNOT error of \(2.110e^{-2}\) and \(6.33e^{-3}\), respectively. Our algorithm is able to reconstruct GHZ states with a median fidelity of over 86% for up to five qubits on real IBM devices.

Figure 5
figure 5

In this experiment, we reconstruct GHZ quantum states with qubit numbers \(n=3,4,5\) on the real IBMQ-Manila device. The fidelity was calculated and its kernel density estimate (KDE) was plotted. The results of this experiment provide insight into the reconstruction performance of GHZ states on the real quantum hardware and the ability to accurately prepare these states on the IBMQ-Manila device

4 Conclusion

The proposed algorithm in this paper offers a significant advancement in the estimation of pure states on NISQ devices. By relying on local measurements and local gates, it provides a computationally efficient solution that is less susceptible to errors and decoherence. The implementation of local Pauli bases with simple gates such as H and S contributes to the improved accuracy of the algorithm. Additionally, the reduced circuit depth of the algorithm can have a crucial impact in mitigating the negative effects of gate errors and decoherence that are prevalent in real quantum devices. Overall, this algorithm for estimating pure states has the potential to play a crucial role in improving the accuracy of estimation and benchmarking tasks on NISQ devices. Moreover, its possible extension to mixed states through carefully designed measurements and higher rank approximations could further enhance its applicability in quantum computing. Thus, this algorithm holds great promise for advancing the capabilities of NISQ devices and bringing us closer to practical quantum computing applications.