-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Calculate complementary polynomial for QSP using flip convolution. #930
Conversation
Co-authored-by: Tanuj Khattar <[email protected]>
There are two small followups I will be adding after this PR is submitted:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Mostly docstring+type-hint nits. Also please fix the rng
comment, best practice is to use np.random.Generator
.
As a note: I ran some checks to see if normalizing P before running the tests on fast_complementary_polynomial would give us more accurate results. From my checks, it performs slightly worse than not being normalized. This tells me that the precision problem is not related to normalization. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@anurudhp @Epsilon1024 Can we merge this and continue improvements in follow-up PRs? Maybe open an issue to track the potential improvements?
@tanujkhattar good to go % hardcoded random seed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Co-authored-by: Anurudh Peduri <[email protected]>
Calculate complementary polynomial using Eq. 60 of the paper