forked from Qiskit/qiskit
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Start making the BasisTranslator Target/BackendV2 aware
In Qiskit#5885 we added the next version of the abstract Backend interface BackendV2 which added the concept of a Target which represents a compiler target for the transpiler. It contains all the information about the constraints of a backend for the compiler to use and replaces the combination of basis_gates, coupling_map, etc and expands the representation to model more complex devices. However, in Qiskit#5885 we only introduced the interface and didn't modify the transpiler to use the Target natively or any of the extra information it contains. This commit is the start of the process of updated the transpiler to work with a target natively. To start if a backend has a target that is now passed through from transpile to the passmanager_config so we can start passing it directly to passes as we enable it. Then the basis translator is updated to work natively with a target instead of the basis gates list it used before. In addition to using a target directly support is added for heterogeneous gate sets so that target instructions can work on only a subset of qargs. Building off this in the future There are additional features in target that we might want to expand support for in the BasisTranslator in the future, such as supporting custom variants of the same gate, or handling fixed angle rotation gate variants, etc.
- Loading branch information
Showing
12 changed files
with
806 additions
and
29 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
Oops, something went wrong.