Quantum Hidden Subgroup Algorithms: a Mathematical Perspective