H = Matrix.ToOperator( Matrix.Diagonal({1,2,3,4,5}) ) psi = NewWavefunction(5,0,{{"00000",1}}) T = {} for i=0,4 do T[i+1] = NewOperator(5,0,{{i,1}}) end S, G = CreateSpectra(H,T,psi,{{"Tensor",true}}) omega = 1.1 gamma = 0.01 print(G(omega,gamma))