Thank you for your interest in contributing to LeeQ! This document provides guidelines and instructions for contributing to the project.
-
Fork the repository on GitHub
-
Clone your fork locally:
git clone https://github.com/your-username/LeeQ.git cd LeeQ -
Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install in development mode:
pip install -e . pip install -r requirements-dev.txt
git checkout -b feature/your-feature-name- Write your code following the project style guide
- Add tests for new functionality
- Update documentation as needed
- Run tests locally before committing
# Run all tests
pytest
# Run specific test file
pytest tests/path/to/test_file.py
# Run with coverage
pytest --cov=leeqWe use the following tools to maintain code quality:
- flake8 for linting
- black for formatting (optional)
- mypy for type checking (where applicable)
Run linting checks:
bash ./ci_scripts/lint.shFollow conventional commit format:
feat:New featurefix:Bug fixdocs:Documentation changestest:Test additions or changesrefactor:Code refactoringstyle:Code style changes
Example:
git commit -m "feat: add new calibration experiment for XY gate"- Push your branch to your fork
- Create a pull request against the main repository
- Fill out the PR template with:
- Description of changes
- Related issues
- Testing performed
- Wait for review and address feedback
- Follow PEP 8
- Use descriptive variable names
- Add type hints where beneficial
- Document all public functions with numpy-style docstrings
- Update relevant documentation for any API changes
- Add docstrings to new classes and functions
- Include usage examples where appropriate
- Write unit tests for new functionality
- Ensure all tests pass before submitting PR
- Aim for good test coverage
- Include integration tests for complex features
leeq/
├── core/ # Core functionality
├── experiments/ # Experiment implementations
├── theory/ # Theoretical simulations
├── compiler/ # Hardware compilation
├── setups/ # Hardware setups
└── utils/ # Utility functions
tests/
├── unit/ # Unit tests
└── integration/ # Integration tests
docs/ # Documentation source
- Open an issue for bugs or feature requests
- Join discussions in existing issues
- Reach out to maintainers for guidance
By contributing, you agree that your contributions will be licensed under the project's MIT License.