-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Follow-up on routing commuting 2q gates (#7979)
* * Renamed directory. * * Typo. * * Commuting2qBlocks name * * logical -> virtual. * * from_line in the example. * * Reno name fix. * * Reno rewording. * * removed unnecessary line in example. * * Black. * * Started designing test on non-line graph. * * Added test on a T device. * * Renamed Communting2qBlocks to Commuting2qBlock * * Made test robust to arbitraryness of commuting gate order. * Added test. * * Added test and black. * * Fix missing gate test exception refactor. * * Bug fix with test. * * Removed SwapStrategy from the passes init. * * black
- Loading branch information
Showing
11 changed files
with
210 additions
and
39 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
File renamed without changes.
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
File renamed without changes.
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 |
---|---|---|
@@ -1,11 +1,12 @@ | ||
--- | ||
features: | ||
- | | ||
New transpiler passes have been added. The transpiler pass :class:`.SwapStrategyRouter` | ||
New transpiler passes have been added. The transpiler pass :class:`.Commuting2qGateRouter` | ||
uses swap strategies to route a block of commuting gates to the coupling map. Indeed, routing | ||
is a hard problem but is significantly easier when the gates commute. This is often found in | ||
variational algorithms such as QAOA. Such cases can be dealt with using swap strategies that | ||
apply a predefined set of layers of SWAP gates. Furthermore, the new transpiler pass | ||
:class:`.FindCommutingPauliEvolutions` identifies blocks of Pauli evolutions made of commuting | ||
two-qubit terms. Here, a swap strategy is specified by the class :class:`.SwapStrategy`. Swap | ||
strategies need to be tailored to the coupling map and, ideally, the circuit for the best results. | ||
is a hard problem but is significantly easier when the gates commute as in CZ networks. | ||
Blocks of commuting gates are also typically found in QAOA. Such cases can be dealt with | ||
using swap strategies that apply a predefined set of layers of SWAP gates. Furthermore, the new | ||
transpiler pass :class:`.FindCommutingPauliEvolutions` identifies blocks of Pauli evolutions | ||
made of commuting two-qubit terms. Here, a swap strategy is specified by the class | ||
:class:`.SwapStrategy`. Swap strategies need to be tailored to the coupling map and, ideally, | ||
the circuit for the best results. |
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.