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

make tutorials importable

parent 80e33d3a
No related branches found
No related tags found
No related merge requests found
File moved
......@@ -16,7 +16,7 @@ with a hard wall confinement :math:`V(y)` in y-direction.
In order to use kwant, we need to import it:
.. literalinclude:: 1-quantum_wire.py
.. literalinclude:: quantum_wire.py
:start-after: #HIDDEN_BEGIN_dwhx
:end-before: #HIDDEN_END_dwhx
......@@ -26,7 +26,7 @@ The first step is now the definition of the system with scattering region and
leads. For this we make use of the `~kwant.builder.Builder` type that allows to
define a system in a convenient way. We need to create an instance of it:
.. literalinclude:: 1-quantum_wire.py
.. literalinclude:: quantum_wire.py
:start-after: #HIDDEN_BEGIN_goiq
:end-before: #HIDDEN_END_goiq
......@@ -42,7 +42,7 @@ Apart from `~kwant.builder.Builder` we also need to specify
what kind of sites we want to add to the system. Here we work with
a square lattice. For simplicity, we set the lattice constant to unity:
.. literalinclude:: 1-quantum_wire.py
.. literalinclude:: quantum_wire.py
:start-after: #HIDDEN_BEGIN_suwo
:end-before: #HIDDEN_END_suwo
......@@ -61,7 +61,7 @@ needed in Builder (more about that in the technical details below).
We now build a rectangular scattering region that is `W`
lattice points wide and `L` lattice points long:
.. literalinclude:: 1-quantum_wire.py
.. literalinclude:: quantum_wire.py
:start-after: #HIDDEN_BEGIN_zfvr
:end-before: #HIDDEN_END_zfvr
......@@ -69,7 +69,7 @@ Next, we define the leads. Leads are also constructed using
`~kwant.builder.Builder`, but in this case, the
system must have a translational symmetry:
.. literalinclude:: 1-quantum_wire.py
.. literalinclude:: quantum_wire.py
:start-after: #HIDDEN_BEGIN_xcmc
:end-before: #HIDDEN_END_xcmc
......@@ -84,7 +84,7 @@ as the hoppings inside one unit cell and to the next unit cell of the lead.
For a square lattice, and a lead in y-direction the unit cell is
simply a vertical line of points:
.. literalinclude:: 1-quantum_wire.py
.. literalinclude:: quantum_wire.py
:start-after: #HIDDEN_BEGIN_ndez
:end-before: #HIDDEN_END_ndez
......@@ -95,7 +95,7 @@ We also want to add a lead on the right side. The only difference to
the left lead is that the vector of the translational
symmetry must point to the right, the remaining code is the same:
.. literalinclude:: 1-quantum_wire.py
.. literalinclude:: quantum_wire.py
:start-after: #HIDDEN_BEGIN_xhqc
:end-before: #HIDDEN_END_xhqc
......@@ -107,7 +107,7 @@ you do not need to worry about that. The `~kwant.builder.Builder` with
infinitely extended. These isolated, infinite leads can then be simply
attached at the right position using:
.. literalinclude:: 1-quantum_wire.py
.. literalinclude:: quantum_wire.py
:start-after: #HIDDEN_BEGIN_fskr
:end-before: #HIDDEN_END_fskr
......@@ -117,13 +117,13 @@ More details about attaching leads can be found in the tutorial
Now we have finished building our system! We plot it, to make sure we didn't
make any mistakes:
.. literalinclude:: 1-quantum_wire.py
.. literalinclude:: quantum_wire.py
:start-after: #HIDDEN_BEGIN_wsgh
:end-before: #HIDDEN_END_wsgh
This should bring up this picture:
.. image:: /images/1-quantum_wire_sys.*
.. image:: /images/quantum_wire_sys.*
The system is represented in the usual way for tight-binding systems:
dots represent the lattice points `(i, j)`, and for every
......@@ -133,14 +133,14 @@ fading color.
In order to use our system for a transport calculation, we need to finalize it
.. literalinclude:: 1-quantum_wire.py
.. literalinclude:: quantum_wire.py
:start-after: #HIDDEN_BEGIN_dngj
:end-before: #HIDDEN_END_dngj
Having successfully created a system, we now can immediately start to compute
its conductance as a function of energy:
.. literalinclude:: 1-quantum_wire.py
.. literalinclude:: quantum_wire.py
:start-after: #HIDDEN_BEGIN_buzn
:end-before: #HIDDEN_END_buzn
......@@ -154,13 +154,13 @@ Finally we can use `matplotlib` to make a plot of the computed data
(although writing to file and using an external viewer such as
gnuplot or xmgrace is just as viable)
.. literalinclude:: 1-quantum_wire.py
.. literalinclude:: quantum_wire.py
:start-after: #HIDDEN_BEGIN_lliv
:end-before: #HIDDEN_END_lliv
This should yield the result
.. image:: /images/1-quantum_wire_result.*
.. image:: /images/quantum_wire_result.*
We see a conductance quantized in units of :math:`e^2/h`,
increasing in steps as the energy is increased. The
......@@ -170,7 +170,7 @@ subbands that increases with energy.
.. seealso::
The full source code can be found in
:download:`tutorial/1-quantum_wire.py <../../../tutorial/1-quantum_wire.py>`
:download:`tutorial/quantum_wire.py <../../../tutorial/quantum_wire.py>`
.. specialnote:: Technical details
......@@ -278,14 +278,14 @@ 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
`make_system`:
.. literalinclude:: 1-quantum_wire_revisited.py
.. literalinclude:: quantum_wire_revisited.py
:start-after: #HIDDEN_BEGIN_xkzy
:end-before: #HIDDEN_END_xkzy
Previously, the scattering region was build using two ``for``-loops.
Instead, we now write:
.. literalinclude:: 1-quantum_wire_revisited.py
.. literalinclude:: quantum_wire_revisited.py
:start-after: #HIDDEN_BEGIN_vvjt
:end-before: #HIDDEN_END_vvjt
......@@ -303,7 +303,7 @@ hoppings. In this case, an iterable like for the lattice
points becomes a bit cumbersome, and we use instead another
feature of kwant:
.. literalinclude:: 1-quantum_wire_revisited.py
.. literalinclude:: quantum_wire_revisited.py
:start-after: #HIDDEN_BEGIN_nooi
:end-before: #HIDDEN_END_nooi
......@@ -322,7 +322,7 @@ then sets all of those hopping matrix elements at once.
The leads can be constructed in an analogous way:
.. literalinclude:: 1-quantum_wire_revisited.py
.. literalinclude:: quantum_wire_revisited.py
:start-after: #HIDDEN_BEGIN_iepx
:end-before: #HIDDEN_END_iepx
......@@ -335,20 +335,20 @@ lead, but with it's translational vector reversed. This can thus be
used to obtain a lead pointing in the opposite direction, i.e. makes a
right lead from a left lead:
.. literalinclude:: 1-quantum_wire_revisited.py
.. literalinclude:: quantum_wire_revisited.py
:start-after: #HIDDEN_BEGIN_xkdo
:end-before: #HIDDEN_END_xkdo
The remainder of the code is identical to the previous example
(except for a bit of reorganization into functions):
.. literalinclude:: 1-quantum_wire_revisited.py
.. literalinclude:: quantum_wire_revisited.py
:start-after: #HIDDEN_BEGIN_yxot
:end-before: #HIDDEN_END_yxot
and
.. literalinclude:: 1-quantum_wire_revisited.py
.. literalinclude:: quantum_wire_revisited.py
:start-after: #HIDDEN_BEGIN_ayuk
:end-before: #HIDDEN_END_ayuk
......@@ -357,7 +357,7 @@ as a script, as well as allowing it to be imported as a module.
We collect all statements that should be executed in the script
in a ``main()``-function:
.. literalinclude:: 1-quantum_wire_revisited.py
.. literalinclude:: quantum_wire_revisited.py
:start-after: #HIDDEN_BEGIN_cjel
:end-before: #HIDDEN_END_cjel
......@@ -365,7 +365,7 @@ Finally, we use the following python construct [#]_ that executes
``main()`` if the program is used as a script (i.e. executed as
``python tutorial1b.py``):
.. literalinclude:: 1-quantum_wire_revisited.py
.. literalinclude:: quantum_wire_revisited.py
:start-after: #HIDDEN_BEGIN_ypbj
:end-before: #HIDDEN_END_ypbj
......@@ -379,13 +379,13 @@ The result of the example should be identical to the previous one.
.. seealso::
The full source code can be found in
:download:`tutorial/1-quantum_wire_revisited.py <../../../tutorial/1-quantum_wire_revisited.py>`
:download:`tutorial/quantum_wire_revisited.py <../../../tutorial/quantum_wire_revisited.py>`
.. specialnote:: Technical details
- In
.. literalinclude:: 1-quantum_wire_revisited.py
.. literalinclude:: quantum_wire_revisited.py
:start-after: #HIDDEN_BEGIN_nooi
:end-before: #HIDDEN_END_nooi
......@@ -416,7 +416,7 @@ The result of the example should be identical to the previous one.
using a tuple of sites. Hence it is worth noting
a subtle detail in
.. literalinclude:: 1-quantum_wire_revisited.py
.. literalinclude:: quantum_wire_revisited.py
:start-after: #HIDDEN_BEGIN_vvjt
:end-before: #HIDDEN_END_vvjt
......
......@@ -37,14 +37,14 @@ use matrices in our program, we import the tinyarray package. (`NumPy
<http://numpy.scipy.org/>`_ would work as well, but tinyarray is much faster
for small arrays.)
.. literalinclude:: 2-spin_orbit.py
.. literalinclude:: spin_orbit.py
:start-after: #HIDDEN_BEGIN_xumz
:end-before: #HIDDEN_END_xumz
For convenience, we define the Pauli-matrices first (with `sigma_0` the
unit matrix):
.. literalinclude:: 2-spin_orbit.py
.. literalinclude:: spin_orbit.py
:start-after: #HIDDEN_BEGIN_hwbt
:end-before: #HIDDEN_END_hwbt
......@@ -52,7 +52,7 @@ Previously, we used numbers as the values of our matrix elements.
However, `~kwant.builder.Builder` also accepts matrices as values, and
we can simply write:
.. literalinclude:: 2-spin_orbit.py
.. literalinclude:: spin_orbit.py
:start-after: #HIDDEN_BEGIN_uxrm
:end-before: #HIDDEN_END_uxrm
......@@ -81,18 +81,18 @@ when specifying `(1, 0)` it is not necessary to specify `(-1, 0)`),
The leads also allow for a matrix structure,
.. literalinclude:: 2-spin_orbit.py
.. literalinclude:: spin_orbit.py
:start-after: #HIDDEN_BEGIN_yliu
:end-before: #HIDDEN_END_yliu
The remainder of the code is unchanged, and as a result we should obtain
the following, clearly non-monotonic conductance steps:
.. image:: ../images/2-spin_orbit_result.*
.. image:: ../images/spin_orbit_result.*
.. seealso::
The full source code can be found in
:download:`tutorial/2-spin_orbit.py <../../../tutorial/2-spin_orbit.py>`
:download:`tutorial/spin_orbit.py <../../../tutorial/spin_orbit.py>`
.. specialnote:: Technical details
......@@ -144,7 +144,7 @@ changing the potential then implies the need to build up the system again.
Instead, we use a python *function* to define the onsite energies. We
define the potential profile of a quantum well as:
.. literalinclude:: 2-quantum_well.py
.. literalinclude:: quantum_well.py
:start-after: #HIDDEN_BEGIN_ehso
:end-before: #HIDDEN_END_ehso
......@@ -161,7 +161,7 @@ the transmission as a function of well depth.
kwant now allows us to pass a function as a value to
`~kwant.builder.Builder`:
.. literalinclude:: 2-quantum_well.py
.. literalinclude:: quantum_well.py
:start-after: #HIDDEN_BEGIN_coid
:end-before: #HIDDEN_END_coid
......@@ -177,7 +177,7 @@ of the lead -- this should be kept in mind.
Finally, we compute the transmission probability:
.. literalinclude:: 2-quantum_well.py
.. literalinclude:: quantum_well.py
:start-after: #HIDDEN_BEGIN_sqvr
:end-before: #HIDDEN_END_sqvr
......@@ -188,14 +188,14 @@ access to it
Subsequent calls to :func:`kwant.solve <kwant.solvers.sparse.solve>`
then will use the updated value of pot, and we get the result:
.. image:: ../images/2-quantum_well_result.*
.. image:: ../images/quantum_well_result.*
Starting from no potential (well depth = 0), we observe the typical
oscillatory transmission behavior through resonances in the quantum well.
.. seealso::
The full source code can be found in
:download:`tutorial/2-quantum_well.py <../../../tutorial/2-quantum_well.py>`
:download:`tutorial/quantum_well.py <../../../tutorial/quantum_well.py>`
.. warning::
......@@ -208,7 +208,7 @@ oscillatory transmission behavior through resonances in the quantum well.
- Functions can also be used for hoppings. In this case, they take
two `~kwant.builder.Site`'s as arguments.
- In tutorial/2-quantum_well.py, the line ::
- In tutorial/quantum_well.py, the line ::
pot = 0
......@@ -297,7 +297,7 @@ Up to now, we only dealt with simple wire geometries. Now we turn to the case
of a more complex geometry, namely transport through a quantum ring
that is pierced by a magnetic flux :math:`\Phi`:
.. image:: ../images/2-ab_ring_sketch.*
.. image:: ../images/ab_ring_sketch.*
For a flux line, it is possible to choose a gauge such that a
charged particle acquires a phase :math:`e\Phi/h` whenever it
......@@ -311,7 +311,7 @@ First, define a boolean function defining the desired shape, i.e. a function
that returns ``True`` whenever a point is inside the shape, and
``False`` otherwise:
.. literalinclude:: 2-ab_ring.py
.. literalinclude:: ab_ring.py
:start-after: #HIDDEN_BEGIN_eusz
:end-before: #HIDDEN_END_eusz
......@@ -322,7 +322,7 @@ We can now simply add all of the lattice points inside this shape at
once, using the function `~kwant.lattice.Square.shape`
provided by the lattice:
.. literalinclude:: 2-ab_ring.py
.. literalinclude:: ab_ring.py
:start-after: #HIDDEN_BEGIN_lcak
:end-before: #HIDDEN_END_lcak
......@@ -337,7 +337,7 @@ along the branch cut in the lower arm of the ring. For this we select
all hoppings in x-direction that are of the form `(lat(1, j), lat(0, j))`
with ``j<0``:
.. literalinclude:: 2-ab_ring.py
.. literalinclude:: ab_ring.py
:start-after: #HIDDEN_BEGIN_lvkt
:end-before: #HIDDEN_END_lvkt
......@@ -352,7 +352,7 @@ by the global variable `phi`.
For the leads, we can also use the ``lat.shape()``-functionality:
.. literalinclude:: 2-ab_ring.py
.. literalinclude:: ab_ring.py
:start-after: #HIDDEN_BEGIN_qwgr
:end-before: #HIDDEN_END_qwgr
......@@ -361,7 +361,7 @@ Here, the shape must cover *at least* one unit cell of the lead
Attaching the leads is done as before:
.. literalinclude:: 2-ab_ring.py
.. literalinclude:: ab_ring.py
:start-after: #HIDDEN_BEGIN_skbz
:end-before: #HIDDEN_END_skbz
......@@ -376,23 +376,23 @@ back (going opposite to the direction of the translational vector)
until it intersects the scattering region. At this intersection,
the lead is attached:
.. image:: ../images/2-ab_ring_sketch2.*
.. image:: ../images/ab_ring_sketch2.*
After the lead has been attached, the system should look like this:
.. image:: ../images/2-ab_ring_sys.*
.. image:: ../images/ab_ring_sys.*
The computation of the conductance goes in the same fashion as before.
Finally you should get the following result:
.. image:: ../images/2-ab_ring_result.*
.. image:: ../images/ab_ring_result.*
where one can observe the conductance oscillations with the
period of one flux quantum.
.. seealso::
The full source code can be found in
:download:`tutorial/2-ab_ring.py <../../../tutorial/2-ab_ring.py>`
:download:`tutorial/ab_ring.py <../../../tutorial/ab_ring.py>`
.. specialnote:: Technical details
......@@ -410,7 +410,7 @@ period of one flux quantum.
becomes more apparent if we attach the leads a bit further away
from the central axis o the ring, as was done in this example:
.. image:: ../images/2-ab_ring_note1.*
.. image:: ../images/ab_ring_note1.*
- Per default, `~kwant.builder.Builder.attach_lead` attaches
the lead to the "outside" of the structure, by tracing the
......@@ -425,7 +425,7 @@ period of one flux quantum.
starts the trace-back in the middle of the ring, resulting
in the lead being attached to the inner circle:
.. image:: ../images/2-ab_ring_note2.*
.. image:: ../images/ab_ring_note2.*
Note that here the lead is treated as if it would pass over
the other arm of the ring, without intersecting it.
......
......@@ -15,7 +15,7 @@ tight-binding wire.
Computing band structures in kwant is easy. Just define a lead in the
usual way:
.. literalinclude:: 3-band_structure.py
.. literalinclude:: band_structure.py
:start-after: #HIDDEN_BEGIN_zxip
:end-before: #HIDDEN_END_zxip
......@@ -37,13 +37,13 @@ momentum ``k`` as parameter it returns the eigenenergies of the translational
invariant system for that momentum. Computing these eigenenergies for a range
of momenta then yields the bandstructure:
.. literalinclude:: 3-band_structure.py
.. literalinclude:: band_structure.py
:start-after: #HIDDEN_BEGIN_pejz
:end-before: #HIDDEN_END_pejz
This gives the result:
.. image:: ../images/3-band_structure_result.*
.. image:: ../images/band_structure_result.*
where we observe the cosine-like dispersion of the square lattice. Close
to ``k=0`` this agrees well with the quadratic dispersion this tight-binding
......@@ -51,7 +51,7 @@ Hamiltonian is approximating.
.. seealso::
The full source code can be found in
:download:`tutorial/3-band_structure.py <../../../tutorial/3-band_structure.py>`
:download:`tutorial/band_structure.py <../../../tutorial/band_structure.py>`
Closed systems
..............
......@@ -67,14 +67,14 @@ circular quantum dot as a function of magnetic field
To compute the eigenenergies, we will make use of the linear algebra
functionality of `scipy <www.scipy.org>`_:
.. literalinclude:: 3-closed_system.py
.. literalinclude:: closed_system.py
:start-after: #HIDDEN_BEGIN_tibv
:end-before: #HIDDEN_END_tibv
We set up the system using the `shape`-function as in
:ref:`tutorial-abring`, but do not add any leads:
.. literalinclude:: 3-closed_system.py
.. literalinclude:: closed_system.py
:start-after: #HIDDEN_BEGIN_qlyd
:end-before: #HIDDEN_END_qlyd
......@@ -86,7 +86,7 @@ The spectrum can be obtained by diagonalizing the Hamiltonian of the
system, which in turn can be obtained from the finalized
system using `~kwant.system.System.hamiltonian_submatrix`:
.. literalinclude:: 3-closed_system.py
.. literalinclude:: closed_system.py
:start-after: #HIDDEN_BEGIN_yvri
:end-before: #HIDDEN_END_yvri
......@@ -94,7 +94,7 @@ In this toy model we use dense matrices and dense matrix algebra since
the system is very small. (In a real application one would probably
want to use sparse matrix methods.) Finally, we obtain the result:
.. image:: ../images/3-closed_system_result.*
.. image:: ../images/closed_system_result.*
At zero magnetic field several energy levels are degenerate (since our
quantum dot is rather symmetric). These degeneracies are split
......@@ -103,7 +103,7 @@ Landau level energies at higher magnetic fields [#]
.. seealso::
The full source code can be found in
:download:`tutorial/3-closed_system.py <../../../tutorial/3-closed_system.py>`
:download:`tutorial/closed_system.py <../../../tutorial/closed_system.py>`
.. specialnote:: Technical details
......
......@@ -14,7 +14,7 @@ We begin by defining the honeycomb lattice of graphene. This is
in principle already done in `kwant.lattice.Honeycomb`, but we do it
explicitly here to show how to define a new lattice:
.. literalinclude:: 4-graphene.py
.. literalinclude:: graphene.py
:start-after: #HIDDEN_BEGIN_hnla
:end-before: #HIDDEN_END_hnla
......@@ -27,7 +27,7 @@ itself forms a regular lattice of the same type as well, and those
In the next step we define the shape of the scattering region (circle again)
and add all lattice points using the ``shape()``-functionality:
.. literalinclude:: 4-graphene.py
.. literalinclude:: graphene.py
:start-after: #HIDDEN_BEGIN_shzy
:end-before: #HIDDEN_END_shzy
......@@ -42,7 +42,7 @@ As a next step we add the hoppings, making use of
lattice (instead of `kwant.lattice.Honeycomb`), we have to define
the hoppings ourselves:
.. literalinclude:: 4-graphene.py
.. literalinclude:: graphene.py
:start-after: #HIDDEN_BEGIN_hsmc
:end-before: #HIDDEN_END_hsmc
......@@ -60,7 +60,7 @@ respect to the two primitive vectors ``[(1, 0), (sin_30, cos_30)]``.
Adding the hoppings however still works the same way:
.. literalinclude:: 4-graphene.py
.. literalinclude:: graphene.py
:start-after: #HIDDEN_BEGIN_bfwb
:end-before: #HIDDEN_END_bfwb
......@@ -69,7 +69,7 @@ do something crazy, and remove an atom in sublattice A
(which removes also the hoppings from/to this site) as well
as add an additional link:
.. literalinclude:: 4-graphene.py
.. literalinclude:: graphene.py
:start-after: #HIDDEN_BEGIN_efut
:end-before: #HIDDEN_END_efut
......@@ -78,7 +78,7 @@ is done by the sublattices `a` and `b`.
The leads are defined almost as before:
.. literalinclude:: 4-graphene.py
.. literalinclude:: graphene.py
:start-after: #HIDDEN_BEGIN_aakh
:end-before: #HIDDEN_END_aakh
......@@ -97,14 +97,14 @@ Later, we will compute some eigenvalues of the closed scattering region without
leads. This is why we postpone attaching the leads to the system. Instead,
we return the scattering region and the leads separately.
.. literalinclude:: 4-graphene.py
.. literalinclude:: graphene.py
:start-after: #HIDDEN_BEGIN_kmmw
:end-before: #HIDDEN_END_kmmw
The computation of some eigenvalues of the closed system is done
in the following piece of code:
.. literalinclude:: 4-graphene.py
.. literalinclude:: graphene.py
:start-after: #HIDDEN_BEGIN_zydk
:end-before: #HIDDEN_END_zydk
......@@ -120,7 +120,7 @@ to the previous examples, and needs not be further explained here.
Finally, in the `main()` function we make and
plot the system:
.. literalinclude:: 4-graphene.py
.. literalinclude:: graphene.py
:start-after: #HIDDEN_BEGIN_itkk
:end-before: #HIDDEN_END_itkk
......@@ -137,11 +137,11 @@ independent on the overall figure size.
Plotting the closed system gives this result:
.. image:: ../images/4-graphene_sys1.*
.. image:: ../images/graphene_sys1.*
Computing the eigenvalues of largest magnitude,
.. literalinclude:: 4-graphene.py
.. literalinclude:: graphene.py
:start-after: #HIDDEN_BEGIN_jmbi
:end-before: #HIDDEN_END_jmbi
......@@ -152,11 +152,11 @@ would be equal to zero for exact arithmetics).
The remaining code of `main()` attaches the leads to the system and plots it
again:
.. image:: ../images/4-graphene_sys2.*
.. image:: ../images/graphene_sys2.*
It computes the band structure of one of lead 0:
.. image:: ../images/4-graphene_bs.*
.. image:: ../images/graphene_bs.*
showing all the features of a zigzag lead, including the flat
edge state bands (note that the band structure is not symmetric around
......@@ -164,14 +164,14 @@ zero energy, as we have a potential in the leads).
Finally the transmission through the system is computed,
.. image:: ../images/4-graphene_result.*
.. image:: ../images/graphene_result.*
showing the typical resonance-like transmission probability through
an open quantum dot
.. seealso::
The full source code can be found in
:download:`tutorial/4-graphene.py <../../../tutorial/4-graphene.py>`
:download:`tutorial/graphene.py <../../../tutorial/graphene.py>`
.. specialnote:: Technical details
......
......@@ -28,7 +28,7 @@ We begin by computing the band structure of a superconducting wire.
The most natural way to implement the BdG Hamiltonian is by using a
2x2 matrix structure for all Hamiltonian matrix elements:
.. literalinclude:: 5-superconductor_band_structure.py
.. literalinclude:: superconductor_band_structure.py
:start-after: #HIDDEN_BEGIN_nbvn
:end-before: #HIDDEN_END_nbvn
......@@ -38,14 +38,14 @@ is now that the Pauli matrices act in electron-hole space.
Computing the band structure then yields the result
.. image:: ../images/5-superconductor_band_structure_result.*
.. image:: ../images/superconductor_band_structure_result.*
We clearly observe the superconducting gap in the spectrum. That was easy,
he?
.. seealso::
The full source code can be found in
:download:`tutorial/5-superconductor_band_structure.py <../../../tutorial/5-superconductor_band_structure.py>`
:download:`tutorial/superconductor_band_structure.py <../../../tutorial/superconductor_band_structure.py>`
"Lattice description": Using different lattices
......@@ -76,12 +76,12 @@ separate "leads" for electrons and holes, making use of different
lattices. The system we consider consists of a normal lead on the left,
a superconductor on the right, and a tunnel barrier inbetween:
.. image:: ../images/5-superconductor_transport_sketch.*
.. image:: ../images/superconductor_transport_sketch.*
As already mentioned above, we begin by introducing two different
square lattices representing electron and hole degrees of freedom:
.. literalinclude:: 5-superconductor_transport.py
.. literalinclude:: superconductor_transport.py
:start-after: #HIDDEN_BEGIN_zuuw
:end-before: #HIDDEN_END_zuuw
......@@ -93,7 +93,7 @@ the *same* lattice, whereas any off-diagonal entry (essentially, the
superconducting order parameter :math:`\Delta`) corresponds
to a hopping between *different* lattices:
.. literalinclude:: 5-superconductor_transport.py
.. literalinclude:: superconductor_transport.py
:start-after: #HIDDEN_BEGIN_pqmp
:end-before: #HIDDEN_END_pqmp
......@@ -108,7 +108,7 @@ part. We use this fact to attach purely electron and hole leads
(comprised of only electron *or* hole lattices) to the
system:
.. literalinclude:: 5-superconductor_transport.py
.. literalinclude:: superconductor_transport.py
:start-after: #HIDDEN_BEGIN_ttth
:end-before: #HIDDEN_END_ttth
......@@ -118,7 +118,7 @@ reflection probablities between electrons and holes explicitely.
On the superconducting side, we cannot do this separation, and can
only define a single lead coupling electrons and holes:
.. literalinclude:: 5-superconductor_transport.py
.. literalinclude:: superconductor_transport.py
:start-after: #HIDDEN_BEGIN_mhiw
:end-before: #HIDDEN_END_mhiw
......@@ -126,7 +126,7 @@ We now have on the left side two leads that are sitting in the same
spatial position, but in different lattice spaces. This ensures that
we can still attach all leads as before:
.. literalinclude:: 5-superconductor_transport.py
.. literalinclude:: superconductor_transport.py
:start-after: #HIDDEN_BEGIN_ozsr
:end-before: #HIDDEN_END_ozsr
......@@ -136,7 +136,7 @@ confused by the fact that it says ``transmission`` -- transmission
into the same lead is reflection), and reflection from electrons to holes
as ``smatrix.transmission(1, 0)``, by virtue of our electron and hole leads:
.. literalinclude:: 5-superconductor_transport.py
.. literalinclude:: superconductor_transport.py
:start-after: #HIDDEN_BEGIN_jbjt
:end-before: #HIDDEN_END_jbjt
......@@ -146,7 +146,7 @@ within (electron) lead 0, and from its size we can extract the number of modes
Finally, for the default parameters, we obtain the following result:
.. image:: ../images/5-superconductor_transport_result.*
.. image:: ../images/superconductor_transport_result.*
We a see a conductance that is proportional to the square of the tunneling
probability within the gap, and proportional to the tunneling probability
......@@ -154,7 +154,7 @@ above the gap. At the gap edge, we observe a resonant Andreev reflection.
.. seealso::
The full source code can be found in
:download:`tutorial/5-superconductor_transport.py <../../../tutorial/5-superconductor_transport.py>`
:download:`tutorial/superconductor_transport.py <../../../tutorial/superconductor_transport.py>`
.. specialnote:: Technical details
......
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