Create an index map for quick access during WF coeff generation. Reduces time complexity of the generation function from O(M*N) to O(NlogN), where M is the number of input determinants and N is the number of unique input determinants.
The old MlogN scaling came from the fact that we conducted a search (np.where) through all unique determinants (N) for each input determinant (M).
While the process of creating the coefficient array itself has been improved to O(M), the function is now bounded by the np.unique call, which performs an NlogN sorting routine.
Create an index map for quick access during WF coeff generation. Reduces time complexity of the generation function from
O(M*N)
toO(NlogN)
, whereM
is the number of input determinants andN
is the number of unique input determinants.The old
MlogN
scaling came from the fact that we conducted a search (np.where
) through all unique determinants (N
) for each input determinant (M
).While the process of creating the coefficient array itself has been improved to
O(M)
, the function is now bounded by thenp.unique
call, which performs anNlogN
sorting routine.