【代码贡献】新增 Grover 量子计数算法 - #74
Open
tokenjunkielabs wants to merge 1 commit into
Open
tokenjunkielabs wants to merge 1 commit into
tokenjunkielabs wants to merge 1 commit 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 的代码贡献类参赛条目,补齐仓库中 Grover 振幅放大与 QAE 之间缺失的 Quantum Counting(量子计数)算法。
主要内容
QCount.QuantumCount:对 Grover 振幅放大算子执行相位估计,在未知解数量时估计标记态数量。Grover.amp_operator,保持 oracle / zero-reflection 语义与仓库已有 Grover、QAE 实现一致。QuantumCountResult,返回估计标记态数量/比例、测量相位、bitstring、概率与 shots。phase_to_count/count_from_bitstring后处理 API,正确处理 Grover 共轭特征相位phi与1-phi。pyqpanda_alg包,并加入 focused regression source。按当前仓库结构,
Grover.amp_operator()文档已明确列出 Quantum Count 为振幅放大的消费者,但此前没有对应模块;此提交补齐该算法层。未运行额外测试/验证矩阵;本提交直接提交实现与回归源文件。
相关:#13