From faa54f36921db3c7d7992dc63f89bd44522a3d39 Mon Sep 17 00:00:00 2001
From: Mathieu Istas <mathieu.istas@cea.fr>
Date: Mon, 2 Nov 2015 14:54:56 +0100
Subject: [PATCH] fix ab_ring hopping

---
 doc/source/tutorial/ab_ring.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/doc/source/tutorial/ab_ring.py b/doc/source/tutorial/ab_ring.py
index bd23bbf1..5df7ecda 100644
--- a/doc/source/tutorial/ab_ring.py
+++ b/doc/source/tutorial/ab_ring.py
@@ -50,8 +50,8 @@ def make_system(a=1, t=1.0, W=10, r1=10, r2=20):
     # define the modified hoppings as a function that takes the flux as its
     # parameter phi.
 #HIDDEN_BEGIN_lvkt
-    def fluxphase(site1, site2, phi):
-        return exp(1j * phi)
+    def hopping_phase(site1, site2, phi):
+        return -t * exp(1j * phi)
 
     def crosses_branchcut(hop):
         ix0, iy0 = hop[0].tag
@@ -65,7 +65,7 @@ def make_system(a=1, t=1.0, W=10, r1=10, r2=20):
         for hop in kwant.builder.HoppingKind((1, 0), lat, lat)(sys):
             if crosses_branchcut(hop):
                 yield hop
-    sys[hops_across_cut] = fluxphase
+    sys[hops_across_cut] = hopping_phase
 #HIDDEN_END_lvkt
 
     #### Define the leads. ####
-- 
GitLab