Further reading
To learn more about the topics that were covered in this chapter, take a look at the following resources:
- Various classical knapsack problem solvers: https://www.geeksforgeeks.org/0-1-knapsack-problem-dp-10/
- Ising formulations of many NP problems, by Andrew Lucas (check out section 5.2. Knapsack with Integer Weights): https://www.frontiersin.org/articles/10.3389/fphy.2014.00005/full
Code deep dive:
Please review the code in the following functions. These have been used previously in this book:
run_dwave()
ProbabilisticSampler()
Please review the code in the following new functions; these were introduced in this chapter and were provided as part of the discussion. They can be found in the GitHub repository for this chapter:
plot_knapsack()
param_optimizer_device()
quantum_device_sampler()