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

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to