Skip to content

♻️ Own neutral-atom stack - #1111

Merged
burgholzer merged 43 commits into
mainfrom
na-transfer
Sep 8, 2026
Merged

♻️ Own neutral-atom stack#1111
burgholzer merged 43 commits into
mainfrom
na-transfer

Conversation

@denialhaag

@denialhaag denialhaag commented Aug 16, 2026

Copy link
Copy Markdown
Member

🤖 AI text below 🤖

Description

This PR transfers the neutral-atom computation IR, circuit operations, mapping integration, QDMI provider and client, Python bindings, device data, documentation, and tests from Core to QMAP. NALAC remains self-contained.

Move and bridge operations derive from Core's custom-operation base so the serializer can dispatch them correctly. Device discovery opens every registered device ID once and preserves devices that share a display name. The QMAP provider uses mqt.qmap.na.default and ships its configuration beside the library.

This branch supports Core 3.9. The companion Core 3.10 integration is in #1144, together with #1124 and #1125.

Validation

  • Native neutral-atom tests: 178 passed, 1 skipped; hybrid mapper: 101 passed.
  • Python neutral-atom tests: 24 passed, 1 skipped.
  • Full uvx nox -s lint and targeted clang-tidy 20 checks passed locally.
  • Hosted checks must validate the new head.

AI assistance

Opus 5 via Claude Code, GPT-5.6 Sol via Codex, and GPT-6 via Codex assisted with this contribution. A human must review the updated changes.

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:

  • Any agent that created, edited, or submitted GitHub content was explicitly authorized for that scope, as required by our AI Usage Guidelines.
  • Every agent-authored or agent-edited public text body begins with the visible disclosure 🤖 *AI text below* 🤖 (titles are exempt).
  • I have disclosed AI assistance in the PR description.
  • I confirm that I have personally reviewed and understood all AI-generated content, and accept full responsibility for it.

@denialhaag denialhaag self-assigned this Aug 16, 2026
@github-project-automation github-project-automation Bot moved this to In Progress in MQT Compilation Aug 16, 2026
@denialhaag denialhaag added minor Changes leading to a minor version increase refactor Anything related to code refactoring labels Aug 16, 2026
@burgholzer

Copy link
Copy Markdown
Member

The neutral-atom QDMI device itself is deliberately left behind for now. Its implementation includes qdmi/common/DeviceConfiguration.hpp, which exists only on Core's main and not in the pinned v3.8.0, so the device cannot compile here until QMAP pins a Core release that ships it. The device tests and the FoMaC test are held back with it, since both need a registered neutral-atom QDMI device at runtime.

The Python bindings for mqt.core.na are not moved yet either. They bind na::Session::Device as deriving from fomac::Device, which Core registers in mqt.core.qdmi, so moving them requires wiring that base class across package boundaries.

Quite a bit of the code mentioned here has been backported to v3.x, so it can also be moved as part of this PR.

@denialhaag

Copy link
Copy Markdown
Member Author

The neutral-atom QDMI device itself is deliberately left behind for now. Its implementation includes qdmi/common/DeviceConfiguration.hpp, which exists only on Core's main and not in the pinned v3.8.0, so the device cannot compile here until QMAP pins a Core release that ships it. The device tests and the FoMaC test are held back with it, since both need a registered neutral-atom QDMI device at runtime.
The Python bindings for mqt.core.na are not moved yet either. They bind na::Session::Device as deriving from fomac::Device, which Core registers in mqt.core.qdmi, so moving them requires wiring that base class across package boundaries.

Quite a bit of the code mentioned here has been backported to v3.x, so it can also be moved as part of this PR.

Yes, I just didn't do that just yet because I didn't want the Python CI to be red. The upcoming PR in MQT Core will be fully independent of all of this. Once 3.9.0 is released and MQT QCEC is updated accordingly, I'll get this PR ready. 😌

@denialhaag

Copy link
Copy Markdown
Member Author

@burgholzer and @ystade, I have a quick question about whether (or how) the neutral-atom operations in na:: (that is, MQT Core's) and na::nalac:: should be consolidated. The operations belonging to the former use Location (aliasing double) and Atom, while the latter use Point (aliasing int64_t) and shared_ptr<Point>. Should I try consolidating them, or should they continue to coexist? 🤔

@ystade

ystade commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

As soon as NALAC causes any issues, feel free to remove it. I just kept it as a legacy but it is Kinds deprecated. Consolidating anything here with respect to NALAC is a warte of time.

@burgholzer

Copy link
Copy Markdown
Member

As soon as NALAC causes any issues, feel free to remove it. I just kept it as a legacy but it is Kinds deprecated. Consolidating anything here with respect to NALAC is a warte of time.

I think we do not need to remove it, necessarily. But what I take from your comment is that it is entirely fine to keep everything for NALAC self contained in its own directory and rather focus on a clean integration for the rest.

Assisted-by: Opus 5 via Claude Code
Assisted-by: Opus 5 via Claude Code
Assisted-by: Opus 5 via Claude Code
Assisted-by: Opus 5 via Claude Code
Assisted-by: Opus 5 via Claude Code
Assisted-by: Opus 5 via Claude Code
Assisted-by: Opus 5 via Claude Code
Assisted-by: Opus 5 via Claude Code
Assisted-by: Opus 5 via Claude Code
Assisted-by: Opus 5 via Claude Code
Assisted-by: Opus 5 via Claude Code
@denialhaag denialhaag changed the title 🚚 Take ownership of the neutral-atom stack ♻️ Own neutral-atom stack Aug 26, 2026

@denialhaag denialhaag left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some feedback:

Comment thread bindings/na/register_qdmi.cpp Outdated
Comment thread bindings/na/register_qdmi.cpp Outdated
Comment thread CHANGELOG.md Outdated
Comment thread UPGRADING.md Outdated
Comment thread docs/na_qdmi_device.md Outdated
Comment thread include/hybridmap/NeutralAtomOperation.hpp Outdated
Comment thread include/hybridmap/NeutralAtomOperation.hpp Outdated
Comment thread include/hybridmap/NeutralAtomOperation.hpp Outdated
Comment thread include/na/computation/operations/Op.hpp Outdated
Comment thread include/na/ir/NAComputation.hpp
Assisted-by: GPT-5.6 Sol via Codex
Assisted-by: GPT-5.6 Sol via Codex
Assisted-by: GPT-5.6 Sol via Codex
Assisted-by: GPT-5.6 Sol via Codex
Assisted-by: GPT-5.6 Sol via Codex
@coderabbitai

coderabbitai Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Important

Approval pending

CodeRabbit has no unresolved comments, but it has not reviewed the latest commit.

Use the checkbox below to review the latest commit. CodeRabbit will approve the changes if it finds no blocking issues.

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Assisted-by: GPT-5.6 Sol via Codex
Assisted-by: GPT-5.6 Sol via Codex
Assisted-by: GPT-5.6 Sol via Codex
Assisted-by: GPT-5.6 Sol via Codex
Assisted-by: GPT-5.6 Sol via Codex
Assisted-by: GPT-5.6 Sol via Codex
Assisted-by: GPT-5.6 Sol via Codex
@denialhaag
denialhaag requested a review from burgholzer August 27, 2026 23:31
@denialhaag
denialhaag marked this pull request as ready for review August 27, 2026 23:31
@denialhaag

Copy link
Copy Markdown
Member Author

@burgholzer, I iterated on this quite a bit more today and hopefully brought it to a decent state now. I gave Codex quite a few guardrails to streamline things and context to align the implementation with existing ones (in particular, QMDI-on-IQM). I'm sure there's some more room for improvement, but I think your additional human context may be required for that.

CC @ystade

Signed-off-by: Daniel Haag <121057143+denialhaag@users.noreply.github.com>
Keep move and bridge operations outside Core's standard gate hierarchy.
Discover neutral-atom devices by registered ID so equal display names do
not hide distinct configurations. Refresh the branch with current main
and regenerate the Python stubs.

Assisted-by: GPT-6 via Codex
@burgholzer burgholzer self-assigned this Sep 7, 2026
@burgholzer burgholzer added the fix Anything related to bugfixes label Sep 7, 2026

@burgholzer burgholzer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I have iterated enough on this. Let's get it in to move the release along 😌

@burgholzer
burgholzer merged commit b6f4531 into main Sep 8, 2026
24 of 25 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in MQT Compilation Sep 8, 2026
@burgholzer
burgholzer deleted the na-transfer branch September 8, 2026 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix Anything related to bugfixes minor Changes leading to a minor version increase refactor Anything related to code refactoring

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants