Let $(G,+)$ be an abelian group, $X$ a finite set (of "colors"), and $f:G \to X$ a function such that there exists a subgroup $H<G$ for which $f$ separates cosets of $H$, i.e. $\forall a,b\in G:f(a)=f(b)\iff a+H=b+H$.
Using information gained from evaluations of $f$, determine a generating set for $H$.
This is the hidden subgroup problem, that is solved in abelian groups using a quantum polynomial time algorithm.
In many cases $f$ is actually an homomorphism. So, in fact, the subgroup $H$ corresponds to $\text{Ker}(f)$.
For example, this is true in the cases of factoring, i.e. Shor's algorithm and also in the discrete log problem.
More generally, I am interested in the cases where we can construct a mapping $M:X\times X\to X$ such that $\forall a,b\in G:M(f(a),f(b))=f(a+b)$ (e.g. when $f$ is an homomorphism $(x,y)\overset{M}{\mapsto} x\cdot_Xy$ is the mapping). However, $f$ is not necessarily an homomorphism and $X$ is not necessarily associated with a know group operation either.
Clearly such $M$ always exists, by going through group $G$ using representatives from coset in $f^{-1}$. So, what is really interesting, even when restricting to the abelian case, is whether we can always find such $M$ classically and efficiently. Also, is there a known thing that is described somewhere in this direction?