Compile
compile_squin_to_move
compile_squin_to_move(
mt: Method,
no_raise: bool = True,
layout_heuristic: LayoutHeuristicABC | None = None,
placement_strategy: PlacementStrategyABC | None = None,
) -> ir.Method
Compile a physical squin kernel to the move dialect.
Source code in .venv/lib/python3.12/site-packages/bloqade/lanes/compile.py
28 29 30 31 32 33 34 35 36 37 38 39 | |
compile_squin_to_move_and_visualize
compile_squin_to_move_and_visualize(
mt: Method,
interactive: bool = True,
animated: bool = False,
no_raise: bool = True,
layout_heuristic: LayoutHeuristicABC | None = None,
placement_strategy: PlacementStrategyABC | None = None,
) -> None
Compile a physical squin kernel to moves and visualize the program.
Source code in .venv/lib/python3.12/site-packages/bloqade/lanes/compile.py
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 | |
compile_squin_to_move_best
compile_squin_to_move_best(
mt: Method,
strategies: Sequence[tuple[str, PlacementStrategyABC]],
no_raise: bool = True,
layout_heuristic: LayoutHeuristicABC | None = None,
) -> tuple[ir.Method, str]
Compile with each (label, strategy) and return the one producing
the fewest :class:move.Move events.
Ties are resolved by earliest-in-list (caller-controlled preference).
The returned label names the winning strategy.
The three intra-stage heuristics
(:class:DefaultTargetGenerator,
:class:CongestionAwareTargetGenerator,
:class:AODClusterTargetGenerator) each win on different circuit
shapes. Racing all three and keeping the best covers the per-circuit
variation without designing a meta-heuristic.
Source code in .venv/lib/python3.12/site-packages/bloqade/lanes/compile.py
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 | |
compile_to_physical_squin_noise_model
compile_to_physical_squin_noise_model(
mt: Method,
noise_model: NoiseModelABC | None = None,
no_raise: bool = True,
arch_spec=None,
layout_heuristic: LayoutHeuristicABC | None = None,
placement_strategy: PlacementStrategyABC | None = None,
) -> ir.Method
Compile a physical squin kernel to physical squin with inserted noise channels.
Source code in .venv/lib/python3.12/site-packages/bloqade/lanes/compile.py
119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 | |
compile_to_stim_program
compile_to_stim_program(
mt: Method,
noise_model: NoiseModelABC | None = None,
no_raise: bool = True,
arch_spec=None,
layout_heuristic: LayoutHeuristicABC | None = None,
placement_strategy: PlacementStrategyABC | None = None,
) -> str
Compile a physical squin kernel to a Stim program string.
Source code in .venv/lib/python3.12/site-packages/bloqade/lanes/compile.py
148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 | |