# Integer models

In addition to the Ising and QUBO representations of problems, some of our Dirac devices are also able to treat integer problems. The basic quadratic integer optimization model takes linear and quadratic terms of integer variables $X^{(m)}_i\in\{0,1,2,...m-1\}$, often abbreviated as $X_i$ the energy within an integer model is therefore defined as

$E=\sum_{ij}J_{ij}X_iX_j+\sum_ih_iX_i.$

Where optimal solutions are those which minimize energy. QUBOs are a special case of an integer model where $m=2$, although in this case the $h$ terms are redundant since $X^{(2)}_iX^{(2)}_i=X^{(2)}_i$. For $m>2$ however this is no longer true $X^{(m>2)}_iX^{(m>2)}_i\neq X^{(m>2)}_i$, so separate linear terms make the model more expressive.

While $m$ is fixed in our devices, it is possible to represent a variable of size $q<m$ by implementing the following quadratic constraint

$\lambda (X_i+X_{a,i}-q+1)^2,$

if the constraint term $\lambda$ is large (and positive) than this constraint will give a large positive contribution to the energy unless $X_i+X_{a,i}=q-1$, since the minimum value of $X_{a,i}$ is $0$, the maximum value of $X_i$ which can avoid incurring a penalty is $q-1$. Where $q=2$ we recover a QUBO variable from a higher integer model.

Quadratic integer models are natural for expressing integer linear programming problems. The $h_i$ terms naturally. If we consider such a problem in its standard form (written element wise with matrix and vector multiplication expanded out and considering $n$ variables):

maximise $\sum_i c_i^TX_i$subject to $\sum_i A_{ik}X_i+s_k=b_k \quad \forall k \in 1...n$

The first maximization can be converted to a minimization negating the elements of $c^T$, and as long as the elements of $A$ and $b$ are integers, constraints can be enforced by adding terms of the form

$\lambda (\sum_iA_{ik}X_i+\sum_jX_{s,j}-b_k)^2$

where we ensure that enough $X_{s,j}$ slack variables are added to accommodate all possible $X_i$ values.

As with Ising models, higher order terms are possible with integer models, for example objective functions of the form:

$E=\sum_ih_iX_i+\sum_{ij}J_{ij}X_iX_j+\sum_{ijk}K_{ijk}X_iX_jX_k...$

these capabilities are under development, and represent an exciting future direction for this technology.