  A fundamental result in the study of graph homomorphisms is Lov\'asz's
theorem that two graphs are isomorphic if and only if they admit the same
number of homomorphisms from every graph. A line of work extending Lov\'asz's
result to more general types of graphs was recently capped by Cai and Govorov,
who showed that it holds for graphs with vertex and edge weights from an
arbitrary field of characteristic 0. In this work, we generalize from graph
homomorphism -- a special case of #CSP with a single binary function -- to
general #CSP by showing that two sets $\mathcal{F}$ and $\mathcal{G}$ of
arbitrary constraint functions are isomorphic if and only if the partition
function of any #CSP instance is unchanged when we replace the functions in
$\mathcal{F}$ with those in $\mathcal{G}$. We give two very different proofs of
this result. First, we demonstrate the power of the simple Vandermonde
interpolation technique of Cai and Govorov by extending it to general #CSP.
Second, we give a proof using the intertwiners of the automorphism group of a
constraint function set, a concept from the representation theory of compact
groups. This proof is a generalization of a classical version of the recent
proof of the Lov\'asz-type result by Man\v{c}inska and Roberson relating
quantum isomorphism and homomorphisms from planar graphs.
