
Hello again, I Noticed a couple of minor mistakes in my previous email: 1. I used the term "out of the box" linear solvers, when I meant "black box" linear solvers. By this I meant that we are not tailoring the algorithm used for solving the linear system based on the properties of the LHS (e.g. as we do in RGF by the choice of scattering region slices), but rather trusting that the applied mathematicians have done their job properly, and any incidental structure in the LHS is found "automatically" by the solver. 2. I claimed that the RHSs for the scattering problem were "indicator vectors with 1s in [the] extended part". This is not true, however the interpretation of the RHS as a "single incoming mode" is correct AFAIK. Happy Kwanting, Joe From: Kwant-discuss <kwant-discuss-bounces@kwant-project.org> On Behalf Of Joseph Weston (Aquent LLC - Canada) Sent: Wednesday, March 18, 2020 12:08 PM To: kwant-discuss@kwant-project.org Subject: [EXTERNAL] [Kwant] Stability of the retarded Green's function calculation 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<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.kwant-project.org%2Fkwant%2Fkwant%2F-%2Fblob%2Fmaster%2Fkwant%2Fsolvers%2Fcommon.py%23L428&data=02%7C01%7Cv-josewe%40microsoft.com%7Cccd4df85ea5a44fb98e508d7cb6fbfa3%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637201553194781503&sdata=jNV1lZwk4xs%2BfX25KOuP0Z992wS3as9Uribwou1P1rk%3D&reserved=0> [2]: https://iopscience.iop.org/article/10.1088/1367-2630/16/6/063065/pdf<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fiopscience.iop.org%2Farticle%2F10.1088%2F1367-2630%2F16%2F6%2F063065%2Fpdf&data=02%7C01%7Cv-josewe%40microsoft.com%7Cccd4df85ea5a44fb98e508d7cb6fbfa3%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637201553194791491&sdata=5ltAdppLxjv%2BAf6fHEb4xTlSrZ%2FcGNY1jPFwnWO932s%3D&reserved=0> [3]: https://epub.uni-regensburg.de/12142/<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fepub.uni-regensburg.de%2F12142%2F&data=02%7C01%7Cv-josewe%40microsoft.com%7Cccd4df85ea5a44fb98e508d7cb6fbfa3%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637201553194791491&sdata=B1HTfGTAeQqmX%2BuLFsgxrGdtMYMij%2BbDkgupLe6efOg%3D&reserved=0>