This blog post is incomplete and currently being written.
Let $q ∈ \N$ be an integer satisfying $q ≥ 2$. A $q$-spin system is specified by a graph $G = (V, E)$, a nonnegative symmetric interaction matrix $\mathbf A ∈ \R^{q×q}{≥0}$, and a nonnegative vector of external fields $\mathbf \lambda ∈ \R^{V×[q]}{≥0}$. These data give rise to a Gibbs distribution $\mu = \mu_{G,\mathbf A,\mathbf\lambda}$ on $[q] ^V$ given by
$$ \mu(\sigma)\propto\prod_{uv\in E}\boldsymbol A_{\sigma(u),\sigma(v)}\prod_{v\in V}\boldsymbol{\lambda}_{v,\sigma(v)},\quad\forall\sigma:V\to[q], $$
with corresponding partition function
$$ Z=Z_{G,\boldsymbol{A}}(\boldsymbol{\lambda})\overset{\mathsf{def}}{\operatorname*{=}}\sum_{\sigma:V\to\left[q\right]}\prod_{uv\in E}\boldsymbol{A}{\sigma(u),\sigma(v)}\prod{v\in V}\boldsymbol{\lambda}_{v,\sigma(v)}. $$
The elements of $[q]$ are often called spins or colors. Often when $q = 2$, we will instead take the space of spins to be either $\{0, 1\}$ or $\{±1\}$ depending on context.
Suppose $q=2$ and $\boldsymbol{A}=\begin{bmatrix}e^\beta&1\\1&e^\beta\end{bmatrix}$ where $β ≥ 0$. Then this $2$-spin system exactly recovers the ferromagnetic Ising model. A natural generalization to larger $q ≥ 2$, where $\mathbf A = (e^β − 1) · I + \mathbf 1_q\mathbf 1^\top_q$ gives rise to the ferromagnetic Potts model.
Suppose $q = 2, A=\begin{bmatrix}0&1\\1&1\end{bmatrix}$, and $λ = (λ\mathbf 1_V ,\mathbf 1_V )$ for some $λ ∈ \R_{≥0}$. Then we can view the assignments $σ : V → [q]$ as indicators of subsets of vertices. Furthermore, $\mu$ is supported on independent sets of $G$, i.e. subsets $I ⊆ V$ such that no pair of vertices in $I$ are connected by an edge. For such sets of vertices, we have $\mu(I) ∝ λ^{ |I| }$. This is called the hardcore (gas) model.
Suppose $\mathbf A =\mathbf 1_q\mathbf 1^\top_q − I$ and $λ = 1$. Then $\mu$ is uniform over the (proper) $q$-colorings of $G$, i.e. assignments $χ : V → [q]$ such that $χ(u)\not= χ(v)$ for all $uv ∈ E$.