ed, U = -0.5, 2.0 ek = { 0.6, 1.0, 1.4} -- energies of the bath poles Vk = { 0.2, 0.3, 0.2} -- hybridisation strength of each pole -- the orbital alone, mode 0 spin down and mode 1 spin up NF = 2 Hsys = ed * (NewOperator(NF,0,{{0,-0,1}}) + NewOperator(NF,0,{{1,-1,1}})) + U * NewOperator(NF,0,{{0,-0,1}}) * NewOperator(NF,0,{{1,-1,1}}) psi = NewWavefunction(NF,0,{{"01",1}}) -- one electron, spin up Cr = {NewOperator(NF,0,{{0,1}}), NewOperator(NF,0,{{1,1}})} -- Delta(w) = sum_k Vk^2 / (w - ek), the same for both spins, coupled through the -- annihilation operators: an electron of the orbital moves into the empty band W = {} for k = 1, 3 do W[k] = Matrix.New({{Vk[k]^2, 0}, {0, Vk[k]^2}}) end Delta = ResponseFunction.New({{Matrix.Zero(2), ek[1], ek[2], ek[3]}, W, mu = 0, type = "ListOfPoles"}) Hybridisation = {{Delta, {NewOperator(NF,0,{{-0,1}}), NewOperator(NF,0,{{-1,1}})}}} Opt = {{"Tensor",true},{"Emin",-1},{"Emax",5},{"NE",600},{"Method","Lanczos"}} S, G = CreateSpectra(Hsys, Cr, psi, Hybridisation, Opt) OptM = {{"Tensor",true},{"Emin",-1},{"Emax",5},{"NE",600},{"Method","Mesh"}} SM, GM = CreateSpectra(Hsys, Cr, psi, Hybridisation, OptM) -- the same with the band as modes 2 .. 7 (2k spin down, 2k+1 spin up), empty to start -- with and restricted to at most one electron NFb = 8 Hb = ed * (NewOperator(NFb,0,{{0,-0,1}}) + NewOperator(NFb,0,{{1,-1,1}})) + U * NewOperator(NFb,0,{{0,-0,1}}) * NewOperator(NFb,0,{{1,-1,1}}) for k = 1, 3 do for s = 0, 1 do local b = 2*k + s Hb = Hb + ek[k] * NewOperator(NFb,0,{{b,-b,1}}) + Vk[k] * (NewOperator(NFb,0,{{b,-s,1}}) + NewOperator(NFb,0,{{s,-b,1}})) end end psib = NewWavefunction(NFb,0,{{"01000000",1}}) Crb = {NewOperator(NFb,0,{{0,1}}), NewOperator(NFb,0,{{1,1}})} Sb, Gb = CreateSpectra(Hb, Crb, psib, {{"Tensor",true},{"Emin",-1},{"Emax",5},{"NE",600}, {"Restrictions",{NFb,0,{"00111111",0,1}}}}) print(" omega explicit bath hybridisation on the mesh") for w = 0, 4, 0.5 do print(string.format(" %5.2f %12.6f %14.6f %12.6f", w, -Complex.Im(Gb(w,0.1)[1][1])/Pi, -Complex.Im(G(w,0.1)[1][1])/Pi, -Complex.Im(GM(w,0.1)[1][1])/Pi)) end