Hello (again),
Everything is in the title.
I want to implement random (and complex) next nearest neighbors hopping in a Haldane infinite wire.
Without the random part, 'kwant.plotter.bands()' correctly plot the band structure of my system.
However, when I add a random contribution on the modulus of the NNN hopping term, I get an error from 'kwant.plotter.bands()' :
'The cell Hamiltonian is not Hermitian'
Which is strange because I red everywhere that the hermicity constraint is always fullfilled using Kwant.
The function for random NNN hopping works perfectly fine for a finite system.
So, is this comming from the inter-cell hopping terms ? If so, how to correct it ?
Kwant does not consider the hopping terms of both ends of the cell as being equal ? It should be because u_k(r) = u_k(r+R) is like periodic boundary conditions for u_k.
I add my script at the end so you can see for yourself (the NNN hopping randomness parameter is 'rand_nnn').
Best regards,
Alexandre BERNARD
----------------- my script ----------------------
from types import SimpleNamespace
import matplotlib
import math
from matplotlib import pyplot
from mpl_toolkits import mplot3d
import numpy as np
import random
import kwant
def random_uni(param):
return param*(random.random() - 0.5)*2 # returns a random number between +param and -param
def onsite(site, p):
# Here we affect a potential whose sign depends on which sublattice the atom lives in (breaking sublattice symmetry)
if site.family == A: # sublattice A
return p.m + random_uni(p.rand_os)
else: # sublattice B
return -p.m + random_uni(p.rand_os)
def nn_hopping(site1, site2, params):
return params.t_1 + random_uni(params.rand_nn)
def nnn_hopping(site1, site2, params):
return (math.cos(params.phi) + 1j*math.sin(params.phi)) * (params.t_2 + random_uni(params.rand_nnn))
def ribbon_shape_armchair(pos):
return (-1 <= pos[0] < w)
def hopping_color(site1, site2):
if site1.family == A and site2.family == A:
return 'b'
elif site1.family == B and site2.family == B:
return 'r'
else:
return '0.5'
def site_color(site):
if site.family == A:
return 'b'
else:
return 'r'
np.random.seed(271828) # Fixing the RNG seed for reproducibility (or not, because of how Kwant works)
# Graphene lattice "pointing up", with two sublattices
graphene = kwant.lattice.general([[1, 0], [1/2, np.sqrt(3)/2]], # Here are the vectors of the Bravais lattice
[[0, 0], [0, 1/np.sqrt(3)]]) # Here are the positions of the atoms in the unit cell
A, B = graphene.sublattices
w = 29 # width of the ribbon
p = SimpleNamespace(t_1=1.0, t_2=0.1, m=0.0, phi=np.pi/2, rand_os=0., rand_nn=0., rand_nnn=0.1)
# Creation of the list of (oriented) bonds that will have the complex hopping term
nnn_hoppings_A = (((-1, 0), A, A), ((0, 1), A, A), ((1, -1), A, A)) # Bonds within the A sublattice
nnn_hoppings_B = (((1, 0), B, B), ((0, -1), B, B), ((-1, 1), B, B)) # Bonds within the B sublattice
nnn_hoppings = nnn_hoppings_A + nnn_hoppings_B
haldane_armchair = kwant.Builder(kwant.TranslationalSymmetry((0, 1*np.sqrt(3))))
haldane_armchair[graphene.shape(ribbon_shape_armchair, (0, 0))] = onsite
haldane_armchair[graphene.neighbors(1)] = nn_hopping
haldane_armchair[[kwant.builder.HoppingKind(*hopping) for hopping in nnn_hoppings]] = nnn_hopping
kwant.plot(haldane_armchair, site_color=site_color, hop_color=hopping_color, fig_size=(6, 9));
kwant.plotter.bands(haldane_armchair.finalized(), args=[p], fig_size=(12, 8));