Re: [Kwant] Regarding smatrix and spin

2017-01-17 Thread Anton Akhmerov
Dear Camilla,

It seems that you are trying to install Kwant on windows. This is a
very hard task, and I fear none of the Kwant developers has enough
knowledge of it right now (our Windows packages are built by Christoph
Gohlke, see [1] for the build environment description). However if you
are using windows 10, I suggest to try to install Kwant using the
windows subsystem for linux. That way the standard Ubuntu build
procedure should work for you.

Best,
Anton

[1]: http://www.lfd.uci.edu/~gohlke/pythonlibs/

On Mon, Jan 16, 2017 at 9:45 AM, Camilla Espedal
 wrote:
> Thanks a lot. I tried to install the cons_laws_combined, but I get the 
> following error message:
>
> "LINK: fatal error LNK1181: cannot open input file 'lapack.lib'"
>
> Is there some package or installation I am missing?
>
> Best regards,
> Camilla
>
> -Original Message-
> From: anton.akhme...@gmail.com [mailto:anton.akhme...@gmail.com] On Behalf Of 
> Anton Akhmerov
> Sent: 8. januar 2017 16:35
> To: Tómas Örn Rosdahl 
> Cc: Camilla Espedal ; kwant-discuss@kwant-project.org
> Subject: Re: [Kwant] Regarding smatrix and spin
>
> Hi Camilla, everyone,
>
> I've slightly modified Tómas's example to a case where the spins do get 
> coupled, check it out:
> http://nbviewer.jupyter.org/url/antonakhmerov.org/misc/spin_conductance.ipynb
>
> I've also provided more detailed installation instructions in the notebook.
>
> Cheers,
> Anton
>
> On Sun, Jan 8, 2017 at 2:45 PM, Tómas Örn Rosdahl  wrote:
>> Dear Camilla,
>>
>> For a Hamiltonian with degeneracies due to a conservation law, the
>> scattering states will in general not have a definite value of the
>> conservation law. In your case, Kwant returns scattering states that
>> are arbitrary linear combinations of spin up and down, so it is not
>> possible to label the amplitudes in the scattering matrix by spin.
>>
>> However, in Kwant 1.3 a feature will be added that allows for the
>> construction of scattering states with definite values of a
>> conservation law. See here for an explanation of the basic idea behind the 
>> algorithm.
>>
>> We're currently working on implementing this feature in Kwant itself.
>> The good news is that we're practically done - here is a link to a git
>> repo with a functioning implementation. After you clone the repo,
>> check out the branch cons_laws_combined, which contains a version of
>> Kwant with conservation laws implemented. This notebook contains a
>> simple example to illustrate how to work with conservation laws and the 
>> scattering matrix.
>>
>> I invite you and anyone else who is interested to give it a try. We'd
>> appreciate any feedback!
>>
>> In your case specifically, there would be two projectors in the new
>> implementation - P0 which projects out the spin up block, and P1 that
>> projects out the spin down block. If they are specified in this order,
>> then the spin up and down blocks in the Hamiltonian have block indices
>> 0 and 1, respectively. In the new implementation, it is possible to
>> ask for subblocks of the scattering matrix relating not only any two
>> leads, but also any two conservation law blocks in any leads. To get
>> the reflection amplitude of an incident spin up electron from lead 0
>> into an outgoing spin down electron in lead 0, you could simply do
>> smat.submatrix((0, 1), (0, 0)). Here, the arguments are tuples of indices 
>> (lead index, block index).
>>
>> Best regards,
>> Tómas
>>
>> On Fri, Jan 6, 2017 at 3:46 PM, Camilla Espedal
>> 
>> wrote:
>>>
>>> Hi again,
>>>
>>>
>>>
>>> This question is basically the same as this:
>>> https://www.mail-archive.com/kwant-discuss@kwant-project.org/msg00076
>>> .html
>>>
>>>
>>>
>>> I want to calculate some things using the scattering matrix. I
>>> started out with a very simple system, most basic two-terminal
>>> system. For some energy there is one propagating mode. I now add
>>> matrix structure to the mix (just multiply by s_0 everywhere) and
>>> there are now 2 propagating modes (which makes sense).
>>>
>>>
>>>
>>> Now, if I look at the reflection coefficients for lead 0 by using
>>> submatrix(0,0), it is now a 2x2 matrix after I introduced the
>>> matrices. How are the elements ordered? Is it
>>>
>>>
>>>
>>> [[r_upup, r_updown],[r_downup, r_downdown]]
>>>
>>>
>>>
>>> I know that I could make two lattices, but since I do not plan to use
>>> the other functions such as transmission. I  just want the smatrix.
>>>
>>>
>>>
>>> Hope you can help me, and thanks in advance.
>>>
>>>
>>>
>>> Best regards,
>>>
>>> Camilla
>>
>>


Re: [Kwant] the path in the Brillouin zone

2017-01-17 Thread Anton Akhmerov
Dear Weiyuan,

Since there's only a single translationally invariant direction, the
Brillouin zone is one-dimensional, and therefore you are viewing the
complete 1D Brillouin zone. If there was a finite order translation
invariance in the transverse direction like in a nanotube, each band
would correspond to a different discrete eigenvalue of momentum, as
described in a lot of educational materials, e.g. [1]. However in a
nanoribbon the momentum in a transverse direction is not conserved,
and therefore the 1D bands cannot in general be mapped on a 1D path in
a 2D Brillouin zone.

Best,
Anton

[1]: https://nanoelectronics.unibas.ch/education/Nanotubes/LCAO-NT.pdf

On Tue, Jan 17, 2017 at 5:59 AM, Weiyuan Tong
 wrote:
> Dear all,
> I used kwant to calculate the band structure of zigzag and armchair graphene
> nanoribbons. For zigzag graphene nanoribbons, we have sym=
> kwant.TranslationalSymmetry(lat.a.vec((-1, 0))). For armchair graphene
> nanoribbons, we have sym= kwant.TranslationalSymmetry(lat.a.vec((-1, 2))).
> My question is: which is the path in the Brillouin zone that we use and
> label the x-axis accordingly? My figure is attached. Thanks in advance!
> Weiyuan