Skip to content

Adding support for QASM 2.0 in the OpenQASM compiler #2527

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

Merged
merged 1 commit into from
Jun 13, 2025

Conversation

idavis
Copy link
Collaborator

@idavis idavis commented Jun 12, 2025

This PR adds promotion of OpenQASM 2.0 programs into OpenQASM 3.0 with some caveats

  • Global phase is not adjusted so any OpenQASM 2.0 programs will have OpenQASM 3.0 global phase
  • Opaque gates are not parsed. Any OpenQASM 2.0 programs with them will have parser errors. This concept was not migrated to OpenQASM 3.0
  • OpenQASM 2.0 programs can import "qelib1.inc" and trying to import "stdgates.inc" will give an error.

@idavis idavis requested a review from orpuente-MS June 12, 2025 23:37
@idavis idavis self-assigned this Jun 12, 2025
@idavis idavis force-pushed the iadavis/qasm2-promotion branch from 68fd5c7 to 516e5a1 Compare June 13, 2025 00:47
Copy link
Contributor

@orpuente-MS orpuente-MS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thanks!

@idavis idavis added this pull request to the merge queue Jun 13, 2025
Merged via the queue into main with commit e48ef3b Jun 13, 2025
18 checks passed
@idavis idavis deleted the iadavis/qasm2-promotion branch June 13, 2025 22:43
@idavis idavis mentioned this pull request Jun 16, 2025
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.

2 participants