-
Notifications
You must be signed in to change notification settings - Fork 1
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/ExtendedHubbardMom1D #286
Merged
Merged
Changes from all commits
Commits
Show all changes
50 commits
Select commit
Hold shift + click to select a range
0686527
Create ExtendedHubbardMom1D.jl
Skuwar1 3132f2d
Update excitations.jl
Skuwar1 d7a75b0
Update Hamiltonians.jl
Skuwar1 ecdb0de
Update Hamiltonians.jl
Skuwar1 fba2117
Update hamiltonians.md
Skuwar1 b6a770f
Update Hamiltonians.jl
Skuwar1 e79166b
Update src/Hamiltonians/ExtendedHubbardMom1D.jl
Skuwar1 6bcce45
Update src/Hamiltonians/ExtendedHubbardMom1D.jl
Skuwar1 7041a4f
Update src/Hamiltonians/excitations.jl
Skuwar1 6896ff9
Update src/Hamiltonians/ExtendedHubbardMom1D.jl
Skuwar1 ca35158
Update HubbardMom1D.jl
Skuwar1 1d9e3e1
Update HubbardMom1D.jl
Skuwar1 a841f50
Update HubbardMom1D.jl
Skuwar1 3683cd3
Update HubbardMom1D.jl
Skuwar1 ccc9afe
Update HubbardMom1D.jl
Skuwar1 6f6e8c1
Update excitations.jl
Skuwar1 1d7c106
Update ExtendedHubbardMom1D.jl
Skuwar1 e57c56a
Update HubbardMom1D.jl
Skuwar1 dec092c
Update Hamiltonians.jl
Skuwar1 8741d71
Update Hamiltonians.jl
Skuwar1 bb4549e
Update HubbardMom1D.jl
Skuwar1 33a8aed
Update Hamiltonians.jl
Skuwar1 c2bb58b
Update excitations.jl
Skuwar1 675eeb2
Update ExtendedHubbardMom1D.jl
Skuwar1 e225215
Update ExtendedHubbardMom1D.jl
Skuwar1 a0ce97a
docstring fix for HubbardMom1DEP
joachimbrand 482bb83
Update HubbardMom1DEP.jl
Skuwar1 0ebd770
Update excitations.jl
Skuwar1 5d4398f
Update ExtendedHubbardMom1D.jl
Skuwar1 a7111b0
Update ExtendedHubbardMom1D.jl
Skuwar1 4547b6f
Update HubbardMom1D.jl
Skuwar1 ba09fec
Update ExtendedHubbardMom1D.jl
Skuwar1 cb2b026
Update Hamiltonians.jl
Skuwar1 2946fbd
Update src/Hamiltonians/ExtendedHubbardMom1D.jl
Skuwar1 cf9510f
Update src/Hamiltonians/ExtendedHubbardMom1D.jl
Skuwar1 3a1e8a7
Update Hamiltonians.jl
Skuwar1 ae348a9
Update Hamiltonians.jl
Skuwar1 20b96ef
Update Hamiltonians.jl
Skuwar1 29272f4
Update Hamiltonians.jl
Skuwar1 da25327
Update Hamiltonians.jl
Skuwar1 e322017
Update Hamiltonians.jl
Skuwar1 4b89579
Update ExtendedHubbardMom1D.jl
Skuwar1 e98c66b
Update src/Hamiltonians/excitations.jl
Skuwar1 9026bfa
Update ExtendedHubbardMom1D.jl
Skuwar1 98caa3b
Update Hamiltonians.jl
Skuwar1 ddec20d
Update Hamiltonians.jl
Skuwar1 cbbb0ce
Update excitations.jl
Skuwar1 cfdc83c
Update ExtendedHubbardMom1D.jl
Skuwar1 1104d08
Update excitations.jl
Skuwar1 035a1b3
Update excitations.jl
Skuwar1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
""" | ||
ExtendedHubbardMom1D( | ||
address; | ||
u=1.0, t=1.0, v=1.0, dispersion=hubbard_dispersion, boundary_condition = 0.0 | ||
) | ||
|
||
Implements a one-dimensional extended Hubbard chain, also known as the ``t - V`` model, | ||
in momentum space. | ||
|
||
```math | ||
\\hat{H} = \\sum_{k} ϵ_k n_k + \\frac{1}{2M} \\sum_{kpqr} (u + 2v \\cos(q-p)) a^†_{r} a^†_{q} a_p a_k δ_{r+q,p+k} | ||
``` | ||
|
||
# Arguments | ||
|
||
* `address`: the starting address, defines number of particles and sites. | ||
* `u`: the interaction parameter. | ||
* `t`: the hopping strength. | ||
* `boundary_condition`: `θ <: Number`: hopping over the boundary incurs a | ||
factor ``\\exp(iθ)`` for a hop to the right and ``\\exp(−iθ)`` for a hop to the left. | ||
|
||
* `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 | ||
|
||
* [`HubbardMom1D`](@ref) | ||
* [`HubbardReal1D`](@ref) | ||
* [`ExtendedHubbardReal1D`](@ref) | ||
""" | ||
struct ExtendedHubbardMom1D{TT,M,AD<:AbstractFockAddress,U,V,T,BOUNDARY_CONDITION} <: AbstractHamiltonian{TT} | ||
address::AD # default starting address, should have N particles and M modes | ||
ks::SVector{M,TT} # values for k | ||
kes::SVector{M,TT} # values for kinetic energy | ||
end | ||
|
||
function ExtendedHubbardMom1D( | ||
address::SingleComponentFockAddress; | ||
u=1.0, v=1.0, t=1.0, dispersion = hubbard_dispersion, boundary_condition = 0.0 | ||
) | ||
M = num_modes(address) | ||
U, V, T= promote(float(u), float(v), float(t)) | ||
step = 2π/M | ||
if isodd(M) | ||
start = -π*(1+1/M) + step | ||
else | ||
start = -π + step | ||
end | ||
kr = range(start; step = step, length = M) | ||
ks = SVector{M}(kr) | ||
kes = SVector{M}(dispersion.(T , kr .+ (boundary_condition/M))) | ||
return ExtendedHubbardMom1D{typeof(U),M,typeof(address),U,V,T,boundary_condition}(address, ks, kes) | ||
end | ||
|
||
function Base.show(io::IO, h::ExtendedHubbardMom1D) | ||
compact_addr = repr(h.address, context=:compact => true) # compact print address | ||
print(io, "ExtendedHubbardMom1D($(compact_addr); u=$(h.u), v=$(h.v), t=$(h.t), boundary_condition=$(h.boundary_condition))") | ||
end | ||
|
||
function starting_address(h::ExtendedHubbardMom1D) | ||
return h.address | ||
end | ||
|
||
dimension(::ExtendedHubbardMom1D, address) = number_conserving_dimension(address) | ||
|
||
LOStructure(::Type{<:ExtendedHubbardMom1D{<:Real}}) = IsHermitian() | ||
|
||
Base.getproperty(h::ExtendedHubbardMom1D, s::Symbol) = getproperty(h, Val(s)) | ||
Base.getproperty(h::ExtendedHubbardMom1D, ::Val{:ks}) = getfield(h, :ks) | ||
Base.getproperty(h::ExtendedHubbardMom1D, ::Val{:kes}) = getfield(h, :kes) | ||
Base.getproperty(h::ExtendedHubbardMom1D, ::Val{:address}) = getfield(h, :address) | ||
Base.getproperty(h::ExtendedHubbardMom1D{<:Any,<:Any,<:Any,U}, ::Val{:u}) where {U} = U | ||
Base.getproperty(h::ExtendedHubbardMom1D{<:Any,<:Any,<:Any,<:Any,V}, ::Val{:v}) where {V} = V | ||
Base.getproperty(h::ExtendedHubbardMom1D{<:Any,<:Any,<:Any,<:Any,<:Any,T}, ::Val{:t}) where {T} = T | ||
Base.getproperty(h::ExtendedHubbardMom1D{<:Any,<:Any,<:Any,<:Any,<:Any,<:Any,BOUNDARY_CONDITION}, | ||
::Val{:boundary_condition}) where {BOUNDARY_CONDITION} = BOUNDARY_CONDITION | ||
|
||
ks(h::ExtendedHubbardMom1D) = getfield(h, :ks) | ||
|
||
# standard interface function | ||
function num_offdiagonals(ham::ExtendedHubbardMom1D, address::SingleComponentFockAddress) | ||
singlies, doublies = num_singly_doubly_occupied_sites(address) | ||
return num_offdiagonals(ham, address, singlies, doublies) | ||
end | ||
|
||
# 4-argument version | ||
@inline function num_offdiagonals(ham::ExtendedHubbardMom1D, ::SingleComponentFockAddress, singlies, doublies) | ||
M = num_modes(ham) | ||
return singlies * (singlies - 1) * (M - 2) + doublies * (M - 1) | ||
end | ||
|
||
@inline function diagonal_element(h::ExtendedHubbardMom1D{<:Any,M,A}, address::A) where {M,A<:SingleComponentFockAddress} | ||
map = OccupiedModeMap(address) | ||
return (dot(h.kes, map) + (h.u/ 2M) * momentum_transfer_diagonal(map) | ||
+ (h.v/ M) * extended_momentum_transfer_diagonal(map, 2π / M)) | ||
end | ||
|
||
@inline function diagonal_element(h::ExtendedHubbardMom1D{<:Any,M,A}, address::A) where {M,A<:FermiFS} | ||
map = OccupiedModeMap(address) | ||
return dot(h.kes, map) + (h.v/ M) * extended_momentum_transfer_diagonal(map, 2π / M) | ||
end | ||
|
||
@inline function get_offdiagonal( | ||
ham::ExtendedHubbardMom1D{<:Any,M,A}, address::A, chosen, map=OccupiedModeMap(address) | ||
) where {M,A<:SingleComponentFockAddress} | ||
address, onproduct,_,_,q = momentum_transfer_excitation(address, chosen, map) | ||
return address, ham.u * onproduct / 2M + ham.v * cos(q * 2π / M) * onproduct / M | ||
end | ||
|
||
@inline function get_offdiagonal( | ||
ham::ExtendedHubbardMom1D{<:Any,M,A}, address::A, chosen, map=OccupiedModeMap(address) | ||
) where {M,A<:FermiFS} | ||
address, onproduct,_,_,q = momentum_transfer_excitation(address, chosen, map) | ||
return address, -ham.v * onproduct * cos(q * 2π / M) / M | ||
end | ||
momentum(ham::ExtendedHubbardMom1D) = MomentumMom1D(ham) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was this function removed?