Chapter I: Qubits, Operators and Quantum Gates
Chapter I: Qubits, Operators and Quantum Gates
Quantum gates
Qubit:
In this chapter, we will give a brief introduction to the fundamental concepts of the quantum
computation. The basic unit of classical computation and information processing is bit, which
can assume either a state 0 or a state 1. In an analogous manner, the basic unit of information
processing in a quantum computer is a quantum bit or qubit. Like a bit, a qubit can also be in
one of two states. We label these two states by |0> and |1>. While a bit can be in the state 0 or
in the state 1, a qubit can exist in the state |0> or the state |1>, and it can also exist in a
superposition state. This state is a linear combination of the states |0> and |1>. If a state |ψ> is
A qubit can exist in a superposition state of |0> and |1> but when it is measured it can only be
found either in state |0> or in state |1>. Laws of quantum mechanics tell us that the square of
the modulus of the coefficient of the states |0> and |1> gives the probability of finding the
qubit in state |0> and |1> respectively. So, |𝛼|2 and |𝛽|2 give the probability of finding |ψ> in
state |0> and |1> respectively. Since the probabilities must add up to 1, it implies that,
|𝛼|2 + |𝛽|2 = 1
It is often useful to visualize the state of a single qubit and for that purpose Bloch spheres are
used.
𝜃 𝜃
|𝜓 >= cos (2) |0 > +𝑒 𝑖∅ sin (2) |1 >
The parameters 𝜃and ∅ specify a point on the surface of the unit three-dimensional sphere,
called the Bloch sphere. Many of the operations on single qubits can be described using the
Bloch sphere
Now, we aim to get a brief overview of the mathematical background, needed to understand
the concepts of quantum computation. When a measurement is made on a state of a qubit, its
Vector space:
The arena in which quantum computation takes place is a mathematical abstraction called a
vector space. Quantum states behave mathematically in an analogous way to column vectors.
So, the vector space that is important in quantum computation is the vector space Cn, which is
the vector space of “n-tuples” of complex numbers. We label the elements of Cn by |a>, |b>,
|c>. Then we write down an element of this vector space as an n-dimensional column vector.
Let αi be a set of complex coefficients and |vi> be a set of vectors. A linear combination of
The vectors |v1>, |v2>…|vn> are said to be linearly independent if α1|v1>+ α2|v2> +···+ αn|vn>
A set S is a basis for V if S is linearly independent and it spans the vector space. The number
of vectors in S is the dimension of the vector space. Many basis sets exist in Cn.
This is a generalization of the dot product used with ordinary vectors in Euclidean space.
While the dot product takes two vectors and maps them into a real number, in this case the
inner product will take two vectors from Cn and map them to a complex number. We write
the inner product between two vectors |u> and |v> using the notation <u|v>.
If the inner product between two vectors is zero, i.e. <u|v>=0 then |u> and |v> are said to be
The inner product between two vectors satisfies the following properties,
1. <u|v>* =<v|u>
We can use the inner product to define a norm by computing the inner product of the vector
with itself.
||𝑢|| = √< 𝑢|𝑢 > with <u|u> ≥ 0
In quantum theory <u| is sometimes called the dual vector or bra corresponding to the ket |u>.
If a ket is a column vector, the dual vector or bra is a row vector whose elements are the
When a normalized set of vectors are mutually orthogonal to each other the set is said to be
orthonormal set of vectors. For example, consider the set {|0>, |1>}. In the {|0>, |1>} basis
1 0
|0 >= ( ) ; |1 >= ( )
0 1
And <0|0>=<1|1>= 1 shows the vectors are normalized. Whereas, <0|1>=<1|0>= 0 shows
that the vectors are mutually orthogonal. Hence, they form an orthonormal set of vectors.
Operators:
In quantum theory, dynamical variables like position, momentum, angular momentum, and
energy are called observables. Observables are measured to characterize the quantum state of
observables. Operators can be represented by matrices in a certain basis. Then the action of
A= IAI= (∑𝑖 |𝑢𝑖 >< 𝑢𝑖 |)𝑨(∑𝑗 |𝑢𝑗 >< 𝑢𝑗 |) = ∑𝑖,𝑗 < 𝑢𝑖 |𝑨|𝑢𝑗 > |𝑢𝑖 >< 𝑢𝑗 |
The quantity <ui|A|uj>= Aij is the matrix element of the operator A located at ith row and jth
column in the matrix representing A in the basis {|ui>}. The matrix representation of A is
given by,
The product of a ket |ψ> with a bra <φ|, which is written as |ψ><φ|, is sometimes known as the
outer product. This quantity is an operator. Taking an arbitrary ket |χ> the outer product is
given by,
𝑎
|𝜓 >< 𝜑| = ( ) (𝑐 ∗ 𝑎𝑐 ∗ 𝑎𝑑 ∗
𝑑∗ ) = ( )
𝑏 𝑏𝑐 ∗ 𝑏𝑑 ∗
known as Pauli operators. The Pauli operators in the {|0>, |1>} basis are given by,
1 0 0 1 0 −𝑖 1 0
𝐼=( ), 𝑋=( ), 𝑌=( ), 𝑍=( )
0 1 1 0 𝑖 0 0 −1
Hermitian and Unitary operator:
Two of the most important operators in the quantum theory are the Hermitian operator and
An operator is said to be unitary if its adjoint is equal to its inverse. Unitary operators are
UU† = U†U = I
Unitary operators are important because they describe the time evolution of a quantum state.
Projection operator:
operator that can be formed by writing the outer product using a single ket. That is, given a
state |ψ>, the operator P = |ψ><ψ| is a projection operator. If the state |ψ> is normalized, then
the Gram–Schmidt procedure it is possible to construct an orthonormal basis |1>, . . ., |n> for
constitute an orthonormal basis. To find the probability of finding the ith outcome if a
Tensor product:
The tensor product is a way of putting vector spaces together to form larger vector spaces.
systems. Suppose V and W are Hilbert spaces of dimension m and n respectively. Then
V⊗W. is an mn dimensional vector space. The elements of V⊗W are linear combinations of
tensor products |v>⊗|w> of elements |v> of V and |w> of W. Note that, {|v>} forms a basis
in V {|w>} forms a basis in W. In particular, if |i> and |j> are orthonormal bases for the
𝑎𝑐
𝑎 𝑐 𝑎𝑑
Let us suppose, |α> =( ) |β> =( ) then the tensor product |α> ⊗ |β> = ( 𝑏𝑐 )
𝑏 𝑑
𝑏𝑑
Quantum gates:
Classical computer circuits are constructed with wires and logic gates. The wires are to carry
information and the logic gates perform manipulations of the information, converting it from
one form to another. Analogous to this idea, a quantum computer is built from a quantum
circuit containing wires and elementary quantum gates to carry around and manipulate the
quantum information. In this section, we introduce various quantum gate and illustrate their
The common one input classical gate is NOT gate, which converts the bit 0 to 1 and 1 to 0.
Analogous to the classical NOT gate we have the quantum NOT gate, which converts |0> to
|1> and |1> to |0>. Single qubit gates are represented by 2×2 matrices and the only constraint
is that the matrix representing the single qubit gate must be unitary. The NOT operation can
0 1
𝑋=( )
1 0
Another important single qubit gate is the phase-flip gate which leaves |0> unchanged and
flips the sign of |1> to give −|1>. It is represented by the Pauli Z matrix.
1 0
𝑍= ( )
0 −1
Another single qubit gate is Hadamard gate. It is one of the most useful quantum gates which
turns |0> into (|0> + |1>)/√2 and turns |1> into (|0> - |1>)/√2.
1 1 1
𝐻= ( )
√2 1 −1
Multiple qubit gate:
In classical computation, most notable multiple bit classical gates are AND, OR, XOR
(exclusive OR), NAND and NOR. Among them, NAND and NOR gate are called the
Universal gate because, any function on bits can be computed with the combination of
NAND gates or NOR gates only. The prototypical multi-qubit quantum logic gate is the
controlled-NOT or CNOT gate, which has two input qubits, known as the control qubit and
the target qubit. The matrix representation of the controlled-NOT, UCN, in the basis {|00>,
1 0 0 0
UCN = (0 1 0 0)
0 0 0 1
0 0 1 0
If the control qubit is set to 0, then the target qubit is left alone. If the control qubit is set to 1,
then the target qubit is flipped. So, the action of the Hadamard gate can be described as,
|00 >→ |00 >; |01 >→ |01 >; |10 >→ |11 >; |11 >→ |10 >.
Circuit diagram of a CNOT gate is shown below:
There are many interesting quantum gates other than the controlled-NOT. However, in a
sense the controlled-NOT and single qubit gates are the prototypes for all other gates because
any multiple qubit gate may be composed from CNOT and single qubit gates.
Chapter II: Quantum measurement
theory and Density operator
Quantum Measurement Theory:
has a profound impact on a quantum mechanical system, as it changes the state of a system
through measurement. Closed quantum systems evolve according to unitary evolution which
with the surroundings makes the system no longer closed, and thus the evolution is not
always unitary. In this section, we are going to describe measurement models to extract
Generalized measurements:
measurement is made on the state |ψ> of the quantum system then the probability that result
†
m occurs is given by p(m) = < 𝜓|𝑀𝑚 𝑀𝑚 |𝜓 > and the state after measurement is given by,
𝑀𝑚 |𝜓>
|𝜓´ >= †
<𝜓|𝑀𝑚 𝑀𝑚 |𝜓>
†
∑ 𝑀𝑚 𝑀𝑚 = 1
𝑚
Projective measurement:
space of the system being observed. The observable has a spectral decomposition
𝑀 = ∑𝑚 𝑚𝑃𝑚 , where Pm is the projector onto the eigenspace of M with eigenvalue m. The
p(m) = < 𝜓|𝑃𝑚 |𝜓 >. The state immediately after the measurement is given by,
𝑃𝑚 |𝜓>
|ψ´> =
√𝑃𝑚
Projective Measurements are special cases of General measurements when the measurement
A type of measurement that is more general than the projective measurements is known as a
formalism, providing a rule describing the measurement statistics, i.e. the respective
probabilities of the different possible measurement outcomes and also a rule describing the
quantum system in the state |ψ>. Then the probability of outcome m is given by,
†
p(m) = < 𝜓|𝑀𝑚 𝑀𝑚 |𝜓 >.
†
Suppose we define, 𝐸𝑚 = 𝑀𝑚 𝑀𝑚 .
𝐸𝑚 is a positive operator such that ∑𝑚 𝐸𝑚 = I and 𝑝(𝑚) =< 𝜓|𝐸𝑚 |𝜓 >. Thus, the set of
outcomes. The operators 𝐸𝑚 are known as the POVM elements associated with the
An alternate formulation of quantum theory is possible using a tool known as the density
operator or density matrix. It is mathematically equivalent to the state vector approach, but it
is much more convenient and acts as a tool for the description of individual subsystems of a
composite quantum system. In this section, we will introduce the density operator, its general
Suppose a quantum system is in one of the n possible number of states |𝜓𝑖 >, where i is an
index, with respective probabilities 𝑝𝑖 . {𝑝𝑖 , |𝜓𝑖 >} is an ensemble of pure states and density
operator for this pure state is defined as 𝜌𝑖 = |𝜓𝑖 >< 𝜓𝑖 |. The density operator for the entire
The expectation value of an operator A can be written in terms of the density operator in an
= 𝑇𝑟(𝜌𝐴)
• Tr(ρ)=1.
perform a measurement described by measurement operators Mm. If the initial state was
†
p(m|i) =< 𝜓𝑖 |𝑀𝑚 𝑀𝑚 |𝜓𝑖 >
†
= 𝑇𝑟(𝑀𝑚 𝑀𝑚 |𝜓𝑖 >< 𝜓𝑖 |)
By the law of total probability, the probability of obtaining result m is given by,
𝑝(𝑚) = ∑𝑖 𝑝(𝑚|𝑖)𝑝𝑖
†
= ∑𝑖 𝑝𝑖 𝑇𝑟(𝑀𝑚 𝑀𝑚 |𝜓𝑖 >< 𝜓𝑖 |)
†
= 𝑇𝑟(𝑀𝑚 𝑀𝑚 𝜌)
In terms of general measurement operators, the state of the system immediately after
†
𝑀𝑚 𝜌𝑀𝑚
measurement is † .
𝑇𝑟(𝑀𝑚 𝑀𝑚 𝜌)
• A mixed state is a classical statistical mixture of two or more states. The state has no
coherences therefore, the off-diagonal terms of the density operator are zero.
• To check whether the density operator is representing a pure state or a mixed state is
operator.
Suppose we have physical systems A and B. The complete state of the system contains
implement the partial trace, we compute the trace by summing over the basis states of one
subsystem alone.
The reduced density operator for system A is defined by 𝜌 𝐴 = 𝑇𝑟𝐵 (𝜌 𝐴𝐵 ) where 𝑇𝑟𝐵 is a map
of operators known as the partial trace over system B. The partial trace is defined by,
Where |a1>, |a2> are any two vectors in the state space of A, and |b1> and |b2> are any two