Page 1 of 1

HofstadterBosons Params Settings

Posted: 15 Apr 2021, 04:10
by An0123
Hi :
I want to calculate a problem of Hofstadter model, of which the tunneling term Jx is different in different sites.so i set Jx to be an array. for example:

Code: Select all

Lx = 6
Ly = 1
Nmax = 2
t = np.array([1,1.5,1,1.5,1])
Jy = np.array([0])
U = 0
parms1 = dict(bc_MPS='finite',filling=(1,1),Lx=Lx,Ly=Ly,Nmax=Nmax,Jx=t,Jy=Jy,U=U,verbose=False)
M = HofstadterBosons(parms1)
but a value error: ValueError: don't know how to cast `a` to required dimensions. emerge. I check the .add_coupling method, parameter J in add_coupling can be an array, and the an array of t in BoseHubbardModel works too. So what should i do to solve the problem?