# How can I exactly solve a Quadratic Model with integer variables using DWave Ocean classical solvers?

As an example, let's consider the following simple QuadraticModel problem with just 3 INTEGER variables:

from dimod import QuadraticModel

for var in qm.variables:

print(qm.to_polystring())


This code will print out the (actually linear) polynomial "energy" function $$E(x,y,z) = x+y+z$$ and the solution of the minimization problem in this trivial case would be $$x=-2, y=1, z=-3$$ (taking into account the bounds of each variable), with a minimal "ground state" energy equal to $$-4$$.

So my question is the following: how can I get this exact solution using DWave Ocean classical solvers? I tried to use the ExactSolver class but it raises an error that I'm not sure to understand:

from dimod import ExactSolver

solver = ExactSolver()
sol = solver.sample(qm)

TypeError: expected input vartype to be one of: Vartype.SPIN, 'SPIN', {-1, 1}, Vartype.BINARY, 'BINARY', {0, 1}, Vartype.INTEGER, 'INTEGER', Vartype.REAL, or 'REAL'; received .


If this is not supported, can I formulate and construct the same problem so that I can find the exact solution in a classical way? I would like to possibly stick with DWave software, but I'm also open to other approaches based on different tools.