qctrlvisualizer.plot_bitstring_probabilities_histogram(bitstring_counts: dict[str, dict[str, int]], show_legend: bool = True, display_all_bitstrings: bool = False, *, figure: Optional[matplotlib.figure.Figure] = None)

Create a histogram of the specified counts.

  • bitstring_counts (dict[str, dict[str,int]]) – Nested dictionaries of experiments with the resulting bitstring counts to plot, of the form {"Fire Opal": {"00...0": count_0_1 , ..., "11...1": count_0_2n}, ..., "IBM": {"00...0": count_1_1, ..., "11...1": count_1_2n}}. The keys of the outer dictionary will be used for the plot legend, and the inner dictionaries keys represent the bitstrings whose counts will be plotted. The counts must be nonnegative and the length of all bitstring across all experiments must be the same.

  • show_legend (bool, optional) – Whether to add a legend to the plot. Defaults to True.

  • display_all_bitstrings (bool, optional) – Whether to display all possible bitstrings, including those not present in bitstring_counts. Defaults to False.

  • figure (matplotlib.figure.Figure, optional) – A matplotlib Figure in which to place the plots. If passed, its dimensions and axes will be overridden.