diff --git a/doc/source/tutorial/index.rst b/doc/source/tutorial/index.rst index 243ef15fa37a8a1ef24aa5029822c7c1886d7096..aa78d2fcde96bdc8a0068f1445ffb43f09c80868 100644 --- a/doc/source/tutorial/index.rst +++ b/doc/source/tutorial/index.rst @@ -1,4 +1,4 @@ -Tutorial: Learning Kwant through examples +Tutorial: learning Kwant through examples ========================================= .. toctree:: diff --git a/doc/source/tutorial/spin_orbit.py b/doc/source/tutorial/spin_orbit.py index 8f3a35a681557af5b7d89a09a5bf0f8a91160258..5b1ddbff6ccf5c7801154772e092c31259ee3047 100644 --- a/doc/source/tutorial/spin_orbit.py +++ b/doc/source/tutorial/spin_orbit.py @@ -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. #### #HIDDEN_BEGIN_uxrm - sys[(lat(x, y) for x in range(L) for y in range(W))] = 4 * t * sigma_0 + \ - e_z * sigma_z + 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 + 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 + sys[kwant.builder.HoppingKind((0, 1), lat, lat)] = \ + -t * sigma_0 + 1j * alpha * sigma_x #HIDDEN_END_uxrm #### 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): #HIDDEN_BEGIN_yliu 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 + 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 + lead[kwant.builder.HoppingKind((0, 1), lat, lat)] = \ + -t * sigma_0 + 1j * alpha * sigma_x #HIDDEN_END_yliu #### Attach the leads and return the finalized system. #### diff --git a/doc/source/tutorial/tutorial1.rst b/doc/source/tutorial/tutorial1.rst index 570382fc0e044ac0d7b365de79be2681bb9cea87..7e0e7821bbc466efcb7ca4ce6ae215ec1d206d72 100644 --- a/doc/source/tutorial/tutorial1.rst +++ b/doc/source/tutorial/tutorial1.rst @@ -1,5 +1,5 @@ -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 ........................................... @@ -321,20 +321,19 @@ subbands that increases with energy. .. [#] http://xkcd.com/353/ .. [#] 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 -build up your system. The reason is that `~kwant.builder.Builder` -is essentially just a container, and allows for different -ways to be filled. Here we present a more compact rewrite of -the previous example (still with the same results). +Kwant allows for more than one way to build a system. The reason is that +`~kwant.builder.Builder` is essentially just a container that can be filled in +different ways. Here we present a more compact rewrite of the previous example +(still with the same results). -Also, the previous example was written in the form of a pythons script -with little structure, and everything governed by global variables. -This is OK for such a simple example, but for larger projects it makes -sense to structure different functionality into different functional -entities. In this example we therefore also aim at more structure. +Also, the previous example was written in the form of a Python script with +little structure, and with everything governed by global variables. This is OK +for such a simple example, but for larger projects it makes sense to partition +the code into separate entities. In this example we therefore also aim at more +structure. 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 diff --git a/doc/source/tutorial/tutorial2.rst b/doc/source/tutorial/tutorial2.rst index 3fb0eeba879665333868584df7cec4ec2c2f5f10..8cdf7c1a4d53c11768c8b96918e791b8217b3d6b 100644 --- a/doc/source/tutorial/tutorial2.rst +++ b/doc/source/tutorial/tutorial2.rst @@ -1,15 +1,16 @@ -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: Matrix structure of on-site and hopping elements ................................................ -In the next examples, we will extend the previous examples and add more -structure. We begin by extending the simple 2DEG-Hamiltonian by -a Rashba spin-orbit coupling and a Zeeman splitting due to -an external magnetic field: +We begin by extending the simple 2DEG-Hamiltonian by a Rashba spin-orbit +coupling and a Zeeman splitting due to an external magnetic field: .. math:: diff --git a/doc/source/tutorial/tutorial3.rst b/doc/source/tutorial/tutorial3.rst index 67e3007b5e7f864e5ab9de0aa354f5e65a22b001..be8f23b7e6385126ccfa791367cc59032fac8c01 100644 --- a/doc/source/tutorial/tutorial3.rst +++ b/doc/source/tutorial/tutorial3.rst @@ -1,5 +1,5 @@ -Beyond transport: Band structures and closed systems ----------------------------------------------------- +Beyond transport: Band structure and closed systems +--------------------------------------------------- Band structure calculations ........................... diff --git a/doc/source/tutorial/tutorial4.rst b/doc/source/tutorial/tutorial4.rst index 35cbfaf14aebda8fd0eb4753f3f2ff9ca7571695..111cf76099d3d632420a6e68d10ea1306c6c730a 100644 --- a/doc/source/tutorial/tutorial4.rst +++ b/doc/source/tutorial/tutorial4.rst @@ -1,7 +1,7 @@ .. _tutorial-graphene: -Using a more complicated lattice (graphene) -------------------------------------------- +Beyond square lattices: graphene +-------------------------------- In the following example, we are going to calculate the conductance through a graphene quantum dot with a p-n junction diff --git a/doc/source/tutorial/tutorial5.rst b/doc/source/tutorial/tutorial5.rst index 63e891bce6c0f35247dd9c07fda273e71f0e2fb1..f723f8d2f1fd5572aee2731513eabed473954578 100644 --- a/doc/source/tutorial/tutorial5.rst +++ b/doc/source/tutorial/tutorial5.rst @@ -1,5 +1,5 @@ -Superconductors: orbital vs lattice degrees of freedom ------------------------------------------------------- +Superconductors: orbital vs. lattice degrees of freedom +------------------------------------------------------- This example deals with superconductivity on the level of the 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 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`. -"Orbital description": Using matrices +"Orbital description": using matrices ..................................... We begin by computing the band structure of a superconducting wire. @@ -48,7 +48,7 @@ he? :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