Skip to content

【代码贡献】新增 Quantum Counting 标记态计数模块 - #73

Open
tokenjunkielabs wants to merge 4 commits into
OriginQ:developfrom
woahwhattheheck:zz-sablekite/quantum-counting-clean-20260920
Open

tokenjunkielabs wants to merge 4 commits into
OriginQ:developfrom
woahwhattheheck:zz-sablekite/quantum-counting-clean-20260920

Conversation

@tokenjunkielabs

Copy link
Copy Markdown

Refs #13

Summary

Adds a standalone Quantum Counting implementation for estimating how many basis states are marked by a Grover oracle.

  • Reuses the repository's existing Grover amplitude operator and QFT convention.
  • Supports either an arbitrary phase-oracle callable or a convenient list of marked bit strings.
  • Builds the phase-estimation circuit with configurable precision and shots.
  • Returns both the continuous marked-state estimate and its nearest bounded integer count, plus the dominant eigenphase metadata.
  • Exposes the module through pyqpanda_alg and includes a runnable two-marked-states / eight-state example.

The implementation follows the standard identity M/N = sin^2(theta), using phase estimation of the Grover iterate to recover theta and then M.

Source base: OriginQ/pyqpanda-algorithm develop@5f973efccb84bc193157d1ccebe32137e307293b.
Contributor branch: woahwhattheheck:zz-sablekite/quantum-counting-clean-20260920.
Scope is additive except for the top-level package export.

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