diff --git a/academic_codes/2021.12.27_Chern_numbers_of_Landau_levels/Chern_numbers_of_Landau_levels_in_honeycomb_lattice.py b/academic_codes/2021.12.27_Chern_numbers_of_Landau_levels/Chern_numbers_of_Landau_levels_in_honeycomb_lattice.py deleted file mode 100644 index 673b5a2..0000000 --- a/academic_codes/2021.12.27_Chern_numbers_of_Landau_levels/Chern_numbers_of_Landau_levels_in_honeycomb_lattice.py +++ /dev/null @@ -1,57 +0,0 @@ -""" -This code is supported by the website: https://www.guanjihuan.com -The newest version of this code is on the web page: https://www.guanjihuan.com/archives/18306 -""" - -import numpy as np -from math import * -import cmath -import functools -import guan - - -def hamiltonian(kx, ky, Ny, a, B): - h00 = np.zeros((4*Ny, 4*Ny), dtype=complex) - h01 = np.zeros((4*Ny, 4*Ny), dtype=complex) - t1= 1 - M = 0 - for i in range(Ny): - h00[i*4+0, i*4+0] = M - h00[i*4+1, i*4+1] = -M - h00[i*4+2, i*4+2] = M - h00[i*4+3, i*4+3] = -M - h00[i*4+0, i*4+1] = t1*cmath.exp(-2*pi*1j*B*(3*a*i+1/4*a)*(np.sqrt(3)/2*a)) - h00[i*4+1, i*4+0] = np.conj(h00[i*4+0, i*4+1]) - h00[i*4+1, i*4+2] = t1 - h00[i*4+2, i*4+1] = np.conj(h00[i*4+1, i*4+2]) - h00[i*4+2, i*4+3] = t1*cmath.exp(2*pi*1j*B*(3*a*i+7/4*a)*(np.sqrt(3)/2)*a) - h00[i*4+3, i*4+2] = np.conj(h00[i*4+2, i*4+3]) - for i in range(Ny-1): - h00[i*4+3, (i+1)*4+0] = t1 - h00[(i+1)*4+0, i*4+3] = t1 - h00[(Ny-1)*4+3, 0+0] = t1*cmath.exp(1j*ky) - h00[0+0, (Ny-1)*4+3] = t1*cmath.exp(-1j*ky) - for i in range(Ny): - h01[i*4+1, i*4+0] = t1*cmath.exp(-2*pi*1j*B*(3*a*i+1/4*a)*(np.sqrt(3)/2*a)) - h01[i*4+2, i*4+3] = t1*cmath.exp(-2*pi*1j*B*(3*a*i+7/4*a)*(np.sqrt(3)/2*a)) - matrix = h00 + h01*cmath.exp(1j*kx) + h01.transpose().conj()*cmath.exp(-1j*kx) - return matrix - - -def main(): - Ny = 5 - a = 1 - - k_array = np.linspace(-pi, pi, 100) - H_k = functools.partial(hamiltonian, ky=0, Ny=Ny, a=a, B=1/(3*a*Ny)) - eigenvalue_array = guan.calculate_eigenvalue_with_one_parameter(k_array, H_k) - guan.plot(k_array, eigenvalue_array, xlabel='kx', ylabel='E', type='k') - - H_k = functools.partial(hamiltonian, Ny=Ny, a=a, B=1/(3*a*Ny)) - chern_number = guan.calculate_chern_number_for_square_lattice(H_k, precision=100) - print(chern_number) - print(sum(chern_number)) - - -if __name__ == '__main__': - main() \ No newline at end of file diff --git a/academic_codes/2021.12.27_Chern_numbers_of_Landau_levels/Chern_numbers_of_Landau_levels_in_square_lattice.py b/academic_codes/2021.12.27_Chern_numbers_of_Landau_levels/Chern_numbers_of_Landau_levels_in_square_lattice.py index f19bda6..95d6d55 100644 --- a/academic_codes/2021.12.27_Chern_numbers_of_Landau_levels/Chern_numbers_of_Landau_levels_in_square_lattice.py +++ b/academic_codes/2021.12.27_Chern_numbers_of_Landau_levels/Chern_numbers_of_Landau_levels_in_square_lattice.py @@ -25,7 +25,7 @@ def hamiltonian(kx, ky, Ny, B): def main(): - Ny = 20 + Ny = 21 k_array = np.linspace(-pi, pi, 100) H_k = functools.partial(hamiltonian, ky=0, Ny=Ny, B=1/Ny) diff --git a/academic_codes/2021.12.27_Chern_numbers_of_Landau_levels/quantum_transport_of_square_lattice_under_magnetic_fields_in_multi_lead_systems_with_guan.py b/academic_codes/2021.12.27_Chern_numbers_of_Landau_levels/quantum_transport_of_square_lattice_under_magnetic_fields_in_multi_lead_systems_with_guan.py index fa059ce..b386a73 100644 --- a/academic_codes/2021.12.27_Chern_numbers_of_Landau_levels/quantum_transport_of_square_lattice_under_magnetic_fields_in_multi_lead_systems_with_guan.py +++ b/academic_codes/2021.12.27_Chern_numbers_of_Landau_levels/quantum_transport_of_square_lattice_under_magnetic_fields_in_multi_lead_systems_with_guan.py @@ -36,8 +36,8 @@ def get_center_hamiltonian(Nx, Ny, B): def main(): start_time = time.time() - width = 20 - length = 70 + width = 21 + length = 72 fermi_energy_array = np.arange(-4, 4, .05) # 中心区的哈密顿量