I have the following semidefinite program
$$\begin{array}{ll} \arg \min_{X} & \mbox{trace} (CX)\\ \text{subject to} & \mbox{diag} (X) = \mathbf{1}\\ & X \succeq 0\end{array}$$
which is a semidefinite relaxation of a MIMO communication detection problem with binary phased shift keying (PSK). My objective is to implement a first order algorithm and compare the results to an off-the-shelf solver such as CVX.
I have tried to implement a crude projected gradient descent algorithm where I first take a step in the direction of the negative gradient of the objective. namely $C^T$. After the step, I project the $X$ onto the feasible set by performing an eigenvalue decomposition and setting the negative eigenvalues equal to $0$. I handle the second constraint by just setting the diagonal values to $1$ for each step.
Even though the objective value converges to some minimum, I believe my approach is not correct as the optimal value is nowhere near the correct solution.
Some insight into my errors and a search direction for possible solutions would be greatly appreciated.