Skip to content

Commit

Permalink
Merge pull request #1414 from qiboteam/fix-complex-samples
Browse files Browse the repository at this point in the history
Fix complex samples
  • Loading branch information
scarrazza authored Aug 8, 2024
2 parents 259380d + c32fe97 commit a2f7424
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/qibo/result.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit a2f7424

Please sign in to comment.