We present a framework to prepare superpositions of bit strings, i.e., many-body spin configurations, with deterministic programmable probabilities. The spin configurations are encoded in the degenerate ground states of the lattice-gauge representation of an all-to-all connected Ising spin glass. The ground state manifold is invariant under variations of the gauge degrees of freedom, which take the form of four-body parity constraints. Our framework makes use of these degrees of freedom by individually tuning them to dynamically prepare programmable superpositions. The dynamics combines an adiabatic protocol with controlled diabatic transitions. We derive an effective model that allows one to determine the control parameters efficiently even for large system sizes.