Skip to main content

Turn your computer into a Kanad quantum chemistry compute server

Project description

kanad-compute

Turn your computer into a quantum chemistry compute server for Kanad.

Run VQE calculations, molecular simulations, and quantum analyses on your own hardware — then connect to the Kanad platform for visualization, collaboration, and reporting.

Quick Start

# Install
pip install kanad-compute

# Initialize (creates config + API key)
kanad-compute init

# Start the server
kanad-compute start

Then paste your API key into Kanad > Profile > Backend Credentials > Kanad Compute.

What It Does

kanad-compute runs a local FastAPI server that executes quantum chemistry calculations using the Kanad framework. When you select "Kanad Compute" as a backend in the Kanad web app, your calculations run on YOUR machine instead of cloud services.

Supported solvers: PhysicsVQE, HardwareVQE, HybridSubspaceVQE, SQD, KrylovSQD, VQE, VarQITE, qEOM, EfficientVQE, ExcitedStates

Supported backends: Statevector (local), Qiskit Aer (CPU/GPU), IBM Quantum (with your credentials), IonQ (with your credentials)

Requirements

  • Python 3.11+
  • 8GB+ RAM recommended
  • Kanad library installed (pip install kanad or install from source)

Installation

From GitHub (recommended)

# Clone the repo
git clone https://github.com/mk0dz/kanad-compute.git
cd kanad-compute

# Install in development mode
pip install -e .

# With GPU acceleration
pip install -e ".[gpu]"

# With IBM Quantum hardware
pip install -e ".[ibm]"

# With IonQ
pip install -e ".[ionq]"

# Everything
pip install -e ".[all]"

Note: You also need the Kanad framework installed. If you don't have it:

git clone https://github.com/mk0dz/kanad.git
cd kanad && pip install -e .

From PyPI (coming soon)

pip install kanad-compute

CLI Commands

kanad-compute init

Initialize configuration. Creates ~/.kanad-compute/config.json with a unique node ID and API key.

kanad-compute init --port 7440 --max-qubits 20 --gpu

Options:

  • --port — Server port (default: 7440)
  • --max-qubits — Maximum qubits to accept (default: 20)
  • --gpu / --no-gpu — Enable GPU acceleration
  • --ibm-token — IBM Quantum API token
  • --ionq-key — IonQ API key

kanad-compute start

Start the compute server.

kanad-compute start --host 0.0.0.0 --port 7440

kanad-compute status

Check server status and system info.

kanad-compute status

kanad-compute key

Display your API key (for pasting into Kanad app).

kanad-compute key

kanad-compute configure

Update configuration without reinitializing.

kanad-compute configure --ibm-token YOUR_TOKEN --max-qubits 25

Connecting to Kanad

  1. Run kanad-compute start
  2. Copy your API key: kanad-compute key
  3. Go to kanad.xyz > Profile > Backend Credentials
  4. Under "Kanad Compute", paste the API key and set the server URL (http://localhost:7440)
  5. Click "Test" to verify the connection
  6. Select "Kanad Compute" as your backend when running experiments

API Endpoints

Method Endpoint Description
GET /health Server health check (no auth)
GET /info System info and capabilities
POST /jobs Submit a calculation job
GET /jobs/{id} Get job status and results
POST /jobs/{id}/cancel Cancel a running job
GET /jobs List recent jobs

All endpoints except /health require Bearer token authentication.

Architecture

Your Machine
+-- kanad-compute server (FastAPI, port 7440)
|   +-- /health, /info
|   +-- /jobs (submit, poll, cancel)
|   +-- Thread Pool Executor
|       +-- Kanad Solvers (PhysicsVQE, HardwareVQE, ...)
|       +-- Kanad Backends (statevector, aer, ibm, ionq)
+-- Config: ~/.kanad-compute/config.json

Kanad Web App (kanad.xyz)
+-- Profile > Backend Credentials > Kanad Compute
+-- Schrodinger Lab > Select "Kanad Compute" backend
+-- Jobs proxied to your machine via API key auth

Configuration

Config is stored at ~/.kanad-compute/config.json:

{
  "node_id": "uuid",
  "api_key": "your-api-key",
  "port": 7440,
  "max_qubits": 20,
  "max_workers": 2,
  "gpu_enabled": false,
  "ibm_api_token": null,
  "ionq_api_key": null
}

License

Apache 2.0 — see LICENSE.

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kanad_compute-0.1.0.tar.gz (600.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kanad_compute-0.1.0-py3-none-any.whl (711.6 kB view details)

Uploaded Python 3

File details

Details for the file kanad_compute-0.1.0.tar.gz.

File metadata

  • Download URL: kanad_compute-0.1.0.tar.gz
  • Upload date:
  • Size: 600.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for kanad_compute-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2418f7e217fc47b62afadfb8aa41dff88fe8129a35ac8b6247d0d264f33a837d
MD5 bb038e4131661dcdc4d065a6359bc697
BLAKE2b-256 24b34aff2a5b8d814cc38f032d0f1f57843703b39045c7c0dd07d64ab2e0d2c2

See more details on using hashes here.

File details

Details for the file kanad_compute-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: kanad_compute-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 711.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for kanad_compute-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b986270b3f1c5960a1c9d1362d43ddfbc9d2a4bf4ab54728af885cf05202cfbd
MD5 27808c5dea3317b496e7cfa6674dc42f
BLAKE2b-256 1e82039132426a113bf08fe4092af705040bc67583f59762b13462730cf17b00

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page