Hi Ali, We subtract the sums because that is the definition of the conductance matrix. However this complete function really should be written as kwant.smatrix(syst, args=[p]).conductance_matrix() (see also the documentation of the conductance_matrix from Kwant).
Best, Anton On Wed, Feb 15, 2017 at 3:43 PM, Ali Asgharpour <[email protected]> wrote: > Hello all, > > I have a question about one of the functions in this link: > https://nbviewer.jupyter.org/url/topocondmat.org/notebooks/w3_pump_QHE/Laughlinargument.ipynb > > For plotting Hall conductance and longitudinal one, there is a section where > you defined a G function, which I put it below: > > def G(syst, p): > smatrix = kwant.smatrix(syst, args=[p]) > G = [[smatrix.transmission(i, j) for i in range(num_leads)] for j in > range(num_leads)] > G -= np.diag(np.sum(G, axis=0)) > return calculate_sigmas(G) > > > I want to know why we need this line " G -= np.diag(np.sum(G, axis=0)) " > since G matrix is already calculated in the previous line? > > Your time and consideration are greatly appreciated. > > Best regards, > > Ali > > > > > > >
