From e8d25c5c701e2615c4f194da047aa09b301dbac2 Mon Sep 17 00:00:00 2001 From: Junye Huang Date: Thu, 4 Aug 2022 12:10:29 +0200 Subject: [PATCH] unwrap comments and codes, remove spaces around = in function arguments --- qiskit/visualization/counts_visualization.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/qiskit/visualization/counts_visualization.py b/qiskit/visualization/counts_visualization.py index afe75c8c2753..a8c26b9f574f 100644 --- a/qiskit/visualization/counts_visualization.py +++ b/qiskit/visualization/counts_visualization.py @@ -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:: @@ -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)