I have been trying to evaluate current through a josephson junction using the 
green function formalism using the following formula:
   I=2 (e Kb T)/hbar(sum over matsubara freq.)(H_ij G_ij-H_ji G_ji)
To calculate current I have mounted two virtual leads on the slabs where I want 
to evaluate the current using the following code:

def mount_vlead(sys, vlead_interface, norb):
    dim = len(vlead_interface)*norb
    zero_array = np.zeros((dim, dim), dtype=float)
    def selfenergy_func(energy, args=()):
        return zero_array

    vlead = kwant.builder.SelfEnergyLead(selfenergy_func, vlead_interface,())
    sys.leads.append(vlead)

where vlead_interace was supplied using the following code:

v1=kwant.Builder()
v1[(lat(nx_1,i) for i in range(ny))]=(2*t-mu_n)*tau_z
v1[lat.neighbors()]=-t*tau_z
v2=kwant.Builder()
v2[(lat(nx_2,i) for i in range(ny))]=(2*t-mu_n)*tau_z
v2[lat.neighbors()]=-t*tau_z
mount_vlead(syst,v2.sites(),2)

Here nx_1 and nx_2 are the two points where the points where I have mounted 
virtual leads. Then I have used the greens_function solver in kwant to evaluate 
green function for a given matsubara frequency.
The issue that i am facing is that I am getting identical diagonal elements in 
green_function.submatrix(v1,v2) and green_function.submatrix(v2,v1), thus when 
taking trace it gives me zero as the hopping matrix is same.

Reply via email to