ExperimentResults

class qililab.ExperimentResults(path)

Bases: object

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

Attributes Summary

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.

Methods Summary

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 Documentation

EXECUTED_AT_PATH = 'executed_at'
EXECUTION_TIME_PATH = 'execution_time'
EXPERIMENT_PATH = 'experiment'
MEASUREMENTS_PATH = 'measurements'
PLATFORM_PATH = 'platform'
QPROGRAMS_PATH = 'qprograms'
RESULTS_PATH = 'results'
S21_PLOT_NAME = 'S21.png'
VARIABLES_PATH = 'variables'
executed_at

Gets the timestamp when execution of the experiment started.

Returns:

The timestamp of when the experiment started.

Return type:

datetime

execution_time

Gets the execution time in seconds.

Returns:

The execution time in seconds.

Return type:

float

experiment

Gets the YAML representation of the executed experiment.

Returns:

The YAML string of the executed experiment.

Return type:

str

platform

Gets the YAML representation of the platform.

Returns:

The YAML string of the platform.

Return type:

str

Methods Documentation

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]]

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.