Skip to content

Commit a7797e1

Browse files
committed
updated QuantumFloat to i64
1 parent 70659a1 commit a7797e1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/qrisp/qtypes/quantum_float.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -320,10 +320,10 @@ def decoder(self, i):
320320
else:
321321
return res
322322
else:
323-
from jax.numpy import float32
323+
from jax.numpy import float64
324324
from jax.core import Tracer
325325
if isinstance(i, Tracer):
326-
res = i * float32(2)**self.exponent
326+
res = i * float64(2)**self.exponent
327327
else:
328328
res = i * 2**self.exponent
329329

@@ -335,8 +335,8 @@ def jdecoder(self, i):
335335
return self.decoder(i)
336336

337337
def encoder(self, i):
338-
from jax.numpy import float32
339-
res = signed_int_iso_2(i/(float32(2)**self.exponent), self.size)
338+
from jax.numpy import float64
339+
res = signed_int_iso_2(i/(float64(2)**self.exponent), self.size)
340340
# if self.signed:
341341
# res = signed_int_iso(i/2**self.exponent, self.size-1)
342342
# else:

0 commit comments

Comments
 (0)