-
Notifications
You must be signed in to change notification settings - Fork 590
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix
qml.center
with linear combinations (#6049)
**Context:** Linear combinations were not taken into account in `qml.center`, making it miss center elements for some inputs. **Description of the Change:** Change the algorithm that computes the center. Kudos to @therooler for the prototype. **Benefits:** Correct code. **Possible Drawbacks:** ~~Slower performance for inputs that would have been fine before anyways.~~ This has been fixed by reverting to the previous implementation if `PauliWord` instances are passed only. **Related GitHub Issues:** Fixes #6048 [sc-70014] --------- Co-authored-by: Thomas R. Bromley <[email protected]> Co-authored-by: Korbinian Kottmann <[email protected]> Co-authored-by: Mudit Pandey <[email protected]>
- Loading branch information
1 parent
3075c02
commit 0ffd5d0
Showing
3 changed files
with
180 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