Contribution Guide
Thank you for considering contributing to PolyQ!
Getting started
Fork the repo and clone your fork.
Create a feature branch:
git checkout -b feature/your-feature-name
Make your changes and commit them:
git commit -m "Add your commit message here"
Push your changes to your fork:
git push origin feature/your-feature-name
Open a pull request against the
mainbranch of the original repository.Ensure your pull request passes the CI checks.
Wait for review and address any feedback.
Once approved, your changes will be merged into the main branch.
Contributing to Documentation
The project uses Sphinx for documentation generation. Here’s how to contribute:
Setting up documentation environment
Install documentation dependencies:
pip install sphinx sphinx-autodoc-typehints sphinx-rtd-theme
Install project dependencies (required for autodoc):
pip install numpy qiskit psutil
Files to modify
API Documentation: Files in
PolyQ/- Add docstrings to functions and classesUser Guide:
docs/source/index.rst- Main documentation pageModule References:
docs/source/PolyQ.rst- Auto-generated API referenceContributing Guide:
docs/source/contributing.rst- This fileConfiguration:
docs/source/conf.py- Sphinx configuration
Building documentation
Navigate to the docs directory:
cd docs
Build the HTML documentation:
make htmlView the generated documentation:
open _build/html/index.htmlFor clean builds (recommended after major changes):
make clean make html
Documentation style guidelines
Use clear, concise language
Include examples in docstrings where helpful
Follow Google-style docstring format:
def example_function(param1: str, param2: int) -> bool: """Brief description of the function. Args: param1: Description of parameter 1 param2: Description of parameter 2 Returns: Description of return value Example: >>> example_function("hello", 5) True """