欢迎光临散文网 会员登陆 & 注册

1-D Chain Toy Model——visualization of disorder and localization

2023-04-11 12:46 作者:紧扣的dagger  | 我要投稿

40行代码计算验证安德森局域化的一个小观点:在一维体系上加一点点无序都将导致扩展态到局域态

先看阎守胜《固体物理基础》(第三版)第216页。

  • 当随机均匀分布的width=0的时候:

纵轴:能级能量,横轴:能级数。
(颜色:定态波函数概率密度)
(横轴:波函数的对应能级数)
(纵轴:一维晶格的空间位置)
  • 当width=5%时:

 纵轴:能级能量,横轴:能级数。
(颜色:定态波函数概率密度)
(横轴:波函数的对应能级数)
(纵轴:一维晶格的空间位置)
  • 当width=10%时:

 纵轴:能级能量,横轴:能级数。
(颜色:定态波函数概率密度)
(横轴:波函数的对应能级数)
(纵轴:一维晶格的空间位置)


Python 源码

  1. import numpy as np

  2. import matplotlib.pyplot as plt


  3. # Name: 1-D lattice with disorder

  4. # Date: 2023/4/11

  5. # Author: GHz


  6. # Parameters

  7. width = 0.3

  8. center = 10

  9. hopping1 = -1

  10. hopping2 = -1

  11. particleNum = 1000


  12. # Create Hamiltonian

  13. disorderDiag = (np.random.uniform(size = particleNum)-0.5) * width + center


  14. disorderDiag = np.diag(disorderDiag)

  15. oneDirectionHopping = np.diag([hopping1]*(particleNum-1), -1)

  16. anotherDirectionHopping = np.diag([hopping1]*(particleNum-1), 1)


  17. Hamiltonian = disorderDiag + oneDirectionHopping + anotherDirectionHopping


  18. # Diagonalize Hamiltonian

  19. eigenvalues, eigenvectors = np.linalg.eig(Hamiltonian)

  20. xAxis = np.arange(len(eigenvalues))

  21. idx = np.argsort(eigenvalues)#[::-1]

  22. eigenValues = eigenvalues[idx]

  23. eigenVectors = eigenvectors[:,idx]


  24. # Plot Results

  25. plt.plot(xAxis, eigenValues)

  26. plt.title(label="Energy levels array", fontdict={'family':'Times New Roman', 'size':19})

  27. plt.show()

  28. '''

  29. for i in range(len(eigenValues)):

  30.     plt.plot(xAxis, eigenVectors[:, i] * np.conj(eigenVectors[:, i]))

  31.     plt.title(label="Energy={}".format(eigenValues[i]), fontdict={'family':'Times New Roman', 'size':19})

  32.     plt.show()

  33. '''

  34. plt.contourf(eigenVectors * np.conj(eigenVectors), cmap='RdBu', levels=100)

  35. plt.colorbar()

  36. plt.show()



1-D Chain Toy Model——visualization of disorder and localization的评论 (共 条)

分享到微博请遵守国家法律