ExperimentResults

class qililab.result.experiment_results.ExperimentResults(path)

Bases: object

Provides methods to access the experiment results stored in an HDF5 file.

Methods

get([qprogram, measurement])

Retrieves data and dimensions for a specified quantum program and measurement.

plot_S21([qprogram, measurement, save_plot])

Plots the S21 parameter from the experiment results.

Attributes

EXECUTED_AT_PATH

EXECUTION_TIME_PATH

EXPERIMENT_PATH

MEASUREMENTS_PATH

PLATFORM_PATH

QPROGRAMS_PATH

RESULTS_PATH

S21_PLOT_NAME

VARIABLES_PATH

executed_at

Gets the timestamp when execution of the experiment started.

execution_time

Gets the execution time in seconds.

experiment

Gets the YAML representation of the executed experiment.

platform

Gets the YAML representation of the platform.

get(qprogram=0, measurement=0)

Retrieves data and dimensions for a specified quantum program and measurement.

Parameters:
  • qprogram (int | str, optional) – The index or name of the quantum program. Defaults to 0.

  • measurement (int | str, optional) – The index or name of the measurement. Defaults to 0.

Returns:

A tuple containing the data array and a list of dimension dictionaries.

Return type:

tuple[np.ndarray, list[dict]]

property experiment

Gets the YAML representation of the executed experiment.

Returns:

The YAML string of the executed experiment.

Return type:

str

property platform

Gets the YAML representation of the platform.

Returns:

The YAML string of the platform.

Return type:

str

property executed_at

Gets the timestamp when execution of the experiment started.

Returns:

The timestamp of when the experiment started.

Return type:

datetime

property execution_time

Gets the execution time in seconds.

Returns:

The execution time in seconds.

Return type:

float

plot_S21(qprogram=0, measurement=0, save_plot=True)

Plots the S21 parameter from the experiment results.

Parameters:
  • qprogram (int | str, optional) – The index or name of the quantum program. Defaults to 0.

  • measurement (int | str, optional) – The index or name of the measurement. Defaults to 0.

Raises:

NotImplementedError – If the data has more than 2 dimensions.