Skip to content
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

Add basic support for OpenQASM 3. #151

Merged
merged 1 commit into from Sep 7, 2023

Conversation

dlyongemallo
Copy link
Contributor

Addresses issue #116:

  • accept OpenQASM 3 file header produced by qiskit
  • condition behaviour of rz based on version:
    • OpenQASM 2: same as ZPhase = diag(1, exp(i*phi)) (unchanged)
    • OpenQASM 3: acts like diag(exp(-i*phi/2), exp(i*phi/2))
  • add p as an alias for ZPhase in OpenQASM 3
  • add u1 as an alias for ZPhase in both versions

Addresses issue Quantomatic#116:
- accept OpenQASM 3 file header produced by qiskit
- condition behaviour of `rz` based on version:
  - OpenQASM 2: same as `ZPhase` = `diag(1, exp(i*phi))` (unchanged)
  - OpenQASM 3: acts like `diag(exp(-i*phi/2), exp(i*phi/2))`
- add `p` as an alias for `ZPhase` in OpenQASM 3
- add `u1` as an alias for `ZPhase` in both versions
@jvdwetering jvdwetering merged commit f418da9 into Quantomatic:master Sep 7, 2023
4 checks passed
@dlyongemallo dlyongemallo deleted the qasm3 branch September 7, 2023 23:21
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.

None yet

2 participants