Improvements: docstrings and netket.hilbert.random docstrings
Created by: PhilipVinc
Now, if you implement a new Hilbert space but not the methods for sampling you get:
raise NotImplementedError(
NotImplementedError:
random_state_batch(hilb, key, size, dtype) is not implemented
for hilbert space of type <class 'netket.hilbert.spin.Spin'>.
See the documentation of
nk.hilbert.random.register_random_state_impl.
pointing you to the right direction on what to do.
Also, now repr for states is better:
>>> gs.state
MCState(
hilbert = Spin(s=1/2, N=20),
sampler = MetropolisSampler(rule = LocalRule(), n_chains = 16, machine_power = 2, n_sweeps = 20, dtype = <class 'numpy.float32'>),
n_samples = 1008,
n_discard = 50,
sampler_state = MetropolisSamplerState(# accepted = 7697/36160 (21.28595132743363%), rng state=[2722596017 821647436]),
n_parameters = 440)