diff --git a/src/qibo/backends/npmatrices.py b/src/qibo/backends/npmatrices.py index 217697f006..490489833c 100644 --- a/src/qibo/backends/npmatrices.py +++ b/src/qibo/backends/npmatrices.py @@ -227,8 +227,8 @@ def GeneralizedfSim(self, u, phi): return self.np.array( [ [1, 0, 0, 0], - [0, u[0, 0], u[0, 1], 0], - [0, u[1, 0], u[1, 1], 0], + [0, complex(u[0, 0]), complex(u[0, 1]), 0], + [0, complex(u[1, 0]), complex(u[1, 1]), 0], [0, 0, 0, phase], ], dtype=self.dtype,