Skip to content

Commit

Permalink
Merge pull request nmayhall-vt#194 from arnab82/main
Browse files Browse the repository at this point in the history
bst or spt single excitation configurations creating function added
  • Loading branch information
nmayhall-vt authored Jan 28, 2024
2 parents eb40bdf + 54cc830 commit b8aba72
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/FermiCG.jl
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ include("tucker_form_sigma_block_expand.jl")
include("tucker_outer.jl")
include("tucker_pt.jl")
include("bst.jl")
include("bst_helpers.jl")

include("tpsci_inner.jl")
include("tpsci_matvec_thread.jl")
Expand Down
41 changes: 41 additions & 0 deletions src/bst_helpers.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@


"""
function bst_single_excitonic_basis(clusters, fspace::FockConfig{N}; R=1, Nk=2, T=Float64) where {N}
"""
function bst_single_excitonic_basis(fspace::FockConfig{N}, ci_vector::BSTstate{T,N,A}; R=1,number_of_single_excitations=4) where {N, T, A}
max_index = length(fspace.config)
dims = ones(Int, max_index)
configs = []
for i in 2:number_of_single_excitations
for indices in combinations(1:max_index, 1)
config = [in(k, indices) ? (i:i) : (1:1) for k in 1:max_index]
push!(configs, tuple(config...))
end
end
for config in configs
ci_vector[fspace][FermiCG.TuckerConfig(config)] =
FermiCG.Tucker(tuple([zeros(Float64, dims...) for _ in 1:R]...))
end
return ci_vector
end
"""
function bst_biexcitonic_basis(clusters, fspace::FockConfig{N}; R=1, Nk=2, T=Float64) where {N}
"""
function bst_biexcitonic_basis(fspace::FockConfig{N},ci_vector::BSTstate{T,N,A}; R=1) where {N, T, A}
max_index = length(fspace.config)
configs = []
for indices in combinations(1:max_index, 2)
config = [in(k, indices) ? (2:2) : (1:1) for k in 1:max_index]
push!(configs, tuple(config...))
end
dims = ones(Int, max_index)
for config in configs
ci_vector[fspace][FermiCG.TuckerConfig(config)] =
FermiCG.Tucker(tuple([zeros(Float64, dims...) for _ in 1:R]...))
end

return ci_vector
end


0 comments on commit b8aba72

Please sign in to comment.