Skip to content

🐛 Preserve circuit names during mapping - #1154

Merged
burgholzer merged 1 commit into
mainfrom
codex/fix-1151-preserve-circuit-name
Sep 7, 2026
Merged

🐛 Preserve circuit names during mapping#1154
burgholzer merged 1 commit into
mainfrom
codex/fix-1151-preserve-circuit-name

Conversation

@burgholzer

@burgholzer burgholzer commented Sep 7, 2026

Copy link
Copy Markdown
Member

🤖 AI text below 🤖

Description

This is the base of a two-PR stack; #1153 should be merged after this PR.

Copy the input circuit name to the mapped circuit in the shared mapper initialization path. This preserves QuantumCircuit.name across both heuristic and exact mapping and avoids downstream rejection of unnamed circuits.

Add an exact-mapper regression test that checks the returned Qiskit circuit retains the input name.

AI assistance disclosure: GPT-5 via Codex traced the shared mapper initialization, implemented the one-line fix and focused test, and ran the reported validation.

Fixes #1151

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.

@github-project-automation github-project-automation Bot moved this to In Progress in MQT Compilation Sep 7, 2026
@burgholzer burgholzer added c++ Anything related to C++ code fix Anything related to bugfixes labels Sep 7, 2026
@burgholzer burgholzer self-assigned this Sep 7, 2026
@burgholzer
burgholzer force-pushed the codex/fix-1151-preserve-circuit-name branch from acb3e7e to e8ce0ce Compare September 7, 2026 08:41
@burgholzer
burgholzer enabled auto-merge (squash) September 7, 2026 08:43
Copy the input circuit name to the mapped circuit during shared mapper initialization.

Assisted-by: GPT-5 via Codex
@burgholzer
burgholzer force-pushed the codex/fix-1151-preserve-circuit-name branch from e8ce0ce to 400a7ba Compare September 7, 2026 08:49
@burgholzer
burgholzer disabled the stack merge September 7, 2026 08:59
@codecov

codecov Bot commented Sep 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@burgholzer
burgholzer merged commit 7b2fc33 into main Sep 7, 2026
25 checks passed
@burgholzer
burgholzer deleted the codex/fix-1151-preserve-circuit-name branch September 7, 2026 10:29
@github-project-automation github-project-automation Bot moved this from In Progress to Done in MQT Compilation Sep 7, 2026
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 fix Anything related to bugfixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🐛 compile_() silently drops the input circuit's .name

1 participant