Fix dtypes in IntVector and PlusEqualsProduct#1197
Conversation
tanujkhattar
left a comment
There was a problem hiding this comment.
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)