Dear all, I want to use kwant to calculate the local densities and currents, but I do not understand some of the code lines. For the local density of states, we can obtain it from: wf = kwant.wave_function(sys, energy) LDOS=((abs(wf(0))**2).sum(axis=0)+(abs(wf(1))**2).sum(axis=0))/(pi*2.) here wf(0) and wf(1) is the wavefunction for the left and right leads of a two terminal system. In Tutorial 2.7, we use wf = kwant.wave_function(syst, energy=-1, params=params) psi = wf(0)[0] Here wf(0)[0] includes all the leads and modes?
In Tutorial 2.7, we use the following lines to calculate the local density: up, down = psi[::2], psi[1::2] density = np.abs(up)**2 + np.abs(down)**2 rho = kwant.operator.Density(syst) density = rho(psi) Will the two density give the same results as LDOS? Thanks in advance! Hosein Khani
