Consider a simple periodic 1D chain with four sites with periodic boundary condition. The Hamiltonian reads
$$ H = t c_1^\dagger c_2 + c_2^\dagger c_3 + t c_3^\dagger c_4 + c_4^\dagger c_1 + h.c. $$
where $t$ is the hopping strength. In terms of matrix, it is simply
$$ H = \left[\begin{array}{cccc} 0 & t & 0 & 1 \\ t & 0 & 1 & 0 \\ 0 & 1 & 0 & t \\ 1 & 0 & t & 0 \end{array}\right] $$
with eigenvalues $[-1-t,-1+t,1-t,1+t]$. For $|t|<1$, the ground state will be a two-body state, which fills the lowest two eigenlevels such that the ground state energy is $E=-2$.
Now let's assume the operators $c_i$ are hardcore-bosonic, such that we can make the following Jordan-Wigner type of transformation
$$ c^\dagger_j = (X_j + i Y_j)/2\\ c_j = (X_j - i Y_j)/2 $$
where $X_j,Y_j$ are the Pauli operators at site $j$. As one can check, the operators satisfy $[c_i^\dagger,c_j]=0$ if $i\neq j$ and $\left\{c_i^\dagger,c_j\right\}=1$ if $i=j$. In this representation, we shall make the following identification
$$ c_1^\dagger c_2 = \frac{X_1+iY_1}{2}\otimes\frac{X_2-iY_2}{2}\otimes I_3\otimes I_4 $$
similarly for other terms, such that the Hamiltonian reads
$$ \begin{align*} H =\ &t \frac{X_1+iY_1}{2}\otimes\frac{X_2-iY_2}{2}\otimes I_3\otimes I_4\\ &+ I_1\otimes\frac{X_2+iY_2}{2}\otimes \frac{X_3-iY_3}{2}\otimes I_4 \quad \\ &+ t I_1\otimes I_2\frac{X_3+iY_3}{2}\otimes\frac{X_4-iY_4}{2} \\ &+ \frac{X_1-iY_1}{2}\otimes I_2\otimes I_3\otimes\frac{X_4+iY_4}{2} \\ &+ h.c. \end{align*} $$
which is a $16\times 16$ matrix that contains all the possible many-body state. One could also diagonalize it to obtain the ground state energy, and for $|t|<1$, I found $E=-2\sqrt{1+t^2}$, which is different from the previous result.
One could repeat the calculation for chains of length $2L$, and I found that the two methods wil give the same ground state energy if $L$ is odd, while there seems to be discrepancy if $L$ is even. This is quite strange to me, and I could not find any mistake. Any help is greatly appreciated!