Hi Joe, thank you for the fast response. You are probably right, that I need to use the k-space Hamiltonian for the infinite case. Would my method work for a finite system then? Potentially with periodic boundary conditions? The measure, that I am looking for, is the total energy of all occupied particle states. I am not really sure, how to calculate this in an infinite system. First I probably need to isolate the particle Hamiltonian with a projector. But I don't know how to proceed from there in k-space. Best regards, Jannis On 04.12.2019 16:18, Joseph Weston wrote:
Hi again,
I noticed my code example probably won't even run in the generic case; we need to do this wrangling with 'numpy.zeros_like' because 'inter_cell_hopping' returns a rectangular matrix in general (when only a subset of the sites in a unit cell connect via hoppings to the next unit cell). Probably the code should look something like this:
def H_k(k, params):
H_0 = syst.cell_hamiltonian(args, params=params)
hop = syst.inter_cell_hopping(args, params=params) V = np.zeros_like(H_0) V[:, : hop.shape[1]] = hop
return H_0 + V * exp(-1j * k) + V.conjugate().transpose() * exp(1j * k)
Happy Kwanting,
Joe