I have two symmetric, integer matrices, $K$ and $K_2$ which have the same determinant and the same signature (number of positive - number of negative eigenvalues). I want to find an integer valued matrix, $X$, such that $$X^T K X= K_2$$ and determinant of $X = \pm 1$.
For example,
K = {{0, 2, 1, 1}, {2, 0, 0, 0}, {1, 0, 1, 0}, {1, 0, 0, -1}};
K2 = {{0, 2, 0, 0}, {2, 0, 0, 0}, {0, 0, 1, 0}, {0, 0, 0, -1}};
Is there a way to approach this besides using FindInstance (which doesn't seem to work in finite time for even a $4\times4$ matrix)? The system is under constrained since the matrices are symmetric, but I'm just looking for a way to find even one such $X$ for a given pair, $K$ and $K_2$, which could be as large as $8\times8$.