1. A non-transitory computer-readable storage medium containing processor-executable instructions, which when executed cause at least one processor to: receive a first objective function comprising a plurality of non-binary variables; receive a plurality of integers represent the plurality of non-binary variables; 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; 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; and minimize the second objective function.