Run the 3-check validation gate before reporting. Use when: finishing a simulation study, checking convergence, verifying sanity checks, comparing to literature, preparing to write the final report. Enforces the AGENTS.md validation checklist.
All three checks must pass before reporting. Work through them in order.
Verify the simulation against known limiting cases, conservation laws, or analytic results.
Common sanity checks for cQED simulations:
| Check | How |
|---|---|
| Zero drive → no state change | Run simulation with all drives set to zero amplitude; verify initial state is preserved |
| Known analytic limit | Compare to textbook results in appropriate limits (e.g., Jaynes-Cummings for weak coupling) |
| Unitarity | For closed-system sims, verify norm(final_state) ≈ 1 or det(propagator) ≈ 1 |
| Energy conservation | For time-independent Hamiltonians, check ⟨H⟩ is constant |
| Symmetry | If the system has a known symmetry, verify the simulation respects it |
Action: Write a sanity-check script in studies/<study_name>/scripts/ that runs these tests and prints PASS/FAIL for each.
Confirm results are stable with respect to numerical parameters.
Parameters to sweep:
| Parameter | Method |
|---|---|
| Hilbert space dimension | Double N_transmon and N_storage; check fidelity change < threshold |
Time steps (nsteps) | Double step count; check fidelity change < threshold |
| Optimization iterations | Run additional iterations; confirm cost function is plateaued |
Procedure:
| Parameter | Baseline | Doubled | Δ Fidelity | Converged? |
|------------------|----------|---------|------------|------------|
| N_storage | 20 | 40 | 1.2e-5 | ✓ |
| N_transmon | 4 | 8 | 3.1e-6 | ✓ |
| nsteps | 1000 | 2000 | 8.7e-7 | ✓ |
studies/<study_name>/data/convergence/.studies/<study_name>/figures/.For REP-class studies or any study with published benchmarks:
| Quantity | Published | Simulated | Error |
|----------|-----------|-----------|--------|
| χ/2π | -1.5 MHz | -1.48 MHz | 1.3% |
| T_gate | 250 ns | 248 ns | 0.8% |
Update the study README with the validation status:
## Validation
- [x] Sanity checks — PASSED (see scripts/sanity_checks.py)
- [x] Convergence — PASSED (see data/convergence/, figures/convergence_*.png)
- [x] Literature comparison — PASSED (see figures/literature_comparison.png)
Before proceeding to the report, verify that key results are saved as machine-readable artifacts:
artifacts/ directory exists with at least one file (JSON, NPZ, or CSV).study_name, date_created, description.Saved Artifacts subsection can inventory the files cleanly. If a file cannot be described in one sentence, it is probably not ready for handoff.Before marking the study COMPLETE, verify:
scripts/reproducibility_notebook.ipynb exists and is a valid Jupyter notebook.This check is required by AGENTS.md. See the Reproducibility Requirements section for full details.
Only proceed to report writing (Step 5) when all applicable checks show [x] and artifacts are saved.
Do not mark a study COMPLETE if the README ## Validation section is missing, unchecked, or disconnected from the actual evidence in data/, figures/, and artifacts/.