【代码贡献】完善 QUBO 二进制多项式规范化与高阶项校验 - #69
Open
tokenjunkielabs wants to merge 4 commits into
Open
tokenjunkielabs wants to merge 4 commits into
tokenjunkielabs wants to merge 4 commits into
Conversation
This was referenced Sep 22, 2026
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.
关联 #13(2026 本源杯开源创新赛道|代码贡献)。
问题
QuadraticBinary当前把 SymPy 单项式直接按原始指数模式分类。对于二进制变量,x^k = x(k>0)应先做规范化;现有逻辑会把例如x0**3误落到常数分支,并可能把包含三个不同变量的高阶项静默截断成二次项,从而改变待优化目标而不报错。修复
x0**2*x1与x0*x1**3会合并为同一个规范 QUBO 项;QuadraticBinaryAPI、QAOA/GAS 调用面不变。回归覆盖
新增聚焦回归覆盖高次幂规范化、等价二次项系数累加和非 QUBO 三变量单项式拒绝。
Exact owner head:
ee25410c6600f20f60c18e501b0c581fd9046536.本提交未运行测试,因此不声明本地或托管测试绿色;回归代码随修复一起提交供项目 CI/维护者执行。