Skip to content

Commit c97683a

Browse files
committed
added plots
1 parent 20ecbf0 commit c97683a

8 files changed

+202
-172
lines changed

scripts/co3/circuit_types.py

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99

1010
from __future__ import annotations
1111

12+
import evaluation as ev
13+
import layouts as layout
1214
import matplotlib.pyplot as plt
1315

1416
# This notebook must be run from the directory /mqt-qecc/src/mqt/qecc/co3/plots
@@ -17,39 +19,39 @@
1719
plt.rcParams["font.family"] = "Times New Roman"
1820

1921

20-
path = "./results/circuit_types_q24_250321_c"
22+
path = "./results/circuit_types_q24_250718_d"
2123

2224
# HEX
2325

24-
g, data_qubit_locs, factory_ring = co.plots.gen_layout("hex", 24, [])
26+
g, data_qubit_locs, factory_ring = layout.gen_layout("hex", 24, [])
2527
custom_layout_q24_hex_f8 = [data_qubit_locs, g]
2628

27-
g, data_qubit_locs, factory_ring = co.plots.gen_layout("hex", 42, [])
28-
custom_layout_q42_hex_f8 = [data_qubit_locs, g]
29+
#g, data_qubit_locs, factory_ring = co.plots.gen_layout("hex", 42, [])
30+
#custom_layout_q42_hex_f8 = [data_qubit_locs, g]
2931

30-
g, data_qubit_locs, factory_ring = co.plots.gen_layout("hex", 60, [])
31-
custom_layout_q60_hex_f8 = [data_qubit_locs, g]
32+
#g, data_qubit_locs, factory_ring = co.plots.gen_layout("hex", 60, [])
33+
#custom_layout_q60_hex_f8 = [data_qubit_locs, g]
3234

3335
# ROW
34-
g, data_qubit_locs, factory_ring = co.plots.gen_layout("row", 24, [])
36+
g, data_qubit_locs, factory_ring = layout.gen_layout("row", 24, [])
3537
custom_layout_q24_row_f8 = [data_qubit_locs, g]
3638

37-
g, data_qubit_locs, factory_ring = co.plots.gen_layout("row", 42, [])
38-
custom_layout_q42_row_f8 = [data_qubit_locs, g]
39+
#g, data_qubit_locs, factory_ring = co.plots.gen_layout("row", 42, [])
40+
#custom_layout_q42_row_f8 = [data_qubit_locs, g]
3941

40-
g, data_qubit_locs, factory_ring = co.plots.gen_layout("row", 60, [])
41-
custom_layout_q60_row_f8 = [data_qubit_locs, g]
42+
#g, data_qubit_locs, factory_ring = co.plots.gen_layout("row", 60, [])
43+
#custom_layout_q60_row_f8 = [data_qubit_locs, g]
4244

4345

4446
# PAIR
45-
g, data_qubit_locs, factory_ring = co.plots.gen_layout("pair", 24, [])
47+
g, data_qubit_locs, factory_ring = layout.gen_layout("pair", 24, [])
4648
custom_layout_q24_pair_f8 = [data_qubit_locs, g]
4749

48-
g, data_qubit_locs, factory_ring = co.plots.gen_layout("pair", 42, [])
49-
custom_layout_q42_pair_f8 = [data_qubit_locs, g]
50+
#g, data_qubit_locs, factory_ring = co.plots.gen_layout("pair", 42, [])
51+
#custom_layout_q42_pair_f8 = [data_qubit_locs, g]
5052

51-
g, data_qubit_locs, factory_ring = co.plots.gen_layout("pair", 60, [])
52-
custom_layout_q60_pair_f8 = [data_qubit_locs, g]
53+
#g, data_qubit_locs, factory_ring = co.plots.gen_layout("pair", 60, [])
54+
#custom_layout_q60_pair_f8 = [data_qubit_locs, g]
5355

5456
# -----------------------------
5557

@@ -206,6 +208,6 @@
206208
]
207209

208210

209-
reps = 5
211+
reps = 50
210212
both_metric = False
211-
res_lst = co.plots.collect_data_space_time(instances, hc_params, reps, path, both_metric)
213+
res_lst = ev.collect_data_space_time(instances, hc_params, reps, path, both_metric)

scripts/co3/construct_layouts.ipynb

Lines changed: 144 additions & 132 deletions
Large diffs are not rendered by default.

scripts/co3/f_vs_t_q24_row_small.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@
1212
import pickle # noqa: S403
1313
from pathlib import Path
1414

15+
import evaluation as ev
1516
import layouts as layout
1617

17-
path = "./results/f_vs_time_q24_ratio08_small_row_250321_2_8_f_t_temp" # add you desired path here
18+
path = "./results/f_vs_time_q24_ratio08_small_row_250718_2_8_f_t_temp" # add you desired path here
1819

1920
# ROW
2021
factories_q24_row = [(0, 3), (0, 9), (0, 15), (6, 6), (6, 12), (6, 18), (5, 3), (2, 2)]
@@ -99,10 +100,10 @@
99100
both_metric = True # both metrics heuristic and exact are computed
100101

101102

102-
# res_lst = ev.collect_data_space_time(instances, hc_params, reps, path, both_metric)
103+
res_lst = ev.collect_data_space_time(instances, hc_params, reps, path, both_metric)
103104

104-
with Path(path).open("rb") as f:
105-
res_lst = pickle.load(f) # noqa: S301
105+
#with Path(path).open("rb") as f:
106+
# res_lst = pickle.load(f) # noqa: S301
106107

107108
path += "_metricrouting"
108109

scripts/co3/numerics_summarized.ipynb

Lines changed: 33 additions & 18 deletions
Large diffs are not rendered by default.
-284 KB
Binary file not shown.
284 KB
Binary file not shown.

scripts/co3/results_minimal/f_vs_time_q24_ratio08_small_row_250321_2_8_f_t_B renamed to scripts/co3/results_minimal/f_vs_time_q24_ratio08_small_row_250718_2_8_f_t_temp

124 KB
Binary file not shown.

scripts/co3/results_minimal/f_vs_time_q24_ratio08_small_row_250321_2_8_f_t_B_metricrouting renamed to scripts/co3/results_minimal/f_vs_time_q24_ratio08_small_row_250718_2_8_f_t_temp_metricrouting

124 KB
Binary file not shown.

0 commit comments

Comments
 (0)