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 $ S_i^x $ and $ S_i^y $ are the spin-1/2 components at site $ i $. We assume $N$ is even and periodic boundary conditions ($ S_{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 $ c_i $ and $ c_i^\dagger $ are fermion annihilation and creation operators, respectively.
The total spin $S^z_{tot}$ is related with the fermion number $M=\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 $S^z=0$ sector and this corresponds to the half-filled state $M=N/2$ in the language of fermions. The ground state energy is given by $ 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 $S^z$ sectors. As an example, we consider the $N=4$ case. For $S^z_{tot}=2\ (M=4)$, the state is $|M=4\rangle=|1111\rangle$ and the energy is 0 where $|1\rangle /|0\rangle$ is the fermions' occupied/unoccupied state. For $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$. For $S^z_{tot}=0\ (M=2)$, the energy is $-J/\sqrt{2}$. How do you find the energy and eigenstate in general?