Quantum Circuit Transpiler: Gate Decomposition & Depth Optimization
Interactive 2D quantum-circuit transpiler: watch Toffoli, SWAP and CZ gates decompose into the native H/T/T†/CNOT gate set, then a real peephole optimization pass cancel redundant adjacent gate pairs, with a live per-layer depth histogram, gate-type composition chart and pannable/zoomable circuit diagram.
Behind every quantum programming framework sits a transpiler: a compiler pass that rewrites a circuit's convenient high-level gates (Toffoli, SWAP, CZ) into the small native gate set real hardware executes, then optimizes the result. This 2D simulator renders a 4-qubit circuit diagram — wires running left to right, gates as colored boxes and connectors, fully pannable and zoomable — and lets you flip on real decomposition rules (Toffoli → 15 H/T/T†/CNOT gates, SWAP → 3 CNOTs, CZ → H-CNOT-H) and a genuine peephole optimization pass that cancels adjacent gate pairs multiplying to the identity, re-scanning to a fixed point exactly like a real compiler. A live per-layer depth histogram and gate-type composition chart sit beneath the wiring diagram, while readouts track gate count, ASAP-scheduled circuit depth, and T-count — the metric that determines fault-tolerant cost — as you toggle each stage and switch between three preset circuits.
An interactive 2D quantum-circuit transpiler that decomposes Toffoli, SWAP and CZ gates into the native H/T/T†/CNOT gate set and runs a real peephole optimization pass cancelling redundant adjacent gate pairs, with a pannable/zoomable circuit diagram, a live per-layer depth histogram and gate-type composition chart, plus gate-count, depth and T-count readouts.
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install