Closed MatteoRobbiati closed 2 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 99.99%. Comparing base (
d8cc501
) to head (8513ff0
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Yes, it is because $GPI2(0)=\sigma_x$, $GPI2(\pi/2)=\sigma_y$, $GPI2(\pi)=-\sigma_x$ and $GPI2(3\pi/2)=-\sigma_y$, where $\sigma_j$ are the Pauli matrices.
Yes, it is because GPI2(0)=σx, GPI2(π/2)=σy, GPI2(π)=−σx and GPI2(3π/2)=−σy, where σj are the Pauli matrices.
I don't see it from the $GPI2$ matrix representation.
Sorry, you are right. This happens for the GPI
gate but not for GPI2
.
It can be checked that it is a Clifford with the following code:
paulis = [gates.X(0).matrix(), gates.Y(0).matrix(), gates.Z(0).matrix()]
for p in paulis:
for t in [0, np.pi/2, np.pi, 3*np.pi/2, 2*np.pi]:
gate = gates.GPI2(0, t).matrix()
gate1 = gate@p@gate.transpose().conj()
print(gate1)
That's an error: GPI2 is always a rotation by $\pi/2$, not $\pi$. So, they are square roots of Pauli's.
E.g., cf. https://ionq.com/docs/getting-started-with-native-gates#gpi2
In the previous code I was printing gate
instead of gate1
. Now it can be seen that it maps paulis to paulis up to phases.
@AlejandroSopena of course, my comment was referred not to the one directly above, but to the previous one, i.e. https://github.com/qiboteam/qibo/pull/1399#issuecomment-2255730701
Checklist: