Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ permissions:
jobs:
build-sdist:
name: 🐍 Packaging
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-packaging-sdist.yml@89734354f64f30a80dd16602d4e271df34348987 # v1.17.4
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-packaging-sdist.yml@654680ab77b3af8226a9f5cd9acfd157bd106f17 # v1.17.5

# Builds wheels on all supported platforms using cibuildwheel.
# The wheels are uploaded as GitHub artifacts `dev-cibw-*` or `cibw-*`, depending on whether
Expand All @@ -31,7 +31,7 @@ jobs:
windows-2022,
windows-11-arm,
]
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-packaging-wheel-cibuildwheel.yml@89734354f64f30a80dd16602d4e271df34348987 # v1.17.4
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-packaging-wheel-cibuildwheel.yml@654680ab77b3af8226a9f5cd9acfd157bd106f17 # v1.17.5
with:
runs-on: ${{ matrix.runs-on }}
setup-z3: true
Expand Down
30 changes: 15 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ concurrency:
jobs:
change-detection:
name: 🔍 Change
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-change-detection.yml@89734354f64f30a80dd16602d4e271df34348987 # v1.17.4
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-change-detection.yml@654680ab77b3af8226a9f5cd9acfd157bd106f17 # v1.17.5

cpp-tests-ubuntu:
name: 🇨‌ Test 🐧
Expand All @@ -30,7 +30,7 @@ jobs:
- runs-on: ubuntu-24.04
compiler: gcc
config: Debug
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-tests-ubuntu.yml@89734354f64f30a80dd16602d4e271df34348987 # v1.17.4
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-tests-ubuntu.yml@654680ab77b3af8226a9f5cd9acfd157bd106f17 # v1.17.5
with:
runs-on: ${{ matrix.runs-on }}
compiler: ${{ matrix.compiler }}
Expand All @@ -51,7 +51,7 @@ jobs:
- runs-on: macos-14
compiler: clang
config: Debug
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-tests-macos.yml@89734354f64f30a80dd16602d4e271df34348987 # v1.17.4
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-tests-macos.yml@654680ab77b3af8226a9f5cd9acfd157bd106f17 # v1.17.5
with:
runs-on: ${{ matrix.runs-on }}
compiler: ${{ matrix.compiler }}
Expand All @@ -73,7 +73,7 @@ jobs:
- runs-on: windows-2022
compiler: msvc
config: Debug
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-tests-windows.yml@89734354f64f30a80dd16602d4e271df34348987 # v1.17.4
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-tests-windows.yml@654680ab77b3af8226a9f5cd9acfd157bd106f17 # v1.17.5
with:
runs-on: ${{ matrix.runs-on }}
compiler: ${{ matrix.compiler }}
Expand All @@ -91,7 +91,7 @@ jobs:
runs-on: [ubuntu-24.04, ubuntu-24.04-arm]
compiler: [gcc, clang, clang-20, clang-21]
config: [Release, Debug]
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-tests-ubuntu.yml@89734354f64f30a80dd16602d4e271df34348987 # v1.17.4
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-tests-ubuntu.yml@654680ab77b3af8226a9f5cd9acfd157bd106f17 # v1.17.5
with:
runs-on: ${{ matrix.runs-on }}
compiler: ${{ matrix.compiler }}
Expand All @@ -109,7 +109,7 @@ jobs:
runs-on: [macos-14, macos-15, macos-15-intel]
compiler: [clang, clang-20, clang-21, gcc-14, gcc-15]
config: [Release, Debug]
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-tests-macos.yml@89734354f64f30a80dd16602d4e271df34348987 # v1.17.4
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-tests-macos.yml@654680ab77b3af8226a9f5cd9acfd157bd106f17 # v1.17.5
with:
runs-on: ${{ matrix.runs-on }}
compiler: ${{ matrix.compiler }}
Expand All @@ -128,7 +128,7 @@ jobs:
runs-on: [windows-2022, windows-2025, windows-11-arm]
compiler: [msvc, clang]
config: [Release, Debug]
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-tests-windows.yml@89734354f64f30a80dd16602d4e271df34348987 # v1.17.4
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-tests-windows.yml@654680ab77b3af8226a9f5cd9acfd157bd106f17 # v1.17.5
with:
runs-on: ${{ matrix.runs-on }}
compiler: ${{ matrix.compiler }}
Expand All @@ -139,7 +139,7 @@ jobs:
name: 🇨‌ Coverage
needs: change-detection
if: fromJSON(needs.change-detection.outputs.run-cpp-tests)
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-coverage.yml@89734354f64f30a80dd16602d4e271df34348987 # v1.17.4
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-coverage.yml@654680ab77b3af8226a9f5cd9acfd157bd106f17 # v1.17.5
with:
setup-z3: true
permissions:
Expand All @@ -151,7 +151,7 @@ jobs:
name: 🇨‌ Lint
needs: change-detection
if: fromJSON(needs.change-detection.outputs.run-cpp-linter)
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-linter.yml@89734354f64f30a80dd16602d4e271df34348987 # v1.17.4
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-linter.yml@654680ab77b3af8226a9f5cd9acfd157bd106f17 # v1.17.5
with:
clang-version: 20
cmake-args: -DBUILD_MQT_QMAP_BINDINGS=ON
Expand All @@ -176,7 +176,7 @@ jobs:
macos-14,
windows-2022,
]
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-tests.yml@89734354f64f30a80dd16602d4e271df34348987 # v1.17.4
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-tests.yml@654680ab77b3af8226a9f5cd9acfd157bd106f17 # v1.17.5
with:
runs-on: ${{ matrix.runs-on }}
setup-z3: true
Expand All @@ -185,7 +185,7 @@ jobs:
name: 🐍 Coverage
needs: [change-detection, python-tests]
if: fromJSON(needs.change-detection.outputs.run-python-tests)
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-coverage.yml@89734354f64f30a80dd16602d4e271df34348987 # v1.17.4
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-coverage.yml@654680ab77b3af8226a9f5cd9acfd157bd106f17 # v1.17.5
permissions:
contents: read
id-token: write
Expand All @@ -199,7 +199,7 @@ jobs:
fail-fast: false
matrix:
runs-on: [macos-15, windows-2025]
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-tests.yml@89734354f64f30a80dd16602d4e271df34348987 # v1.17.4
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-tests.yml@654680ab77b3af8226a9f5cd9acfd157bd106f17 # v1.17.5
with:
runs-on: ${{ matrix.runs-on }}
setup-z3: true
Expand All @@ -208,15 +208,15 @@ jobs:
name: 🐍 Lint
needs: change-detection
if: fromJSON(needs.change-detection.outputs.run-python-tests)
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-linter.yml@89734354f64f30a80dd16602d4e271df34348987 # v1.17.4
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-linter.yml@654680ab77b3af8226a9f5cd9acfd157bd106f17 # v1.17.5
with:
setup-z3: true

build-sdist:
name: 🚀 CD
needs: change-detection
if: fromJSON(needs.change-detection.outputs.run-cd)
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-packaging-sdist.yml@89734354f64f30a80dd16602d4e271df34348987 # v1.17.4
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-packaging-sdist.yml@654680ab77b3af8226a9f5cd9acfd157bd106f17 # v1.17.5

build-wheel:
name: 🚀 CD
Expand All @@ -234,7 +234,7 @@ jobs:
windows-2022,
windows-11-arm,
]
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-packaging-wheel-cibuildwheel.yml@89734354f64f30a80dd16602d4e271df34348987 # v1.17.4
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-packaging-wheel-cibuildwheel.yml@654680ab77b3af8226a9f5cd9acfd157bd106f17 # v1.17.5
with:
runs-on: ${{ matrix.runs-on }}
setup-z3: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-mqt-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ concurrency:
jobs:
update-mqt-core:
name: ⬆️ Update MQT Core
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-mqt-core-update.yml@89734354f64f30a80dd16602d4e271df34348987 # v1.17.4
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-mqt-core-update.yml@654680ab77b3af8226a9f5cd9acfd157bd106f17 # v1.17.5
with:
update-to-head: ${{ github.event.inputs.update-to-head == 'true' }}
secrets:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/upstream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
fail-fast: false
matrix:
runs-on: [ubuntu-24.04, macos-14, windows-2022]
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-qiskit-upstream-tests.yml@89734354f64f30a80dd16602d4e271df34348987 # v1.17.4
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-qiskit-upstream-tests.yml@654680ab77b3af8226a9f5cd9acfd157bd106f17 # v1.17.5
with:
runs-on: ${{ matrix.runs-on }}
setup-z3: true
Expand All @@ -28,7 +28,7 @@ jobs:
name: Create issue on failure
needs: qiskit-upstream-tests
if: ${{ always() }}
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-qiskit-upstream-issue.yml@89734354f64f30a80dd16602d4e271df34348987 # v1.17.4
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-qiskit-upstream-issue.yml@654680ab77b3af8226a9f5cd9acfd157bd106f17 # v1.17.5
with:
tests-result: ${{ needs.qiskit-upstream-tests.result }}
permissions:
Expand Down
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,13 @@ repos:

# Ensure uv lock file is up-to-date
- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.9.17
rev: 0.9.18
hooks:
- id: uv-lock

# Python linting using ruff
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.9
rev: v0.14.10
hooks:
- id: ruff-check
- id: ruff-format
Expand Down Expand Up @@ -107,7 +107,7 @@ repos:

# Clang-format the C++ part of the code base automatically
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v21.1.7
rev: v21.1.8
hooks:
- id: clang-format
types_or: [c++, c, cuda]
Expand Down
9 changes: 6 additions & 3 deletions eval/clifford_state_prep/clifford_state_prep_eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,8 @@ def reset_inconsistent_results() -> None:
logger.info("Resetting inconsistent synthesis results and their timeouts...")
with Session(engine) as session:
cliff_results = (
session.query(SynthesisResult)
session
.query(SynthesisResult)
.filter(
SynthesisResult.qmap_cliff_iter_gate_count.isnot(None),
SynthesisResult.qmap_cliff_maxsat_gate_count.isnot(None),
Expand All @@ -480,7 +481,8 @@ def reset_inconsistent_results() -> None:
)

circ_results = (
session.query(SynthesisResult)
session
.query(SynthesisResult)
.filter(
SynthesisResult.qmap_circ_iter_gate_count.isnot(None),
SynthesisResult.qmap_circ_maxsat_gate_count.isnot(None),
Expand Down Expand Up @@ -606,7 +608,8 @@ def prune_excess_benchmarks() -> None:
for q in [1, 2, 3, 4, 5, 6]:
allowed = _allowed_num_gates(q)
deleted = (
session.query(SynthesisResult)
session
.query(SynthesisResult)
.filter(
SynthesisResult.num_qubits == q,
~SynthesisResult.num_gates.in_(list(allowed)),
Expand Down
6 changes: 4 additions & 2 deletions eval/clifford_state_prep/visualize_clifford_synthesis.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ def _read_results() -> pd.DataFrame:
def _long_format(df: pd.DataFrame) -> tuple[pd.DataFrame, pd.DataFrame]:
# Melt runtimes
rt_long = (
df.melt(
df
.melt(
id_vars=["num_qubits", "num_gates", "instance"],
value_vars=list(RUNTIME_COLS.keys()),
var_name="metric",
Expand All @@ -132,7 +133,8 @@ def _long_format(df: pd.DataFrame) -> tuple[pd.DataFrame, pd.DataFrame]:

# Melt gate counts
gc_long = (
df.melt(
df
.melt(
id_vars=["num_qubits", "num_gates", "instance"],
value_vars=list(GATE_COLS.keys()),
var_name="metric",
Expand Down
19 changes: 9 additions & 10 deletions eval/na/zoned/eval_ids_relaxed_routing.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,9 @@ def process_benchmark(

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

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

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

def print_data(self) -> None:
"""Print the data of the CSV file."""
Expand Down
Loading