Dear Yan, If you post a small part of your program reproducing this error message, someone may help you.
Regards, Adel On Mon, Sep 9, 2019 at 12:58 PM X.F.Yan <yxf0...@aliyun.com> wrote: > > > Dear sir, > > > Recently, we use Kwant to solve for Hamiltonian matrix with off-diagonal > terms. We successfully calculate the energy band structure and total > conductance. But unfortunately, we tried to compute the spin conductance > without success. > > > > We consider the values of the conservation law based on the off-diagonal > term of Hamiltonian matrix, details are as follows: > > > > H = tinyarray.array([[0, 0, 0, 1, 0, 0], > > [0, 0, 0, 0, 1, 0], > > [0, 0, 0, 0, 0, 1], > > [1, 0, 0, 0, 0, 0], > > [0, 1, 0, 0, 0, 0], > > [0, 0, 1, 0, 0, 0]]) > > > > > > > > spin_block = tinyarray.array([[0, 0, 0, 1, 0, 0], > > [0, 0, 0, 0, 1, 0], > > [0, 0, 0, 0, 0, 1], > > [-1, 0, 0, 0, 0, 0], > > [0, -1, 0, 0, 0, 0], > > [0, 0, -1, 0, 0, 0]]) > > And we add “conservation_law= - spin_block” in “lead=kwant.Builder()” > > > > The program can not work, and prompt error: > > > > IndexError: index 2 is out of bounds for axis 0 with size 2 > > > > Please help me. > > > > Thank you, > > > > Kind regards, > > X.F.Yan > > > > > > > -- Abbout Adel