Henry Axt wrote: > Am I mistaken or is it indeed the case that the in_neighbors method is > not availabe in the current version of Kwant?
Builder graphs are only "one-way" and not "two-way" (using the terminology of Kwant’s graph module). That’s why you have to use the method ’out_neighbors’. The method ’in_neigbhors’ has never been available for graphs as they are prepared for finalized builders as far as I remember. >>> import kwant >>> kwant.__version__ '1.4.2' >>> lat = kwant.lattice.chain() >>> syst = kwant.Builder() >>> syst[ (lat(x) for x in range(10)) ] = 0 >>> syst[lat.neighbors()] = 1 >>> fsyst = syst.finalized() >>> list(fsyst.graph.out_neighbors(0)) [1] >>> list(fsyst.graph.out_neighbors(1)) [0, 2]
smime.p7s
Description: S/MIME cryptographic signature
