Skip to content

Commit de81618

Browse files
committed
use log from std lib to avoid typecast error
1 parent 3822522 commit de81618

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/isotropic/utils/state_transforms.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ def statevector_to_hypersphere(Phi: Array) -> Array:
2020
Array
2121
hypersphere as a real JAX array of dimension 2^{n+1}
2222
"""
23-
S = jnp.zeros((2 ** (jnp.log2(Phi.shape[0]).astype(int) + 1),), dtype=float)
23+
breakpoint()
24+
S = jnp.zeros(int(2 ** (log(Phi.shape[0], 2) + 1)), dtype=float)
2425
for x in range(S.shape[0] // 2):
2526
S = S.at[2 * x].set(Phi[x].real)
2627
S = S.at[2 * x + 1].set(Phi[x].imag)

0 commit comments

Comments
 (0)