Skip to content

Commit 825be09

Browse files
🎨 pre-commit fixes
1 parent 6f07e70 commit 825be09

File tree

4 files changed

+47
-71
lines changed

4 files changed

+47
-71
lines changed

scripts/co3/circuit_types.py

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
import matplotlib.pyplot as plt
1515

1616
# This notebook must be run from the directory /mqt-qecc/src/mqt/qecc/co3/plots
17-
import mqt.qecc.co3 as co
1817

1918
plt.rcParams["font.family"] = "Times New Roman"
2019

@@ -26,32 +25,32 @@
2625
g, data_qubit_locs, factory_ring = layout.gen_layout("hex", 24, [])
2726
custom_layout_q24_hex_f8 = [data_qubit_locs, g]
2827

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

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

3534
# ROW
3635
g, data_qubit_locs, factory_ring = layout.gen_layout("row", 24, [])
3736
custom_layout_q24_row_f8 = [data_qubit_locs, g]
3837

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

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

4544

4645
# PAIR
4746
g, data_qubit_locs, factory_ring = layout.gen_layout("pair", 24, [])
4847
custom_layout_q24_pair_f8 = [data_qubit_locs, g]
4948

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

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

5655
# -----------------------------
5756

scripts/co3/construct_layouts.ipynb

Lines changed: 23 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
"cells": [
33
{
44
"cell_type": "code",
5-
"execution_count": 25,
5+
"execution_count": null,
66
"metadata": {},
77
"outputs": [],
88
"source": [
99
"import random\n",
1010
"\n",
11-
"import layouts as layouts\n",
11+
"import layouts\n",
1212
"\n",
1313
"import mqt.qecc.co3 as co\n",
1414
"from mqt.qecc.co3.utils.lattice_router import plot_lattice_paths"
@@ -25,7 +25,7 @@
2525
},
2626
{
2727
"cell_type": "code",
28-
"execution_count": 26,
28+
"execution_count": null,
2929
"metadata": {},
3030
"outputs": [
3131
{
@@ -70,7 +70,7 @@
7070
},
7171
{
7272
"cell_type": "code",
73-
"execution_count": 27,
73+
"execution_count": null,
7474
"metadata": {},
7575
"outputs": [
7676
{
@@ -120,7 +120,7 @@
120120
},
121121
{
122122
"cell_type": "code",
123-
"execution_count": 28,
123+
"execution_count": null,
124124
"metadata": {},
125125
"outputs": [
126126
{
@@ -156,7 +156,7 @@
156156
},
157157
{
158158
"cell_type": "code",
159-
"execution_count": 30,
159+
"execution_count": null,
160160
"metadata": {},
161161
"outputs": [
162162
{
@@ -197,7 +197,7 @@
197197
},
198198
{
199199
"cell_type": "code",
200-
"execution_count": 31,
200+
"execution_count": null,
201201
"metadata": {},
202202
"outputs": [
203203
{
@@ -251,7 +251,7 @@
251251
},
252252
{
253253
"cell_type": "code",
254-
"execution_count": 32,
254+
"execution_count": null,
255255
"metadata": {},
256256
"outputs": [
257257
{
@@ -291,7 +291,7 @@
291291
},
292292
{
293293
"cell_type": "code",
294-
"execution_count": 33,
294+
"execution_count": null,
295295
"metadata": {},
296296
"outputs": [
297297
{
@@ -340,7 +340,7 @@
340340
},
341341
{
342342
"cell_type": "code",
343-
"execution_count": 34,
343+
"execution_count": null,
344344
"metadata": {},
345345
"outputs": [
346346
{
@@ -380,7 +380,7 @@
380380
},
381381
{
382382
"cell_type": "code",
383-
"execution_count": 35,
383+
"execution_count": null,
384384
"metadata": {},
385385
"outputs": [
386386
{
@@ -420,7 +420,7 @@
420420
},
421421
{
422422
"cell_type": "code",
423-
"execution_count": 36,
423+
"execution_count": null,
424424
"metadata": {},
425425
"outputs": [
426426
{
@@ -456,7 +456,7 @@
456456
},
457457
{
458458
"cell_type": "code",
459-
"execution_count": 37,
459+
"execution_count": null,
460460
"metadata": {},
461461
"outputs": [],
462462
"source": [
@@ -478,7 +478,7 @@
478478
},
479479
{
480480
"cell_type": "code",
481-
"execution_count": 38,
481+
"execution_count": null,
482482
"metadata": {},
483483
"outputs": [],
484484
"source": [
@@ -637,7 +637,7 @@
637637
},
638638
{
639639
"cell_type": "code",
640-
"execution_count": 39,
640+
"execution_count": null,
641641
"metadata": {},
642642
"outputs": [
643643
{
@@ -719,7 +719,7 @@
719719
" (21, 3)]"
720720
]
721721
},
722-
"execution_count": 39,
722+
"execution_count": null,
723723
"metadata": {},
724724
"output_type": "execute_result"
725725
}
@@ -733,7 +733,7 @@
733733
},
734734
{
735735
"cell_type": "code",
736-
"execution_count": 41,
736+
"execution_count": null,
737737
"metadata": {},
738738
"outputs": [
739739
{
@@ -769,7 +769,7 @@
769769
},
770770
{
771771
"cell_type": "code",
772-
"execution_count": 42,
772+
"execution_count": null,
773773
"metadata": {},
774774
"outputs": [],
775775
"source": [
@@ -787,7 +787,7 @@
787787
},
788788
{
789789
"cell_type": "code",
790-
"execution_count": 43,
790+
"execution_count": null,
791791
"metadata": {},
792792
"outputs": [
793793
{
@@ -840,7 +840,7 @@
840840
" [((2, 5), (6, 7)), ((2, 4), (3, 11)), (6, 5), ((3, 9), (6, 10))]]"
841841
]
842842
},
843-
"execution_count": 43,
843+
"execution_count": null,
844844
"metadata": {},
845845
"output_type": "execute_result"
846846
}
@@ -855,7 +855,7 @@
855855
},
856856
{
857857
"cell_type": "code",
858-
"execution_count": 44,
858+
"execution_count": null,
859859
"metadata": {},
860860
"outputs": [],
861861
"source": [
@@ -864,7 +864,7 @@
864864
},
865865
{
866866
"cell_type": "code",
867-
"execution_count": 45,
867+
"execution_count": null,
868868
"metadata": {},
869869
"outputs": [
870870
{
@@ -975,13 +975,6 @@
975975
" # use G from hc run\n",
976976
" plot_lattice_paths(lat.G, vdp_dict, factory_locs=factories, layout=layout, size=size)"
977977
]
978-
},
979-
{
980-
"cell_type": "code",
981-
"execution_count": null,
982-
"metadata": {},
983-
"outputs": [],
984-
"source": []
985978
}
986979
],
987980
"metadata": {
@@ -999,8 +992,7 @@
999992
"mimetype": "text/x-python",
1000993
"name": "python",
1001994
"nbconvert_exporter": "python",
1002-
"pygments_lexer": "ipython3",
1003-
"version": "3.11.12"
995+
"pygments_lexer": "ipython3"
1004996
}
1005997
},
1006998
"nbformat": 4,

scripts/co3/f_vs_t_q24_row_small.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@
102102

103103
res_lst = ev.collect_data_space_time(instances, hc_params, reps, path, both_metric)
104104

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

108108
path += "_metricrouting"
109109

scripts/co3/numerics_summarized.ipynb

Lines changed: 10 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"cells": [
33
{
44
"cell_type": "code",
5-
"execution_count": 12,
5+
"execution_count": null,
66
"metadata": {},
77
"outputs": [],
88
"source": [
@@ -26,7 +26,7 @@
2626
},
2727
{
2828
"cell_type": "code",
29-
"execution_count": 13,
29+
"execution_count": null,
3030
"metadata": {},
3131
"outputs": [],
3232
"source": [
@@ -43,7 +43,7 @@
4343
},
4444
{
4545
"cell_type": "code",
46-
"execution_count": 14,
46+
"execution_count": null,
4747
"metadata": {},
4848
"outputs": [
4949
{
@@ -52,7 +52,7 @@
5252
"50"
5353
]
5454
},
55-
"execution_count": 14,
55+
"execution_count": null,
5656
"metadata": {},
5757
"output_type": "execute_result"
5858
}
@@ -63,7 +63,7 @@
6363
},
6464
{
6565
"cell_type": "code",
66-
"execution_count": 15,
66+
"execution_count": null,
6767
"metadata": {},
6868
"outputs": [
6969
{
@@ -100,7 +100,7 @@
100100
},
101101
{
102102
"cell_type": "code",
103-
"execution_count": 16,
103+
"execution_count": null,
104104
"metadata": {},
105105
"outputs": [],
106106
"source": [
@@ -111,7 +111,7 @@
111111
},
112112
{
113113
"cell_type": "code",
114-
"execution_count": 17,
114+
"execution_count": null,
115115
"metadata": {},
116116
"outputs": [
117117
{
@@ -120,7 +120,7 @@
120120
"50"
121121
]
122122
},
123-
"execution_count": 17,
123+
"execution_count": null,
124124
"metadata": {},
125125
"output_type": "execute_result"
126126
}
@@ -131,7 +131,7 @@
131131
},
132132
{
133133
"cell_type": "code",
134-
"execution_count": 18,
134+
"execution_count": null,
135135
"metadata": {},
136136
"outputs": [
137137
{
@@ -168,20 +168,6 @@
168168
"size = (4.5, 2.5)\n",
169169
"ev.plot_improvement_circuit_types(res_lst, size=size)"
170170
]
171-
},
172-
{
173-
"cell_type": "code",
174-
"execution_count": null,
175-
"metadata": {},
176-
"outputs": [],
177-
"source": []
178-
},
179-
{
180-
"cell_type": "code",
181-
"execution_count": null,
182-
"metadata": {},
183-
"outputs": [],
184-
"source": []
185171
}
186172
],
187173
"metadata": {
@@ -199,8 +185,7 @@
199185
"mimetype": "text/x-python",
200186
"name": "python",
201187
"nbconvert_exporter": "python",
202-
"pygments_lexer": "ipython3",
203-
"version": "3.11.12"
188+
"pygments_lexer": "ipython3"
204189
}
205190
},
206191
"nbformat": 4,

0 commit comments

Comments
 (0)