Lean, informalized

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

Exercise 4.14 - The π/8\pi/8 gate between two Hadamard gates is the rotation by π/4\pi/4 about the xx axis, times the phase eiπ/8e^{i\pi/8}

Conjugating TT by HH gives an xx rotation.

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

On a single qubit, take the π/8\pi/8 gate TT and apply a Hadamard gate HH before and after it. The exercise is to show that the result, HTHHTH, is the rotation Rx(π/4)R_x(\pi/4) by π/4\pi/4 about the xx axis, up to a global phase.

The Gates

The Hadamard gate HH and the π/8\pi/8 gate TT are the complex 2×22 \times 2 matrices, in the computational basis {|0⟩,|1⟩}\{|0\rangle, |1\rangle\}, H=12(111−1),T=(100eiπ/4).H = \frac{1}{\sqrt{2}} \begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix}, \qquad T = \begin{pmatrix} 1 & 0 \\ 0 & e^{i\pi/4} \end{pmatrix}.(1)

The Pauli matrices XX, YY and ZZ are the complex 2×22 \times 2 matrices X=(0110),Y=(0−ii0),Z=(100−1).X = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}, \qquad Y = \begin{pmatrix} 0 & -i \\ i & 0 \end{pmatrix}, \qquad Z = \begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix}.(2) For a real vector n→=(nx,ny,nz)\vec{n} = (n_x, n_y, n_z) in three dimensions, n→⋅σ→\vec{n} \cdot \vec{\sigma} is the complex 2×22 \times 2 matrix nxX+nyY+nzZn_x X + n_y Y + n_z Z.✦

For a real vector n→\vec{n} in three dimensions and a real angle θ\theta, the rotation operator Rn→(θ)R_{\vec{n}}(\theta) about n→\vec{n} by θ\theta is the complex 2×22 \times 2 matrix Rn→(θ)=exp⁡(−iθ2n→⋅σ→),R_{\vec{n}}(\theta) = \exp\Bigl(-\frac{i\theta}{2}\, \vec{n} \cdot \vec{\sigma}\Bigr),(3)✦ written Rnˆ(θ)R_{\hat{n}}(\theta) when the axis is a unit vector nˆ\hat{n}. The rotation Rx(θ)R_x(\theta) about the xx axis by θ\theta is the one with axis nˆ=(1,0,0)\hat{n} = (1, 0, 0), for which nˆ⋅σ→=X\hat{n} \cdot \vec{\sigma} = X: Rx(θ)=exp⁡(−iθX/2).R_x(\theta) = \exp\bigl(-i\theta X/2\bigr).(4)✦

The Claim

The library states the exercise with the global phase fixed.

Theorem 1. The π/8\pi/8 gate between two Hadamard gates is the rotation by π/4\pi/4 about the xx axis times the phase eiπ/8e^{i\pi/8}: HTH=eiπ/8Rx(π/4).HTH = e^{i\pi/8}\, R_x(\pi/4).(5)✦

What Is Checked

The claim is stated over the gates HH and TT of (1) and the rotation Rx(π/4)=exp⁡(−iπX/8)R_x(\pi/4) = \exp(-i\pi X/8), the case θ=π/4\theta = \pi/4 of (4). What the library proves about them is the identity (5).