Lean, informalized

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

Exercise 4.3 - The π/8\pi/8 gate and the rotation Rz(π/4)R_z(\pi/4) evolve every state of a qubit alike

The T gate acts as a rotation about the zz axis.

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 π/8\pi/8 gate TT and the rotation Rz(π/4)R_z(\pi/4), which turns the Bloch vector of a qubit by π/4\pi/4 about the zz axis, are two gates on a single qubit. The exercise is to show that they have the same effect: whatever state ρ\rho the qubit is in, applying TT leaves it in the same state as applying Rz(π/4)R_z(\pi/4).✦

A Quantum System

A quantum system SS is given by its state space, a finite dimensional complex Hilbert space.✦ A state ρ\rho of SS is a positive operator of unit trace on the state space of SS.✦ A unitary UU of SS is an operator on the state space of SS with U†U=UU†=1U^\dagger U = U U^\dagger = 1, a closed evolution of the system, under which a state ρ\rho of SS evolves as ρ↦UρU†.\rho \longmapsto U \rho U^\dagger .(1)

The qubit is the quantum system whose state space is ℂ2\mathbb{C}^2 itself, the two dimensional complex Euclidean space, with the computational basis |0⟩|0\rangle, |1⟩|1\rangle.✦ A gate on the qubit is a unitary of the qubit, given by its 2×22 \times 2 matrix in that basis.

Rotations and the π/8\pi/8 Gate

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) Together they form the Pauli vector σ→=(X,Y,Z)\vec{\sigma} = (X, Y, Z). 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.✦

The rotation Rn→(θ)R_{\vec{n}}(\theta) about the axis n→\vec{n} by a real angle θ\theta is the matrix exponential 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}. About the zz axis, zˆ=(0,0,1)\hat{z} = (0, 0, 1) and zˆ⋅σ→=Z\hat{z} \cdot \vec{\sigma} = Z, so that Rz(θ)=Rzˆ(θ)=e−iθZ/2.R_z(\theta) = R_{\hat{z}}(\theta) = e^{-i\theta Z/2}.(4)✦

The rotation gate Rz(θ)R_z(\theta) is the unitary of the qubit whose matrix in the computational basis is (4).✦ The π/8\pi/8 gate TT is the unitary of the qubit whose matrix is T=(100eiπ/4).T = \begin{pmatrix} 1 & 0 \\ 0 & e^{i\pi/4} \end{pmatrix}.(5)✦

The Claim

Since ZZ is diagonal, so is Rz(π/4)R_z(\pi/4), and comparing its entries with (5), Rz(π/4)=(e−iπ/800eiπ/8)=e−iπ/8T.R_z(\pi/4) = \begin{pmatrix} e^{-i\pi/8} & 0 \\ 0 & e^{i\pi/8} \end{pmatrix} = e^{-i\pi/8}\, T.(6) In the evolution (1) this global phase meets its complex conjugate and cancels.

Theorem 1. Let ρ\rho be a state of the qubit. Then the state of the qubit after the π/8\pi/8 gate equals its state after the rotation gate Rz(π/4)R_z(\pi/4): TρT†=Rz(π/4)ρRz(π/4)†.T \rho T^\dagger = R_z(\pi/4)\, \rho\, R_z(\pi/4)^\dagger .(7)✦

What Is Checked

The claim is stated over the states of the qubit and their evolution (1) under two unitaries of the qubit: the π/8\pi/8 gate, with the matrix (5), and the rotation gate Rz(π/4)R_z(\pi/4), whose matrix (4) is built from the Pauli matrices (2) through the exponential (3).

About these constructions the library proves that the matrices of TT and of Rz(θ)R_z(\theta), for every angle θ\theta, are unitary, and that conjugating a state of any quantum system by a unitary of the system gives a positive operator of unit trace, so that each side of (7) is again a state of the qubit.