-
Notifications
You must be signed in to change notification settings - Fork 54
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
Add ArcSin
bloq
#1188
Add ArcSin
bloq
#1188
Conversation
|
||
|
||
@frozen | ||
class ArcSin(Bloq): |
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.
I'd suggest we also override on_classical_vals
and my_tensors
to support simulations. The only protocol left would then be the decomposition; which can be added at a later point in time.
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.
Happy to, but question: I saw this comment which suggested that classical values for QFxp
are not correctly propagated through bloqs.
Is that something to watch out for?
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.
There's ongoing work to fix this, see #1142
You can look at implementation of AddScaledValIntoPhaseReg
to see how to implement the simulation protocols for bloqs expecting QFxp
to the best of the ability of the infrastructure we have right now.
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.
I added on_classical_vals
and tests for it.
I'd like to add my_tensors
in a follow-up PR given its increased complexity.
The deccomposition of this bloq is quite tricky (polynomial interpolation followed by some arithmetic and square roots), but for now we start with its Toffoli count as derived from the referenced paper.