This commit is contained in:
guanjihuan 2022-04-21 22:03:21 +08:00
parent c2148b3302
commit 337d3de874
4 changed files with 232 additions and 114 deletions

View File

@ -10,7 +10,7 @@ import cmath
import time import time
def hamiltonian(k1, k2, t1=2.82*sqrt(3)/2, a=1/sqrt(3)): # 石墨烯哈密顿量(a为原子间距不赋值的话默认为1/sqrt(3) def hamiltonian(k1, k2, t1=2.82*sqrt(3)/2, a=1/sqrt(3)): # 石墨烯哈密顿量a为原子间距不赋值的话默认为1/sqrt(3)
h = np.zeros((2, 2))*(1+0j) h = np.zeros((2, 2))*(1+0j)
h[0, 0] = 0.28/2 h[0, 0] = 0.28/2
h[1, 1] = -0.28/2 h[1, 1] = -0.28/2

View File

@ -10,7 +10,7 @@ import cmath
import time import time
def hamiltonian(k1, k2, t1=2.82*sqrt(3)/2, a=1/sqrt(3)): # 石墨烯哈密顿量(a为原子间距不赋值的话默认为1/sqrt(3) def hamiltonian(k1, k2, t1=2.82*sqrt(3)/2, a=1/sqrt(3)): # 石墨烯哈密顿量a为原子间距不赋值的话默认为1/sqrt(3)
h = np.zeros((2, 2))*(1+0j) h = np.zeros((2, 2))*(1+0j)
h[0, 0] = 0.28/2 h[0, 0] = 0.28/2
h[1, 1] = -0.28/2 h[1, 1] = -0.28/2

View File

@ -0,0 +1,55 @@
"""
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/20869
"""
import numpy as np
import matplotlib.pyplot as plt
from math import *
import cmath
def hamiltonian(k1, k2, t1=2.82*sqrt(3)/2, a=1/sqrt(3)): # 石墨烯哈密顿量a为原子间距不赋值的话默认为1/sqrt(3)
h = np.zeros((2, 2))*(1+0j)
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))
h[0, 1] = h[1, 0].conj()
return h
def main():
n = 2000 # 取点密度
delta = 1e-9 # 求导的偏离量
for band in range(2):
F_all = [] # 贝里曲率
for kx in np.linspace(-2*pi, 2*pi, n):
for ky in [0]: # 这里只考虑ky=0对称轴上的情况
H = hamiltonian(kx, ky)
eigenvalue, eigenvector = np.linalg.eig(H)
if band==0:
vector_0 = eigenvector[:, np.argsort(np.real(eigenvalue))[0]]
vector_1 = eigenvector[:, np.argsort(np.real(eigenvalue))[1]]
elif band==1:
vector_0 = eigenvector[:, np.argsort(np.real(eigenvalue))[1]]
vector_1 = eigenvector[:, np.argsort(np.real(eigenvalue))[0]]
eigenvalue = np.sort(np.real(eigenvalue))
H_delta_kx = hamiltonian(kx+delta, ky)-hamiltonian(kx, ky)
H_delta_ky = hamiltonian(kx, ky+delta)-hamiltonian(kx, ky)
berry_curvature = 1j*(np.dot(np.dot(np.dot(np.dot(np.dot(vector_0.transpose().conj(), H_delta_kx/delta), vector_1), vector_1.transpose().conj()), H_delta_ky/delta), vector_0)- np.dot(np.dot(np.dot(np.dot(np.dot(vector_0.transpose().conj(), H_delta_ky/delta), vector_1), vector_1.transpose().conj()), H_delta_kx/delta), vector_0))/(eigenvalue[0]-eigenvalue[1])**2
F_all = np.append(F_all,[berry_curvature], axis=0)
plt.plot(np.linspace(-2*pi, 2*pi, n)/pi, np.real(F_all))
plt.xlabel('k_x (pi)')
plt.ylabel('Berry curvature')
if band==0:
plt.title('Valence Band')
else:
plt.title('Conductance Band')
plt.show()
if __name__ == '__main__':
main()

View File

@ -0,0 +1,63 @@
"""
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/20869
"""
import numpy as np
import matplotlib.pyplot as plt
from math import *
import cmath
def hamiltonian(k1, k2, t1=2.82*sqrt(3)/2, a=1/sqrt(3)): # 石墨烯哈密顿量a为原子间距不赋值的话默认为1/sqrt(3)
h = np.zeros((2, 2))*(1+0j)
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))
h[0, 1] = h[1, 0].conj()
return h
def main():
n = 2000 # 取点密度
delta = 4*pi/n # 求导的偏离量
for band in range(2):
F_all = [] # 贝里曲率
for kx in np.linspace(-2*pi, 2*pi, n):
for ky in [0]: # 这里只考虑ky=0对称轴上的情况
H = hamiltonian(kx, ky)
eigenvalue, eigenvector = np.linalg.eig(H)
vector = eigenvector[:, np.argsort(np.real(eigenvalue))[band]] # 价带波函数
H_delta_kx = hamiltonian(kx+delta, ky)
eigenvalue, eigenvector = np.linalg.eig(H_delta_kx)
vector_delta_kx = eigenvector[:, np.argsort(np.real(eigenvalue))[band]] # 略偏离kx的波函数
H_delta_ky = hamiltonian(kx, ky+delta)
eigenvalue, eigenvector = np.linalg.eig(H_delta_ky)
vector_delta_ky = eigenvector[:, np.argsort(np.real(eigenvalue))[band]] # 略偏离ky的波函数
H_delta_kx_ky = hamiltonian(kx+delta, ky+delta)
eigenvalue, eigenvector = np.linalg.eig(H_delta_kx_ky)
vector_delta_kx_ky = eigenvector[:, np.argsort(np.real(eigenvalue))[band]] # 略偏离kx和ky的波函数
Ux = np.dot(np.conj(vector), vector_delta_kx)/abs(np.dot(np.conj(vector), vector_delta_kx))
Uy = np.dot(np.conj(vector), vector_delta_ky)/abs(np.dot(np.conj(vector), vector_delta_ky))
Ux_y = np.dot(np.conj(vector_delta_ky), vector_delta_kx_ky)/abs(np.dot(np.conj(vector_delta_ky), vector_delta_kx_ky))
Uy_x = np.dot(np.conj(vector_delta_kx), vector_delta_kx_ky)/abs(np.dot(np.conj(vector_delta_kx), vector_delta_kx_ky))
F = cmath.log(Ux*Uy_x*(1/Ux_y)*(1/Uy))/delta/delta*1j
F_all = np.append(F_all,[F], axis=0)
plt.plot(np.linspace(-2*pi, 2*pi, n)/pi, np.real(F_all))
plt.xlabel('k_x (pi)')
plt.ylabel('Berry curvature')
if band==0:
plt.title('Valence Band')
else:
plt.title('Conductance Band')
plt.show()
if __name__ == '__main__':
main()