Chapter 4

Quantum gates and

quantum circuits

Except for the NOT gate, all the other familiar classical gates are irre-

versible in the sense that we cannot uniquely reconstruct the input states

from the output states. For example, OR, AND, NAND, NOR,etc. are

irreversible. They all map a two-bit input state into a single bit output

state. Thus one bit is erased during operation of each of these gates, and

according to Landauer’s principle that requires dissipation of a minimum

amount of energy. Now a simple question arises in our curious mind: Is

it possible to avoid this loss of energy? The answer is yes. If we don’t

erase any bit then we can circumvent this energy loss. Thus we need to

map n bit input states to n bit output states. In addition, if a one-to-

one correspondence exists between the input states and the output states

then only we will be able to uniquely reconstruct the input states from

the output states. In such a case the gate is called reversible. For ex-

ample, if we have f (00) = 00,f(01) = 10,f(10) = 01,f(11) = 11 then f

represents a reversible gate. Quantum evolution operators are unitary so

for every operator U we have an inverse operator U

−1

= U

†

. Therefore,

quantum evolution operators are the natural choice for the construction of

energy eﬃcient reversible gates. However, it is not the only choice. We can

have classical reversible gates, too. Usually by reversible gates we refer to

classical reversible gates, and quantum gates are speciﬁcally referred to as

quantum gates. Reversible gates and quantum gates are similar but there

exists a fundamental diﬀerence that reversible gates cannot accept super-

position states (e.g. α|0 + β|1) as input states, whereas quantum gates

can. Thus all quantum gates are essentially reversible but the converse is

not true.

In brief, simple unitary operations on qubits are called quantum logic

gates. If a gate acts on a single qubit then it is called a single qubit gate.

137

138 Quantum gates and quantum circuits

Similarly, we can deﬁne a two qubit gate, three qubit gate and so on. We

know that gates are combined together to form circuits, so in this chapter

we will ﬁrst describe single qubit gates, two qubit gates and three qubit

gates. Then we will provide a few examples of quantum circuits and brieﬂy

describe the quantitative measures of the quality of the quantum circuits.

We will also describe a few simple tricks that are usually used to improve

the quality of quantum circuits. This chapter is focused on quantum gates

and quantum circuits, but the techniques described here are also valid for

reversible gates and reversible circuits.

4.1 Single qubit gates

A general structure of single qubit gates is shown in Fig. 4.1. Here the

single qubit gate is a unitary operator which transforms a single qubit state

|ψ

in

to another single qubit state |ψ

out

= U|ψ

in

. In this ﬁgure and in all

the subsequent ﬁgures that depict quantum gates and quantum circuits,

time moves from left to right, and each horizontal line represents a qubit.

The horizontal lines are often referred to as qubit lines. Single qubit gates

are represented by 2 × 2 unitary matrices. Every unitary operator (U),

whichisrepresentedbya2 × 2 matrix, is a valid single qubit gate. In

principle, we can construct an inﬁnite number of 2 × 2 unitary matrices.

Consequently, there are an inﬁnite number of possible single qubit quantum

gates. However, in the conventional classical circuit theory, only two single

bit logic gates are possible, namely the Identity gate and the logical NOT

gate. Among this inﬁnite number of possible single qubit quantum gates,

some have special importance as they are used most frequently, and as

they can be used as elements of a set of gates, which form a universal gate

library. In this section we will brieﬂy introduce these important and useful

single qubit quantum gates, which are nothing but single qubit quantum

state transformations. Since these transformations are linear, they are

completely speciﬁed by their eﬀect on the basis vectors. For instance, if we

know that a single qubit quantum gate A maps |0 to |ψ

0

and |1 to |ψ

1

then linearity implies that the gate maps an arbitrary single qubit state

α|0 + β|1 to α|ψ

0

+ β|ψ

1

. Keeping this in mind, we will now describe

the eﬀect of important single qubit gates on the basis vectors |0 and |1 and

will also provide the corresponding 2 × 2 unitary matrices that represent

the gates.

U

|Ψ

in

|Ψ

out

=U|Ψ

in

Figure 4.1: An arbitrary single qubit gate U .

Start Free Trial

No credit card required