@oqtopus-team/pi-qdash 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +68 -0
- package/extensions/qdash.ts +3754 -0
- package/package.json +49 -0
- package/skills/qdash/SKILL.md +110 -0
- package/skills/qdash-calibration/SKILL.md +182 -0
package/package.json
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@oqtopus-team/pi-qdash",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Pi extension for querying QDash via @oqtopus-team/qdash-client",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "Apache-2.0",
|
|
7
|
+
"author": "OQTOPUS Team <oqtopus-team@googlegroups.com>",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/oqtopus-team/pi-qdash.git"
|
|
11
|
+
},
|
|
12
|
+
"homepage": "https://github.com/oqtopus-team/pi-qdash#readme",
|
|
13
|
+
"bugs": "https://github.com/oqtopus-team/pi-qdash/issues",
|
|
14
|
+
"keywords": [
|
|
15
|
+
"pi-package",
|
|
16
|
+
"pi-extension",
|
|
17
|
+
"qdash"
|
|
18
|
+
],
|
|
19
|
+
"files": [
|
|
20
|
+
"extensions",
|
|
21
|
+
"skills"
|
|
22
|
+
],
|
|
23
|
+
"publishConfig": {
|
|
24
|
+
"access": "public"
|
|
25
|
+
},
|
|
26
|
+
"dependencies": {
|
|
27
|
+
"@oqtopus-team/qdash-client": "^0.1.3"
|
|
28
|
+
},
|
|
29
|
+
"peerDependencies": {
|
|
30
|
+
"@earendil-works/pi-coding-agent": "*",
|
|
31
|
+
"typebox": "*"
|
|
32
|
+
},
|
|
33
|
+
"pi": {
|
|
34
|
+
"extensions": [
|
|
35
|
+
"./extensions/qdash.ts"
|
|
36
|
+
],
|
|
37
|
+
"skills": [
|
|
38
|
+
"./skills"
|
|
39
|
+
]
|
|
40
|
+
},
|
|
41
|
+
"scripts": {
|
|
42
|
+
"check": "tsc --noEmit"
|
|
43
|
+
},
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"@earendil-works/pi-coding-agent": "^0.74.0",
|
|
46
|
+
"typebox": "^1.0.55",
|
|
47
|
+
"typescript": "^5.8.0"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: qdash
|
|
3
|
+
description: Query a running QDash instance from pi via the pi-qdash extension and @oqtopus-team/qdash-client. Use when inspecting chips, metrics, task results, tasks, projects, files, flows, executions, forum posts, provenance, or QDash profile/configuration.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# QDash
|
|
7
|
+
|
|
8
|
+
Use the pi-qdash tools instead of scraping the UI or hand-writing auth headers.
|
|
9
|
+
|
|
10
|
+
## Preferred tools
|
|
11
|
+
|
|
12
|
+
1. `qdash_config_info` — check profile names and non-secret connection settings.
|
|
13
|
+
2. Prefer dedicated read-only tools when they match the task:
|
|
14
|
+
- `qdash_list_chips`, `qdash_get_default_chip`
|
|
15
|
+
- `qdash_get_chip_metrics`, `qdash_list_chip_qubits`, `qdash_list_chip_couplings`
|
|
16
|
+
- `qdash_list_cryostats`, `qdash_list_cooldowns`
|
|
17
|
+
- `qdash_get_cooldown_wiring`, `qdash_wiring_insights`, `qdash_list_cooldown_wiring_events`
|
|
18
|
+
- `qdash_get_timeseries`, `qdash_plot_timeseries`
|
|
19
|
+
- `qdash_list_task_results`, `qdash_get_task_result`
|
|
20
|
+
- `qdash_list_issues`
|
|
21
|
+
- `qdash_list_flows`, `qdash_get_flow`
|
|
22
|
+
- `qdash_list_executions`, `qdash_get_execution`
|
|
23
|
+
- `qdash_list_ai_reviews`, `qdash_get_provenance_stats`
|
|
24
|
+
- `qdash_list_forum_posts`, `qdash_get_forum_post`, `qdash_list_forum_replies`
|
|
25
|
+
- `qdash_get_figure`, `qdash_get_task_figures`, `qdash_recent_calibration_figure`
|
|
26
|
+
- `qdash_create_forum_evidence_reply` for confirmed evidence curation replies with visible task figures
|
|
27
|
+
3. Use harness overview tools for status and triage:
|
|
28
|
+
- `qdash_investigate` for natural-language requests to investigate or compare recent calibration, target history, figures, failures, issues, and Forum context
|
|
29
|
+
- `qdash_compare_calibration` for read-only before/after comparison of repeated target calibration results
|
|
30
|
+
- `qdash_dashboard`
|
|
31
|
+
- `qdash_dashboard_insights`
|
|
32
|
+
- `qdash_recent_calibration_summary`
|
|
33
|
+
- `qdash_recommend_next_action`
|
|
34
|
+
- `qdash_triage_overview`
|
|
35
|
+
4. Use agent calibration workflow tools when the user explicitly wants an agent workflow:
|
|
36
|
+
- `qdash_create_agent_session`
|
|
37
|
+
- `qdash_get_agent_session`
|
|
38
|
+
- `qdash_submit_agent_action`
|
|
39
|
+
- `qdash_get_agent_action`, `qdash_list_agent_actions`, `qdash_wait_agent_action`
|
|
40
|
+
- `qdash_list_agent_action_candidates`
|
|
41
|
+
- `qdash_execute_agent_action`
|
|
42
|
+
- `qdash_commit_agent_candidate`, `qdash_commit_agent_campaign_candidates`
|
|
43
|
+
- `qdash_get_agent_candidate_commit`, `qdash_apply_agent_candidate_commit`, `qdash_wait_agent_candidate_apply`
|
|
44
|
+
5. Use `qdash_query` for common read-only QDash operations not covered by a dedicated tool:
|
|
45
|
+
- `chips`, `default_chip`, `metrics_config`, `chip_metrics`
|
|
46
|
+
- `chip_qubits`, `chip_qubit`, `chip_couplings`, `chip_coupling`
|
|
47
|
+
- `cryostats`, `cryostat`, `cooldowns`, `cooldown`, `cooldown_wiring_events`
|
|
48
|
+
- `timeseries`, `task_results`, `task_result`, `task_note`, `task_result_issues`
|
|
49
|
+
- `qubit_latest`, `qubit_history`, `coupling_latest`, `coupling_history`
|
|
50
|
+
- `tasks`, `task_knowledge`, `task_knowledge_markdown`
|
|
51
|
+
- `projects`, `project`, `files_tree`, `file_content`, `git_status`
|
|
52
|
+
- `issues`, `issue_knowledge`
|
|
53
|
+
- `flows`, `flow`, `flow_templates`, `flow_template`, `flow_helper_files`, `flow_helper_file`
|
|
54
|
+
- `executions`, `execution`, `ai_reviews`, `ai_review_runs`, `ai_review_run`
|
|
55
|
+
- `forum_posts`, `provenance_stats`, `provenance_history`, `provenance_changes`, `provenance_lineage`, `provenance_impact`
|
|
56
|
+
6. `qdash_raw_get` — read-only GET endpoints not covered by `qdash_query`.
|
|
57
|
+
|
|
58
|
+
## Session context
|
|
59
|
+
|
|
60
|
+
Use these commands to make pi behave like a QDash-specific harness with persistent session-local context:
|
|
61
|
+
|
|
62
|
+
```text
|
|
63
|
+
/qdash-use-profile <profile>
|
|
64
|
+
/qdash-use-chip [chip_id]
|
|
65
|
+
/qdash-use-target qid <qid> | coupling <coupling_id>
|
|
66
|
+
/qdash-use-agent-session <session_id>
|
|
67
|
+
/qdash-context
|
|
68
|
+
/qdash-dashboard [limit]
|
|
69
|
+
/qdash-wiring-insights
|
|
70
|
+
/qdash-refresh [limit]
|
|
71
|
+
/qdash-clear-context
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Prefer the current context when the user has already selected a profile/chip/session. Tools use that context when parameters are omitted.
|
|
75
|
+
|
|
76
|
+
For cryostat wiring requests, start with `qdash_get_cooldown_wiring`. Pass `cooldownId` when the user names one; otherwise pass `cryoId`, or omit both to resolve the active/newest cooldown from the current/default chip. Prefer the compact `wiring.markdown`; request raw blocks only when structural or embedded BlockNote data is necessary, and request history when investigating wiring changes. Set `includeInsights` or call `qdash_wiring_insights` when the user asks what is characteristic, unusual, or worth checking in attenuation; summarize control/readout totals and affected qubits/MUXes instead of dumping the raw table.
|
|
77
|
+
|
|
78
|
+
## Configuration
|
|
79
|
+
|
|
80
|
+
The extension uses `@oqtopus-team/qdash-client` and supports:
|
|
81
|
+
|
|
82
|
+
- `QDASH_*` environment variables (`QDASH_BASE_URL`, `QDASH_API_TOKEN`, `QDASH_PROJECT_ID`, etc.)
|
|
83
|
+
- `$XDG_CONFIG_HOME/qdash/config.ini`
|
|
84
|
+
- `~/.config/qdash/config.ini`
|
|
85
|
+
- explicit `profile` / `configPath` parameters
|
|
86
|
+
|
|
87
|
+
If `QDASH_BASE_URL` is set and no profile is specified, the tools default to environment variables. Otherwise they use profile `default`.
|
|
88
|
+
|
|
89
|
+
## Evidence curation workflow
|
|
90
|
+
|
|
91
|
+
When the user wants to preserve an investigated observation in QDash forum/notes:
|
|
92
|
+
|
|
93
|
+
1. Inspect the task result, task figure, timeseries/history, and related forum context first.
|
|
94
|
+
2. Summarize the observation as evidence, not as an automatic calibration decision.
|
|
95
|
+
3. Prefer replying to an existing target/coupling forum thread when one exists.
|
|
96
|
+
4. Use `qdash_create_forum_evidence_reply` for task-result evidence so figures are embedded as QDash UI image blocks (`/api/executions/figure?path=...`) and visible in the forum.
|
|
97
|
+
5. Include task and execution QDash Web URLs in the reply.
|
|
98
|
+
6. When mentioning history or trends, include links to representative historical task results.
|
|
99
|
+
7. Mark agent-authored evidence with a footer such as `— 🤖 by pi-qdash`.
|
|
100
|
+
8. Ask for confirmation before creating/updating the forum post.
|
|
101
|
+
|
|
102
|
+
## Safety
|
|
103
|
+
|
|
104
|
+
- Never print tokens, passwords, Cloudflare Access secrets, or full profile contents.
|
|
105
|
+
- Treat write/operational endpoints (agent session/action creation, candidate commits, forum create/update, flow execute, git push/pull, re-execute, admin/auth APIs) as sensitive and ask the user before any write workflow.
|
|
106
|
+
- Write-oriented QDash tools are approval-gated. In interactive pi, let the extension prompt for confirmation. In non-interactive runs, set `confirmWrite: true` only after explicit user confirmation.
|
|
107
|
+
- Use `qdash_investigate` for natural-language requests to investigate, compare, or understand a target or recent calibration; it is read-only and combines recent results with target, Forum, issue, and recommendation context.
|
|
108
|
+
- Use `qdash_compare_calibration` when the user asks what changed between recent calibration experiments; treat differences as evidence, not automatic approval to commit/apply parameters.
|
|
109
|
+
- Use `qdash_recent_calibration_figure` when the user asks to see recent experiment images without a task ID.
|
|
110
|
+
- Prefer summarizing large responses with counts, IDs, time ranges, and notable values.
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: qdash-calibration
|
|
3
|
+
description: Guide conservative autonomous QDash calibration workflows from pi. Use when the user asks to calibrate, tune, recover failed calibration tasks, run agent calibration sessions, or decide the next calibration action for qubits/couplings.
|
|
4
|
+
license: Apache-2.0
|
|
5
|
+
compatibility: pi-coding-agent >=0.74, pi-qdash extension, QDash agent-session APIs
|
|
6
|
+
metadata:
|
|
7
|
+
domain: quantum-calibration
|
|
8
|
+
owner: pi-qdash
|
|
9
|
+
maturity: experimental
|
|
10
|
+
safety_level: operational-write-gated
|
|
11
|
+
default_mode: one-target-one-action
|
|
12
|
+
source_of_truth: pi-qdash skill until QDash task-knowledge operation is finalized
|
|
13
|
+
preferred_qubit_recovery_recipe: CheckRabi -> CheckChevron -> Configure -> CheckRabi
|
|
14
|
+
requires_confirmation_for:
|
|
15
|
+
- agent session creation
|
|
16
|
+
- task execution
|
|
17
|
+
- parameter commit
|
|
18
|
+
- backend apply
|
|
19
|
+
related_qdash_tasks:
|
|
20
|
+
- CheckRabi
|
|
21
|
+
- CheckChevron
|
|
22
|
+
- Configure
|
|
23
|
+
- CheckReadoutFrequency
|
|
24
|
+
- ReadoutClassification
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
# QDash Calibration Agent
|
|
28
|
+
|
|
29
|
+
This skill defines how pi should behave as a conservative calibration agent. It is operational guidance for the agent; long-lived physics/task knowledge may later move to QDash task-knowledge, but until that process is settled, keep practical calibration recipes here.
|
|
30
|
+
|
|
31
|
+
## Core principles
|
|
32
|
+
|
|
33
|
+
- Work one target at a time: one qubit or one coupling per action/session when possible.
|
|
34
|
+
- Diagnose before changing parameters.
|
|
35
|
+
- Prefer read-only inspection first: dashboard, failed task results, history, figures, forum posts, and task knowledge when available.
|
|
36
|
+
- Use narrow agent session policies with the smallest allowed task/action/parameter scope.
|
|
37
|
+
- Do not commit or apply parameter candidates until a validation task succeeds and the user explicitly confirms.
|
|
38
|
+
- Avoid blind parameter sweeps. If two conservative probes fail, step back to a diagnostic task.
|
|
39
|
+
- Record useful lessons as task-knowledge cases or as updates to this skill.
|
|
40
|
+
|
|
41
|
+
## Standard workflow
|
|
42
|
+
|
|
43
|
+
1. Establish context:
|
|
44
|
+
- profile and chip
|
|
45
|
+
- failed task(s)
|
|
46
|
+
- qid/coupling_id
|
|
47
|
+
- recent executions and open forum/issue context
|
|
48
|
+
2. Read evidence:
|
|
49
|
+
- `qdash_list_task_results`
|
|
50
|
+
- `qdash_get_task_result`
|
|
51
|
+
- `qdash_get_task_figures` when figures exist
|
|
52
|
+
- forum posts for the target when relevant
|
|
53
|
+
3. Make a one-step plan.
|
|
54
|
+
4. Ask for confirmation before write/operational actions.
|
|
55
|
+
5. Create a scoped agent session.
|
|
56
|
+
6. Run one action.
|
|
57
|
+
7. Inspect the result.
|
|
58
|
+
8. Continue only if the next step is clearly supported.
|
|
59
|
+
|
|
60
|
+
## Qubit recovery rules
|
|
61
|
+
|
|
62
|
+
### CheckRabi returns non-finite frequency, NaN, or low R²
|
|
63
|
+
|
|
64
|
+
Do not repeatedly perturb `control_amplitude`, `readout_amplitude`, or `shots` without diagnosis.
|
|
65
|
+
|
|
66
|
+
Canonical recovery sequence:
|
|
67
|
+
|
|
68
|
+
```text
|
|
69
|
+
CheckRabi -> CheckChevron -> Configure -> CheckRabi
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Recommended sequence:
|
|
73
|
+
|
|
74
|
+
1. Inspect the failed `CheckRabi` result, recent history, and figures.
|
|
75
|
+
2. Run `CheckChevron` on the same qid.
|
|
76
|
+
3. If `CheckChevron` completes and gives plausible `qubit_frequency` and `control_amplitude`, run `Configure` to refresh backend/box configuration with the current calibration context.
|
|
77
|
+
4. Retry `CheckRabi` with the `CheckChevron` estimates as non-committing overrides.
|
|
78
|
+
5. If successful, inspect candidates and only then consider committing/applying parameters with explicit user confirmation.
|
|
79
|
+
6. If still failing after `Configure`, request human review and inspect raw/figure data.
|
|
80
|
+
|
|
81
|
+
Known successful pattern:
|
|
82
|
+
|
|
83
|
+
- Q33 on mackerel / `144Qv1`, 2026-07-14:
|
|
84
|
+
- repeated `CheckRabi` failures with `non-finite frequency: nan`
|
|
85
|
+
- `CheckChevron` succeeded and estimated:
|
|
86
|
+
- `qubit_frequency = 4.186021437949582 GHz`
|
|
87
|
+
- `control_amplitude = 0.196626929963469 a.u.`
|
|
88
|
+
- `Configure` completed
|
|
89
|
+
- `CheckRabi` then completed with the CheckChevron estimates:
|
|
90
|
+
- `rabi_frequency = 12.664970037417886 MHz`
|
|
91
|
+
- `control_amplitude = 0.19406572753680693 a.u.`
|
|
92
|
+
|
|
93
|
+
### CheckChevron interpretation and suggestions
|
|
94
|
+
|
|
95
|
+
If `CheckChevron` completes:
|
|
96
|
+
|
|
97
|
+
- Clear vertex/fringes: use estimated `qubit_frequency` and `control_amplitude`, then run `Configure -> CheckRabi` for validation.
|
|
98
|
+
- Faint fringes: suspect insufficient drive, readout fidelity, or initialization/readout contrast; suggest readout diagnostics before parameter commits.
|
|
99
|
+
- No visible chevron: inspect readout path first (`CheckReadoutFrequency`, `ReadoutClassification`) or request human review.
|
|
100
|
+
- Asymmetric/double chevron: suspect TLS, higher-level transitions, AC Stark shift, or frequency collision; avoid committing simple Rabi outputs without review.
|
|
101
|
+
|
|
102
|
+
If `CheckChevron` fails:
|
|
103
|
+
|
|
104
|
+
1. Stop the autonomous recovery path. Do not continue to `Configure -> CheckRabi` automatically.
|
|
105
|
+
2. Inspect and show the figures with `qdash_get_task_figures`.
|
|
106
|
+
3. Classify the failure message and input/output parameters.
|
|
107
|
+
4. Suggest the next diagnostic, but require user confirmation before another operational action.
|
|
108
|
+
|
|
109
|
+
Common failed-Chevron suggestions:
|
|
110
|
+
|
|
111
|
+
- `Qubit frequency too low/high`, boundary hit, or fitted frequency outside normal operating range:
|
|
112
|
+
- Treat the Chevron estimate as unsafe.
|
|
113
|
+
- Do not commit/apply candidates.
|
|
114
|
+
- Do not run `Configure -> CheckRabi` from this estimate.
|
|
115
|
+
- Suggest `CheckQubitSpectroscopy`, coarse frequency search review, or human figure review.
|
|
116
|
+
- Abnormally large `coarse_control_amplitude`:
|
|
117
|
+
- Suspect the coarse search latched onto a wrong transition, poor readout contrast, or an invalid operating point.
|
|
118
|
+
- Suggest spectroscopy/readout diagnostics rather than stronger drive.
|
|
119
|
+
- Failed fit but visually plausible chevron:
|
|
120
|
+
- Ask the user to inspect figures.
|
|
121
|
+
- Consider adjusted scan bounds only with explicit user guidance.
|
|
122
|
+
- Faint/washed-out chevron:
|
|
123
|
+
- Suggest `ReadoutClassification`, `CheckReadoutFrequency`, and initialization/readout checks.
|
|
124
|
+
|
|
125
|
+
Known failed pattern:
|
|
126
|
+
|
|
127
|
+
- Q35 on mackerel / `144Qv1`, 2026-07-14:
|
|
128
|
+
- repeated `CheckRabi` failures with `non-finite frequency: nan`
|
|
129
|
+
- `CheckChevron` failed with `Qubit frequency too low for qid=35: 2.759894 GHz < 3.0 GHz`
|
|
130
|
+
- input `coarse_qubit_frequency = 2.894185298591617 GHz`
|
|
131
|
+
- input `coarse_control_amplitude = 0.5623413251903492 a.u.`
|
|
132
|
+
- Suggested action: stop, inspect figures, and investigate spectroscopy/coarse frequency/readout state before any Configure/Rabi retry.
|
|
133
|
+
|
|
134
|
+
### CheckT2Echo failures
|
|
135
|
+
|
|
136
|
+
- Compare with recent `CheckT1` and `CheckRamsey`.
|
|
137
|
+
- If `T2_echo` is much shorter than `2*T1`, suspect noise/refocusing issues.
|
|
138
|
+
- Verify π/π/2 pulses before treating echo as a pure coherence problem.
|
|
139
|
+
|
|
140
|
+
## Coupling / two-qubit recovery rules
|
|
141
|
+
|
|
142
|
+
For `ZX90InterleavedRandomizedBenchmarking` or two-qubit validation failures, do not rerun RB first. Walk back through prerequisites:
|
|
143
|
+
|
|
144
|
+
1. `CheckCrossResonance`
|
|
145
|
+
2. `CreateZX90`
|
|
146
|
+
3. `CheckZX90`
|
|
147
|
+
4. `CheckBellState`
|
|
148
|
+
5. `CheckBellStateTomography`
|
|
149
|
+
6. then RB validation
|
|
150
|
+
|
|
151
|
+
If CR rotation is weak, inspect qubit detuning/frequency collisions and coupling history before increasing CR amplitude.
|
|
152
|
+
|
|
153
|
+
## Session policy guidelines
|
|
154
|
+
|
|
155
|
+
For diagnostic-only actions:
|
|
156
|
+
|
|
157
|
+
- `allowed_actions`: `run_task`, `request_human`, `complete_session`
|
|
158
|
+
- `allow_reconfigure`: `false`, except sessions explicitly intended to run `Configure`
|
|
159
|
+
- `max_actions`: small, typically 3–6
|
|
160
|
+
|
|
161
|
+
For `CheckRabi` after `CheckChevron`, allow only the specific qid and bounded overrides:
|
|
162
|
+
|
|
163
|
+
- `qubit_frequency`: narrow GHz range around the Chevron estimate
|
|
164
|
+
- `control_amplitude`: conservative range around the Chevron estimate
|
|
165
|
+
|
|
166
|
+
Do not include broad parameter ranges unless the user explicitly requests exploratory calibration.
|
|
167
|
+
|
|
168
|
+
## Commit/apply rules
|
|
169
|
+
|
|
170
|
+
- Listing candidates is read-only and encouraged after a successful task.
|
|
171
|
+
- Commit/apply requires explicit user confirmation.
|
|
172
|
+
- Prefer validating with the downstream check task before committing.
|
|
173
|
+
- Never apply candidates from a failed authoritative task.
|
|
174
|
+
|
|
175
|
+
## When to stop
|
|
176
|
+
|
|
177
|
+
Stop and request human review when:
|
|
178
|
+
|
|
179
|
+
- two diagnostic tasks disagree strongly
|
|
180
|
+
- the same target fails after `CheckChevron` and `Configure`
|
|
181
|
+
- figures suggest TLS, frequency collision, leakage, or multi-level behavior
|
|
182
|
+
- the next action would require broad parameter sweeps or hardware-risky changes
|