# Indicator function for integer variable with inequality constraint

I have $$n$$ integer variables $$\vec{x}$$ with the following integer programming problem.

$$COST = \sum^{n-1}_{i = 0} a_i x_i + \sum^{n-1}_{j=0} b_j I(x_j > 0)$$

Here, $$a_i, b_j \in \mathbb{R}_+$$ and $$I$$ is the indicator function. I would like to minimize COST. How can I implement $$\sum^{n-1}_{j=0} b_j I(x_j > 0)$$ so that it is a quadratic unconstrained binary/integer optimization problem?

• Are you hoping to solve this on a D-Wave Quantum Annealing computer? bernalde.github.io/QuIP/slides/… Oct 6 '20 at 16:36
• Is your $x_j$ non-negative? Further do you have an upper bound on $x_j$? Oct 6 '20 at 17:03
• I see you work for IonQ. D-Wave is a one-trick pony (and as of now, I don't think it's even a very good trick), heuristically solving QUBO 's. by Quantum Annealing. Does IonQ have other tricks? Shoehorning everything into QUBO 's doesn't seem to me to necessarily be the best way of solving MILPs. Constraints now, constrains Forever. Oct 6 '20 at 20:31
• Since the cost coefficients are nonnegative and you have no other constraints, no model is required. There are two possibilities. If the $x$ variables are nonnegative, set them all to zero and declare victory. Otherwise, set every variable that can be negative to its most negative possible value, set the remaining variables to zero, and declare victory. I sense that something is missing. Oct 6 '20 at 21:09