Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/dispersion in mom space #283

Merged
merged 22 commits into from
Sep 27, 2024
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
24 changes: 13 additions & 11 deletions src/Hamiltonians/HubbardMom1D.jl
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
"""
hubbard_dispersion(k)
Dispersion relation for [`HubbardMom1D`](@ref). Returns `-2cos(k)`.
hubbard_dispersion(t, k)
Dispersion relation for [`HubbardMom1D`](@ref). Returns ``-2(\\Re(t) \\cos(k) + \\Im(t) \\sin(k))``.

See also [`continuum_dispersion`](@ref).
"""
hubbard_dispersion(k) = -2cos(k)
hubbard_dispersion(t::Real, k) = -2t .* cos(k)
hubbard_dispersion(t::Complex, k) = -2 * real(t) .* cos(k) .- 2 * imag(t) .* sin(k)


"""
continuum_dispersion(k)
Dispersion relation for [`HubbardMom1D`](@ref). Returns `k^2`.
continuum_dispersion(t, k)
Dispersion relation for [`HubbardMom1D`](@ref). Returns ``\\Re(t) k^2 - 2 \\Im(t) k``.

See also [`hubbard_dispersion`](@ref).
"""
continuum_dispersion(k) = k^2
continuum_dispersion(t::Real, k) = t .* k^2
continuum_dispersion(t::Complex, k) = real(t) .* k^2 .- 2 * imag(t) .* k

"""
HubbardMom1D(address; u=1.0, t=1.0, dispersion=hubbard_dispersion)
Expand All @@ -28,9 +31,9 @@ Implements a one-dimensional Bose Hubbard chain in momentum space.
* `address`: the starting address, defines number of particles and sites.
* `u`: the interaction parameter.
* `t`: the hopping strength.
* `dispersion`: defines ``ϵ_k =``` t*dispersion(k)`
- [`hubbard_dispersion`](@ref): ``ϵ_k = -2t \\cos(k)``
- [`continuum_dispersion`](@ref): ``ϵ_k = tk^2``
* `dispersion`: defines ``ϵ_k =``` dispersion(t, k)`
- [`hubbard_dispersion`](@ref): ``ϵ_k = -2(\\Re(t) \\cos(k) + \\Im(t) \\sin(k))``
- [`continuum_dispersion`](@ref): ``ϵ_k = \\Re(t) k^2 - 2 \\Im(t) k``

# See also

Expand All @@ -57,8 +60,7 @@ function HubbardMom1D(
end
kr = range(start; step = step, length = M)
ks = SVector{M}(kr)
# kes = SVector{M}(-2T*cos.(kr))
kes = SVector{M}(T .* dispersion.(kr))
kes = SVector{M}(dispersion.(T, kr))
return HubbardMom1D{typeof(U),M,typeof(address),U,T}(address, ks, kes)
end

Expand Down
6 changes: 3 additions & 3 deletions src/Hamiltonians/HubbardMom1DEP.jl
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ is an external harmonic potential in momentum space,
* `u`: the interaction parameter.
* `t`: the hopping strength.
* `dispersion`: defines ``ϵ_k =``` t*dispersion(k)`
- [`hubbard_dispersion`](@ref): ``ϵ_k = -2t \\cos(k)``
- [`continuum_dispersion`](@ref): ``ϵ_k = tk^2``
- [`hubbard_dispersion`](@ref): ``ϵ_k = -2( \\Re(t) cos(k) + \\Im(t) sin(k))``
- [`continuum_dispersion`](@ref): ``ϵ_k = \\Re(t) k^2 - 2 \\Im(t) k``
* `v_ho`: strength of the external harmonic oscillator potential ``v_\\mathrm{ho}``.

See also [`HubbardMom1D`](@ref), [`HubbardReal1DEP`](@ref),
Expand Down Expand Up @@ -87,7 +87,7 @@ function HubbardMom1DEP(
end
kr = range(start; step = step, length = M)
ks = SVector{M}(kr)
kes = SVector{M}(T .* dispersion.(kr))
kes = SVector{M}(dispersion.(T, kr))

potential = momentum_space_harmonic_potential(M, V)

Expand Down
Loading