TITLE: Explicit 2-cocycle from a 2nd cohomology group $H^2[Q_8 \times \mathbb{Z}/2\mathbb{Z}, U(1)]$
QUESTION [7 upvotes]: I would like to know the explicit expression of 2-cocycle from a 2nd cohomology group $H^2[Q_8 \times \mathbb{Z}/2\mathbb{Z}, U(1)]$ with $U(1)\equiv \mathbb{R}/\mathbb{Z}$ coefficient, or namely $H^2[Q_8 \times \mathbb{Z}_2, U(1)]$, here we denote the cyclice group $\mathbb{Z}/2\mathbb{Z}=\mathbb{Z}_2$, and the $Q_8$ is the order 8 quaternion group.
What I had computed (from Kunneth formula, Universal Coefficient Theorem) and what I had known is that:
$$H^2[Q_8 \times \mathbb{Z}_2, U(1)]=\mathbb{Z}_2 \times \mathbb{Z}_2.$$
Now I would like to know the two generators of $H^2[Q_8 \times \mathbb{Z}_2, U(1)]=\mathbb{Z}_2 \times \mathbb{Z}_2$ in terms of explicit 2-cocycles. 
Any Reference and any partial answer are welcome.

Additional remarks and guides:

What I also computed and knew are:$H^1[Q_8,U(1)]=\mathbb{Z}_2 \times \mathbb{Z}_2$, $H^2[Q_8,U(1)]=0$, $H^3[Q_8,U(1)]=\mathbb{Z}_8$. I also know that the explicit 3-cocycle $\omega_3((A,a),(B,b),(C,c)) \in H^3[Q_8,U(1)]=\mathbb{Z}_8$ as:
$$\omega_3((A,a),(B,b),(C,c))$$
$$= \exp\left( \frac{2\pi i p}{8}
             \{ (-)^{B+C}a \left( (-)^C b + c- [(-)^C b + c +2BC] \right) 
             - 2 ABC \} \right)$$ 
where $p \in \mathbb{Z}_8$. The rectangular brackets means the modulo $4$ in the range $-1,0,1,2$. 
Here we denote the elements of $Q_8$ by the 2-tuples
$$
(A,a)  :=  X^A R^a  \qquad \qquad \mbox{with $A \in 0,1$ and               
$a \in -1, 0, 1, 2$.   } \qquad
$$
with $R^{4}  =  e, \qquad X^2 \; = \; R^2, \qquad  XR \; = \; R^{-1} X.$
So for instance the identity is $e=(0,0)$. 
The multiplication law of $Q_8$ then reads
$$
(A,a) \cdot (B,b) = ([A+B], [(-)^B a+b+2AB]),
$$

REPLY [2 votes]: For any two finite groups $G$ and $H$ the Kuenneth formula will give you a homomorphism $$H^1(G,U(1))\otimes_{\mathbb{Z}} H^1(H,U(1))\to H^2(G\times H,U(1)).$$
We can describe this map explicitly. Let $\phi:G\to U(1)$ and $\psi:H\to U(1)$ be group homomorphisms. For some $n$ and some $n$-th root of unity $\zeta$ we can write $\phi(g) = \zeta^{f(g)}$ and $\psi(h) = \zeta^{r(h)}$ where $f:G\to \mathbb{Z}/n$ and $r:H\to\mathbb{Z}/n$ are group homomorphisms (in the case of $Q_8\times \mathbb{Z}/2$ $\zeta$ will just be $-1$).
The cocycle which corresponds to $(\phi,\psi)$ will then be given by 
$$\alpha((g_1,h_1),(g_2,h_2)) = \zeta^{f(g_2)r(h_1)}.$$
For the example that interests you, you can write explicitly all group homomorphisms from $Q_8$ and from $\mathbb{Z}/2$ to $U(1)$ and get the isomorphism you are interested in.
We have the following ring theoretic interpretation of this:
the data of a two cocycle on a group is the same as describing the twisted group algebra $\mathbb{C}^{\alpha} G\times H$. 
In this group algebra we will have the rules $U_{g_1}U_{g_2} = U_{g_1g_2}$, $U_{h_1}U_{h_2} = U_{h_1h_2}$ and $U_hU_g = \zeta^{f(g)r(h)}U_gU_h$.
In principal, what Kuenneth Formula tells us for the two dimensional case is the following thing: in order to describe a two cocycle on $G\times H$ we need to describe three things: 

Its restriction to $G$.
Its restriction to $H$.
The way that ot alters the commutativity between $G$ and $H$.

In this case we know that the second cohomology groups of $G$ and of $H$ are trivial, so we are left only with the third option.