netket.nn.to_array(hilbert, apply_fun, variables, *, normalize=True, allgather=True, chunk_size=None)[source]#
Computes apply_fun(variables, states) on all states of hilbert and returns

the results as a vector.

  • normalize (bool) – If True, the vector is normalized to have L2-norm 1.

  • allgather (bool) – If True, the final wave function is stored in full at all MPI ranks.

  • chunk_size (Optional[int]) – Optional integer to specify the largest chunks of samples that the model will be evaluated upon. By default it is None, and when specified samples are split into chunks of at most chunk_size.

  • hilbert (DiscreteHilbert) –

  • apply_fun (Callable[[Any, Union[ndarray, Array]], Union[ndarray, Array]]) –

  • variables (Any) –

Return type:

Union[ndarray, Array]