I'm learning VQE(variational quantum eigensolver) of qiskit, but I have a question about how it measures the expected value of the energy ($\left \langle H \right \rangle$). I saw in other question and they comment that qiskit use $\left \langle H \right \rangle = \langle \psi | H |\psi \rangle = \sum_{i} \lambda_{i} P_{i} $ where $P_{i}=|\langle \phi_{i}|\psi \rangle|^2$. But my question is if qiskit needs the eigenvector of the operator, why does it use a VQE? Is qiskit has the diagonal representation already or how does qiskit do to measure the energy in a simulator and real device?


1 Answer 1


The output of variational quantum eigensolver(VQE) is a number(the ground state energy of molecules), see qiskit document.

This output has the form of a number, so this can de draw from a few measurements, or we are only focusing on part of the information the quantum state contains. This feature helps us to reduce the resource requirement significantly if we need to know the detailed state vector of the state the technique we need is the quantum state tomography(an expensive technique). For example, for a $n$-qubit state, mathematically it can be described by a $2^n$ dimensional normed-one vector, and what state tomography do is to extract all these, say numbers.

So if you are using a classical computer to simulate a quantum computer, then VQE is not useful because you do have all the matrices and vectors. But if you are using real quantum devices then to avoid the resource-consuming quantum tomography then you have to choose your target wisely.

I am new to the field of quantum tomography, so if you have problems or my statement is confusing, give me some time, please.

  • 2
    $\begingroup$ Really the question is, how does a real quantum computer to measuare a expected value using a state obtained of a quantum tomography? $\endgroup$ Commented Dec 15, 2020 at 3:58
  • $\begingroup$ e.g., we can use the state vector to get the density matrix, and then techniques of linear algebra can help us solve the eigenvalue of a density matrix. Since the exponential growth of the Hilbert space this method sounds not that efficient. $\endgroup$ Commented Dec 15, 2020 at 6:51
  • $\begingroup$ This method is not efficient and is not possible to apply in real quantum computer. $\endgroup$ Commented Dec 15, 2020 at 16:24
  • $\begingroup$ This method isn't an efficient one but actually, it is applying since we do not have any other way to obtain the density matrix or the unitary matrix of a quantum operation. After all, this inability to characterize a quantum state(or density matrix) fast gives meaning to why VQE is useful. $\endgroup$ Commented Dec 16, 2020 at 1:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.