calculate_Chern_number_and_Wilson_loop.py
Code:
import guan
import numpy as np
from math import *
chern_number = guan.calculate_chern_number_for_square_lattice_with_efficient_method(guan.hamiltonian_of_one_QAH_model, precision=100)
print('\nChern number=', chern_number, '\n')
wilson_loop_array = guan.calculate_wilson_loop(guan.hamiltonian_of_ssh_model)
print('Wilson loop =', wilson_loop_array)
p = np.log(wilson_loop_array)/2/pi/1j
print('\np =', p, '\n')
Result:
Chern number= [ 2.+3.86719046e-15j -2.-6.41569501e-15j]
Wilson loop = [-0.9381143+2.91433544e-16j -0.9381143+2.91433544e-16j]
p = [0.5+0.01016737j 0.5+0.01016737j]