Skip to content

Circuit to OpenQASM conversion breaks when using ECR gates #609

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

judealnas
Copy link

Fixes #608

Added "Gecres" conversion to "ecr".
Since "Gecres" is the key associated with the ECR unitary and is most likely used in existing processor specs, this seemed like the fix least likely to break existing code.

Corey Ostrove and others added 3 commits July 3, 2025 17:47
…m-version1

Add version file directive to pyproject
Fixes sandialabs#608

Added `"Gecres"` conversion to `"ecr"`.
Since `"Gecres"` is the key associated with the ECR unitary and is most likely used in existing processor specs, this seemed like the fix least likely to break existing code.
@judealnas judealnas requested review from a team as code owners July 16, 2025 17:21
@judealnas judealnas requested review from coreyostrove and removed request for a team July 16, 2025 17:21
@rileyjmurray
Copy link
Contributor

Thanks for this, @judealnas!

If it's alright with @coreyostrove, I'm inclined to add 'Gecr' as a pyGSTi standard gatename as well. This would involve adding the following lines to pygsti/tools/internalgates.py:

  • after line 198, add * 'Gecr' : alternative name for the echoed cross-resonance gate, matching OpenQASM / IBM conventions. as line 199.
  • after line 305, add std_unitaries['Gecr'] = std_unitaries['Gecres'] # alias as line 306.
  • after line 406, add gate_dict['Gecr'] = gate_dict['Gecres'] as line 407.

@coreyostrove coreyostrove changed the base branch from master to develop July 18, 2025 03:34
@coreyostrove
Copy link
Contributor

Thank you for these fixes, @judealnas. Before we can accept a PR from an external contributor our organization requires that we have a contributor license agreement (CLA) on file. This is fairly low-effort though and only needs to be done once. If you send us an email at the sandia.gov address located in the contributor guidelines here we can get you a copy.

I appreciate that this is a bit of a hassle for just a couple lines of code which I apologize for, so if you'd prefer not to then we can incorporate these patches on our end and get those merged in (while properly recognizing you for your contributions, of course).

@rileyjmurray: In full agreement about adding those gate aliases.

@judealnas
Copy link
Author

@coreyostrove I'd be happy to sign the CLA.

@coreyostrove
Copy link
Contributor

Excellent, thank you. Shoot us an email at pygsti [at] sandia.gov at your convenience and we'll send you a copy.

@rileyjmurray
Copy link
Contributor

rileyjmurray commented Jul 22, 2025

Chiming in to report that we've received the signed CLA.

@judealnas can you make the changes I proposed in this comment: #609 (comment) ?

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.

Circuit to OpenQASM conversion breaks when using ECR gates
3 participants