The above code implements a numerical method to solve for the Green's function of a one-dimensional lattice with nearest-neighbor hopping and a complex on-site potential. The lattice has 2N sites, and the hopping strength and phase are given by t and phi, respectively. The on-site potential is given by E, and there is a small imaginary part to ensure convergence. The Green's function is calculated using a recursive method that involves solving for the eigenvectors and eigenvalues of a transfer matrix.

The code first sets up the Hamiltonian matrices H00 and H11, as well as the hopping matrices H01 and H12. These matrices are then used to construct the transfer matrix TT, which is diagonalized to obtain the eigenvectors and eigenvalues. The eigenvectors are sorted by their corresponding eigenvalues, and the Green's function is calculated using the resulting eigenvectors and eigenvalues.

The resulting Green's function grn is the full Green's function of the lattice, which can be used to calculate various physical quantities such as the density of states, conductivity, and spectral functions.

Numerical Calculation of Green's Function for a One-Dimensional Lattice

原文地址: https://www.cveoy.top/t/topic/nu4n 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录