Computing Library › Quantum Logic Gates
Quantum Logic Gates

Canonical Two-Qubit Gate

The three-parameter entangling core that every two-qubit gate reduces to once local rotations are stripped away.

Definition

The canonical gate CAN(tx, ty, tz) = exp(-i (π/2)(tx X⊗X + ty Y⊗Y + tz Z⊗Z)) is the pure entangling part of any two-qubit unitary. Three real coordinates fully describe it, and every two-qubit gate equals some canonical gate sandwiched between single-qubit gates.

Matrix form

Kronos motion — three machines

Because the three Ising generators commute, the canonical gate factors as CAN = RXX(θx)·RYY(θy)·RZZ(θz) with the angles proportional to the coordinates. Its 4×4 matrix is block-structured: the {00,11} pair and the {01,10} pair each get a 2×2 rotation-and-phase built from the three coordinates.

Canonical generator directions
txX⊗X weighttyY⊗Y weighttzZ⊗Z weight

Naming familiar gates

Why it is useful

The canonical form gives a hardware-independent name to every two-qubit gate. Two gates with the same coordinates are locally equivalent and interchangeable up to single-qubit dressing, so a compiler can match any requested gate to the nearest native entangler by comparing coordinates. See KAK decomposition.

python
import numpy as np
# canonical coordinates of common gates (in units of pi/2 weight)
coords = {'CNOT':(0.5,0,0),'iSWAP':(0.5,0.5,0),
          'SWAP':(0.5,0.5,0.5),'sqrt_iSWAP':(0.25,0.25,0)}

The set of distinct canonical coordinates, after accounting for symmetries, is the Weyl chamber. See Weyl chamber.