Conditioned penalty in BQM


I'm trying to implement a quantum shortest path algorithm, more especially, the undirected edge-based approach of section VI of the paper:

The formulation has 2 kind of variables, xi variables which represent vertices, and x(i,j) represent edges. The idea is, if a node is selected, the xi=1 and we want to ensure that sum(s(i,j))=1 if it is start or terminal node, 2 if it is in path or 2 if not in path. But I'm not able to figure out how can I include the condition if xi=1 then the sum is 1 or 2, else 0 if not in path.

For exemple, using combinations I can force that the sum is k. But I'm not able to construct the QUBO so that the combination is either k, m or n depending on the variable xi.

I hope my exmplanation is clear.

Thank you for reading me.




Please sign in to leave a comment.

Didn't find what you were looking for?

New post