Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto adjustment of GroverOptimizer.num_value_qubits #109

Open
t-imamichi opened this issue Apr 28, 2021 · 5 comments
Open

Auto adjustment of GroverOptimizer.num_value_qubits #109

t-imamichi opened this issue Apr 28, 2021 · 5 comments

Comments

@t-imamichi
Copy link
Collaborator

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

  1. GroverOptimizer adjusts a sufficient value of num_value_qubits automatically, and/or
  2. GroverOptimizer raise a warning message if num_value_qubits is too small.
@iuliazidaru
Copy link

@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?

@t-imamichi
Copy link
Collaborator Author

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.

@iuliazidaru
Copy link

Thank you for your answer. I'm creating some experiments and let you know about the results.

@iuliazidaru
Copy link

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.

grover_research.ipynb.txt

@t-imamichi Do you have a specific example for num_value_qubits too small?

@t-imamichi
Copy link
Collaborator Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants