1. A non-transitory computer-readable storage medium containing processor-executable instructions, which when executed cause at least one digital processor to: receive a first objective function comprising a plurality of non-binary variables; receive a plurality of integers which represent the plurality of non-binary variables; define or receive a number of bits used per integer in the plurality of integers proportional to a quotient from division of a number of qubits in a quantum computer by the number of integers in the plurality of integers, wherein the quantum computer is communicatively coupled to the at least one digital processor; receive a cost matrix comprising a number of values for a number of neighboring integers in the plurality of integers; generate a mapping function, wherein the mapping function maps the plurality of integers to a plurality of bit strings and each bit string comprises the number of bits used per integer; generate a second objective function comprising a sum over the values for the neighboring integers in the cost matrix wherein the neighboring integers correspond to bit strings that are separated by a Hamming distance of one; minimize the second objective function; generate a third objective function comprising a subset of the plurality of bit strings; send the third objective function to the quantum computer; solve the third objective function via the quantum computer; and receive a solution to the third objective function from the quantum computer.