Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/stable/0.3' into stable/0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
chensgit169 committed Oct 27, 2023
2 parents faffd75 + 35bdbaf commit 6446290
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/quafu/results/results.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def plot_probabilities(self, full: bool = False, reverse_basis: bool = False, so
reverse_basis: Whether reverse the bitstring of basis. (Little endian convention).
sort: Sort the results by probabilities values. Can be `"ascend"` order or `"descend"` order.
"""

plt.close()
probs = self.probabilities
inds = range(len(probs))
if not full:
Expand All @@ -120,7 +120,7 @@ def plot_probabilities(self, full: bool = False, reverse_basis: bool = False, so
basis = basis[orders][::-1]

plt.figure()
plt.bar(inds, probs, tick_label=basis)
plt.bar(range(len(inds)), probs, tick_label=basis)
plt.xticks(rotation=70)
plt.ylabel("probabilities")

Expand Down

0 comments on commit 6446290

Please sign in to comment.