Disciplined convex programming error: invalid quadratic form: must be a scalar

This is non-convex. But you haven;t shown us how this will be used/ So perhaps it can be reformulated? Do you perhaps want the semidefinite relaxation of this?