WARNING: This project is in a very early state! Main tools are usable (see the list of features below), but may be buggy and/or error-prone.
Contains tools for working in the ZX-calculus, a diagrammatic language for reasoning about linear maps between two-level quantum states.
- Multiple diagram representations
- Ranked, tensorless ket-bra forms
- Graph-based forms
- Render to graphviz
- Conversion between representations
- Diagram tools
- Scalar computation
- Evaluation (based on conversion to ketbra form)
- Diagram composition/tensoring (partial: untested)
- Diagram simplification (graph-based only)
- ZX rewrite rules
- Z/X/HH identity removal
- Spider fusion
- Hopf rule
- "H2-Hopf" rule (identical colors with intervening H-boxes)
- Spider color change
- Remove self-loops with single H-boxes
- Euler-angle expansion of an H-box between two spiders of the same color
- Color-change and fuse for Z-H-X sandwiches
- π-commute and fuse for Z-X-Z/X-Z-X sandwiches
- Heuristic-based general reduction of H-boxes via color change
- Heuristic-based general reduction of π-spiders via π-commute
- Bialgebra rule
- State/effect copying
- Equivalence of spider-states with ±π/2 phases
- ZH rewrite rules
- H-box fusion
- π-state/effect absorption
- State/effect explosion through an H-box
- H-state/effect conversion to Z-state/effect
- π Z-state/effect copying through H-boxes
- State/effect expansion of H-boxes with label 1
- H-box version of the Hopf rule
- H-box version of the bialgebra rule
- H-box averaging rule
- Multiplication rule
- H-box wire introduction rule (reversed)
- Single, exhaustive "simplify" (partial: waiting on testing with different strategies)
- Scalar computation and removal
- Equality testing via simplification
- ZX rewrite rules
- Circuits
- Basic ranked circuit representation
- Read/write OpenQASM
- Render to Graphviz
- Conversion to diagram representations
- Circuit extraction from diagrams
- Time/space optimization
- B. Coecke, "Basic ZX-calculus for students and professionals." arXiv:2303.03163
- J. van de Wetering, "ZX-calculus for the working quantum computer scientist." arXiv:2012.13966
- R. Moyard, "Introduction to the ZX-calculus." Pennylane
- H. Bombin et al., "Unifying flavors of fault tolerance with the ZX calculus." arXiv:2303.08829