-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deprecate Gateset.accept_global_phase_op (#5239)
Deprecates Gateset.accept_global_phase_op **Breaking Change:** Changes the default value of `Gateset.accept_global_phase_op` from `True` to `False`. I can't think of any way to remove this parameter without eventually needing this breaking change. Currently all gatesets that are created allow global phase gates if they don't specify `accept_global_phase_op=False` explicitly. But the end goal is only to allow global phase gates if they're included in the `gates` list. So at some point in the transition the default behavior needs to break, and I can't think of a way of doing that via deprecation. Therefore I think we may as well do it now via this breaking change. Note that even though it's breaking, it isn't breaking in a bad way. Users who are adding global phase gates to things that suddenly don't accept them will just see an error that the gate is not in the gateset, and then go add it. It's much safer than breaking in the other direction in which we silently start allowing new gate types. Closes #4741 @tanujkhattar
- Loading branch information
Showing
25 changed files
with
215 additions
and
77 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
Oops, something went wrong.