An invariant is introduced for negative definite plumbed 3-manifolds equipped with a spinc-structure. It unifies and extends two theories with rather different origins and structures. One theory is lattice cohomology, motivated by the study of normal surface singularities, known to be isomorphic to the Heegaard Floer homology for certain classes of plumbed 3-manifolds. Another specialization gives BPS q-series which satisfy some remarkable modularity properties and recover SU(2) quantum invariants of 3-manifolds at roots of unity.
In particular, our work gives rise to a 2-variable refinement of the \(\widehat Z\)-invariant.