[kwant] How to make a finite lead?
Dear kwant users, I am trying to reproduce the paper following. https://arxiv.org/abs/1110.4280 (in this paper, fig5, 6 will help to understand my questions.) What I’m struggling with now is to build a finite(not infinite, and not having any translational symmetry) lead as below.  I wonder 1. I think "kwant.builder.SelfEnergyLead()” function might be proper thing to build a finite lead without any translational symmetry. Is it correct? 2. If it's right, when I run this code using SelfEnergyLead(), the following error occurs. How can I solve it? ------------------------------------------------------------------------------------------------ lat = kwant.lattice.chain(norbs=1) syst = kwant.Builder() syst[(lat(i) for i in range(4))] = 4 syst[lat.neighbors()] = -1 def self_energy(energy, args=(), *, params=None): return -1j left_lead = kwant.builder.SelfEnergyLead(self_energy, interface=[lat(0)], parameters = []) right_lead = kwant.builder.SelfEnergyLead(self_energy, interface=[lat(3)], parameters = []) syst.leads.append(left_lead) syst.leads.append(right_lead) syst = syst.finalized() H = syst.leads[0].kwant.hamiltonian_submatrix kwant.plot(syst) ------------------------------------------------------------------------------------------------ AttributeError: 'SelfEnergyLead' object has no attribute ‘kwant' Any help is appreciated! Best, Bongsu Kim
Dear Kim: Have you find any way to attach a SelfEnergyLead? I think its might be a bug of current version. Bests, Wilson
Dear Kim: My previous response is not correct. You have attached the leads, the error is telling you that the SelfEnergyLead has no attribute `kwant`. You should either call `H = syst.hamiltonian_submatrix()` or call `syst.leads[0].selfenergy(0)` to get rid of the error. Bests, Wilson
participants (2)
-
wilson2048@outlook.com
-
김봉수