Solution (source code)

= Solution

In coordinates the <Real Heisenberg group> law is
$$
(q,r,s)(q',r',s')=(q+q',r+r',s+s'+qr').
$$
Commuting this with every $(q',r',s')$ requires $qr'-q'r=0$ for all $q',r'$, hence $q=r=0$. Therefore
$$
Z(G)=\{(0,0,s):s\in\mathbb R\}.
$$