Quantum Circuit Simplifier: ZX-Calculus Spider Fusion
Interactive quantum-computing simulation: a real quantum circuit rendered as a ZX-calculus spider diagram in 3D. Apply the spider-fusion and identity-removal rewrite rules and watch gate count, edge count and T-count drop as the circuit is provably simplified.
This simulation explores the fundamental principles of quantum computing through a hands-on tool used in real quantum compilers: the ZX-calculus. A randomly generated quantum circuit — Hadamard, CNOT and phase gates across several wires — is redrawn as a 3D graph of colored "spiders" connected by wires, laid out by a live spring simulation. Two provably correct rewrite rules, spider fusion and identity removal, can be applied on demand: click through them and watch the spider count, edge count and T-count (the count of expensive non-Clifford phase gates) drop as the diagram — and the circuit it represents — gets smaller without changing what it computes.
This simulation allows users to explore the fundamental principles of quantum computing, including superposition and entanglement, through a hands-on interactive experience.
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install