Skip to content

Preserve exact rotations in Clifford+T rebasing - #429

Open
danielgaskins wants to merge 1 commit into
qBraid:mainfrom
danielgaskins:fix/clifford-t-rotations
Open

danielgaskins wants to merge 1 commit into
qBraid:mainfrom
danielgaskins:fix/clifford-t-rotations

Conversation

@danielgaskins

Copy link
Copy Markdown

Closes #428

Summary of changes

  • Decompose rx, ry, and rz rotations at multiples of π/4 into exact Clifford+T sequences
  • Raise RebaseError for unsupported angles instead of silently dropping the gate
  • Add QASM 2 and QASM 3 coverage for positive, negative, periodic, zero, unsupported, and conditional rotations

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

argus-eye Bot commented Sep 20, 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: 3
  • Diff lines (±): 182
  • 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 20, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 58 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Repository: qBraid/pyqasm/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 39bc1e2e-9c55-4788-a51e-382a2c19d560

📥 Commits

Reviewing files that changed from the base of the PR and between 036ad4d and 79c4663.

📒 Files selected for processing (3)
  • src/pyqasm/decomposer.py
  • tests/qasm2/test_rotation_gates.py
  • tests/qasm3/test_rebase.py

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.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

This branch has not been deployed

No deployments
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.

[BUG] rebase(BasisSet.CLIFFORD_T) silently drops rx/ry/rz gates

2 participants