You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|**Hover labels**|`PlotConfig(hover_labels=True)`| Tensor names and bond labels appear on pointer hover (2D axes hit-test; 3D screen-space distance). Needs an **interactive** Matplotlib window. |
107
-
|**Contraction scheme**|`PlotConfig(show_contraction_scheme=True)`|**Einsum:** cumulative per-step highlights from the trace. **Other engines:** set **`contraction_scheme_by_name`**. **2D:** rounded boxes (AABB + pad); colored borders (no fill by default). **3D:** wireframe box. See **`docs/guide.md`**. |
107
+
|**Contraction scheme**|`PlotConfig(show_contraction_scheme=True)`|**Einsum:** cumulative per-step highlights from the trace. **Other engines:** set **`contraction_scheme_by_name`**. Compatible figures now add Matplotlib toggles for **Scheme**, **Playback**, and **Cost hover**; if you start with those flags off, the scheme bundle is computed lazily on first use. **2D:** rounded boxes (AABB + pad); colored borders (no fill by default). **3D:** wireframe box. See **`docs/guide.md`**. |
Copy file name to clipboardExpand all lines: docs/guide.md
+11-1Lines changed: 11 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -360,7 +360,10 @@ with **`PlotConfig(show_contraction_scheme=True)`**; **2D** rounded **`FancyBbox
360
360
axis-aligned bounding box of the tensors in that step (not per-tensor tight hulls); **later** steps
361
361
drawn **under** earlier ones; **3D** wireframes (no fill). Other engines: **`contraction_scheme_by_name`**
362
362
(each step should list the tensors you want in that hull; end with the full network if you want one
363
-
global region).
363
+
global region). When a figure has usable contraction steps, it also gets Matplotlib toggles for
364
+
**`Scheme`**, **`Playback`**, and **`Cost hover`**. If those flags start disabled in
365
+
**`PlotConfig`**, the scheme geometry, playback viewer, and cost tooltips are built lazily on the
366
+
first toggle that needs them, then reused for the rest of the figure lifetime.
364
367
365
368
<aid="toc-plotconfig"></a>
366
369
@@ -399,6 +402,8 @@ Frozen dataclass in [`src/tensor_network_viz/config.py`](../src/tensor_network_v
399
402
|`contraction_scheme_linewidth`|`None`| → **`DEFAULT_CONTRACTION_SCHEME_LINEWIDTH`** (scaled like other strokes). |
400
403
|`contraction_scheme_colors`|`None`| Cycle of colors; built-in categorical palette if unset. |
401
404
|`contraction_scheme_by_name`|`None`| Override schedule: per step, tuple of **`node.name`** strings for non-virtual tensors. |
405
+
|`contraction_playback`|`False`| Start with the step slider and **Play/Pause/Reset** visible; still requires **`show_contraction_scheme=True`** in code. |
406
+
|`contraction_scheme_cost_hover`|`False`| Show the naive dense contraction-cost tooltip when hovering a visible scheme hull. |
0 commit comments