Skip to content

Latest commit

 

History

History
63 lines (46 loc) · 1.64 KB

File metadata and controls

63 lines (46 loc) · 1.64 KB

Contributing to OpenQuanta

Setup time: < 15 minutes.

Prerequisites

  • Rust stable (1.70+): curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
  • Python 3.9+ (for bindings): python --version
  • Git

Setup

git clone https://github.com/kpkaranam/openquanta.git
cd openquanta
cargo build
cargo test

Python bindings (optional)

python -m venv .venv
source .venv/bin/activate  # or .venv\Scripts\activate on Windows
pip install maturin numpy
cd openquanta && maturin develop && cd ..
python -c "import openquanta; print(openquanta.__version__)"

Development Workflow

  1. Create a branch: git checkout -b feature/my-change
  2. Make changes
  3. Run checks: cargo fmt && cargo clippy && cargo test
  4. Submit PR

Code Standards

  • cargo fmt — formatting is mandatory
  • cargo clippy — zero warnings
  • No unwrap() or expect() in openquanta-core
  • No external dependencies in openquanta-core (only std)
  • All public functions return Result<T, OpenQuantaError>
  • Tests: inline #[cfg(test)] mod tests in each module

Architecture

openquanta-core/     # Rust core: zero deps, all algorithms
openquanta/          # Python bindings (PyO3/maturin)
openquanta-pgvector/ # pgvector adapter
openquanta-cli/      # CLI binary
openquanta-vllm/     # vLLM reference adapter (Python)

Key rule: All compression logic lives in openquanta-core. Adapters are thin wrappers.

Two-Path Architecture

  • TurboQuantMSE (default): Safe for everything including KV cache/attention
  • TurboQuantProd (opt-in): Adds QJL for vector search only

Never default to TurboQuantProd. QJL degrades attention quality.