-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make VF2Layout pass Target aware (#7735)
* Make VF2Layout pass Target aware This commit updates the VF2Layout pass to be target aware. It adds a new kwarg for specifying a target and if it's specified that target object is used to define the parameters for finding the isomorphic mapping used for the layout. However, with this commit the extra information contained in the target isn't really leveraged yet and just the global coupling graph and measurement error rates are pulled from the target just as in the BackendV1 case. This commit is mostly to facilitate future expansion where we will improve the layout scoring heuristic used and having the full set of data available in the target will be useful. Part of #7113 * Don't raise in __init__ with no coupling map * Add release note * Apply suggestions from code review Co-authored-by: Jake Lishman <jake@binhbar.com> * Fix test to make it clear it's using target graph and not the coupling map * Handle edge case where target doesn't have measurement defined This commit fixes an edge case in the heurstic scoring where if a target is present but doesn't have measurement defined we always return a score of 0. In the case measure ment doesn't have measurement defined this will fall back to looking at the degree of the qubit instead of trying to use the readout error rate. * Update qiskit/transpiler/passes/layout/vf2_layout.py Co-authored-by: Luciano Bello <bel@zurich.ibm.com> * Simplify heuristic scoring logic Co-authored-by: Luciano Bello <bel@zurich.ibm.com> * Fix lint Co-authored-by: Jake Lishman <jake@binhbar.com> Co-authored-by: Luciano Bello <bel@zurich.ibm.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
- Loading branch information
1 parent
5ed5db9
commit eb333de
Showing
6 changed files
with
82 additions
and
20 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
features: | ||
- | | ||
The :class:`~.VF2Layout` transpiler pass has a new keyword argument, | ||
``target`` which is used to provide a :class:`~.Target` object for | ||
the pass. When specified, the :class:`~.Target` will be used by the | ||
pass for all information about the target device. If it is specified, | ||
the ``target`` option will take priority over the ``coupling_map`` and | ||
``properties`` arguments. |
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