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

tutorial: simplify superconductor_transport.py

parent bc881111
No related branches found
No related tags found
No related merge requests found
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
def make_system(a=1, W=10, L=10, barrier=1.5, barrierpos=(3, 4), def make_system(a=1, W=10, L=10, barrier=1.5, barrierpos=(3, 4),
@@ -94,19 +95,23 @@ @@ -82,19 +83,23 @@
smatrix.transmission(0, 0) + smatrix.transmission(0, 0) +
smatrix.transmission(1, 0)) smatrix.transmission(1, 0))
......
...@@ -35,11 +35,9 @@ def make_system(a=1, W=10, L=10, barrier=1.5, barrierpos=(3, 4), ...@@ -35,11 +35,9 @@ def make_system(a=1, W=10, L=10, barrier=1.5, barrierpos=(3, 4),
sys[(lat_h(x, y) for x in range(barrierpos[0], barrierpos[1]) sys[(lat_h(x, y) for x in range(barrierpos[0], barrierpos[1])
for y in range(W))] = mu - 4 * t - barrier for y in range(W))] = mu - 4 * t - barrier
# hoppings in x and y-directions, for both electrons and holes # hoppings for both electrons and holes
sys[kwant.builder.HoppingKind((1, 0), lat_e, lat_e)] = -t sys[lat_e.nearest] = -t
sys[kwant.builder.HoppingKind((0, 1), lat_e, lat_e)] = -t sys[lat_h.nearest] = t
sys[kwant.builder.HoppingKind((1, 0), lat_h, lat_h)] = t
sys[kwant.builder.HoppingKind((0, 1), lat_h, lat_h)] = t
# Superconducting order parameter enters as hopping between # Superconducting order parameter enters as hopping between
# electrons and holes # electrons and holes
...@@ -55,16 +53,12 @@ def make_system(a=1, W=10, L=10, barrier=1.5, barrierpos=(3, 4), ...@@ -55,16 +53,12 @@ def make_system(a=1, W=10, L=10, barrier=1.5, barrierpos=(3, 4),
# left electron lead # left electron lead
lead0 = kwant.Builder(sym_left) lead0 = kwant.Builder(sym_left)
lead0[(lat_e(0, j) for j in xrange(W))] = 4 * t - mu lead0[(lat_e(0, j) for j in xrange(W))] = 4 * t - mu
# hoppings in x and y-direction lead0[lat_e.nearest] = -t
lead0[kwant.builder.HoppingKind((1, 0), lat_e, lat_e)] = -t
lead0[kwant.builder.HoppingKind((0, 1), lat_e, lat_e)] = -t
# left hole lead # left hole lead
lead1 = kwant.Builder(sym_left) lead1 = kwant.Builder(sym_left)
lead1[(lat_h(0, j) for j in xrange(W))] = mu - 4 * t lead1[(lat_h(0, j) for j in xrange(W))] = mu - 4 * t
# hoppings in x and y-direction lead1[lat_h.nearest] = t
lead1[kwant.builder.HoppingKind((1, 0), lat_h, lat_h)] = t
lead1[kwant.builder.HoppingKind((0, 1), lat_h, lat_h)] = t
#HIDDEN_END_ttth #HIDDEN_END_ttth
# Then the lead to the right # Then the lead to the right
...@@ -73,14 +67,8 @@ def make_system(a=1, W=10, L=10, barrier=1.5, barrierpos=(3, 4), ...@@ -73,14 +67,8 @@ def make_system(a=1, W=10, L=10, barrier=1.5, barrierpos=(3, 4),
#HIDDEN_BEGIN_mhiw #HIDDEN_BEGIN_mhiw
sym_right = kwant.TranslationalSymmetry((a, 0)) sym_right = kwant.TranslationalSymmetry((a, 0))
lead2 = kwant.Builder(sym_right) lead2 = kwant.Builder(sym_right)
lead2 += lead0
lead2[(lat_e(0, j) for j in xrange(W))] = 4 * t - mu lead2 += lead1
lead2[(lat_h(0, j) for j in xrange(W))] = mu - 4 * t
# hoppings in x and y-direction
lead2[kwant.builder.HoppingKind((1, 0), lat_e, lat_e)] = -t
lead2[kwant.builder.HoppingKind((0, 1), lat_e, lat_e)] = -t
lead2[kwant.builder.HoppingKind((1, 0), lat_h, lat_h)] = t
lead2[kwant.builder.HoppingKind((0, 1), lat_h, lat_h)] = t
lead2[((lat_e(0, j), lat_h(0, j)) for j in xrange(W))] = Delta lead2[((lat_e(0, j), lat_h(0, j)) for j in xrange(W))] = Delta
#HIDDEN_END_mhiw #HIDDEN_END_mhiw
......
...@@ -86,9 +86,9 @@ square lattices representing electron and hole degrees of freedom: ...@@ -86,9 +86,9 @@ square lattices representing electron and hole degrees of freedom:
:end-before: #HIDDEN_END_zuuw :end-before: #HIDDEN_END_zuuw
Note that since these two lattices have identical spatial parameters, the Note that since these two lattices have identical spatial parameters, the
argument `name` to `~kwant.lattice.square` has to be different for two lattices. argument `name` to `~kwant.lattice.square` has to be different.
Any diagonal entry (kinetic energy, potentials, ...) in the BdG Any diagonal entry (kinetic energy, potentials, ...) in the BdG
Hamiltonian then corresponds to on-site energies or hoppings within Hamiltonian corresponds to on-site energies or hoppings within
the *same* lattice, whereas any off-diagonal entry (essentially, the the *same* lattice, whereas any off-diagonal entry (essentially, the
superconducting order parameter :math:`\Delta`) corresponds superconducting order parameter :math:`\Delta`) corresponds
to a hopping between *different* lattices: to a hopping between *different* lattices:
...@@ -115,8 +115,9 @@ system: ...@@ -115,8 +115,9 @@ system:
This separation into two different leads allows us then later to compute the This separation into two different leads allows us then later to compute the
reflection probablities between electrons and holes explicitely. reflection probablities between electrons and holes explicitely.
On the superconducting side, we cannot do this separation, and can On the superconducting side, we cannot do this separation, and can only define a
only define a single lead coupling electrons and holes: single lead coupling electrons and holes (The `+=` operator adds all the sites
and hoppings present in one builder to another):
.. literalinclude:: superconductor_transport.py .. literalinclude:: superconductor_transport.py
:start-after: #HIDDEN_BEGIN_mhiw :start-after: #HIDDEN_BEGIN_mhiw
......
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