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

QASM parser #1207

Merged
merged 43 commits into from
Mar 1, 2024
Merged

QASM parser #1207

merged 43 commits into from
Mar 1, 2024

Conversation

BrunoLiegiBastonLiegi
Copy link
Contributor

@BrunoLiegiBastonLiegi BrunoLiegiBastonLiegi commented Feb 9, 2024

This implements a QASM parser based on https://github.com/openqasm/openqasm.

This closes #1151 and is related to #626 #791.

Checklist:

  • Reviewers confirm new code works as expected.
  • Tests are passing.
  • Coverage does not decrease.
  • Documentation is updated.

Copy link

codecov bot commented Feb 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (7bab351) to head (0912a3a).

Additional details and impacted files
@@            Coverage Diff            @@
##            master     #1207   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           72        73    +1     
  Lines        10516     10531   +15     
=========================================
+ Hits         10516     10531   +15     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@BrunoLiegiBastonLiegi BrunoLiegiBastonLiegi marked this pull request as ready for review February 14, 2024 07:31
@renatomello renatomello added the enhancement New feature or request label Feb 14, 2024
@renatomello
Copy link
Contributor

Is anywhere in the docs mentioned that qibo is using QASM 2.0 or QASM 3.0? Does it matter?

@BrunoLiegiBastonLiegi
Copy link
Contributor Author

Is anywhere in the docs mentioned that qibo is using QASM 2.0 or QASM 3.0? Does it matter?

I don't think it is. We could explicitly say that now we support 3.0, but the problem is that this is not completely true, as not all the functions introduced in 3.0 are supported yet.

@scarrazza
Copy link
Member

Then, we could say it is compatible with 3.0.

src/qibo/models/circuit.py Show resolved Hide resolved
src/qibo/models/circuit.py Show resolved Hide resolved
src/qibo/_openqasm.py Outdated Show resolved Hide resolved
src/qibo/_openqasm.py Outdated Show resolved Hide resolved
@renatomello
Copy link
Contributor

Maybe '_openqasm3 could be moved to inside qibo.modelssince it's only used in qibo.models.circuit.py

PS: I think this could still be done. Also the mention of compatibility in the documentation.

@scarrazza
Copy link
Member

@BrunoLiegiBastonLiegi could you please fix conflicts so we can proceed?

Copy link
Member

@scarrazza scarrazza left a comment

Choose a reason for hiding this comment

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

Thanks.

@scarrazza scarrazza added this pull request to the merge queue Mar 1, 2024
Merged via the queue into master with commit 0e065bd Mar 1, 2024
21 checks passed
@stavros11 stavros11 deleted the qasm3 branch March 1, 2024 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Handling QASM file conversion with gate command
3 participants