Hello Kwantoptians,

 

I have a question regarding the speed/stability of computing the retarded Green’s function of a transport setup using Kwant.

 

In the Kwant source-code [1] it is noted that using `kwant.greens_function` is “often slower and less stable than the scattering matrix calculation”. I was wondering if you could provide me with some references for this assertion.

 

I have perused the Kwant paper [2] and (part I of) the thesis of Michael Wimmer [3] and cannot find any mention of a speed/stability comparison of the algorithm implemented by `kwant.greens_function` vs `kwant.smatrix`.

 

My understanding is that in both cases a linear system (LHS) is constructed and solved for different right hand-sides (RHS) using out of the box linear solvers. The solution for each RHS corresponds to one column of the retarded Green’s function / extended scattering matrix respectively. The difference between `kwant.greens_function` and `kwant.smatrix` is then the following. In the former case the leads are taken into account by added the retarded self-energy to the LHS and the RHSs are indicator vectors for the sites of the lead/scattering region interface,  which corresponds to a “unit impulse” boundary condition. In the latter case the linear system is “extended” so as to include extra unknowns that correspond to the scattering amplitudes, and the RHSs are indicator vectors with the 1’s in this “extended” part, which corresponds to a “single incoming mode” boundary condition.

 

It seems to me that the salient difference is in the boundary conditions, and I do not have a good intuition as to why one set of boundary conditions would make the linear system easier/harder to solve.

 

Happy Kwanting!

 

Joe

 

[1]: https://gitlab.kwant-project.org/kwant/kwant/-/blob/master/kwant/solvers/common.py#L428

[2]: https://iopscience.iop.org/article/10.1088/1367-2630/16/6/063065/pdf

[3]: https://epub.uni-regensburg.de/12142/