diff --git a/src/qibo/result.py b/src/qibo/result.py index 905cbb8e49..91fef766b8 100644 --- a/src/qibo/result.py +++ b/src/qibo/result.py @@ -326,7 +326,9 @@ def samples(self, binary: bool = True, registers: bool = False): if self.measurements[0].result.has_samples(): self._samples = self.backend.np.concatenate( [ - self.backend.cast(gate.result.samples()) + self.backend.cast( + gate.result.samples(), dtype=self.backend.np.int32 + ) for gate in self.measurements ], axis=1,