-
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.
Add efficient gate power methods (#9318)
* add efficient gate power methods * fix imports * override some more methods * use scipy.linalg.fractional_matrix_power * use assertIsInstance and add isinstance check * lint Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
- Loading branch information
1 parent
c343042
commit d3243e9
Showing
18 changed files
with
231 additions
and
38 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
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
25 changes: 25 additions & 0 deletions
25
releasenotes/notes/efficient-gate-power-effa21e3ee4581ee.yaml
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,25 @@ | ||
--- | ||
features: | ||
- | | ||
Overrides some gate power methods to make them more efficient and less lossy: | ||
- Powering a :class:`~.CPhaseGate` gives a :class:`~.CPhaseGate`. | ||
- Powering a :class:`~.CSGate` gives a :class:`~.CPhaseGate`. | ||
- Powering a :class:`~.CSdgGate` gives a :class:`~.CPhaseGate`. | ||
- Powering an :class:`~.IGate` gives an :class:`~.IGate`. | ||
- Powering a :class:`~.PhaseGate` gives a :class:`~.PhaseGate`. | ||
- Powering an :class:`~.RGate` gives an :class:`~.RGate`. | ||
- Powering an :class:`~.RXGate` gives an :class:`~.RXGate`. | ||
- Powering an :class:`~.RXXGate` gives an :class:`~.RXXGate`. | ||
- Powering an :class:`~.RYGate` gives an :class:`~.RYGate`. | ||
- Powering an :class:`~.RYYGate` gives an :class:`~.RYYGate`. | ||
- Powering an :class:`~.RZGate` gives an :class:`~.RZGate`. | ||
- Powering an :class:`~.RZXGate` gives an :class:`~.RZXGate`. | ||
- Powering an :class:`~.RZZGate` gives an :class:`~.RZZGate`. | ||
- Powering a :class:`~.SdgGate` gives a :class:`~.PhaseGate`. | ||
- Powering an :class:`~.SGate` gives a :class:`~.PhaseGate`. | ||
- Powering a :class:`~.TdgGate` gives a :class:`~.PhaseGate`. | ||
- Powering a :class:`~.TGate` gives a :class:`~.PhaseGate`. | ||
- Powering an :class:`~.XXMinusYYGate` gives an :class:`~.XXMinusYYGate`. | ||
- Powering an :class:`~.XXPlusYYGate` gives an :class:`~.XXPlusYYGate`. | ||
- Powering a :class:`~.ZGate` gives a :class:`~.PhaseGate`. | ||
- Powering an :class:`~.iSwapGate` gives an :class:`~.XXPlusYYGate`. |
Oops, something went wrong.