Nielsen and Chuang -- Chapter 4

Updated on January 11, 2019

(4.1) Find the points on the Bloch sphere which correspond to the normalized eigenvectors of the different Paul matrices.

Recall that, from Exercise 2.11, X has eigenvalues ±1 with respective eigenvectors

{12[11],12[11]}

Similarly, Y has eigenvalues ±1 with respective eigenvectors

{12[1i],12[1i]}

Finally, Z has eigenvalues ±1 with respective eigenvectors

{[10],[01]}

First, we solve for X.

{12[11],12[11]}{12(|0+|1),12(|0|1)}

So, for 12(|0+|1), we have that cos(θ/2)=12. Hence, θ=π/2. Now, eiϕsin(θ/2)=eiϕ/2=1/2. Hence, ϕ=0.

Similarly, for the second eigenvector, θ=π/2 but ϕ=π.

Therefore, for the first eigenvector,

(cosϕsinθ,sinϕsinθ,cosθ)=(cos(0)sin(π/2),sin(0)sin(π/2),cos(π/2))=(1,0,0)

And for the second we have,

(cos(π)sin(π/2),sin(π)sin(π/2),cos(π/2))=(1,0,0)

Similarly, we find the Bloch vectors (0,±1,0) for Y and (0,0,±1) for Z.

(4.2) Let xR and A be a matrix that satisfies A2=I. Show that

exp(iAx)=cos(x)I+isin(x)A

From the power series definition of ez, we have that

exp(iAx)=n=0(iAx)nn!=n=0(iAx)2n(2n)!+n=0(iAx)2n+1(2n+1)!n=0(iAx)2n(2n)!=n=0i2nA2nx2n(2n)!=n=0(1)2nIx2n(2n)!=In=0(1)2nx2n(2n)!=cos(x)In=0(iAx)2n+1(2n+1)!=n=0i2n+1A2n+1x2n+1(2n+1)!=n=0i(1)2n+1Ax2n+1(2n+1)!=iAn=0(1)2n+1x2n+1(2n+1)!=isin(x)A

X,Y,Z give rise to three useful classes of unitary matrices when they are exponentiated, the rotation operators about x^, y^, and z^,

Rx(θ)eiθX/2Ry(θ)eiθY/2Rz(θ)eiθZ/2

We can use exercise 4.2 to write the above equations more conveniently.

(4.3) Show that, up to a global phase, the π/8 gate satisfies T=Rz(π/4).

Note that

T=[100exp(iπ/4)]=exp(iπ/8)[exp(iπ/8)00exp(iπ/8)]

Now, using the definition of Rz,

eiZπ8=cos(π/8)I+isin(π/8)Z=cos(π/8)Iisin(π/8)Z=[cos(π/8)isin(π/8)00cos(π/8)+isin(π/8)]=[exp(iπ/8)00exp(iπ/8)]

(4.4) Express the Hadamard gate H as a product of Rx and Rz rotations and eiϕ for some ϕ.

We’ve discussed a procedure for expressing H as a product of rotations on the Bloch sphere, by considering its actions on a basis of the Bloch sphere. We showed that Rx(π/2)Rz(π/2)Rx(π/2) suffices. We can verify this result a second way by considering the respective rotation matrices.

We know that H=12(X+Z). Furthermore,

Rx(π/2)=[cos(π/4)isin(π/4)isin(π/4)cos(π/4)]=12[1ii1]=12(I+iX)Rz(π/2)=[cos(π/4)+isin(π/4)00cos(π/4)isin(π/4)]=12[1+i001i]=12(I+iZ)

We’ll use that

XZ=[0110][1001]=[0110]=iYZX=[1001][0110]=[0110]=iYXZ+ZX=0XZX+ZX2=0XZX=Z

Note that the above is simply showing that the anti-commutator of X and Z, X,Z=0. This holds for any pair of distinct Pauli matrices (Exercise 2.41).

Hence,

122(I+iX)(I+iZ)(I+iX)=122[I+iX+iZ+i2ZX+iX+i2X2+i2XZ+i3XZX]=122[I+iX+iZZX+iXIXZ+i3XZX]=122[i(X+Z)+iXiXZX]=122[i(X+Z)+iX+iZ]=12[i(X+Z)]

which gives the Hadamard transform with phase ei0.

(4.5) Prove that (n^σ^)2=I, and use this to verify the following equation

Rn(θ)exp(iθnσ/2)=cos(θ/2)Iisin(θ/2)(nxX+nyY+nzZ)

Evidently, n^σ^=(nxX+nyY+nzZ) so, recalling that distinct Pauli matrices anti-commute,

(nxX+nyY+nzZ)2=nx2X2+nxnyXY+nxnzXZ+nxnyYX+ny2Y2+nynzYZ+nxnzZX+nynzZY+nzZ2=(nx2+ny2+nz2)I+nxnz(XZ+ZX)+nynz(YZ+ZY)+nxny(XY+YX)=(nx2+ny2+nz2)I=I

because n^ is a unit vector.

Therefore, using Exercise 4.2 (Nielsen & Chuang), if we let A=n^σ^, then the result follows directly.

(4.7) Show that XYX=Y and use this to prove that XRy(θ)X=Ry(θ).

From above, we have that distinct Pauli matrices anti-commute. Furthermore, the Pauli matrices are hermitian and unitary σi2=0,ix,y,z. Hence,

XY+YX=0XYX+YX2=0XYX+Y=0XYX=Y

So,

XRy(θ)X=X[cos(θ/2)Iisin(θ/2)Y]X=cos(θ/2)X2isin(θ/2)XYX=cos(θ/2)I+isin(θ/2)Y=cos(θ/2)Iisin(θ/2)Y=Ry(θ)

using that cos(x)=cos(x),sin(x)=sin(x).

(4.12) Give A,B,C, and α for the Hadamard gate.

Using Lemma 4.12 (Nielsen & Chuang) above we can solve, assuming γ=π/2, H=[1111]=[ei(αβ/2δ/2)ei(αβ/2+δ/2)ei(α+β/2δ/2)ei(α+β/2+δ/2)]αβ/2δ/2=0αβ/2+δ/2=πα+β/2δ/2=0(α+β/2+δ/2)=πα=π/2,β=0,δ=π

So, the proof of Corollary 4.2 in Nielsen & Chuang tells us to set

A=Rz(β)Ry(γ/2)=Rz(0)Ry(π/4)=[cos(π/8)sin(π/8)sin(π/8)cos(π/8)]B=Ry(γ/2)Rz((δ+β)/2)=Ry(π/4)Rz(π/2)=[cos(π/8)sin(π/8)sin(π/8)cos(π/8)][eiπ/400eiπ/4]C=Rz((δβ)/2)=Rz(π/2)=[eiπ/400eiπ/4]

and α remains set α=π/2.

(4.16)

For the first circuit, we consider action on the computational basis.

|x1|x2|x1H|x2=(IH)|x1|x2

Now, given that H=[11 11] w.r.t the computation basis, then

(IH)=[1100110000110011]

Similarly, for the second circuit we have

(HI)=[1010010110100101]

(4.17)

Construct a CNOT gate from one controlled-Z gate, that is, the gate whose action in the computational basis is specified by the unitary matrix

[1000010000100001]

and two Hadamard gates, specifying the control and target qubits.

Recall that, in terms of the computational basis, the action of the CNOT is given by |c|t|c|tc and that Z=[10 01].

We construct our algorithm by first making the observation that H|+=|0 and H|=|1. Hence, beginning with state |c|t we can initially apply H to |t. Now, using the control-Z gate with |c as the control and H|t as the target, we have two cases:

(1) If |c=1, then the second qubit will swap either from |+ to | or vis versa. Therefore, we can apply another Hadamard to the second qubit and have |tc at the second qubit, as expected. The first qubit is unaltered, as expected.

(2) If |c=1, then the second qubit will remain unchanged. Hence, if we apply another Hadamard to the second qubit, then |t is recovered since H2=I. So, we have the expected behavior.

In summary, we have the circuit, beginning with state |c|t:

(1) Apply H to the second qubit

(2) Controlled-Z with the first qubit as the control and second as the target

(3) Apply H to the second qubit.

From the next exercise, we’ll see that it didn’t actually matter whether we used the first or second qubit as control/target:

(4.18)

We simply prove the statement for the computational basis.

(1) |0|0: Both circuits give the identity transform since they are conditioned on a qubit which is |0, in either case.

(2) |1|0: The first circuit is conditioned on |1, so it applies Z to |0 which gives |0. Hence, we have |1|0. The second circuit is conditioned on |0, so we have the identity transform which gives |1|0, similarly.

(3) |0|1: By symmetry, we have the same outcome as in (2).

(4) |1|1: The first circuit is conditioned on the first |1, so it applies Z to the second qubit which gives |1|1. Similarly, the second circuit gives |1|1.

(4.19) The CNOT gate is a simple permutation whose action on a density matrix ρ is to rearrange the elements in the matrix. Write out this action explicitly in the computational basis.

|0000|=[1000000000000000]|0101|=[0000010000000000]|1010|=[0000000000100000]|1111|=[0000000000000001]

Now,

C1(X)|00=|00C1(X)|01=|01C1(X)|10=|11C1(X)|11=|10

Hence, the permutation matrix acting on the computational basis as

[1000010000010010]

satisfies this permutation.

(4.20)

Consider action on |c|t by the circuit on the LHS. The action of this circuit is given by (HH)C1(X)|c|t(HH) using c as the control and t as the target for the controlled operation. So, in Exercise 4.17, we showed that we can decompose C1(X) as HC1(Z)H using the same control and target as used for C1(X) originally, and with the H transforms acting on the target qubit. Hence, we can rewrite action by the LHS circuit as (HH)(IH)C1(Z)|c|t(IH)(HH)=(HI)C1(Z)|c|t(HI).

Similarly, for the circuit on the RHS, action on |c|t is given by C1(X)|c|t where in this case t is the control and c is the target. Hence, using the same result, we can rewrite this as (HI)C1(Z)|c|t(HI) with t as control and c as target. Finally, using Exercise 4.18, we can swap which qubits we regard as control/target in a controlled-Z operation. Hence, we have the action (HI)C1(Z)|c|t(HI) with c as control and t as target, as in the LHS.

Now, using that H2=I, we note that the identity given by the circuit is equivalent to C1(X)(HH)|c|t=C1(X)|t|c(HH) (applying HH to the end of both circuits). Hence, this directly gives the effect of CNOT on the basis |±.