munich-quantum-toolkit / munich-quantum-toolkit/core

✨ Support Qiskit register aliases and arbitrary bit layouts

Open
#2,069 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Core enhancement MLIR python
Dominant language
C++
Stars
133
Forks
73
Avg merge
17h 34m
Merged PRs (30d)
261

Description

🤖 AI text below 🤖

Goal

Support Qiskit registers whose members alias, overlap, interleave, or reorder circuit bits. #2031 initially accepts only disjoint canonical register membership and uses the shared allocation register-name attributes.

Implementation direction

  • Introduce a frontend-neutral resource-view representation that names an ordered view of qubits or classical bits without creating new resources.
  • Represent a register as an ordered list or slice composition over allocated resources. Do not encode Qiskit-specific register membership as module attributes.
  • Define overlap and alias semantics explicitly, including whether two views may contain the same resource, contain duplicate members, or cover only part of an allocation.
  • Preserve view identity through transformations that clone, erase, split, merge, or reorder allocations. Verification must reject dangling members and kind mismatches.
  • Teach OpenQASM and other frontends to reuse the representation where their register/view semantics match.
  • Reconstruct Qiskit registers with their original ordering and overlaps during export.

Edge cases

  • Interleaved registers, reversed membership, partial views, duplicate members, empty registers, overlapping quantum and classical views, and several names for the same view.
  • Transformations that eliminate or replace an allocation referenced by multiple views.
  • Export to formats that cannot express aliases must fail explicitly or use a documented lowering policy.

Acceptance tests

  • Import and round-trip tests for disjoint noncanonical, interleaved, reordered, overlapping, and duplicate-member registers.
  • Verification tests for dangling, mixed-kind, and out-of-range members.
  • Transformation tests showing that resource views remain correct after representative allocation and operation rewrites.
  • Cross-frontend tests demonstrating that shared view metadata is not Qiskit-specific.

Part of #917.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the register handling introduced by #2031 and trace allocation metadata through the clone, erase, split, merge, reorder, and export transformations. Define the shared resource-view semantics and verify them with the listed import, round-trip, dangling-member, kind, transformation, and cross-frontend tests; done means Qiskit aliases and arbitrary layouts round-trip or unsupported exports fail explicitly.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers, quantum-computing
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.