Summary
In this chapter, we solved the knapsack problem, which represents a very simple real-world problem, on various Amazon Braket devices and suggested a process for developing and solving similar problems. Many real-world problems can be mapped to one of many types of knapsack problem formulations and the more elaborate bin packing problems formulations. The 0/1 knapsack formulation, with its binary item variable, single objective, and single integer weight constraint, is a good foundational problem to evaluate how to build a QUBO formulation. This in itself is a mathematically intensive process and requires various device and hardware-specific parameter fine-tuning to ensure the formulation will give the desired results. We tested our formulation classically and then ensured our QUBO formulation gave the best result. Next, we evaluated the QUBO formulation development on various Amazon Braket devices. We also reviewed a suggested step-by-step framework for solving such problems...