✨ Support runtime OpenQASM array size queries - #2585
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 18, 2026 12:58
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
simon1hofmann
force-pushed
the
codex/openqasm-runtime-sizeof
branch
from
September 21, 2026 08:16
5b8b54a to
fe78552
Compare
10 tasks
simon1hofmann
force-pushed
the
codex/openqasm-runtime-sizeof
branch
from
September 24, 2026 11:21
fe78552 to
8c0e4af
Compare
simon1hofmann
force-pushed
the
codex/openqasm-runtime-sizeof
branch
from
September 26, 2026 10:29
8c0e4af to
7706abc
Compare
simon1hofmann
force-pushed
the
codex/openqasm-runtime-sizeof
branch
from
September 28, 2026 10:35
7706abc to
19e8438
Compare
Reuse range arithmetic for sizeof on runtime-sized slices without reading or copying array elements. Preserve constant folding for known extents and diagnose runtime queries in constant-only contexts. Refs #2109 Assisted-by: GPT-5 via Codex
simon1hofmann
force-pushed
the
codex/openqasm-runtime-sizeof
branch
from
September 29, 2026 07:12
19e8438 to
7b75d2c
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
sizeofon runtime-sized classical array slices, such assizeof(a[start:step:stop]). The result is a runtimeuint; queries with known extents still fold to constants, including zero-length dimensions and fixed dimensions beside runtime-sized ones.constinitializers and fixed array/type widths.Stacked on #2584. No new dependencies or dialect operations. Refs #2109; this is an intermediate slice and does not close the issue.
Validation
Codex assisted with implementation, tests, documentation, and this description.
Checklist
If PR contains AI-assisted content:
🤖 *AI text below* 🤖(titles are exempt).