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

Fix bug in max-cut solver (issue #611) #635

Merged
merged 6 commits into from
Oct 24, 2024

Conversation

TolisChal
Copy link
Collaborator

This PR fixes the bug in the max-cut solver as reported in #611

@TolisChal
Copy link
Collaborator Author

Hi @t-imamichi, @woodsp-ibm, @stefan-woerner!
I take care of the pylint errors in this PR: #634
Shall I wait for that one to be merged and rebase this one?

@coveralls
Copy link

coveralls commented Oct 12, 2024

Pull Request Test Coverage Report for Build 11496393782

Details

  • 27 of 29 (93.1%) changed or added relevant lines in 17 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 92.857%

Changes Missing Coverage Covered Lines Changed/Added Lines %
qiskit_optimization/applications/max_cut.py 0 2 0.0%
Totals Coverage Status
Change from base Build 10312432197: 0.0%
Covered Lines: 4446
Relevant Lines: 4788

💛 - Coveralls

@t-imamichi
Copy link
Collaborator

t-imamichi commented Oct 15, 2024

Thank you for fixing an issue.
I read the changelog of pylint and found that a new check too-many-positional-arguments was introduced by pylint 3.3.
https://pylint.readthedocs.io/en/latest/whatsnew/3/3.3/index.html#new-checks

Because qiskit-optimization already has the following config for max-args, how about adding a similar config for max-positional-args as follows too?

max-args=8

max-positional-arguments=8

https://pylint.pycqa.org/en/latest/user_guide/messages/refactor/too-many-positional-arguments.html

@t-imamichi
Copy link
Collaborator

Let me try the config #637

@t-imamichi
Copy link
Collaborator

t-imamichi commented Oct 15, 2024

How about merging #637? Could you take a look at it? You can minimize the change with the config.

@t-imamichi
Copy link
Collaborator

t-imamichi commented Oct 16, 2024

I closed #637 following @woodsp-ibm's comment.

@t-imamichi
Copy link
Collaborator

LGTM overall. I wrote some comments.

thkleinert
thkleinert previously approved these changes Oct 23, 2024
@TolisChal TolisChal force-pushed the fix_max_cut_bug branch 2 times, most recently from 11bc552 to 29a679f Compare October 23, 2024 13:33
Copy link
Collaborator

@t-imamichi t-imamichi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@TolisChal TolisChal merged commit 8a7e09e into qiskit-community:main Oct 24, 2024
16 checks passed
@t-imamichi t-imamichi added the stable backport potential The bug might be minimal and/or import enough to be port to stable label Oct 25, 2024
mergify bot pushed a commit that referenced this pull request Oct 25, 2024
* fix bug in max-cut solver (issue #611)

* fix copyrights

* add unknown-option-value as an error message to be ignored by pylint

* disable pylint too-many-positional-arguments error for the lines it pops up

* fix copyrights

* fix max-cut bug

(cherry picked from commit 8a7e09e)
mergify bot added a commit that referenced this pull request Oct 25, 2024
* fix bug in max-cut solver (issue #611)

* fix copyrights

* add unknown-option-value as an error message to be ignored by pylint

* disable pylint too-many-positional-arguments error for the lines it pops up

* fix copyrights

* fix max-cut bug

(cherry picked from commit 8a7e09e)

Co-authored-by: Apostolos Chalkis <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stable backport potential The bug might be minimal and/or import enough to be port to stable
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants