recruit-communications / pyqubo

Python DSL for constructing QUBOs from mathematical expressions.
https://pyqubo.readthedocs.io/
Apache License 2.0
177 stars 46 forks source link

Issue when dealing with expressions that contain a cubic term in an intermediate step #210

Open Eric-Luu opened 1 year ago

Eric-Luu commented 1 year ago

If I have 3 binary bits a, b, and c, then the equation:

h = abc + (1-a) (1-b) (1-c)

should evaluate to:

h = ab + ac + bc - a - b - c + 1

However, the resulting compiled structure of h = abc + (1-a) (1-b) (1-c) still keeps an a*b term.