-
Notifications
You must be signed in to change notification settings - Fork 53
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 LinearCombination
block encoding
#1133
Conversation
Phase(be, phi=1, eps=0) if l < 0 else be | ||
for l, be in zip(self._lambd, self._block_encodings) |
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.
is this right? we ignore be
if its coefficient is less than zero?
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.
Sorry, what do you mean here? If the coefficient is less than zero we use Phase(be, phi=1, eps=0)
which negates be
, otherwise we use be
unmodified.
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.
doh I didn't see that be
is being passed to Phase
. I thought you were just emitting a GlobalPhase
operation and ignoring that entry
What's the use case of the user providing their own select and prepare? |
The use case would be in case the user has more optimized oracles on hand. I think this is something @tanujkhattar mentioned as being useful. |
Add an instance of
BlockEncoding
that builds a block encoding of the linear combination of itsconstituent block encodings, given a list of coefficients.