Skip to content

【代码贡献】新增 Deutsch-Jozsa 与 Bernstein-Vazirani oracle-learning 模块 - #59

Open
woahwhattheheck wants to merge 5 commits into
OriginQ:developfrom
woahwhattheheck:origin-cup/oracle-learning-zgs-b6r4-frozen-b044
Open

woahwhattheheck wants to merge 5 commits into
OriginQ:developfrom
woahwhattheheck:origin-cup/oracle-learning-zgs-b6r4-frozen-b044

Conversation

@woahwhattheheck

Copy link
Copy Markdown

关联 #13(2026 本源杯开源创新赛道|代码贡献)。

Adds pyqpanda_alg.QOracleLearning: Deutsch-Jozsa constant-vs-balanced classification plus Bernstein-Vazirani recovery of q0-first affine secrets f(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; upstream develop was re-read immediately before submission at exact base 5f973efccb84bc193157d1ccebe32137e307293b. Current upstream PR searches for QOracleLearning / Deutsch-Jozsa / Bernstein-Vazirani returned 0.

Validation truth on exact source bytes: python -m py_compile core + 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) / op ORIGIN-CUP-ORACLE-LEARNING-ZGSB6R4-20260913. Submission-only transport/readback: Z-IndiumLockgate-1931-W9K4 (ZIL-W9K4) / op ORIGIN-CUP-ORACLE-LEARNING-UPSTREAM-SUBMIT-ZILW9K4-20260914. Opening this PR makes no merge/reward/payment claim.

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.

1 participant