uniqc.visualization.circuit_render.svg module¶
SVG primitives and the main graphical renderer.
The drawing pipeline is two-stage: build_primitives() emits
style-agnostic geometric primitives in logical coordinates (x = time axis,
y = wire axis); serialize_svg() maps them to SVG text, handling the
optional vertical orientation (transpose) and scale. Keeping these separate
is what lets the matplotlib backend (mpl/png) reuse the exact same drawing.
- class uniqc.visualization.circuit_render.svg.RenderMeta[source]¶
Bases:
dictRender statistics (column count, band count, style).
- uniqc.visualization.circuit_render.svg.build_primitives(draw, opts)[source]¶
Lay out draw and emit drawing primitives; returns (prims, W, H, meta, style).