plot_left_over_error_budget¶
- plot_left_over_error_budget(metadata, axes)[source]¶
Plot the left-over error budget.
This method populates the provided figure axes with a line-plot of the
OBPMetadata.left_over_error_budget()
. Below is an example where we plot somemetadata
which exists within our context.>>> from matplotlib import pyplot as plt >>> from qiskit_addon_obp.utils.visualization import plot_left_over_error_budget >>> fig, axes = plt.subplots(1, 1) >>> plot_left_over_error_budget(metadata, axes)
As you can see in the figure above, the number of backpropagated slices is displayed along the x-axis. You can think of this as the “time” of the backpropagation algorithm. The left-over error budget available at each backpropagation step is displayed along the y-axis. Since each observable that was backpropagated has its own budget, they are plotted as separate lines.
- Parameters:
metadata (OBPMetadata) – the metadata to be visualized.
axes (Axes) – the matplotlib axes in which to plot.