qiskit-optimization
qiskit-optimization copied to clipboard
Auto adjustment of `GroverOptimizer.num_value_qubits`
What is the expected enhancement?
If GroverOptimizer.num_value_qubits is too small, it may result in an infinite loop due to overflow.
It would be great if
GroverOptimizeradjusts a sufficient value ofnum_value_qubitsautomatically, and/orGroverOptimizerraise a warning message ifnum_value_qubitsis too small.
@t-imamichi I went into this issue and I'm interested in fixing this. Could you tell me what too small means? Is there a paper or we should experiment with choosing this value?
Thank you for having an interest in this issue. Here is the tutorial of GroverOptimizer.
https://qiskit.org/documentation/optimization/tutorials/04_grover_optimizer.html
I have no idea how to fix this issue currently. It might be difficult.
Thank you for your answer. I'm creating some experiments and let you know about the results.
It looks like num_value_qubits can be set starting with 1 and the algorithm works. The right solution is not always found. When increasing it the execution time starts to increase. It may get to a point when it get's disconnected in Jupyter output ( It happens that the result is there but the cell is still in running mode. I stopped the cell and the result appeared). I attach some tests.
@t-imamichi Do you have a specific example for num_value_qubits too small?
For example, if you set num_values_qubits smaller in the unit test, it does not pass.
https://github.com/Qiskit/qiskit-optimization/blob/6a7642d84e43c5a33c60630363633905992f8cc7/test/algorithms/test_grover_optimizer.py#L194