You can’t That is non-convex.
variable x(N) x*x' % rank one. This violates CVX rules and is a non-convex thing