exa.core.plotting.plots.plot_histogram

Contents

exa.core.plotting.plots.plot_histogram#

plot_histogram(observations, observation_type, chad=None, split_dut_field=<function decode_dut_field>, save_path=None, split_qubits=False, one_per_dut_field=True, label_all_components=False, resolution=300, qpu_type=None, *, chip_design_record=None)#

Plot a histogram for observations of the given type.

Adds a vertical line indicating the median of the distribution.

Parameters:
  • observations (list[ObservationDefinition]) – The data to plot.

  • observation_type (str) – The type of data to plot.

  • chad (CHAD | None) – The chip architecture definition (CHAD). Deprecated, use chip_design_record instead.

  • split_dut_field (Callable[[str], tuple[str, str]]) – How to extract component name and observation type from DUT field.

  • save_path (Path | None) – Where to save the figure.

  • split_qubits (bool) – If high and low frequency qubits are present.

  • one_per_dut_field (bool) – Only take the latest observation.

  • label_all_components (bool) – Each component has its own label.

  • resolution (int) – In dpi for saving the figure.

  • qpu_type (str | None) – The type of the QPU that is used to split qubits into high and low frequency qubits, if applicable.

  • chip_design_record (dict[str, Any] | None) – The chip design record.

Returns:

The Matplotlib figure containing the plot.

Raises:

ValueError – Observation type can’t be found in observations, units are mismatching, or both chad and chip_design_record are given.

Return type:

Figure