Skip to content

Commit

Permalink
fix: removed useless vstack
Browse files Browse the repository at this point in the history
  • Loading branch information
BrunoLiegiBastonLiegi committed Feb 22, 2024
1 parent 0a599d9 commit 7ddb8a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/qibo/backends/numpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ def samples_to_binary(self, samples, nqubits):
def samples_to_decimal(self, samples, nqubits):
qrange = self.np.arange(nqubits - 1, -1, -1, dtype="int32")
qrange = (2**qrange)[:, self.np.newaxis]
return self.np.matmul(self.np.vstack(self.to_numpy(samples)), qrange)[:, 0]
return self.np.matmul(self.to_numpy(samples), qrange)[:, 0]

def calculate_frequencies(self, samples):
res, counts = self.np.unique(samples, return_counts=True)
Expand Down

0 comments on commit 7ddb8a4

Please sign in to comment.