diff --git a/test/test_greens.jl b/test/test_greens.jl index 28ec48e0..75a2cbf3 100644 --- a/test/test_greens.jl +++ b/test/test_greens.jl @@ -21,23 +21,23 @@ end end @testset "greens singleshot spectra" begin - h = LP.honeycomb() |> hamiltonian(hopping(1)) |> unitcell((1,-1), region = r->abs(r[2])<3) - g = greens(h, Schur1D()) - dos = [-imag(tr(g(w))) for w in range(-3.2, 3.2, length = 101)] - @test all(x -> Quantica.chop(x) >= 0, dos) + # Broken until https://github.com/Reference-LAPACK/lapack/issues/477 comes to julia + if VERSION >= v"1.7.0-DEV" + h = LP.honeycomb() |> hamiltonian(hopping(1)) |> unitcell((1,-1), region = r->abs(r[2])<3) + g = greens(h, Schur1D()) + dos = [-imag(tr(g(w))) for w in range(-3.2, 3.2, length = 101)] + @test all(x -> Quantica.chop(x) >= 0, dos) - h = LP.honeycomb() |> hamiltonian(hopping(1, range = 2)) |> unitcell((1,-1), region = r->abs(r[2])<3) - g = greens(h, Schur1D()) - dos = [-imag(tr(g(w))) for w in range(-6, 6, length = 101)] - @test all(x -> Quantica.chop(x) >= 0, dos) + h = LP.honeycomb() |> hamiltonian(hopping(1, range = 2)) |> unitcell((1,-1), region = r->abs(r[2])<3) + g = greens(h, Schur1D()) + dos = [-imag(tr(g(w))) for w in range(-6, 6, length = 101)] + @test all(x -> Quantica.chop(x) >= 0, dos) - h = LatticePresets.honeycomb() |> hamiltonian(hopping(1)) |> unitcell((1,-1),(2,2)) |> wrap(2) - g = greens(h, Schur1D()) - dos = [-imag(tr(g(w))) for w in range(-3.2, 3.2, length = 101)] - @test all(x -> Quantica.chop(x) >= 0, dos) + h = LatticePresets.honeycomb() |> hamiltonian(hopping(1)) |> unitcell((1,-1),(2,2)) |> wrap(2) + g = greens(h, Schur1D()) + dos = [-imag(tr(g(w))) for w in range(-3.2, 3.2, length = 101)] + @test all(x -> Quantica.chop(x) >= 0, dos) - # Broken until https://github.com/Reference-LAPACK/lapack/issues/477 comes to julia - if VERSION >= v"1.7.0-DEV" h = LatticePresets.honeycomb() |> hamiltonian(hopping((r, dr) -> 1/(dr'*dr), range = 1)) |> unitcell((1,-1),(2,2)) |> wrap(2) g = greens(h, Schur1D()) dos = [-imag(tr(g(w))) for w in range(-3.2, 3.2, length = 101)]