14 auto f = x * y == 97 * 89;
16 std::cout <<
"quad_model has " << quad_model.var_count() <<
" variables, "
17 << quad_model.term_count(1) <<
" linear terms, and "
18 << quad_model.term_count(2) <<
" quadratic terms" << std::endl;
22 param.set_time_limit(10);
23 param.set_target_energy(0);
25 auto sol = solver(quad_model, param);
26 std::cout <<
"x = " << x <<
" = " << sol.get(x) << std::endl;
27 std::cout <<
"y = " << y <<
" = " << sol.get(y) << std::endl;
A class for defining the ABS2 callback function.
A class for setting parameters for the ABS2 QUBO solver.
A class for calling the ABS2 QUBO solver.
VarIntCore var_int(const std::string &var_str)
Expr simplify_as_binary(const Expr &expr)
Expr reduce(const Expr &expr)
QUBO++, a C++ library for generating expressions for binary and spin variables.
QUBO++ interface to call ABS2 GPU QUBO solver.