Lean, informalized

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

Exercise 4.8 - A single qubit unitary as a phase times a rotation, worked out for the gates HH and SS

Every qubit gate is a phase times a 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

A gate on one qubit is a unitary operator on its two dimensional state space. Every such gate is a rotation of the qubit about some axis in three dimensions by some angle, multiplied by a phase factor. The exercise is to show this, and to find the phase, the angle and the axis for two particular gates, the Hadamard gate and the phase gate.

The Qubit and Its Gates

A quantum system QQ is a physical system whose state space is a finite dimensional complex Hilbert space.✦ The qubit is the two level quantum system whose state space is ℂ2\mathbb{C}^2, with the computational basis |0⟩|0\rangle, |1⟩|1\rangle.✦ A unitary UU of a quantum system QQ, a closed system evolution of QQ, is an operator on the state space of QQ with U†U=UU†=1U^\dagger U = U U^\dagger = 1.✦

Each gate on this page is the unitary of the qubit that acts on ℂ2\mathbb{C}^2 as a 2×22 \times 2 complex matrix in the computational basis. The Pauli matrices are 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},(1) and for a real vector n→=(nx,ny,nz)\vec{n} = (n_x, n_y, n_z) in three dimensions the matrix n→⋅σ→\vec{n} \cdot \vec{\sigma} is nxX+nyY+nzZn_x X + n_y Y + n_z Z, with σ→=(X,Y,Z)\vec{\sigma} = (X, Y, Z) the Pauli vector.

The Hadamard gate HH and the phase gate SS are the unitaries of the qubit with matrices H=12(111−1),S=(100i).H = \frac{1}{\sqrt{2}} \begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix}, \qquad S = \begin{pmatrix} 1 & 0 \\ 0 & i \end{pmatrix}.(2)

Rotations

The rotation Rn→(θ)R_{\vec{n}}(\theta) about the axis n→\vec{n}, a real vector in three dimensions, by a real angle θ\theta is the unitary of the qubit whose matrix is the matrix exponential Rn→(θ)=exp⁡(−iθ2n→⋅σ→).R_{\vec{n}}(\theta) = \exp\!\left( -\frac{i\theta}{2}\, \vec{n} \cdot \vec{\sigma} \right).(3)✦ For a unit vector nˆ\hat{n} it is written Rnˆ(θ)R_{\hat{n}}(\theta). The rotation Rz(θ)R_z(\theta) about the zˆ\hat{z} axis is the rotation about nˆ=(0,0,1)\hat{n} = (0, 0, 1), with matrix Rz(θ)=e−iθZ/2.R_z(\theta) = e^{-i\theta Z/2}.(4)✦

The Claim

Theorem 1. Let UU be a unitary of the qubit. There are real numbers α\alpha and θ\theta and a real unit vector nˆ\hat{n} in three dimensions such that U=eiαRnˆ(θ).U = e^{i\alpha} R_{\hat{n}}(\theta).(5)✦

Theorem 2. Let nˆ=(1/2,0,1/2)\hat{n} = (1/\sqrt{2}, 0, 1/\sqrt{2}), the unit vector halfway between the xx and zz axes. The Hadamard gate satisfies H=eiπ/2Rnˆ(π).H = e^{i\pi/2} R_{\hat{n}}(\pi).(6)✦

Theorem 3. The phase gate satisfies S=eiπ/4Rz(π/2).S = e^{i\pi/4} R_z(\pi/2).(7)✦

What Is Checked

The claims are stated over unitaries of the qubit: an arbitrary one, UU, in (5), the gates HH and SS of (2) in (6) and (7), and on the right of each equation the rotations Rnˆ(θ)R_{\hat{n}}(\theta) and Rz(θ)R_z(\theta) of (3) and (4).

The library proves that the matrix of each of these gates is unitary, the rotation Rn→(θ)R_{\vec{n}}(\theta) for every real vector n→\vec{n} and every angle θ\theta and Rz(θ)R_z(\theta) for every angle, so that each of them is a unitary of the qubit.