-
Notifications
You must be signed in to change notification settings - Fork 35
🐛 Miscellaneous fixes for qubit and register handling #476
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
Conversation
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
registers should appear in the correct order now when a circuit is exported to QASM Signed-off-by: burgholzer <[email protected]>
it reset the number of ancillaries but did not increase the number of qubits Signed-off-by: burgholzer <[email protected]>
circuits should be printed as is; otherwise, there is a certain confusion between the initial layout that is being printed and the actual circuit. Signed-off-by: burgholzer <[email protected]>
first removes the qubit and then adds it back as an ancillary qubit. Signed-off-by: burgholzer <[email protected]>
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #476 +/- ##
=======================================
- Coverage 90.1% 90.0% -0.1%
=======================================
Files 110 110
Lines 11785 11785
Branches 2056 2057 +1
=======================================
- Hits 10620 10617 -3
- Misses 1165 1168 +3
|
…t contains multiple single-qubit registers Signed-off-by: burgholzer <[email protected]>
This reverts commit 103527b.
Signed-off-by: burgholzer <[email protected]>
Signed-off-by: burgholzer <[email protected]>
Signed-off-by: burgholzer <[email protected]>
Cpp-Linter Report ✔️No problems need attention. Have any feedback or feature suggestions? Share it here. |
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.
Description
This PR brings some improvements and fixes to the handling of qubits and registers in MQT Core.
First of all, it fixes the routine that marks qubits as ancillaries so that qubits are really properly transformed from regular qubits in a regular register to ancillary qubits in an ancillary register.
Second, it improves the stability of the QASM dump by making sure that the registers are dumped in the proper order that they were declared in.
Lastly, it fixes an oversight in the routine for unifying registers that effectively erased any ancillary qubits from the qubit count.
Checklist: