pablosanjose / Quantica.jl

Simulation of quantum systems on a lattice
Other
70 stars 8 forks source link

Wrong bands connection #303

Open pablosanjose opened 3 months ago

pablosanjose commented 3 months ago

This code produces a completely wrong band connection pattern

using Quantica
using GLMakie

function build()
    lat = LP.triangular()
    σ1 = SA[0 0 0 0; 1 0 0 0; 0 0 0 0; 0 0 1 0]
    τz = SA[1 0 0 0; 1 0 0 0; 0 0 -1 0; 0 0 0 -1]
    model = onsite(σ1+σ1'+7τz) + hopping((r, dr) -> dr[2] == 0 ? zero(σ1) : dr[1] > 0 ? σ1 : σ1')
    h = lat |> hamiltonian(model; orbitals = 4)
    return h
end

 h = build()

 qplot(h)

 qplot(bands(h, range(0, 2π, 1+18*3), range(0, 2π, 1+18*3)))

Screenshot 2024-07-19 at 09 53 09

pablosanjose commented 3 months ago

The reason is that h is non-hermitian. Closing, as this case is not intended to work with band connection

pablosanjose commented 3 months ago

There is still an issue. If we make this Hermitian, the Dirac points fail to be properly connected

function build()
    lat = LP.triangular()
    σ1 = SA[0 0; 1 0]
    model = onsite(σ1+σ1') + hopping((r, dr) -> dr[2] == 0 ? zero(σ1) : dr[1] > 0 ? σ1 : σ1')
    h = lat |> hamiltonian(model; orbitals = 2)
    return h
end

Screenshot 2024-07-19 at 10 07 10

Note that the conventional graphene case (which would read model = onsite(σ1+σ1') + hopping((r, dr) -> dr[2] == 0 ? zero(σ1) : dr[2] > 0 ? σ1 : σ1')) is properly connected

Screenshot 2024-07-19 at 10 09 02

pablosanjose commented 3 months ago

An equivalent one-liner: HP.graphene() |> supercell(1, -1) |> bands(range(0, 2π, 19), range(0, 2π, 19)) |> qplot