Hackathon Quantinuum
by @arunnadarasa
Enables building and deploying quantum computing applications with Quantinuum, Guppy, Selene, and Fly.io. Use for the OpenClaw Clinical Hackathon, clinical o...
clawhub install quantumπ About This Skill
name: quantinuumclaw description: Enables building and deploying quantum computing applications with Quantinuum, Guppy, Selene, and Fly.io. Use for the OpenClaw Clinical Hackathon, clinical or healthcare projects (drug discovery, treatment optimization, patient stratification, trial randomization), quantum-powered web apps, deploying quantum algorithms to the cloud, or integrating quantum results into user-facing interfaces.
QuantinuumClaw β Quantum Guppy/Selene Stack
This skill provides everything needed to build production-ready quantum applications using Quantinuum (hardware/emulator), Guppy (quantum language), Selene (FastAPI backend), and Fly.io (deployment), with optional Lovable frontend. It is tuned for the OpenClaw Clinical Hackathon and general quantum web apps.
When to Use This Skill
Use when:
Example requests: "Build a quantum portfolio optimizer with a web interface" Β· "Deploy my Guppy algorithm to the cloud" Β· "Create a clinical molecular simulation demo" Β· "Set up a quantum ML service on Fly.io"
Stack at a Glance
| Component | Role |
|------------|------|
| Quantinuum | Quantum hardware (H-series) or emulator |
| Guppy | Quantum programming (circuits, gates, measurement) |
| Selene | FastAPI backend that runs Guppy and exposes REST API |
| Fly.io | Hosts the Selene backend in the cloud |
| Lovable | React/TS frontend template; use assets/lovable-template/ or any app that calls the Selene API |
Quick Start (One Command)
From the repo root:
python3 scripts/create_quantum_app.py \
--app-name "clinical-demo" \
--use-case "chemistry" \
--description "Clinical molecular simulation" \
--deploy
Then set VITE_API_URL in the frontend to your Fly.io app URL (e.g. https://clinical-demo.fly.dev).
Clinical use-case β --use-case mapping:
| Clinical idea | --use-case | Notes |
|-----------------------------------|----------------|--------|
| Drug discovery / molecular sim | chemistry | Molecules, energy, properties |
| Treatment / resource optimization | optimization | QAOA-style optimization |
| Patient stratification / ML | ml | Quantum ML models |
| Trial randomization | random | Quantum RNG |
| Secure keys / protocols | crypto | Quantum-safe crypto |
General use cases (portfolio, finance, etc.) also use optimization, chemistry, ml, random, crypto, or finance. See references/clinical-use-cases.md for detailed clinical mappings.
Full Workflow: Creating a Quantum Application
Step 1: Define the use case
Identify the problem (optimization, simulation, ML, cryptography, clinical, etc.).Step 2: Create Selene backend
python3 scripts/setup_selene_service.py \
--app-name "my-quantum-app" \
--use-case "chemistry" \
--description "Quantum chemistry simulator"
This creates a backend dir with FastAPI, health check, Dockerfile, and fly.toml.Step 3: Implement your Guppy circuit
Editmy-quantum-app/main.py β QuantumService._run_real_quantum(). Use references/guppy_guide.md for syntax. For clinical: chemistry (molecule, shots, precision), optimization (objective, constraints), ML (features, epochs).Step 4: Deploy to Fly.io
python3 scripts/flyio_deploy.py --app-name "my-quantum-app" --service-dir "my-quantum-app" --region "lhr"
Set secrets with fly secrets set; use emulator for demos if preferred.Step 5: Frontend
Useassets/lovable-template/ or run:
python3 scripts/lovable_integrate.py \
--app-name "my-frontend" \
--backend-url "https://my-quantum-app.fly.dev" \
--quantum-use-case "chemistry"
Then npm install and npm run dev in the frontend dir.Step 6: Connect and test
Point frontendVITE_API_URL to the Fly.io backend; hit /health to verify.Clinical Use Case Cheat Sheet
chemistry β VQE-style energy/property in Guppy; expose molecule type and params via API.optimization β Define objective (cost, wait time); run QAOA in Selene; display results in UI.ml β Map patient features to model inputs; return risk/stratum or classification.random β Quantum RNG from Guppy; expose bits/shots in API.crypto β Key generation or quantum-safe primitives; keep keys on backend only.Data and Compliance (Clinical / Hackathon)
fly secrets set), never in code or frontend.Resources
scripts/
create_quantum_app.py β All-in-one: backend + deploy + frontendsetup_selene_service.py β Scaffold Selene backendflyio_deploy.py β Deploy to Fly.iolovable_integrate.py β Frontend wired to backend URLreferences/
guppy_guide.md β Guppy syntax, gates, circuits, examplesselene_api.md β Endpoints, request/response, errors, jobsflyio_config.md β Fly.io scaling, regions, secrets, monitoringlovable_patterns.md β Frontend patterns, dashboard, API clientclinical-use-cases.md β Detailed clinical use-case mappings and compliance notesassets/
selene-template/ β Backend boilerplate (main.py, Dockerfile, fly.toml, .env.example)lovable-template/ β React/TS frontend with QuantumDashboard and API clientAdvanced: Multi-Quantum Use Cases
Performance, Cost, and Security
min_machines_running = 0); use references/flyio_config.md for VM sizing.references/selene_api.md for auth patterns.Troubleshooting
pip install guppy in backend; or use mock mode for demos.fly.toml, fly logs, and env vars.VITE_API_URL, CORS in Selene, and curl .../health.fly deploy --clean; fly logs --phase build; ensure fly auth login.Next Steps
After initial setup: monitor quantum usage/costs; add auth to Selene if public; improve error handling and logging; consider persistence for job history.
For detailed clinical use-case specs and compliance reminders, see references/clinical-use-cases.md.
π Tips & Best Practices
pip install guppy in backend; or use mock mode for demos.fly.toml, fly logs, and env vars.VITE_API_URL, CORS in Selene, and curl .../health.fly deploy --clean; fly logs --phase build; ensure fly auth login.