0
$\begingroup$

I'm trying to understand, given a specific Hamiltonian, for example $H = Z\otimes Z+X\otimes Z$, does the VQE algorithm calculates the expectation value of $Z\otimes Z$ first or does it calculates the expectation value of $X\otimes Z$ first? couldn't understand it from the source code.

Thank you very much!

$\endgroup$
  • 1
    $\begingroup$ If you use IBM hardware, you can look at the order of the circuit being executed on the hardware and see which one is being executed first. $\endgroup$ – KAJ226 Oct 15 at 17:00
  • $\begingroup$ I see you found your answer, but why would matter though which one it measure first? $\endgroup$ – A. Jahin Oct 15 at 18:15
0
$\begingroup$

Thank you for your answers. After a check it appears that the VQE algorithm processes first the rightmost expression and only then the leftmost. i.e. it first processes $X\otimes Z$ and then $Z\otimes Z$

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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