Clarifying a dual problem solution

I’m referring to this https://math.stackexchange.com/questions/1044092/sum-of-k-largest-eigenvalues-of-a-symmetric-matrix-as-an-sdp

I want to solve the maximization problem. As the dual problem is always convex, I understand CVX can solve it. However, I’m faced with a dilemma. When I set up my primal problem for this, wherein I declare Z, X to be both variables, a feasible solution emerges.

It also seems from the derivation that I have strong duality here. How do I set up the ‘maximization’ problem in CVX so that it matches the outcome of my primal problem?