Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
docs/build
Manifest.toml
.vscode/
.DS_Store
6 changes: 6 additions & 0 deletions src/MPSKitModels.jl
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,15 @@ export c⁺, c⁻, c⁺⁺, c⁻⁻, c⁺⁻, c⁻⁺
export e_plus, e_min, e_plusplus, e_minmin, e_plusmin, e_minplus
export e_number, e_number_up, e_number_down, e_number_updown
export e⁺⁺, e⁻⁻, e⁺⁻, e⁻⁺
export TJOperators

export transverse_field_ising
export kitaev_model
export quantum_potts
export heisenberg_XXX, heisenberg_XXZ, heisenberg_XYZ
export bilinear_biquadratic_model
export hubbard_model, bose_hubbard_model
export tj_model
export quantum_chemistry_hamiltonian

export classical_ising
Expand All @@ -65,6 +67,10 @@ include("operators/spinoperators.jl")
include("operators/fermionoperators.jl")
include("operators/hubbardoperators.jl")
using .HubbardOperators
# TJOperators share operator names with HubbardOperators
# and is only imported to avoid name conflicts
include("operators/tjoperators.jl")
import .TJOperators
include("operators/bosonoperators.jl")

include("models/hamiltonians.jl")
Expand Down
51 changes: 51 additions & 0 deletions src/models/hamiltonians.jl
Original file line number Diff line number Diff line change
Expand Up @@ -370,3 +370,54 @@

return H
end

#===========================================================================================
t-J models
===========================================================================================#

"""
tj_model([elt::Type{<:Number}], [particle_symmetry::Type{<:Sector}],
[spin_symmetry::Type{<:Sector}], [lattice::AbstractLattice];
t, J, mu, slave_fermion::Bool=false)

MPO for the hamiltonian of the t-J model, as defined by
```math
H = -t \\sum_{\\langle i,j \\rangle, \\sigma}
(\\tilde{e}^\\dagger_{i,\\sigma} \\tilde{e}_{j,\\sigma} + h.c.)
+ J \\sum_{\\langle i,j \\rangle}(\\mathbf{S}_i \\cdot \\mathbf{S}_j - \\frac{1}{4} n_i n_j)
- \\mu \\sum_i n_i
```
where ``\\tilde{e}_{i,\\sigma}`` is the electron operator with spin ``\\sigma`` restrict to the no-double-occupancy subspace.
"""
function tj_model end
function tj_model(lattice::AbstractLattice; kwargs...)
return tj_model(ComplexF64, Trivial, Trivial, lattice; kwargs...)

Check warning on line 394 in src/models/hamiltonians.jl

View check run for this annotation

Codecov / codecov/patch

src/models/hamiltonians.jl#L393-L394

Added lines #L393 - L394 were not covered by tests
end
function tj_model(particle_symmetry::Type{<:Sector}, spin_symmetry::Type{<:Sector};

Check warning on line 396 in src/models/hamiltonians.jl

View check run for this annotation

Codecov / codecov/patch

src/models/hamiltonians.jl#L396

Added line #L396 was not covered by tests
kwargs...)
return tj_model(ComplexF64, particle_symmetry, spin_symmetry; kwargs...)

Check warning on line 398 in src/models/hamiltonians.jl

View check run for this annotation

Codecov / codecov/patch

src/models/hamiltonians.jl#L398

Added line #L398 was not covered by tests
end
function tj_model(elt::Type{<:Number}, lattice::AbstractLattice; kwargs...)
return tj_model(elt, Trivial, Trivial, lattice; kwargs...)

Check warning on line 401 in src/models/hamiltonians.jl

View check run for this annotation

Codecov / codecov/patch

src/models/hamiltonians.jl#L400-L401

Added lines #L400 - L401 were not covered by tests
end
function tj_model(T::Type{<:Number}=ComplexF64,

Check warning on line 403 in src/models/hamiltonians.jl

View check run for this annotation

Codecov / codecov/patch

src/models/hamiltonians.jl#L403

Added line #L403 was not covered by tests
particle_symmetry::Type{<:Sector}=Trivial,
spin_symmetry::Type{<:Sector}=Trivial,
lattice::AbstractLattice=InfiniteChain(1);
t=2.5, J=1.0, mu=0.0, slave_fermion::Bool=false)
hopping = TJOperators.e_plusmin(T, particle_symmetry, spin_symmetry; slave_fermion) +

Check warning on line 408 in src/models/hamiltonians.jl

View check run for this annotation

Codecov / codecov/patch

src/models/hamiltonians.jl#L408

Added line #L408 was not covered by tests
TJOperators.e_minplus(T, particle_symmetry, spin_symmetry; slave_fermion)
num = TJOperators.e_number(T, particle_symmetry, spin_symmetry; slave_fermion)
heisenberg = TJOperators.S_exchange(T, particle_symmetry, spin_symmetry;

Check warning on line 411 in src/models/hamiltonians.jl

View check run for this annotation

Codecov / codecov/patch

src/models/hamiltonians.jl#L410-L411

Added lines #L410 - L411 were not covered by tests
slave_fermion) -
(1 / 4) * (num ⊗ num)
return @mpoham begin
sum(nearest_neighbours(lattice)) do (i, j)
return (-t) * hopping{i,j} + J * heisenberg{i,j}

Check warning on line 416 in src/models/hamiltonians.jl

View check run for this annotation

Codecov / codecov/patch

src/models/hamiltonians.jl#L414-L416

Added lines #L414 - L416 were not covered by tests
end + sum(vertices(lattice)) do i
return (-mu) * num{i}

Check warning on line 418 in src/models/hamiltonians.jl

View check run for this annotation

Codecov / codecov/patch

src/models/hamiltonians.jl#L418

Added line #L418 was not covered by tests
end
end
end

# TODO: add (hardcore) bosonic t-J model (https://arxiv.org/abs/2409.15424)
12 changes: 8 additions & 4 deletions src/operators/hubbardoperators.jl
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ end
"""
e_plusmin_up(T, particle_symmetry::Type{<:Sector}, spin_symmetry::Type{<:Sector})

Return the two-body operator that creates a spin-up electron at the first site and annihilates a spin-up electron at the second.
Return the two-body operator ``e†_{1,↑}, e_{2,↑}`` that creates a spin-up electron at the first site and annihilates a spin-up electron at the second.
"""
e_plusmin_up(P::Type{<:Sector}, S::Type{<:Sector}) = e_plusmin_up(ComplexF64, P, S)
function e_plusmin_up(T, ::Type{Trivial}, ::Type{Trivial})
Expand Down Expand Up @@ -111,7 +111,7 @@ const e⁺e⁻ꜛ = e_plusmin_up
"""
e_plusmin_down(T, particle_symmetry::Type{<:Sector}, spin_symmetry::Type{<:Sector})

Return the two-body operator that creates a spin-down electron at the first site and annihilates a spin-down electron at the second.
Return the two-body operator ``e†_{1,↓}, e_{2,↓}`` that creates a spin-down electron at the first site and annihilates a spin-down electron at the second.
"""
e_plusmin_down(P::Type{<:Sector}, S::Type{<:Sector}) = e_plusmin_down(ComplexF64, P, S)
function e_plusmin_down(T, ::Type{Trivial}, ::Type{Trivial})
Expand Down Expand Up @@ -158,7 +158,9 @@ const e⁺e⁻ꜜ = e_plusmin_down
"""
e_minplus_up(T, particle_symmetry::Type{<:Sector}, spin_symmetry::Type{<:Sector})

Return the two-body operator that annihilates a spin-up electron at the first site and creates a spin-up electron at the second.
Return the Hermitian conjugate of `e_plusmin_up`, i.e.
``(e†_{1,↑}, e_{2,↑})† = -e_{1,↑}, e†_{2,↑}`` (note the extra minus sign).
It annihilates a spin-up electron at the first site and creates a spin-up electron at the second.
"""
e_minplus_up(P::Type{<:Sector}, S::Type{<:Sector}) = e_minplus_up(ComplexF64, P, S)
function e_minplus_up(T, particle_symmetry::Type{<:Sector}, spin_symmetry::Type{<:Sector})
Expand All @@ -169,7 +171,9 @@ const e⁻⁺ꜛ = e_minplus_up
"""
e_minplus_down(T, particle_symmetry::Type{<:Sector}, spin_symmetry::Type{<:Sector})

Return the two-body operator that annihilates a spin-down electron at the first site and creates a spin-down electron at the second.
Return the Hermitian conjugate of `e_plusmin_down`, i.e.
``(e†_{1,↓}, e_{2,↓})† = -e_{1,↓}, e†_{2,↓}`` (note the extra minus sign).
It annihilates a spin-down electron at the first site and creates a spin-down electron at the second.
"""
e_minplus_down(P::Type{<:Sector}, S::Type{<:Sector}) = e_minplus_down(ComplexF64, P, S)
function e_minplus_down(T, particle_symmetry::Type{<:Sector}, spin_symmetry::Type{<:Sector})
Expand Down
Loading
Loading