I want to compute the energies and eigenstates for non-zero total spin of the 1-dimensional XY model. The Hamiltonian for the 1-dimensional XY model is given by: \begin{align*} H = -J \sum_{i=1}^{N} (S_i^x S_{i+1}^x + S_i^y S_{i+1}^y) \end{align*} where SixS_i^x and SiyS_i^y are the spin-1/2 components at site ii . We assume NN is even and periodic boundary conditions ( SN+1=S1S_{N+1} = S_1 ). For convenience, We often transform the spin operators into fermion operators. We use the Jordan-Wigner transformation. This transforms the Hamiltonian into: \begin{align*} H = -\frac{J}{2} \sum_{i=1}^{N} (c_i^\dagger c_{i+1} + c_{i+1}^\dagger c_i) \end{align*} where cic_i and cic_i^\dagger are fermion annihilation and creation operators, respectively. The total spin StotzS^z_{tot} is related with the fermion number M=iciciM=\sum_i c_i^\dagger c_{i} as \begin{align*} S^z_{tot}=M-\frac{N}{2}. \end{align*} The ground state is given by the Sz=0S^z=0 sector and this corresponds to the half-filled state M=N/2M=N/2 in the language of fermions. The ground state energy is given by Eground=Jkhalf-filledcos(k)E_{\text{ground}} = -J \sum_{k \in \text{half-filled}} \cos(k) . What I want to find is the (minimum) energy and eigenstate for non-zero SzS^z sectors. As an example, we consider the N=4N=4 case. For Stotz=2 (M=4)S^z_{tot}=2\ (M=4) , the state is M=4=1111|M=4\rangle=|1111\rangle and the energy is 0 where 1/0|1\rangle /|0\rangle is the fermions' occupied/unoccupied state. For Stotz=1 (M=3)S^z_{tot}=1\ (M=3) , I think the eigenstate is given by: \begin{align*} |M=3\rangle=\frac{1}{2}\left[|0111\rangle + |1011 \rangle+| 1101 \rangle + | 1110 \rangle \right] \end{align*} and the energy is J/2-J/2 . For Stotz=0 (M=2)S^z_{tot}=0\ (M=2) , the energy is J/2-J/\sqrt{2} . How do you find the energy and eigenstate in general?