Skip to content
Snippets Groups Projects
Commit c4c536f3 authored by Christoph Groth's avatar Christoph Groth
Browse files

tutorial: make titles clearer (I hope)

parent cc0f2f82
No related branches found
No related tags found
No related merge requests found
Tutorial: Learning Kwant through examples Tutorial: learning Kwant through examples
========================================= =========================================
.. toctree:: .. toctree::
......
...@@ -38,14 +38,14 @@ def make_system(a=1, t=1.0, alpha=0.5, e_z=0.08, W=10, L=30): ...@@ -38,14 +38,14 @@ def make_system(a=1, t=1.0, alpha=0.5, e_z=0.08, W=10, L=30):
#### Define the scattering region. #### #### Define the scattering region. ####
#HIDDEN_BEGIN_uxrm #HIDDEN_BEGIN_uxrm
sys[(lat(x, y) for x in range(L) for y in range(W))] = 4 * t * sigma_0 + \ sys[(lat(x, y) for x in range(L) for y in range(W))] = \
e_z * sigma_z 4 * t * sigma_0 + e_z * sigma_z
# hoppings in x-direction # hoppings in x-direction
sys[kwant.builder.HoppingKind((1, 0), lat, lat)] = -t * sigma_0 - \ sys[kwant.builder.HoppingKind((1, 0), lat, lat)] = \
1j * alpha * sigma_y -t * sigma_0 - 1j * alpha * sigma_y
# hoppings in y-directions # hoppings in y-directions
sys[kwant.builder.HoppingKind((0, 1), lat, lat)] = -t * sigma_0 + \ sys[kwant.builder.HoppingKind((0, 1), lat, lat)] = \
1j * alpha * sigma_x -t * sigma_0 + 1j * alpha * sigma_x
#HIDDEN_END_uxrm #HIDDEN_END_uxrm
#### Define the left lead. #### #### Define the left lead. ####
...@@ -54,11 +54,11 @@ def make_system(a=1, t=1.0, alpha=0.5, e_z=0.08, W=10, L=30): ...@@ -54,11 +54,11 @@ def make_system(a=1, t=1.0, alpha=0.5, e_z=0.08, W=10, L=30):
#HIDDEN_BEGIN_yliu #HIDDEN_BEGIN_yliu
lead[(lat(0, j) for j in xrange(W))] = 4 * t * sigma_0 + e_z * sigma_z lead[(lat(0, j) for j in xrange(W))] = 4 * t * sigma_0 + e_z * sigma_z
# hoppings in x-direction # hoppings in x-direction
lead[kwant.builder.HoppingKind((1, 0), lat, lat)] = -t * sigma_0 - \ lead[kwant.builder.HoppingKind((1, 0), lat, lat)] = \
1j * alpha * sigma_y -t * sigma_0 - 1j * alpha * sigma_y
# hoppings in y-directions # hoppings in y-directions
lead[kwant.builder.HoppingKind((0, 1), lat, lat)] = -t * sigma_0 + \ lead[kwant.builder.HoppingKind((0, 1), lat, lat)] = \
1j * alpha * sigma_x -t * sigma_0 + 1j * alpha * sigma_x
#HIDDEN_END_yliu #HIDDEN_END_yliu
#### Attach the leads and return the finalized system. #### #### Attach the leads and return the finalized system. ####
......
First steps in Kwant: Setting up a simple system and computing transport First steps: setting up a simple system and computing conductance
------------------------------------------------------------------------ -----------------------------------------------------------------
Discretization of a Schrödinger Hamiltonian Discretization of a Schrödinger Hamiltonian
........................................... ...........................................
...@@ -321,20 +321,19 @@ subbands that increases with energy. ...@@ -321,20 +321,19 @@ subbands that increases with energy.
.. [#] http://xkcd.com/353/ .. [#] http://xkcd.com/353/
.. [#] Leads are numbered in the python convention, starting from 0. .. [#] Leads are numbered in the python convention, starting from 0.
The same but different: Alternative system building Building the same system with less code
................................................... .......................................
Kwant is very flexible, and often allows you more than one way to Kwant allows for more than one way to build a system. The reason is that
build up your system. The reason is that `~kwant.builder.Builder` `~kwant.builder.Builder` is essentially just a container that can be filled in
is essentially just a container, and allows for different different ways. Here we present a more compact rewrite of the previous example
ways to be filled. Here we present a more compact rewrite of (still with the same results).
the previous example (still with the same results).
Also, the previous example was written in the form of a pythons script Also, the previous example was written in the form of a Python script with
with little structure, and everything governed by global variables. little structure, and with everything governed by global variables. This is OK
This is OK for such a simple example, but for larger projects it makes for such a simple example, but for larger projects it makes sense to partition
sense to structure different functionality into different functional the code into separate entities. In this example we therefore also aim at more
entities. In this example we therefore also aim at more structure. structure.
We begin the program collecting all imports in the beginning of the We begin the program collecting all imports in the beginning of the
file and put the build-up of the system into a separate function file and put the build-up of the system into a separate function
......
Adding more structure to the problem More interesting systems: spin, potential, shape
------------------------------------ ------------------------------------------------
Each of the following three examples highlights different ways to go beyond the
very simple examples of the previous section.
.. _tutorial_spinorbit: .. _tutorial_spinorbit:
Matrix structure of on-site and hopping elements Matrix structure of on-site and hopping elements
................................................ ................................................
In the next examples, we will extend the previous examples and add more We begin by extending the simple 2DEG-Hamiltonian by a Rashba spin-orbit
structure. We begin by extending the simple 2DEG-Hamiltonian by coupling and a Zeeman splitting due to an external magnetic field:
a Rashba spin-orbit coupling and a Zeeman splitting due to
an external magnetic field:
.. math:: .. math::
......
Beyond transport: Band structures and closed systems Beyond transport: Band structure and closed systems
---------------------------------------------------- ---------------------------------------------------
Band structure calculations Band structure calculations
........................... ...........................
......
.. _tutorial-graphene: .. _tutorial-graphene:
Using a more complicated lattice (graphene) Beyond square lattices: graphene
------------------------------------------- --------------------------------
In the following example, we are going to calculate the In the following example, we are going to calculate the
conductance through a graphene quantum dot with a p-n junction conductance through a graphene quantum dot with a p-n junction
......
Superconductors: orbital vs lattice degrees of freedom Superconductors: orbital vs. lattice degrees of freedom
------------------------------------------------------ -------------------------------------------------------
This example deals with superconductivity on the level of the This example deals with superconductivity on the level of the
Bogoliubov-de Gennes (BdG) equation. In this framework, the Hamiltonian Bogoliubov-de Gennes (BdG) equation. In this framework, the Hamiltonian
...@@ -21,7 +21,7 @@ For this we restrict ourselves to a simple spin-less system without ...@@ -21,7 +21,7 @@ For this we restrict ourselves to a simple spin-less system without
magnetic field, so that :math:`\Delta` is just a number (which we magnetic field, so that :math:`\Delta` is just a number (which we
choose real), and :math:`\mathcal{T}H\mathcal{T}^{-1}=H_0^*=H_0`. choose real), and :math:`\mathcal{T}H\mathcal{T}^{-1}=H_0^*=H_0`.
"Orbital description": Using matrices "Orbital description": using matrices
..................................... .....................................
We begin by computing the band structure of a superconducting wire. We begin by computing the band structure of a superconducting wire.
...@@ -48,7 +48,7 @@ he? ...@@ -48,7 +48,7 @@ he?
:download:`tutorial/superconductor_band_structure.py <../../../tutorial/superconductor_band_structure.py>` :download:`tutorial/superconductor_band_structure.py <../../../tutorial/superconductor_band_structure.py>`
"Lattice description": Using different lattices "Lattice description": using different lattices
............................................... ...............................................
While it seems most natural to implement the BdG Hamiltonian While it seems most natural to implement the BdG Hamiltonian
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment