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 a0060dc commit 54cc830
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/bst_helpers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
"""
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}
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)
ci_vector = BSTstate(clusters, fspace, cluster_bases, R=R)
dims = ones(Int, max_index)
configs = []
for i in 2:number_of_single_excitations
Expand All @@ -15,25 +14,24 @@ function bst_single_excitonic_basis(clusters, fspace::FockConfig{N}, cluster_bas
end
end
for config in configs
ci_vector[FermiCG.FockConfig(init_fspace)][FermiCG.TuckerConfig(config)] =
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(clusters, fspace::FockConfig{N}, cluster_bases::Vector{ClusterBasis{A, T}}; R=1) where {N, T, A}
function bst_biexcitonic_basis(fspace::FockConfig{N},ci_vector::BSTstate{T,N,A}; 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)] =
ci_vector[fspace][FermiCG.TuckerConfig(config)] =
FermiCG.Tucker(tuple([zeros(Float64, dims...) for _ in 1:R]...))
end

Expand Down

0 comments on commit 54cc830

Please sign in to comment.