-
Notifications
You must be signed in to change notification settings - Fork 88
Open
Labels
Milestone
Description
Current Implementation
With #1204, #1215, the classical simulator uses raw integers as classical values of QFxp registers. These can be obtained from floating point values using QFxp.to_fixed_width_int, and converted back using QFxp.float_from_fixed_width_int.
Potential Alternatives
- fxpmath: A new library for representing fixed-width floating points, with arithmetic and numpy NDArray support. For the moment this is quite unstable, e.g., see Vectorized variants of
to_bitsandfrom_bits#1142. - Use a lightweight wrapper (say
FxpValue) around ints to make debugging and type-checking easier.