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

update tutorial example diff, removing unneeded hunk

parent faa54f36
No related branches found
No related tags found
No related merge requests found
......@@ -8,27 +8,7 @@
from cmath import exp
from math import pi
@@ -40,12 +41,13 @@
sys[lat.shape(ring, (0, r1 + 1))] = 4 * t
sys[lat.neighbors()] = -t
- # In order to introduce a flux through the ring, we introduce a phase on
- # the hoppings on the line cut through one of the arms. Since we want to
- # change the flux without modifying the Builder instance repeatedly, we
- # define the modified hoppings as a function that takes the flux as its
- # parameter phi.
- def fluxphase(site1, site2, phi):
+ # In order to introduce a flux through the ring, we introduce a phase
+ # on the hoppings on the line cut through one of the arms
+
+ # since we want to change the flux without modifying Builder repeatedly,
+ # we define the modified hoppings as a function that takes the flux
+ # through the argument phi.
+ def fluxphase(site1, site2, phi=0):
return exp(1j * phi)
def crosses_branchcut(hop):
@@ -81,6 +83,50 @@
@@ -81,6 +82,50 @@
return sys
......@@ -79,7 +59,7 @@
def plot_conductance(sys, energy, fluxes):
# compute conductance
@@ -90,18 +136,31 @@
@@ -90,18 +135,31 @@
smatrix = kwant.smatrix(sys, energy, args=[flux])
data.append(smatrix.transmission(1, 0))
......@@ -116,7 +96,7 @@
# Finalize the system.
sys = sys.finalized()
@@ -111,6 +170,17 @@
@@ -111,6 +169,17 @@
for i in xrange(100)])
......
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