Physics, Python, Python Programming, Coding, Programming.
factors phase1 = np.exp(1j * (kx * delta1[0] + ky * delta1[1])) phase2 = np.exp(1j * (kx * delta2[0] + ky * delta2[1])) phase3 = np.exp(1j * (kx * delta3[0] + ky * delta3[1])) # Construct the Hamiltonian matrix H = np.array([[0, t * (phase1 + phase2 + phase3)], [t * (phase1.conj() + phase2.conj() +