How do I solve this convex problem

Fz is not going to be real unless you make it so. I don’t know what your objective function is supposed to be, so you need to figure that out, and it needs to evaluate to a real (scalar). With your current value of G_k, it is not. So that’s step one, regardless of what optimization software or modeling environment you’re using.

As currently defined, you are essentially solving N independent (i.e., non-coupled) optimization problems So these could as well be solved separately. I’ll leave it to you to determine whether you actually intend there to be no coupling across the N summand terms of the objective function. Nevertheless, by adding an extra dimension to the declaration of Qk, you can solve all of them at once by essentially stacking them together as you are doing by summing the objective over k from 1 to N. See Creating Dynamic Variables with Constraints (avoid for loop) for how to declare Qk and making all N of its constituent Nk by Nk matrices semidefinite. If you take this approach, you need to declare Qk before the for loop. You also need to specify the trace constraint for each of the N 2 by 2 constituent matrices, and you may be done.