kwant.plotter.sys_leads_sites

kwant.plotter.sys_leads_sites#

kwant.plotter.sys_leads_sites(sys, num_lead_cells=2)[source]#

Return all the sites of the system and of the leads as a list.

Parameters:
  • sys (kwant.builder.Builder or kwant.system.System instance) – The system, sites of which should be returned.

  • num_lead_cells (integer) – The number of times lead sites from each lead should be returned. This is useful for showing several unit cells of the lead next to the system.

Returns:

  • sites (list of (site, lead_number, copy_number) tuples) – A site is a Site instance if the system is not finalized, and an integer otherwise. For system sites lead_number is None and copy_number is 0, for leads both are integers.

  • lead_cells (list of slices) – lead_cells[i] gives the position of all the coordinates of lead i within sites.

Notes

Leads are only supported if they are of the same type as the original system, i.e. sites of BuilderLead leads are returned with an unfinalized system, and sites of system.InfiniteSystem leads are returned with a finalized system.