Lean, informalized

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

Exercise 4.45 - The matrix of a circuit as a power of 1/21/\sqrt{2} times a matrix over ℤ[i]\mathbb{Z}[i] or ℤ[ζ8]\mathbb{Z}[\zeta_8]

Gate products keep their scaled integer form.

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 unitary of a quantum circuit is the product of the matrices of its gates. Several of the standard gates are a power of 1/21/\sqrt{2} times a matrix whose entries are a+bia + bi with aa and bb integers: the Hadamard gate is 1/21/\sqrt{2} times a matrix of entries ±1\pm 1, and the phase gate diag⁡(1,i)\operatorname{diag}(1, i) needs no factor. The exercise is to show that this form survives multiplication, so that a circuit of such gates has a unitary 2−k/2M2^{-k/2} M for some natural number kk, with MM of the same kind, and that the π/8\pi/8 gate, whose matrix holds eiπ/4e^{i\pi/4}, does not have it. Circuits that use the π/8\pi/8 gate keep the form once the entries of MM may also contain the powers of eiπ/4e^{i\pi/4}.

Two Rings of Numbers

The Gaussian integers ℤ[i]\mathbb{Z}[i] are the complex numbers a+bia + bi with aa and bb integers.✦ The primitive eighth root of unity is ζ8=eiπ/4,\zeta_8 = e^{i\pi/4},(1)✦ whose square is ii. The cyclotomic integers ℤ[ζ8]\mathbb{Z}[\zeta_8] are the complex numbers p+qζ8,p,q∈ℤ[i].p + q\,\zeta_8, \qquad p, q \in \mathbb{Z}[i].(2)✦

The π/8\pi/8 Gate and the Scaled Form

The π/8\pi/8 gate TT is the gate on one qubit whose matrix in the computational basis is T=(100eiπ/4)=(100ζ8).T = \begin{pmatrix} 1 & 0 \\ 0 & e^{i\pi/4} \end{pmatrix} = \begin{pmatrix} 1 & 0 \\ 0 & \zeta_8 \end{pmatrix}.(3)✦

Let RR be a subring of the complex numbers. A complex m×nm \times n matrix UU has a scaled form over RR if there are a natural number kk and an m×nm \times n matrix MM with entries in RR such that U=(12)kM.U = \Bigl(\frac{1}{\sqrt{2}}\Bigr)^{k} M.(4)✦

The Claim

The library states the exercise as three theorems.

Theorem 1. Let U1,…,UnU_1, \dots, U_n be square complex matrices of one size, each with a scaled form over ℤ[ζ8]\mathbb{Z}[\zeta_8]. Then there are a natural number kk and a matrix MM of the same size, every entry of which is a+bζ8+cζ82+dζ83a + b\zeta_8 + c\zeta_8^2 + d\zeta_8^3 for some integers a,b,c,da, b, c, d, such that U1U2⋯Un=2−k/2M.U_1 U_2 \cdots U_n = 2^{-k/2} M.(5)✦

Theorem 2. Let U1,…,UnU_1, \dots, U_n be square complex matrices of one size, each with a scaled form over ℤ[i]\mathbb{Z}[i]. Then there are a natural number kk and a matrix MM of the same size, every entry of which is a+bia + bi for some integers aa and bb, such that U1U2⋯Un=2−k/2M.U_1 U_2 \cdots U_n = 2^{-k/2} M.(6)✦

Theorem 3. The π/8\pi/8 gate has no scaled form over ℤ[i]\mathbb{Z}[i]: whatever the natural number kk and the 2×22 \times 2 matrix MM with entries in ℤ[i]\mathbb{Z}[i], T≠(12)kM.T \neq \Bigl(\frac{1}{\sqrt{2}}\Bigr)^{k} M.(7)✦

What Is Checked

The claims are stated over the scaled form (4) of a matrix over a subring of the complex numbers, taken over the Gaussian integers and over the cyclotomic integers (2), which are built on the eighth root of unity (1); the third is about the π/8\pi/8 gate (3).

About these constructions the library proves that both sets of numbers are subrings of the complex numbers: each contains 00 and 11 and is closed under sums and negatives, and products stay in the set by (a+bi)(c+di)=(ac−bd)+(ad+bc)i(a + bi)(c + di) = (ac - bd) + (ad + bc)\,i(8) for integers a,b,c,da, b, c, d, and by (p+qζ8)(p′+q′ζ8)=(pp′+iqq′)+(pq′+p′q)ζ8(p + q\,\zeta_8)(p' + q'\,\zeta_8) = (pp' + i\,qq') + (pq' + p'q)\,\zeta_8(9) for Gaussian integers p,q,p′,q′p, q, p', q'.