Skip to content

♻️ Own neutral-atom stack - #1111

Open
denialhaag wants to merge 41 commits into
mainfrom
na-transfer
Open

♻️ Own neutral-atom stack#1111
denialhaag wants to merge 41 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 stack from MQT Core to QMAP. QMAP now owns the physical neutral-atom computation IR, the circuit operations used by hybrid mapping, the conversion and mapping code, the QDMI device and client integration, Python bindings, packaged device data, documentation, and tests. NALAC remains self-contained under na/nalac.

The IR now uses consistent, layer-specific terminology: physical instructions are NAComputation...Operation, while circuit-level operations use NAStandardOperation, AodOperation, and NeutralAtomOpType. This keeps the port aligned with the former Core counterparts while making each abstraction’s purpose clear.

QMAP manages QDMI 1.3.3 directly and uses its current FoMaC API. The QDMI device layer retains Core’s shared loadDeviceConfiguration helper but no longer depends on Core’s spdlog target. The packaged device is added to QDMI discovery exactly once without replacing other compatible devices, following the integration pattern from QDMI-on-IQM#195.

Wheel packaging ships the provider library and configuration together. Added regressions cover device discovery, stderr diagnostics, the complete device JSON round trip, and rejection of zone-model devices by the compiler and Qiskit adapters.

AI notice

This PR and its contents were created with the assistance of Opus 5 via Claude Code and GPT-5.6 Sol via Codex.

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
Assisted-by: GPT-5.6 Sol via Codex
Assisted-by: GPT-5.6 Sol via Codex
Comment thread .github/workflows/cd.yml Outdated
@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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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