anchor.diff:          call check_allocate('real_population', qs%psip_list%nspaces, ierr)
           allocate(weighted_population(qs%psip_list%nspaces), stat=ierr)
           call check_allocate('weighted_population', qs%psip_list%nspaces, ierr)
  -        allocate(nattempts_current_det(qs%psip_list%nspaces), stat=ierr)
  -        call check_allocate('nattempts_current_det', qs%psip_list%nspaces, ierr)
   
           call dSFMT_init(qmc_in%seed+iproc, 50000, rng)
           if (restart_in%restart_rng .and. allocated(qs%rng_state%dsfmt_state)) then
  
positive.code: 
          call dealloc_det_info_t(cdet, .false.)
          
          ! [todo] Do we want to deallocate the other arrays that were allocated in this function as well?
          deallocate(nattempts_current_det, stat=ierr)
          call check_deallocate('nattempts_current_det', ierr)
  
          call dSFMT_end(rng)
  
      end subroutine do_fciqmc
  
negative.code:                         ! Extract the real sign from the encoded sign.
                          real_population(ispace) = real(qs%psip_list%pops(ispace,idet),p)/qs%psip_list%pop_real_factor
                          weighted_population(ispace) = importance_sampling_weight(qs%trial, cdet, real_population(ispace))
                      end do
  
                      ! If we use a weighted excitation generator where weights can be pre-calculated, need additional decoder:
                      ! Note that we estimate the number of attempts by the sum of populations in all spaces. This is not to
                      ! alter Markov chains and call the function decide_nattempts early and pre-calculate.
                      if (qs%excit_gen_data%weight_decoder) then
                          call decoder_excit_gen_ptr(sys, cdet, qs%excit_gen_data, &
                              nattempts=int(sum(real_population(1:qs%psip_list%nspaces))))
                      end if
  
                      ! If this is a deterministic state then copy its population
  