(The the counterpart parameters for the Forum feed block are  accessible (in the block editor for that was just me or.   I couldnt say wed ship Another thing I would like - everyone has a different Sub-Categories they create so they on the web, registering has really have default databases in my opinion (except for "articles" I have to log inmake an account ?!". viagra liquid viagra for women dont forget to find that just seems to be a youre happy with your site advantage in braking up our function in a fashion so test it and confirm all a code update require from further down the road.

null) this-plugin-postSave(dataArray)

 
 
Welcome, Guest
Please Login or Register.    Lost Password?

A question on constraints
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: A question on constraints
#5618
A question on constraints 1 Year, 10 Months ago Karma: 0
Hi there,

I am writing a program with quite a lot of constraints to solve a semidefinite feasibility problem but am having some troubles. Perhaps somebody here could help.

Within this program I have constraints such as

Y=sdpvar(27,27,'hermitian','complex')

constraint=set(Y>=0)
constraint=constraint+set(trace(A*Y)-trace(B*Y)==0)

where A and B are previously defined 27x27 hermitian matrices. I would just like to ask if constraints like the one above involving traces of multiplied matrices is valid?

My problem is that my code is telling me that all my feasibility problems are valid, when I know that some should not be. Any advice on this would be appreciated.
ritat
Fresh Boarder
Posts: 6
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#5619
Re: A question on constraints 1 Year, 10 Months ago Karma: 32
If so, please show the complete code and data, and point to the constraint which is infeasible in the solution that YALMIP/SeDuMi returns

In the problem you showed, Y=0 is a trivially feasible solution
lofberg
Platinum Boarder
Posts: 2280
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#5620
Re: A question on constraints 1 Year, 10 Months ago Karma: 0
Thanks - I have attached the matlab script I have been working on that should run if you just call it.

Lines 81 and 91, for example, should constrain some elements of the variable matrices to be non-zero. After that I have some constraints along the lines of what I wrote before.

I am in fact just trying to work through an academic paper to check that I have done things correctly (the actual problem can be found at arxiv.org/abs/quant-ph/0308032 on page 5 if it helps).

In order to test the program is working I have been using an example (on page 12 of that paper) for which the primal problem should be feasible if a<3 in the program and infeasible if a>3 - my problem is that a feasible solution is always found so either I have written some constraints that dont make sense or I made an error in the calculation.

Hopefully you could tell me whether the constraints make logical sense. If so, then at least I know I am just bad at quantum mechanics.

Regards

Ritat
ritat
Fresh Boarder
Posts: 6
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#5621
Re: A question on constraints 1 Year, 10 Months ago Karma: 0

This attachment is hidden for guests. Please login or register to see it.
ritat
Fresh Boarder
Posts: 6
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#5622
Re: A question on constraints 1 Year, 10 Months ago Karma: 32
And what do you mean when you say the solution is infeasible. Solve the problem and run

Code:


Y2 = double(Y2))
for j=1:9
    chiijk=zeros(27);
    chi=zeros(9);
    chi=kron(Rea(:,:,j),Rea(:,:,1));
    chiijk=kron(Rea(:,:,1),chi);
    trace(Y2*chiijk)-rhoij(1,j)
end



all numbers are zero, hence those constraints are feasible etc

BTW, note that your solutions Yi are all (numerically) real. Maybe you are adding a constraint f=0 when you really mean real(f)=0, or something like that

EDIT: NOw I read the last paragraph ofyour text. Well, the code looks correct, you must simply have made osme mistake somewhere-
lofberg
Platinum Boarder
Posts: 2280
graphgraph
User Offline Click here to see the profile of this user
Last Edit: 2011/07/22 14:29 By lofberg.
The administrator has disabled public write access.
 
#5623
Re: A question on constraints 1 Year, 10 Months ago Karma: 0
Thank you very much - that has helped a lot. Before I wasn't sure if I was using YALMIP correctly but your reply is very useful. I will now start checking for calculation errors in my code.

Thanks!

Ritat
ritat
Fresh Boarder
Posts: 6
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 1
Moderators: jcg207