subroutine finalize_pcpp_excitgen()
implicit none
integer :: j, k, l
deallocate(refDet)
call single_elec_sampler%finalize()
call clear_sampler_array(single_hole_sampler)
call double_elec_one_sampler%finalize()
call clear_sampler_array(double_elec_two_sampler)
do j = 1, size(double_hole_one_sampler, 1)
do k = 1, size(double_hole_one_sampler, 2)
call double_hole_one_sampler(j, k - 1)%finalize()
end do
end do
do j = 1, size(double_hole_two_sampler, 1)
do k = 1, size(double_hole_two_sampler, 2)
do l = 1, size(double_hole_two_sampler, 3)
call double_hole_two_sampler(j, k - 1, l - 1)%finalize()
end do
end do
end do
deallocate(double_hole_two_sampler)
contains
end subroutine finalize_pcpp_excitgen