Fix #14: add all standard OpenQASM gates - #15
Open
thierry-martinez wants to merge 36 commits into
Open
Conversation
This commit adds support for all the gates specified by the OpenQASM 3.0 specification that were previously missing: SDG, T, TDG, SX, SXDG, CY, P, U, CP, CRX, CRY, CRZ, CU, CSWAP, and GPHASE. These gates are also added natively in Graphix in TeamGraphix/graphix#592, eliminating the need for translation. The gates u1, u2, and u3, which are retained for compatibility with OpenQASM 2.0, are translated.
matulni
approved these changes
Sep 1, 2026
matulni
left a comment
There was a problem hiding this comment.
Thanks for this fix ! I made some comments, but it's mostly for my understanding.
This commit adds support for the [id](https://openqasm.com/language/standard_library.html#id) gate, which corresponds to Graphix `I` instruction.
This commit temporarily requires `graphix@master` until CZ gate support is released.
This commit makes the parser use the new Graphix angle convention.
Suggested by Mateo: TeamGraphix/graphix#399 (comment)
* Update CHANGELOG.md * Fix README.md
* Remove crz gate * Remove unused RZZ import --------- Co-authored-by: clebrin <clement.lebrin@veriqloud.fr>
thierry-martinez
added a commit
to thierry-martinez/graphix
that referenced
this pull request
Sep 13, 2026
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.
This commit adds support for all the gates specified by the OpenQASM 3.0 specification that were previously missing: SDG, T, TDG, SX, SXDG, CY, P, U, CP, CRX, CRY, CRZ, CU, CSWAP, and GPHASE.
These gates are also added natively in Graphix in TeamGraphix/graphix#592, eliminating the need for translation.
The gates u1, u2, and u3, which are retained for compatibility with OpenQASM 2.0, are translated.