Classically, there exists only one reversible single bit gate: the NOT gate
which effects 0 → 1, 1 → 0. However, any unitary operation on the qubits
|0i and |1i is a valid single qubit gate. As we will see, such a gate can
always be regarded as a linear combination of the Pauli gates X, iY , Z and
the identity.
In circuit notation, a gate G that acts on state |ii to produce state |oi is
represented as
|ii
G
|oi
The matrix representation of G is found by computing its action on the
computational basis states:
G
ij
= hi|G|ji (7.2)
The full power of the quantum gate emerges when it acts on superposition

Quantum Gates and Circuits 123
states. Consider for example the action of NOT, defined in the computational
basis by
X|0i = |1i
X|1i = |0i
; X =
“
0 1
1 0
#
= σ
x
(7.3)
When X acts on a generic quantum state |ψi = α|0i + β|1i we get X|ψi =
α|1i + β|0i. This represents interchanged probabilities of the state being in
|0i or |1i.
Other useful quantum single-qubit gates, that have no classical analogue,
are described below.
1. Phase Flip (Z) gate:
Z|0i = |0i
Z|1i = −|1i
; Z =
“
1 0
0 −1
#
= σ
z
(7.4)
This gate gives the state |1i a negative sign, an operation that is mean-
ingless in classical logic, but is relevant when it acts on superposition
states of a qubit. For instance, the state
1
√
2
(|0i + |1i) changes to the
orthogonal state
1
√
2
(|0i − |1i).
2. Hadamard (H) gate:
H|0i =
1
√
2
(|0i + |1i) ;
H|1i =
1
√
2
(|0i − |1i) ;
H =
1
√
2
“
1 1
1 −1
#
=
1
√
2
(σ
x
+ σ
z
) (7.5)
This is an invaluable gate in quantum information processing: it pro-
duces equal superpositions of the basis states. Its action can be expressed
algebraically as
H|xi =
1
√
2
(|xi + (−1)
x
|¯xi) =
1
√
2
X
y=0,1
(−1)
xy
|yi. (7.6)
3. Phase (Φ) gate:
Φ|0i = |0i;
Φ|1i = e
iϕ
|1i
; Φ =
“
1 0
0 e
iϕ
#
(7.7)
Exercise 7.1. Show that the Z, H, and Φ matrices are all unitary.
Exercise 7.2. Calculate the output of each of these gates when the input is a
general qubit state α|0i + β|1i.
Exercise 7.3. What is the action of the Pauli Y gate?

124 Introduction to Quantum Physics and Information Processing
It is useful to visualize the action of single qubit gates by looking at their
action on the Bloch sphere. A gate must take any point on the Bloch sphere
to another, and can be a rotation about an arbitrary axis through the center
of the Bloch sphere. Inversions about the center are also allowed.
Example 7.1.1. To see the effect of the Pauli X matrix on a qubit state on
the Bloch sphere,
X
cos
θ
2
|0i + e
iφ
sin
θ
2
|1i
= cos
θ
2
|1i + e
iφ
sin
θ
2
|0i
= e
iφ
cos
π
2
−
θ
2
|0i + e
−iφ
sin
π
2
−
θ
2
|1i
(7.8)
This is a state for which θ → π − θ and φ → −φ. The transformation is
illustrated in Figure 7.2.
FIGURE 7.2: Action of
ˆ
X on the Bloch sphere.(a) The θ and π − θ cones
are indicated to show you how the transformation works. (b) The result is
equivalent to a rotation about ˆx by π.
Exercise 7.4. Show that the Pauli gates Y and Z gates rotate a state on the
Bloch sphere by π about the ˆy and ˆz axes, respectively.
Exercise 7.5. The effect of the H gate on the Bloch sphere can also be regarded
as a rotation by π about some axis. Find that axis.
Exercise 7.6. What is the effect of the phase gate Φ on a state located at (θ, φ)
on the Bloch sphere?

Quantum Gates and Circuits 125
A general rotation can always be constructed as combinations of rotations
about the ˆx, ˆy, and ˆz axes. Hence a very useful set of gates is the rotation
gates, expressed as functions of the Pauli matrices as follows:
R
x
(θ) ≡ e
−iθσ
x
/2
=
“
cos
θ
2
−i sin
θ
2
−i sin
θ
2
cos
θ
2
#
(7.9a)
R
y
(θ) ≡ e
−iθσ
y
/2
=
“
cos
θ
2
−sin
θ
2
sin
θ
2
cos
θ
2
#
(7.9b)
R
z
(θ) ≡ e
−iθσ
z
/2
=
“
e
−iθ/2
0
0 e
iθ/2
#
(7.9c)
Exercise 7.7. Show by using the series expansion of e
x
that if A is a matrix such
that A
2
= then e
iAθ
= cos(θ) + i sin(θ)A.
FIGURE 7.3: Rotation of a qubit by R
n
(θ) on the Bloch sphere.
You can now see that a rotation about an axis ˆn = n
x
ˆ
i + n
y
ˆ
j + n
y
ˆ
k by an
angle θ is given by
R
ˆn
(θ) = e
−iθˆn·~σ/2
= cos
θ
2
− i sin
θ
2
(n
x
σ
x
+ n
y
σ
y
+ n
z
σ
z
) . (7.10)
The action of this gate is illustrated in Figure 7.3.
Exercise 7.8. Verify that gate R
ˆn
(θ) takes a state with Bloch vector ˆa to one
rotated by θ about the ˆn axis

Leave a Reply