kwant

Python で 量子輸送 シミュレーションを行うパッケージ

コードリーディング

kwant.greens_function() を呼ぶと系 syst: System と エネルギー energy: float, 入出力リード(未指定は全て) から retarded green’s function を計算する GreensFunction インスタンスを返す.

https://gitlab.kwant-project.org/kwant/kwant/-/blob/v1.4.1/kwant/solvers/common.py#L395-491

インスタンスを作る前に, 左辺をLU分解して疎行列な線形方程式を解いている.
ハミルトニアン の計算にCythonを使っていた.
https://gitlab.kwant-project.org/kwant/kwant/-/blob/master/kwant/_system.pyx#L237

帯行列

対角成分だけに要素が集中した疎行列. 大抵LU分解して解くらしい.
scipy.sparse.linalg.factorized — SciPy v1.8.0 Manual はLU分解をする

この逆行列を高速にやるのが retarded green’s function らしい.

線形方程式 linsys を構築
https://gitlab.kwant-project.org/kwant/kwant/-/blob/v1.4.1/kwant/solvers/common.py#L469-471

ldos を計算する関数もある
https://gitlab.kwant-project.org/kwant/kwant/-/blob/v1.4.1/kwant/solvers/common.py#L494-557

実行したら

NotImplementedError: ldos for leads with only self-energy is not implemented yet.

と言われた, ??

参考文献