Dear all,
I need to calculate a system with a variable number of 2D lattices. So, the pseudo code should look like:
for i in xrange(2,100):
# Form a system with (i) number of lattices, with hoppings that depend on (i) in between the lattices
# Calculate stuff, such as the transmission amplitude from lead f of lattice j to lead g of lattice k (j, k <= i)
# plot calculated stuff as a function of i
I couldn't figure out a straight method to do it, as I have to pass (i) as a function variable when I'm forming the hoppings. That is, in the make_system part of the code, I need to say things like (again in pseudo code)
syst[(lat(i, x, y), lat(i+1, x, y) for x in ... for y in ...)] = hopping(i, i+1)
which is impossible because a) lattice definitions can only take in realspace coordinates and b) the function on the right side has to have two sites as its first two arguments and the rest will be provided in the solver part of the code.