ExperimentResults
- class qililab.result.experiment_results.ExperimentResults(path)
Bases:
objectProvides 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_PATHEXECUTION_TIME_PATHEXPERIMENT_PATHMEASUREMENTS_PATHPLATFORM_PATHQPROGRAMS_PATHRESULTS_PATHS21_PLOT_NAMEVARIABLES_PATHGets the timestamp when execution of the experiment started.
Gets the execution time in seconds.
Gets the YAML representation of the executed experiment.
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.