[Kwant] What is the algorithm for calculating the mode decomposition