Skip to content

Transform

MoveToSquinBase dataclass

MoveToSquinBase(
    arch_spec: ArchSpec, *, aggressive_unroll: bool = False
)

Bases: ABC


              flowchart TD
              bloqade.lanes.transform.MoveToSquinBase[MoveToSquinBase]

              

              click bloqade.lanes.transform.MoveToSquinBase href "" "bloqade.lanes.transform.MoveToSquinBase"
            

Base class for all MoveToSquin variants.

Subclasses must implement _get_initialize_kernel, _get_noise_model, and _get_initialize_noise_kernel to control which kernels are passed to the rewrite rules.

MoveToSquinLogical dataclass

MoveToSquinLogical(
    arch_spec: ArchSpec,
    noise_model: LogicalNoiseModelABC,
    add_noise: bool = False,
    *,
    aggressive_unroll: bool = False
)

Bases: MoveToSquinBase


              flowchart TD
              bloqade.lanes.transform.MoveToSquinLogical[MoveToSquinLogical]
              bloqade.lanes.transform.MoveToSquinBase[MoveToSquinBase]

                              bloqade.lanes.transform.MoveToSquinBase --> bloqade.lanes.transform.MoveToSquinLogical
                


              click bloqade.lanes.transform.MoveToSquinLogical href "" "bloqade.lanes.transform.MoveToSquinLogical"
              click bloqade.lanes.transform.MoveToSquinBase href "" "bloqade.lanes.transform.MoveToSquinBase"
            

Rewrite pass for logical compilation.

When add_noise is False, uses the clean initialization kernel from the noise model for InsertGates to rewrite PhysicalInitialize nodes. No noise is inserted.

When add_noise is True, the clean initialization kernel is not passed to InsertGates. Instead, only InsertNoise handles initialization using the noisy kernel, and gate/move noise is inserted as well. This ensures initialization is applied exactly once — either clean or noisy, never both.

MoveToSquinPhysical dataclass

MoveToSquinPhysical(
    arch_spec: ArchSpec,
    noise_model: NoiseModelABC = None,
    *,
    aggressive_unroll: bool = False
)

Bases: MoveToSquinBase


              flowchart TD
              bloqade.lanes.transform.MoveToSquinPhysical[MoveToSquinPhysical]
              bloqade.lanes.transform.MoveToSquinBase[MoveToSquinBase]

                              bloqade.lanes.transform.MoveToSquinBase --> bloqade.lanes.transform.MoveToSquinPhysical
                


              click bloqade.lanes.transform.MoveToSquinPhysical href "" "bloqade.lanes.transform.MoveToSquinPhysical"
              click bloqade.lanes.transform.MoveToSquinBase href "" "bloqade.lanes.transform.MoveToSquinBase"
            

Rewrite pass for physical compilation.

No initialization kernel handling. Noise is inserted only when a noise model is provided.