  We introduce a theory of twisted simplicial distributions on simplicial
principal bundles, which allow us to capture Bell's non-locality, and the more
general notion of quantum contextuality. We leverage the classical theory of
simplicial principal bundles, as well as structures on categories of such
bundles, to provide powerful computational tools for analyzing twisted
distributions in terms of both direct constructions in simplicial sets and
techniques from homological algebra. We use these techniques to analyze our key
examples: quantum distributions and operator-theoretic polytopes used in the
classical simulation of quantum computation.
