Quantum tomography is the process of discovering features of an unknown quantum state ρ (refs 1, 2). Quantum tomography is a widely used tool with important practical applications in communication systems such as optical channels, precision measurement devices such as atomic clocks, and quantum computation. The basic assumption of quantum tomography is that one is given multiple copies of ρ in a d-dimensional Hilbert space, for example, states of atoms in an atomic clock or inputs and outputs of a quantum channel. A variety of measurement techniques allow one to extract desired features of the state. For example, recent developments have shown that quantum compressed sensing can give significant advantages for determining the unknown state or dynamics of a quantum system, particularly when that state or dynamics can be represented by low-rank or sparse matrices3,4,5,7,8. The spectral decomposition of a matrix represents the matrix in terms of its eigenvectors and corresponding eigenvalues. The optimal low-rank approximation of a matrix can be constructed from the spectral decomposition by discarding the eigenvalues and corresponding eigenvectors below a given threshold. This procedure is frequently called principal component analysis (PCA), and can be used, for example, to construct the low-rank approximation of the positive semidefinite symmetric covariance matrix of sampled random vectors9,10. The cost of PCA is prohibitive when one is presented with a large number of high-dimensional vectors6.

Conventional quantum state tomography operates by making measurements on multiple copies of the state: the state plays a passive role. This paper shows that the state can play a dynamic role in its own analysis. In particular, we show that multiple copies of the state ρ can be used to implement the unitary operator eiρt: that is, the state functions as an energy operator or Hamiltonian, generating transformations on other states. Thus, multiple copies of a density matrix can be used to reveal the matrix’s eigenvectors and eigenvalues in quantum form. With further processing and measurements, this density matrix exponentiation can provide significant advantages for quantum tomography. Moreover, it allows us to perform quantum PCA (qPCA) of an unknown low-rank density matrix to construct the eigenvectors corresponding to the large eigenvalues of the state (the principal components) in time O(log d), an exponential speed-up over existing algorithms. We also show how qPCA can provide new methods of state discrimination and cluster assignment.

Suppose that one is presented with n copies of ρ. A simple trick allows one to apply the unitary transformation eiρt to any density matrix σ up to nth order in t. Note that

Here trP is the partial trace over the first variable and S is the swap operator. S is a sparse matrix and its elements are efficiently computable, so eiSΔt can be performed efficiently11,12,13,14. Repeated application of (1) with n copies of ρ allows one to construct eiρnΔtσeiρnΔt. Comparison with the Suzuki–Trotter theory of quantum simulation11,12,13,14 shows that to simulate eiρt to accuracy ε requires n = O(t2ε−1|ρ − σ|2) ≤ O(t2ε−1) steps, where t = nΔt and | | is the sup norm. Thus, simply performing repeated infinitesimal swap operations on ρ σ allows us to construct the unitary operator eiρt. The quantum matrix inversion techniques of ref. 15 then allow us to use multiple copies of a density matrix ρ to implement eig(ρ) efficiently for any simply computable function g(x).

Note that density matrix exponentiation is most effective when some of the eigenvalues of ρ are large. If all of the eigenvalues are of size O(1/d) then we require time t = O(d) to resolve the eigenvalues15. In contrast, if the density matrix is dominated by a few large eigenvalues—that is, when the matrix is well represented by its principal components—then the method works well (the accuracy will be analysed below). In this case, there exists a subspace of dimension R d such that the projection of ρ onto this subspace is close to ρ: ρ − PρP1 ≤ ε, where P is the projector onto the subspace. When the matrix is of low rank, the projection is exact. Present techniques for matrix exponentiation are efficient when the matrix to be exponentiated is sparse13,14. The construction here shows that non-sparse but low-rank matrices can also be exponentiated efficiently as long as multiple copies of the corresponding density matrix are available.

Density matrix exponentiation now allows us to apply the quantum phase algorithm to find the eigenvectors and eigenvalues of an unknown density matrix. If we have n copies of ρ, we use the ability to apply eiρt to perform the quantum phase algorithm1. In particular, the quantum phase algorithm uses conditional applications of eiρt for varying times t to take any initial state |ψ〉|0〉 to , where |χi〉 are the eigenvectors of ρ, are estimates of the corresponding eigenvalues, and ψi = 〈χi|ψ〉. In refs 16, 17 it was shown that the ability to apply an unknown unitary does not automatically translate into the ability to apply the unitary in a conditional fashion. Here, in contrast, the conditional operation can be performed simply by replacing the SWAP operator with a conditional SWAP in the derivation above. More precisely, taket = nΔt, and apply the unitary to the state

where σ = |χ〉〈χ| and Sj swaps σ with the jth copy of ρ. Taking the partial trace over the copies of ρ yields the desired conditional operation |t〉|χ〉 → |t〉eiρt|χ〉. Inserting this conditional operation in the quantum phase algorithm and using the improved phase-estimation techniques of ref. 15 yields the eigenvectors and eigenvalues to accuracy ε by applying the quantum phase algorithm for time t = O(ε−1), and so requires n = O(1/ε3) copies of the state ρ. Using ρ itself as the initial state, the quantum phase algorithm yields the state

Sampling from this state allows us to reveal features of the eigenvectors and eigenvalues of ρ. The use of multiple copies of a state to construct its eigenvectors and eigenvalues will be referred to here as qPCA.

As above, qPCA is useful if ρ has small rank R or admits a rank R approximation. In this case, only the largest R eigenvalues will register as non-zero in the eigenvector/eigenvalue decomposition (2). Using mn copies of ρ we obtain m copies of the decomposition (2), where the ith eigenvalue ri appears rim times. The features of the ith eigenstate can then be determined by performing a quantum measurement to obtain the expectation value 〈χi|M|χi〉 of the eigenvector with eigenvalue ri for desired Hermitian M. As long as M is sparse11,12,13,14 or efficiently simulable by the methods given in this paper, this measurement can itself be performed in time O(log d). qPCA efficiently reveals the eigenvectors and eigenvalues of the unknown density matrix ρ and allows one to probe their properties. For example, in many-body quantum systems in condensed phase, such as correlated electronic systems and chemical systems, it is of significant importance to simulate certain physical and chemical properties of interest (such as correlation functions, dipole moments, state-to-state transitions, tunnelling rates, chemical reactions) when we know the system is in the ground state or first few excited states. Our quantum algorithm could be used to estimate such observables on the corresponding eigenvectors.

As an application to data analysis, suppose that the density matrix corresponds to the covariance matrix of a set of data vectors ai Cd that can be generated in quantum parallel using an oracle. As will now be shown, qPCA then allows us to find and to work with the directions in the data space that have the largest variance in time O(log d). Define the covariance matrix Σ = AA, where A has columns aj, not necessarily normalized to 1. In quantum-mechanical form, where |ei〉 is an orthonormal basis, and the |ai〉 are normalized to 1. Assume that we have quantum access to the columns |ai〉 of A and to their norms |ai|. That is, we have a quantum computer or quantum random access memory18,19,20 that takes |i〉|0〉|0〉 → |i〉|ai〉||ai|〉. Quantum random access memory requires O(d) hardware resources to store all of the coefficients of the vectors and O(d) switches to make them accessible but allows access to the data in O(log d) operations. As in ref. 21, quantum access to vectors and norms allows us to construct the (unnormalized) state : the density matrix for the second register is proportional to Σ. Using n = O(t2ε−1) copies of Σ/trΣ allows us to implement eitΣ/trΣ to accuracy ε in time O(n log d). Our method allows us to exponentiate any low-rank matrix Σ in time O(log d) as long as it is presented to us in Gram form Σ = AA, and we are given quantum access to the columns of A. In contrast, existing methods using the higher order Suzuki–Trotter expansion11,12,13,14 require O(d log d) operations to exponentiate non-sparse Hamiltonians. Density matrix exponentiation extends the efficient implementation of eiΣt to a large class of non-sparse but low-rank matrices Σ.

qPCA for quantum states can be extended to quantum processes by using the Choi–Jamiolkowski state for a completely positive map (ref. 22). For a comprehensive review of the Choi–Jamiolkowski isomorphism in the context of quantum state and process tomography see ref. 2, including a detailed resources analysis of various entanglement-assisted protocols. For quantum channel tomography, for example, the Choi–Jamiolkowski state is obtained by sending half of a fully entangled quantum state down the channel. qPCA can then be used to construct the eigenvectors corresponding to the dominant eigenvalues of this state: the resulting spectral decomposition in turn encapsulates many of the most important properties of the channel22.

qPCA is a new state- and process-tomography primitive that reveals eigenvectors and eigenvalues of density matrices. To get a clearer picture of the advantages and disadvantages of qPCA, it is useful to compare it with quantum compressed sensing3,4,5,7,8, a powerful method for performing tomography on sparse and low-rank density matrices. The primary difference is that qPCA constructs eigenvectors and associates them with the corresponding eigenvalues in time O(R log d): the eigenvectors are then available in quantum form so that their properties can be tested by measurement, and correlated with the eigenvalues. Compressed sensing, in contrast3,4,5,7,8, is a state- and process-tomography method that reconstructs a classical description of the full density matrix in time O(Rd log d). Only single-qubit preparations and measurements are employed. qPCA could also be used to perform state tomography on the eigenvectors, revealing their components in time O(Rd log d). This classical description of the eigenvalues and eigenvectors can then be used to reproduce the full density matrix in time O(Rd log d), the same as in quantum compressed sensing but relying on the multi-qubit infinitesimal swap operation. In contrast, to construct the eigenvectors and eigenvalues using compressed sensing one must first reconstruct the density matrix and then diagonalize it, which takes time >O(d2logR + dR2) by randomized algorithms for low-rank matrices6. It can be shown by information-theoretic arguments that finding a low-rank approximation by sampling without prior knowledge is lower bounded by Ω(d) (ref. 23). qPCA can be compared to group-representation-based methods for estimating the spectrum and eigenvectors of a density matrix24,25,26. These methods reveal the spectrum24,25,26 in time O(poly(log d)) but take time O(d2) to reconstruct the eigenvectors26.

qPCA can also be useful in state discrimination and assignment27. For example, suppose that we can sample from two sets of m states, the first set {|ϕi〉} characterized by a density matrix and the second set {|ψi〉} characterized by a density matrix σ = (1/m)∑ i|ψi〉〈ψi|. Now we are given a new state |χ〉. Our job is to assign the state to one set or the other. Density matrix exponentiation and quantum phase estimation then allow us to decompose |χ〉 in terms of the eigenvectors and eigenvalues of the ρσ:

where |ξj〉 are the eigenvectors of ρσ and xj are the corresponding eigenvalues. Measure the eigenvalue register, and assign |χ〉 to the first set if the eigenvalue is positive and to the second set if it is negative. If |χ〉 is selected from one of the two sets, this procedure is simply minimum error state discrimination1, but exponentially faster. As a bonus, the magnitude of the measured eigenvalue is a measure of the confidence of the set assignment measurement: larger magnitude eigenvalues correspond to higher confidence in the assignment, and magnitude 1 corresponds to certainty—in this case |ξ〉 is orthogonal to all of the members of one of the sets. If |χ〉 is some other vector, then the method provides a method for supervised learning and cluster assignment9,10,21,28: the two sets are training sets and the vector is assigned to the set of vectors to which it is more similar.


Density matrix exponentiation represents a powerful tool for analysing the properties of unknown density matrices. The ability to use n copies of ρ to apply the unitary operator eiρt allows us to exponentiate non-sparse d-dimensional matrices to accuracy ε = O(t2/n), and to perform qPCA to construct the eigenvectors and eigenvalues of a low-rank matrix ρ in time O(R log d). Like quantum matrix inversion14, qPCA maps a classical procedure that takes time polynomial in the dimension of a system to a quantum procedure that takes time polynomial in the logarithm of the dimension. This exponential compression means that qPCA can reveal only a fraction of the full information required to describe the system. That particular fraction of information can be very useful, however, as the ability of density matrix exponentiation to reconstruct its principal components shows.

We anticipate that qPCA can play a key role in a variety of quantum algorithms and measurement applications. As the example of quantum cluster assignment shows, qPCA could be useful for speeding up machine learning problems such as clustering and pattern recognition8,9,20,26. The ability to identify the largest eigenvalues of a matrix together with the corresponding eigenvectors is potentially useful for the representation and analysis of large amounts of high-dimensional data.