plot_populations

qctrlvisualizer.plot_populations(sample_times: numpy.ndarray, populations: dict, *, figure: Optional[matplotlib.figure.Figure, None] = None)

Create a plot of the specified populations.

Parameters:
  • sample_times (np.ndarray) – The 1D array of times in seconds at which the populations have been sampled.

  • populations (dict) – The dictionary of populations to plot, of the form {"label_1": population_values_1, "label_2": population_values_2, ...}. Each population_values_n is a 1D array of population values with the same length as sample_times and label_n is its label. Population values must lie between 0 and 1.

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