calc_pgen_singles_pcpp Function

public function calc_pgen_singles_pcpp(ilutI, ex) result(pgen)

Returns the probability of generating a single excitation using the pcpp excitation generator @param[in] ilutI starting determinant of the excitation in the ilut format @param[in] ex excitation as a 1-D integer array of size 2 @return pgen probability of picking ex as an excitation from ilutI with pcpp mode (does not account for pSingles)

Arguments

Type IntentOptional Attributes Name
integer(kind=n_int), intent(in) :: ilutI(0:NIfTot)
integer, intent(in) :: ex(2)

Return Value real(kind=dp)


Contents


Source Code

    function calc_pgen_singles_pcpp(ilutI,ex) result(pgen)
        integer(n_int), intent(in) :: ilutI(0:NIfTot)
        integer, intent(in) :: ex(2)

        real(dp) :: pgen

        integer :: src
        integer :: elec_map(nel)

        ! First, get the probability to draw the target orbital given the source orbital
        pgen = single_hole_sampler(ex(1))%get_prob(ex(2))
        ! Now, trace back what the originally drawn source orbital has been
        elec_map = create_elec_map(ilutI)
        src = custom_findloc(elec_map, ex(1))
        ! And then add the probability of drawing that one
        pgen = pgen * single_elec_sampler%get_prob(src)

    end function calc_pgen_singles_pcpp