-
Notifications
You must be signed in to change notification settings - Fork 51
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
Fix dtypes in IntVector and PlusEqualsProduct #1197
Conversation
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'm surprised this does not raise an error because the call site in the decomposition of QFTPhaseGradient
is passing in a register of type QFxp
and would need to be updated to include a cast; at the very least.
It's maybe best to open an issue to track the changes needed at the call site and merge this change so we don't go down the rabbit hole. This is a positive improvement so LGTM
I think it's because it uses a cirq style decomp which may not be respecting the dtypes? Qualtran/qualtran/bloqs/qft/qft_phase_gradient.py Lines 82 to 97 in 174b549
|
I'd be very surprised if that's the root cause.
Can you add a test for cc @fdmalone Are data type verification checks turned on by default? Do you know what may be going on here? |
@tanujkhattar The type checking will only raise an error if things are grossly wrong. By default it's set to LOOSE (which allows a limited set of conversions without a cast from wholly fractional / wholly integer fxps to uints, is that the case here?) |
(part of #1142)