Data Plotting tutorial: In this tutorial we will cover both historical and scaling benchmarks.
This example is used with 10 benchmarks that were performed on a VM in git actions.
We first need to extract the data from the appropriate location, in this case the file a stored at the pytest-benchmark default location: ./.benchmarks/
.
Pytest also adds an intermediate folder named using interpreter information, in this example it was Linux-CPython-3.10-64bit
, this is handled automatically by the get_paths method.
Getting the paths to the bench folders
from qutip_benchmark.view_utilities import *
from pathlib import Path
#Set the folder containing all the bench files
bench_path = Path('./.benchmarks')
# get the paths to the files
paths = get_paths(bench_path)
latest_path = paths[-1]
print("all paths ", paths)
print("latest path ", latest_path)
all paths ('.benchmarks/Linux-CPython-3.10-64bit/0001_e318179a3635d6995b3527b037a52234da3ce601_20220826_220324.json', '.benchmarks/Linux-CPython-3.10-64bit/0001_8882e7c1583de05fe2490e505f020bd678d37fe8_20220830_074136.json', '.benchmarks/Linux-CPython-3.10-64bit/0001_8882e7c1583de05fe2490e505f020bd678d37fe8_20220830_075738.json', '.benchmarks/Linux-CPython-3.10-64bit/0001_8882e7c1583de05fe2490e505f020bd678d37fe8_20220830_082003.json', '.benchmarks/Linux-CPython-3.10-64bit/0001_8882e7c1583de05fe2490e505f020bd678d37fe8_20220830_084513.json', '.benchmarks/Linux-CPython-3.10-64bit/0001_8882e7c1583de05fe2490e505f020bd678d37fe8_20220830_090009.json', '.benchmarks/Linux-CPython-3.10-64bit/0001_8882e7c1583de05fe2490e505f020bd678d37fe8_20220830_091731.json', '.benchmarks/Linux-CPython-3.10-64bit/0001_8882e7c1583de05fe2490e505f020bd678d37fe8_20220830_093724.json', '.benchmarks/Linux-CPython-3.10-64bit/0001_8882e7c1583de05fe2490e505f020bd678d37fe8_20220830_095651.json', '.benchmarks/Linux-CPython-3.10-64bit/0001_8882e7c1583de05fe2490e505f020bd678d37fe8_20220830_101851.json')
latest path .benchmarks/Linux-CPython-3.10-64bit/0001_8882e7c1583de05fe2490e505f020bd678d37fe8_20220830_101851.json
Next, we create the historical dataframe using the list of paths and the dataframe for scaling usisng the latest path.
historical_data = create_dataframe(paths)
historical_data
group | name | fullname | param | params_size | params_density | params_coeftype | stats_mean | stats_stddev | params_dtype | params_model_solve | params_operation | cpu | datetime | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | Matmul_QobjEvo_op@ket-2-dense-function | test_matmul_QobjEvo_ket[2-dense-function] | test_lin_alg_QobjEvo.py::test_matmul_QobjEvo_k... | 2-dense-function | 2 | dense | function | 0.000018 | 8.340446e-07 | NaN | NaN | Matmul_QobjEvo_op@ket | Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz | 2022-08-26 22:06:08.369089 |
1 | Matmul_QobjEvo_op@ket-2-dense-array | test_matmul_QobjEvo_ket[2-dense-array] | test_lin_alg_QobjEvo.py::test_matmul_QobjEvo_k... | 2-dense-array | 2 | dense | array | 0.000016 | 6.546539e-07 | NaN | NaN | Matmul_QobjEvo_op@ket | Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz | 2022-08-26 22:06:08.369089 |
2 | Matmul_QobjEvo_op@ket-2-dense-string | test_matmul_QobjEvo_ket[2-dense-string] | test_lin_alg_QobjEvo.py::test_matmul_QobjEvo_k... | 2-dense-string | 2 | dense | string | 0.000018 | 9.000804e-07 | NaN | NaN | Matmul_QobjEvo_op@ket | Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz | 2022-08-26 22:06:08.369089 |
3 | Matmul_QobjEvo_op@ket-2-sparse-function | test_matmul_QobjEvo_ket[2-sparse-function] | test_lin_alg_QobjEvo.py::test_matmul_QobjEvo_k... | 2-sparse-function | 2 | sparse | function | 0.000018 | 7.880117e-07 | NaN | NaN | Matmul_QobjEvo_op@ket | Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz | 2022-08-26 22:06:08.369089 |
4 | Matmul_QobjEvo_op@ket-2-sparse-array | test_matmul_QobjEvo_ket[2-sparse-array] | test_lin_alg_QobjEvo.py::test_matmul_QobjEvo_k... | 2-sparse-array | 2 | sparse | array | 0.000016 | 6.363098e-07 | NaN | NaN | Matmul_QobjEvo_op@ket | Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz | 2022-08-26 22:06:08.369089 |
... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
283 | mesolve-Qubit Spin Chain-8 | test_mesolve[Qubit Spin Chain-8] | test_solvers.py::test_mesolve[Qubit Spin Chain-8] | Qubit Spin Chain-8 | 8 | NaN | NaN | 0.024849 | 1.332601e-02 | NaN | Qubit Spin Chain | mesolve | Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz | 2022-08-30 10:22:06.480975 |
284 | mesolve-Qubit Spin Chain-16 | test_mesolve[Qubit Spin Chain-16] | test_solvers.py::test_mesolve[Qubit Spin Chain... | Qubit Spin Chain-16 | 16 | NaN | NaN | 0.030516 | 1.029450e-03 | NaN | Qubit Spin Chain | mesolve | Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz | 2022-08-30 10:22:06.480975 |
285 | mesolve-Qubit Spin Chain-32 | test_mesolve[Qubit Spin Chain-32] | test_solvers.py::test_mesolve[Qubit Spin Chain... | Qubit Spin Chain-32 | 32 | NaN | NaN | 0.055828 | 1.924162e-03 | NaN | Qubit Spin Chain | mesolve | Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz | 2022-08-30 10:22:06.480975 |
286 | mesolve-Qubit Spin Chain-64 | test_mesolve[Qubit Spin Chain-64] | test_solvers.py::test_mesolve[Qubit Spin Chain... | Qubit Spin Chain-64 | 64 | NaN | NaN | 0.163021 | 3.549377e-03 | NaN | Qubit Spin Chain | mesolve | Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz | 2022-08-30 10:22:06.480975 |
287 | mesolve-Qubit Spin Chain-128 | test_mesolve[Qubit Spin Chain-128] | test_solvers.py::test_mesolve[Qubit Spin Chain... | Qubit Spin Chain-128 | 128 | NaN | NaN | 0.685025 | 1.559490e-02 | NaN | Qubit Spin Chain | mesolve | Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz | 2022-08-30 10:22:06.480975 |
2880 rows × 14 columns
scaling_data = json_to_dataframe(latest_path)
scaling_data
group | name | fullname | param | params_size | params_density | params_coeftype | stats_mean | stats_stddev | params_dtype | params_model_solve | params_operation | cpu | datetime | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | Matmul_QobjEvo_op@ket-2-dense-function | test_matmul_QobjEvo_ket[2-dense-function] | test_lin_alg_QobjEvo.py::test_matmul_QobjEvo_k... | 2-dense-function | 2 | dense | function | 0.000031 | 0.000012 | NaN | NaN | Matmul_QobjEvo_op@ket | Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz | 2022-08-30 10:22:06.480975 |
1 | Matmul_QobjEvo_op@ket-2-dense-array | test_matmul_QobjEvo_ket[2-dense-array] | test_lin_alg_QobjEvo.py::test_matmul_QobjEvo_k... | 2-dense-array | 2 | dense | array | 0.000029 | 0.000037 | NaN | NaN | Matmul_QobjEvo_op@ket | Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz | 2022-08-30 10:22:06.480975 |
2 | Matmul_QobjEvo_op@ket-2-dense-string | test_matmul_QobjEvo_ket[2-dense-string] | test_lin_alg_QobjEvo.py::test_matmul_QobjEvo_k... | 2-dense-string | 2 | dense | string | 0.000030 | 0.000026 | NaN | NaN | Matmul_QobjEvo_op@ket | Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz | 2022-08-30 10:22:06.480975 |
3 | Matmul_QobjEvo_op@ket-2-sparse-function | test_matmul_QobjEvo_ket[2-sparse-function] | test_lin_alg_QobjEvo.py::test_matmul_QobjEvo_k... | 2-sparse-function | 2 | sparse | function | 0.000031 | 0.000015 | NaN | NaN | Matmul_QobjEvo_op@ket | Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz | 2022-08-30 10:22:06.480975 |
4 | Matmul_QobjEvo_op@ket-2-sparse-array | test_matmul_QobjEvo_ket[2-sparse-array] | test_lin_alg_QobjEvo.py::test_matmul_QobjEvo_k... | 2-sparse-array | 2 | sparse | array | 0.000027 | 0.000014 | NaN | NaN | Matmul_QobjEvo_op@ket | Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz | 2022-08-30 10:22:06.480975 |
... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
283 | mesolve-Qubit Spin Chain-8 | test_mesolve[Qubit Spin Chain-8] | test_solvers.py::test_mesolve[Qubit Spin Chain-8] | Qubit Spin Chain-8 | 8 | NaN | NaN | 0.024849 | 0.013326 | NaN | Qubit Spin Chain | mesolve | Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz | 2022-08-30 10:22:06.480975 |
284 | mesolve-Qubit Spin Chain-16 | test_mesolve[Qubit Spin Chain-16] | test_solvers.py::test_mesolve[Qubit Spin Chain... | Qubit Spin Chain-16 | 16 | NaN | NaN | 0.030516 | 0.001029 | NaN | Qubit Spin Chain | mesolve | Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz | 2022-08-30 10:22:06.480975 |
285 | mesolve-Qubit Spin Chain-32 | test_mesolve[Qubit Spin Chain-32] | test_solvers.py::test_mesolve[Qubit Spin Chain... | Qubit Spin Chain-32 | 32 | NaN | NaN | 0.055828 | 0.001924 | NaN | Qubit Spin Chain | mesolve | Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz | 2022-08-30 10:22:06.480975 |
286 | mesolve-Qubit Spin Chain-64 | test_mesolve[Qubit Spin Chain-64] | test_solvers.py::test_mesolve[Qubit Spin Chain... | Qubit Spin Chain-64 | 64 | NaN | NaN | 0.163021 | 0.003549 | NaN | Qubit Spin Chain | mesolve | Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz | 2022-08-30 10:22:06.480975 |
287 | mesolve-Qubit Spin Chain-128 | test_mesolve[Qubit Spin Chain-128] | test_solvers.py::test_mesolve[Qubit Spin Chain... | Qubit Spin Chain-128 | 128 | NaN | NaN | 0.685025 | 0.015595 | NaN | Qubit Spin Chain | mesolve | Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz | 2022-08-30 10:22:06.480975 |
288 rows × 14 columns
Now the data can be sorted by operation, we will also choose to plot only certain operations. The operations given in the list can be substrings of the actual operation name and are not case sensitive (eg: 'matmul' will filter out any operation that doesn't contain matmul in the name)
scaling_operations = ['add','qobjevo','mesolve']
historical_operations = ['matmul']
historical_data = sort_ops(historical_data, historical_operations)
scaling_data = sort_ops(scaling_data, scaling_operations)
print('history: ', historical_data.keys(), '\n scaling: ', scaling_data.keys())
history: dict_keys(['Matmul_QobjEvo_op@ket', 'Matmul_op@op', 'Matmul_op@ket'])
scaling: dict_keys(['Add', 'Matmul_QobjEvo_op@ket', 'mesolve'])
scaling_data['mesolve']
group | name | fullname | param | params_size | stats_mean | stats_stddev | params_model_solve | params_operation | cpu | datetime | |
---|---|---|---|---|---|---|---|---|---|---|---|
270 | mesolve-Jaynes-Cummings-4 | test_mesolve[Jaynes-Cummings-4] | test_solvers.py::test_mesolve[Jaynes-Cummings-4] | Jaynes-Cummings-4 | 4 | 0.028526 | 0.002311 | Jaynes-Cummings | mesolve | Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz | 2022-08-30 10:22:06.480975 |
271 | mesolve-Jaynes-Cummings-8 | test_mesolve[Jaynes-Cummings-8] | test_solvers.py::test_mesolve[Jaynes-Cummings-8] | Jaynes-Cummings-8 | 8 | 0.030912 | 0.000640 | Jaynes-Cummings | mesolve | Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz | 2022-08-30 10:22:06.480975 |
272 | mesolve-Jaynes-Cummings-16 | test_mesolve[Jaynes-Cummings-16] | test_solvers.py::test_mesolve[Jaynes-Cummings-16] | Jaynes-Cummings-16 | 16 | 0.046739 | 0.001952 | Jaynes-Cummings | mesolve | Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz | 2022-08-30 10:22:06.480975 |
273 | mesolve-Jaynes-Cummings-32 | test_mesolve[Jaynes-Cummings-32] | test_solvers.py::test_mesolve[Jaynes-Cummings-32] | Jaynes-Cummings-32 | 32 | 0.110768 | 0.004086 | Jaynes-Cummings | mesolve | Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz | 2022-08-30 10:22:06.480975 |
274 | mesolve-Jaynes-Cummings-64 | test_mesolve[Jaynes-Cummings-64] | test_solvers.py::test_mesolve[Jaynes-Cummings-64] | Jaynes-Cummings-64 | 64 | 0.349017 | 0.006614 | Jaynes-Cummings | mesolve | Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz | 2022-08-30 10:22:06.480975 |
275 | mesolve-Jaynes-Cummings-128 | test_mesolve[Jaynes-Cummings-128] | test_solvers.py::test_mesolve[Jaynes-Cummings-... | Jaynes-Cummings-128 | 128 | 1.325907 | 0.014516 | Jaynes-Cummings | mesolve | Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz | 2022-08-30 10:22:06.480975 |
276 | mesolve-Cavity-4 | test_mesolve[Cavity-4] | test_solvers.py::test_mesolve[Cavity-4] | Cavity-4 | 4 | 0.028646 | 0.009366 | Cavity | mesolve | Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz | 2022-08-30 10:22:06.480975 |
277 | mesolve-Cavity-8 | test_mesolve[Cavity-8] | test_solvers.py::test_mesolve[Cavity-8] | Cavity-8 | 8 | 0.038817 | 0.012263 | Cavity | mesolve | Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz | 2022-08-30 10:22:06.480975 |
278 | mesolve-Cavity-16 | test_mesolve[Cavity-16] | test_solvers.py::test_mesolve[Cavity-16] | Cavity-16 | 16 | 0.086174 | 0.017225 | Cavity | mesolve | Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz | 2022-08-30 10:22:06.480975 |
279 | mesolve-Cavity-32 | test_mesolve[Cavity-32] | test_solvers.py::test_mesolve[Cavity-32] | Cavity-32 | 32 | 0.336728 | 0.010061 | Cavity | mesolve | Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz | 2022-08-30 10:22:06.480975 |
280 | mesolve-Cavity-64 | test_mesolve[Cavity-64] | test_solvers.py::test_mesolve[Cavity-64] | Cavity-64 | 64 | 1.929214 | 0.092705 | Cavity | mesolve | Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz | 2022-08-30 10:22:06.480975 |
281 | mesolve-Cavity-128 | test_mesolve[Cavity-128] | test_solvers.py::test_mesolve[Cavity-128] | Cavity-128 | 128 | 10.597770 | 0.313492 | Cavity | mesolve | Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz | 2022-08-30 10:22:06.480975 |
282 | mesolve-Qubit Spin Chain-4 | test_mesolve[Qubit Spin Chain-4] | test_solvers.py::test_mesolve[Qubit Spin Chain-4] | Qubit Spin Chain-4 | 4 | 0.023840 | 0.007519 | Qubit Spin Chain | mesolve | Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz | 2022-08-30 10:22:06.480975 |
283 | mesolve-Qubit Spin Chain-8 | test_mesolve[Qubit Spin Chain-8] | test_solvers.py::test_mesolve[Qubit Spin Chain-8] | Qubit Spin Chain-8 | 8 | 0.024849 | 0.013326 | Qubit Spin Chain | mesolve | Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz | 2022-08-30 10:22:06.480975 |
284 | mesolve-Qubit Spin Chain-16 | test_mesolve[Qubit Spin Chain-16] | test_solvers.py::test_mesolve[Qubit Spin Chain... | Qubit Spin Chain-16 | 16 | 0.030516 | 0.001029 | Qubit Spin Chain | mesolve | Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz | 2022-08-30 10:22:06.480975 |
285 | mesolve-Qubit Spin Chain-32 | test_mesolve[Qubit Spin Chain-32] | test_solvers.py::test_mesolve[Qubit Spin Chain... | Qubit Spin Chain-32 | 32 | 0.055828 | 0.001924 | Qubit Spin Chain | mesolve | Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz | 2022-08-30 10:22:06.480975 |
286 | mesolve-Qubit Spin Chain-64 | test_mesolve[Qubit Spin Chain-64] | test_solvers.py::test_mesolve[Qubit Spin Chain... | Qubit Spin Chain-64 | 64 | 0.163021 | 0.003549 | Qubit Spin Chain | mesolve | Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz | 2022-08-30 10:22:06.480975 |
287 | mesolve-Qubit Spin Chain-128 | test_mesolve[Qubit Spin Chain-128] | test_solvers.py::test_mesolve[Qubit Spin Chain... | Qubit Spin Chain-128 | 128 | 0.685025 | 0.015595 | Qubit Spin Chain | mesolve | Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz | 2022-08-30 10:22:06.480975 |
Now comes param sorting, the fixtures used to make the benchmarks are stored as "param_fixturename", we use these to separate the data into "plots".
e.g: The Add operation uses "param_density","param_size" and "param_dtype", we use param_sort to make one plot for each value of these parameters:
plot 1: density=sparse, size= 4, dtype = numpy; plot2: density= dense, size=4, dtype = numpy; etc.
You can define one parameter as the line_separator, which will draw all values of that parameters on the same plot.
e.g plot1= density sparse, size =4 and the times for all the dtype appear as differnt colored lines on the plot.
You can also set filters to only keep certain paramter values or exclude a parameter from being used in the sorting.
Only use col_filter for parameters or columns that are not used in the sorting process, such as 'cpu' or 'param_size' in the case of scaling
# Only create plots with sparse density and size 4 or 16
historical_param_filter = {'density': ['sparse'], 'size':[4,16],'model': ['jaynes', 'qubit']}
# delete all entries that contain E5 in the cpu name
col_filter= {'cpu': 'E5'}
# Set the line separator to dtype, coeftype, model_solve or model_steady depending on which operation is being plotted
line_sep = ['type', 'model']
historical_data = sort_params(historical_data, line_sep, filters=historical_param_filter, col_filters=col_filter)
# Here we need to exlude param_size from the sorting, as for scaling we will use size on
# the x axis and thus dont want to separate multiple plots each with a single size value
scaling_data = sort_params(scaling_data, line_sep, filters=None, col_filters=None, exclude=['size'])
print(historical_data.keys())
print(historical_data['Matmul_QobjEvo_op@ket-4-sparse']["line_sep"])
dict_keys(['Matmul_QobjEvo_op@ket-4-sparse', 'Matmul_QobjEvo_op@ket-16-sparse', 'Matmul_op@op-4-sparse', 'Matmul_op@op-16-sparse', 'Matmul_op@ket-4-sparse', 'Matmul_op@ket-16-sparse'])
params_coeftype
historical_data['Matmul_QobjEvo_op@ket-4-sparse']["data"]
group | name | fullname | param | params_size | params_density | params_coeftype | stats_mean | stats_stddev | params_operation | cpu | datetime | |
---|---|---|---|---|---|---|---|---|---|---|---|---|
9 | Matmul_QobjEvo_op@ket-4-sparse-function | test_matmul_QobjEvo_ket[4-sparse-function] | test_lin_alg_QobjEvo.py::test_matmul_QobjEvo_k... | 4-sparse-function | 4 | sparse | function | 0.000018 | 7.437344e-07 | Matmul_QobjEvo_op@ket | Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz | 2022-08-26 22:06:08.369089 |
10 | Matmul_QobjEvo_op@ket-4-sparse-array | test_matmul_QobjEvo_ket[4-sparse-array] | test_lin_alg_QobjEvo.py::test_matmul_QobjEvo_k... | 4-sparse-array | 4 | sparse | array | 0.000016 | 6.910422e-07 | Matmul_QobjEvo_op@ket | Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz | 2022-08-26 22:06:08.369089 |
11 | Matmul_QobjEvo_op@ket-4-sparse-string | test_matmul_QobjEvo_ket[4-sparse-string] | test_lin_alg_QobjEvo.py::test_matmul_QobjEvo_k... | 4-sparse-string | 4 | sparse | string | 0.000018 | 7.415609e-07 | Matmul_QobjEvo_op@ket | Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz | 2022-08-26 22:06:08.369089 |
9 | Matmul_QobjEvo_op@ket-4-sparse-function | test_matmul_QobjEvo_ket[4-sparse-function] | test_lin_alg_QobjEvo.py::test_matmul_QobjEvo_k... | 4-sparse-function | 4 | sparse | function | 0.000018 | 6.629470e-07 | Matmul_QobjEvo_op@ket | Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz | 2022-08-30 07:44:24.548546 |
10 | Matmul_QobjEvo_op@ket-4-sparse-array | test_matmul_QobjEvo_ket[4-sparse-array] | test_lin_alg_QobjEvo.py::test_matmul_QobjEvo_k... | 4-sparse-array | 4 | sparse | array | 0.000016 | 9.226144e-07 | Matmul_QobjEvo_op@ket | Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz | 2022-08-30 07:44:24.548546 |
11 | Matmul_QobjEvo_op@ket-4-sparse-string | test_matmul_QobjEvo_ket[4-sparse-string] | test_lin_alg_QobjEvo.py::test_matmul_QobjEvo_k... | 4-sparse-string | 4 | sparse | string | 0.000018 | 8.205797e-07 | Matmul_QobjEvo_op@ket | Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz | 2022-08-30 07:44:24.548546 |
9 | Matmul_QobjEvo_op@ket-4-sparse-function | test_matmul_QobjEvo_ket[4-sparse-function] | test_lin_alg_QobjEvo.py::test_matmul_QobjEvo_k... | 4-sparse-function | 4 | sparse | function | 0.000017 | 8.560437e-07 | Matmul_QobjEvo_op@ket | Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz | 2022-08-30 08:22:45.689695 |
10 | Matmul_QobjEvo_op@ket-4-sparse-array | test_matmul_QobjEvo_ket[4-sparse-array] | test_lin_alg_QobjEvo.py::test_matmul_QobjEvo_k... | 4-sparse-array | 4 | sparse | array | 0.000015 | 6.367590e-07 | Matmul_QobjEvo_op@ket | Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz | 2022-08-30 08:22:45.689695 |
11 | Matmul_QobjEvo_op@ket-4-sparse-string | test_matmul_QobjEvo_ket[4-sparse-string] | test_lin_alg_QobjEvo.py::test_matmul_QobjEvo_k... | 4-sparse-string | 4 | sparse | string | 0.000017 | 8.469310e-07 | Matmul_QobjEvo_op@ket | Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz | 2022-08-30 08:22:45.689695 |
9 | Matmul_QobjEvo_op@ket-4-sparse-function | test_matmul_QobjEvo_ket[4-sparse-function] | test_lin_alg_QobjEvo.py::test_matmul_QobjEvo_k... | 4-sparse-function | 4 | sparse | function | 0.000017 | 6.054093e-07 | Matmul_QobjEvo_op@ket | Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz | 2022-08-30 08:48:17.398441 |
10 | Matmul_QobjEvo_op@ket-4-sparse-array | test_matmul_QobjEvo_ket[4-sparse-array] | test_lin_alg_QobjEvo.py::test_matmul_QobjEvo_k... | 4-sparse-array | 4 | sparse | array | 0.000015 | 5.312093e-07 | Matmul_QobjEvo_op@ket | Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz | 2022-08-30 08:48:17.398441 |
11 | Matmul_QobjEvo_op@ket-4-sparse-string | test_matmul_QobjEvo_ket[4-sparse-string] | test_lin_alg_QobjEvo.py::test_matmul_QobjEvo_k... | 4-sparse-string | 4 | sparse | string | 0.000016 | 6.264487e-07 | Matmul_QobjEvo_op@ket | Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz | 2022-08-30 08:48:17.398441 |
9 | Matmul_QobjEvo_op@ket-4-sparse-function | test_matmul_QobjEvo_ket[4-sparse-function] | test_lin_alg_QobjEvo.py::test_matmul_QobjEvo_k... | 4-sparse-function | 4 | sparse | function | 0.000017 | 1.007945e-06 | Matmul_QobjEvo_op@ket | Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz | 2022-08-30 09:03:13.518910 |
10 | Matmul_QobjEvo_op@ket-4-sparse-array | test_matmul_QobjEvo_ket[4-sparse-array] | test_lin_alg_QobjEvo.py::test_matmul_QobjEvo_k... | 4-sparse-array | 4 | sparse | array | 0.000016 | 6.407863e-07 | Matmul_QobjEvo_op@ket | Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz | 2022-08-30 09:03:13.518910 |
11 | Matmul_QobjEvo_op@ket-4-sparse-string | test_matmul_QobjEvo_ket[4-sparse-string] | test_lin_alg_QobjEvo.py::test_matmul_QobjEvo_k... | 4-sparse-string | 4 | sparse | string | 0.000017 | 7.349346e-07 | Matmul_QobjEvo_op@ket | Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz | 2022-08-30 09:03:13.518910 |
9 | Matmul_QobjEvo_op@ket-4-sparse-function | test_matmul_QobjEvo_ket[4-sparse-function] | test_lin_alg_QobjEvo.py::test_matmul_QobjEvo_k... | 4-sparse-function | 4 | sparse | function | 0.000021 | 9.139363e-07 | Matmul_QobjEvo_op@ket | Intel(R) Xeon(R) Platinum 8171M CPU @ 2.60GHz | 2022-08-30 09:20:40.538682 |
10 | Matmul_QobjEvo_op@ket-4-sparse-array | test_matmul_QobjEvo_ket[4-sparse-array] | test_lin_alg_QobjEvo.py::test_matmul_QobjEvo_k... | 4-sparse-array | 4 | sparse | array | 0.000019 | 6.992823e-07 | Matmul_QobjEvo_op@ket | Intel(R) Xeon(R) Platinum 8171M CPU @ 2.60GHz | 2022-08-30 09:20:40.538682 |
11 | Matmul_QobjEvo_op@ket-4-sparse-string | test_matmul_QobjEvo_ket[4-sparse-string] | test_lin_alg_QobjEvo.py::test_matmul_QobjEvo_k... | 4-sparse-string | 4 | sparse | string | 0.000021 | 9.012149e-07 | Matmul_QobjEvo_op@ket | Intel(R) Xeon(R) Platinum 8171M CPU @ 2.60GHz | 2022-08-30 09:20:40.538682 |
9 | Matmul_QobjEvo_op@ket-4-sparse-function | test_matmul_QobjEvo_ket[4-sparse-function] | test_lin_alg_QobjEvo.py::test_matmul_QobjEvo_k... | 4-sparse-function | 4 | sparse | function | 0.000020 | 1.644778e-06 | Matmul_QobjEvo_op@ket | Intel(R) Xeon(R) Platinum 8171M CPU @ 2.60GHz | 2022-08-30 09:40:27.989875 |
10 | Matmul_QobjEvo_op@ket-4-sparse-array | test_matmul_QobjEvo_ket[4-sparse-array] | test_lin_alg_QobjEvo.py::test_matmul_QobjEvo_k... | 4-sparse-array | 4 | sparse | array | 0.000018 | 1.714169e-06 | Matmul_QobjEvo_op@ket | Intel(R) Xeon(R) Platinum 8171M CPU @ 2.60GHz | 2022-08-30 09:40:27.989875 |
11 | Matmul_QobjEvo_op@ket-4-sparse-string | test_matmul_QobjEvo_ket[4-sparse-string] | test_lin_alg_QobjEvo.py::test_matmul_QobjEvo_k... | 4-sparse-string | 4 | sparse | string | 0.000020 | 1.465850e-06 | Matmul_QobjEvo_op@ket | Intel(R) Xeon(R) Platinum 8171M CPU @ 2.60GHz | 2022-08-30 09:40:27.989875 |
9 | Matmul_QobjEvo_op@ket-4-sparse-function | test_matmul_QobjEvo_ket[4-sparse-function] | test_lin_alg_QobjEvo.py::test_matmul_QobjEvo_k... | 4-sparse-function | 4 | sparse | function | 0.000021 | 2.025465e-05 | Matmul_QobjEvo_op@ket | Intel(R) Xeon(R) Platinum 8171M CPU @ 2.60GHz | 2022-08-30 09:59:52.264213 |
10 | Matmul_QobjEvo_op@ket-4-sparse-array | test_matmul_QobjEvo_ket[4-sparse-array] | test_lin_alg_QobjEvo.py::test_matmul_QobjEvo_k... | 4-sparse-array | 4 | sparse | array | 0.000020 | 3.078484e-05 | Matmul_QobjEvo_op@ket | Intel(R) Xeon(R) Platinum 8171M CPU @ 2.60GHz | 2022-08-30 09:59:52.264213 |
11 | Matmul_QobjEvo_op@ket-4-sparse-string | test_matmul_QobjEvo_ket[4-sparse-string] | test_lin_alg_QobjEvo.py::test_matmul_QobjEvo_k... | 4-sparse-string | 4 | sparse | string | 0.000021 | 1.625193e-05 | Matmul_QobjEvo_op@ket | Intel(R) Xeon(R) Platinum 8171M CPU @ 2.60GHz | 2022-08-30 09:59:52.264213 |
print(scaling_data.keys())
print("line_sep: ", scaling_data['mesolve']["line_sep"])
dict_keys(['Add-dense', 'Add-sparse', 'Matmul_QobjEvo_op@ket-dense', 'Matmul_QobjEvo_op@ket-sparse', 'mesolve'])
line_sep: params_model_solve
scaling_data['mesolve']["data"]
group | name | fullname | param | params_size | stats_mean | stats_stddev | params_model_solve | params_operation | cpu | datetime | |
---|---|---|---|---|---|---|---|---|---|---|---|
270 | mesolve-Jaynes-Cummings-4 | test_mesolve[Jaynes-Cummings-4] | test_solvers.py::test_mesolve[Jaynes-Cummings-4] | Jaynes-Cummings-4 | 4 | 0.028526 | 0.002311 | Jaynes-Cummings | mesolve | Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz | 2022-08-30 10:22:06.480975 |
271 | mesolve-Jaynes-Cummings-8 | test_mesolve[Jaynes-Cummings-8] | test_solvers.py::test_mesolve[Jaynes-Cummings-8] | Jaynes-Cummings-8 | 8 | 0.030912 | 0.000640 | Jaynes-Cummings | mesolve | Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz | 2022-08-30 10:22:06.480975 |
272 | mesolve-Jaynes-Cummings-16 | test_mesolve[Jaynes-Cummings-16] | test_solvers.py::test_mesolve[Jaynes-Cummings-16] | Jaynes-Cummings-16 | 16 | 0.046739 | 0.001952 | Jaynes-Cummings | mesolve | Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz | 2022-08-30 10:22:06.480975 |
273 | mesolve-Jaynes-Cummings-32 | test_mesolve[Jaynes-Cummings-32] | test_solvers.py::test_mesolve[Jaynes-Cummings-32] | Jaynes-Cummings-32 | 32 | 0.110768 | 0.004086 | Jaynes-Cummings | mesolve | Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz | 2022-08-30 10:22:06.480975 |
274 | mesolve-Jaynes-Cummings-64 | test_mesolve[Jaynes-Cummings-64] | test_solvers.py::test_mesolve[Jaynes-Cummings-64] | Jaynes-Cummings-64 | 64 | 0.349017 | 0.006614 | Jaynes-Cummings | mesolve | Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz | 2022-08-30 10:22:06.480975 |
275 | mesolve-Jaynes-Cummings-128 | test_mesolve[Jaynes-Cummings-128] | test_solvers.py::test_mesolve[Jaynes-Cummings-... | Jaynes-Cummings-128 | 128 | 1.325907 | 0.014516 | Jaynes-Cummings | mesolve | Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz | 2022-08-30 10:22:06.480975 |
276 | mesolve-Cavity-4 | test_mesolve[Cavity-4] | test_solvers.py::test_mesolve[Cavity-4] | Cavity-4 | 4 | 0.028646 | 0.009366 | Cavity | mesolve | Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz | 2022-08-30 10:22:06.480975 |
277 | mesolve-Cavity-8 | test_mesolve[Cavity-8] | test_solvers.py::test_mesolve[Cavity-8] | Cavity-8 | 8 | 0.038817 | 0.012263 | Cavity | mesolve | Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz | 2022-08-30 10:22:06.480975 |
278 | mesolve-Cavity-16 | test_mesolve[Cavity-16] | test_solvers.py::test_mesolve[Cavity-16] | Cavity-16 | 16 | 0.086174 | 0.017225 | Cavity | mesolve | Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz | 2022-08-30 10:22:06.480975 |
279 | mesolve-Cavity-32 | test_mesolve[Cavity-32] | test_solvers.py::test_mesolve[Cavity-32] | Cavity-32 | 32 | 0.336728 | 0.010061 | Cavity | mesolve | Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz | 2022-08-30 10:22:06.480975 |
280 | mesolve-Cavity-64 | test_mesolve[Cavity-64] | test_solvers.py::test_mesolve[Cavity-64] | Cavity-64 | 64 | 1.929214 | 0.092705 | Cavity | mesolve | Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz | 2022-08-30 10:22:06.480975 |
281 | mesolve-Cavity-128 | test_mesolve[Cavity-128] | test_solvers.py::test_mesolve[Cavity-128] | Cavity-128 | 128 | 10.597770 | 0.313492 | Cavity | mesolve | Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz | 2022-08-30 10:22:06.480975 |
282 | mesolve-Qubit Spin Chain-4 | test_mesolve[Qubit Spin Chain-4] | test_solvers.py::test_mesolve[Qubit Spin Chain-4] | Qubit Spin Chain-4 | 4 | 0.023840 | 0.007519 | Qubit Spin Chain | mesolve | Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz | 2022-08-30 10:22:06.480975 |
283 | mesolve-Qubit Spin Chain-8 | test_mesolve[Qubit Spin Chain-8] | test_solvers.py::test_mesolve[Qubit Spin Chain-8] | Qubit Spin Chain-8 | 8 | 0.024849 | 0.013326 | Qubit Spin Chain | mesolve | Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz | 2022-08-30 10:22:06.480975 |
284 | mesolve-Qubit Spin Chain-16 | test_mesolve[Qubit Spin Chain-16] | test_solvers.py::test_mesolve[Qubit Spin Chain... | Qubit Spin Chain-16 | 16 | 0.030516 | 0.001029 | Qubit Spin Chain | mesolve | Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz | 2022-08-30 10:22:06.480975 |
285 | mesolve-Qubit Spin Chain-32 | test_mesolve[Qubit Spin Chain-32] | test_solvers.py::test_mesolve[Qubit Spin Chain... | Qubit Spin Chain-32 | 32 | 0.055828 | 0.001924 | Qubit Spin Chain | mesolve | Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz | 2022-08-30 10:22:06.480975 |
286 | mesolve-Qubit Spin Chain-64 | test_mesolve[Qubit Spin Chain-64] | test_solvers.py::test_mesolve[Qubit Spin Chain... | Qubit Spin Chain-64 | 64 | 0.163021 | 0.003549 | Qubit Spin Chain | mesolve | Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz | 2022-08-30 10:22:06.480975 |
287 | mesolve-Qubit Spin Chain-128 | test_mesolve[Qubit Spin Chain-128] | test_solvers.py::test_mesolve[Qubit Spin Chain... | Qubit Spin Chain-128 | 128 | 0.685025 | 0.015595 | Qubit Spin Chain | mesolve | Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz | 2022-08-30 10:22:06.480975 |
We can now set a path to store the plots in a create them!
plot_path= Path("images")
# parameters: data, x axis, y axis, x_log, y_log, path
plot_data(historical_data, "datetime", "stats_mean", False, True, path=plot_path)
plot_data(scaling_data, "size", "stats_mean", False, True, path=plot_path)