= Solution
Inside the <infinite square well>, the orbital and <spin> operators act on different factors of the <tensor product>. Write $\mathbf S=\mathbf S_1+\mathbf S_2$. The identity
$$
\mathbf S_1\cdot\mathbf S_2=\frac12\left(S^2-S_1^2-S_2^2\right)
=\frac12\left(S^2-\frac32\hbar^2\right)
$$
shows that the <exchange interaction> commutes with $S^2$ and $S_z$. The sum of the one-particle kinetic energies also commutes with them and with particle exchange. Thus one may use orbital <quantum numbers> together with the <total-spin sector> $S=0,1$ and projection $M=-S,\ldots,S$, with physical $S_z=\hbar M$.
For identical <spin one-half> particles the <Pauli exclusion principle> further restricts the states. The <spin-one-half singlet state> is antisymmetric in <spin> and must multiply a symmetric spatial <wavefunction>; a <spin-one-half triplet state> must multiply an antisymmetric spatial <wavefunction>. Thus $n_1,n_2$ label unordered orbital occupations in symmetry-adapted states, not arbitrary ordered product states. This gives the labels $|n_1,n_2,S,M\rangle$, with the paper's last label expressed in units of $\hbar$.
Back to article page