Skip to content

Commit

Permalink
transform basis length problem in mutithreading solved
Browse files Browse the repository at this point in the history
  • Loading branch information
arnab82 committed Jun 20, 2024
1 parent b991aea commit 8b805dd
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/tucker_pt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,11 @@ function form_1body_operator_diagonal!(sig::BSTstate{T,N,R}, Fdiag::BSTstate{T,N

#
# Rotate the original vector into this basis
transform_basis!(sig[fock][tconfig], rotations)
if length(rotations)==N
transform_basis!(sig[fock][tconfig], rotations)
else
continue
end
end
end

Expand Down Expand Up @@ -1149,10 +1153,8 @@ function _pt2_job2(sig_fock, job, ket::BSTstate{T,N,R}, cluster_ops, clustered_h
end
end
end

curr_tuck = Vector{Any}()
for (sig_tconfig, terms_to_process) in tconfigs_to_process
curr_tucker = []
i=1
#curr_tuck=Tucker{T,N,R}() #initialization problem is there as in every iteration there is a new dimension of Tucker core and factor
#if I don't want to store tucker in a list, though it is not affecting the time and memory allocations
for (term, ket_fock, ket_tconfig) in terms_to_process
Expand All @@ -1175,17 +1177,15 @@ function _pt2_job2(sig_fock, job, ket::BSTstate{T,N,R}, cluster_ops, clustered_h
prescreen=thresh)
#compress new addition
sig_tuck = compress(sig_tuck, thresh=thresh)
push!(curr_tucker, sig_tuck)

# println(sig_tuck)
if i==1
#curr_tuck = sig_tuck
curr_tuck = curr_tucker[i]
if length(curr_tuck) == 0
curr_tuck = sig_tuck
else
#curr_tuck=nonorth_add([curr_tuck, sig_tuck])
curr_tuck=nonorth_add([curr_tuck, curr_tucker[i]])
curr_tuck=nonorth_add([curr_tuck, sig_tuck])

end
##curr_tuck=nonorth_add([curr_tuck, sig_tuck])
i+=1
end

if length(curr_tuck) == 0
Expand Down

0 comments on commit 8b805dd

Please sign in to comment.