using LinearAlgebra # Define the tight binding Hamiltonian function tight_binding_hamiltonian(n_sites::Int64, t::Float64) H = zeros(n_sites, n_sites) for i in 1:(n_sites-1) H[i, i+1] = t H[i+1, i] = t end H end # Find the eigenenergies of the Hamiltonian function eigenenergies(H::Array{Float64, 2}) eigvals(H) end n_sites = 10 # number of sites in the chain t = 1.0 # hopping parameter H = tight_binding_hamiltonian(n_sites, t) energies = eigenenergies(H) println(energies)