Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
a996f85
📌 bump catalyst version
flowerthrower Jan 13, 2026
a23b9a3
📌 update llvm commit hash
flowerthrower Jan 13, 2026
63f05f9
⬆️ bump python version
flowerthrower Jan 13, 2026
4284efd
⏪ revert python 11 drop
flowerthrower Jan 13, 2026
d3746ea
✅ update tests
flowerthrower Jan 20, 2026
ea8787c
Merge branch 'main' into new-catalyst-version
flowerthrower Jan 20, 2026
78c11b8
🐛 correct return type in memref cast operation
flowerthrower Jan 20, 2026
2000187
⬇️ use python 3.13
flowerthrower Jan 20, 2026
e1fd8ca
🎨 imporve mref handeling
flowerthrower Jan 21, 2026
0df1afc
✅ imporve tests
flowerthrower Jan 21, 2026
95773e9
🎨 update readme
flowerthrower Jan 21, 2026
82f0a60
🎨 pre-commit fixes
pre-commit-ci[bot] Jan 21, 2026
d3ec979
🎨 improve type conversion
flowerthrower Jan 23, 2026
6f2e760
🎨 remove windows from readme
flowerthrower Jan 23, 2026
fa19318
🎨 calm down linter
flowerthrower Jan 23, 2026
af82cbd
📝 update README
flowerthrower Jan 23, 2026
13c67df
✏️ fix link
flowerthrower Jan 23, 2026
5bc449d
🎨 guard against type conversion order
flowerthrower Jan 23, 2026
989ea9a
Update README.md
flowerthrower Jan 26, 2026
c878904
🎨 improve cmake config
flowerthrower Jan 26, 2026
69ff0bb
🎨 remove llvm_dir from readme
flowerthrower Jan 26, 2026
671af8c
🎨 remove redundant code
flowerthrower Jan 26, 2026
4fd820a
🎨 remove unnecessary directory link
flowerthrower Jan 26, 2026
7ab193d
Merge branch 'main' into new-catalyst-version
flowerthrower Jan 26, 2026
27f9418
🎨 add rtti flag
flowerthrower Jan 26, 2026
e342dd1
🎨 move rtti after findpackage
flowerthrower Jan 26, 2026
37e32b1
🎨 fix lit preparation
flowerthrower Jan 26, 2026
58b6a67
🎨 fix c lint
flowerthrower Jan 26, 2026
e07db73
🚧 fix lint ci
flowerthrower Jan 26, 2026
c526d80
🎨 prefere python venv
flowerthrower Jan 26, 2026
2a2e4f3
🎨 fix cmake pyhton find venv
flowerthrower Jan 26, 2026
2cdd6b0
✨ reenable Python 3.14 support
burgholzer Jan 26, 2026
d58cdf8
🔒 update lockfile
burgholzer Jan 26, 2026
9469999
⬆️ run prek autoupdate
burgholzer Jan 26, 2026
db727ac
⬆️ upgrade `ty` to `0.0.13`
burgholzer Jan 26, 2026
23a9644
🩹 also enable 3.14 for cibuildwheel
burgholzer Jan 26, 2026
c835da2
🎨 simplify MLIR installation commands
burgholzer Jan 26, 2026
4cd5ddf
🔧 skip freethreading Python variant
burgholzer Jan 26, 2026
aa085a9
⏪ revert to Python 3.13 for docs build
burgholzer Jan 26, 2026
9e5f0c7
🎨 update readme
flowerthrower Jan 26, 2026
3a67696
🔥 remove Windows leftover
burgholzer Jan 26, 2026
c282a44
📝 prepare changelog for `1.0.0` release
burgholzer Jan 26, 2026
dc6bdbb
🔧 bump to beta
burgholzer Jan 26, 2026
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
2 changes: 1 addition & 1 deletion .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
with:
runs-on: ${{ matrix.runs-on }}
setup-mlir: true
llvm-version: "f8cb7987c64dcffb72414a40560055cb717dbf74"
llvm-version: "113f01aa82d055410f22a9d03b3468fa68600589"

# Downloads the previously generated artifacts and deploys to PyPI on published releases.
deploy:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
with:
runs-on: ${{ matrix.runs-on }}
setup-mlir: true
llvm-version: "f8cb7987c64dcffb72414a40560055cb717dbf74"
llvm-version: "113f01aa82d055410f22a9d03b3468fa68600589"

python-coverage:
name: 🐍 Coverage
Expand All @@ -51,7 +51,7 @@ jobs:
enable-ty: true
enable-mypy: false
setup-mlir: true
llvm-version: "f8cb7987c64dcffb72414a40560055cb717dbf74"
llvm-version: "113f01aa82d055410f22a9d03b3468fa68600589"

build-sdist:
name: 🚀 CD (sdist)
Expand All @@ -71,7 +71,7 @@ jobs:
with:
runs-on: ${{ matrix.runs-on }}
setup-mlir: true
llvm-version: "f8cb7987c64dcffb72414a40560055cb717dbf74"
llvm-version: "113f01aa82d055410f22a9d03b3468fa68600589"

cpp-linter:
name: 🇨‌ Lint
Expand All @@ -83,10 +83,10 @@ jobs:
build-project: true
files-changed-only: true
setup-python: true
install-pkgs: "pennylane-catalyst==0.13.0"
install-pkgs: "pennylane-catalyst==0.14.0"
cpp-linter-extra-args: "-std=c++20"
setup-mlir: true
llvm-version: "f8cb7987c64dcffb72414a40560055cb717dbf74"
llvm-version: "113f01aa82d055410f22a9d03b3468fa68600589"
permissions:
contents: read
pull-requests: write
Expand Down
94 changes: 0 additions & 94 deletions .github/workflows/reusable-mlir-tests.yml

This file was deleted.

116 changes: 116 additions & 0 deletions .github/workflows/reusable-python-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
# Copyright (c) 2023 - 2025 Chair for Design Automation, TUM
# Copyright (c) 2025 Munich Quantum Software Company GmbH
# All rights reserved.
#
# SPDX-License-Identifier: MIT
#
# Licensed under the MIT License

name: 🐍 • Tests
on:
workflow_call:
inputs:
runs-on:
description: "The platform to run the tests on"
required: true
type: string
setup-z3:
description: "Whether to set up Z3"
default: false
type: boolean
z3-version:
description: "The version of Z3 to set up"
default: "4.13.4"
type: string
setup-mlir:
description: "Whether to set up MLIR"
default: false
type: boolean
llvm-version:
description: "The LLVM version to set up (formatted as 'major.minor.patch') or commit hash (minimum 7 characters, e.g., 'a832a52')"
default: "21.1.8"
type: string

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}-python-tests-${{ inputs.runs-on }}
cancel-in-progress: true

permissions:
contents: read

jobs:
python-tests:
name: 🐍 ${{ inputs.runs-on }}
runs-on: ${{ inputs.runs-on }}
env:
FORCE_COLOR: 3
GITHUB_TOKEN: ${{ github.token }}
steps:
# free up space on the runners
# the nox environments can get quite large, especially if torch is installed
- name: Free up space (Linux)
if: runner.os == 'Linux'
run: |
sudo rm -rf /opt/ghc || true
sudo rm -rf /usr/local/lib/android/sdk || true
sudo rm -rf /usr/share/dotnet || true
sudo rm -rf /usr/share/swift || true
- name: Free up space (macOS)
if: runner.os == 'macOS'
run: |
sudo rm -rf /usr/local/share/android-sdk || true
sudo rm -rf /usr/local/share/dotnet || true
sudo rm -rf /usr/share/swift || true

- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
submodules: recursive
fetch-depth: 0
persist-credentials: false

- name: Set up Z3
if: ${{ inputs.setup-z3 }}
uses: cda-tum/setup-z3@8156b32632230f11cf9c5a50becb33d73e2fb4e5 # v1.7.1
with:
version: ${{ inputs.z3-version }}

- name: Set up MLIR
if: ${{ inputs.setup-mlir }}
uses: munich-quantum-software/setup-mlir@97da765dfa9dc8e055611ca934fe51bcade8140c # v1.1.0
with:
llvm-version: ${{ inputs.llvm-version }}

- name: Set up mold as linker (Linux only)
uses: rui314/setup-mold@725a8794d15fc7563f59595bd9556495c0564878 # v1

- name: Install the latest version of uv
uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v7.2.0
with:
enable-cache: true
save-cache: ${{ github.ref == 'refs/heads/main' }}

# set up sccache for faster builds
- name: Install sccache
run: uv tool install sccache

# run the nox minimums session (assumes a nox session named "minimums" exists) with coverage
- name: 🐍 Test with minimal versions
env:
RUNS_ON: ${{ inputs.runs-on }}
run: uvx nox -s minimums --verbose -- --cov --cov-report=xml:coverage-$RUNS_ON.xml --cov-append

# run the nox tests session (assumes a nox session named "tests" exists) with coverage
- name: 🐍 Test
env:
RUNS_ON: ${{ inputs.runs-on }}
run: uvx nox -s tests --verbose -- --cov --cov-report=xml:coverage-$RUNS_ON.xml --cov-append
Comment thread
coderabbitai[bot] marked this conversation as resolved.

# upload the report as an artifact to GitHub so that it can later be uploaded to Codecov
- name: Upload 🐍 coverage report for ${{ inputs.runs-on }}
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: coverage-${{ inputs.runs-on }}
path: coverage-*

- name: Show sccache stats
run: sccache --show-stats
13 changes: 5 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,10 @@ ci:
autofix_commit_msg: "🎨 pre-commit fixes"
skip: [ty-check]

default_language_version:
python: "3.13"

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

Expand Down Expand Up @@ -70,7 +67,7 @@ repos:

# Python linting using ruff
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.11
rev: v0.14.14
hooks:
- id: ruff-check
- id: ruff-format
Expand Down Expand Up @@ -117,14 +114,14 @@ repos:

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

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

Expand Down Expand Up @@ -154,7 +151,7 @@ repos:

# Check the pyproject.toml file
- repo: https://github.com/henryiii/validate-pyproject-schema-store
rev: 2026.01.10
rev: 2026.01.22
hooks:
- id: validate-pyproject

Expand Down
2 changes: 1 addition & 1 deletion .python_version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.13
3.14
3 changes: 1 addition & 2 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ build:
- asdf plugin add uv
- asdf install uv latest
- asdf global uv latest
- mkdir -p $HOME/mlir
- curl -LsSf https://github.com/munich-quantum-software/setup-mlir/releases/latest/download/setup-mlir.sh | bash -s -- -v f8cb7987c64dcffb72414a40560055cb717dbf74 -p $HOME/mlir
- curl -LsSf https://github.com/munich-quantum-software/setup-mlir/releases/latest/download/setup-mlir.sh | bash -s -- -v 113f01aa82d055410f22a9d03b3468fa68600589 -p $HOME/mlir
build:
html:
- MLIR_DIR=$HOME/mlir/lib/cmake/mlir uv run --frozen --no-dev --group docs -m sphinx -T -b html -d docs/_build/doctrees -D language=en docs $READTHEDOCS_OUTPUT/html
Expand Down
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ This project adheres to [Semantic Versioning], with the exception that minor rel

## [Unreleased]

## [1.0.0]

### Added

- 🐍 Introduce Python package providing Catalyst plugin utilities and device configuration ([#20]) ([**@flowerthrower**])
Expand All @@ -32,7 +34,8 @@ _📚 Refer to the [original MQT Core PR] for initial discussions and decisions

<!-- Version links -->

[unreleased]: https://github.com/munich-quantum-toolkit/core-plugins-catalyst/compare/052a747...HEAD
[unreleased]: https://github.com/munich-quantum-toolkit/core-plugins-catalyst/compare/v1.0.0...HEAD
[1.0.0]: https://github.com/munich-quantum-toolkit/core-plugins-catalyst/compare/052a747...v1.0.0

<!-- PR links -->

Expand Down
20 changes: 19 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

# prefer venv Python
set(Python_FIND_VIRTUALENV
FIRST
CACHE STRING "Give precedence to virtualenvs when searching for Python")
# top-level call to find Python
find_package(Python 3.11 COMPONENTS Interpreter Development.Module ${SKBUILD_SABI_COMPONENT})

Expand All @@ -29,9 +33,23 @@ set(MQT_MLIR_PLUGIN_BUILD_INCLUDE_DIR "${CMAKE_CURRENT_BINARY_DIR}/include")
# MLIR must be installed on the system
find_package(MLIR REQUIRED CONFIG)

# LLVM specific setup required for the plugin to work properly
# Add the paths to the MLIR and LLVM CMake modules.
list(APPEND CMAKE_MODULE_PATH "${MLIR_CMAKE_DIR}")
list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_DIR}")

set(LLVM_ENABLE_RTTI ON)
set(LLVM_ENABLE_EH ON)

# Include the TableGen, LLVM and MLIR CMake modules.
include(TableGen)
include(AddLLVM)
include(AddMLIR)
include(HandleLLVMOptions)

include_directories(${LLVM_INCLUDE_DIRS})
include_directories(${MLIR_INCLUDE_DIRS})

add_definitions(${LLVM_DEFINITIONS})

add_subdirectory(include)
add_subdirectory(lib)
Loading
Loading