Skip to content

Commit

Permalink
unwrap comments and codes, remove spaces around = in function arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
HuangJunye committed Aug 4, 2022
1 parent 3a76836 commit e8d25c5
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions qiskit/visualization/counts_visualization.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,7 @@ def plot_histogram(
legend = ['First execution', 'Second execution']
plot_histogram([counts1, counts2], legend = legend,
color=['crimson','midnightblue'], title="New Histogram")
plot_histogram([counts1, counts2], legend=legend, color=['crimson','midnightblue'], title="New Histogram")
.. jupyter-execute::
Expand All @@ -143,11 +142,11 @@ def plot_histogram(
counts = job.result().get_counts()
# Sort by the probability in descendant order
hist1 = plot_histogram(counts, sort = 'value_desc')
hist1 = plot_histogram(counts, sort='value_desc')
# Sort by the hamming distance (the number of bit flips to change from
# one bitstring to the other)from a target string.
hist2 = plot_histogram(counts, sort = 'hamming', target_string = '001')
hist2 = plot_histogram(counts, sort='hamming', target_string='001')
display(hist1, hist2)
Expand Down

0 comments on commit e8d25c5

Please sign in to comment.