A new tool to study comments in quantum software code

The CC4Q Workbench automates the process of extracting and classifying explanations found in quantum software repositories.

Researchers built the CC4Q Workbench. This open-source workbench creates a reusable workflow for studying code comments in quantum software development kits (SDKs).

The tool works with a Python repository at a specific revision. It extracts code-comment pairs and breaks comments into sentence-level units.

Two trained classifiers identify quantum-specific content and assign quantum-knowledge categories. A web interface allows users to explore datasets and inspect code snippets.

Users can build a corpus from new repositories. They can also perform manual annotation and fine-tune classifiers using exported annotations.

The release includes aggregate statistics for six SDK datasets. These contain 39,593 sentence-level code comment units (SCCUs), with 17,517 units browsable in the interface.

When applied to three Qiskit repositories, the pipeline produced 11,517 SCCUs without code changes. Manual verification of 379 SCCUs showed 85.0% agreement with the binary classifier.

Key facts

  • The CC4Q Workbench integrates comment extraction, classification, and manual verification into one workflow.
  • The tool uses two trained classifiers to identify quantum-specific content in code comments.
  • Manual verification showed 85.0% agreement between human annotations and the binary classifier's predictions.

All sections

Edition