Skip to content

Commit fe2a173

Browse files
committed
Merge branch 'main' into na-zx-synthesis-merge
2 parents c826fbb + f077481 commit fe2a173

9 files changed

Lines changed: 272 additions & 268 deletions

File tree

.github/workflows/cd.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ permissions:
1212
jobs:
1313
build-sdist:
1414
name: 🐍 Packaging
15-
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-packaging-sdist.yml@89734354f64f30a80dd16602d4e271df34348987 # v1.17.4
15+
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-packaging-sdist.yml@7f8eeed7a3dba08e1e9be54966e5722f5753d0df # v1.17.7
1616

1717
# Builds wheels on all supported platforms using cibuildwheel.
1818
# The wheels are uploaded as GitHub artifacts `dev-cibw-*` or `cibw-*`, depending on whether
@@ -31,7 +31,7 @@ jobs:
3131
windows-2022,
3232
windows-11-arm,
3333
]
34-
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-packaging-wheel-cibuildwheel.yml@89734354f64f30a80dd16602d4e271df34348987 # v1.17.4
34+
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-packaging-wheel-cibuildwheel.yml@7f8eeed7a3dba08e1e9be54966e5722f5753d0df # v1.17.7
3535
with:
3636
runs-on: ${{ matrix.runs-on }}
3737
setup-z3: true
@@ -54,7 +54,7 @@ jobs:
5454
path: dist
5555
merge-multiple: true
5656
- name: Generate artifact attestation for sdist and wheel(s)
57-
uses: actions/attest-build-provenance@977bb373ede98d70efdf65b84cb5f73e068dcc2a # v3
57+
uses: actions/attest-build-provenance@00014ed6ed5efc5b1ab7f7f34a39eb55d41aa4f8 # v3.1.0
5858
with:
5959
subject-path: dist/*
6060
- uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0

.github/workflows/ci.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ concurrency:
1414
jobs:
1515
change-detection:
1616
name: 🔍 Change
17-
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-change-detection.yml@89734354f64f30a80dd16602d4e271df34348987 # v1.17.4
17+
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-change-detection.yml@7f8eeed7a3dba08e1e9be54966e5722f5753d0df # v1.17.7
1818

1919
cpp-tests-ubuntu:
2020
name: 🇨‌ Test 🐧
@@ -30,7 +30,7 @@ jobs:
3030
- runs-on: ubuntu-24.04
3131
compiler: gcc
3232
config: Debug
33-
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-tests-ubuntu.yml@89734354f64f30a80dd16602d4e271df34348987 # v1.17.4
33+
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-tests-ubuntu.yml@7f8eeed7a3dba08e1e9be54966e5722f5753d0df # v1.17.7
3434
with:
3535
runs-on: ${{ matrix.runs-on }}
3636
compiler: ${{ matrix.compiler }}
@@ -51,7 +51,7 @@ jobs:
5151
- runs-on: macos-14
5252
compiler: clang
5353
config: Debug
54-
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-tests-macos.yml@89734354f64f30a80dd16602d4e271df34348987 # v1.17.4
54+
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-tests-macos.yml@7f8eeed7a3dba08e1e9be54966e5722f5753d0df # v1.17.7
5555
with:
5656
runs-on: ${{ matrix.runs-on }}
5757
compiler: ${{ matrix.compiler }}
@@ -73,7 +73,7 @@ jobs:
7373
- runs-on: windows-2022
7474
compiler: msvc
7575
config: Debug
76-
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-tests-windows.yml@89734354f64f30a80dd16602d4e271df34348987 # v1.17.4
76+
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-tests-windows.yml@7f8eeed7a3dba08e1e9be54966e5722f5753d0df # v1.17.7
7777
with:
7878
runs-on: ${{ matrix.runs-on }}
7979
compiler: ${{ matrix.compiler }}
@@ -91,7 +91,7 @@ jobs:
9191
runs-on: [ubuntu-24.04, ubuntu-24.04-arm]
9292
compiler: [gcc, clang, clang-20, clang-21]
9393
config: [Release, Debug]
94-
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-tests-ubuntu.yml@89734354f64f30a80dd16602d4e271df34348987 # v1.17.4
94+
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-tests-ubuntu.yml@7f8eeed7a3dba08e1e9be54966e5722f5753d0df # v1.17.7
9595
with:
9696
runs-on: ${{ matrix.runs-on }}
9797
compiler: ${{ matrix.compiler }}
@@ -109,7 +109,7 @@ jobs:
109109
runs-on: [macos-14, macos-15, macos-15-intel]
110110
compiler: [clang, clang-20, clang-21, gcc-14, gcc-15]
111111
config: [Release, Debug]
112-
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-tests-macos.yml@89734354f64f30a80dd16602d4e271df34348987 # v1.17.4
112+
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-tests-macos.yml@7f8eeed7a3dba08e1e9be54966e5722f5753d0df # v1.17.7
113113
with:
114114
runs-on: ${{ matrix.runs-on }}
115115
compiler: ${{ matrix.compiler }}
@@ -128,7 +128,7 @@ jobs:
128128
runs-on: [windows-2022, windows-2025, windows-11-arm]
129129
compiler: [msvc, clang]
130130
config: [Release, Debug]
131-
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-tests-windows.yml@89734354f64f30a80dd16602d4e271df34348987 # v1.17.4
131+
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-tests-windows.yml@7f8eeed7a3dba08e1e9be54966e5722f5753d0df # v1.17.7
132132
with:
133133
runs-on: ${{ matrix.runs-on }}
134134
compiler: ${{ matrix.compiler }}
@@ -139,7 +139,7 @@ jobs:
139139
name: 🇨‌ Coverage
140140
needs: change-detection
141141
if: fromJSON(needs.change-detection.outputs.run-cpp-tests)
142-
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-coverage.yml@89734354f64f30a80dd16602d4e271df34348987 # v1.17.4
142+
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-coverage.yml@7f8eeed7a3dba08e1e9be54966e5722f5753d0df # v1.17.7
143143
with:
144144
setup-z3: true
145145
permissions:
@@ -151,7 +151,7 @@ jobs:
151151
name: 🇨‌ Lint
152152
needs: change-detection
153153
if: fromJSON(needs.change-detection.outputs.run-cpp-linter)
154-
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-linter.yml@89734354f64f30a80dd16602d4e271df34348987 # v1.17.4
154+
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-linter.yml@7f8eeed7a3dba08e1e9be54966e5722f5753d0df # v1.17.7
155155
with:
156156
clang-version: 20
157157
cmake-args: -DBUILD_MQT_QMAP_BINDINGS=ON
@@ -176,7 +176,7 @@ jobs:
176176
macos-14,
177177
windows-2022,
178178
]
179-
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-tests.yml@89734354f64f30a80dd16602d4e271df34348987 # v1.17.4
179+
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-tests.yml@7f8eeed7a3dba08e1e9be54966e5722f5753d0df # v1.17.7
180180
with:
181181
runs-on: ${{ matrix.runs-on }}
182182
setup-z3: true
@@ -185,7 +185,7 @@ jobs:
185185
name: 🐍 Coverage
186186
needs: [change-detection, python-tests]
187187
if: fromJSON(needs.change-detection.outputs.run-python-tests)
188-
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-coverage.yml@89734354f64f30a80dd16602d4e271df34348987 # v1.17.4
188+
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-coverage.yml@7f8eeed7a3dba08e1e9be54966e5722f5753d0df # v1.17.7
189189
permissions:
190190
contents: read
191191
id-token: write
@@ -199,7 +199,7 @@ jobs:
199199
fail-fast: false
200200
matrix:
201201
runs-on: [macos-15, windows-2025]
202-
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-tests.yml@89734354f64f30a80dd16602d4e271df34348987 # v1.17.4
202+
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-tests.yml@7f8eeed7a3dba08e1e9be54966e5722f5753d0df # v1.17.7
203203
with:
204204
runs-on: ${{ matrix.runs-on }}
205205
setup-z3: true
@@ -208,15 +208,15 @@ jobs:
208208
name: 🐍 Lint
209209
needs: change-detection
210210
if: fromJSON(needs.change-detection.outputs.run-python-tests)
211-
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-linter.yml@89734354f64f30a80dd16602d4e271df34348987 # v1.17.4
211+
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-linter.yml@7f8eeed7a3dba08e1e9be54966e5722f5753d0df # v1.17.7
212212
with:
213213
setup-z3: true
214214

215215
build-sdist:
216216
name: 🚀 CD
217217
needs: change-detection
218218
if: fromJSON(needs.change-detection.outputs.run-cd)
219-
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-packaging-sdist.yml@89734354f64f30a80dd16602d4e271df34348987 # v1.17.4
219+
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-packaging-sdist.yml@7f8eeed7a3dba08e1e9be54966e5722f5753d0df # v1.17.7
220220

221221
build-wheel:
222222
name: 🚀 CD
@@ -234,7 +234,7 @@ jobs:
234234
windows-2022,
235235
windows-11-arm,
236236
]
237-
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-packaging-wheel-cibuildwheel.yml@89734354f64f30a80dd16602d4e271df34348987 # v1.17.4
237+
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-packaging-wheel-cibuildwheel.yml@7f8eeed7a3dba08e1e9be54966e5722f5753d0df # v1.17.7
238238
with:
239239
runs-on: ${{ matrix.runs-on }}
240240
setup-z3: true

.github/workflows/update-mqt-core.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ concurrency:
2121
jobs:
2222
update-mqt-core:
2323
name: ⬆️ Update MQT Core
24-
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-mqt-core-update.yml@89734354f64f30a80dd16602d4e271df34348987 # v1.17.4
24+
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-mqt-core-update.yml@7f8eeed7a3dba08e1e9be54966e5722f5753d0df # v1.17.7
2525
with:
2626
update-to-head: ${{ github.event.inputs.update-to-head == 'true' }}
2727
secrets:

.github/workflows/upstream.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
fail-fast: false
2020
matrix:
2121
runs-on: [ubuntu-24.04, macos-14, windows-2022]
22-
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-qiskit-upstream-tests.yml@89734354f64f30a80dd16602d4e271df34348987 # v1.17.4
22+
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-qiskit-upstream-tests.yml@7f8eeed7a3dba08e1e9be54966e5722f5753d0df # v1.17.7
2323
with:
2424
runs-on: ${{ matrix.runs-on }}
2525
setup-z3: true
@@ -28,7 +28,7 @@ jobs:
2828
name: Create issue on failure
2929
needs: qiskit-upstream-tests
3030
if: ${{ always() }}
31-
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-qiskit-upstream-issue.yml@89734354f64f30a80dd16602d4e271df34348987 # v1.17.4
31+
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-qiskit-upstream-issue.yml@7f8eeed7a3dba08e1e9be54966e5722f5753d0df # v1.17.7
3232
with:
3333
tests-result: ${{ needs.qiskit-upstream-tests.result }}
3434
permissions:

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,13 @@ repos:
6666

6767
# Ensure uv lock file is up-to-date
6868
- repo: https://github.com/astral-sh/uv-pre-commit
69-
rev: 0.9.17
69+
rev: 0.9.18
7070
hooks:
7171
- id: uv-lock
7272

7373
# Python linting using ruff
7474
- repo: https://github.com/astral-sh/ruff-pre-commit
75-
rev: v0.14.9
75+
rev: v0.14.10
7676
hooks:
7777
- id: ruff-check
7878
- id: ruff-format
@@ -107,7 +107,7 @@ repos:
107107

108108
# Clang-format the C++ part of the code base automatically
109109
- repo: https://github.com/pre-commit/mirrors-clang-format
110-
rev: v21.1.7
110+
rev: v21.1.8
111111
hooks:
112112
- id: clang-format
113113
types_or: [c++, c, cuda]

eval/clifford_state_prep/clifford_state_prep_eval.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,8 @@ def reset_inconsistent_results() -> None:
470470
logger.info("Resetting inconsistent synthesis results and their timeouts...")
471471
with Session(engine) as session:
472472
cliff_results = (
473-
session.query(SynthesisResult)
473+
session
474+
.query(SynthesisResult)
474475
.filter(
475476
SynthesisResult.qmap_cliff_iter_gate_count.isnot(None),
476477
SynthesisResult.qmap_cliff_maxsat_gate_count.isnot(None),
@@ -480,7 +481,8 @@ def reset_inconsistent_results() -> None:
480481
)
481482

482483
circ_results = (
483-
session.query(SynthesisResult)
484+
session
485+
.query(SynthesisResult)
484486
.filter(
485487
SynthesisResult.qmap_circ_iter_gate_count.isnot(None),
486488
SynthesisResult.qmap_circ_maxsat_gate_count.isnot(None),
@@ -606,7 +608,8 @@ def prune_excess_benchmarks() -> None:
606608
for q in [1, 2, 3, 4, 5, 6]:
607609
allowed = _allowed_num_gates(q)
608610
deleted = (
609-
session.query(SynthesisResult)
611+
session
612+
.query(SynthesisResult)
610613
.filter(
611614
SynthesisResult.num_qubits == q,
612615
~SynthesisResult.num_gates.in_(list(allowed)),

eval/clifford_state_prep/visualize_clifford_synthesis.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@ def _read_results() -> pd.DataFrame:
119119
def _long_format(df: pd.DataFrame) -> tuple[pd.DataFrame, pd.DataFrame]:
120120
# Melt runtimes
121121
rt_long = (
122-
df.melt(
122+
df
123+
.melt(
123124
id_vars=["num_qubits", "num_gates", "instance"],
124125
value_vars=list(RUNTIME_COLS.keys()),
125126
var_name="metric",
@@ -132,7 +133,8 @@ def _long_format(df: pd.DataFrame) -> tuple[pd.DataFrame, pd.DataFrame]:
132133

133134
# Melt gate counts
134135
gc_long = (
135-
df.melt(
136+
df
137+
.melt(
136138
id_vars=["num_qubits", "num_gates", "instance"],
137139
value_vars=list(GATE_COLS.keys()),
138140
var_name="metric",

eval/na/zoned/eval_ids_relaxed_routing.py

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -206,10 +206,9 @@ def process_benchmark(
206206

207207
code = "\n".join(line for line in code.splitlines() if not line.startswith("@+ u"))
208208
pathlib.Path(f"out/{compiler_name}/{setting_name}").mkdir(exist_ok=True, parents=True)
209-
with pathlib.Path(f"out/{compiler_name}/{setting_name}/{benchmark_name}_{qc.num_qubits}.naviz").open(
210-
"w", encoding="utf-8"
211-
) as f:
212-
f.write(code)
209+
pathlib.Path(f"out/{compiler_name}/{setting_name}/{benchmark_name}_{qc.num_qubits}.naviz").write_text(
210+
code, encoding="utf-8"
211+
)
213212
print("\033[32m[INFO]\033[0m Done")
214213

215214
print(f"\033[32m[INFO]\033[0m Evaluating {benchmark_name} with {qc.num_qubits} qubits...")
@@ -561,12 +560,12 @@ def evaluate(self, name: str, qc: QuantumComputation, setting: str, code: str, s
561560

562561
def print_header(self) -> None:
563562
"""Print the header of the CSV file."""
564-
with pathlib.Path(self.filename).open("w", encoding="utf-8") as csv:
565-
csv.write(
566-
"circuit_name,num_qubits,setting,status,two_qubit_gates,scheduling_time,reuse_analysis_time,"
567-
"placement_time,routing_time,code_generation_time,total_time,two_qubit_gate_layer,max_two_qubit_gates,"
568-
"rearrangement_duration\n"
569-
)
563+
pathlib.Path(self.filename).write_text(
564+
"circuit_name,num_qubits,setting,status,two_qubit_gates,scheduling_time,reuse_analysis_time,"
565+
"placement_time,routing_time,code_generation_time,total_time,two_qubit_gate_layer,max_two_qubit_gates,"
566+
"rearrangement_duration\n",
567+
encoding="utf-8",
568+
)
570569

571570
def print_data(self) -> None:
572571
"""Print the data of the CSV file."""

0 commit comments

Comments
 (0)