{"id":51414890,"url":"https://github.com/mikko-lab/qubit-harness","last_synced_at":"2026-07-04T18:01:18.055Z","repository":{"id":369282170,"uuid":"1248259153","full_name":"mikko-lab/qubit-harness","owner":"mikko-lab","description":"LangGraph-based agentic harness for qubit calibration — portfolio demo","archived":false,"fork":false,"pushed_at":"2026-07-04T12:25:35.000Z","size":139,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-07-04T14:13:28.647Z","etag":null,"topics":["agentic","ai-safety","anthropic","claude","langfuse","langgraph","llm","pydantic","python"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mikko-lab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-24T12:04:10.000Z","updated_at":"2026-07-04T12:25:39.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/mikko-lab/qubit-harness","commit_stats":null,"previous_names":["mikko-lab/qubit-harness"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/mikko-lab/qubit-harness","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikko-lab%2Fqubit-harness","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikko-lab%2Fqubit-harness/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikko-lab%2Fqubit-harness/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikko-lab%2Fqubit-harness/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mikko-lab","download_url":"https://codeload.github.com/mikko-lab/qubit-harness/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikko-lab%2Fqubit-harness/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35130737,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-04T02:00:05.987Z","response_time":113,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agentic","ai-safety","anthropic","claude","langfuse","langgraph","llm","pydantic","python"],"created_at":"2026-07-04T18:01:17.026Z","updated_at":"2026-07-04T18:01:18.035Z","avatar_url":"https://github.com/mikko-lab.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# qubit-harness\n\n[![CI](https://github.com/mikko-lab/qubit-harness/actions/workflows/ci.yml/badge.svg)](https://github.com/mikko-lab/qubit-harness/actions/workflows/ci.yml)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)\n\nA LangGraph-based agentic harness that calibrates a simulated qubit. Built as a portfolio demo for agentic systems work — the same closed-loop pattern applies to real hardware.\n\n## Architecture\n\nThe agent proposes; the harness decides whether the proposal is safe to execute.\n\n```\n┌─────────────────────────────────────────────┐\n│                 LangGraph loop              │\n│                                             │\n│  ┌──────────────┐     ┌──────────────────┐  │\n│  │   propose    │────▶│    execute       │  │\n│  │  (Claude)    │     │  (harness)       │  │\n│  └──────────────┘     └────────┬─────────┘  │\n│          ▲                     │             │\n│          │            ┌────────▼─────────┐  │\n│          │            │    analyze       │  │\n│     loop │            │  (update best)   │  │\n│          │            └────────┬─────────┘  │\n│          │                     │             │\n│          │            ┌────────▼─────────┐  │\n│          └────────────│   decide_next    │  │\n│                       │  budget? done?   │──▶ END\n│                       └──────────────────┘  │\n└─────────────────────────────────────────────┘\n\n  Harness layer (deterministic):\n    • amplitude bounds [0.0, 1.0]\n    • rate limit 100 ms between calls\n    • session budget (default 15)\n```\n\nThe harness layer is plain Python — no LLM judgement on safety checks. Langfuse traces every LLM call and tool invocation.\n\n## Install\n\n```bash\ngit clone https://github.com/mikko-lab/qubit-harness\ncd qubit-harness\nuv sync\ncp .env.example .env   # add ANTHROPIC_API_KEY\n```\n\n## Run\n\n```bash\nuv run python -m qubit_harness.main\nuv run python -m qubit_harness.main --budget 10 --no-trace\nuv run python -m qubit_harness.main --budget 5 --seed 42\n```\n\n`--seed` pins the simulator's measurement noise: the same seed gives the same noise draw for a given amplitude sequence. It does not make a full run deterministic — the agent's amplitude proposals come from the LLM and remain non-deterministic.\n\nExample output:\n\n```\nStarting calibration  budget=5  trace=off\n\n── Calibration complete ──────────────────────────────\n  Best amplitude   : 0.7500\n  Best fidelity    : 1.0000\n  Measurements used: 3\n  Budget remaining : 2\n──────────────────────────────────────────────────────\n```\n\n## Tests\n\n```bash\nuv run pytest\nuv run mypy src/\nuv run ruff check src/\n```\n\n## Natural extensions\n\n**GraphRAG** — store measurement history in a graph database; let the agent query similar past calibrations across qubit instances.\n\n**MCP server** — expose the harness as an MCP tool so any MCP-compatible agent can drive calibration without custom integration code.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikko-lab%2Fqubit-harness","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmikko-lab%2Fqubit-harness","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikko-lab%2Fqubit-harness/lists"}