Skip to content

Conversation

@K-Suzuki-Jij
Copy link
Contributor

変更

sample_huio関数において、updater=OPT_METROPOLISとすると、ある変数に対して最もエネルギーが下がるような最適遷移が行われます。
現在のmainの実装ではこの最適遷移が行われるのはz^2のような2乗項だけでしたが、これを4乗項まで行うように変更しました。

Copilot AI review requested due to automatic review settings October 6, 2025 13:29
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR extends the optimal Metropolis updater (OPT_METROPOLIS) in the sample_huio function to handle polynomial terms up to 4th degree, expanding from the previous limitation of only quadratic (2nd degree) terms.

  • Extended optimal transition capability from quadratic to quartic polynomial terms
  • Added new polynomial minimum finding utility functions for cubic and quartic cases
  • Refactored the variable degree tracking system to use a more efficient vector-based approach

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
include/openjij/utility/min_polynomial.hpp New utility functions for finding minimum values of integer polynomials up to degree 4
include/openjij/system/integer_polynomial_sa_system.hpp Extended GetMinEnergyDifference to handle cubic and quartic coefficients using new utility functions
include/openjij/graph/integer_polynomial_model.hpp Replaced set-based degree tracking with vector-based approach for better performance
include/openjij/updater/single_integer_move.hpp Updated method names to reflect extended capability from quadratic to quartic
include/openjij/system/integer_quadratic_sa_system.hpp Updated method names for consistency
tests/cxxtest/utility/min_polynomial.hpp Comprehensive test cases for the new polynomial minimum finding functions
tests/cxxtest/graph/integer_polynomial_model.hpp Updated tests to use new degree tracking API
tests/cxxtest/utility/all.hpp Added include for new polynomial utility tests
tests/cxxtest/cxxtest.cpp Added include for new polynomial utility header
openjij/declare.hpp Updated Python bindings to use new degree tracking API

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@K-Suzuki-Jij K-Suzuki-Jij requested a review from j-i-k-o October 6, 2025 13:48
Copy link
Collaborator

@j-i-k-o j-i-k-o left a comment

Choose a reason for hiding this comment

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

LGTM

@K-Suzuki-Jij K-Suzuki-Jij merged commit c8cf8f3 into main Oct 10, 2025
20 checks passed
@K-Suzuki-Jij K-Suzuki-Jij deleted the feature/quartic-support branch October 10, 2025 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants