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

Developing the openqasm3 to QIR visitor #54

Merged
merged 36 commits into from
Mar 29, 2024
Merged

Conversation

TheGupta2012
Copy link
Collaborator

@TheGupta2012 TheGupta2012 commented Feb 20, 2024

issue tag(s), if exist:

Changes

  • Developing the openqasm3 converter
  • Using a tree-based approach to decompose the openqasm3 AST into pyqir constructs.
  • Progress -
    • Register Declarations
    • QuantumMeasurements
    • QuantumReset
    • QuantumGates - pyqir._native support + U[x] gates
    • QuantumBarriers
    • Gate Unfolding
    • Custom Quantum Gates
    • Simple Branching Statements (controlled on 1 bit)
    • Expressions
      • Literals

register visit completed

exploring measurements

complete measurements

start gates

add reset
@codecov-commenter
Copy link

codecov-commenter commented Mar 5, 2024

Codecov Report

Attention: Patch coverage is 88.86861% with 61 lines in your changes are missing coverage. Please review.

Project coverage is 91.41%. Comparing base (bff6597) to head (9f8f3b6).

Files Patch % Lines
qbraid_qir/qasm3/visitor.py 90.16% 36 Missing ⚠️
qbraid_qir/qasm3/oq3_maps.py 75.60% 10 Missing ⚠️
qbraid_qir/__init__.py 36.36% 7 Missing ⚠️
qbraid_qir/qasm3/elements.py 95.12% 4 Missing ⚠️
qbraid_qir/qasm3/convert.py 86.36% 3 Missing ⚠️
qbraid_qir/cirq/convert.py 80.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #54      +/-   ##
==========================================
- Coverage   96.67%   91.41%   -5.27%     
==========================================
  Files          10       17       +7     
  Lines         271      804     +533     
==========================================
+ Hits          262      735     +473     
- Misses          9       69      +60     

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

@ryanhill1 ryanhill1 linked an issue Mar 5, 2024 that may be closed by this pull request
@TheGupta2012 TheGupta2012 marked this pull request as ready for review March 27, 2024 07:23
@TheGupta2012
Copy link
Collaborator Author

TheGupta2012 commented Mar 27, 2024

Hi @ryanhill1, I think the code is ready for the v0.5 release.
Once you review and merge in main, I will open up issues to tackle different aspects of the work that is left.

Copy link
Member

@ryanhill1 ryanhill1 left a comment

Choose a reason for hiding this comment

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

Looks great! If you could just take a look and clean up that one function that I commented on. Other than that, this looks ready to merge.

qbraid_qir/qasm3/elements.py Outdated Show resolved Hide resolved
qbraid_qir/qasm3/visitor.py Show resolved Hide resolved
qbraid_qir/qasm3/visitor.py Outdated Show resolved Hide resolved
@ryanhill1 ryanhill1 merged commit 894b1a4 into main Mar 29, 2024
6 checks passed
@ryanhill1 ryanhill1 deleted the qasm3-to-qir-harshit branch July 7, 2024 00:47
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.

OpenQASM 3 to QIR
4 participants