Disciplined convex programming error Invalid quadratic form(s): not a square

That usually means CVX scalar or matrix variables (expressions) are being multiplied. Is sigma a variable (it’s not clear from your not properly formatted out of order code extract… If so it is multiplying elements of W via trace. From this extract, it is not obvious there is any repair to the apparent non-convexity, other than requiring sigma to be input data rather than a CVX variable.