| name | reproducing-folded-h-magic-state-cultivation |
| description | Guides reproduction of folded-H surface-code cultivation workflows from the MSC_foldedH repo, including sample-circuit inspection, handoff runs, and boundaries around the currently supported stabilizer-based escape path. |
| version | 0.1.0 |
| author | QEC Research Skills |
| license | MIT |
| tags | ["QEC","Magic States","Cultivation","Surface Code","Folded H"] |
| dependencies | ["qec-research","reproducing-magic-state-cultivation-workflows","building-stim-circuits"] |
Reproducing Folded-H Magic-State Cultivation
What This Skill Is For
Use this skill when the task is to reproduce or adapt the MSC_foldedH workflow for folded-H surface-code cultivation:
- inspect sample cultivation circuits,
- understand the handoff-run entry point,
- adapt the workflow for stabilizer-based escape,
- compare folded-H cultivation against the earlier cultivation repo structure.
When To Use It Versus Alternatives
Use this skill when the task is specifically about folded-transversal Hadamard cultivation in the surface-code family.
Use reproducing-magic-state-cultivation-workflows when the request is about the broader cultivation pipeline rather than the folded-H specialization.
Do not use this skill for generic surface-code Stim work with no cultivation angle.
Required Artifacts And Assumptions
Expected inputs:
- whether the target is sample-circuit inspection, handoff execution, or data comparison,
- physical-noise setting,
- whether the user wants distance-3 examples or a generalized plan.
Expected outputs:
- a folded-H workflow plan,
- the relevant repo entry point,
- explicit limits of current support,
- a comparison note against the original cultivation repo when helpful.
Assumptions to make explicit:
- only stabilizer-based escape is currently supported upstream,
- much of the repo is notebook-driven,
- the HPC-oriented handoff script expects a
p value and a task number.
Standard Workflow Checklist
- Read
references/repo-structure-and-workflow.md.
- Decide whether the task starts from
sample_circuits, data, or the handoff script.
- Treat
src as the main implementation area and the notebook content as exploratory support.
- Keep folded-H specific assumptions separate from the older cultivation repo's assumptions.
- If the goal is adaptation, identify what depends on folded-transversal Hadamard specifically and what is generic cultivation infrastructure.
Validation Loop
Before closing work:
- confirm the task stays within the currently supported escape path unless explicitly extending it,
- confirm the chosen entry point is explicit,
- confirm any performance claim is tied to either
data/ outputs or a new named run,
- confirm differences from the original cultivation workflow are stated, not implied.
Common Issues And Fixes
Assuming full feature parity with the original cultivation repo
Problem: the plan assumes every earlier cultivation option already exists here.
Fix: restate the repo's narrower current support, especially the stabilizer-based escape boundary.
Notebook-only reproduction
Problem: the workflow depends entirely on notebook state.
Fix: anchor the plan around sample_circuits, src, or handoff_run_3err.py.
Hidden HPC assumptions
Problem: the handoff path is described as if it were a single local interactive run.
Fix: note the upstream script's parallelized task-number interface explicitly.
References