netket.nn.binary_encoding#

netket.nn.binary_encoding(hilbert, x, *, max_bits=None)[source]#

Encodes the array x into a set of binary-encoded variables described by the shape of a Hilbert space. The i-th element of x will be encoded in {code}`ceil(log2(shape[i]))` bits.

Parameters
Return type

Union[ndarray, DeviceArray, Tracer]