Invalid quadratic forms: not a square

This looks non-convex to me. You will need to use a non-convex optimizer.