这是Bose-Hubbard模型上的Qutip代码。 当nmax = 2(nmax =每个位点的最大玻色子数)时,内置的qutip函数“ sesolve()”可以正确执行,但是当执行nmax = 3时,Jupyter内核将死亡。我不知道这是一个错误还是我错过了什么?
from qutip import *
import matplotlib.pyplot as plt
import numpy as np
nmax = 3 #Max boson number per site + 1
n1 = 1 #Boson number at site 1
n2 = 0 #Boson number at site 2
j = 1
mu = 60
u = 10
a1 = destroy(nmax) #Here nmax mentions the dim of matrix
a2 = destroy(nmax)
g1 = tensor(a1.dag(),a2) + tensor(a2.dag(),a1)
q1 = a1.dag()*a1
q2 = a2.dag()*a2
g2 = tensor(q1,qeye(nmax)) + tensor(qeye(nmax),q2)
b1 = a1.dag()*a1*(a1.dag()*a1-1)
b2 = a2.dag()*a2*(a2.dag()*a2-1)
g3 = tensor(b1,qeye(nmax)) + tensor(qeye(nmax),b2)
H = j*g1 + mu*g2 + u*g3
psi0 = tensor(basis(nmax,n1),basis(nmax,n2))
tlist = np.linspace(0.0, 10.0, 200)
result = sesolve(H,psi0,tlist,[sigmap()]) #<-----This is where Im getting the problem as I
#initialized nmax to 3