Skip to content

Support cs and csdg standard gates - #441

Merged
TheGupta2012 merged 1 commit into
qBraid:mainfrom
danielgaskins:fix/stdgates-controlled-s
Sep 25, 2026
Merged

TheGupta2012 merged 1 commit into
qBraid:mainfrom
danielgaskins:fix/stdgates-controlled-s

Conversation

@danielgaskins

Copy link
Copy Markdown
Contributor

Summary of changes

cs and csdg are valid stdgates.inc gates, but pyqasm currently rejects them during unrolling. This maps them to the existing controlled-phase decomposition at π/2 and −π/2.

The new tests check both gates with a following measurement, compare their resulting unitaries, and reparse the unrolled QASM. The full suite passes with 909 tests passed and 3 skipped. Black, isort, Pylint, mypy, and whitespace checks pass.

Closes #439.

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

argus-eye Bot commented Sep 24, 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: 4
  • Diff lines (±): 51
  • Historical avg: ~317.3k tokens · ~$1.35 · across last 12 review(s)

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

@coderabbitai

coderabbitai Bot commented Sep 24, 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: Repository: qBraid/pyqasm/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 3514b594-b84f-433d-80cb-33a9afb7acbb

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.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@TheGupta2012
TheGupta2012 merged commit 803a2f2 into qBraid:main Sep 25, 2026
14 checks passed
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.

cs and csdg from stdgates.inc are rejected as unsupported operations

3 participants