Thank you for your interest in contributing to piQture! We're excited to welcome contributions from quantum computing enthusiasts, machine learning practitioners, and developers. This document provides guidelines for contributing to the project.
Our community strives to be open, inclusive, and respectful. We expect all contributors to adhere to our Code of Conduct in all project interactions.
- Create and activate a Python environment:
# Using conda
conda create -n piqture_dev python=3.x
conda activate piqture_dev
# OR using venv
python -m venv piqture_dev
source piqture_dev/bin/activate # Unix
.\piqture_dev\Scripts\activate # Windows
- Clone and install development dependencies:
git clone https://github.com/SaashaJoshi/piQture.git
cd piQture
pip install -r requirements.txt
pip install -e .
We use pytest for our test suite:
tox
- Implementing new quantum image encoding methods
- Optimizing quantum circuit implementations
- Adding support for new quantum machine learning models
- Improving documentation and adding examples
- Writing tests and improving test coverage
- Performance optimization and benchmarking
- And other good first issues
- Fork the repository and create a new branch:
git checkout -b branch-name
- Make your changes following our code style guidelines
- Write or update tests as needed
- Update documentation if you're introducing new features
- Run the test suite to ensure everything passes
- Push your changes and create a pull request
- Use a clear, descriptive title
- Include the purpose of the change and relevant issue numbers
- Provide before/after examples for visual changes
- Include performance benchmarks for optimization changes
- Update docstrings and comments as needed
type(scope): Brief description
Longer description if needed
Closes #123
Types (Optional):
feat
: New featurefix
: Bug fixdocs
: Documentation changesstyle
: Code style changesrefactor
: Code refactoringperf
: Performance improvementstest
: Adding or modifying testschore
: Maintenance tasks
- Follow PEP 8 guidelines
- Use type hints for function arguments and return values
- Maximum line length: 88 characters (using Black formatter)
- Use docstrings for classes and functions
Code formatting can be checked using
tox
.
tox -e lint
### Quantum Circuit Style
- Comment complex quantum operations
- Include circuit diagrams in docstrings when helpful
- Optimize circuit depth where possible
Example:
```python
def apply_quantum_convolution(
circuit: QuantumCircuit,
qreg: QuantumRegister,
params: Dict[str, Any]
) -> None:
"""Apply quantum convolution operation to the circuit.
Args:
circuit: The quantum circuit to modify
qreg: Quantum register for the operation
params: Dictionary containing convolution parameters
Returns:
None
"""
# Implementation
- Keep docstrings up to date
- Add examples for new features
- Update README.md when adding major features
- Include references to relevant papers or resources
- Write unit tests for new features
- Include test cases for edge cases
- Add integration tests for complex workflows
- Maintain or improve test coverage
When creating issues:
- Check existing issues to avoid duplicates
- Use issue templates when available
- Include:
- Python/piQture version
- Operating system
- Clear steps to reproduce
- Expected vs actual behavior
- Relevant error messages
- Code samples if applicable
- Open an issue for bugs or feature requests
- Join our community discussions
- Tag maintainers for urgent issues
By contributing, you agree that your contributions will be licensed under the project's license.
We appreciate all contributors who help make piQture better! Your contributions, whether big or small, are valuable to the project's success.