From dffafbb61ee7424991ab7480842c4ebfa7b790da Mon Sep 17 00:00:00 2001 From: guanjihuan Date: Sun, 9 Oct 2022 02:51:02 +0800 Subject: [PATCH] update --- .../Wilson_loop_in_SSH_model.py | 2 +- .../Wilson_loop_in_SSH_model_with_better_code.py | 2 +- ...graphene_under_broken_inversion_symmery_with_Kubo_formula.py | 2 +- ..._graphene_under_broken_inversion_symmery_with_Wilson_loop.py | 2 +- ..._under_broken_inversion_symmery_with_the_efficient_method.py | 2 +- ...y_curvature_distribution_with_Wilson_loop_(function_form).py | 2 +- ...tion_with_Wilson_loop_for_degenerate_case_(function_form).py | 2 +- ...re_distribution_with_the_efficient_method_(function_form).py | 2 +- ..._the_efficient_method_for_degenerate_case_(function_form).py | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/academic_codes/2021.03.01_Wilson_loop_in_SSH_model/Wilson_loop_in_SSH_model.py b/academic_codes/2021.03.01_Wilson_loop_in_SSH_model/Wilson_loop_in_SSH_model.py index 5681eb9..0177fbc 100755 --- a/academic_codes/2021.03.01_Wilson_loop_in_SSH_model/Wilson_loop_in_SSH_model.py +++ b/academic_codes/2021.03.01_Wilson_loop_in_SSH_model/Wilson_loop_in_SSH_model.py @@ -11,7 +11,7 @@ from math import * def hamiltonian(k): # SSH模型哈密顿量 gamma = 0.5 lambda0 = 1 - h = np.zeros((2, 2))*(1+0j) + h = np.zeros((2, 2), dtype=complex) h[0,0] = 0 h[1,1] = 0 h[0,1] = gamma+lambda0*cmath.exp(-1j*k) diff --git a/academic_codes/2021.03.01_Wilson_loop_in_SSH_model/Wilson_loop_in_SSH_model_with_better_code.py b/academic_codes/2021.03.01_Wilson_loop_in_SSH_model/Wilson_loop_in_SSH_model_with_better_code.py index 96f9931..adfc149 100755 --- a/academic_codes/2021.03.01_Wilson_loop_in_SSH_model/Wilson_loop_in_SSH_model_with_better_code.py +++ b/academic_codes/2021.03.01_Wilson_loop_in_SSH_model/Wilson_loop_in_SSH_model_with_better_code.py @@ -12,7 +12,7 @@ def hamiltonian(k): gamma = 0.5 lambda0 = 1 delta = 0 - h = np.zeros((2, 2))*(1+0j) + h = np.zeros((2, 2), dtype=complex) h[0,0] = delta h[1,1] = -delta h[0,1] = gamma+lambda0*cmath.exp(-1j*k) diff --git a/academic_codes/2022.04.21_Berry_curvature/Berry_curvature_distribution_of_graphene_under_broken_inversion_symmery_with_Kubo_formula.py b/academic_codes/2022.04.21_Berry_curvature/Berry_curvature_distribution_of_graphene_under_broken_inversion_symmery_with_Kubo_formula.py index 2ea3bbb..1cd68e8 100644 --- a/academic_codes/2022.04.21_Berry_curvature/Berry_curvature_distribution_of_graphene_under_broken_inversion_symmery_with_Kubo_formula.py +++ b/academic_codes/2022.04.21_Berry_curvature/Berry_curvature_distribution_of_graphene_under_broken_inversion_symmery_with_Kubo_formula.py @@ -10,7 +10,7 @@ import cmath def hamiltonian(k1, k2, t1=2.82, a=1/sqrt(3)): # 石墨烯哈密顿量(a为原子间距,不赋值的话默认为1/sqrt(3)) - h = np.zeros((2, 2))*(1+0j) + h = np.zeros((2, 2), dtype=complex) h[0, 0] = 0.28/2 h[1, 1] = -0.28/2 h[1, 0] = t1*(cmath.exp(1j*k2*a)+cmath.exp(1j*sqrt(3)/2*k1*a-1j/2*k2*a)+cmath.exp(-1j*sqrt(3)/2*k1*a-1j/2*k2*a)) diff --git a/academic_codes/2022.04.21_Berry_curvature/Berry_curvature_distribution_of_graphene_under_broken_inversion_symmery_with_Wilson_loop.py b/academic_codes/2022.04.21_Berry_curvature/Berry_curvature_distribution_of_graphene_under_broken_inversion_symmery_with_Wilson_loop.py index d9093fd..9b6699b 100644 --- a/academic_codes/2022.04.21_Berry_curvature/Berry_curvature_distribution_of_graphene_under_broken_inversion_symmery_with_Wilson_loop.py +++ b/academic_codes/2022.04.21_Berry_curvature/Berry_curvature_distribution_of_graphene_under_broken_inversion_symmery_with_Wilson_loop.py @@ -10,7 +10,7 @@ import cmath def hamiltonian(k1, k2, t1=2.82, a=1/sqrt(3)): # 石墨烯哈密顿量(a为原子间距,不赋值的话默认为1/sqrt(3)) - h = np.zeros((2, 2))*(1+0j) + h = np.zeros((2, 2), dtype=complex) h[0, 0] = 0.28/2 h[1, 1] = -0.28/2 h[1, 0] = t1*(cmath.exp(1j*k2*a)+cmath.exp(1j*sqrt(3)/2*k1*a-1j/2*k2*a)+cmath.exp(-1j*sqrt(3)/2*k1*a-1j/2*k2*a)) diff --git a/academic_codes/2022.04.21_Berry_curvature/Berry_curvature_distribution_of_graphene_under_broken_inversion_symmery_with_the_efficient_method.py b/academic_codes/2022.04.21_Berry_curvature/Berry_curvature_distribution_of_graphene_under_broken_inversion_symmery_with_the_efficient_method.py index 340d523..f120582 100644 --- a/academic_codes/2022.04.21_Berry_curvature/Berry_curvature_distribution_of_graphene_under_broken_inversion_symmery_with_the_efficient_method.py +++ b/academic_codes/2022.04.21_Berry_curvature/Berry_curvature_distribution_of_graphene_under_broken_inversion_symmery_with_the_efficient_method.py @@ -10,7 +10,7 @@ import cmath def hamiltonian(k1, k2, t1=2.82, a=1/sqrt(3)): # 石墨烯哈密顿量(a为原子间距,不赋值的话默认为1/sqrt(3)) - h = np.zeros((2, 2))*(1+0j) + h = np.zeros((2, 2), dtype=complex) h[0, 0] = 0.28/2 h[1, 1] = -0.28/2 h[1, 0] = t1*(cmath.exp(1j*k2*a)+cmath.exp(1j*sqrt(3)/2*k1*a-1j/2*k2*a)+cmath.exp(-1j*sqrt(3)/2*k1*a-1j/2*k2*a)) diff --git a/academic_codes/2022.08.13_Berry_curvature_distribution_in_function_form/Berry_curvature_distribution_with_Wilson_loop_(function_form).py b/academic_codes/2022.08.13_Berry_curvature_distribution_in_function_form/Berry_curvature_distribution_with_Wilson_loop_(function_form).py index b882254..a62c656 100644 --- a/academic_codes/2022.08.13_Berry_curvature_distribution_in_function_form/Berry_curvature_distribution_with_Wilson_loop_(function_form).py +++ b/academic_codes/2022.08.13_Berry_curvature_distribution_in_function_form/Berry_curvature_distribution_with_Wilson_loop_(function_form).py @@ -10,7 +10,7 @@ import math def hamiltonian(k1, k2, t1=2.82, a=1/sqrt(3)): # 石墨烯哈密顿量(a为原子间距,不赋值的话默认为1/sqrt(3)) - h = np.zeros((2, 2))*(1+0j) + h = np.zeros((2, 2), dtype=complex) h[0, 0] = 0.28/2 h[1, 1] = -0.28/2 h[1, 0] = t1*(cmath.exp(1j*k2*a)+cmath.exp(1j*sqrt(3)/2*k1*a-1j/2*k2*a)+cmath.exp(-1j*sqrt(3)/2*k1*a-1j/2*k2*a)) diff --git a/academic_codes/2022.08.13_Berry_curvature_distribution_in_function_form/Berry_curvature_distribution_with_Wilson_loop_for_degenerate_case_(function_form).py b/academic_codes/2022.08.13_Berry_curvature_distribution_in_function_form/Berry_curvature_distribution_with_Wilson_loop_for_degenerate_case_(function_form).py index 34e2d44..fb59291 100644 --- a/academic_codes/2022.08.13_Berry_curvature_distribution_in_function_form/Berry_curvature_distribution_with_Wilson_loop_for_degenerate_case_(function_form).py +++ b/academic_codes/2022.08.13_Berry_curvature_distribution_in_function_form/Berry_curvature_distribution_with_Wilson_loop_for_degenerate_case_(function_form).py @@ -10,7 +10,7 @@ import math def hamiltonian(k1, k2, t1=2.82, a=1/sqrt(3)): # 石墨烯哈密顿量(a为原子间距,不赋值的话默认为1/sqrt(3)) - h = np.zeros((2, 2))*(1+0j) + h = np.zeros((2, 2), dtype=complex) h[0, 0] = 0.28/2 h[1, 1] = -0.28/2 h[1, 0] = t1*(cmath.exp(1j*k2*a)+cmath.exp(1j*sqrt(3)/2*k1*a-1j/2*k2*a)+cmath.exp(-1j*sqrt(3)/2*k1*a-1j/2*k2*a)) diff --git a/academic_codes/2022.08.13_Berry_curvature_distribution_in_function_form/Berry_curvature_distribution_with_the_efficient_method_(function_form).py b/academic_codes/2022.08.13_Berry_curvature_distribution_in_function_form/Berry_curvature_distribution_with_the_efficient_method_(function_form).py index 9002431..2cc5c18 100644 --- a/academic_codes/2022.08.13_Berry_curvature_distribution_in_function_form/Berry_curvature_distribution_with_the_efficient_method_(function_form).py +++ b/academic_codes/2022.08.13_Berry_curvature_distribution_in_function_form/Berry_curvature_distribution_with_the_efficient_method_(function_form).py @@ -9,7 +9,7 @@ import cmath import math def hamiltonian(k1, k2, t1=2.82, a=1/sqrt(3)): # 石墨烯哈密顿量(a为原子间距,不赋值的话默认为1/sqrt(3)) - h = np.zeros((2, 2))*(1+0j) + h = np.zeros((2, 2), dtype=complex) h[0, 0] = 0.28/2 h[1, 1] = -0.28/2 h[1, 0] = t1*(cmath.exp(1j*k2*a)+cmath.exp(1j*sqrt(3)/2*k1*a-1j/2*k2*a)+cmath.exp(-1j*sqrt(3)/2*k1*a-1j/2*k2*a)) diff --git a/academic_codes/2022.08.13_Berry_curvature_distribution_in_function_form/Berry_curvature_distribution_with_the_efficient_method_for_degenerate_case_(function_form).py b/academic_codes/2022.08.13_Berry_curvature_distribution_in_function_form/Berry_curvature_distribution_with_the_efficient_method_for_degenerate_case_(function_form).py index f92097b..b17350c 100644 --- a/academic_codes/2022.08.13_Berry_curvature_distribution_in_function_form/Berry_curvature_distribution_with_the_efficient_method_for_degenerate_case_(function_form).py +++ b/academic_codes/2022.08.13_Berry_curvature_distribution_in_function_form/Berry_curvature_distribution_with_the_efficient_method_for_degenerate_case_(function_form).py @@ -10,7 +10,7 @@ import math def hamiltonian(k1, k2, t1=2.82, a=1/sqrt(3)): # 石墨烯哈密顿量(a为原子间距,不赋值的话默认为1/sqrt(3)) - h = np.zeros((2, 2))*(1+0j) + h = np.zeros((2, 2), dtype=complex) h[0, 0] = 0.28/2 h[1, 1] = -0.28/2 h[1, 0] = t1*(cmath.exp(1j*k2*a)+cmath.exp(1j*sqrt(3)/2*k1*a-1j/2*k2*a)+cmath.exp(-1j*sqrt(3)/2*k1*a-1j/2*k2*a))