I am not sure how to solve error Invalid constraint: {convex} >= {real affine}

Your constraint is going the wrong direction to be convex.

The quadratic forms are convex if the matrix is hermitian positive semidefinite.

{convex} <= affine is a convex constraint.
affine <= {convex} is not a convex constraint.

Maybe you should read the first several chapters of https://web.stanford.edu/~boyd/cvxbook/bv_cvxbook.pdf to learn the basics of convex optimization.