# RZZ calculation: Why does the equation and the circuit correspond?

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

When i do the math i come to this conclusion:

(result of CNOT - RZ - CNOT)

and this

(result of e^{...} - equation)

When i change the equation to

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?

• 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 2 days ago