
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

HI Hosein,
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.
No. 'wf(0)' is a *sequence of wavefunctions of scattering states*, each one defined over the scattering region (the system to which you attached the leads). Each of the scattering wavefunctions is associated with a single incoming mode from lead 0. 'wf(1)' is the same quantity, but referring to the incoming modes from lead 1.
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?
No. As we saw in my previous response 'wf(0)' is a sequence of scattering wavefunctions. 'wf(0)[0]' is therefore the first wavefunction in this sequence, which corresponds to the scattering state incoming in mode 0 of lead 0.
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?
No; the "density" being referred to above is one associated with a *single* scattering state. The LDOS that Kwant defines is the sum of the densities of all the scattering states (at a given energy). Happy Kwanting, Joe

Dear Joe, Thanks a lot for clarifying these points for me. So the local densities and local currents in Tutorial 2.7 correspond to the scattering state incoming in mode 0 of lead 0. I still feel confused. Why we only consider a *single* scattering state from one lead? Can the local densities and currents associated with a *single* scattering state show the transport properties of the system? Could you give me some reference papers for local densities and currents? Best wishes, Hosein Khani On Tue, Jul 4, 2017 at 4:17 PM, Joseph Weston <joseph.weston08@gmail.com> wrote:
HI Hosein,
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.
No. 'wf(0)' is a *sequence of wavefunctions of scattering states*, each one defined over the scattering region (the system to which you attached the leads). Each of the scattering wavefunctions is associated with a single incoming mode from lead 0. 'wf(1)' is the same quantity, but referring to the incoming modes from lead 1.
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?
No. As we saw in my previous response 'wf(0)' is a sequence of scattering wavefunctions. 'wf(0)[0]' is therefore the first wavefunction in this sequence, which corresponds to the scattering state incoming in mode 0 of lead 0.
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?
No; the "density" being referred to above is one associated with a *single* scattering state. The LDOS that Kwant defines is the sum of the densities of all the scattering states (at a given energy).
Happy Kwanting,
Joe

Dear Joe, Thanks a lot for clarifying these points for me. So the local densities and local currents in Tutorial 2.7 correspond to the scattering state incoming in mode 0 of lead 0.
I still feel confused. Why we only consider a *single* scattering state from one lead?
Because you want to gain more insight about where different contributions come from? Sure the LDOS is the thing that you can probe experimentally, but the big advantage of doing numerics is to gain insight *beyond* that. The tutorial example just uses a single scattering state to illustrate the use of the 'operator' module without the extra clutter of summing over the scattering states.
Can the local densities and currents associated with a *single* scattering state show the transport properties of the system?
Not necessarily, but as I said previously it is useful to be able to go beyond what is experimentally measureable in order to gain more insight. Happy Kwanting, Joe
participants (2)
-
Joseph Weston
-
Khani Hosein