Computing Library › Quantum Hardware
Quantum Hardware

SWAP Networks

SWAP networks move quantum states across a limited-connectivity chip so distant qubits can interact, at the cost of extra gates.

Moving states, not qubits

Physical qubits are fixed in place, but their quantum states can be moved. A SWAP gate exchanges the states of two coupled qubits. By chaining SWAPs, a compiler can bring the state of any qubit next to any other, then apply the desired two-qubit gate. A SWAP network is a planned schedule of such exchanges that realizes an algorithm's required interactions on a restricted coupling graph.

The SWAP gate

Kronos motion — quantum verdict
SWAP (basis 00,01,10,11)
1000001001000001

A SWAP decomposes into three CNOTs (or three CZs with single-qubit gates), so every SWAP costs roughly three times a single entangling gate in error and time. On some hardware a SWAP can be partly merged with an adjacent algorithmic gate to save one operation.

Structured networks

Managing the overhead

Because SWAPs dominate the extra cost of limited connectivity, compilers optimize initial qubit placement and SWAP scheduling together. For structured algorithms, purpose-built swap networks can guarantee all needed interactions with a predictable, near-optimal number of layers, which is far better than generic routing. On movable-qubit hardware, physically transporting atoms or ions can replace some SWAPs entirely.

SWAP networks are the practical bridge between the abstract, fully connected circuits programmers write and the sparse coupling maps real chips provide.