Error when using Pauli string operator
Created by: thorben-frank
Hey guys, just seen that you released a beta version of netket3. I skimmed over the documentation and ran a first few test and it looks super cool and runs very fast. Awesome work!
However, when I am trying to use the PauliString operator I get the following error:
My code looks the following:
import netket as nk
import numpy as np
import json
import time
ha = nk.operator.PauliStrings(operators=['XX','ZZ'], weights=[1,3])
hi = ha.hilbert
ma = nk.models.RBM(alpha=1)
sa = nk.sampler.MetropolisHamiltonian(hilbert=hi, hamiltonian=ha)
op = nk.optimizer.Sgd(learning_rate=0.01)
vs = nk.variational.MCState(sa, ma, n_samples=1000)
sr = nk.optimizer.SR(diag_shift=.1)
gs = nk.VMC(hamiltonian=ha,optimizer=op,sr=sr,variational_state=vs)
gs.run(n_iter=250)
Best Thorben