HomeQuantum PhysicsQubit Routing: SWAP Networks on a Coupling Graph

Qubit Routing: SWAP Networks on a Coupling Graph

Interactive 3D quantum-compiler simulator: watch a compiler route two-qubit gates onto a limited hardware coupling graph, inserting SWAP chains to bring distant logical qubits adjacent before every interaction.

Quantum Physics3DAdvanced60 FPS📱 Mobile-adapted⇄ 2D version
qe-topic-56 ↗ Open standalone

Real quantum hardware only wires each qubit to a few physical neighbours, so a quantum-development platform's compiler has to route every two-qubit gate in a logical circuit onto that limited connectivity before it can run. This simulator renders a physical qubit grid as a 3D coupling graph and replays a randomly generated circuit of CNOT gates, using breadth-first search to find the shortest path between the current physical locations of each gate's two logical qubits and inserting the minimal SWAP chain to bring them adjacent. Node colours track individual logical qubits as they drift across the physical lattice, and live counters report gates executed, SWAPs inserted, and the resulting SWAP-per-gate overhead — the exact cost metric quantum compilers such as Qiskit's and Cirq's routing passes are built to minimise.

⚙ Under the hood

Watch a quantum compiler route two-qubit gates onto a limited hardware coupling graph, inserting SWAP chains via breadth-first search to bring distant logical qubits adjacent before every interaction.

quantum computingqubit routingSWAP gatesquantum compilercoupling graph

3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)