Multiplying two real variables in Dimod and D Wave

https://docs.ocean.dwavesys.com/en/stable/examples/hybrid_cqm_diet.html#example-cqm-diet-reals

 

Given above is a link to solving a mixed integer problem using dimod and d wave. According to this link, it is possible to multiply two real variables :

quantities[0] * quantities[1]          
QuadraticModel({'rice': 0.0, 'tofu': 0.0}, {('tofu', 'rice'): 1.0}, 0.0,
...            {'rice': 'REAL', 'tofu': 'REAL'}, dtype='float64')

 

However, when I run the exact same code in my laptop i get the following error:

 

ValueError: REAL variables (e.g. 'rice') cannot have interactions

 

Anyway to resolve this? I also tried installing all the different versions of the dwave ocean sdk but none of them worked. Thankyou

0

Comments

1 comment

Please sign in to leave a comment.

Didn't find what you were looking for?

New post