1
$\begingroup$

Can help to explain how to get -1 and 1 for 2 qubits VQE with $\langle XY\rangle$ since we have 4 states $|00\rangle,|01\rangle,|10\rangle,|11\rangle$? For the case of 1 qubit, it is straight forward $|0\rangle$ is 1 , $|1\rangle$ is -1.

$\endgroup$
2
  • 2
    $\begingroup$ Please do not use images for text. The practice hurts everyone's ability to search for content on the site. $\endgroup$ Aug 29 at 5:14
  • 1
    $\begingroup$ i removed the image $\endgroup$
    – cometta
    Aug 29 at 8:36
3
$\begingroup$

Once you apply the rotations to change the basis back to the computational basis ($Z$ basis) then it's just the parity check, odd parity gives $-1$ and even parity gives $1$. So in this case, where you are measuring $\langle ZZ \rangle$ (after applying the $H$ to the first qubit and $S^\dagger H$ to the second qubit), you have $$ |00\rangle, |11\rangle \rightarrow +1 \hspace{2 cm} |01\rangle, |10 \rangle \rightarrow -1 $$ So if you did $1000$ measurements and recorded $700$ times the state $|00\rangle$, and $300$ times the state $|10\rangle$ then your expectation is, in this case, $\dfrac{700\cdot (1) + 300 \cdot (-1)}{100} = 0.4 $

$\endgroup$
2
  • 1
    $\begingroup$ is the odd/even parity that you mentioned applicable for more qubits? 3 qubits,4qubits etc? just see whether the binary is even and odd and assign -1 or 1 ? $\endgroup$
    – cometta
    Aug 29 at 8:23
  • 1
    $\begingroup$ Yes. You can extend this to higher number of qubits. But note that if $IZ$ then you only count the index at $Z$.. in this case, it is the same as a single qubit since you do nothing at $I$. $\endgroup$
    – KAJ226
    Aug 29 at 8:46

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.