Lean, informalized

Nielsen & Chuang · Chapter 4, Quantum circuits · p. 191

Exercise 4.37 - The Fourier matrix on two qubits as a product of five unitaries, each acting on only two basis states

The two-qubit Fourier transform as five two-level unitaries.

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 Exercise

The quantum Fourier transform FF on two qubits is the operator on ℂ4\mathbb{C}^4 whose matrix in the computational basis |0⟩,|1⟩,|2⟩,|3⟩|0\rangle, |1\rangle, |2\rangle, |3\rangle is F=12(11111i−1−i1−11−11−i−1i),F = \frac{1}{2} \begin{pmatrix} 1 & 1 & 1 & 1 \\ 1 & i & -1 & -i \\ 1 & -1 & 1 & -1 \\ 1 & -i & -1 & i \end{pmatrix},(1)✦ so that its entry in row jj and column kk, both counted from 00, is ijk/2i^{jk}/2. The exercise asks for FF as a product of two-level unitaries. The library answers with five factors.

Two-level Unitaries

A two-level unitary on ℂd\mathbb{C}^d is a unitary matrix UU for which there are two basis indices pp and qq, not necessarily distinct, such that Uij=δijwhenever i∉{p,q} or j∉{p,q}.U_{ij} = \delta_{ij} \quad \text{whenever } i \notin \{p, q\} \text{ or } j \notin \{p, q\}.(2)✦

The Five Factors

Write HpqH_{pq} for the matrix on ℂ4\mathbb{C}^4 that acts on |p⟩|p\rangle and |q⟩|q\rangle by the Hadamard matrix and fixes the other two basis states. Three of the factors are of this kind: H01=(12120012−120000100001),H_{01} = \begin{pmatrix} \tfrac{1}{\sqrt{2}} & \tfrac{1}{\sqrt{2}} & 0 & 0 \\ \tfrac{1}{\sqrt{2}} & -\tfrac{1}{\sqrt{2}} & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \end{pmatrix},(3) H23=(100001000012120012−12),H_{23} = \begin{pmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & \tfrac{1}{\sqrt{2}} & \tfrac{1}{\sqrt{2}} \\ 0 & 0 & \tfrac{1}{\sqrt{2}} & -\tfrac{1}{\sqrt{2}} \end{pmatrix},(4) and H02=(1201200100120−1200001).H_{02} = \begin{pmatrix} \tfrac{1}{\sqrt{2}} & 0 & \tfrac{1}{\sqrt{2}} & 0 \\ 0 & 1 & 0 & 0 \\ \tfrac{1}{\sqrt{2}} & 0 & -\tfrac{1}{\sqrt{2}} & 0 \\ 0 & 0 & 0 & 1 \end{pmatrix}.(5)

The factor G13G_{13} is the matrix on ℂ4\mathbb{C}^4 that acts on |1⟩|1\rangle and |3⟩|3\rangle by the Hadamard matrix with its second column multiplied by ii, and fixes |0⟩|0\rangle and |2⟩|2\rangle: G13=(10000120i200100120−i2).G_{13} = \begin{pmatrix} 1 & 0 & 0 & 0 \\ 0 & \tfrac{1}{\sqrt{2}} & 0 & \tfrac{i}{\sqrt{2}} \\ 0 & 0 & 1 & 0 \\ 0 & \tfrac{1}{\sqrt{2}} & 0 & -\tfrac{i}{\sqrt{2}} \end{pmatrix}.(6)✦

The last factor, P12P_{12}, is the permutation matrix that exchanges |1⟩|1\rangle and |2⟩|2\rangle: P12=(1000001001000001).P_{12} = \begin{pmatrix} 1 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 1 \end{pmatrix}.(7)✦

The Claim

Theorem 1. The Fourier matrix factors as F=H02G13H01H23P12,F = H_{02}\, G_{13}\, H_{01}\, H_{23}\, P_{12},(8)✦ and H02is a two-level unitary,H_{02} \ \text{is a two-level unitary},(9)✦ G13is a two-level unitary,G_{13} \ \text{is a two-level unitary},(10)✦ H01is a two-level unitary,H_{01} \ \text{is a two-level unitary},(11)✦ H23is a two-level unitary,H_{23} \ \text{is a two-level unitary},(12)✦ and P12is a two-level unitary.P_{12} \ \text{is a two-level unitary}.(13)✦

What Is Checked

The claim is stated over the Fourier matrix (1) and the five factors (3) to (7), all 4×44\times4 complex matrices given entry by entry, and over the two-level unitaries of (2). The library shows that each of the five factors is a two-level unitary, acting nontrivially only on its own pair of basis states, and that the product of the five factors in the order of (8) is the Fourier matrix.