Dear Adel, Thanks for your suggestion. I will try this to see if it works. Best regards Khani
On Sat, Aug 8, 2020 at 6:42 AM Abbout Adel <abbout.a...@gmail.com> wrote: > Dear Khani, > > The function discretizing the continuous Hamiltonian works for a > hamiltonian with a polynomial form in the variables kx, ky, kz, which is > not the case in your Hamiltonian. > > What you can do is: > 1) A Taylor expansion of your Hamiltonian, preferably to the second order. > 2) Use the descritizing function of kwant with the Hamiltonian obtained by > the expansion. (you can play with the order of the expansion too) > 3) Check that it gives the form of your initial discretized Hamiltonian. > > > This is not guaranteed to work all the time, but it is the fastest way in > my opinion. > > I hope this helps, > Adel > > > On Fri, Aug 7, 2020 at 11:45 AM Khani Hosein <hoseinkhani...@gmail.com> > wrote: > >> Dear authors, >> I want to discretize continuous Hamiltonians of Weyl semimetal (PRL >> 115,246603 (2015)) using Kwant, but we have sin(kz),sin(ky)...in the >> Hamiltonian, so it always shows the error message. I have already imported >> sin and cos from math. Could you give me any suggestion? >> Hosein Khani >> > > > -- > Abbout Adel >