HofstadterBosons Params Settings

How do I use this algorithm? What does that parameter do?
Post Reply
An0123
Posts: 1
Joined: 12 Mar 2021, 02:56

HofstadterBosons Params Settings

Post 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:

Python: 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?
Post Reply