BQM is unconstrained by definition. I need to submit a knapsack problem with two constraints (equality constraints + inequality constraints) to a quantum annealer (DWaveSampler). How would you set the problem as a BQM to be sampled fully quantum (no hybrid solver)? My understanding is that Pyqubo can convert equality constraints to bqm, but it is not clear to me if it can handle inequality constraints too.

More in general, what would be the best strategy for solving a (large!) constrained optimization problem with quantum annealing?

  • $\begingroup$ Try to Google penalty function. $\endgroup$ Sep 19, 2022 at 15:35
  • $\begingroup$ The penalty term must be already expressed as a BQM to be added. In my case, my constraints are defined in a generic format, i.e. as an arithmetic expression (something that is accepted by CQM). So, my problem is to convert this expression to a BQM that can be added as a penalty term to the 'composite' BQM. $\endgroup$
    – Roland
    Sep 20, 2022 at 7:42
  • $\begingroup$ This can help arxiv.org/abs/2112.07491 $\endgroup$ Sep 20, 2022 at 9:13


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.