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 @@ -24,9 +24,9 @@ jobs:
[
ubuntu-24.04,
ubuntu-24.04-arm,
macos-15,
macos-15-intel,
macos-14,
windows-2022,
windows-2025,
windows-11-arm,
]
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-packaging-wheel-cibuildwheel.yml@d6314c45667c131055a0389afc110e8dedc6da3f # v1.17.11
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ jobs:
strategy:
fail-fast: false
matrix:
runs-on: [macos-15-intel, macos-14]
runs-on: [macos-15, macos-15-intel]
compiler: [clang]
config: [Release]
include:
- runs-on: macos-14
- runs-on: macos-15
compiler: clang
config: Debug
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-tests-macos.yml@d6314c45667c131055a0389afc110e8dedc6da3f # v1.17.11
Expand All @@ -65,11 +65,11 @@ jobs:
strategy:
fail-fast: false
matrix:
runs-on: [windows-2022, windows-11-arm]
runs-on: [windows-2025, windows-11-arm]
compiler: [msvc]
config: [Release]
include:
- runs-on: windows-2022
- runs-on: windows-2025
compiler: msvc
config: Debug
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-tests-windows.yml@d6314c45667c131055a0389afc110e8dedc6da3f # v1.17.11
Expand Down Expand Up @@ -103,9 +103,9 @@ jobs:
[
ubuntu-24.04,
ubuntu-24.04-arm,
macos-15,
macos-15-intel,
macos-14,
windows-2022,
windows-2025,
]
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-tests.yml@d6314c45667c131055a0389afc110e8dedc6da3f # v1.17.11
with:
Expand Down Expand Up @@ -147,9 +147,9 @@ jobs:
[
ubuntu-24.04,
ubuntu-24.04-arm,
macos-15,
macos-15-intel,
macos-14,
windows-2022,
windows-2025,
windows-11-arm,
]
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-packaging-wheel-cibuildwheel.yml@d6314c45667c131055a0389afc110e8dedc6da3f # v1.17.11
Expand All @@ -171,7 +171,7 @@ jobs:
- python-linter
- build-sdist
- build-wheel
runs-on: ubuntu-latest
runs-on: ubuntu-slim
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # v1.2.2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
runs-on: ubuntu-slim
steps:
- uses: release-drafter/release-drafter@6db134d15f3909ccc9eefd369f02bd1e9cffdf97 # v6.2.0
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/templating.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
jobs:
render-template:
name: Render template
runs-on: ubuntu-latest
runs-on: ubuntu-slim
permissions:
contents: write
pull-requests: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/upstream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
strategy:
fail-fast: false
matrix:
runs-on: [ubuntu-24.04, macos-14, windows-2022]
runs-on: [ubuntu-24.04, macos-15, windows-2025]
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-qiskit-upstream-tests.yml@d6314c45667c131055a0389afc110e8dedc6da3f # v1.17.11
with:
runs-on: ${{ matrix.runs-on }}
Expand Down
213 changes: 102 additions & 111 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# To run all pre-commit checks, use:
#
# pre-commit run -a
# uvx prek run -a
#
# To install pre-commit hooks that run every time you commit:
#
# pre-commit install
# uv tool install prek
# prek install
#

ci:
Expand All @@ -14,160 +15,150 @@ ci:
skip: [ty-check]

repos:
# Standard hooks
# Priority 0: Fast validation and independent fixers

## Standard hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-added-large-files
args: ["--maxkb=2048"]
- id: check-case-conflict
- id: check-vcs-permalinks
- id: check-merge-conflict
- id: check-symlinks
- id: check-json
- id: check-toml
- id: check-yaml
- id: debug-statements
priority: 0
- id: end-of-file-fixer
- id: mixed-line-ending
priority: 1
- id: trailing-whitespace
priority: 1

# Clean jupyter notebooks
- repo: https://github.com/srstevenson/nb-clean
rev: 4.0.1
hooks:
- id: nb-clean
args:
- --remove-empty-cells
- --preserve-cell-metadata
- raw_mimetype
- --

# Handling unwanted unicode characters
- repo: https://github.com/sirosen/texthooks
rev: 0.7.1
hooks:
- id: fix-ligatures
- id: fix-smartquotes

# Check for common mistakes
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0
## Check the pyproject.toml file
- repo: https://github.com/henryiii/validate-pyproject-schema-store
rev: 2026.01.22
hooks:
- id: rst-backticks
- id: rst-directive-colons
- id: rst-inline-touching-normal
- id: validate-pyproject
priority: 0

# Ensure uv lock file is up-to-date
- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.9.28
## Check JSON schemata
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.36.1
hooks:
- id: uv-lock
- id: check-github-workflows
priority: 0
- id: check-readthedocs
priority: 0

# Python linting using ruff
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.14
## Catch common capitalization mistakes
- repo: local
hooks:
- id: ruff-check
- id: ruff-format
- id: disallow-caps
name: Disallow improper capitalization
language: pygrep
entry: Nanobind|Numpy|Cmake|CCache|Github|PyTest|Mqt|Tum|MQTopt|MQTref
exclude: .pre-commit-config.yaml
priority: 0

## Static type checking using ty
- repo: local
## Check for spelling
- repo: https://github.com/adhtruong/mirrors-typos
rev: v1.42.3
hooks:
- id: ty-check
name: ty check
entry: uvx python -c "import subprocess; import sys; r = subprocess.run(['uv', 'sync', '--no-install-project', '--inexact']); sys.exit(r.returncode or subprocess.run(['uv', 'run', '--no-sync', 'ty', 'check']).returncode)"
language: unsupported
require_serial: true
types_or: [python, pyi, jupyter]
exclude: ^(docs/)
- id: typos
priority: 0

# Also run Black on examples in the documentation
- repo: https://github.com/adamchainz/blacken-docs
rev: 1.20.0
## Check best practices for scientific Python code
- repo: https://github.com/scientific-python/cookie
rev: 2025.11.21
hooks:
- id: blacken-docs
additional_dependencies: [black==25.*]
- id: sp-repo-review
additional_dependencies: ["repo-review[cli]"]
priority: 0

# Check for license headers
## Check for license headers
- repo: https://github.com/emzeat/mz-lictools
rev: v2.9.0
hooks:
- id: license-tools
priority: 0

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

## Tidy up BibTeX files
- repo: https://github.com/FlamingTempura/bibtex-tidy
rev: v1.14.0
hooks:
- id: bibtex-tidy
args:
[
"--align=20",
"--curly",
"--months",
"--blank-lines",
"--sort",
"--strip-enclosing-braces",
"--sort-fields",
"--trailing-commas",
"--remove-empty-fields",
]
priority: 0

# Clang-format the C++ part of the code base automatically
# Priority 1: Second-pass fixers

## Clang-format the C++ part of the code base automatically
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v21.1.8
hooks:
- id: clang-format
types_or: [c++, c, cuda]
priority: 1

# CMake format and lint the CMakeLists.txt files
## CMake format and lint the CMakeLists.txt files
- repo: https://github.com/cheshirekow/cmake-format-precommit
rev: v0.6.13
hooks:
- id: cmake-format
additional_dependencies: [pyyaml]
types: [file]
files: (\.cmake|CMakeLists.txt)(.in)?$
priority: 1

# Format configuration files with prettier
## Format configuration files with prettier
- repo: https://github.com/rbubley/mirrors-prettier
rev: v3.8.1
hooks:
- id: prettier
types_or: [yaml, markdown, html, css, scss, javascript, json]
priority: 1

# Check for spelling
- repo: https://github.com/adhtruong/mirrors-typos
rev: v1.42.3
hooks:
- id: typos

# Catch common capitalization mistakes
- repo: local
hooks:
- id: disallow-caps
name: Disallow improper capitalization
language: pygrep
entry: PyBind|Numpy|Cmake|CCache|Github|PyTest|Mqt|Tum|MQTopt|MQTref
exclude: .pre-commit-config.yaml

# Check best practices for scientific Python code
- repo: https://github.com/scientific-python/cookie
rev: 2025.11.21
## Python linting using ruff
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.14
hooks:
- id: sp-repo-review
additional_dependencies: ["repo-review[cli]"]
- id: ruff-format
priority: 1
- id: ruff-check
require_serial: true
priority: 2

# Check JSON schemata
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.36.1
hooks:
- id: check-dependabot
- id: check-github-workflows
- id: check-readthedocs
# Priority 2+: Final checks and fixers

# Check the pyproject.toml file
- repo: https://github.com/henryiii/validate-pyproject-schema-store
rev: 2026.01.22
## Also run Black on examples in the documentation (needs to run after ruff format)
- repo: https://github.com/adamchainz/blacken-docs
rev: 1.20.0
hooks:
- id: validate-pyproject
- id: blacken-docs
language: python
additional_dependencies: [black==26.*]
priority: 2

# Tidy up BibTeX files
- repo: https://github.com/FlamingTempura/bibtex-tidy
rev: v1.14.0
## Static type checking using ty (needs to run after lockfile update/ruff format, and ruff lint)
- repo: local
hooks:
- id: bibtex-tidy
args:
[
"--align=20",
"--curly",
"--months",
"--blank-lines",
"--sort",
"--strip-enclosing-braces",
"--sort-fields",
"--trailing-commas",
"--remove-empty-fields",
]
- id: ty-check
name: ty check
entry: uvx python -c "import subprocess; import sys; r = subprocess.run(['uv', 'sync', '--no-install-project', '--inexact']); sys.exit(r.returncode or subprocess.run(['uv', 'run', '--no-sync', 'ty', 'check']).returncode)"
language: unsupported
require_serial: true
types_or: [python, pyi, jupyter]
exclude: ^(docs/)
priority: 3
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

[build-system]
requires = [
"nanobind>=2.10.2",
"nanobind~=2.10.2",
"setuptools-scm>=9.2.2",
"scikit-build-core>=0.11.6",
]
Expand Down Expand Up @@ -255,6 +255,7 @@ ignore = [
"MY100", # We use ty instead of mypy
"PC140", # We use ty instead of mypy
"PC160", # We use a mirror of crate-ci/typos
"PC170", # We do not use rST files anymore
]


Expand Down Expand Up @@ -309,7 +310,7 @@ repair-wheel-command = "uvx abi3audit --strict --report {wheel}"

[dependency-groups]
build = [
"nanobind>=2.10.2",
"nanobind~=2.10.2",
"setuptools-scm>=9.2.2",
"scikit-build-core>=0.11.6",
]
Expand Down
Loading
Loading