-
Notifications
You must be signed in to change notification settings - Fork 34
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
✨ Support for Qiskit's final_layout #592
Merged
Merged
Conversation
This file contains 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
burgholzer
added
enhancement
New feature or request
usability
Anything related to usability
Core
Anything related to the Core library and IR
c++
Anything related to C++ code
python
Anything related to Python code
labels
Apr 19, 2024
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #592 +/- ##
=====================================
Coverage 91.4% 91.4%
=====================================
Files 131 131
Lines 14091 14090 -1
Branches 2249 2249
=====================================
Hits 12885 12885
+ Misses 1206 1205 -1
|
4 tasks
burgholzer
added a commit
that referenced
this pull request
Apr 20, 2024
## Description This PR brings some small improvements to the bindings of the `Control` and `Permutation` classes. In particular, it adds hashing support and as well as equality comparisons. For the `Permutation` class, it also adds an implicit conversion to a Python dictionary and fixes the Python stubs to include the constructor of the class. This was inspired by #592 and helps to simplify some of the tests there. ## Checklist: <!--- This checklist serves as a reminder of a couple of things that ensure your pull request will be merged swiftly. --> - [x] The pull request only contains commits that are related to it. - [x] I have added appropriate tests and documentation. - [x] I have made sure that all CI jobs on GitHub pass. - [x] The pull request introduces no new warnings and follows the project's style guidelines. --------- Signed-off-by: burgholzer <burgholzer@me.com>
burgholzer
force-pushed
the
support-qiskit-final-layout
branch
from
April 20, 2024 15:41
7b3c660
to
a4ad814
Compare
… matches new logical qubit index
Signed-off-by: burgholzer <burgholzer@me.com>
Signed-off-by: burgholzer <burgholzer@me.com>
Signed-off-by: burgholzer <burgholzer@me.com>
burgholzer
force-pushed
the
support-qiskit-final-layout
branch
from
April 20, 2024 15:43
a4ad814
to
fe401eb
Compare
burgholzer
approved these changes
Apr 20, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many thanks for this contribution. Nicely done! 🎉
I just rebased the PR on the current main branch and simplified some of the checks a little bit.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
c++
Anything related to C++ code
Core
Anything related to the Core library and IR
enhancement
New feature or request
python
Anything related to Python code
usability
Anything related to usability
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 adds support for Qiskit's
final_layout
attribute when importing circuits from Qiskit. It interprets theoutput_permutation
of an MQTQuantumComputation
object based on Qiskit'sfinal_index_layout()
, which maps the original input circuit's qubit indices to the final physical qubit indices after routing. This mapping is the result of applyingrouting_permutation()
to theinitial_layout
. Additionally, it fixes the interpretation of the output_permutation ininitializeIOMapping()
to align with Qiskit's final_layout.Fixes #439
Checklist: