Simple quadratic sequence makes Invalid quadratic form(s): not a square. error

You haven;t told us what W is. if W is all zeros, then the objective function is zero and hence, trivially concave, and the optimization problem is convex. Otherwise, this is not a convex optimization problem and you will need a tool which can handle non-convex Quadratic Programs.