Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
ZongYongyue committed Nov 18, 2024
1 parent 845499f commit b21930e
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions test/DCorrelators.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ using QuantumLattices
using TensorKit
using MPSKit
using DCorrelators
using MPSKitModels: contract_onesite, contract_twosite, FiniteStrip, FiniteCylinder
using MPSKitModels: contract_onesite, contract_twosite, FiniteChain

@testset "operators" begin
elt = Float64
Expand Down Expand Up @@ -48,18 +48,18 @@ using MPSKitModels: contract_onesite, contract_twosite, FiniteStrip, FiniteCylin
end

@testset "Hamiltonian" begin
unitcell = Lattice([0.0, 0.0]; vectors=[[0, 1], [1, 0]])
lattice₁ = Lattice(unitcell, (2, 2), ('o', 'o'))
unitcell = Lattice([0.0, 0.0]; vectors=[[1, 0]])
lattice₁ = Lattice(unitcell, (4, ), ('o', ))
hilbert = Hilbert(site=>Fock{:f}(1, 2) for site=1:length(lattice₁))
t = Hopping(:t, -1.0, 1)
U = Hubbard(:U, 8.0)
H₁ = hamiltonian((t, U), lattice₁, hilbert; neighbors=1)
H₂ = hubbard(Float64, U1Irrep, U1Irrep, FiniteStrip(2, 4); t=1.0, U=8.0, μ=0.0, filling=(1,1))
H₂ = hubbard(Float64, U1Irrep, U1Irrep, FiniteChain(4); t=1.0, U=8.0, μ=0.0, filling=(1,1))
@test H₁ H₂
lattice₂ = Lattice(unitcell, (2, 2), ('p', 'o'))
H₃ = hamiltonian((t, U), lattice₂, hilbert; neighbors=1)
H₄ = hubbard(Float64, U1Irrep, U1Irrep, FiniteCylinder(2, 4); t=1.0, U=8.0, μ=0.0, filling=(1,1))
@test H₃ H₄
# lattice₂ = Lattice(unitcell, (4, ), ('p', ))
# H₃ = hamiltonian((t, U), lattice₂, hilbert; neighbors=1)
# H₄ = hubbard(Float64, U1Irrep, U1Irrep, FiniteCylinder(2, 4); t=1.0, U=8.0, μ=0.0, filling=(1,1))
# @test H₃ ≈ H₄
end

@testset "charged state" begin
Expand Down

0 comments on commit b21930e

Please sign in to comment.