Correct MC sampling of a truncated Hilbert space.
Correct MC sampling of a truncated Hilbert space.

The merge in 9cd0d5a only works for spin-polarised systems as it breaks
the assumption (introduced in merge ef320dc) that the selection to
excite an electron does not depend on any previous selection.  Example:
given N alpha and N beta electrons and having already selected to excite
an alpha electron, the probability of selecting an alpha electron again
is (N-1)/2N vs 1/2 for a beta electron.  We could reweight this but it's
simply just to generalise the existing code and divide the space into
sectors according to the excitation level *and* the number of alpha
electrons involved in the excitation.  Each sector is then sampled
according to the fraction of the total Hilbert space it contains.

Note that, as within a sector all determinants are generated uniformly,
we no longer need to reweight by the number of ways an excitation could
have been generated (e.g. (alpha, alpha)->(alpha,alpha) excitation could
be generated twice as many ways as a (alpha,beta)->(alpha,beta)
excitation) as the number of permutations a given excitation has is
constant within a sector.

hande-qmc/hande,hande-qmc/hande,hande-qmc/hande,hande-qmc/hande,ruthfranklin/hande,hande-qmc/hande