Dear all,
I am trying square lattice with spin-orbit coupling and Zeeman splititng just like the example of Tutorial 2.3.1. Now I want to get the spin-dependent conductance£ºGuu,Gud,Gdu,and Gdd, where "u" indicates up spin, d indicates down spin. We can have the scattering matrix through Smatrix=kwant.smatrix(sys, energy), but how the spin is positioned in the scattering matrix? I have checked some simple cases, it seems the Smatrix is organized like this:
|  r      t   |
S=    |  t'     r'  |
but how the spin is included?
Qingtiian Zhang

The code is:
import kwant
from matplotlib import pyplot
from numpy import matrix
import tinyarray

sigma_0 = tinyarray.array([[1, 0], [0, 1]])
sigma_x = tinyarray.array([[0, 1], [1, 0]])
sigma_y = tinyarray.array([[0, -1j], [1j, 0]])
sigma_z = tinyarray.array([[1, 0], [0, -1]])

sys=kwant.Builder()
lat=kwant.lattice.square()

a=1
t=1.0
alpha=0.5
e_z=0.08
W=2
L=2

sys[(lat(x, y) for x in range(L) for y in range(W))] = \
4 * t * sigma_0 + e_z * sigma_z
# hoppings in x-direction
sys[kwant.builder.HoppingKind((1, 0), lat, lat)] = \
-t * sigma_0 - 1j * alpha * sigma_y
# hoppings in y-directions
sys[kwant.builder.HoppingKind((0, 1), lat, lat)] = \
-t * sigma_0 + 1j * alpha * sigma_x
#### Define the left lead. ####
lead[(lat(0, j) for j in xrange(W))] = 4 * t * sigma_0 + e_z * sigma_z
# hoppings in x-direction
lead[kwant.builder.HoppingKind((1, 0), lat, lat)] = \
-t * sigma_0 - 1j * alpha * sigma_y
# hoppings in y-directions
lead[kwant.builder.HoppingKind((0, 1), lat, lat)] = \
-t * sigma_0 + 1j * alpha * sigma_x
#### Attach the leads and return the finalized system. ####