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