0
$\begingroup$

i found this tutorial about MaxCut and QAOA from pennylane and i do not understand how the equation and the circuit should be equal.

enter image description here

When i do the math i come to this conclusion:

enter image description here (result of CNOT - RZ - CNOT)

and this

enter image description here (result of e^{...} - equation)

When i change the equation to

enter image description here

So if I remove the identity matrix and the minus sign, I get the result of the circuit, but is that correct? And if so, why?

Thanks for your help!

$\endgroup$
6
  • 1
    $\begingroup$ The matrix only has to be equal up to a scalar factor for the operation to be correct. Unless you are going to be applying operation modifiers such as controlling the two qubit gate with a third qubit, in which case the scalar factor becomes relevant. $\endgroup$ 2 days ago
  • $\begingroup$ Just adding to what @Craig said, divide the first matrix by $e^{-it/2}$ and you’ll see how they are equal up to a global phase $\endgroup$
    – epelaaez
    2 days ago
  • $\begingroup$ Ok, thank you both. Is there some easy way to check if they are equal up to a global phase? When i divide the first matrix by 𝑒−𝑖𝑡/2 and then calculate the hermite conjugate matrix from it or take the inverse , it's equal to the second one in my question. So maybe this could be some note for a global phase or is this just because it's a unitary matrix? $\endgroup$
    – grafix
    2 days ago
  • $\begingroup$ i mean Hermitian operator instead of unitary matrix. $\endgroup$
    – grafix
    2 days ago
  • $\begingroup$ please note that you can use mathjax to add equations to the post. See e.g. quantumcomputing.meta.stackexchange.com/questions/49 $\endgroup$
    – glS
    yesterday

Your Answer

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

Browse other questions tagged or ask your own question.