XX, YY, ZZ circuit representations?

Is there a good primer or set of lectures\examples that show entirely how to take a given matrix and developing a circuit that represents it. I am trying to implement a program to find the lowest Eigenvalue - VQE approach - using quantum circuits. So far, what I have done, using tutorials I found, is as follows:

$$H_{total} = H_1(\theta_1) + H_2(\theta_2) + H_3(\theta_3)$$

I have been relying on simulating each term of the hamiltonian, the $$H_i$$, as separate circuits and measuring the expected values as $$\theta_i$$ changes.

However, as I have been told by my TA that one cannot simulate the hamiltonians separately to find the ground state.

• Hi Enrique. How I understand VQE one doesn't need to evaluate the Hamiltonian H. One needs to represent H as a sum of Pauli terms and try to find the expectation values of each Pauli term without evaluation. Here is a link to my tutorial for VQE, where I didn't evaluate the Hamiltonian or a part of it. github.com/DavitKhach/quantum-algorithms-tutorials/blob/master/… Feb 22 '20 at 7:55
• Hi, I actually followed your tutorials ! Thanks for the feedback! Feb 22 '20 at 8:10
• I am actually a bit confused. I am wondering how I can in one circuit have the hamiltonian rather than what I am currently doing: creating two circuits, one representing XX + YY since they commute, and another representing ZZ? Feb 22 '20 at 8:11
• One question do you want to find minimal eigenvalue of your presented $H_{total}$? If yes then why you are changing it with $\theta$s? I think $H_{total}$, in that case, shouldn't be changed Feb 22 '20 at 8:31
• In VQE we are changing the prepared state. And we don't evaluate $XX$ or $YY$, we just measure the $\left\langle \psi \right| XX \left| \psi \right\rangle$, where $\psi$ is our prepared state. How calculate the $\left\langle \psi \right| XX \left| \psi \right\rangle$? We just simply measure what is the probability of measuring eigenvectors of $XX$ that have +1 eigenvalue ($\left| ++ \right\rangle$, $\left| -- \right\rangle$) and substarcting the probability of measuring eigenvectors of $XX$ that have -1 eigenvalue ($\left| +- \right\rangle$, $\left| -+ \right\rangle$). Feb 22 '20 at 8:33