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

[DNM] Add ScipyMilpOptimizer #447

Closed
wants to merge 9 commits into from
Closed

Conversation

Dran-Z
Copy link
Contributor

@Dran-Z Dran-Z commented Nov 30, 2022

Summary

Add optimizer method for linear problem based on scipy.optimize.milp solver. This is a QAMP-fall-2022 project.

@CLAassistant
Copy link

CLAassistant commented Nov 30, 2022

CLA assistant check
All committers have signed the CLA.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@t-imamichi t-imamichi added QAMP Qiskit Advocate Mentorship Program Commmunity PR PRs from contributors that are not 'members' of the Qiskit organization labels Nov 30, 2022
@Dran-Z Dran-Z marked this pull request as ready for review November 30, 2022 08:49
@t-imamichi t-imamichi added the Changelog: New feature Include in the Added section of the changelog label Nov 30, 2022
@t-imamichi
Copy link
Collaborator

t-imamichi commented Nov 30, 2022

Thank you for your contribution.

I notice that scipy 1.8.0 dropped Python 3.7 support https://pypi.org/project/scipy/1.8.0/#files.
The latest scipy 1.9.3 available for Python 3.8-3.11 https://pypi.org/project/scipy/1.9.3/#files.
So, you need to extend _optional to have _optional.HAS_SCIPY_MILP and move from scipy.optimize... to the internal of methods _generate_problem and solve in a similar way to gurobi_optimizer.py

@Dran-Z
Copy link
Contributor Author

Dran-Z commented Nov 30, 2022

Thanks for your comment. I will try to resolve the problem then.

@t-imamichi
Copy link
Collaborator

Could you push the latest version?

@Dran-Z
Copy link
Contributor Author

Dran-Z commented Dec 9, 2022

Could you push the latest version?

Sure! Done now

@t-imamichi t-imamichi added this to the 0.6.0 milestone Jan 26, 2023
@woodsp-ibm
Copy link
Member

@Dran-Z The next version of Qiskit Optimization should release in a few weeks. Would you like to fix this up so its ready to be included in this release?

Since we have scipy in the requirement.txt scipy>=1.4 having it as an optional install as well in setup.py seems weird. Python 3.7 support will end in a couple of months and then we can choose to list scipy>=1.9 as a requirement. Since the milp support is not going to work for Python 3.7 (no scipy version compatible) we should probably note this, and the min version needed for other Python versions i.e. 1.9. For the optional text we could just have the install as pip install -U scipy and drop the optional aspect from the setup.py.

@t-imamichi
Copy link
Collaborator

If he cannot handle it, I will take over this work.

@Dran-Z
Copy link
Contributor Author

Dran-Z commented Apr 17, 2023

@t-imamichi Sorry I am recently quite occupied to prepare a manuscript. It should help a lot if you could take a look at it. Many thanks!

@t-imamichi
Copy link
Collaborator

OK. I take over this PR.

@t-imamichi
Copy link
Collaborator

I will make another PR because @Dran-Z uses main branch of his repo for this PR.
If I update this main branch, it may cause some troubles.

@t-imamichi t-imamichi added the on hold Can not fix yet label Apr 20, 2023
@t-imamichi t-imamichi changed the title Add ScipyMilpOptimizer [DNM] Add ScipyMilpOptimizer Apr 20, 2023
@t-imamichi t-imamichi mentioned this pull request Apr 20, 2023
3 tasks
@t-imamichi t-imamichi removed this from the 0.6.0 milestone Apr 26, 2023
@t-imamichi
Copy link
Collaborator

I close this PR because #496 has been merged.

@t-imamichi t-imamichi closed this May 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: New feature Include in the Added section of the changelog Commmunity PR PRs from contributors that are not 'members' of the Qiskit organization on hold Can not fix yet QAMP Qiskit Advocate Mentorship Program
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants