I have found the solution to an SDP relaxation of the maxcut problem and I have the solution matrix $Y$. I have found that the SDP relaxation was exact because all the eigenvalues of the matrix Y are 1. I have outlined the steps below to recover the optimal solution of the maxcut problem from $Y$, i.e. the eigenvector corresponding to the single nonzero eigenvalue gives the discrete 0/1 solution encoded in the signs of its entries.
Compute eigendecomposition of Y:
$[V,D] = \text{eig}(Y);$
Identify the eigenvector $v$ corresponding to the eigenvalue 1. Since all eigenvalues are 1, we can just take the first column of $V$:
$v = V(:,1);$
The signs of the entries in $v$ give the binary solution:
$x = \text{sign}(v);$
$x(i) = 1$ indicates node $i$ is in one side of the cut, $x(i) = -1$ indicates it is on the other side.
But I am unsure if this is the correct way, can anyone please explain?