This is a Qutip code on Bose-Hubbard model. The inbuilt qutip function "sesolve()" executes correctly when nmax = 2 (nmax = max no.of bosons per site) but the Jupy