Remove bit_tools
and replace with QDType
features
#1041
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Replace references to
iter_bits
,iter_bits_twos_complement
, anditer_bits_fixed_point
fromqualtran.cirq_interop.bit_tools
as they are largely duplicated by functionality inQUInt
,QInt
, andQFxp
respectively.Move functionality of
float_as_fixed_width_int
toQFxp.to_fixed_width_int
.Modify
QFxp.to_bits
to enable the exactly-representable check to be bypassed and to enable overriding the twos-complement representation of negative binary fractions used byfxpmath
. Previous users ofiter_bits_fixed_point
instead require sign-magnitude representation.Remove
bit_tools
and move its tests todata_types
.Towards #811. Updates to users of
classical_sim.ints_to_bits
should follow in another PR.