This was the my codes G is also 0 it is not true I should have a value for G. Yeah you are right status is infeasible but how can I solve that? Yesterday I asked the problem to forum with the eq. but no answer…
This is the result:
> Calling SDPT3 4.0: 32 variables, 1 equality constraints
> For improved efficiency, SDPT3 is solving the dual problem.
> ------------------------------------------------------------
>
> num. of constraints = 1
> dim. of sdp var = 16, num. of sdp blk = 2
>
> *******************************************************************
> SDPT3: Infeasible path-following algorithms
> *******************************************************************
> version predcorr gam expon scale_data
> HKM 1 0.000 1 0
> it pstep dstep pinfeas dinfeas gap prim-obj dual-obj cputime
> -------------------------------------------------------------------
> 0|0.000|0.000|4.0e+01|1.7e+01|1.6e+03|-4.000000e+01 0.000000e+00| 0:0:01|
>
> chol 1
>
> 1
> 1|0.997|0.944|1.1e-01|1.0e+00|5.2e+01|-3.284941e+01 -4.694775e+00| 0:0:02| chol 1 1
> 2|1.000|0.211|3.6e-15|8.3e-01|7.7e+01|-4.872019e+02 -5.629049e+00| 0:0:02| chol 1 1
> 3|1.000|0.021|1.5e-11|8.1e-01|2.2e+03|-8.619111e+05 -5.997421e+00| 0:0:02| chol 1 1
> 4|0.065|0.002|1.2e-07|8.1e-01|2.4e+06|-1.067261e+10 -7.134851e+00| 0:0:02| chol 1 1
> stop: primal infeas has deteriorated too much, 1.9e-04
> 5|0.000|0.000|1.2e-07|8.1e-01|2.4e+06|-1.067261e+10 -7.134851e+00| 0:0:02|
>
> prim_inf,dual_inf,relgap = 1.19e-07, 8.11e-01, 2.29e-04
> sqlp stop: dual problem is suspected of being infeasible
> -------------------------------------------------------------------
> number of iterations = 5
> residual of dual infeasibility
> certificate X = 9.37e-11
> reldist to infeas. <= 2.34e-11
> Total CPU time (secs) = 2.11
> CPU time per iteration = 0.42
> termination code = 2
> DIMACS: 1.2e-07 0.0e+00 1.3e+00 0.0e+00 -1.0e+00 2.3e-04
> -------------------------------------------------------------------
>
> ------------------------------------------------------------
> Status: Infeasible
> Optimal value (cvx_optval): +Inf
function [G,W,S] = TD_P_inv_Dual(P_exp,B,A_ax,B_by)
d = size(P_exp,1);
m = size(P_exp,3);
cvx_begin
variable S(d,d,m,m)
W_hat=zeros(d^2,d^2);
for a=1:d
for b=1:d
for x=1:m
for y=1:m
W_hat=W_hat+B(a,b,x,y).*(kron(A_ax(:,:,x,a),B_by(:,:,y,b))); %this is the Bell operator
end
end
end
end
W=sum(sum(sum(sum(B.*P_exp))));
J=cvx(0);
for a=1:d
for b =1:d
for x=1:m
for y =1:m
if a ~= b
S(a,b,x,y) == sum(B(a,b,x,y));
J=S(a,b,x,y).*W;
end
end
end
end
end
J=real(J)
minimize(J)
subject to
for e=1:d
(J-kron(squeeze(A_ax(:,:,1,e)),eye(d)))==semidefinite(d^2,d^2);
end
cvx_end
G=double(S(a,b,x,y).*W);