It was a rainy night, bro was learning QAOA and stuck on such a problem. For example, 100 CAD is exchanged for USD, USD is exchanged for EUR, and EUR is then exchanged back to CAD. The final value in CAD is calculated as 100 × (1/1.05) × (1/1.094) × 1.18 ≈ 102.72, so you get 2 CAD more after this circle.
My thought is seting the rate R[i][j] between currency i and j,we can use bitstring as the solution of the path(like '0110' means R[0][1]R[1][0]), so we can build the objective function and calculate the expectation value now.
My question is, do we need to add constraints to the objective function to compute the expected value of only reasonable paths? Like some path, '1110', it doesn't make sense: you cannot sell your money twice, can we just remove such a path?
Furthur more, the path should be a closed circle(after all we want our money back), do we need to check all the paths and remove all the non-circle paths? That's kinda ridiculous, if we check all the paths why don't we calculate the expectation value together.
It's been a whole night it still confused me, thanks for any help.