Computesg(X) = X @ X.T where X is lower-triangular, positive-diagonal matrix
g(X) = X @ X.T
X
Useful links