I have a square matrix $G = \begin{bmatrix} 0.7500&-0.2500 &-0.2500 &-0.2500 \\ -0.2500& 0.7500&-0.2500 &-0.2500 \\ -0.2500&-0.2500 &0.7500 &-0.2500 \\ -0.2500&-0.2500 &-0.2500 &0.7500 \end{bmatrix}$, Is possible to get a real matrix $Y$ such that $G \times Y = K$ where $K$ is a $4 \times 4$ unitary matrix.
By using the easy way, which is forcing $Y = G^{-1} \times K$, it doesn't result of a unitary matrix $K$ ! So is there another way like using optimization or any other way to solve that problem?
I have interpreted your problem as finding a a $Y$, such that $G*Y$ is a unitary matrix (call it $K$), not that a particular unitary matrix $K$ is pre-specified.
This is not possible for all $G$. In particular, your $G$ is singular, i.e., not invertible, which makes it impossible.
However, if such a $K$ exists, it can be found by solving a system of quadratic equations, which among other ways, can be accomplished using a nonlinear optimization solver (capable of handling quadratic equality constrains), and providing it a problem having no (or zero) objective function.
That can be accomplished by creating optimization matrix variables
YandinvY, and specifying the constraintsY*invY = Identity_matrix, and(G*Y)'==invY*inv(G), where'specifies transpose andinvmeans matrix inverse.Here is the YALMIP (under MATLAB) code:
As an example, if your $G$ is modified by setting its (1,1) element to 0.7, it is no longer singular. Applying the method outlined above, we arrive at
Y(G*Y)'inv(G*Y)where
(G*Y)'andinv(G*Y)agree to within the solver precision of 1e-8.