Skip to content

bloqade.stim.passes.squin_to_stim.SquinToStimPass

← Module overview

classSquinToStimPasssource

bloqade.stim.passes.squin_to_stim.SquinToStimPass

Bases: Pass

Lower a squin kernel into the STIM dialect.

class SquinToStimPass(insert_ticks: bool = False)

Parameters

NameTypeDefaultDescription
insert_ticksboolFalse

Attributes

NameTypeDefaultDescription
insert_ticksboolFalseInsert a ``TICK`` after every gate, reset, measurement, and noise operation so the emitted Stim circuit preserves the authored execution-order layering (one moment per step) instead of being ASAP-packed when rendered as a diagram. ``TICK`` is a timing-only annotation, so enabling this does not change measurement-record or detector/observable indexing. Default off to keep existing Stim output unchanged.

methodunsafe_runsource

bloqade.stim.passes.squin_to_stim.SquinToStimPass.unsafe_run

def unsafe_run(mt: Method) -> RewriteResult

Run the squin-to-stim lowering rewrites in place on mt.

Parameters

NameTypeDescription
mtMethod

Returns

RewriteResult

source