返回 Bug 清单
BUG-0167project-05低需关注python-logic

RandomnessExtractor._collect_bits 条件分支逻辑冗余

发现:2026-09-30验证:2026-10-09置信度:85%

症状

`_collect_bits()` 中 `if event.get("coincidence") or (a and b)` 和 `elif a != b` 两个分支都执行 `bits.append(int(a) ^ int(b))`,且 coincidence 隐含 a=True 且 b=True。

根因

条件分支可以合并为 `if a or b: bits.append(int(a) ^ int(b))`,当前实现逻辑正确但存在无效分支。

错误签名

条件分支可以合并为 `if a or b: bits.append(int(a) ^ int(b))`,当前实现逻辑正确但存在无效分支。

技术信息

来源项目

project-05

涉及文件

aurora-platform/csl/quantum_algorithms/randomness_extractor.py` (line 43-53)

标签

python-logic, project-05