The Qiskit Knapsack Solver runs without any issues for the test case provided in the resources directory.
When testing the frontend, I noticed that it does not work when for other problems. (I typed in some newly random problems).
Example:
2
1 2 3
2 3 5
10
This example can be solved by the HS knapsack solver, but not by the qiskit knapsack solver.
Error Message:
knapsack problem couldn't be solved:
Traceback (most recent call last):
File "/Users/koalamitice/Desktop/toolbox-server/solvers/qiskit/knapsack/knapsack_qiskit.py", line 62, in <module>
achieved_sum += values[i]
IndexError: list index out of range
The Qiskit Knapsack Solver runs without any issues for the test case provided in the resources directory.
When testing the frontend, I noticed that it does not work when for other problems. (I typed in some newly random problems). Example: 2 1 2 3 2 3 5 10
This example can be solved by the HS knapsack solver, but not by the qiskit knapsack solver.
Error Message:
Screenshot of the Error: