load_results
- qililab.result.load_results(path)
Load results from the given path to an .h5 file.
This function returns a tuple containing the array with the results, and a dictionary containing the loops of the experiment.
- Parameters:
path (
str) – Path to the .h5 file that needs to be loaded.- Returns:
Tuple containing a numpy array with the saved results and a dictionary containing the loops of the experiment:
{"loop_1": loop_1_values, "loop_2": loop_2_values, ...}.- Return type:
tuple[np.ndarray, dict[str, np.ndarray]]
Examples
Imagine you want to load the results of an experiment located in
data/20230514/083005/results.h5:>>> results, loops = ql.load_results(path="data/20230514/083005/results.h5") >>> results.shape (2, 50) >>> loops {'gain_drive_q0': array([0. , 0.02, 0.04, 0.06, 0.08, 0.1 , 0.12, 0.14, 0.16, 0.18, 0.2 , 0.22, 0.24, 0.26, 0.28, 0.3 , 0.32, 0.34, 0.36, 0.38, 0.4 , 0.42, 0.44, 0.46, 0.48, 0.5 , 0.52, 0.54, 0.56, 0.58, 0.6 , 0.62, 0.64, 0.66, 0.68, 0.7 , 0.72, 0.74, 0.76, 0.78, 0.8 , 0.82, 0.84, 0.86, 0.88, 0.9 , 0.92, 0.94, 0.96, 0.98])}