Hello, I am trying to perform a biconvex optimization with the following code

cvx_begin

% This is the biconvex optimization

variable sig(4,4) semidefinite

variable x(2,1)

minimize ( quad_form(x,diag([zero_bra * partial_trace_env(kron(eye(2), rho.’) * sig) * > zero_ket;one_bra * partial_trace_env(kron(eye(2), rho.’) * sig) * one_ket])) )

subject to

partial_trace_sys(sig) == eye(2);

trace((kron(diag(x),rho.’))*sig) == 0;

trace((kron(diag(x),d_rho.’))*sig) == 1;

cvx_end

However, I am getting this error:

Error using cvx/quad_form

Either x or (Q,v) must be constant.Error in TEST (line 65)

minimize ( quad_form(x,diag([zero_bra * partial_trace_env(kron(eye(2), rho.’) * sig) * >zero_ket;one_bra * partial_trace_env(kron(eye(2), rho.’) * sig) * one_ket])) )

What can I do here?

**P.S. zero_bra, zero_ket, one_bra, one_ket, rho, d_rho are variables that I’ve defined before and I’m certain that the D in quad_form(x, D) is a square, symmetric matrix. Also, “TEST” is just the name of my file. Thanks!**