Lean, informalized

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

Exercise 4.15 - How two rotations of a qubit compose, and which sign the cross product term takes

The product of two rotations of a qubit.

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 qubit is rotated twice, first by an angle β1\beta_1 about a unit axis nˆ1\hat n_1, then by an angle β2\beta_2 about a unit axis nˆ2\hat n_2. The two rotations together make a single rotation Rnˆ12(β12)R_{\hat n_{12}}(\beta_{12}) by an angle β12\beta_{12} about an axis nˆ12\hat n_{12}, and the exercise finds it from the two it is made of: the cosine c12=cos⁡(β12/2)c_{12} = \cos(\beta_{12}/2) of its half angle and the vector s12nˆ12s_{12}\hat n_{12}, with s12=sin⁡(β12/2)s_{12} = \sin(\beta_{12}/2), are given in terms of the half angles and the axes of the two rotations. A second part takes equal angles, β1=β2=β\beta_1 = \beta_2 = \beta, with the first axis along the zz axis, the unit vector zˆ=(0,0,1)\hat z = (0, 0, 1).

In the library the first part is an identity between 2×22 \times 2 matrices, which expresses the product of the two rotations through c12c_{12} and s12nˆ12s_{12}\hat n_{12}, both defined from the two angles and axes. The second part becomes a statement about those two definitions, and an example shows that one term of s12nˆ12s_{12}\hat n_{12} cannot carry the sign opposite to the one in the library.

Rotations of a Qubit

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},(1) and σ→=(X,Y,Z)\vec\sigma = (X, Y, Z) is the Pauli vector. 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 the complex 2×22 \times 2 matrix nxX+nyY+nzZn_x X + n_y Y + n_z Z.✦

The rotation operator Rn→(θ)R_{\vec n}(\theta) about an axis n→\vec n, a real vector in three dimensions, by a real angle θ\theta is the complex 2×22 \times 2 matrix given by the matrix exponential Rn→(θ)=exp⁡(−iθ2n→⋅σ→),R_{\vec n}(\theta) = \exp\!\left(-\frac{i\theta}{2}\, \vec n \cdot \vec\sigma\right),(2)✦ written Rnˆ(θ)R_{\hat n}(\theta) when the axis is a unit vector nˆ\hat n.

For real angles β1,β2\beta_1, \beta_2 and real vectors n→1,n→2\vec n_1, \vec n_2 in three dimensions, write ci=cos⁡(βi/2)c_i = \cos(\beta_i/2) and si=sin⁡(βi/2)s_i = \sin(\beta_i/2). The composed cosine c12c_{12} of the pairs (β1,n→1)(\beta_1, \vec n_1) and (β2,n→2)(\beta_2, \vec n_2) is the real number c12=c1c2−s1s2n→1⋅n→2,c_{12} = c_1 c_2 - s_1 s_2\, \vec n_1 \cdot \vec n_2 ,(3) and their composed axis vector s12nˆ12s_{12}\hat n_{12} is the real vector in three dimensions s12nˆ12=s1c2n→1+c1s2n→2+s1s2n→2×n→1.s_{12}\hat n_{12} = s_1 c_2\, \vec n_1 + c_1 s_2\, \vec n_2 + s_1 s_2\, \vec n_2 \times \vec n_1 .(4)

The Claim

Theorem 1. Let nˆ1\hat n_1 and nˆ2\hat n_2 be unit vectors and β1\beta_1, β2\beta_2 real angles. Then Rnˆ2(β2)Rnˆ1(β1)=c12I−i(s12nˆ12)⋅σ→,R_{\hat n_2}(\beta_2)\, R_{\hat n_1}(\beta_1) = c_{12}\, I - i\, (s_{12}\hat n_{12}) \cdot \vec\sigma ,(5)✦ where II is the 2×22 \times 2 identity and c12c_{12} and s12nˆ12s_{12}\hat n_{12} are the composed cosine (3) and the composed axis vector (4) of (β1,nˆ1)(\beta_1, \hat n_1) and (β2,nˆ2)(\beta_2, \hat n_2).

The cross product is the one term of (4) that changes sign when the two pairs trade places. The book’s equation (4.20) prints it with a minus sign, −s1s2nˆ2×nˆ1-s_1 s_2\, \hat n_2 \times \hat n_1.

Theorem 2. The formula with the printed sign fails for the product in the order of (5): for nˆ1=zˆ=(0,0,1)\hat n_1 = \hat z = (0, 0, 1), nˆ2=xˆ=(1,0,0)\hat n_2 = \hat x = (1, 0, 0) and β1=β2=π\beta_1 = \beta_2 = \pi, Rxˆ(π)Rzˆ(π)≠c12I−i(s1c2zˆ+c1s2xˆ−s1s2xˆ×zˆ)⋅σ→,R_{\hat x}(\pi)\, R_{\hat z}(\pi) \neq c_{12}\, I - i \left( s_1 c_2\, \hat z + c_1 s_2\, \hat x - s_1 s_2\, \hat x \times \hat z \right) \cdot \vec\sigma ,(6)✦ where c1=c2=cos⁡(π/2)c_1 = c_2 = \cos(\pi/2), s1=s2=sin⁡(π/2)s_1 = s_2 = \sin(\pi/2) and c12c_{12} is the composed cosine of (π,zˆ)(\pi, \hat z) and (π,xˆ)(\pi, \hat x).

Theorem 3. Let β\beta be a real angle and n→2\vec n_2 a real vector in three dimensions, and write c=cos⁡(β/2)c = \cos(\beta/2) and s=sin⁡(β/2)s = \sin(\beta/2). The composed cosine and the composed axis vector of (β,zˆ)(\beta, \hat z) and (β,n→2)(\beta, \vec n_2) are c12=c2−s2zˆ⋅n→2,c_{12} = c^2 - s^2\, \hat z \cdot \vec n_2 ,(7)✦ s12nˆ12=sc(zˆ+n→2)+s2n→2×zˆ.s_{12}\hat n_{12} = s c\, (\hat z + \vec n_2) + s^2\, \vec n_2 \times \hat z .(8)✦

What Is Checked

The claim is stated over the rotation operators Rnˆ(θ)R_{\hat n}(\theta) of (2), built from the matrices nˆ⋅σ→\hat n \cdot \vec\sigma and the Pauli matrices (1), and over the composed cosine (3) and the composed axis vector (4).

About these constructions the library proves the composition law (5) and the counterexample (6) to the printed sign. For equal angles with the first axis along zˆ\hat z it proves the reduced forms (7) and (8).