subroutine optimize_hubbard_time_step()
! routine to set the optimal time-step for the hubbard model,
! where the pgens and matrix elements are set
use SystemData, only: uhub, bhub, nel, omega, treal
real(dp) :: p_elec, p_hole, time_step, mat_ele, death_prob
! first of all write down the notes here..
! the first implementation should just use the non-optimized values
! from the current implementation..
! afterwards i want to optimize especially the real-space hubbard
! implementation, since this is done really inefficient right now!
! although it is just wrong how it is done currently in the
! real-space hubbard model.. damn..
! are my results still valid??
if (tReal) then
! in the real-space hubbard model the electron is picked
! uniformly
p_elec = 1.0_dp / real(nel, dp)
! and the hole should be picked from the neighbors:
! p_hole = 1.0_dp / (2.0_dp * real(dims, dp))
p_hole = min(1.0_dp / real(nBasis / 2 - nOccAlpha, dp), &
1.0_dp / real(nBasis / 2 - nOccBeta, dp))
! and the matrix element is always just -t
mat_ele = bhub
! so the off-diagonal time-step should be
time_step = p_elec * p_hole / abs(mat_ele)
! but one has to also consider the diagonal part for the
! death probability (to limit it to < 1)
! there can be at most half the number of electrons double
! occupied sites!
death_prob = Uhub * nel / 2.0_dp
print *, "optimized time-step for real-space hubbard: ", time_step
if (t_trans_corr_2body .or. t_trans_corr) then
print *, "BUT: transcorrelated Hamiltonian used! "
print *, " so matrix elements are not uniform anymore!"
end if
else
! in the momentum space hubbard the electrons fix the the holes
! to be picked! atleast if one is picked the 2nd hole is also
! chosen!
! for the 2-body transcorrelation we have to consider the
! different types of excitations and find the minimum tau
! for it..
! but also the matrix elements are not uniform.. so one
! would need to find the worst H_ij/pgen ratio, which is
! no feasible here.. thats actually what the tau-search is
! doing..
p_elec = 2.0_dp / real(nOccAlpha * nOccBeta, dp)
! and the holes are all the remaining possible ones
p_hole = 1.0_dp / real(nbasis - nel, dp)
! the matrix element is always U (or U/2 ?? ) check!
mat_ele = uhub / omega
time_step = p_elec * p_hole / abs(mat_ele)
! the diagonal element is -2t cos(k_vec)
death_prob = 2.0_dp * abs(bhub)
print *, "optimized time-step for the momentum space hubbard: ", time_step
if (t_trans_corr_2body .or. t_trans_corr) then
print *, "BUT: transcorrelated Hamiltonian used! "
print *, " so matrix elements and pgens are not uniform anymore!"
print *, " thus TAU is just a rough estimate! "
end if
end if
! with this stuff i can make the optimal time-step!
! but for the real-space hubbard i have to first implement the
! better choosing of only neighboring holes!
if (tau > time_step) then
print *, "initial guessed or input-provided time-step too large!"
else
print *, "initial guessed or input-provided time-step too small!"
end if
call assign_value_to_tau(clamp(0.1_dp * time_step, min_tau, max_tau), 'Initial guess hubbard')
print *, "setting time-step to 0.1 * optimal: ", tau
print *, "and turning tau-search OFF!"
tau_search_method = possible_tau_search_methods%OFF
t_fill_frequency_hists = .false.
t_test_hist_tau = .false.
end subroutine optimize_hubbard_time_step