Re: [Kwant] Question about lead_info[].wave_functions[]

2016-11-17 Thread Joseph Weston
Hi,

> So my final question is then. What is the unit cell? Doesn't a square lattice 
> only have one site per unit cell? Or is it the number of interface sites?

The unit cell is whatever you define it to be with your choice of
translational symmetry and sites that you add to the system.
In the below example there are 3 sites in the unit cell of
the system:

lat = kwant.lattice.square(a=1)
T = kwant.TranslationalSymmetry((-1, 0))
syst = kwant.Builder(T)

syst[(lat(0, j) for j in range(3))] = 4

# the sites lat(x, y) are all mapped onto lat(0, y),
# so the line below *overwrites* the onsites set above
syst[(lat(1, j) for j in range(3))] = 6

I could have defined my translational symmetry to be something
different, however. In the below example there are 6 sites in
the unit cell of the system:

lat = kwant.lattice.square(a=1)
T = kwant.TranslationalSymmetry((-2, 0))
syst = kwant.Builder(T)

syst[(lat(0, j) for j in range(3))] = 4

# because the symmetry vector is (-2, 0), the sites
# in the line below are *distinct* from the sites above
syst[(lat(1, j) for j in range(3))] = 6


Hope that clarifies,

Joe


signature.asc
Description: PGP signature


Re: [Kwant] Question about lead_info[].wave_functions[]

2016-11-17 Thread Camilla Espedal
Hi again,

So my final question is then. What is the unit cell? Doesn't a square lattice 
only have one site per unit cell? Or is it the number of interface sites?

Best,
Camilla


Re: [Kwant] Question about lead_info[].wave_functions[]

2016-11-16 Thread Joseph Weston
Hi,


> I think I am getting there, so for a system with two bands each row has 4 
> elements which corresponds to 2 left-going and 2 right-going modes. Is that 
> correct?

If you evaluate the modes at an energy at which both bands are open, then yes.
You will need to refer to the documentation to find out what order the
modes are stored in.

> And the orbitals in this case, corresponds to spin? I haven't implemented 
> spin or anything manually to the model, is this done by Kwant by default? The 
> output I get is a 2x4-matrix. Is the output wavefunction a spinor?

If you haven't implemented spin or anything then there will not be any
spin. I would expect the `wave_functions` array to have shape (2, 4)
in the case you described above, i.e. there are 4 (2 left-going, 2
right-going) modes and the wavefunctions have 2 elements, corresponding
to the 2 sites in your unit cell.

Joe


signature.asc
Description: PGP signature


Re: [Kwant] Question about lead_info[].wave_functions[]

2016-11-16 Thread Camilla Espedal
Hi again, and thanks.

I think I am getting there, so for a system with two bands each row has 4 
elements which corresponds to 2 left-going and 2 right-going modes. Is that 
correct?

And the orbitals in this case, corresponds to spin? I haven't implemented spin 
or anything manually to the model, is this done by Kwant by default? The output 
I get is a 2x4-matrix. Is the output wavefunction a spinor?

Best,
Camilla





-Original Message-
From: Joseph Weston [mailto:[email protected]] 
Sent: 16. november 2016 15:13
To: Camilla Espedal 
Cc: [email protected]
Subject: Re: [Kwant] Question about lead_info[].wave_functions[]

Hi,

> Thank you. This might be a silly question, but what is the meaning of 
> orbitals here? Is it not only 1?

When I say "orbitals" it's really a shorthand for "degrees of freedom".
If you have a lead with 2 sites in the unit cell, and each one has a single 
degree of freedom associated with it (i.e. the onsites are just
numbers) then the wavefunction would be a vector with 2 entries.

If you have, say, spin 1/2 particles, then each site would have 2 degrees of 
freedom associated with it (spin up & spin down). In the same way, if a site 
really represents an atom, then your "internal degrees of freedom" could be the 
different atomic orbitals (s, p, d etc.).
Of course, Kwant makes no assumptions about what these degrees of freedom 
actually mean -- it is up to the user to define what they mean by describing 
the appropriate Hamiltonian.


> The orbital elements seem to be conjugate of each other.

I think you are looking at the wrong axis of the `wave_functions` array. The 
*first* axis runs over the orbitals, and the *second* axis runs over the modes.
For a given band, I would expect the left- and right-propagating modes to be 
conjugates of each other, as they are related by time-reversal symmetry (unless 
you have some terms in your Hamiltonian that break this, but I think not).

Does that clarify?

Joe


Re: [Kwant] Question about lead_info[].wave_functions[]

2016-11-16 Thread Joseph Weston
Hi,

> Thank you. This might be a silly question, but what is the meaning of 
> orbitals here? Is it not only 1?

When I say "orbitals" it's really a shorthand for "degrees of freedom".
If you have a lead with 2 sites in the unit cell, and each one has a
single degree of freedom associated with it (i.e. the onsites are just
numbers) then the wavefunction would be a vector with 2 entries.

If you have, say, spin 1/2 particles, then each site would have 2
degrees of freedom associated with it (spin up & spin down). In the
same way, if a site really represents an atom, then your "internal
degrees of freedom" could be the different atomic orbitals (s, p, d etc.).
Of course, Kwant makes no assumptions about what these degrees of
freedom actually mean -- it is up to the user to define what they mean
by describing the appropriate Hamiltonian.


> The orbital elements seem to be conjugate of each other.

I think you are looking at the wrong axis of the `wave_functions`
array. The *first* axis runs over the orbitals, and the *second*
axis runs over the modes.
For a given band, I would expect the left- and right-propagating
modes to be conjugates of each other, as they are related by
time-reversal symmetry (unless you have some terms in your Hamiltonian
that break this, but I think not).

Does that clarify?

Joe


signature.asc
Description: PGP signature


Re: [Kwant] Question about lead_info[].wave_functions[]

2016-11-16 Thread Camilla Espedal
Hi Joe,

Thank you. This might be a silly question, but what is the meaning of orbitals 
here? Is it not only 1? The orbital elements seem to be conjugate of each other.

Best,
Camilla


Re: [Kwant] Question about lead_info[].wave_functions[]

2016-11-16 Thread Joseph Weston
Hi Camilla,

> I have a question regarding the lead_info[x].wave_functions[x]. I am not sure 
> what this is actually returning? I tried to run the function on your 
> quantum_wire_revisited.py-system, like this
> 
> prop = sm.lead_info[0]
> print(prop.wave_functions[0])
> 
> with W = 2, if that is important. It then returns a 1x2 array or 2x2 matrix 
> depending on the energy. What does this matrix contain? I read about 
> propagatingmodes in the documentation, but I am not sure what it meant.
> 
> Best,
> Camilla

`lead_info[i].wave_functions` contains the wavefunctions of the
propagating modes in lead `i`. This is a 2D array, where the
first axis corresponds to the orbitals in a unit cell of the
lead, and the second axis is the mode number.

These wave functions are essentially the unit-cell-periodic part of the
Bloch states in the lead.

It makes sense that the length of the second axis can be different
depending on the energy, as at different energies there may be different
numbers of propagating modes open in the lead.

Hope that helps,

Joe


signature.asc
Description: PGP signature