This library finds that encoding automatically, then solves them.
Problems addressed are counting and optimisation problems with bounded-rank constraint structure - scheduling, rostering, network flow, statistical-mechanics partition functions, quantum circuit verification, and others.
Note: Most #P-hard problems don't have this structure. The library is explicit when it can't help.
Repo and docs: - github.com/pcoz/holant-tools - pypi.org/project/holant-tools
All feedback welcome!