- #1
randomquestion
- 4
- 2
- Homework Statement
- I am trying to reproduce figure 5c) of https://arxiv.org/pdf/2002.03116.pdf in Python.
But I cannot spot my error in my attempt
- Relevant Equations
- $$\epsilon_{\boldsymbol{k}} / t = 2,-1 \pm \sqrt{3+2 \sum_{\nu=1}^3 \cos \left(\boldsymbol{k}\cdot e_{\nu}\right)}$$
We need to define a high symmetry point path in the Brillouin zone, we can choose: Gamma-K-M-Gamma
My attempt:
My attempt:
Code:
import numpy as np
import matplotlib.pyplot as plt
# lattice vectors
a1 = np.array([1, 0])
a2 = np.array([-1/2, np.sqrt(3)/2])
a3 = -(a1 + a2)
a = [a1,a2,a3]
#high symmetry points
Gamma = np.array([0, 0])
K = 2*np.pi*np.array([2/3, 0])
M = 2*np.pi*np.array([0, 1/np.sqrt(3)])
num_points = 100
k_path = np.concatenate([np.linspace(k_Gamma, k_K, num_points, endpoint=False),
np.linspace(k_K, k_M, num_points, endpoint=False),
np.linspace(k_M, k_Gamma, num_points)])
# Calculate energy eigenvalues for each k-point
energies = np.zeros((3, len(k_path)))
for i, k in enumerate(k_path):
cos_sum = np.cos(np.dot(k,a[0]))+ np.cos(np.dot(k,a[1]))+np.cos(np.dot(k,a[2]))
energies[:, i] = [2, -1 + np.sqrt(3 + 2*cos_sum), -1 - np.sqrt(3 + 2*cos_sum)]
# Plot the energy bands
plt.figure(figsize=(8, 6))
for band in range(3):
plt.plot(np.arange(len(k_path)), energies[band], label=f'Band {band+1}')
plt.ylabel('Energy')
plt.grid(True)
plt.xticks([0, 3*num_points//3, 2*3*num_points//3, num_points*3], [r'$\Gamma$', 'K', 'M', r'$\Gamma$'])