  A qualgebra $G$ is a set having two binary operations that satisfy
compatibility conditions which are modeled upon a group under conjugation and
multiplication. We develop a homology theory for qualgebras and describe a
classifying space for it. This space is constructed from $G$-colored prisms
(products of simplices) and simultaneously generalizes (and includes)
simplicial classifying spaces for groups and cubical classifying spaces for
quandles. Degenerate cells of several types are added to the regular prismatic
cells; by duality, these correspond to "non-rigid" Reidemeister moves and their
higher dimensional analogues. Coupled with $G$-coloring techniques, our
homology theory yields invariants of knotted trivalent graphs in $\mathbb{R}^3$
and knotted foams in $\mathbb{R}^4$. We re-interpret these invariants as
homotopy classes of maps from $S^2$ or $S^3$ to the classifying space of $G$.
