Skills quantinuumclaw
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.
git clone https://github.com/openclaw/skills
T=$(mktemp -d) && git clone --depth=1 https://github.com/openclaw/skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/arunnadarasa/quantum" ~/.claude/skills/clawdbot-skills-quantinuumclaw-2c6c7e && rm -rf "$T"
skills/arunnadarasa/quantum/SKILL.mdQuantinuumClaw – 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:
- Building for the OpenClaw Clinical Hackathon or any clinical/healthcare quantum project
- Building web applications that use quantum computing (optimization, chemistry, ML, random, crypto)
- Deploying quantum algorithms as REST APIs or creating dashboards for quantum results
- User mentions: clinical, healthcare, drug discovery, treatment optimization, patient stratification, molecular simulation, clinical trials, Guppy, Selene, Fly.io
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 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 →
mapping:--use-case
| Clinical idea | | Notes |
|---|---|---|
| Drug discovery / molecular sim | | Molecules, energy, properties |
| Treatment / resource optimization | | QAOA-style optimization |
| Patient stratification / ML | | Quantum ML models |
| Trial randomization | | Quantum RNG |
| Secure keys / protocols | | 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
Edit
my-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
Use
assets/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 frontend
VITE_API_URL to the Fly.io backend; hit /health to verify.
Clinical Use Case Cheat Sheet
- Drug discovery / molecular simulation:
— VQE-style energy/property in Guppy; expose molecule type and params via API.chemistry - Treatment / resource optimization:
— Define objective (cost, wait time); run QAOA in Selene; display results in UI.optimization - Patient stratification / classification:
— Map patient features to model inputs; return risk/stratum or classification.ml - Randomization (e.g. trials):
— Quantum RNG from Guppy; expose bits/shots in API.random - Security / key material:
— Key generation or quantum-safe primitives; keep keys on backend only.crypto
Data and Compliance (Clinical / Hackathon)
- Demos: Use synthetic or de-identified data only. Do not send real PHI to quantum backends or store in Fly.io without a compliance plan.
- API keys: Store in Fly.io secrets (
), never in code or frontend.fly secrets set - Production: Add auth, rate limiting, and consider HIPAA/DPA; restrict CORS in Selene.
Resources
scripts/
— All-in-one: backend + deploy + frontendcreate_quantum_app.py
— Scaffold Selene backendsetup_selene_service.py
— Deploy to Fly.ioflyio_deploy.py
— Frontend wired to backend URLlovable_integrate.py
references/
— Guppy syntax, gates, circuits, examplesguppy_guide.md
— Endpoints, request/response, errors, jobsselene_api.md
— Fly.io scaling, regions, secrets, monitoringflyio_config.md
— Frontend patterns, dashboard, API clientlovable_patterns.md
— Detailed clinical use-case mappings and compliance notesclinical-use-cases.md
assets/
— Backend boilerplate (main.py, Dockerfile, fly.toml, .env.example)selene-template/
— React/TS frontend with QuantumDashboard and API clientlovable-template/
Advanced: Multi-Quantum Use Cases
- Optimization dashboard: Selene + QAOA/VQE; Lovable with sliders; Fly.io with scaling.
- Chemistry explorer: Guppy molecular simulations; 3D viewer; optional persistent storage.
- Quantum ML API: Selene exposing QNN/QSVM; Lovable for training/predictions; Fly.io (GPU if needed).
Performance, Cost, and Security
- Queuing: Use job queues for long-running quantum jobs; WebSockets or polling in frontend.
- Caching: Cache identical computations to reduce quantum hardware cost.
- Fly.io: Scale to zero when idle (
); usemin_machines_running = 0
for VM sizing.references/flyio_config.md - Security: No API keys in frontend; rate limiting on Selene; HTTPS in production; see
for auth patterns.references/selene_api.md
Troubleshooting
- Guppy import error:
in backend; or use mock mode for demos.pip install guppy - Selene not starting: Check
,fly.toml
, and env vars.fly logs - Frontend can’t connect: Verify
, CORS in Selene, andVITE_API_URL
.curl .../health - Fly.io deploy fails:
;fly deploy --clean
; ensurefly logs --phase build
.fly auth login - Quantum results wrong: Validate circuit logic and measurement; test with emulator first.
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.