%randn('state',1);
h1=(randn(6,1)+1i*randn(6,1))/sqrt(2);
h2=(randn(6,1)+1i*randn(6,1))/sqrt(2);
Q=angle(h1'*h2);
r1=3;
r2=3
sigmal1=10
sigmal2=1
h11=h1*exp(1i*Q)
cvx_begin sdp
variable W1(6,6) complex hermitian
variable W2(6,6) complex hermitian
minimize trace(W1+W2);
subject to
r1*(real(h1'*W2*h1)+sigmal1)-real(h1'*W1*h1)<=0
r1*(real(h2'*W2*h2)+sigmal2)-real(h2'*W1*h2)<=0
r2*sigmal2-real(h2'*W2*h2)<=0
W1>=0
W2>=0
cvx_end
b=cvx_optval
cvx_begin
variable w1(6) complex
variable w2(6) complex
minimize (w1'*w1+w2'*w2);
subject to
{[h1'*w2,sigmal1]',1/sqrt(r1)*real(h11'*w1)} <In> complex_lorentz(2)
{[h2'*w2,sigmal2]',1/sqrt(r1)*real(h2'*w1)} <In> complex_lorentz(2)
1/sqrt(r2)*real(h2'*w2)>=sigmal2
cvx_end
a=cvx_optval
[b,a]