dimod icon indicating copy to clipboard operation
dimod copied to clipboard

Print more information when user define `BinaryQuadraticModel` on the RHS of an equation

Open mhramani opened this issue 4 years ago • 0 comments

More information is needed when user define constraints that has BinaryQuadraticModel as RHS

x = dimod.Binary('x')
y = dimod.Binary('y')
cqm = dimod.CQM()
cqm.add_constraint(x <= y)


TypeError: '<=' not supported between instances of 'BinaryQuadraticModel' and 'BinaryQuadraticModel'

From this error it is not clear that RHS should only be constant.

mhramani avatar Sep 03 '21 17:09 mhramani