Qiskit / qiskit-addon-dice-solver

An eigensolver used to scale up SQD chemistry workflows past 30 orbitals
https://qiskit.github.io/qiskit-addon-dice-solver
Apache License 2.0
18 stars 2 forks source link

Speed up wavefunction coefficient generation #18

Closed caleb-johnson closed 1 month ago

caleb-johnson commented 1 month ago

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.