From the previous post, we used Mathematica to calculate the Nilsson orbitals with diagonalization method. At that time, we had a problem that Mathematica will sort the eigen energies, that create a problem that it is very difficult to track the Nilsson orbital. But now, this problem was solved by using the orthogonal property of the eigenstate. At small deformation, and , when the is small enough, the eigenstates for these two deformation would be almost perpendicular. When the ordering of the eigenstates changed due to energy sorting, the dot product of the eigenstates matrix would have off-diagonal elements. e.g.

This, we can use this matrix to change the order array.

Suppose at the beginning, the order array is {1,2,3}. After this matrix, the order array becomes {1,3,2}.

The tricky part is that, the element of the order array is the record for the position of states. For example, {1,2,3,5,7,4,8,6} tells us the position of the 7th state is at the 5-th position. In order to rearrange the energy so that the n-th state is placed at the n-th position, we have to find the position of the n-th state in the order array. The position array is {1,2,3,6,4,8,5,7}, and the energy of the 7-th state can be obtained from 5th position, as we expected. What we did here, can be better illustrate in following,

Suppose the state is notated using letter, e.g. {a,b,c,d,e,f,g,h}. For an order array, such that, {a,b,c,e,g,d,h,f}, we want to find the position array to tell us the position for the x-state. Thus, we have the position array {1,2,3,6,4,8,5,7}. This transform is between the position and the state.

The letter symbols in the order array represent the states and the position of the order array is the “position” or “order” of the state energies. The number in the position array represent the “position” or “order”, and the position of the position array represents each state in order. If we use {1,a} ordered array to represent the a-state is in position 1. Thus, {a,b,c,e,g,d,h,f} can be written as {{1,a},{2,b},{3,c},{4,e},{5,g},{6,d},{7,h},{8,f}}. And {1,2,3,6,4,8,5,7} = {{1,a},{2,b},{3,c},{6,d},{4,e},{8,f},{5,g},{7,h}}. On the other hands, it is a sorting with position to sorting with state.

The matrix of the eigenvectors from and interchange the order array, or the states. And for plotting with same color for the same state, we want the state is in order. Thus, we use the matrix to change the order of the states with respect to the position, after that, we have to sort it back according to states.