-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replaced custom ApplyAndAssuming0Target with AND from std (#2123)
We used to have custom implementation for AND before we added it to the standard library. Now that we have it in std, this PR removes custom ApplyAndAssuming0Target and replaces it with AND. This standard implementation is via PhaseCCX, and has the same T-count of 4, T-depth of 2, but uses fewer gates overall. Previous custom implementation: ![Screenshot 2025-01-23 124923](https://github.com/user-attachments/assets/4e480670-40f2-4d50-af4e-0d6ec2fb4797) Implementation from the standard library: ![Screenshot 2025-01-23 124952](https://github.com/user-attachments/assets/d4c6a90d-95f1-4d17-a7ea-fb08d3dbacef) This new implementation results in different sequence of gates in Shor's sample, which, in turn, changes its behavior on the specific test we have for it. As randomness is removed from tests, that scenario results in guessing factorization, which isn't great. So this PR changes the default sample for Shor. Co-authored-by: Dmitry Vasilevsky <[email protected]>
- Loading branch information
1 parent
6d83547
commit 3ff4980
Showing
5 changed files
with
38 additions
and
107 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