forked from Qiskit/qiskit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add full path transpile() support for disjoint backends (Qiskit#9840)
* Add full path transpile() support for disjoint backends This commit finalizes the last piece of the full path transpile() support at all optimization levels. The primary piece to accomplish this was adding DenseLayout support for targeting a disjoint CouplingMap. With this piece added then all the default transpiler paths in the preset pass managers are able to support running with a disjoint CouplingMap. The biggest exception is the TrivialLayout pass which can result in an invalid layout being selected (where 2q connectivity crosses connected components). To handle this edge case a check is added to each routing stage to ensure the selected layout is valid for the coupling map and it is routable. This enables all the default paths at all 4 optimization levels for transpile() to be usable with disjoint connectivity. For optimization_level=0/TrivialLayout if the trivial layout is invalid the routing pass will raise an error saying as much. It's worth pointing out that NoiseAdaptiveLayout still doesn't support disjoint connectivity. However, since it's performance is poor and it's not used by default in any preset passmanager we can add this at a later date, but all other combinations of layout and routing methods should work (given the caveats with TrivialLayout) above. * Fix test determinism * Add future facing test for shared classical bits between components * Enable shared control flow test Now that Qiskit#9802 supports shared classical bits correctly this commit re-enables the tests disabled in the previous commit. * Remove unused condition for faulty qubits backnedv1 path * Remove opt level 1 variant of test_chained_data_dependency * Use enumerate() in check_layout_isolated_to_component() Co-authored-by: Kevin Hartman <kevin@hart.mn> * Expand level 0 test coverage * Update test/python/compiler/test_transpiler.py Co-authored-by: Kevin Hartman <kevin@hart.mn> * s/check_layout_isolated_to_component/require_layout_isolated_to_component/g --------- Co-authored-by: Kevin Hartman <kevin@hart.mn>
- Loading branch information
1 parent
cc3ae0b
commit dc280c8
Showing
10 changed files
with
363 additions
and
58 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
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
Oops, something went wrong.