Skip to content

Support OpenQASM end statements - #424

Open
danielgaskins wants to merge 1 commit into
qBraid:mainfrom
danielgaskins:fix/end-statement-support
Open

Support OpenQASM end statements#424
danielgaskins wants to merge 1 commit into
qBraid:mainfrom
danielgaskins:fix/end-statement-support

Conversation

@danielgaskins

Copy link
Copy Markdown

Summary

  • accept OpenQASM 3 end; statements during validation and unrolling
  • stop statically unrolled blocks after an unconditional terminator
  • preserve conditional terminators inside runtime-dependent branches
  • cover global, branch, loop, switch, box, and subroutine behavior

Testing

  • pytest -q tests/qasm3/test_end.py
  • pytest -q tests
  • pytest -q --cov=pyqasm --cov-config=pyproject.toml --cov-report=term --cov-report=xml tests
  • pylint src tests bin examples
  • isort --check-only src tests bin examples
  • black --check --target-version py310 src tests bin examples
  • mypy src examples
  • qbraid admin headers src tests bin examples --skip=src/pyqasm/_version.py --type=apache
  • sphinx-build -W -b html docs/ <output-directory>

Fixes #396

Signed-off-by: Daniel Gaskins <danielgaskins99@gmail.com>
@argus-eye

argus-eye Bot commented Sep 10, 2026

Copy link
Copy Markdown

Argus review

Auto-review is off for this repo. Tick the box below to run a review on this PR.

  • Trigger Argus review

Estimated cost

  • Files changed: 2
  • Diff lines (±): 243
  • Historical avg: ~317.3k tokens · ~$0.95 · across last 12 review(s)

Tip: you can also comment @argus-eye review at any time.

@coderabbitai

coderabbitai Bot commented Sep 10, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 3e45152c-d546-4c1e-b649-67bd05432a8f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

👋 Hey there! It looks like the changelog might need an update.

Please take a moment to edit the CHANGELOG.md with:

  • A brief, one-to-two sentence summary of your changes.
  • A link back to this PR for reference.
  • (Optional) A small working example if you've added new features.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

end; statement is unsupported

1 participant