I am not aware of any publicly available code but it seems hardly necessary, this system is very easy to implement. Here is some Mathematica code that I wrote in a couple of minutes:
Σ[a_][1, 1] := PauliMatrix[a];
Σ[a_][n_, i_] /; 1 <= i < n := KroneckerProduct[Σ[a][n - 1, i], IdentityMatrix[2]];
Σ[a_][n_, n_] := KroneckerProduct[IdentityMatrix[2^(n - 1)], PauliMatrix[a]];
With[{n = 4},
-1/2 Sum[jx Σ[1][n, j].Σ[1][n, Mod[j, n] + 1] + jy Σ[2][n, j].Σ[2][n, Mod[j, n] + 1] + jz Σ[3][n, j].Σ[3][n, Mod[j, n] + 1] + h Σ[3][n, j], {j, 1, n}]
]
You can easily compute the spectrum of $H$ numerically for small $n$. For example take $n=8$ and $h=0$, and work in units where $J_x=1$. Then, the gap of the system as a function of $J_y,J_z$ is obtained via
Flatten[Table[{jy, jz, #[[2]] - #[[1]] &@Sort[Eigenvalues[%]]}, {jy, 0, 2, .01}, {jz, 0, 2, .01}], 1]
ListDensityPlot[%, Axes -> True, AxesLabel -> {"jy", "jz"}, PlotLegends -> Automatic]
![enter image description here](https://cdn.statically.io/img/i.sstatic.net/GR1BD.png)
so we clearly see transitions across points and lines of enhanced symmetry, $J_y=1$ and $J_z=1$.
The partition function is also very easy to evaluate, you just use Tr[MatrixExp[-β H]]
.
For larger $n$ it becomes very costly to construct (let alone, diagonalize) the Hamiltonian so you need to be cleverer. The code above has a lot of room for improvement but in the end, if you want really large $n$, there are no exact methods available, you need approximations (some smart truncation, a statistical approach, or even using hardware specifically designed for such calculations...)
If you insist on using C/python/etc you'll have to translate the code above to your preferred language. It should be self-explanatory so I am sure you will succeed.