Conversation
Copilot
AI
changed the title
[WIP] Remove backward-compatibility shims in objective-direction migration
Remove objective-direction compatibility shims and enforce canonical energy semantics
Jul 31, 2026
fgfuchs
approved these changes
Jul 31, 2026
fgfuchs
left a comment
Member
There was a problem hiding this comment.
this is jsut to updat ethe branch
fgfuchs
marked this pull request as ready for review
July 31, 2026 12:12
fgfuchs
self-requested a review
July 31, 2026 12:13
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…ire explicit sense
…or MaxCut examples Co-authored-by: fgfuchs <2428162+fgfuchs@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR completes the objective-direction migration as a clean break: deprecated compatibility APIs and alias fields are removed, and the codebase now exposes a single canonical invariant based on
objective_sense,objective_value(...), andenergy(...). QAOA internals remain energy-first and argmin-based throughout optimization, statistics, warm-starting, post-processing, and serialization.API cleanup
Problem.cost()Problem.computeMinMaxCosts()QAOA.get_Exp()Canonical objective/energy semantics
energy(x) = objective_value(x)for minimize problemsenergy(x) = -objective_value(x)for maximize problemsQAOA internals
Serialization / schema
qaoaIOschema to3.Docs / examples / migration surface
objective_value(...)energy(...)objective_bounds()get_energy()get_objective()Example of the resulting API: