Find the energy levels of a system of two interacting spins


 * 1) Identify the Hamiltonian for a system of two interacting quantum spins, \(\hat{\mathbf{S}}_1\), \(\hat{\mathbf{S}}_2\) with magnitude \(S\): \(\hat{\mathcal{H}} = -J\hat{\mathbf{S}}_1\hat{\mathbf{S}}_2 - H\left(S_1^z + S_2^z\right)\)
 * 2) Expand \(\hat{\mathbf{S}}_1\hat{\mathbf{S}}_2\): \(\hat{\mathcal{H}} = -\frac{J}{2}\left(\hat{\mathbf{S}}_1 + \hat{\mathbf{S}}_2\right)^2 + \frac{J}{2}\left(\hat{\mathbf{S}}_1^2 + \hat{\mathbf{S}}_2^2\right) - H\left(S_1^z + S_2^z\right)\)
 * 3) Substitute \(\left(\hat{\mathbf{S}}_1 + \hat{\mathbf{S}}_2\right)^2 = \hat{\mathbf{S}}_{total} = L\left(L+1\right)\) and \(\hat{\mathbf{S}}^2 = S\left(S+1\right)\), where \(S\) is the spin magnitude, \(L\) is the total spin and \(m\) is the magnetic quantum number: \(\hat{\mathcal{H}} = -\frac{J}{2}L\left(L+1\right) + J S\left(S+1\right) - Hm\)
 * 4) Find the eigenvalues of \(\hat{\mathcal{H}}\): \(E\left(L,m\right) = -\frac{J}{2}L\left(L+1\right) + J S\left(S+1\right) - Hm\)
 * 5) Calculate the eigenvalue for the ground state, \(L=2S\), \(m=L\): \(E_0 = -JS^2 - 2HS\)
 * 6) Find eigenvalue of excited states by setting \(L=2S - l\) and \(m=2S - l - n\): \(E = -\frac{J}{2}\left(2S - l\right)L\left(2S - l+1\right) + J S\left(S+1\right) - H\left(2S - l - n\right)\)
 * 7) Simplify: \(E = E_0 + \frac{J}{2}l\left(4S + 1 - l\right) + H\left(l+n\right)\)