- class netket.hilbert.random.flip_state[source]#
Given a state σ and an index i, randomly flips σ[i] so that σ_new[i] ≢ σ[i].
Also accepts batched inputs, where state is a batch and indices is a vector of ints.
a state or batch of states, with one site flipped old_vals: a scalar (or vector) of the old values at the flipped sites
- Return type: