dimod
dimod copied to clipboard
Add experimental support for != constraints
See also https://github.com/dwavesystems/dimod/issues/1030
we need to add something like this:
elif sense is Sense.Ne:
# hard-coding violation of not equal constraints to 1
violation = 0 if activity != 0 else 1
In the function iter_constraint_data in constrained.py
I would also raise a ValueError when trying to add a constraint with real values, unless we think they make sense.