Skip to content

Fix typos, indentation, and add missing docstrings (QKmeans + Grover)#9

Open
danielabrahamx wants to merge 1 commit intoOriginQ:developfrom
danielabrahamx:danielabrahamx/fix-typos-and-indentation
Open

Fix typos, indentation, and add missing docstrings (QKmeans + Grover)#9
danielabrahamx wants to merge 1 commit intoOriginQ:developfrom
danielabrahamx:danielabrahamx/fix-typos-and-indentation

Conversation

@danielabrahamx
Copy link
Copy Markdown

Fix typos, indentation, and missing docstrings in QKmeans and Grover modules

Changes

Grover/Grover_core.py

  • Fix typo: zero-controledzero-controlled (appears in 2 docstring locations)

QKmeans/QuantumKmeans.py

  • Fix inconsistent 2-space indentation in _point_centroid_distances loop bodies → 4-space (PEP 8)
  • Add missing docstring to _QuantumKmeansCircuit: explains the swap-test circuit, all parameters, and return value
  • Add missing docstring to _point_centroid_distances: explains encoding strategy, parameters, and return value

pyqpanda_alg/init.py

  • Remove duplicate commented-out # from . import QAOA (already imported on the preceding line)

Relates to Issue #1 (内容纠错与注释补充)

…and __init__

- Grover_core.py: fix 'zero-controled' → 'zero-controlled' (2 occurrences)
- QuantumKmeans.py: fix 2-space indentation in for-loop bodies to 4-space (PEP 8)
- __init__.py: remove duplicate commented-out '# from . import QAOA'

Relates to Issue OriginQ#1

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
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