Solution (source code)

= Solution

The inverse transformation is $t=(p+q)/2$, $x=(q-p)/2$. Thus
$$
ds^2=\frac14\big[(dp+dq)^2-(dq-dp)^2\big]=dp\,dq.
$$
The <metric tensor> in these <light-cone coordinates> is therefore
$$
\boxed{(g_{ab})_{(p,q)}=\begin{pmatrix}0&1/2\\1/2&0\end{pmatrix},\qquad
(g^{ab})=\begin{pmatrix}0&2\\2&0\end{pmatrix}.}
$$
Both off-diagonal entries are needed, since the quadratic line element sums over both index orders.