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

Add mps/gz support #582

Open
dthuerck opened this issue Dec 11, 2023 · 5 comments
Open

Add mps/gz support #582

dthuerck opened this issue Dec 11, 2023 · 5 comments
Labels
type: feature request New feature or request

Comments

@dthuerck
Copy link
Collaborator

What should we add?

What should we add?

Most collections of optimization models use the old-fashioned MPS format for model storage, e.g., MIPLIB. Furthermore, due to their verbosity (compare, e.g., square47.mps.gz wit squaren47.mps from MIPLIB - 80 MB vs. 1.4GB) people tend to use the gzipped files directly.

If qiskit optimization serves as gateway to classical and quantum optimization, I think it makes perfect sense to include this widely-adopted file format. docplex supports mps natively.

@dthuerck dthuerck added the type: feature request New feature or request label Dec 11, 2023
@t-imamichi
Copy link
Collaborator

t-imamichi commented Dec 12, 2023

Users can import and export docplex models via from_docplex_mp and to_docplex_mp. So, I think they can handle MPS format through docplex model.
We carefully think of adding new public methods to QuadraticProgram because it increases the maintenance cost.

@t-imamichi
Copy link
Collaborator

As commented in #581 (comment), I personally suggest making functions in qiskit_optimizatiopn.translators.

@dthuerck
Copy link
Collaborator Author

Sure, we can move it there @t-imamichi . In this case, I'd vote that we also move all lp-related functions (as you suggested in the PR).

Since this breaks the QuadraticProgram, we could add a deprecation warning and in the meantime, forward to the functions in translator. What do you think?

@woodsp-ibm
Copy link
Member

woodsp-ibm commented Dec 12, 2023

we could add a deprecation warning and in the meantime, forward to the functions in translator. What do you think?

For breaking API changes maintaining compatibility via deprecation, which informs the replacement (or whatever) to maintain users code working and give them a chance to change, is definitely the way to go. Works for me.

The deprecation would also be noted in a release note deprecations section as part of the PR so it becomes part of the compete release notes in end-user docs. Since the PR is also adding new features these should be listed there in the features section of the same note (other unused sections would be simply deleted from the note as creation creates one with all sections present).

As the move will involve a few test files that use the logic having the move/deprecation done as a separate PR could also be a choice.

@dthuerck
Copy link
Collaborator Author

dthuerck commented Dec 13, 2023

@woodsp-ibm Sounds good. I'll proceed then as follows:

  1. Create a PR using the move/deprecate logic for current stuff inside QuadraticProgram that goes into, e.g., translators.
  2. After that has been merged, I'll adapt this PR here accordingly to the new structure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature request New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants