✨ Support iteration over OpenQASM arrays and slices - #2590
Open
simon1hofmann wants to merge 1 commit into
Open
simon1hofmann wants to merge 1 commit into
simon1hofmann wants to merge 1 commit into
Conversation
simon1hofmann
added this pull request to stack #2576
September 21, 2026 08:51
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
10 tasks
simon1hofmann
force-pushed
the
codex/openqasm-array-iteration
branch
from
September 24, 2026 11:23
c4b75e2 to
933ed31
Compare
simon1hofmann
force-pushed
the
codex/openqasm-array-iteration
branch
from
September 26, 2026 10:36
933ed31 to
151ad13
Compare
simon1hofmann
force-pushed
the
codex/openqasm-array-iteration
branch
from
September 28, 2026 10:36
151ad13 to
84555ef
Compare
Reuse array views and existing loop lowering to preserve by-value iteration, captured slice bounds, and nested loop control without copying arrays. Assisted-by: GPT-5 via Codex
simon1hofmann
force-pushed
the
codex/openqasm-array-iteration
branch
from
September 29, 2026 07:12
84555ef to
8076092
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
forloops over one-dimensional classical arrays and slices, includingrank-one selections from multidimensional arrays and runtime slice bounds.
does not change the array or the next iteration value.
nested
break/continueand empty-array behavior.conversions. Do not copy or unroll the iterated array.
Retain the existing restrictions on runtime fixed-width angle conversion.
Stacked on #2585. Refs #2109; this intermediate slice does not close the issue.
Subroutines and array-reference parameters remain separate work.
Validation
Codex assisted with implementation, tests, documentation, and this description.
Checklist
If PR contains AI-assisted content:
🤖 *AI text below* 🤖(titles are exempt).