ExperimentResults
- class qililab.ExperimentResults(path)
Bases:
objectProvides methods to access the experiment results stored in an HDF5 file.
Attributes Summary
Gets 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.
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
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.