Any characterization of $H^2(\mathbb{Z}_n,\mathbb{Z}_m,\theta)$? I've been reading chapter 7 of An Introduction to the theory of groups by Rotman related to Extensions and Cohomology, and there is something that is not completely clear to me. Given the exact sequence $$1\to K\to G\to_\pi Q\to1$$
Theorem 7.34 (Scheirer) says that there is a bijection from $H^2(Q,K,\theta)$ (the second cohomology group) to the set $E$ of all equivalence classes of extensions of K  by Q realizing data $(Q,K,\theta)$ and that this bijection takes the identity $0$ into the class of the semidirect product. Where an additive group (not necessarly abelian) $G$ is said to realize data $(Q,K,\theta)$ if and only if $G$ is an extension of $K$ by $Q$, and for every transversal $l$ (a transversal is a function $l:Q\to G$ such that $\pi(l(x))=1$)$$\theta_x(a)=l(x)+a-l(x)$$ for all $x\in Q$
 and $a\in K$. 
The point is: there exist any characterization of the group $H^2(\mathbb{Z}_n,\mathbb{Z}_m,\theta)$ for any given $\theta$? Is there a way to generalize the Scheirer's theorem in order to avoid the election of such a $\theta$?
 A: First, I think it should be stated somewhere that $K$ needs to be abelian. Otherwise $H^2(Q,K,\theta)$ doesn't make much sens. In this case $\theta$ is a group morphism from $Q$ to $Aut(K)$. 
Secondly a generalisation is known and when $K$ needs not to be abelian. In that case $\theta$ is a group morphism from $Q$ to $Out(K)$, and the group cohomology becomes $H^2(Q,Z(K),\theta)$. The generalized theorem would be stated as follow : Given $Q$, $K$ and $\theta$, if some obstruction $c_{\theta}$ happens to be null in $H^3(Q,Z(K),\theta))$ then the set of extension from $Q$ by $K$ inducing $\theta$ is in bijection with $H^2(Q,Z(K),\theta)$ otherwise (if $c_{\theta}\neq 0$) then there are no such extensions. 
It should be remarked that this bijection is no more canonical, concretely the element $0\in H^2(Q,Z(K),\theta)$ has no particular role under this bijection (unless $\theta$ factorizes through $Aut(K)$ in which case this is again the semi-direct product). 
Finally about the group $H^2(\mathbb{Z}_n,\mathbb{Z}_m,\theta)$, there is a way to calculate efficiently. Actually it works for any $\mathbb{Z}_n$-module $A$. Let us define :
$$Tr : A\rightarrow A $$
$$a\mapsto \theta(1).a-a $$
$$N: A\rightarrow A^{\mathbb{Z}_n}$$
$$a\mapsto \sum_{i=0}^{n-1}\theta(i).a $$
Now I claim that :
$$H^2(\mathbb{Z}_n,A,\theta)=\frac{Ker(Tr)}{Im(N)} $$
But $Ker(Tr)$ is easily seen to be $A^{\mathbb{Z}_n}$ that is :
$$H^2(\mathbb{Z}_n,A,\theta)=\frac{A^{\mathbb{Z}_n}}{Im(N)} $$
This is true because the modified cohomology of $\mathbb{Z}_n$ is cyclic. The above statement can be proven by hand by taking the non-homogenous 2-cochains and work it out a little...
In particular, I claim that if you give me  explicit $m$ $n$ and $\theta$ I can calculate easily $H^2(\mathbb{Z}_n,\mathbb{Z}_m,\theta)$ using this formula. Two references :
for the generalization to $K$ non commutative :
http://sierra.nmsu.edu/morandi/notes/GroupExtensions.pdf
for the cohomology of cyclic groups (p.35) :
http://math.arizona.edu/~sharifi/groupcoh.pdf
