update
This commit is contained in:
		| @@ -11,7 +11,7 @@ from math import * | |||||||
| def hamiltonian(k):  # SSH模型哈密顿量 | def hamiltonian(k):  # SSH模型哈密顿量 | ||||||
|     gamma = 0.5 |     gamma = 0.5 | ||||||
|     lambda0 = 1 |     lambda0 = 1 | ||||||
|     h = np.zeros((2, 2))*(1+0j) |     h = np.zeros((2, 2), dtype=complex) | ||||||
|     h[0,0] = 0 |     h[0,0] = 0 | ||||||
|     h[1,1] = 0 |     h[1,1] = 0 | ||||||
|     h[0,1] = gamma+lambda0*cmath.exp(-1j*k) |     h[0,1] = gamma+lambda0*cmath.exp(-1j*k) | ||||||
|   | |||||||
| @@ -12,7 +12,7 @@ def hamiltonian(k): | |||||||
|     gamma = 0.5 |     gamma = 0.5 | ||||||
|     lambda0 = 1 |     lambda0 = 1 | ||||||
|     delta = 0 |     delta = 0 | ||||||
|     h = np.zeros((2, 2))*(1+0j) |     h = np.zeros((2, 2), dtype=complex) | ||||||
|     h[0,0] = delta |     h[0,0] = delta | ||||||
|     h[1,1] = -delta |     h[1,1] = -delta | ||||||
|     h[0,1] = gamma+lambda0*cmath.exp(-1j*k) |     h[0,1] = gamma+lambda0*cmath.exp(-1j*k) | ||||||
|   | |||||||
| @@ -10,7 +10,7 @@ import cmath | |||||||
|  |  | ||||||
|  |  | ||||||
| def hamiltonian(k1, k2, t1=2.82, a=1/sqrt(3)):  # 石墨烯哈密顿量(a为原子间距,不赋值的话默认为1/sqrt(3)) | 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[0, 0] = 0.28/2 | ||||||
|     h[1, 1] = -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[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)) | ||||||
|   | |||||||
| @@ -10,7 +10,7 @@ import cmath | |||||||
|  |  | ||||||
|  |  | ||||||
| def hamiltonian(k1, k2, t1=2.82, a=1/sqrt(3)):  # 石墨烯哈密顿量(a为原子间距,不赋值的话默认为1/sqrt(3)) | 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[0, 0] = 0.28/2 | ||||||
|     h[1, 1] = -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[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)) | ||||||
|   | |||||||
| @@ -10,7 +10,7 @@ import cmath | |||||||
|  |  | ||||||
|  |  | ||||||
| def hamiltonian(k1, k2, t1=2.82, a=1/sqrt(3)):  # 石墨烯哈密顿量(a为原子间距,不赋值的话默认为1/sqrt(3)) | 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[0, 0] = 0.28/2 | ||||||
|     h[1, 1] = -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[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)) | ||||||
|   | |||||||
| @@ -10,7 +10,7 @@ import math | |||||||
|  |  | ||||||
|  |  | ||||||
| def hamiltonian(k1, k2, t1=2.82, a=1/sqrt(3)):  # 石墨烯哈密顿量(a为原子间距,不赋值的话默认为1/sqrt(3)) | 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[0, 0] = 0.28/2 | ||||||
|     h[1, 1] = -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[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)) | ||||||
|   | |||||||
| @@ -10,7 +10,7 @@ import math | |||||||
|  |  | ||||||
|  |  | ||||||
| def hamiltonian(k1, k2, t1=2.82, a=1/sqrt(3)):  # 石墨烯哈密顿量(a为原子间距,不赋值的话默认为1/sqrt(3)) | 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[0, 0] = 0.28/2 | ||||||
|     h[1, 1] = -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[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)) | ||||||
|   | |||||||
| @@ -9,7 +9,7 @@ import cmath | |||||||
| import math | import math | ||||||
|  |  | ||||||
| def hamiltonian(k1, k2, t1=2.82, a=1/sqrt(3)):  # 石墨烯哈密顿量(a为原子间距,不赋值的话默认为1/sqrt(3)) | 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[0, 0] = 0.28/2 | ||||||
|     h[1, 1] = -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[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)) | ||||||
|   | |||||||
| @@ -10,7 +10,7 @@ import math | |||||||
|  |  | ||||||
|  |  | ||||||
| def hamiltonian(k1, k2, t1=2.82, a=1/sqrt(3)):  # 石墨烯哈密顿量(a为原子间距,不赋值的话默认为1/sqrt(3)) | 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[0, 0] = 0.28/2 | ||||||
|     h[1, 1] = -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[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)) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user