A Theoretical Framework for Discovering Groups and Unitary Representations via Tensor Factorization