2 Constructors
Every constructor here is a thin declaration over typograph’s generic model — node-type(kind) for nodes, edge-type(preset) for wires. None needs bespoke wrapper code; see typograph’s own node-type() and edge-type() docs for the factories themselves.
2.1 Node constructors
All accept numeric (x, y) and, unless noted, label:, name:, style:.
| Constructor | Bundled appearance | Notes |
|---|---|---|
zx.z(x, y, ..) |
green circle; stadium when labelled | Z spider |
zx.x(x, y, ..) |
red circle; stadium when labelled | X spider |
zx.fock(x, y, ..) |
orange circle; stadium when labelled | Fock spider |
zx.w(x, y, .., flip: auto) |
right-pointing triangle | W node |
zx.h(x, y, ..) |
yellow square | Hadamard |
zx.mult(x, y, .., flip: auto) |
pointer/arrow | multiplier |
zx.scalar(x, y, ..) |
label only | frameless scalar |
zx.state(x, y, ..) |
right-pointing flat triangle | state generator |
zx.effect(x, y, ..) |
left-pointing flat triangle | distinct "effect" kind; flip: true factory default |
zx.map(x, y, .., flip: auto) |
trapezoid | mirrors before rotation |
state/effect are distinct kinds — independently themeable — that happen to share one visual preset in this theme, related by effect’s flip: true base style rather than by a separate shape. This is exactly the pattern typograph’s own Directional shapes and flip chapter describes: a mirror, not a rotation.
2.2 Edge constructors
| Constructor | Style |
|---|---|
zx.plain(a, b) |
the bare default stroke |
zx.pauli-z(a, b) |
green highlight |
zx.pauli-x(a, b) |
red highlight |
zx.pauli-zx(a, b) |
combined two-sided Pauli web (red/green highlight, one on each side) |
zx.ideal(a, b) |
solid purple stroke |
zx.faulty(a, b) |
dashed orange stroke |
zx.classical(a, b) |
dashed black stroke |
zx.thick(a, b) |
heavier black stroke |
Every constructor here accepts all normal typ.edge() arguments — multiple waypoints, label:, clip:, direct style overrides. The generic form remains available for a dynamically selected preset:
typ.edge(a, b, preset: "pauli-zx")Exact colours and stroke values are in the Theme reference.