Quantum Circuit Transpiler: Gate Decomposition & Depth Optimization
Interactive 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 live gate-count, depth and T-count readouts.
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 simulator renders a 4-qubit circuit in 3D — wires running left to right, gates as colored blocks and connectors — 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. Live 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 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 live gate-count, depth and T-count readouts.
3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install