Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
renatomello committed Feb 11, 2024
1 parent a810974 commit 7b03730
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/qibo/backends/tensorflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,23 +235,23 @@ def RXXYY(self, theta):
def MS(self, phi0, phi1, theta):
plus = self.np.exp(1.0j * (phi0 + phi1))
minus = self.np.exp(1.0j * (phi0 - phi1))

cos, sin = self.np.cos(theta / 2) + 0j, self.np.sin(theta / 2) + 0j
return self.tf.cast(
[
[
self.np.cos(theta / 2),
cos,
0,
0,
-1.0j * self.np.conj(plus) * self.np.sin(theta / 2),
-1.0j * self.np.conj(plus) * sin,
],
[
0,
self.np.cos(theta / 2),
-1.0j * self.np.conj(minus) * self.np.sin(theta / 2),
cos,
-1.0j * self.np.conj(minus) * sin,
0,
],
[0, -1.0j * minus * self.np.sin(theta / 2), self.np.cos(theta / 2), 0],
[-1.0j * plus * self.np.sin(theta / 2), 0, 0, self.np.cos(theta / 2)],
[0, -1.0j * minus * sin, cos, 0],
[-1.0j * plus * sin, 0, 0, cos],
],
dtype=self.dtype,
)
Expand Down

0 comments on commit 7b03730

Please sign in to comment.