@oqtopus-team/pi-qdash 0.1.1 → 0.1.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oqtopus-team/pi-qdash",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "Pi extension for querying QDash via @oqtopus-team/qdash-client",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -22,7 +22,7 @@ Use the pi-qdash tools instead of scraping the UI or hand-writing auth headers.
22
22
  - `qdash_list_executions`, `qdash_get_execution`
23
23
  - `qdash_list_ai_reviews`, `qdash_get_provenance_stats`
24
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`
25
+ - `qdash_get_figure`, `qdash_get_task_figures`, `qdash_recent_calibration_figure`, `qdash_analyze_figure_json`
26
26
  - `qdash_create_forum_evidence_reply` for confirmed evidence curation replies with visible task figures
27
27
  3. Use harness overview tools for status and triage:
28
28
  - `qdash_investigate` for natural-language requests to investigate or compare recent calibration, target history, figures, failures, issues, and Forum context
@@ -107,4 +107,5 @@ When the user wants to preserve an investigated observation in QDash forum/notes
107
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
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
109
  - Use `qdash_recent_calibration_figure` when the user asks to see recent experiment images without a task ID.
110
+ - Use `qdash_analyze_figure_json` for read-only numeric summaries of Plotly JSON calibration figures; keep domain-specific interpretation in the matching skill.
110
111
  - Prefer summarizing large responses with counts, IDs, time ranges, and notable values.
@@ -1,6 +1,6 @@
1
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.
2
+ name: qdash-calibration-agent
3
+ description: Guide conservative confirmation-gated QDash calibration execution 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
4
  license: Apache-2.0
5
5
  compatibility: pi-coding-agent >=0.74, pi-qdash extension, QDash agent-session APIs
6
6
  metadata:
@@ -9,7 +9,7 @@ metadata:
9
9
  maturity: experimental
10
10
  safety_level: operational-write-gated
11
11
  default_mode: one-target-one-action
12
- source_of_truth: pi-qdash skill until QDash task-knowledge operation is finalized
12
+ source_of_truth: pi-qdash skills until QDash task-knowledge operation is finalized
13
13
  preferred_qubit_recovery_recipe: CheckRabi -> CheckChevron -> Configure -> CheckRabi
14
14
  requires_confirmation_for:
15
15
  - agent session creation
@@ -26,7 +26,7 @@ metadata:
26
26
 
27
27
  # QDash Calibration Agent
28
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.
29
+ This skill defines how pi should behave as a conservative, confirmation-gated calibration execution agent. It should orchestrate safe operational steps after diagnosis. Long-lived physics/task knowledge may later move to QDash task-knowledge; detailed read-only diagnosis should live in dedicated diagnosis skills.
30
30
 
31
31
  ## Core principles
32
32
 
@@ -139,6 +139,8 @@ Known failed pattern:
139
139
 
140
140
  ## Coupling / two-qubit recovery rules
141
141
 
142
+ For detailed two-qubit quality diagnosis, use the `qdash-two-qubit-calibration-diagnosis` skill. Keep this section as the conservative operational rule set.
143
+
142
144
  For `ZX90InterleavedRandomizedBenchmarking` or two-qubit validation failures, do not rerun RB first. Walk back through prerequisites:
143
145
 
144
146
  1. `CheckCrossResonance`
@@ -148,6 +150,8 @@ For `ZX90InterleavedRandomizedBenchmarking` or two-qubit validation failures, do
148
150
  5. `CheckBellStateTomography`
149
151
  6. then RB validation
150
152
 
153
+ Treat `completed` as execution status, not proof of quality. If Bell fidelity is low, IRB uncertainty is large, or coherence-limit fidelity is much higher than measured Bell/IRB fidelity, suspect ZX90 angle/phase/cancel/rotary calibration before blaming T1/T2.
154
+
151
155
  If CR rotation is weak, inspect qubit detuning/frequency collisions and coupling history before increasing CR amplitude.
152
156
 
153
157
  ## Session policy guidelines
@@ -0,0 +1,125 @@
1
+ ---
2
+ name: qdash-two-qubit-calibration-diagnosis
3
+ description: Diagnose QDash two-qubit calibration quality from CR, ZX90, Bell-state, tomography, coherence-limit, and IRB task results. Use when a coupling calibration completes but gate fidelity, Bell fidelity, or validation quality may be poor.
4
+ license: Apache-2.0
5
+ compatibility: pi-coding-agent >=0.74, pi-qdash extension
6
+ metadata:
7
+ domain: quantum-calibration
8
+ safety_level: read-only-first-write-gated
9
+ preferred_validation_chain: CheckCrossResonance -> CreateZX90 -> CheckZX90 -> CheckBellState -> CheckBellStateTomography -> ZX90InterleavedRandomizedBenchmarking
10
+ ---
11
+
12
+ # QDash Two-Qubit Calibration Diagnosis
13
+
14
+ Use this skill when investigating coupling-level calibration quality, especially when tasks are `completed` but quality may be poor.
15
+
16
+ ## Principles
17
+
18
+ - Treat `completed` as execution status, not proof of calibration quality.
19
+ - Diagnose from evidence before suggesting operational actions.
20
+ - Prefer read-only tools first: `qdash_target_report`, `qdash_list_task_results`, `qdash_get_task_result`, `qdash_analyze_figure_json`, and `qdash_get_task_figures`.
21
+ - Do not rerun RB first when validation quality is suspicious. Walk back through prerequisites.
22
+ - Do not commit or apply candidates without explicit user confirmation, and only after downstream validation.
23
+
24
+ ## Standard read-only investigation
25
+
26
+ For a coupling `cA-B`:
27
+
28
+ 1. Build context with `qdash_target_report` and recent task results for the coupling.
29
+ 2. Inspect the latest tasks in this chain:
30
+ - `CheckCrossResonance`
31
+ - `CreateZX90`
32
+ - `CheckZX90`
33
+ - `CheckBellState`
34
+ - `CheckBellStateTomography`
35
+ - `Check2QGateCoherenceLimit`
36
+ - `ZX90InterleavedRandomizedBenchmarking`
37
+ 3. Fetch task details and record:
38
+ - CR: `cr_amplitude`, `cr_phase`, `cancel_amplitude`, `cancel_phase`, `rotary_amplitude`, `zx_rotation_rate`
39
+ - ZX90: `zx90_gate_time`
40
+ - Bell tomography: `bell_state_fidelity`
41
+ - Coherence limit: `two_qubit_gate_coherence_limit`
42
+ - IRB: `zx90_gate_fidelity`, its error, `zx90_depolarizing_rate`, `n_trials`
43
+ 4. For JSON figures, use `qdash_analyze_figure_json` before manually reading raw Plotly JSON.
44
+ 5. Summarize symptoms, likely failure mode, and the next *read-only or confirmation-gated* step.
45
+
46
+ ## Interpretation rules
47
+
48
+ ### Completed but low quality
49
+
50
+ Flag as suspicious when any of these hold:
51
+
52
+ - Bell-state tomography fidelity is below ~0.8.
53
+ - IRB fidelity has a large uncertainty/error bar, or `n_trials` is small.
54
+ - Coherence-limit fidelity is high but Bell/IRB fidelity is much lower.
55
+ - `CheckZX90` repeated-pulse traces do not show a stable/consistent response.
56
+ - CR parameter generation succeeds but `cr_amplitude` is near saturation or `zx_rotation_rate` is very small.
57
+
58
+ ### Coherence limit gap
59
+
60
+ If `two_qubit_gate_coherence_limit` is high but measured Bell/IRB fidelity is low, do not attribute the issue primarily to T1/T2. Suspect control/calibration issues such as:
61
+
62
+ - ZX90 angle error
63
+ - CR phase error
64
+ - cancel-pulse amplitude/phase mismatch
65
+ - rotary compensation mismatch
66
+ - readout/classification contribution to validation figures
67
+
68
+ ### Bell tomography signals
69
+
70
+ For a Bell target resembling `( |00> + |11> ) / sqrt(2)`:
71
+
72
+ - Large `|10>` or `|01>` population suggests population/conditional-rotation error, not just dephasing.
73
+ - Weak `|00><11|` coherence suggests phase, dephasing, or preparation error.
74
+ - Large imaginary coherence can indicate phase-compensation error.
75
+
76
+ Use the heatmap summaries from `qdash_analyze_figure_json` as numeric evidence. Do not overfit a single plot; correlate with `CheckZX90` and IRB.
77
+
78
+ ### CheckZX90 repeated-pulse signals
79
+
80
+ Look for stable repeated-pulse behavior. Warnings include:
81
+
82
+ - Large scatter or non-decaying erratic points after the first few repetitions.
83
+ - Large first-step contrast followed by a non-zero offset.
84
+ - Different qualitative behavior between control and target qubit plots.
85
+
86
+ These symptoms point toward angle/phase/cancel/rotary issues and should be investigated before trusting IRB.
87
+
88
+ ### IRB caveats
89
+
90
+ - A `completed` IRB with large error bar is weak evidence.
91
+ - Small `n_trials` should be reported explicitly.
92
+ - If Bell tomography is poor, do not use IRB alone as a pass signal.
93
+
94
+ ## Recommended action sequence
95
+
96
+ When validation quality is poor:
97
+
98
+ ```text
99
+ Inspect figures/results
100
+ -> CheckCrossResonance
101
+ -> CreateZX90
102
+ -> CheckZX90
103
+ -> CheckBellState
104
+ -> CheckBellStateTomography
105
+ -> ZX90InterleavedRandomizedBenchmarking
106
+ ```
107
+
108
+ Each operational step requires explicit confirmation. Validate Bell/tomography before using IRB as the final quality signal.
109
+
110
+ ## Known case: mackerel 144Qv1 c48-50, 20260725-003
111
+
112
+ Symptoms observed:
113
+
114
+ - `CheckCrossResonance` completed with `zx_rotation_rate ~ 1.69e-3`.
115
+ - `Check2QGateCoherenceLimit` reported ~0.978.
116
+ - `CheckBellStateTomography` reported `bell_state_fidelity ~ 0.60`.
117
+ - Bell tomography had high `|10>` component/population (~0.29) and non-ideal coherence.
118
+ - `ZX90InterleavedRandomizedBenchmarking` completed with `zx90_gate_fidelity ~0.94` but large error (~0.087) and `n_trials=10`.
119
+ - `CheckZX90` repeated-pulse traces were not clean/stable.
120
+
121
+ Interpretation:
122
+
123
+ - This is not primarily coherence-limited.
124
+ - Suspect ZX90 angle/phase/cancel/rotary calibration quality.
125
+ - Prefer walking back through `CheckCrossResonance -> CreateZX90 -> CheckZX90`, then validate with Bell tomography before trusting IRB.