Add support for import/export with OpenQASM#381
Open
Takishima wants to merge 43 commits intoProjectQ-Framework:developfrom
Open
Add support for import/export with OpenQASM#381Takishima wants to merge 43 commits intoProjectQ-Framework:developfrom
Takishima wants to merge 43 commits intoProjectQ-Framework:developfrom
Conversation
d3bf713 to
da62e6b
Compare
da62e6b to
08917d0
Compare
61dd83f to
eb66430
Compare
9eab148 to
6055312
Compare
Pull Request Test Coverage Report for Build 1660297125
💛 - Coveralls |
e6052b4 to
d8f3e96
Compare
f50755d to
94eb28d
Compare
e3ede34 to
00d9c66
Compare
|
@Takishima, I know a long time has passed but is this still relevant? Are we still considering implementing QASM translation to ProjectQ? |
Collaborator
Author
|
I will work on fixing the CI (hopefully this coming weekend) and I will then try to fix this PR. Will ping @andreashehn for a review then, |
- Classical register now are initialised to 0 - Fixed bug with measurements of registers with size > 1 - Fixed issue with conditional expressions and registers with size > 1
452a383 to
cd9b408
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
OpenQASM support
This is a first attempt at implementing conversion to and from OpenQASM.
U2 and U3 gates
Introduced
U2andU3gates with identical definitions as theu2andu3gates in OpenQASM standard library.Conversion ProjectQ -> QASM
This does not require
qiskitto be installed. All the ProjectQ gates are automatically converted into QASM code.For all gates that are not currently supported by QASM need to be decomposed before reaching the
OpenQASMBackend.Also note that you may also use
OpenQASMBackendas a regular compiler engine in order to generate QASM and use the simulator at the same time:Conversion QASM -> ProjectQ
At this point, this does require either
qiskitorpyparsingto be installed.Typical use case:
The implementation currently supports most features of OpenQASM 2.0 (and some OpenQASM 3.0 features, although support for that version is still experimental)
*support at time of writing.
Closes #345 and closes #380