Within P , the Davidson diagonalization algorithm is implemented in its multi-state version. Algorith- ). As H is symmetric, the number of non-zero elements per column is identical. is makes H very sparse. However, for large basis sets, the whole matrix may still not t in a single node memory, as the number of non-zero entries to be stored is of the order of N det N 2 ↑ (N orb -N ↑ ) 2 . One possibility would be to distribute the storage of H among multiple compute nodes, and use a distributed library such as PBLAS 153 to perform the matrix-vector operations. Another approach is to use a so-called direct algorithm, where the matrix elements are computed on the y, and this is the approach we have chosen in P . is e ectively means iterating over all pairs of determinants |I and |J , checking whether |I and |J are connected by H and if they are, accessing the corre- sponding integral(s) and computing the phase factor. Even though it is possible to compute the excitation degree between two determinants very e ciently, 152 the number of such computations scales as N 2 det , which becomes rapidly prohibitively high. To get an e cient determinant-driven implementation it is mandatory to lter out all pairs of determinants that are not connected by H, and iterate only over connected pairs. To reach this goal, we have implemented an algorithm similar to the Direct Selected Con guration Interaction Using Strings (DISCIUS) algorithm. e determinants of the internal space are re-ordered in linear time as explained in Ref. 62, such that the wave function can be expressed as