Hi Sverre,

> My goal is to calculate spin currents between sites,

Indeed this is something that you will have to do manually in Kwant 1.2.
In Kwant 1.3 we will introduce the concept of "operators" that will
allow you to easily define and evaluate spin currents on wavefunctions.


> -  What is the wave function at a site when there are several leads and 
> propagating modes at a given energy ?

What do you mean? If there are several propagating modes at a given
energy, then each mode has a corresponding wavefunction!


> Is it a sum of all contributions from all leads and all propagating modes ?

Probably not. While an equally-weighted linear combination of all the
scattering wavefunctions from all incoming modes is a well-defined quantity,
it does not really have any use.


> - Can one get out the spin components of the wavefunction (not just a single 
> number) ?

Yes

> (Maybe this is related to what modes we put in)

No

The wavefunction is defined over the *whole* Hilbert space even if, for
a given mode, it happens to live in a particular (e.g. spin-up)
subspace. If you inspect the wavefunction vector you will see that it is
twice as long as the number of sites in your system.  This is because
for each site the wavefunction has a spin up/down component. Kwant
guarantees that entries that correspond to these "onsite" degrees of
freedom are contiguous. In practice this means that the spin up/down
subspaces can be found by simply slicing out the even/odd index
components of the wavefunction.


> I use the dev version of kwant 1.3 where it is possible to specify a 
> conservation_law in the lead.

In this case I would strongly recommend using the 'operator' module to
calculate the spin current. Unfortunately we have not yet written the
tutorial, but it should just be as simple as:

    syst = make_system().finalized()
    J_spin = kwant.operator.Current(syst, sigma_z)
    all_wfs = kwant.wave_function(syst, energy)(0)
    # spin current from lead 0 @ energy E.
    spin_current = sum(J_spin(wf) for wf in wfs)

The return format is an array of values -- the spin current across each
hopping. The ordering of the values in the array is the same as the
hopping ordering that you get when iterating over the system's graph:

    for (i, j), spin_current in zip(syst.graph, spin_current):
        print('spin current from site {} to {} is {}'
              .format(syst.sites[j].tag, syst.sites[j].tag))


Let us know how you get on (I am especially interested to see if the
operator module responds to your needs).

Happy Kwanting,

Joe

Attachment: signature.asc
Description: PGP signature

Reply via email to