Skip to content

Commit fa5a8ec

Browse files
authored
[Rotation Synthesis] Replace np.float128 with np.longdouble (#1753)
np.float128 isn't supported on some platforms (such as mine). I think np.longdouble is the recommended alternative? Let me know if you think this would cause other problems.
1 parent 518614f commit fa5a8ec

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

qualtran/rotation_synthesis/lattice/geometry.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def from_bounds(start, end) -> "Range":
4545
elif all(rst.is_int(x) for x in sides):
4646
dtype = int
4747
elif any(isinstance(x, np.number) for x in sides):
48-
dtype = np.float128
48+
dtype = np.longdouble
4949
else:
5050
dtype = float
5151
return Range(*map(dtype, sides))

qualtran/rotation_synthesis/math_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def arccos(self, x: Real) -> Real:
9696
np.arctan2,
9797
np.arcsin,
9898
np.arccos,
99-
np.float128,
99+
np.longdouble,
100100
)
101101

102102

0 commit comments

Comments
 (0)