Building Stim Circuits
What This Skill Is For
Use this skill when a task needs a concrete stabilizer-circuit workflow:
- build or inspect a
Stimcircuit, - compile a detector model,
- sample trajectories,
- package circuit outputs into repo artifacts.
When To Use It Versus Alternatives
Use this skill when the workload is naturally low-level and Stim is the right primary backend.
Prefer future surface-sim workflows when the task is centered on structured logical-gate sequences, layout-aware surface-code operations, or user-facing logical-circuit construction rather than low-level circuit inspection.
Do not treat Stim .dem files as the universal internal representation. Use them as one artifact family among several.
Required Artifacts And Assumptions
Expected inputs:
- a code or workload description,
- an explicit noise model or a statement that noiseless construction is intended,
- the target artifact family to export or inspect.
Expected outputs:
CircuitBundle,- optional
DetectorModelBundle, - optional
TrajectoryBundle.
Assumptions to make explicit:
- which code family is being studied,
- whether the requested noise model is code-capacity-like, phenomenological, or circuit-level,
- whether graphlike detector models are required,
- whether observables and detector indexing need stable naming,
- whether downstream decoder compatibility matters immediately.