Hello, I am working on a semester project and need to reconstruct the data from a paper. Unfortunately, I am not so used to CVX and have a problem regarding my dual variables. So the SDP is the following:

.My code for the SDP is:

cvx_begin SDP quiet

cvx_solver SeDuMi %mosek

cvx_precision best

```
variables p % defines eta
variable sigmaL(dB*Ndet,dB) complex % vector containing the sigma_B(a|x)
dual variables F{Ndet,dB}
maximise( p )
% the following computes the sum of D_lambda(a,x)*sigma_lambda over all lambda,
% and asks it to be equal to the assemblage
% further we solve the dual problem where F is a 2x2 matrix
subject to
for i = 1:mA*nA
F{i} : Tensor(SingleParty(i,:),IddB)*sigmaL == p * assemblageS(1+(i-1)*dB:i*dB,:) + (1-p) * assemblageUS(1+(i-1)*dB:i*dB,:);
end
for i = 1:Ndet
sigmaL(1+(i-1)*dB:i*dB,:) == hermitian_semidefinite(dB);
end
sum = zeros(2,2);
for i = 1:Ndet
sum = (sum + sigmaL(1+(i-1)*dB:i*dB,:));
end
trace(sum) == 1;
cvx_end
eta = p;
% write cell into array where the different F's represent 2x2 matrices
Fout = cell2mat(full(F))
```

It might be important to mention that the first constraint is correct, just written in another way.

My main issue is the following: The paper states: “from the dual solution of the SDP program, it is possible to extract the POSITIVE matrices F(a|x)…”. However, I obtain the following F matrice for instance:

Fout(9:10,: ) = [ 0.0000 + 0.0000i -2.0562 - 0.0000i;

-2.0562 + 0.0000i 10.0829 + 0.0000i]

which is not positive. This then distorts all future calculations. Hence, I am not sure how to resolve this issue to obtain positve matrices.

Thank you very much in advance.