Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow on_each for multi-qubit gates (#4281)
Adds on_each support to the SupportsOnEachGate mixin for multi-qubit gates. The handling here is not as flexible as for single-qubit gates, which allows any tree of gates and applies them depth-first. This allows the following two options for multi-qubit gates: ``` A: varargs form gate.on_each([q1, q2], [q3, q4]) B: explicit form gate.on_each([[q1, q2], [q3, q4]]) ``` Discussion here, #4034 (comment). Part of #4236.
- Loading branch information
Showing
4 changed files
with
237 additions
and
14 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