Allow optimization variables to be on different domains #70
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
💬 Pull Request Description
This PR allows the optimization of quadratic polynomials to occur on different domains at the same time. For instance, let us consider a model with 4 variables:
Previously, all variables had to be defined on the same domain but it is now possible to specify one domain per variable. To do so, instead of a string, the
domain
argument of the optimization functions must be passed as a list of string with the same length as the number of variables. For the previous example, the input would be:Example
✔️ Check list
🚀 New features
Possibility to define on optimization domain per variable.
🐞 Bug fixes
None.
📣 Supplementary information
The quadratic-polynomial-to-Ising conversions have been unified in a single formula. The math behind this new formula is explained below: