Skip to content

quantfenix/quantfenix-open

Repository files navigation

QuantFenix Open

CI License: Apache-2.0 Python

Open source CLI and SDK for running optimization workflows with policy-based backend selection and budget controls.

Why QuantFenix Open?

  • Cost-capped, reproducible optimization runs with local OR-Tools baselines
  • Simple CLI/SDK you can run offline with your own credentials
  • Clean artifacts: manifest + JSON/CSV reports for audits

Overview

QuantFenix Open helps you run optimization problems (VRP, Knapsack, Scheduling) across different computational backends while managing costs and maintaining reproducible results.

Features:

  • Run optimization jobs on classical solvers (OR-Tools) and quantum/specialized backends
  • Policy-based backend selection using cost, latency, and quality weights
  • Budget enforcement with hard caps
  • Reproducible runs with manifest generation
  • Local execution with your own credentials

Quick Start

Run in 60s

pip install -e ".[dev]"
qf init vrp
qf run --config qf.yaml

Installation:

python -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
pip install -e ".[dev]"

Run a demo:

qf init vrp
qf run --config qf.yaml

Run tests:

pytest
ruff check .
mypy quantfenix providers

Project Structure

quantfenix-open/
├── quantfenix/          # Core library
│   ├── cli.py          # CLI commands (init, run, report, doctor)
│   ├── config.py       # YAML configuration loading
│   ├── policy.py       # Backend selection logic
│   ├── manifest.py     # Run manifest generation
│   └── types.py        # Type definitions and protocols
├── providers/          # Backend adapters
│   └── ortools.py     # OR-Tools runner
├── templates/          # Project templates
│   ├── vrp/           # Vehicle routing problem
│   ├── knapsack/      # Knapsack problem
│   └── schedule/      # Scheduling problem
└── tests/             # Test suite

How It Works

  1. Load Configuration: Parse qf.yaml with problem definition and backend settings
  2. Policy Routing: Select backends based on cost/latency/quality weights
  3. Execute: Run optimization on selected backends
  4. Enforce Budget: Stop if spending exceeds configured limits
  5. Generate Reports: Create manifest and output files

Key Behaviors:

  • Budget enforcement stops execution when limits are exceeded
  • Policy routing is deterministic for reproducible results
  • Telemetry is disabled by default

If this project helps you, please star the repo ⭐

About

QuantFenix Open

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages