OctoInform Beta

the paper · §I. Single-qubit gates, XY interaction, and iSWAP · §I.C, (S21)

Equation (S21): Three-iSWAP circuits for SWAP and CZ: Interleaving X\sqrt{X} pulses with three iSWAP\text{iSWAP} gates yields SWAP\text{SWAP}, and left-multiplying by iSWAP†(S⊗S)\text{iSWAP}^\dagger(S \otimes S) yields CZ\text{CZ}, up to global phase

Realizing SWAP and CZ with three-iSWAP circuits.

Hover over a blue or green term in the text, or a node in the graph, to find it in the other. Select it to read its declaration both in Lean and in words.

The setting

In quantum architectures whose native entangling operation is the iSWAP\text{iSWAP} gate, standard two-qubit operations such as SWAP\text{SWAP} and CZ\text{CZ} are compiled from sequences of iSWAP\text{iSWAP} and single-qubit gates. Because an overall unit-modulus complex factor does not change the physical action of a unitary operator, two circuits realize the same operation whenever their matrices agree up to global phase. In Quantum error correction with global control, SWAP\text{SWAP} is compiled from three iSWAP\text{iSWAP} gates interleaved with X\sqrt{X} gates, and CZ\text{CZ} is compiled by combining that sequence with phase gates and an inverse iSWAP\text{iSWAP} gate.

Gates and global phase

We order the two-qubit computational basis as |00⟩,|01⟩,|10⟩,|11⟩|00\rangle, |01\rangle, |10\rangle, |11\rangle, indexing pairs (a,b)∈{0,1}2(a, b) \in \{0, 1\}^2 by the bijection (a,b)↦2a+b(a, b) \mapsto 2a + b. The Kronecker product A⊗BA \otimes B of two 2×22 \times 2 complex matrices AA and BB is the 4×44 \times 4 complex matrix whose (2a+b,2a′+b′)(2a + b, 2a' + b') entry is Aa,a′Bb,b′A_{a,a'} B_{b,b'} for all a,b,a′,b′∈{0,1}a, b, a', b' \in \{0, 1\}.✦ We write II for the 2×22 \times 2 identity matrix, ii for the imaginary unit, and M†M^\dagger for the conjugate transpose of a complex matrix MM.

The phase gate SS and the X\sqrt{X} gate are the 2×22 \times 2 complex matrices defined in (1): S=(100i),X=((1+i)/2(1−i)/2(1−i)/2(1+i)/2).\begin{aligned} S &= \begin{pmatrix} 1 & 0 \\ 0 & i \end{pmatrix}, \\ \sqrt{X} &= \begin{pmatrix} (1 + i)/2 & (1 - i)/2 \\ (1 - i)/2 & (1 + i)/2 \end{pmatrix}. \end{aligned}(1)

In the two-qubit computational basis, the iSWAP\text{iSWAP}, SWAP\text{SWAP}, and CZ\text{CZ} gates are the 4×44 \times 4 complex matrices defined in (2): iSWAP=(100000i00i000001),SWAP=(1000001001000001),CZ=(100001000010000−1).\begin{aligned} \text{iSWAP} &= \begin{pmatrix} 1 & 0 & 0 & 0 \\ 0 & 0 & i & 0 \\ 0 & i & 0 & 0 \\ 0 & 0 & 0 & 1 \end{pmatrix}, \\ \text{SWAP} &= \begin{pmatrix} 1 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 1 \end{pmatrix}, \\ \text{CZ} &= \begin{pmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & -1 \end{pmatrix}. \end{aligned}(2)

Two complex matrices UU and VV indexed by sets mm and nn are equal up to global phase if there exists a complex scalar cc with |c|=1|c| = 1 such that U=cVU = cV.✦

The claim

Theorem. There exist complex scalars c1c_1 and c2c_2 with |c1|=|c2|=1|c_1| = |c_2| = 1 such that (I⊗X)iSWAP(X⊗I)iSWAP⋅(I⊗X)iSWAP=c1SWAP\begin{aligned} &(I \otimes \sqrt{X})\,\text{iSWAP}\,(\sqrt{X} \otimes I)\,\text{iSWAP} \\ &\quad \cdot (I \otimes \sqrt{X})\,\text{iSWAP} = c_1\,\text{SWAP} \end{aligned}(3)✦ and iSWAP†(S⊗S)(I⊗X)iSWAP⋅(X⊗I)iSWAP(I⊗X)iSWAP=c2CZ.\begin{aligned} &\text{iSWAP}^\dagger (S \otimes S)(I \otimes \sqrt{X})\,\text{iSWAP} \\ &\quad \cdot (\sqrt{X} \otimes I)\,\text{iSWAP}\,(I \otimes \sqrt{X})\,\text{iSWAP} = c_2\,\text{CZ}. \end{aligned}(4)✦

What is checked

In the Lean library, the theorem is stated over the 4×44 \times 4 complex matrices iSWAP\text{iSWAP}, SWAP\text{SWAP}, and CZ\text{CZ}, the 2×22 \times 2 complex matrices SS and X\sqrt{X}, the two-qubit Kronecker product A⊗BA \otimes B, and the relation of equality up to global phase, asserting the two circuit identities (3) and (4).