Dear ALPS users,
I am trying to run a very simple worm simulation with
disorder (site-dependent 'mu') for the Bose-Hubbard
model using a Python script. If I simply translate a
working parameter file (obtained from the ALPS website)
into the below Python code, 'random()' is unrecognized
(which is not so for the parameter file where the
simulation goes through).
But if I include 'import random' at the beginning of the
Python script then the simulation does go through but a
different model gets simulated (i.e. a random 'mu' but
equal for all sites).
I was wondering, should not the below Python script
translated directly from a similar working parameter
file run as is for the desired model?
<SNIP>
import pyalps
import matplotlib.pyplot as plt
import pyalps.plot
#prepare the input parameters
parms = []
for DISORDERSEED in [34275, 49802, 82529]:
parms.append(
{
'LATTICE' : "inhomogeneous square
lattice periodic",
'MODEL' : "boson Hubbard",
'T' : 0.1,
'L' : 4 ,
't' : 1.0 ,
'DISORDERSEED' : DISORDERSEED,
'mu' : 5.0*2*(random()-0.5),
'U' : 1.0 ,
'NONLOCAL' : 0 ,
'Nmax' : 2 ,
'THERMALIZATION' : 100,
'SWEEPS' : 5000
}
)
<SNIP>
Thanks,
Vipin