✨ Support whole-array OpenQASM copies - #2577
Open
simon1hofmann wants to merge 4 commits into
Open
simon1hofmann wants to merge 4 commits into
simon1hofmann wants to merge 4 commits into
Conversation
simon1hofmann
added this pull request to stack #2576
September 18, 2026 08:57
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
9 of 10 tasks
simon1hofmann
force-pushed
the
codex/openqasm-array-copies
branch
from
September 21, 2026 08:16
496ea14 to
20ee9cc
Compare
simon1hofmann
force-pushed
the
codex/openqasm-array-copies
branch
from
September 24, 2026 11:16
20ee9cc to
ae044ef
Compare
simon1hofmann
force-pushed
the
codex/openqasm-array-copies
branch
from
September 26, 2026 10:23
ae044ef to
a31254f
Compare
simon1hofmann
force-pushed
the
codex/openqasm-array-copies
branch
from
September 28, 2026 10:20
a31254f to
960e2cb
Compare
Copy matching arrays into independent storage with memref.copy. Preserve definite initialization and storage identity across control flow and native helper calls without expanding copies per element. Assisted-by: GPT-5 via Codex
HTML and Markdown documentation builds execute notebooks concurrently. Run the DD examples in temporary directories so their DOT and SVG files do not overwrite each other during export and display. Assisted-by: GPT-5 via Codex
Keep physical-qubit allocation checks for Adaptive QIR and assert that residual copy storage is rejected by Base Profile. Assisted-by: GPT-5 via Codex
Do not silently treat newly parsed register slice syntax as a whole-array assignment in this earlier stack layer. Assisted-by: OpenAI Codex
simon1hofmann
force-pushed
the
codex/openqasm-array-copies
branch
from
September 29, 2026 07:12
960e2cb to
427cacf
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 AI text below 🤖
Description
Support whole-array initialization (
array[int, 2] b = a;) and assignment (b = a;) in the OpenQASM frontend. Source and destination must have matching shapes and element types, including widths. The source must be fully initialized. Copies use independent storage, preserve angle quantization, and support runtime updates and control flow. Self-assignment preserves the array.Reuse
memref.copy, fixed stack storage, and the QIR infrastructure from #2573. Copies remain compact in the emitted IR. The native QCO interpreter copies values without replacing storage shared with helper calls. Adaptive QIR handles residual copies; Base QIR accepts only programs whose unsupported storage and computation disappear during cleanup.Stacked on #2574. Refs #2109; this is an intermediate slice and does not close the issue. Subarrays, ranges, concatenation, array outputs, and export of residual array storage remain follow-ups.
Validation
Codex assisted with implementation, tests, documentation, and this description.
Checklist
If PR contains AI-assisted content:
🤖 *AI text below* 🤖(titles are exempt).