OverflowError when using random_state with Fock space
Created by: femtobit
This produces an OverflowError
on my system:
import netket as nk
hi = nk.hilbert.Fock(N=1)
print(hi) # Fock(n_max=INT_MAX, N=1)
rng = nk.jax.PRNGSeq(0)
hi.random_state(next(seq))
OverflowError: Python int 9223372036854775808 too large to convert to int64
Note that 9223372036854775808
is hi.n_max + 1
so it appears to be an off-by-one error somewhere.