-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
♻️🐛 Refactor
qc::Permutation
and fix corner case in Qiskit layout i…
…mport (#858) ## Description This PR refactors the `qc::Permutation` class to not subclass from `std::map`. This has caused more harm than good, especially in the Python bindings, where pybind automatically binds some of the `std::map` members and then won't accept them being called on a `Permutation` object. This creates quite a bit of boilerplate code for exposing the `map` interface in the permutation class, but has no other major influence (except that the Python bindings now work properly). Additionally, this fixes an error related to the layout import from Qiskit related to Qiskit/qiskit#12749. It turns out that calling the public API of the `TranspileLayout` may throw errors if the `final_layout` is `None`. Last, but not least, this PR adds a warnings ignore filter for a nonsense GCC warning, which should make the build log warning free again. ## Checklist: - [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
- Loading branch information
Showing
7 changed files
with
192 additions
and
36 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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