Because the data structure used to store determinants implies an ordering of the MOs, we also need to compute a phase factor. Here, we propose an algorithm to perform e ciently the computation of the phase factor. For a determinant |I that is going to be used repeatedly for phase calculations, we introduce a phase mask represented as a bitstring: