Skip to content

Commit

Permalink
single excitations and biexcitations bst configurations creating func…
Browse files Browse the repository at this point in the history
…tions added
  • Loading branch information
arnab82 committed Jan 28, 2024
1 parent eb40bdf commit a0060dc
Show file tree
Hide file tree
Showing 2 changed files with 44 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
43 changes: 43 additions & 0 deletions src/bst_helpers.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@


"""
function bst_single_excitonic_basis(clusters, fspace::FockConfig{N}; R=1, Nk=2, T=Float64) where {N}
"""
function bst_single_excitonic_basis(clusters, fspace::FockConfig{N}, cluster_bases::Vector{ClusterBasis{A, T}}; R=1,number_of_single_excitations=4) where {N, T, A}
max_index = length(fspace.config)
ci_vector = BSTstate(clusters, fspace, cluster_bases, R=R)
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[FermiCG.FockConfig(init_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(clusters, fspace::FockConfig{N}, cluster_bases::Vector{ClusterBasis{A, T}}; R=1) where {N, T, A}
max_index = length(fspace.config)
ci_vector = BSTstate(clusters, fspace, cluster_bases, R=R)
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[FermiCG.FockConfig(init_fspace)][FermiCG.TuckerConfig(config)] =
FermiCG.Tucker(tuple([zeros(Float64, dims...) for _ in 1:R]...))
end

return ci_vector
end


0 comments on commit a0060dc

Please sign in to comment.