QUBO solver for combinatorial optimization problems with constraints