Index
Entropy-guided search tree visualizer.
Public API
- :func:
build_entropy_trace-- run the compilation pipeline and return an :class:EntropyTraceBundlewrapping the Rust solver's entropy trace. - :class:
TreeFrameState, :class:TreeStateReducer-- frame-level state derived from a trace for rendering. - :func:
run-- CLI entry point (also accessible viapython -m bloqade.lanes.visualize.entropy_tree).
EntropyTraceBundle
dataclass
EntropyTraceBundle(
steps: tuple[TreeTraceStep, ...],
root_node_id: int,
best_buffer_size: int,
arch_spec: Any,
traced_target: dict[int, LocationAddress],
blocked_locations: tuple[LocationAddress, ...],
local_to_global_qid: dict[int, int],
location_to_global_qid: dict[LocationAddress, int],
kernel_name: str,
executed_cz_count: int,
)
Trace plus the metadata the visualizer needs alongside it.
TreeStateReducer
TreeStateReducer(
steps: tuple[TreeTraceStep, ...] | list[TreeTraceStep],
root_node_id: int,
best_buffer_size: int = 2,
)
Converts trace events into renderable tree frames.
Source code in .venv/lib/python3.12/site-packages/bloqade/lanes/visualize/entropy_tree/state.py
102 103 104 105 106 107 108 109 110 111 112 113 | |
build_entropy_trace
build_entropy_trace(
*,
kernel: Any,
kernel_name: str,
layer_index: int = 0,
max_expansions: int | None = 1000,
max_goal_candidates: int | None = None
) -> EntropyTraceBundle
Run the compilation pipeline and capture an entropy trace for layer_index.
Drives the full squin->move pipeline with a RustPlacementTraversal
configured to collect an entropy trace. Returns all the state the
visualizer needs to render the trace.
Source code in .venv/lib/python3.12/site-packages/bloqade/lanes/visualize/entropy_tree/tracer.py
126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 | |