Skip to content

✨ Add -absorb-swaps pass#1661

Closed
jmoosburger wants to merge 29 commits intomunich-quantum-toolkit:mainfrom
jmoosburger:enh/swap-absorb
Closed

✨ Add -absorb-swaps pass#1661
jmoosburger wants to merge 29 commits intomunich-quantum-toolkit:mainfrom
jmoosburger:enh/swap-absorb

Conversation

@jmoosburger
Copy link
Copy Markdown

Description

  • add new qco pass as warmup task (in cooperation with @MatthiasReumann)
  • remove leading swap-gates in a circuit
  • reorder static qubits instead

Checklist

  • The pull request only contains commits that are focused and relevant to this change.
  • I have added appropriate tests that cover the new/changed functionality.
  • I have updated the documentation to reflect these changes.
  • I have added entries to the changelog for any noteworthy additions, changes, fixes, or removals.
  • I have added migration instructions to the upgrade guide (if needed).
  • The changes follow the project's style guidelines and introduce no new warnings.
  • The changes are fully tested and pass the CI checks.
  • I have reviewed my own code changes.

If PR contains AI-assisted content:

  • I have disclosed the use of AI tools in the PR description as per our AI Usage Guidelines.
  • AI-assisted commits include an Assisted-by: [Model Name] via [Tool Name] footer.
  • I confirm that I have personally reviewed and understood all AI-generated content, and accept full responsibility for it.

@jmoosburger jmoosburger changed the title fix build for test_drivers.cpp new pass SwapAbsorb Apr 23, 2026
@jmoosburger jmoosburger changed the base branch from enh/swap-absorb to main April 23, 2026 06:33
@jmoosburger jmoosburger changed the base branch from main to enh/swap-absorb April 23, 2026 06:34
@jmoosburger jmoosburger changed the base branch from enh/swap-absorb to main April 23, 2026 06:34
@mergify mergify Bot added the conflict label Apr 23, 2026
@jmoosburger
Copy link
Copy Markdown
Author

@MatthiasReumann

The fork works just fine ;-)

i think we broke some unit tests (92 to be accurate), i check this out currently

is there any chance for you to write one unittest as example that addresses a piece of swapAbsorb-functionality. that would help me a lot understanding the projects test-mechanisms.

@MatthiasReumann
Copy link
Copy Markdown
Collaborator

@MatthiasReumann

The fork works just fine ;-)

i think we broke some unit tests (92 to be accurate), i check this out currently

is there any chance for you to write one unittest as example that addresses a piece of swapAbsorb-functionality. that would help me a lot understanding the projects test-mechanisms.

Hello @jmoosburger 👋🏻

Simply revert the CompilationPipeline.cpp file. Removing the added pm.addPass should fix the tests. Could you verify that?

@MatthiasReumann MatthiasReumann added c++ Anything related to C++ code MLIR Anything related to MLIR labels Apr 23, 2026
@jmoosburger
Copy link
Copy Markdown
Author

@MatthiasReumann

copy that, i do verify!
where else do we register the pass then, as it would never be executed without the pm.addPass(), right?

@MatthiasReumann
Copy link
Copy Markdown
Collaborator

@MatthiasReumann

copy that, i do verify! where else do we register the pass then, as it would never be executed without the pm.addPass(), right?

Great! 🚀

For now, I think unit testing the pass functionality would suffice. For that take a look at the test_mapping.cpp and the respective CMakeLists.txts to implement unit tests in a test_swap_absorption.cpp file.

jmoosburger and others added 13 commits April 25, 2026 13:41
This PR contains the following updates:

| Package | Type | Update | Change | Pending |
|---|---|---|---|---|
|
[astral-sh/ruff-pre-commit](https://redirect.github.com/astral-sh/ruff-pre-commit)
| repository | patch | `v0.15.9` → `v0.15.10` | `v0.15.11` |
|
[astral-sh/uv-pre-commit](https://redirect.github.com/astral-sh/uv-pre-commit)
| repository | patch | `0.11.3` → `0.11.6` | `0.11.7` |
|
[henryiii/validate-pyproject-schema-store](https://redirect.github.com/henryiii/validate-pyproject-schema-store)
| repository | patch | `2026.04.03` → `2026.04.10` | `2026.04.17` (+2) |
|
[pre-commit/mirrors-clang-format](https://redirect.github.com/pre-commit/mirrors-clang-format)
| repository | patch | `v22.1.2` → `v22.1.3` | |
|
[rbubley/mirrors-prettier](https://redirect.github.com/rbubley/mirrors-prettier)
| repository | patch | `v3.8.1` → `v3.8.2` | `v3.8.3` |

Note: The `pre-commit` manager in Renovate is not supported by the
`pre-commit` maintainers or community. Please do not report any problems
there, instead [create a Discussion in the Renovate
repository](https://redirect.github.com/renovatebot/renovate/discussions/new)
if you have any questions.

---

### Release Notes

<details>
<summary>astral-sh/ruff-pre-commit (astral-sh/ruff-pre-commit)</summary>

###
[`v0.15.10`](https://redirect.github.com/astral-sh/ruff-pre-commit/releases/tag/v0.15.10)

[Compare
Source](https://redirect.github.com/astral-sh/ruff-pre-commit/compare/v0.15.9...v0.15.10)

See: <https://github.com/astral-sh/ruff/releases/tag/0.15.10>

</details>

<details>
<summary>astral-sh/uv-pre-commit (astral-sh/uv-pre-commit)</summary>

###
[`v0.11.6`](https://redirect.github.com/astral-sh/uv-pre-commit/releases/tag/0.11.6)

[Compare
Source](https://redirect.github.com/astral-sh/uv-pre-commit/compare/0.11.5...0.11.6)

See: <https://github.com/astral-sh/uv/releases/tag/0.11.6>

###
[`v0.11.5`](https://redirect.github.com/astral-sh/uv-pre-commit/releases/tag/0.11.5)

[Compare
Source](https://redirect.github.com/astral-sh/uv-pre-commit/compare/0.11.4...0.11.5)

See: <https://github.com/astral-sh/uv/releases/tag/0.11.5>

###
[`v0.11.4`](https://redirect.github.com/astral-sh/uv-pre-commit/releases/tag/0.11.4)

[Compare
Source](https://redirect.github.com/astral-sh/uv-pre-commit/compare/0.11.3...0.11.4)

See: <https://github.com/astral-sh/uv/releases/tag/0.11.4>

</details>

<details>
<summary>henryiii/validate-pyproject-schema-store
(henryiii/validate-pyproject-schema-store)</summary>

###
[`v2026.04.10`](https://redirect.github.com/henryiii/validate-pyproject-schema-store/compare/2026.04.03...2026.04.10)

[Compare
Source](https://redirect.github.com/henryiii/validate-pyproject-schema-store/compare/2026.04.03...2026.04.10)

</details>

<details>
<summary>pre-commit/mirrors-clang-format
(pre-commit/mirrors-clang-format)</summary>

###
[`v22.1.3`](https://redirect.github.com/pre-commit/mirrors-clang-format/compare/v22.1.2...v22.1.3)

[Compare
Source](https://redirect.github.com/pre-commit/mirrors-clang-format/compare/v22.1.2...v22.1.3)

</details>

<details>
<summary>rbubley/mirrors-prettier (rbubley/mirrors-prettier)</summary>

###
[`v3.8.2`](https://redirect.github.com/rbubley/mirrors-prettier/compare/v3.8.1...v3.8.2)

[Compare
Source](https://redirect.github.com/rbubley/mirrors-prettier/compare/v3.8.1...v3.8.2)

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - "every weekend"
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config
help](https://redirect.github.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/munich-quantum-toolkit/core).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xMjMuOCIsInVwZGF0ZWRJblZlciI6IjQzLjEyMy44IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiLCJwcmUtY29tbWl0Il19-->

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This PR contains the following updates:

| Package | Type | Update | Change | Pending |
|---|---|---|---|---|
|
[actions/create-github-app-token](https://redirect.github.com/actions/create-github-app-token)
| action | minor | `v3.0.0` → `v3.1.0` | `v3.1.1` |
|
[pypa/gh-action-pypi-publish](https://redirect.github.com/pypa/gh-action-pypi-publish)
| action | minor | `v1.13.0` → `v1.14.0` | |
|
[release-drafter/release-drafter](https://redirect.github.com/release-drafter/release-drafter)
| action | minor | `v7.1.1` → `v7.2.0` | |

---

### Release Notes

<details>
<summary>actions/create-github-app-token
(actions/create-github-app-token)</summary>

###
[`v3.1.0`](https://redirect.github.com/actions/create-github-app-token/releases/tag/v3.1.0)

[Compare
Source](https://redirect.github.com/actions/create-github-app-token/compare/v3.0.0...v3.1.0)

##### Bug Fixes

- **deps:** bump p-retry from 7.1.1 to 8.0.0
([#&#8203;357](https://redirect.github.com/actions/create-github-app-token/issues/357))
([3bbe07d](https://redirect.github.com/actions/create-github-app-token/commit/3bbe07d928e2d6c30bf3e37c6b89edbc4045facf))

##### Features

- add `client-id` input and deprecate `app-id`
([#&#8203;353](https://redirect.github.com/actions/create-github-app-token/issues/353))
([e6bd4e6](https://redirect.github.com/actions/create-github-app-token/commit/e6bd4e6970172bed9fe138b2eaf4cbffa4cca8f9))
- update permission inputs
([#&#8203;358](https://redirect.github.com/actions/create-github-app-token/issues/358))
([076e948](https://redirect.github.com/actions/create-github-app-token/commit/076e9480ca6e9633bff412d05eff0fc2f1e7d2be))

</details>

<details>
<summary>pypa/gh-action-pypi-publish
(pypa/gh-action-pypi-publish)</summary>

###
[`v1.14.0`](https://redirect.github.com/pypa/gh-action-pypi-publish/releases/tag/v1.14.0)

[Compare
Source](https://redirect.github.com/pypa/gh-action-pypi-publish/compare/v1.13.0...v1.14.0)

<p align="right"><i>Audit your supply chain regularly!</i></p>

#### ✨ What's Changed

The main change in this release is that `verbose` and `print-hash`
inputs are now on by default. This was contributed by
[@&#8203;whitequark](https://redirect.github.com/whitequark)[💰](https://redirect.github.com/sponsors/whitequark)
in
[#&#8203;397](https://redirect.github.com/pypa/gh-action-pypi-publish/issues/397).

#### 📝 Docs


[@&#8203;woodruffw](https://redirect.github.com/woodruffw)[💰](https://redirect.github.com/sponsors/woodruffw)
updated the mentions of PEP 740 to stop implying that it might be
experimental (it hasn't been for quite a while!) in
[#&#8203;388](https://redirect.github.com/pypa/gh-action-pypi-publish/issues/388)
and
[@&#8203;him2him2](https://redirect.github.com/him2him2)[💰](https://redirect.github.com/sponsors/him2him2)
brushed up some grammar in the README and SECURITY docs via
[#&#8203;395](https://redirect.github.com/pypa/gh-action-pypi-publish/issues/395).

#### 🛠️ Internal Updates


[@&#8203;woodruffw](https://redirect.github.com/woodruffw)[💰](https://redirect.github.com/sponsors/woodruffw)
bumped `sigstore` and `pypi-attestations` in the lock file
([#&#8203;391](https://redirect.github.com/pypa/gh-action-pypi-publish/issues/391))
and [@&#8203;webknjaz](https://redirect.github.com/webknjaz)[💰][GH
Sponsors URL] added infra for using type annotations in the project
([#&#8203;381](https://redirect.github.com/pypa/gh-action-pypi-publish/issues/381)).

#### 💪 New Contributors

- [@&#8203;him2him2](https://redirect.github.com/him2him2) made their
first contribution in
[#&#8203;395](https://redirect.github.com/pypa/gh-action-pypi-publish/issues/395)
- [@&#8203;whitequark](https://redirect.github.com/whitequark) made
their first contribution in
[#&#8203;397](https://redirect.github.com/pypa/gh-action-pypi-publish/issues/397)

**🪞 Full Diff**:
<pypa/gh-action-pypi-publish@v1.13.0...v1.14.0>

**🧔‍♂️ Release Manager:**
[@&#8203;webknjaz](https://redirect.github.com/sponsors/webknjaz)
[🇺🇦](https://stand-with-ukraine.pp.ua)

**🙏 Special Thanks** to
[@&#8203;facutuesca](https://redirect.github.com/facutuesca)[💰](https://redirect.github.com/sponsors/facutuesca)
and
[@&#8203;woodruffw](https://redirect.github.com/woodruffw)[💰](https://redirect.github.com/sponsors/woodruffw)
for helping maintain this project when [I][GH Sponsors URL] can't!

**💬 Discuss** [on Bluesky
🦋](https://bsky.app/profile/webknjaz.me/post/3mivwsz3qzk2e), [on
Mastodon 🐘](https://mastodon.social/@&#8203;webknjaz/116363779997051422)
and [on GitHub][release discussion].

[![GH Sponsors badge]][GH Sponsors URL]

[GH Sponsors badge]:
https://img.shields.io/badge/%40webknjaz-transparent?logo=githubsponsors&logoColor=%23EA4AAA&label=Sponsor&color=2a313c

[GH Sponsors URL]: https://redirect.github.com/sponsors/webknjaz

[release discussion]:
https://redirect.github.com/pypa/gh-action-pypi-publish/discussions/404

</details>

<details>
<summary>release-drafter/release-drafter
(release-drafter/release-drafter)</summary>

###
[`v7.2.0`](https://redirect.github.com/release-drafter/release-drafter/releases/tag/v7.2.0)

[Compare
Source](https://redirect.github.com/release-drafter/release-drafter/compare/v7.1.1...v7.2.0)

### What's Changed

#### New

- feat: allow always collapsing a category
([#&#8203;1444](https://redirect.github.com/release-drafter/release-drafter/issues/1444))
[@&#8203;mhanberg](https://redirect.github.com/mhanberg)

#### Bug Fixes

- fix: improve advanced substitutions in replacers
([#&#8203;1555](https://redirect.github.com/release-drafter/release-drafter/issues/1555))
[@&#8203;jetersen](https://redirect.github.com/jetersen)
- fix: support repo-only \_extends and prevent .github/ path doubling
([#&#8203;1577](https://redirect.github.com/release-drafter/release-drafter/issues/1577))
[@&#8203;jetersen](https://redirect.github.com/jetersen)

#### Maintenance

- chore(deps): update dependency typescript to 6.0.2
([#&#8203;1587](https://redirect.github.com/release-drafter/release-drafter/issues/1587))
@&#8203;[renovate\[bot\]](https://redirect.github.com/apps/renovate)
- chore(deps): update vitest to 4.1.4
([#&#8203;1585](https://redirect.github.com/release-drafter/release-drafter/issues/1585))
@&#8203;[renovate\[bot\]](https://redirect.github.com/apps/renovate)
- ci(deps): update peter-evans/create-pull-request action to v8
([#&#8203;1588](https://redirect.github.com/release-drafter/release-drafter/issues/1588))
@&#8203;[renovate\[bot\]](https://redirect.github.com/apps/renovate)
- chore(deps): update dependency vite to 8.0.5
([#&#8203;1579](https://redirect.github.com/release-drafter/release-drafter/issues/1579))
@&#8203;[renovate\[bot\]](https://redirect.github.com/apps/renovate)
- chore(deps): update dependency nock to 14.0.12
([#&#8203;1583](https://redirect.github.com/release-drafter/release-drafter/issues/1583))
@&#8203;[renovate\[bot\]](https://redirect.github.com/apps/renovate)
- chore(deps): update dependency
[@&#8203;types/node](https://redirect.github.com/types/node) to 24.12.2
([#&#8203;1582](https://redirect.github.com/release-drafter/release-drafter/issues/1582))
@&#8203;[renovate\[bot\]](https://redirect.github.com/apps/renovate)
- chore(deps): update dependency
[@&#8203;biomejs/biome](https://redirect.github.com/biomejs/biome) to
2.4.10
([#&#8203;1581](https://redirect.github.com/release-drafter/release-drafter/issues/1581))
@&#8203;[renovate\[bot\]](https://redirect.github.com/apps/renovate)
- chore: move codegen to monthly scheduled workflow
([#&#8203;1578](https://redirect.github.com/release-drafter/release-drafter/issues/1578))
[@&#8203;jetersen](https://redirect.github.com/jetersen)
- chore: replace vite-tsconfig-paths plugin with native
resolve.tsconfigPaths
([#&#8203;1571](https://redirect.github.com/release-drafter/release-drafter/issues/1571))
[@&#8203;jetersen](https://redirect.github.com/jetersen)

#### Documentation

- docs: fix autolabeler example tag
([#&#8203;1568](https://redirect.github.com/release-drafter/release-drafter/issues/1568))
[@&#8203;cchanche](https://redirect.github.com/cchanche)

#### Dependency Updates

- build(deps): bump lodash and
[@&#8203;graphql-codegen/plugin-helpers](https://redirect.github.com/graphql-codegen/plugin-helpers)
([#&#8203;1589](https://redirect.github.com/release-drafter/release-drafter/issues/1589))
@&#8203;[dependabot\[bot\]](https://redirect.github.com/apps/dependabot)
- fix(deps): update dependency
[@&#8203;actions/github](https://redirect.github.com/actions/github) to
9.1.0
([#&#8203;1586](https://redirect.github.com/release-drafter/release-drafter/issues/1586))
@&#8203;[renovate\[bot\]](https://redirect.github.com/apps/renovate)
- chore(deps): update dependency yaml to 2.8.3
([#&#8203;1580](https://redirect.github.com/release-drafter/release-drafter/issues/1580))
@&#8203;[renovate\[bot\]](https://redirect.github.com/apps/renovate)
- chore(deps): update node.js to v24.14.1
([#&#8203;1584](https://redirect.github.com/release-drafter/release-drafter/issues/1584))
@&#8203;[renovate\[bot\]](https://redirect.github.com/apps/renovate)
- chore(deps): update dependency
[@&#8203;biomejs/biome](https://redirect.github.com/biomejs/biome) to
2.4.10
([#&#8203;1581](https://redirect.github.com/release-drafter/release-drafter/issues/1581))
@&#8203;[renovate\[bot\]](https://redirect.github.com/apps/renovate)

**Full Changelog**:
<release-drafter/release-drafter@v7.1.1...v7.2.0>

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - "every weekend"
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config
help](https://redirect.github.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/munich-quantum-toolkit/core).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xMjMuOCIsInVwZGF0ZWRJblZlciI6IjQzLjEyMy44IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiLCJnaXRodWItYWN0aW9ucyJdfQ==-->

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…uantum-toolkit#1646)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[actions/create-github-app-token](https://redirect.github.com/actions/create-github-app-token)
| action | patch | `v3.1.0` → `v3.1.1` |

---

### Release Notes

<details>
<summary>actions/create-github-app-token
(actions/create-github-app-token)</summary>

###
[`v3.1.1`](https://redirect.github.com/actions/create-github-app-token/releases/tag/v3.1.1)

[Compare
Source](https://redirect.github.com/actions/create-github-app-token/compare/v3.1.0...v3.1.1)

##### Bug Fixes

- improve error message when app identifier is empty
([#&#8203;362](https://redirect.github.com/actions/create-github-app-token/issues/362))
([07e2b76](https://redirect.github.com/actions/create-github-app-token/commit/07e2b760664f080c40eec4eacf7477256582db36)),
closes
[#&#8203;249](https://redirect.github.com/actions/create-github-app-token/issues/249)

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - "every weekend"
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/munich-quantum-toolkit/core).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xMjMuOCIsInVwZGF0ZWRJblZlciI6IjQzLjEyMy44IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiLCJnaXRodWItYWN0aW9ucyJdfQ==-->

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…o v2026.04.11 (munich-quantum-toolkit#1647)

This PR contains the following updates:

| Package | Type | Update | Change | Pending |
|---|---|---|---|---|
|
[henryiii/validate-pyproject-schema-store](https://redirect.github.com/henryiii/validate-pyproject-schema-store)
| repository | patch | `2026.04.10` → `2026.04.11` | `2026.04.17` (+1) |

Note: The `pre-commit` manager in Renovate is not supported by the
`pre-commit` maintainers or community. Please do not report any problems
there, instead [create a Discussion in the Renovate
repository](https://redirect.github.com/renovatebot/renovate/discussions/new)
if you have any questions.

---

### Release Notes

<details>
<summary>henryiii/validate-pyproject-schema-store
(henryiii/validate-pyproject-schema-store)</summary>

###
[`v2026.04.11`](https://redirect.github.com/henryiii/validate-pyproject-schema-store/compare/2026.04.10...2026.04.11)

[Compare
Source](https://redirect.github.com/henryiii/validate-pyproject-schema-store/compare/2026.04.10...2026.04.11)

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - "every weekend"
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/munich-quantum-toolkit/core).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xMjMuOCIsInVwZGF0ZWRJblZlciI6IjQzLjEyMy44IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiLCJwcmUtY29tbWl0Il19-->

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This PR contains the following updates:

| Update | Change |
|---|---|
| lockFileMaintenance | All locks refreshed |

🔧 This Pull Request updates lock files to use the latest dependency
versions.

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - "before 4am on monday"
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config
help](https://redirect.github.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/munich-quantum-toolkit/core).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xMjMuOCIsInVwZGF0ZWRJblZlciI6IjQzLjEyMy44IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiLCJweXRob24iXX0=-->

---------

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Daniel Haag <121057143+denialhaag@users.noreply.github.com>
…m-toolkit#1380)

## Description

Add CRZ, MCX, MCZ, MCRZ functionality to ZX package.
Add convenience addCCZ function as it avoids one additional Hardamard
edge (optimizes it away).

Fixes munich-quantum-toolkit#1357

## Checklist:


- [X] The pull request only contains commits that are focused and
relevant to this change.
- [X] I have added appropriate tests that cover the new/changed
functionality.
- [X] ~~I have updated the documentation to reflect these changes.~~
- [x] I have added entries to the changelog for any noteworthy
additions, changes, fixes, or removals.
- [x] ~~I have added migration instructions to the upgrade guide (if
needed).~~
- [x] The changes follow the project's style guidelines and introduce no
new warnings.
- [x] The changes are fully tested and pass the CI checks.
- [X] I have reviewed my own code changes.

---------

Signed-off-by: Marcel Walter <marcelwalter.mw@gmail.com>
Signed-off-by: Keefe Huang <30915130+keefehuang@users.noreply.github.com>
Signed-off-by: Daniel Haag <121057143+denialhaag@users.noreply.github.com>
Signed-off-by: Lukas Burgholzer <burgholzer@me.com>
Co-authored-by: Keefe Huang <keefe.huang@tum.de>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Marcel Walter <marcel.walter@tum.de>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Lukas Burgholzer <burgholzer@me.com>
Co-authored-by: Keefe Huang <huangq@cit.tum.de>
Co-authored-by: Daniel Haag <121057143+denialhaag@users.noreply.github.com>
…#1407)

## Description


This PR extends the rotation merging pass in the QCO ~~MQTOpt~~ dialect
to support quaternion-based gate fusion.

The existing rotation merge pass only merges consecutive rotation gates
of the **same type** (e.g., `rx + rx` or `ry + ry`) by adding their
angles.
This PR introduces quaternion-based merging, which can merge rotation
gates of different types (currently only single qubit gates `rx`, `ry`,
`rz`, `r`, `p`, `u2`, `u`).

Quaternions are widely used to represent rotations in three-dimensional
space and naturally map to qubit gate rotations around the Bloch sphere.
The implementation:

1. Converts rotation gates to quaternion representation
2. Multiplies quaternions using the Hamilton product
3. Converts the resulting quaternion back to a `u` gate. (This could
also be done differently in the future, and directly decompose to the
correct base gates by using the decomposition from munich-quantum-toolkit#1182)

This optimization is enabled by default but can be **disabled** by
adding this flag to the compiler invocation:
```bash
mqt-cc --disable-merge-single-qubit-rotation-gates <input.mlir>
```

Closes munich-quantum-toolkit#1029

## Checklist:

<!---
This checklist serves as a reminder of a couple of things that ensure
your pull request will be merged swiftly.
-->

- [x] The pull request only contains commits that are focused and
relevant to this change.
- [x] I have added appropriate tests that cover the new/changed
functionality.
- [x] I have updated the documentation to reflect these changes.
- [x] I have added entries to the changelog for any noteworthy
additions, changes, fixes, or removals.
- [x] ~~I have added migration instructions to the upgrade guide (if
needed).~~
- [x] The changes follow the project's style guidelines and introduce no
new warnings.
- [x] The changes are fully tested and pass the CI checks.
- [x] I have reviewed my own code changes.

---------

Signed-off-by: burgholzer <burgholzer@me.com>
Signed-off-by: Daniel Haag <121057143+denialhaag@users.noreply.github.com>
Co-authored-by: Matthias Reumann <matthias.reumann@tum.de>
Co-authored-by: burgholzer <burgholzer@me.com>
Co-authored-by: Daniel Haag <121057143+denialhaag@users.noreply.github.com>
## Description

This PR updates QDMI to the latest stable version (v1.3.0).
After this has been back ported to `v3.x`, a new minor release for MQT
Core will be created.

## Checklist

<!---
This checklist serves as a reminder of a couple of things that ensure
your pull request will be merged swiftly.
-->

- [x] The pull request only contains commits that are focused and
relevant to this change.
- [x] I have added appropriate tests that cover the new/changed
functionality.
- [x] I have updated the documentation to reflect these changes.
- [x] I have added entries to the changelog for any noteworthy
additions, changes, fixes, or removals.
- [x] I have added migration instructions to the upgrade guide (if
needed).
- [x] The changes follow the project's style guidelines and introduce no
new warnings.
- [x] The changes are fully tested and pass the CI checks.
- [x] I have reviewed my own code changes.

**If PR contains AI-assisted content:**

- [x] I have disclosed the use of AI tools in the PR description as per
our [AI Usage
Guidelines](https://github.com/munich-quantum-toolkit/core/blob/main/docs/ai_usage.md).
- [x] AI-assisted commits include an `Assisted-by: [Model Name] via
[Tool Name]` footer.
- [x] I confirm that I have personally reviewed and understood all
AI-generated content, and accept full responsibility for it.

Signed-off-by: Lukas Burgholzer <burgholzer@me.com>
…h-quantum-toolkit#1656)

## Description

This PR updates the changelog and upgrade guide after the release of
`v3.5.0`.

## Checklist

- [x] The pull request only contains commits that are focused and
relevant to this change.
- [x] ~~I have added appropriate tests that cover the new/changed
functionality.~~
- [x] ~~I have updated the documentation to reflect these changes.~~
- [x] ~~I have added entries to the changelog for any noteworthy
additions, changes, fixes, or removals.~~
- [x] ~~I have added migration instructions to the upgrade guide (if
needed).~~
- [x] The changes follow the project's style guidelines and introduce no
new warnings.
- [x] The changes are fully tested and pass the CI checks.
- [x] I have reviewed my own code changes.
## Description

This PR reconfigures the `prek` priorities to ensure that no two hooks
write at the same time.

## Checklist

- [x] The pull request only contains commits that are focused and
relevant to this change.
- [x] ~~I have added appropriate tests that cover the new/changed
functionality.~~
- [x] ~~I have updated the documentation to reflect these changes.~~
- [x] ~~I have added entries to the changelog for any noteworthy
additions, changes, fixes, or removals.~~
- [x] ~~I have added migration instructions to the upgrade guide (if
needed).~~
- [x] The changes follow the project's style guidelines and introduce no
new warnings.
- [x] The changes are fully tested and pass the CI checks.
- [x] I have reviewed my own code changes.
burgholzer added a commit that referenced this pull request Apr 28, 2026
## Description

This pull request adds the `walkProgramGraph` driver functionality
originally developed in #1600 in an effort to reduce the PR size there.
Moreover, #1661 also depends on the driver.

## Checklist

<!---
This checklist serves as a reminder of a couple of things that ensure
your pull request will be merged swiftly.
-->

- [X] The pull request only contains commits that are focused and
relevant to this change.
- [X] I have added appropriate tests that cover the new/changed
functionality.
- [X] I have updated the documentation to reflect these changes.
- [x] I have added entries to the changelog for any noteworthy
additions, changes, fixes, or removals.
- [X] I have added migration instructions to the upgrade guide (if
needed).
- [X] The changes follow the project's style guidelines and introduce no
new warnings.
- [X] The changes are fully tested and pass the CI checks.
- [X] I have reviewed my own code changes.

**If PR contains AI-assisted content:**

- [X] I have disclosed the use of AI tools in the PR description as per
our [AI Usage
Guidelines](https://github.com/munich-quantum-toolkit/core/blob/main/docs/ai_usage.md).
- [X] AI-assisted commits include an `Assisted-by: [Model Name] via
[Tool Name]` footer.
- [X] I confirm that I have personally reviewed and understood all
AI-generated content, and accept full responsibility for it.

---------

Signed-off-by: burgholzer <burgholzer@me.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: burgholzer <burgholzer@me.com>
@MatthiasReumann
Copy link
Copy Markdown
Collaborator

FYI: Now that #1664 is merged, you can safely remove the copied code in drivers.h, drivers.cpp, and test_drivers.cpp 🚀

@denialhaag denialhaag changed the title new pass SwapAbsorb ✨ Add -absorb-swaps pass Apr 28, 2026
@jmoosburger
Copy link
Copy Markdown
Author

oh boy, this was an awful merge :O i need to fix a few small things and want to verify it another time. will push it with first unittests on thursday :)

@MatthiasReumann
Copy link
Copy Markdown
Collaborator

oh boy, this was an awful merge :O i need to fix a few small things and want to verify it another time. will push it with first unittests on thursday :)

Sounds great, thanks! 🚀 Although, something seems to have gone wrong with the merge. Make sure to update the main branch on your fork!

@denialhaag
Copy link
Copy Markdown
Member

Now that #1673 is merged, there are likely a few more conflicts. I'd recommend rebasing over merging main into this to also clean up the commit history. 🙂

J4MMlE and others added 12 commits April 30, 2026 19:01
…#1407)

This PR extends the rotation merging pass in the QCO ~~MQTOpt~~ dialect
to support quaternion-based gate fusion.

The existing rotation merge pass only merges consecutive rotation gates
of the **same type** (e.g., `rx + rx` or `ry + ry`) by adding their
angles.
This PR introduces quaternion-based merging, which can merge rotation
gates of different types (currently only single qubit gates `rx`, `ry`,
`rz`, `r`, `p`, `u2`, `u`).

Quaternions are widely used to represent rotations in three-dimensional
space and naturally map to qubit gate rotations around the Bloch sphere.
The implementation:

1. Converts rotation gates to quaternion representation
2. Multiplies quaternions using the Hamilton product
3. Converts the resulting quaternion back to a `u` gate. (This could
also be done differently in the future, and directly decompose to the
correct base gates by using the decomposition from munich-quantum-toolkit#1182)

This optimization is enabled by default but can be **disabled** by
adding this flag to the compiler invocation:
```bash
mqt-cc --disable-merge-single-qubit-rotation-gates <input.mlir>
```

Closes munich-quantum-toolkit#1029

<!---
This checklist serves as a reminder of a couple of things that ensure
your pull request will be merged swiftly.
-->

- [x] The pull request only contains commits that are focused and
relevant to this change.
- [x] I have added appropriate tests that cover the new/changed
functionality.
- [x] I have updated the documentation to reflect these changes.
- [x] I have added entries to the changelog for any noteworthy
additions, changes, fixes, or removals.
- [x] ~~I have added migration instructions to the upgrade guide (if
needed).~~
- [x] The changes follow the project's style guidelines and introduce no
new warnings.
- [x] The changes are fully tested and pass the CI checks.
- [x] I have reviewed my own code changes.

---------

Signed-off-by: burgholzer <burgholzer@me.com>
Signed-off-by: Daniel Haag <121057143+denialhaag@users.noreply.github.com>
Co-authored-by: Matthias Reumann <matthias.reumann@tum.de>
Co-authored-by: burgholzer <burgholzer@me.com>
Co-authored-by: Daniel Haag <121057143+denialhaag@users.noreply.github.com>
This PR contains the following updates:

| Package | Type | Update | Change | Pending |
|---|---|---|---|---|
|
[adhtruong/mirrors-typos](https://redirect.github.com/adhtruong/mirrors-typos)
| repository | patch | `v1.45.0` → `v1.45.1` | |
|
[astral-sh/ruff-pre-commit](https://redirect.github.com/astral-sh/ruff-pre-commit)
| repository | patch | `v0.15.10` → `v0.15.11` | `v0.15.12` |
|
[astral-sh/uv-pre-commit](https://redirect.github.com/astral-sh/uv-pre-commit)
| repository | patch | `0.11.6` → `0.11.7` | |
|
[henryiii/validate-pyproject-schema-store](https://redirect.github.com/henryiii/validate-pyproject-schema-store)
| repository | patch | `2026.04.11` → `2026.04.17` | `2026.04.24` (+2) |
|
[rbubley/mirrors-prettier](https://redirect.github.com/rbubley/mirrors-prettier)
| repository | patch | `v3.8.2` → `v3.8.3` | |

Note: The `pre-commit` manager in Renovate is not supported by the
`pre-commit` maintainers or community. Please do not report any problems
there, instead [create a Discussion in the Renovate
repository](https://redirect.github.com/renovatebot/renovate/discussions/new)
if you have any questions.

---

### Release Notes

<details>
<summary>adhtruong/mirrors-typos (adhtruong/mirrors-typos)</summary>

###
[`v1.45.1`](https://redirect.github.com/adhtruong/mirrors-typos/compare/v1.45.0...v1.45.1)

[Compare
Source](https://redirect.github.com/adhtruong/mirrors-typos/compare/v1.45.0...v1.45.1)

</details>

<details>
<summary>astral-sh/ruff-pre-commit (astral-sh/ruff-pre-commit)</summary>

###
[`v0.15.11`](https://redirect.github.com/astral-sh/ruff-pre-commit/releases/tag/v0.15.11)

[Compare
Source](https://redirect.github.com/astral-sh/ruff-pre-commit/compare/v0.15.10...v0.15.11)

See: <https://github.com/astral-sh/ruff/releases/tag/0.15.11>

</details>

<details>
<summary>astral-sh/uv-pre-commit (astral-sh/uv-pre-commit)</summary>

###
[`v0.11.7`](https://redirect.github.com/astral-sh/uv-pre-commit/releases/tag/0.11.7)

[Compare
Source](https://redirect.github.com/astral-sh/uv-pre-commit/compare/0.11.6...0.11.7)

See: <https://github.com/astral-sh/uv/releases/tag/0.11.7>

</details>

<details>
<summary>henryiii/validate-pyproject-schema-store
(henryiii/validate-pyproject-schema-store)</summary>

###
[`v2026.04.17`](https://redirect.github.com/henryiii/validate-pyproject-schema-store/compare/2026.04.16...2026.04.17)

[Compare
Source](https://redirect.github.com/henryiii/validate-pyproject-schema-store/compare/2026.04.16...2026.04.17)

###
[`v2026.04.16`](https://redirect.github.com/henryiii/validate-pyproject-schema-store/compare/2026.04.11...2026.04.16)

[Compare
Source](https://redirect.github.com/henryiii/validate-pyproject-schema-store/compare/2026.04.11...2026.04.16)

</details>

<details>
<summary>rbubley/mirrors-prettier (rbubley/mirrors-prettier)</summary>

###
[`v3.8.3`](https://redirect.github.com/rbubley/mirrors-prettier/compare/v3.8.2...v3.8.3)

[Compare
Source](https://redirect.github.com/rbubley/mirrors-prettier/compare/v3.8.2...v3.8.3)

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - "every weekend"
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config
help](https://redirect.github.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/munich-quantum-toolkit/core).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xNDEuMyIsInVwZGF0ZWRJblZlciI6IjQzLjE0MS4zIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiLCJwcmUtY29tbWl0Il19-->

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This PR contains the following updates:

| Update | Change |
|---|---|
| lockFileMaintenance | All locks refreshed |

🔧 This Pull Request updates lock files to use the latest dependency
versions.

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - "before 4am on monday"
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config
help](https://redirect.github.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/munich-quantum-toolkit/core).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xNDEuMyIsInVwZGF0ZWRJblZlciI6IjQzLjE0MS4zIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiLCJweXRob24iXX0=-->

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This pull request adds the `walkProgramGraph` driver functionality
originally developed in munich-quantum-toolkit#1600 in an effort to reduce the PR size there.
Moreover, munich-quantum-toolkit#1661 also depends on the driver.

<!---
This checklist serves as a reminder of a couple of things that ensure
your pull request will be merged swiftly.
-->

- [X] The pull request only contains commits that are focused and
relevant to this change.
- [X] I have added appropriate tests that cover the new/changed
functionality.
- [X] I have updated the documentation to reflect these changes.
- [x] I have added entries to the changelog for any noteworthy
additions, changes, fixes, or removals.
- [X] I have added migration instructions to the upgrade guide (if
needed).
- [X] The changes follow the project's style guidelines and introduce no
new warnings.
- [X] The changes are fully tested and pass the CI checks.
- [X] I have reviewed my own code changes.

**If PR contains AI-assisted content:**

- [X] I have disclosed the use of AI tools in the PR description as per
our [AI Usage
Guidelines](https://github.com/munich-quantum-toolkit/core/blob/main/docs/ai_usage.md).
- [X] AI-assisted commits include an `Assisted-by: [Model Name] via
[Tool Name]` footer.
- [X] I confirm that I have personally reviewed and understood all
AI-generated content, and accept full responsibility for it.

---------

Signed-off-by: burgholzer <burgholzer@me.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: burgholzer <burgholzer@me.com>
… targets for component-based installs (munich-quantum-toolkit#1662) (munich-quantum-toolkit#1663)

## Description

This PR fixes the problems observed with the 3.5.0 release while
updating in dependent MQT repositories.
There was a malformed include directory install command, that did not
even turn out to be necessary (through local testing with QCEC, QMAP,
and DDSIM).

This is essentially the forward port of munich-quantum-toolkit#1662 and the `v3.5.1` release.

## Checklist

<!---
This checklist serves as a reminder of a couple of things that ensure
your pull request will be merged swiftly.
-->

- [x] The pull request only contains commits that are focused and
relevant to this change.
- [x] I have added appropriate tests that cover the new/changed
functionality.
- [x] I have updated the documentation to reflect these changes.
- [x] I have added entries to the changelog for any noteworthy
additions, changes, fixes, or removals.
- [x] I have added migration instructions to the upgrade guide (if
needed).
- [x] The changes follow the project's style guidelines and introduce no
new warnings.
- [x] The changes are fully tested and pass the CI checks.
- [x] I have reviewed my own code changes.

**If PR contains AI-assisted content:**

- [x] I have disclosed the use of AI tools in the PR description as per
our [AI Usage

Guidelines](https://github.com/munich-quantum-toolkit/core/blob/main/docs/ai_usage.md).
- [x] AI-assisted commits include an `Assisted-by: [Model Name] via
[Tool Name]` footer.
- [x] I confirm that I have personally reviewed and understood all
AI-generated content, and accept full responsibility for it.

---------

Signed-off-by: Lukas Burgholzer <burgholzer@me.com>
## Description

This PR cleans up `llvm` includes by relying on
[`mlir/Support/LLVM.h`](https://github.com/llvm/llvm-project/blob/main/mlir/include/mlir/Support/LLVM.h)
as much as possible in header files.

## Checklist

- [x] The pull request only contains commits that are focused and
relevant to this change.
- [x] ~~I have added appropriate tests that cover the new/changed
functionality.~~
- [x] ~~I have updated the documentation to reflect these changes.~~
- [x] I have added entries to the changelog for any noteworthy
additions, changes, fixes, or removals.
- [x] ~~I have added migration instructions to the upgrade guide (if
needed).~~
- [x] The changes follow the project's style guidelines and introduce no
new warnings.
- [x] The changes are fully tested and pass the CI checks.
- [x] I have reviewed my own code changes.

---------

Signed-off-by: burgholzer <burgholzer@me.com>
Co-authored-by: burgholzer <burgholzer@me.com>
@jmoosburger
Copy link
Copy Markdown
Author

jmoosburger commented Apr 30, 2026

i think, i need some help here °^^

  1. rebase is complete and i did my best for a valid result, but there is still one test i cannot fix: Architectures/MappingPassTest.Sabre/RigettiNoveraArchitectures/MappingPassTest.Sabre/RigettiNovera

  2. we used the method walkCircuitGraph() in the SwapAbsorbPass which is not available any more. it is replaced with walkProgramGraph, right? :)

  3. as i am not deep enough in the code, i am not 100% confident i did everything right. can someone have a look at the changes here and verify them? 🙏

@MatthiasReumann
Copy link
Copy Markdown
Collaborator

i think, i need some help here °^^

Something seems to have gone very wrong with the rebase/merge here 😅. I took the liberty to open a fresh pull request (#1683) with the swap-absorption logic. Please sync your fork (always make sure your main is up-to-date!) and continue working on that branch / PR.

Furthermore, I have added a bunch of comments on the PR there, to guide you through the required next steps.

Again, thanks for working on this! 🚀

@mergify mergify Bot removed the conflict label May 4, 2026
@jmoosburger
Copy link
Copy Markdown
Author

that's absolutely fine! thanks for your help <3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++ Anything related to C++ code MLIR Anything related to MLIR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants