
Problems 141
(a) HXH = Z
(b) HY H = −Y
(c) HZH = X
7.3. Show the following relations concerning rotation matrices:
(a) R
n
(θ
1
)R
n
(θ
2
) = R
n
(θ
1
+ θ
2
)
(b) XR
n
(θ)X = R
n
(−θ)
7.4. The “SWAP” gate S interchanges two inputs, defined by
S|xyi = |yxi.
(a) Give the matrix representing this gate.
(b) Show that it can be implemented by 3 CNOT gates as
S
12
= C
12
C
21
C
12
.
(c) Show that the matrix is equivalent to
S
12
=
1
2
( + X
1
X
2
+ Y
1
Y
2
+ Z
1
Z
2
)
7.5. The controlled phase-flip gate takes |11i to −|11i while leaving the other
basis states unchanged. It is sometimes represented as follows, since its
action is symmetric in the inputs:
|xi
•
|xi
|yi
•
(−1)
xy
|yi
(a) Construct the matrix for this