| name | quon-typst-graphs |
| description | Use when plotting general Quon-language diagrams in Typst/CeTZ, including charged strings, quon bases, CNOT, teleportation, resource states, Frobenius/Hopf relations, surface tangles, or reusable Quon graph demo reports. |
Quon Typst Graphs
Overview
Use this skill to draw general Quon-language diagrams in Typst. It provides lib.typ as the public plotting library, backed by compact CeTZ assets, plus a taxonomy that maps paper examples to broader diagram families.
Quick Start
- Consult
references/quon-language-taxonomy.md when choosing which diagram family applies. When matching the original TikZ/LaTeX visual style, use the companion quon-latex-graphs skill and read ../quon-latex-graphs/references/latex-plotting-patterns.md.
- Import
lib.typ from a Typst file. Treat assets/quon.typ as the internal implementation module:
#import "skills/quon-typst-graphs/lib.typ": *
#quon-basis(kind: "Z", charge: $k$)
#cnot-quon()
#latex-quon-state(n: 3, labels: ($v_1$, $v_2$, $v_3$))
- For a general reusable example, follow
reports/quon-typst-general-demo.typ. For paper-family coverage, follow reports/quon-typst-demo.typ. For a minimal library smoke test, compile scripts/harness.typ through scripts/build-harness.py.
The module uses CeTZ @preview/cetz:0.5.2, a Typst drawing package with a TikZ-like coordinate API.
Prefer the latex-* macros when the output should visually track the Quons paper. They encode the source idioms learned by quon-latex-graphs: thick world-lines, compressed shells, dashed back arcs, four endpoint ticks, and white under-strokes at crossings.
Do not use this skill to install TeX packages or build paper PDFs. Use quon-latex-graphs for pdflatex, tlmgr, arXiv source builds, and LaTeX reference extraction.
Diagram Families
Use these families as general plotting building blocks:
- charged string grammar: charges, neutral pairs, crossings, cups, caps
- one-quon bases: X/Y/Z pairings and reflected measurements
- multi-quon states and n-quon transformations
- joint relation and transformation-basis decompositions
- Pauli lines and 1-quon Clifford generators F and G
- 2D/3D CNOT views
- Bell, GHZ, and Max resource states
- teleportation sketch
- black/white Frobenius spiders, COPY, SUM, Fourier duality, and antipode
- string-genus joint relation and Hopf relations
- surface tangles from the surface-algebra sequel
Workflow
- Pick the smallest macro that matches the intended mathematics. Prefer a semantic macro such as
#quon-basis(kind: "Y") over redrawing wires by hand.
- Keep labels mathematical, not decorative. Charges should be content such as
$k$, $-k$, or $ell$.
- Reserve label zones before placing wires: labels must not touch strands, dots, table borders, or other labels. If a label competes with a diagram, move it outside the crossing/cap/cup or widen the grid/table cell.
- Keep Typst output vector-first. Compile to PDF for delivery, and render PNG previews at 300 DPI or higher when checking screenshots or sharing raster previews.
- Use dashed strokes for hidden/back arcs and white under-strokes for over-crossings.
- Add a short caption explaining the interpretation, especially when a 2D projection stands in for a 3D isotopy.
- Validate coverage with:
python3 skills/quon-typst-graphs/scripts/check-demo-coverage.py
python3 skills/quon-typst-graphs/scripts/check-latex-fidelity.py
python3 skills/quon-typst-graphs/scripts/build-harness.py
ion validate skills/quon-typst-graphs
/private/tmp/typst-0.14.2/typst-aarch64-apple-darwin/typst compile --root . reports/quon-typst-general-demo.typ reports/quon-typst-general-demo.pdf
gs -dSAFER -dBATCH -dNOPAUSE -sDEVICE=png16m -r300 -sOutputFile=/private/tmp/quon-typst-general-demo-page-%d.png reports/quon-typst-general-demo.pdf
Inspect the rendered PNGs after compiling. If any label overlaps a strand, dot, table line, or neighboring label, revise coordinates or layout and re-render before reporting completion.
Boundaries
The diagrams are faithful schematic reproductions of the paper's diagram families, not a symbolic proof engine. For algebraic identities, cite the paper equation or section alongside the generated picture.