Contributing

We welcome contributions to OpenQuantum! This document provides guidelines for contributing to the project.

Getting Started

  1. Fork the repository on GitHub
  2. Clone your fork locally
  3. Create a new branch for your feature or fix
  4. Make your changes
  5. Run tests and ensure they pass
  6. Submit a pull request

Development Setup

git clone https://github.com/lenhanpham/OpenQuantum
cd OpenQuantum
cargo build --release
cargo test

Code Style

  • Follow Rust standard style (run cargo fmt)
  • Use cargo clippy to catch common issues
  • Write documentation for public APIs
  • Add tests for new functionality

Pull Request Guidelines

  • Keep PRs focused on a single feature or fix
  • Include a clear description of the changes
  • Reference any related issues
  • Ensure all tests pass
  • Update documentation if needed

Testing

# Run all tests
cargo test

# Run tests for a specific crate
cargo test -p integral

# Run with specific features
cargo test --features <feature>

Reporting Issues

  • Use GitHub Issues for bug reports and feature requests
  • Include a minimal reproducible example for bugs
  • Specify the OpenQuantum version and platform

Code of Conduct

Be respectful and constructive in all interactions. We follow the Rust Code of Conduct.