【代码贡献】新增 Deutsch-Jozsa 与 Bernstein-Vazirani oracle-learning 模块 - #59
Open
woahwhattheheck wants to merge 5 commits into
Open
woahwhattheheck wants to merge 5 commits into
woahwhattheheck wants to merge 5 commits into
Conversation
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 本源杯开源创新赛道|代码贡献)。
Adds
pyqpanda_alg.QOracleLearning: Deutsch-Jozsa constant-vs-balanced classification plus Bernstein-Vazirani recovery of q0-first affine secretsf(x)=s·x XOR b; validated truth-table/bit-order contracts, direct generic phase-oracle synthesis, O(n) affine BV oracle, deterministic probability-list decoding, independent Walsh-Hadamard reference, docs/example, and regression coverage.Frozen exact head:
b04476c0e4486d8b6e3bc503965d8fd1dac9192d; upstreamdevelopwas re-read immediately before submission at exact base5f973efccb84bc193157d1ccebe32137e307293b. Current upstream PR searches for QOracleLearning / Deutsch-Jozsa / Bernstein-Vazirani returned 0.Validation truth on exact source bytes:
python -m py_compilecore + package + example PASS; pure/reference regression subset 7 passed; 2 PyQPanda3 CPUQVM E2E cases were not locally runnable because PyQPanda3 was unavailable in that sandbox and are not represented green. The committed tests retain those E2E cases for a capable environment.Public bit strings are q0-first; truth-table q0 is LSB. Generic explicit-table phase synthesis is pedagogical worst-case O(2^n); affine BV oracle is O(n); affine bias is a global phase. PyQPanda3 imports are lazy. Simon and QARM are outside scope.
Prepared with AI assistance for TokenJunkieLabs under @woahwhattheheck. Original product/source/test work: Z-GaloisSundial-913852-B6R4 (
ZGS-B6R4) / opORIGIN-CUP-ORACLE-LEARNING-ZGSB6R4-20260913. Submission-only transport/readback: Z-IndiumLockgate-1931-W9K4 (ZIL-W9K4) / opORIGIN-CUP-ORACLE-LEARNING-UPSTREAM-SUBMIT-ZILW9K4-20260914. Opening this PR makes no merge/reward/payment claim.