Dear Adel,

Thank you very much for your kind remind.

Khani

On Tue, Dec 8, 2020 at 4:11 AM Abbout Adel <abbout.adel@gmail.com> wrote:

Dear Hosein,To my knowledge, Kwant "discretize" works only for square lattices. In the version 1.4, it was extended to rectangular ones.So, you can not use it for graphene for example.I hope this helps,AdelOn Mon, Dec 7, 2020 at 7:44 PM Khani Hosein <hoseinkhaniphy@gmail.com> wrote:Dear all,I want to discretize the continuous Hamiltonian using kwant.continuum.discretize, but I have problems in inputing my hamiltonian. In the example, we only have elements in H(0,0),H(0,1),H(1,0),H(1,1),H(2,2),H(2,3),H(3,2),H(3,3), but in my system (for example, bilayer graphene) I have elements in H(0,2),H(1,3),H(2,0),H(3,1). How to input my hamiltonian into it.

For example,

hamiltonian = """

+ M * kron(sigma_z, sigma_0)

+A * k_x * kron(sigma_0, sigma_x)

+A * k_y * kron(sigma_0, sigma_y)+ Tc*[[0, 0, 1, 0], [0, 0, 0, 1],[1, 0, 0, 0] ],[0, 1, 0, 0]]"""The term Tc*[[0, 0, 1, 0], [0, 0, 0, 1],[1, 0, 0, 0] ],[0, 1, 0, 0]] will cause errors.Thank you very much.Khani Hosein--Abbout Adel