Unit IV (2)
Unit IV (2)
COMPUTING
Course Outcomes (CO):
At the end of this course, students will be able
1. To describe the basic principles of quantum computing.
2. To analyse some simple quantum circuits.
4.1 QUANTUM COMPUTING: EXPLORING THE NEED AND THE CONCEPT
62
new class of machines has emerged roughly every ten years, as shown in the figure below.
63
• Simulating molecular interactions for drug discovery.
• Optimizing intricate systems like supply chains and financial portfolios.
• Breaking cryptographic codes designed to resist classical methods.
One of the leading alternatives that promises a significant leap in computing power—without
being constrained by the end of Moore’s law—is a novel computational paradigm known as
quantum computation.
Even though the field of quantum computing is at the developing stage, there are instances
where quantum computers (currently with few number of qubits) outperform the classical
counterparts. Here are some examples:
a) In October 2019, Google AI Quantum, with the help of NASA, became the first to claim to
have achieved quantum supremacy by performing calculations on the Sycamore quantum
computer more than 3,000,000 times faster than they could be done on “Summit”, generally
considered the world's fastest computer.
b) In December 2020, a group at USTC (China) implemented a type of Boson sampling on 76
photons with a photonic quantum computer, Jiuzhang, to demonstrate quantum supremacy.
The authors claim that a classical contemporary supercomputer would require a
computational time of 600 million years to generate the number of samples their quantum
processor can generate in 20 seconds.
c) A quantum algorithm called the Shor’s algorithm, forward by Peter Shor, can efficiently
find prime factors of an integer. Factoring is believed to be hard for classical computers
and the best-known classical algorithm for factoring runs in subexponential time. Shor’s
algorithm is one of the few known quantum algorithms with compelling potential
applications and strong evidence of superpolynomial speedup compared to best-known
classical algorithms. (Currently, this algorithm is not fully exploited because factoring
numbers of practical significance requires far more qubits than presently available.)
64
Figure: A qubit in |0⟩ state, |1⟩ state and superposed state
The difference between bits and qubits is that a qubit can be in a state other than |0⟩ or |1⟩. It
is also possible to form linear combinations of states, often called superpositions:
|𝜓⟩ = 𝛼|0⟩ + 𝛽|1⟩
where the coefficients 𝛼 and 𝛽 are in general complex numbers.
The ability of a qubit to exist in a superposed state defies our ‘common sense’ understanding
of the physical world. In contrast, a classical bit is analogous to a coin: it can be either heads
or tails, but never both simultaneously. By contrast, a qubit can exist in a continuum of
superposed states of |0⟩ and |1⟩ – until it is observed (or measured).
However, you need to remember one important fact regarding quantum systems: Suppose a
quantum system is in a superposed state |𝜓⟩ = 𝛼|0⟩ + 𝛽|1⟩ and, now if you try to measure the
state of this system, you will always get either |0⟩ or |1⟩ because of your measurement. i.e., we
cannot examine a qubit to determine its quantum state, that is, the values of α and β. Instead,
quantum mechanics tells us that we can only acquire much more restricted information about
the quantum state. When we measure a qubit, we get either the result |0⟩, with probability |𝛼|2,
or the result |1⟩, with probability |𝛽|2. Since the probabilities must sum to one, the coefficients
𝛼 and 𝛽 must satisfy the normalization condition: |𝛼|2 + |𝛽|2 = 1. Geometrically, we can
interpret this as the condition that the qubit’s state be normalized to length 1. Thus, in general
a qubit’s state is a unit vector in a two-dimensional complex vector space. This contradiction
between the unobservable state of a qubit and the observations we can make lies at the heart of
quantum computation and quantum information.
4.1.3 Classical and Quantum Computation
Computers are designed to store and process information. Most conventional computers follow
the von Neumann architecture, which integrates input and output devices, memory, a
processing unit, and a control unit. This architecture enables flexible information storage and
processing through programs that encode sequences of instructions. These principles also apply
to proposed quantum computers. However, the key difference lies in how the two types of
devices represent and manipulate information.
65
Classical Computing Quantum Computing
Traditional computers operate in accordance Quantum computers obey laws of quantum
with the laws of classical physics. mechanics.
The basic unit of classical information is a The fundamental unit of quantum
bit, which can take values 0 or 1. information theory is a two-state system
known as a qubit (quantum bit).
Classical computers store information in the A qubit can exist in a quantum state ∣0⟩ or
form of sequence of bits. ∣1⟩, analogous to a classical bit with values 0
and 1. What makes qubits unique is that they
can also exist in a general state
∣ψ⟩=α∣0⟩+β∣1⟩, a superposition of ∣0⟩ and ∣1⟩,
where α and β are complex numbers
representing probability amplitudes. This
superposition property, which has no
classical counterpart, allows qubits to encode
and process information in fundamentally
different ways.
Consider a register/memory with 𝑁 binary Quantum computers encode information into
digits (bits). This can represent 𝒩 = 2𝑁 the quantum state of a composite system,
different numbers. But at any instant, the consisting of a number of qubits.
register will be in one of these 𝒩 = 2𝑁
states. An 𝑁-bit quantum register contains 𝒩 = 2𝑁
qubits. The state of the register is then
formed using the basis states
|0⟩, |1⟩, |2⟩, … |2𝑁 − 1⟩.
Just as the individual qubits, the register may
be brought into a superposition of the
computational basis states. For instance, one
can form the state
2𝑁 −1
66
manipulated at once by a single physical
operation on the register. This feature is
sometimes described as quantum
parallelism, which is again absent in the
classical counterpart.
The basic unit of classical computation is a The basic unit of quantum computation is a
logic gate. Logic gates transforms the bits quantum gate. All quantum gates are
(numbers) stored in the register into any represented by unitary operators, |𝜓𝑓 ⟩ =
other number in the same range. 𝑈|𝜓𝑖 ⟩, where is the |𝜓𝑖 ⟩ initial state of the
Examples of logical gates are NOT, AND, register, and |𝜓𝑓 ⟩ is the final state of the
OR, XOR, NAND, etc. register.
Examples of quantum gates are the Pauli
gates (X, Y & Z), Hadamard gate, etc.
Most of the classical gates are irreversible – Because unitary operators can be inverted, all
knowing only the output, it is impossible to quantum gates are reversible.
infer the input.
Classical processors can work at room Most of the quantum processors has to be
temperature. maintained at temperatures close to 0K.
Classical computation is less prone to error Quantum computation is far more error and
and noise. noise prone than classical computation.
Various error correction algorithm and Quantum error correction algorithms and
protocols available. protocols are in the development stage.
67
4.1.4 Single Particle Interference
68
Single-particle interference is a fascinating phenomenon in quantum mechanics that highlights
the wave-particle duality of matter. It demonstrates that even individual particles, such as
photons, electrons, or other quantum objects, can produce interference patterns typically
associated with waves. Consider a double-slit arrangement illuminated by a stream of electrons.
When electrons are sent through only one of the slits, the distribution of electrons on the screen
is smooth, forming a bell-shaped curve, as expected for classical particles. However, when both
slits are open, the distribution exhibits rapid variations, forming an interference pattern.
Importantly, this interference pattern is independent of the intensity of the electron beam.
Experiments have shown that even with beams so weak that electrons are sent one at a time
(i.e., each electron is sent only after the previous one reaches the screen), the interference
pattern reappears if both slits remain open and enough impacts are collected on the screen over
time. So, in spite of their discreteness, the electrons seem to interfere with themselves; this
means that each electron seems to have gone through both slits at once!
One might ask: if an electron cannot be split, how can it appear to go through both slits at once?
To investigate this, we can perform an experiment to determine the slit through which the
electron actually travels. This experiment involves placing a strong light source behind the wall
containing the slits, as illustrated in the figure below.
Since electric charges scatter light, an electron passing through either slit will scatter light,
making its path observable. However, when we record the counts with both slits open, we find
that the resulting distribution resembles that of classical particles—the interference pattern
disappears. If we turn off the light source, the interference pattern reappears. From this
experiment, we conclude that the mere act of observing the electrons significantly affects their
69
distribution on the screen. Electrons are extremely delicate; their motion is altered when they
are observed. This demonstrates a key principle of quantum mechanics: measurements interfere
with the states of microscopic objects
For the electrons that display interference, it is impossible to identify the slit that each electron
had gone through. This experimental finding introduces a new fundamental concept: the
microphysical world is indeterministic. Unlike classical physics, where we can follow
accurately the particles along their trajectories, we cannot follow a microscopic particle along
its motion, nor can we determine its path. It is technically impossible to perform such detailed
tracing of the particle’s motion. Such results inspired Heisenberg to postulate the uncertainty
principle, which (in this context) states that it is impossible to design an apparatus which allows
us to determine the slit that the electron went through without disturbing the electron enough
to destroy the interference pattern.
In quantum theory how do we account for the existence of the interference pattern in the double
slit experiment with material particles such as electrons? It can be answered by using the
concept of wave function (or state vector) together with the superposition principle.
We denote the state of this system using a probability amplitude 𝜓1 for electrons when slit 2 is
closed and an amplitude 𝜓2 for electrons when slit 1 is closed. We then have in analogy with
waves
𝐼1 = |𝜓1 |2
𝐼2 = |𝜓2 |2
When both slits 1 and 2 are open, and no measurement is made with respect to the paths taken
by the electrons (without light source), then the state of the system is given by the probability
amplitude
𝜓12 = 𝜓1 + 𝜓2
This is called the superposition principle. It is the superposed amplitude 𝜓12 that determines
the outcome when no measurement is performed. When both slits 1 and 2 are open, and no
measurement is made, the resultant distribution 𝐼12 is the square of modulus of the sum of 𝜓1
and 𝜓2 . Hence
𝐼12 = |𝜓12 |2 = |𝜓1 + 𝜓2 |2 = |𝜓1 |2 + |𝜓2 |2 + 𝜓1∗ 𝜓2 + 𝜓1 𝜓2∗
= 𝐼1 + 𝐼2 + 𝜓1∗ 𝜓2 + 𝜓1 𝜓2∗ ≠ 𝐼1 + 𝐼2
The additional term 𝜓1∗ 𝜓2 + 𝜓1 𝜓2∗ gives rise to an interference pattern similar to light waves.
The superposition of states provides a clear explanation for the quantum interference pattern.
When both slits are open, the system can be described as a superposition of the states
70
corresponding to the electron passing through each slit individually. It is this superposition that
gives rise to the interference pattern. However, if an attempt is made to determine which path
the electron takes, the system's state collapses, and the interference pattern disappears. By
leveraging the principle of superposition, quantum computers achieve unprecedented gains in
computing power, enabling them to solve certain problems far more efficiently than classical
computers.
4.2 MATHEMATICAL BASIS OF QUANTUM MECHANICS
Up to now, we have represented the state of a quantum mechanical system using a mathematical
function called the wave function. But, at a more fundamental level, the state of a quantum
mechanical system is represented by a vector in a linear vector space (or more specifically, in
an Hilbert space) and physical observables (like position, momentum, energy, etc.) are
represented by Hermitian operators that act on the vectors in a linear vector space. By
representing states using vectors, mathematical analysis of quantum mechanical systems
sometimes becomes easier and sometimes the only way possible.
Linear algebra is the study of vector spaces and of linear operations on those vector spaces. For
a good understanding of quantum mechanics, a solid grasp of elementary linear algebra is
necessary.
Generally, a vector is a physical/geometric entity having magnitude and direction, usually
represented by a directed line segment (usually called Euclidean vectors). There exits various
mathematical operations that can be performed on vectors: add or subtract, multiply it by a
scalar, take dot product, rotate, represent by matrix, etc. Linear vector spaces, generalises the
concept of vectors. Once we define a linear vector space, we will see that various mathematical
objects like matrices, functions, polynomial, etc. can be treated as vectors similar to Euclidean
vectors and hence various operations defined on Euclidean vectors could be extended to these
generalised vectors.
4.2.1 Linear Vector Spaces (LVS)
A linear vector space 𝑉 over the field of complex numbers ℂ is a non-empty set of elements
called vectors.
On 𝑉, two operations – vector addition and scalar multiplication are defined. The addition
operation has to be closed, commutative and associative. Also 𝑉 should contain a zero vector
(denoted as 0, called the additive identity) and each element in 𝑉 need to have its (additive)
inverse. The scalar multiplication should obey the properties – closure, associativity,
distributivity and existence of multiplicative identity.
71
Vector space of prime importance in quantum computation is 𝐶 𝑛 , the set of all complex column
matrices of order (𝑛 × 1). It is easy to show that this set form an LVS.
Another vector space which is used in quantum computing is the set of all complex row
matrices of order (1 × 𝑛).
4.2.2 Dirac Notation (Bracket Notation)
The standard quantum mechanical notation (called the Dirac notation) for a vector in a vector
space is the following:
|𝜓⟩
𝜓 is a label for the vector (any label is valid, although we prefer to use simple labels like 𝜓 and
𝜙). The | ⋅⟩ notation is used to indicate that the object is a vector. The entire object |𝜓⟩ is
sometimes called a ket or a ket vector. Now onwards, we will use the Dirac notation to represent
all vectors, except a special vector, the zero vector, which will be denoted as 0 and not |0⟩. The
reason for making this exception is because we will reserve the vector denoted as |0⟩ to
represent one of states of a qubit, which will be introduced later.
4.2.3 Linear Dependence and Independence of vectors
Consider a subset of non-zero vectors |𝑣1 ⟩, |𝑣2 ⟩,… , |𝑣𝑛 ⟩ ∈ 𝑉 and consider a relation among
these vectors as given below:
𝑎1 |𝑣1 ⟩ + 𝑎2 |𝑣2 ⟩ + ⋯ + 𝑎𝑛 |𝑣𝑛 ⟩ = 0 … (1),
where 𝑎1 , 𝑎2 , … 𝑎𝑛 are unknown scalars.
• The vectors |𝑣1 ⟩, |𝑣2 ⟩,… , |𝑣𝑛 ⟩ are said to be linearly independent if the only solution
to equation (1) is
𝑎1 = 0, 𝑎2 = 0, … , 𝑎𝑛 = 0
• If non-zero solutions to Eq.(1) exists, then the vectors |𝑣1 ⟩, |𝑣2 ⟩,… , |𝑣𝑛 ⟩ are linearly
dependent.
In other words, a subset of vectors are said to be linearly independent, if none of the vectors
can be written as a linear combination of remaining other vectors belong to that subset.
4.2.4 Basis and Dimension
A set of linearly independent vectors |𝑣1 ⟩, |𝑣2 ⟩,… , |𝑣𝑛 ⟩ ∈ 𝑉 is said to form a basis (basis set,
spanning set) for 𝑉 if any vector |𝑣⟩ ∈ 𝑉 can be written as a linear combination of vectors in
the basis set as follows:
|𝑣⟩ = 𝑎1 |𝑣1 ⟩ + 𝑎2 |𝑣2 ⟩ + ⋯ + 𝑎𝑛 |𝑣𝑛 ⟩
72
Here the expansion coefficients 𝑎1 , 𝑎2 , … , 𝑎𝑛 are in general complex numbers. The vectors
|𝑣1 ⟩, |𝑣2 ⟩,… , |𝑣𝑛 ⟩ are called the basis vectors and we say that these vectors span the entire
vector space 𝑉.
The dimension of a vector space is the number of basis vectors in a basis set.
Generally, a vector space may have many more than one basis sets. It can be shown that any
two sets of linearly independent vectors can independently span the same vector space 𝑉, and
that they contain the same number of elements.
Example:
For simplicity, let us take the vector space 𝐶 2 , i.e. the space of all complex column matrices of
order (2 × 1). 𝐶 2 will contains vectors of the form
𝑧
|𝑣⟩ = (𝑧1 ) ,
2
where 𝑧1 and 𝑧2 are complex numbers. The basis set for this space is set consisting of the
vectors
73
4.2.5 Inner product
Given a vector space, it is sometimes possible to define an additional structure on this space
called the inner product.
An inner product is a function which takes as input two vectors |𝑣⟩ and |𝑤⟩ from a vector space
and produces a complex number as output.
The inner product of any two vectors, say |𝑣⟩ and |𝑤⟩, in Dirac notation is denoted as
⟨𝑤|𝑣⟩
The inner product has to satisfy the following requirements:
1) ⟨𝑤|𝑣⟩ = ⟨𝑣|𝑤⟩∗
2) ⟨𝑤|𝑎1 𝑣1 + 𝑎2 𝑣2 ⟩ = 𝑎1 ⟨𝑤|𝑣1 ⟩ + 𝑎2 ⟨𝑤|𝑣2 ⟩
3) ⟨𝑎1 𝑤1 + 𝑎2 𝑤2 |𝑣⟩ = 𝑎1∗ ⟨𝑤1 |𝑣⟩ + 𝑎2∗ ⟨𝑤2|𝑣⟩
4) ⟨𝑣|𝑣⟩ ≥ 0, with equality if and only if |𝑣⟩ = 0.
Vector spaces equipped with an inner product are called inner product spaces.
Example:
𝑧1 𝑦1
⋮
Consider the space 𝐶 . For any two vectors |𝑣⟩ = ( ) and |𝑤⟩ = ( ⋮ ) in 𝐶 𝑛 , the inner
𝑛
𝑧𝑛 𝑦𝑛
product can be defined by
𝑧1
⟨𝑤|𝑣⟩ = (𝑦1∗ ⋯ 𝑦∗𝑛 ) ( ⋮ ) = ∑ 𝑦𝑖∗ 𝑧𝑖
𝑧𝑛 𝑖
It is easy to show that the above rule satisfies all the requirements for an inner product.
4.2.6 Hilbert Space
Discussions of quantum mechanics often refer to Hilbert space. In the finite dimensional
complex vector spaces that come up in quantum computation and quantum information, a
Hilbert space is exactly the same thing as an inner product space. From now on, we use the two
terms interchangeably.
4.2.7 Norm, Normal (Unit) vectors, Orthogonal vectors, Orthonormal vectors
We define the norm of a vector |𝑣⟩ (denoted by ‖|𝑣⟩ ‖ ) as
‖|𝑣⟩ ‖ = √⟨𝑣|𝑣⟩
A vector |𝑣⟩ will be called a normal or unit vector if ‖|𝑣⟩ ‖ = 1. We also say that |𝑣⟩ is
normalized if ‖|𝑣⟩ ‖ = 1.
Two vectors |𝑣⟩ and |𝑤⟩ are said to be orthogonal if their inner product is zero:
⟨𝑤|𝑣⟩ = 0 .
74
Two vectors |𝑣1 ⟩ and |𝑣2 ⟩ are said be orthonormal if the following conditions are
simultaneously satisfied:
‖|𝑣1 ⟩ ‖ = 1 ‖|𝑣2 ⟩ ‖ = 1 ⟨𝑣2 |𝑣1 ⟩ = 0 .
The above conditions can be written in a compact form as:
⟨𝑣𝑖 |𝑣𝑗 ⟩ = 𝛿𝑖𝑗 ,
where 𝑖, 𝑗 = 1,2 and 𝛿𝑖𝑗 is the Kronecker delta symbol.
A set of vectors forms an orthonormal set, if each vector in this set is a unit vector, and distinct
vectors in this set are orthogonal to each other.
4.2.8 Orthonormal basis set
If the basis set {|𝑣1 ⟩, |𝑣2 ⟩,… , |𝑣𝑛 ⟩} of a vector space 𝑉 is an orthonormal set, then this basis
set will be called an orthonormal basis set.
1 0
For example, the basis set {|𝑣1 ⟩ ≡ ( ) , |𝑣2 ⟩ ≡ ( )} of 𝐶 2 is an orthonormal basis set. It is
0 1
easy to verify that this basis set is an orthonormal basis set.
4.2.9 Matrix Representation of a ket vector
We have seen that any vector |𝑣⟩ ∈ 𝑉 can be written as a linear combination of vectors in the
basis set {|𝑣𝑖 ⟩} as:
|𝑣⟩ = 𝑎1 |𝑣1 ⟩ + 𝑎2 |𝑣2 ⟩ + ⋯ + 𝑎𝑛 |𝑣𝑛 ⟩
Here the expansion coefficients 𝑎1 , 𝑎2 , … , 𝑎𝑛 are in general complex numbers. If the basis is
an orthonormal basis, then these expansion coefficients 𝑎𝑖 are given by
𝑎𝑖 = ⟨𝑣𝑖 |𝑣⟩
Now if we arrange these expansion coefficients in the form a column matrix, we get the matrix
representation of the ket |𝑣⟩:
𝑎1 ⟨𝑣1 |𝑣⟩
𝑎
|𝑣⟩ ≡ ( 2 ) = (⟨𝑣2 |𝑣⟩)
⋮ ⋮
𝑎𝑛 ⟨𝑣𝑛 |𝑣⟩
Similarly if we consider another vector |𝑤⟩ ∈ 𝑉 with |𝑤⟩ = 𝑏1 |𝑣1 ⟩ + 𝑏2 |𝑣2 ⟩ + ⋯ + 𝑏𝑛 |𝑣𝑛 ⟩,
(with 𝑏𝑖 = ⟨𝑣𝑖 |𝑤⟩) then the matrix representation of |𝑤⟩ is
𝑏1
|𝑤⟩ ≡ ( 𝑏2 )
⋮
𝑏𝑛
It is often easier to work with the components than with the abstract vectors themselves.
To add vectors (say |𝑣⟩ and |𝑤⟩), you add their corresponding components:
75
𝑎1 𝑏1
𝑎2
|𝑣⟩ + |𝑤⟩ = ( ) + (𝑏2 )
⋮ ⋮
𝑎𝑛 𝑏𝑛
To multiply by a scalar you multiply each component:
𝑧𝑎1
𝑧𝑎2
𝑧|𝑣⟩ = ( )
⋮
𝑧𝑎𝑛
The zero vector is represented by a string of zeroes:
0
0
0=( )
⋮
0
The components of the inverse vector have their signs reversed:
−𝑎1
−𝑎2
|−𝑣⟩ = ( )
⋮
−𝑎𝑛
Since we know how to define an inner product for the space of column matrices, the inner
product between any two abstract vectors (say |𝑣⟩ and |𝑤⟩) belonging to same 𝑉 can be
evaluated using their matrix representations:
𝑎1
𝑎
⟨𝑤|𝑣⟩ = (𝑏1∗ 𝑏2∗ ⋯ 𝑏𝑛∗ ) ( 2 ) = ∑ 𝑏𝑖∗ 𝑎𝑖
⋮
𝑎𝑛 𝑖
The only disadvantage of working with components is that you have to commit yourself to a
particular basis, and the same manipulations will look very different to someone using a
different basis.
4.2.10 Dual space/vector
The concept of dual space and dual vectors will be introduced using a matrix space as an
example.
Consider a vector space 𝑉 = {|𝑣⟩, |𝑢⟩, |𝑤⟩, … }, where each element is a 𝑛 × 1 column matrix
of the form:
𝛼1
𝛼2
|𝑣⟩ = ( ) ,
⋮
𝛼𝑛
where 𝛼𝑖 are complex numbers. Now let us take the Hermitian conjugate (complex conjugate
transpose) of the above vector:
76
𝛼1 †
𝛼
|𝑣⟩† ≡ ( 2 ) = (𝛼1∗ 𝛼2∗ … 𝛼𝑛∗ )
⋮
𝛼𝑛
Now the row matrix in the RHS do not belong to the vector space 𝑉, but it belongs to the vector
space consisting of all 1 × 𝑛 row vectors. We call this vector space formed by taking the
Hermitian conjugate of column vectors, the dual vector space 𝑉 ∗ . The vectors belonging to the
dual space are called dual vectors.
In the Dirac notation, dual vectors are denoted using the bra ⟨. | symbol:
⟨𝑣| ≡ |𝑣⟩†
Thus if we have a vector space 𝑉 = {|𝑣⟩, |𝑢⟩, |𝑤⟩, … }, we will have a corresponding dual space
𝑉 ∗ = {⟨𝑣|, ⟨𝑢|, ⟨𝑤|, … } consisting of dual vectors.
The dual vectors ⟨𝑣|, ⟨𝑢|, ⟨𝑤|, … are also called the bra vectors. The bra ⟨𝑣| is called the dual
of ket |𝑣⟩.
In general, the concept of dual vector space can be extended to any vector space.
If a ket |𝑣⟩ has the a matrix representation
𝑎1
𝑎2
|𝑣⟩ ≡ ( ) ,
⋮
𝑎𝑛
then the matrix representation of ⟨𝑣| is obtained by taking the Hermitian conjugate of the
column matrix for ⟨𝑣|:
𝑎1 †
𝑎2
⟨𝑣| ≡ ( ) = (𝑎1∗ 𝑎2∗ … 𝑎𝑛∗ )
⋮
𝑎𝑛
i.e. kets are represented by column matrices and bras are represented by row matrices.
Now the inner product, say ⟨𝑤|𝑣⟩, between two ket vectors |𝑤⟩ and |𝑣⟩ in 𝑉 can be
reinterpreted as the action of bra ⟨𝑤| (i.e. dual of |𝑤⟩ in 𝑉 ∗ ) on |𝑣⟩.
4.2.11 Operators
A linear operator on a vector space 𝑉 is a linear transformation: 𝑉 → 𝑉 of the vector space to
itself (i.e. it is a linear transformation which maps vectors in 𝑉 to vectors in 𝑉). I.e. for a vector
space 𝑉 = {|𝑣⟩, |𝑤⟩, … },
𝐴|𝑣⟩ = |𝑢⟩ ∈ 𝑉
𝐴(𝑎1 |𝑣⟩ + 𝑎2 |𝑤⟩) = 𝑎1 𝐴|𝑣⟩ + 𝑎2 𝐴|𝑤⟩
Linear operators can also act on bra vectors. If 𝑉 ∗ = {⟨𝑣|, ⟨𝑤|, … },
⟨𝑣|𝐴 = ⟨𝑡| ∈ 𝑉 ∗
77
(⟨𝑣|𝑎1 + ⟨𝑤|𝑎2 )𝐴 = ⟨𝑣|𝐴𝑎1 + ⟨𝑤|𝐴𝑎2
An important linear operator on any vector space 𝑉 is the identity operator, 𝐼, defined by the
equation 𝐼|𝑣⟩ ≡ |𝑣⟩ for all vectors |𝑣⟩.
Another important linear operator is the zero operator, which we denote 0. The zero operator
maps all vectors to the zero vector, 0|𝑣⟩ ≡ 0.
If 𝐴 and 𝐵 are two operators defined on 𝑉, then their product 𝐴𝐵 is defined as
(𝐴𝐵)|𝑣⟩ = 𝐴(𝐵|𝑣⟩) .
Similarly the product 𝐵𝐴 is defined as
(𝐵𝐴)|𝑣⟩ = 𝐵(𝐴|𝑣⟩) .
In general 𝐴𝐵 ≠ 𝐵𝐴. I.e. the operator products are not commutative.
4.2.12 Products involving a bra, an operator and a ket
In vector spaces, we sometimes encounter products of the form
⟨𝑢|𝐴|𝑣⟩ .
The above represents an inner product between |𝑢⟩ and 𝐴|𝑣⟩.
4.2.13 Matrix representation of operators
We know that any vector |𝑣⟩ ∈ 𝑉 can be expressed as a linear combination of orthonormal
basis vectors (|𝑣𝑖 ⟩, 𝑖 = 1, … , 𝑛) as
|𝑣⟩ = 𝑎1 |𝑣1 ⟩ + 𝑎2 |𝑣2 ⟩ + ⋯ + 𝑎𝑛 |𝑣𝑛 ⟩
The action of a linear operator 𝐴 on |𝑣⟩ is
𝐴|𝑣⟩ = 𝑎1 𝐴|𝑣1 ⟩ + 𝑎2 𝐴|𝑣2 ⟩ + ⋯ + 𝑎𝑛 𝐴|𝑣𝑛 ⟩
Therefore, the action of a linear operator 𝐴 on any vector |𝑣⟩ can be determined once the action
of 𝐴 on the basis vectors |𝑣𝑖 ⟩ are specified.
Now suppose, 𝐴|𝑣𝑖 ⟩ = |𝑤𝑖 ⟩, where |𝑤𝑖 ⟩ are kets in 𝑉. Since |𝑤𝑖 ⟩ ∈ 𝑉, |𝑤𝑖 ⟩ can be expanded in
the basis (|𝑣𝑖 ⟩, 𝑖 = 1, … , 𝑛). Hence, we have
𝐴|𝑣1 ⟩ = |𝑤1 ⟩ = 𝐴11 |𝑣1 ⟩ + 𝐴21 |𝑣2 ⟩ + ⋯ + 𝐴𝑛1 |𝑣𝑛 ⟩
𝐴|𝑣2 ⟩ = |𝑤2 ⟩ = 𝐴12 |𝑣1 ⟩ + 𝐴22 |𝑣2 ⟩ + ⋯ + 𝐴𝑛2 |𝑣𝑛 ⟩
⋮
𝐴|𝑣𝑛 ⟩ = |𝑤𝑛 ⟩ = 𝐴1𝑛 |𝑣1 ⟩ + 𝐴2𝑛 |𝑣2 ⟩ + ⋯ + 𝐴𝑛𝑛 |𝑣𝑛 ⟩
Or in a compact notation,
𝑛
78
The matrix whose entries are the values 𝐴𝑖𝑗 is said to form a matrix representation of the
operator 𝐴.
𝐴11 𝐴12 … 𝐴1𝑛
𝐴 𝐴22 … 𝐴2𝑛
𝐴 ≡ ( 21 )
⋮ ⋮ ⋮ ⋮
𝐴𝑛1 𝐴𝑛2 … 𝐴𝑛𝑛
This matrix representation of 𝐴 is completely equivalent to the operator 𝐴, and we will use the
matrix representation and abstract operator viewpoints interchangeably. If 𝐴 is an operator
defined on a vector space of dimension 𝑛, then the matrix representation of 𝐴 will be a square
matrix of dimension 𝑛 × 𝑛.
𝐴𝑖𝑗 are called the matrix elements of the operator 𝐴 in the |𝑣𝑖 ⟩ basis. It can easily be proved
that
𝐴𝑖𝑗 = ⟨𝑣𝑖 |𝐴|𝑣𝑗 ⟩ .
Suppose in a vectors space 𝑉 we have the relation
𝐴|𝑣⟩ = |𝑤⟩ .
If 𝑎𝑖 ’s are the components of the initial vector |𝑣⟩, 𝑏𝑖 ’s are the components of the final vector
|𝑤⟩ and 𝐴𝑖𝑗 are the elements of matrix representation of operator 𝐴, then the above relation can
be written in the matrix form
𝐴11 𝐴12 … 𝐴1𝑛 𝑎1 𝑏1
𝐴 𝐴22 … 𝐴2𝑛 𝑎 2 𝑏
( 21 ) ( ⋮ ) = ( 2)
⋮ ⋮ ⋮ ⋮ ⋮
𝐴𝑛1 𝐴𝑛2 … 𝐴𝑛𝑛 𝑎 𝑛 𝑏𝑛
In summary, for a vector space of dimension 𝑛, the ket vectors are represented by 𝑛-
dimensional column matrices, the bra vectors are represented by 𝑛-dimensional row matrices
and operators are represented by 𝑛 × 𝑛 square matrices. The advantage of matrix representation
is that the relations between abstract vectors and/or operators can be evaluated through simple
matrix algebra.
4.2.14 The Pauli matrices
The Pauli - 𝑋, & 𝑍 are some of the important operators (gates) used in quantum computing and
quantum information. These operators can be expressed in matrix form and are called Pauli
matrices.
These are 2 × 2 traceless matrices, which go by a variety of notations as given below:
0 1 0 −𝑖 1 0
𝜎1 ≡ 𝜎𝑥 ≡ 𝑋 ≡ ( ) ; 𝜎2 ≡ 𝜎𝑦 ≡ 𝑌 ≡ ( ) ; 𝜎3 ≡ 𝜎𝑧 ≡ 𝑍 ≡ ( )
1 0 𝑖 0 0 −1
1 0
Sometimes 𝜎0 ≡ 𝐼 ≡ ( ) is also included as the fourth Pauli matrix.
0 1
79
4.2.15 Eigenvectors and eigenvalues
An eigenvector of a linear operator 𝐴 on a vector space is a non-zero vector |𝑣⟩ such that
𝐴|𝑣⟩ = 𝑣|𝑣⟩ ,
where 𝑣 is a complex number known as the eigenvalue of 𝐴 corresponding to |𝑣⟩. It will often
be convenient to use the notation 𝑣 both as a label for the eigenvector, and to represent the
eigenvalue.
4.2.16 Adjoint operator
Suppose 𝐴 is any linear operator on a Hilbert space, 𝑉. It turns out that there exists a unique
linear operator 𝐴† on 𝑉 such that for all vectors |𝑣⟩, |𝑤⟩ ∈ 𝑉,
∗
(⟨𝑤|𝐴† |𝑣⟩) = ⟨𝑣|𝐴|𝑤⟩
This linear operator is known as the adjoint or Hermitian conjugate of the operator 𝐴.
From the definition it is easy to see that (𝐴𝐵)† = 𝐵 † 𝐴† .
By convention, if |𝑣⟩ is a vector, then we define: |𝑣⟩† ≡ ⟨𝑣|.
With this definition it is not difficult to see that (𝐴|𝑣⟩)† ≡ ⟨𝑣|𝐴† .
In the standard matrix representation, the matrix for 𝐴† is the complex conjugate transpose
(also called the ‘Hermitian conjugate’, or ‘adjoint’) of the matrix for 𝐴.
4.2.17 Hermitian Operator
An operator 𝐴 in a Hilbert space 𝑉 is called Hermitian (or self-adjoint) if
𝐴† = 𝐴
(i.e. it is equal to its own adjoint).
It can proved that the eigenvalues of a Hermitian operator are real and their eigenvectors form
a complete orthonormal basis. Hence if 𝐴 is a Hermitian operator and if |𝑎𝑖 ⟩ are the
eigenfunctions of 𝐴 corresponding to eigenvalues 𝑎𝑖 , (i.e. 𝐴|𝑎𝑖 ⟩ = 𝑎𝑖 |𝑎𝑖 ⟩), then any vector |𝜓⟩
can be expanded as
|𝜓⟩ = 𝑐1 |𝑎1 ⟩ + 𝑐2 |𝑎2 ⟩ + ⋯ + 𝑐𝑛 |𝑎𝑛 ⟩
In quantum mechanics, Hermitian operators represent physical observables like position,
momentum, energy, angular momentum, etc.
Hermitian operators are represented by Hermitian matrices.
4.2.18 Unitary Operator
An operator 𝑈 is said to be unitary if
𝑈𝑈 † = 𝑈 † 𝑈 = 𝐼
80
The time-evolution of the quantum states of closed systems if described by an unitary operator.
The unitary operators preserve inner products between vectors, and in particular, preserve the
norm of vectors.
In quantum computation, quantum gates have to be unitary.
Unitary operators are represented by unitary matrices.
4.2.19 Normal Operator
A linear operator 𝐴 is said to be a normal operator if
𝐴𝐴† = 𝐴† 𝐴
Notice that both unitary and Hermitian operators are normal. So most of the operators that are
important for quantum mechanics, and quantum computing,
are normal.
4.2.20 The Postulates of Quantum Mechanics
Quantum mechanics is a mathematical framework for the development of physical theories.
Quantum mechanics provide a mathematical and conceptual framework for the development
of physical laws. The formalism of quantum mechanics is based on a number of postulates.
These postulates are in turn based on a wide range of experimental observations. These
postulates cannot be derived; they result from experiment. They represent the minimal set of
assumptions needed to develop the theory of quantum mechanics. But how does one find out
about the validity of these postulates? Their validity cannot be determined directly; only an
indirect inferential statement is possible. For this, one has to turn to the theory built upon these
postulates: if the theory works, the postulates will be valid; otherwise they will make no sense.
Quantum theory not only works, but works extremely well, and this represents its experimental
justification. It has a very penetrating qualitative as well as quantitative prediction power; this
prediction power has been verified by a rich collection of experiments. So the accurate
prediction power of quantum theory gives irrefutable evidence to the validity of the postulates
upon which the theory is built.
State and state space of a quantum system: The first postulate of quantum mechanics sets
up the arena in which quantum mechanics takes place. The arena is our familiar concept from
linear algebra, the Hilbert space.
Postulate 1:
The state of any physical system is specified, at each time 𝑡, by a state vector |𝜓(𝑡)⟩ in a Hilbert
space; |𝜓⟩ contains (and serves as the basis to extract) all the needed information about the
system. Any superposition of state vectors is also a state vector.
81
Quantum mechanics does not tell us, for a given physical system, what the state space of that
system is, nor does it tell us what the state vector of the system is. Figuring that out for a
specific system is a difficult problem for which physicists have developed many intricate and
beautiful rules.
The simplest quantum mechanical system, and the system which we will be most concerned
with, is the qubit. A qubit has a two-dimensional state space. Suppose |0⟩ and |1⟩ form an
orthonormal basis for that state space. Then an arbitrary state vector in the state space can be
written
|𝜓⟩ = 𝑎|0⟩ + 𝑏|1⟩
where 𝑎 and 𝑏 are complex numbers. The condition that |𝜓⟩ be a unit vector implies ⟨𝜓|𝜓⟩ =
1, and is therefore equivalent to |𝑎|2 + |𝑏|2 = 1. The condition ⟨𝜓|𝜓⟩ = 1 is often known as
the normalization condition for state vectors.
We will take the qubit as our fundamental quantum mechanical system. For now, though, it is
sufficient to think of qubits in abstract terms, without reference to a specific realization. Our
discussions of qubits will always be referred to some orthonormal set of basis vectors, |0⟩ and
|1⟩, which should be thought of as being fixed in advance. Intuitively, the states |0⟩ and |1⟩ are
analogous to the two values 0 and 1 which a bit may take. The way a qubit differs from a bit is
that superpositions of these two states, of the form 𝑎|0⟩ + 𝑏|1⟩, can also exist, in which it is
not possible to say that the qubit is definitely in the state |0⟩, or definitely in the state |1⟩.
Postulate 2: Observables and operators
Postulate 1 states that the state of a quantum mechanical system is specified by a state vector
|𝜓⟩ in a Hilbert space. Postulate 2, specifies how to represent the physical quantities (like
energy, momentum, position, etc.) associated with a quantum mechanical system.
Every physically measurable quantity 𝐴, called an observable or dynamical variable, is
represented by a Hermitian operator 𝐴.
One of the consequences of this postulate is that the eigenvectors of this operator 𝐴 form a
complete orthonormal basis. Hence if 𝐴 is a observable and if |𝑎𝑖 ⟩ are the eigenfunctions of 𝐴
corresponding to eigenvalues 𝑎𝑖 , (i.e. 𝐴|𝑎𝑖 ⟩ = 𝑎𝑖 |𝑎𝑖 ⟩), then any vector |𝜓⟩ can be expanded as
|𝜓⟩ = 𝑐1 |𝑎1 ⟩ + 𝑐2 |𝑎2 ⟩ + ⋯ + 𝑐𝑛 |𝑎𝑛 ⟩
Postulate 3: Measurements and eigenvalues of operators
Postulate 3, gives insights on measurements and results of measurements on quantum systems.
82
Suppose a quantum system is in a state |𝜓⟩ and one tries to measure an observable 𝐴 on this
state. The only possible result of such a measurement is one of the eigenvalues 𝑎𝑖 (which are
real) of the operator 𝐴. Here the operator 𝐴 is required to satisfy the eigenvalue equation:
𝐴|𝑎𝑖 ⟩ = 𝑎𝑖 |𝑎𝑖 ⟩ (𝑖 = 1,2, … )
If the result of a measurement of 𝐴 on a state |𝜓⟩ is 𝑎𝑖 , the state of the system immediately
after the measurement changes to |𝑎𝑖 ⟩. This is called the collapse of the state vector (wave
function).
Postulate 4: Probabilistic outcome of measurements
When measuring an observable 𝐴 of a system in a state |𝜓⟩, the probability 𝑃𝑖 of obtaining one
of the eigenvalues 𝑎𝑖 of the corresponding operator 𝐴 is given by
|⟨𝑎𝑖 |𝜓⟩|2
𝑃𝑖 (𝑎𝑖 ) = ,
⟨𝜓|𝜓⟩
where |𝑎𝑖 ⟩ is the eigenstate of 𝐴 with eigenvalue 𝑎𝑖 . This can also be interpreted as the
probability to obtain the state |𝑎𝑖 ⟩ under measurement.
The above probability can also be defined as follows. We know that the eigenstates of a
Hermitian operator forms an orthonormal basis set. Hence, we can expand the given state |𝜓⟩
using the eigenvectors {|𝑎𝑖 ⟩} of 𝐴 as:
𝑛
|𝜓⟩ = ∑ 𝑐𝑖 |𝑎𝑖 ⟩
𝑖=1
Then the probability for obtaining the eigenstate |𝑎𝑖 ⟩ under measurement is
𝑃𝑖 = |𝑐𝑖 |2
Note: Whenever we are doing a measurement, we should always specify a basis in which we
are performing the measurement.
So, for example, consider a qubit in the state
1 1
|𝜓⟩ = |0⟩ + |1⟩
√2 √2
Suppose we measure the qubit in the {|0⟩, |1⟩} basis. Then the probability of getting the state
|0⟩ is
2
1 1
𝑃(|0⟩) = ( ) = ,
√2 2
and the probability of getting the state |1⟩ is
2
1 1
𝑃(|1⟩) = ( ) = .
√2 2
Evolution
83
How does the state, |𝜓⟩, of a quantum mechanical system change with time? The following
postulate (5 or 5’) gives a prescription for the description of such state changes.
Postulate 5:
The evolution of a closed quantum system is described by a unitary transformation. That is, the
state |𝜓⟩ of the system at time 𝑡1 is related to the state |𝜓′⟩ of the system at time 𝑡2 by a unitary
operator 𝑈 which depends only on the times 𝑡1 and 𝑡2 (and not on the state |𝜓⟩),
|𝜓′⟩ = 𝑈|𝜓⟩ .
Exactly what this operator 𝑈 is will depend on the particular system and the interactions that it
undergoes. Just as quantum mechanics does not tell us the state space or quantum state of a
particular quantum system, it does not tell us which unitary operators 𝑈 describe real world
quantum dynamics. Quantum mechanics merely assures us that the evolution of any closed
quantum system may be described in such a way. An obvious question to ask is: what unitary
operators are natural to consider? In the case of single qubits, it turns out that any unitary
operator at all can be realized in realistic systems.
Postulate 5 describes how the quantum states of a closed quantum system at two different times
are related. A more refined version of this postulate can be given which describes the evolution
of a quantum system in continuous time. From this more refined postulate we can recover
Postulate 5.
Postulate 5′:
The time evolution of the state of a closed quantum system is described by the Schrodinger
equation,
𝑑|𝜓⟩
𝑖ℏ = 𝐻|𝜓⟩ .
𝑑𝑡
In this equation, ℎ is a physical constant known as Planck’s. 𝐻 is an Hermitian operator known
as the Hamiltonian of the closed system.
What is the connection between the Hamiltonian picture of dynamics, Postulate 5′, and the
unitary operator picture, Postulate 5? The answer is provided by writing down the solution to
Schrodinger’s equation, which is easily verified to be:
−𝑖𝐻(𝑡2 − 𝑡1 )
|𝜓(𝑡2 )⟩ = exp [ ] |𝜓(𝑡1 )⟩ = 𝑈(𝑡1 , 𝑡2 )|𝜓(𝑡1 )⟩ ,
ℏ
where we define
−𝑖𝐻(𝑡2 − 𝑡1 )
𝑈(𝑡1 , 𝑡2 ) ≡ exp [ ]
ℏ
84
It can be easily proved that the operator in the RHS of the above equation is unitary, and
furthermore, that any unitary operator 𝑈 can be realized in the form 𝑈 = exp(𝑖𝐾) for some
Hermitian operator 𝐾. There is therefore a one-to-one correspondence between the discrete-
time description of dynamics using unitary operators, and the continuous time description using
Hamiltonians.
4.2.21 More on Measurement in Quantum Mechanics
In classical physics it is possible to perform measurements on a system without disturbing it
significantly. In quantum mechanics, however, the measurement process perturbs the system
significantly. While carrying out measurements on classical systems, this perturbation does
exist, but it is small enough that it can be neglected. In atomic and subatomic systems, however,
the act of measurement induces non-negligible or significant disturbances.
In the quantum world, the act of measurement generally changes the state of the system. In
theory we can represent the measuring device by an operator so that, after carrying out the
measurement, the system will be in one of the eigenstates of the operator. Consider a system
which is in a state |𝜓⟩. Before measuring an observable 𝐴, the state |𝜓⟩ can be represented by
a linear superposition of eigenstates |𝑎𝑖 ⟩ of the operator 𝐴:
𝑛
|𝜓⟩ = ∑ 𝑐𝑖 |𝑎𝑖 ⟩
𝑖=1
According to Postulate 4, the act of measuring 𝐴 changes the state of the system from |𝜓⟩ to
one of the eigenstates |𝑎𝑖 ⟩ of the operator 𝐴, and the result obtained is the eigenvalue 𝑎𝑖 with
probability 𝑃𝑖 = |𝑐𝑖 |2. The only exception to this rule is when the system is already in one of
the eigenstates of the observable being measured. For instance, if the system is in the eigenstate
|𝑎𝑖 ⟩, a measurement of the observable 𝐴 yields with certainty (i.e., with probability = 1) the
value 𝑎𝑖 without changing the state |𝑎𝑖 ⟩.
Before a measurement, we do not know in advance with certainty in which eigenstate, among
the various states |𝑎𝑖 ⟩, a system will be after the measurement; only a probabilistic outcome is
possible. The quantum wave function does not predict the results of individual measurements;
it instead determines the probability distribution, 𝑃 ∝ |𝜓|2 , over measurements on many
identical systems in the same state.
Finally, we may state that quantum mechanics is the mechanics applicable to objects for which
measurements necessarily interfere with the state of the system. Quantum mechanically, we
cannot ignore the effects of the measuring equipment on the system, for they are important. In
general, certain measurements cannot be performed without major disturbances to other
85
properties of the quantum system. In conclusion, it is the effects of the interference by the
equipment on the system, which is the essence of quantum mechanics.
4.2.22 Global Phase of State Vectors
Consider a qubit in a state
|𝜓⟩ = 𝑎|0⟩ + 𝑏|1⟩
If we measure this qubit in the computational basis, the probability of getting the result |0⟩ is
|𝑎|2 and the probability of getting the result |1⟩ is |𝑏|2 .
Now consider a state |𝜓′⟩, which differs from the state |𝜓⟩ only by a multiplicative factor of
unit modulus:
|𝜓′⟩ = 𝑒 𝑖𝜃 |𝜓⟩ = 𝑎𝑒 𝑖𝜃 |0⟩ + 𝑏𝑒 𝑖𝜃 |1⟩
If we measure this qubit in the computational basis, the probability of getting the result |0⟩ is
2 2
|𝑒 𝑖𝜃 𝑎| = |𝑎|2 and the probability of getting the result |1⟩ is |𝑒 𝑖𝜃 𝑏| = |𝑏|2 .
Thus we see that even though |𝜓⟩ and |𝜓′⟩ = 𝑒 𝑖𝜃 |𝜓⟩ are mathematically different vectors, no
measurement can distinguish the two vectors |𝜓⟩ and |𝜓′⟩: both represent the same quantum
(physical) state. i.e.
|𝜓⟩ ≡ |𝜓′⟩
This is an important point so let's state it again in a different way: No measurement (using any
basis) can distinguish between |𝜓⟩ and |𝜓′⟩ = 𝑒 𝑖𝜃 |𝜓⟩. Therefore, from an observational point
of view these two states are identical. The statistics of any measurements we could perform on
the state 𝑒 𝑖𝜃 |𝜓⟩ are exactly the same as they would be for the state |𝜓⟩.
In the above example, we say |𝜓⟩ and |𝜓′⟩ = 𝑒 𝑖𝜃 |𝜓⟩ are globally phase-equivalent. We call
the 𝑒 𝑖𝜃 term the global phase factor. In other words, we say that the two states |𝜓⟩ and |𝜓′⟩
differ only by a global phase factor.
In summary: If any two ket vectors (states) are globally phase equivalent (or differ only by a
multiplicative factor of unit modulus), from an observational point of view these two states are
identical and represent the same quantum state.
1 1 𝑖 𝑖
Example: Consider the states |𝜓⟩ = |0⟩ + |1⟩ and |𝜓′⟩ = |0⟩ + |1⟩. Are |𝜓⟩ and |𝜓′⟩
√2 √2 √2 √2
86
Thus we see that the states |𝜓⟩ and |𝜓′⟩ differ only by a multiplicative factor of unit modulus.
Hence, these two states are globally phase equivalent.
4.3 BASICS OF QUANTUM COMPUTATION
Thus a single qubit in the state |𝜓⟩ = 𝛼|0⟩ + 𝛽|1⟩ can be visualized as a point (𝜃, 𝜙) on a unit
sphere, where 𝛼 = cos 𝜃/2 , 𝛽 = 𝑒 𝑖𝜙 sin 𝜃/2). This is called the Bloch sphere representation,
87
and the vector with coordinates (cos 𝜙 sin 𝜃 , sin 𝜙 sin 𝜃 , cos 𝜃), which represents the state |𝜓⟩,
is called the Bloch vector.
The Bloch Sphere provides a useful means of visualizing the state of a single qubit, and often
serves as an excellent testbed for ideas about quantum computation and quantum information.
Many of the operations on single qubits can be neatly described within the Bloch sphere
picture. However, it must be kept in mind that this intuition is limited because there is no simple
generalization of the Bloch sphere known for multiple qubits.
4.3.2 Multiple Qubits
Suppose we have two qubits. If these were two classical bits, then there would be four possible
states, 00, 01, 10, and 11. Correspondingly, a two qubit system has four computational basis
states denoted by |00⟩, |01⟩, |10⟩, |11⟩. A pair of qubits can also exist in superpositions of
these four states,
|𝜓⟩ = 𝛼00 |00⟩ + 𝛼01 |01⟩ + 𝛼10 |10⟩ + 𝛼11 |11⟩ , (1.2)
where the expansion coefficients 𝛼𝑖𝑗 are complex numbers. Thus the quantum state of two
qubits involves associating a complex coefficient – sometimes called an amplitude – with each
computational basis state. (The notation, for e.g., |10⟩ means that this ket represents a state
composed of two qubits, with the first qubit in the state |1⟩ and the second qubit in the state
|0⟩.)
The significance of the expansion coefficients 𝛼𝑖𝑗 are as follows: If we measure the state |𝜓⟩,
2
we would get one of the basis states |𝑖𝑗⟩ (with 𝑖, 𝑗 = 0, 1) with probability |𝛼𝑖𝑗 | . Since the
sum of the probabilities must add to 1, the coefficients 𝛼𝑖𝑗 must satisfy the normalization
condition
2 2 2 2
𝛼00 + 𝛼01 + 𝛼10 + 𝛼11 =1
Or in other words, similar to the case for a single qubit, the measurement result 𝑥 (= 00, 01, 10
or 11) occurs with probability |𝛼𝑥 |2, with the state of the qubits after the measurement being
|𝑥⟩. The above normalization condition can also be written as
∑ |𝛼𝑥 |2 = 1 ,
𝑥∈{0,1}2
where the notation {0,1}2 means ‘the set of strings of length two with each letter being either
zero or one’.
Now, we can ask questions regarding measurements done on only one of the qubits of a two
qubit system. For e.g.:
88
I. Consider the state |𝜓⟩ as given in (1.2). What is the probability for finding the first
qubit in the state |0⟩? You can probably guess the answer: measuring the first qubit
alone gives |0⟩ with probability |𝛼00 |2 + |𝛼01 |2 .
II. Suppose your measurement on the first qubit of |𝜓⟩ returns the state |0⟩. What would
be the state |𝜓′⟩ post-measurement? The answer is
𝛼00 |00⟩ + 𝛼01 |01⟩
|𝜓′ ⟩ =
√|𝛼00 |2 + |𝛼01 |2
Note how the post-measurement state is re-normalized by the factor √|𝛼00 |2 + |𝛼01 |2 so that
it still satisfies the normalization condition, just as we expect for a legitimate quantum state.
Important two qubit states are the Bell states or EPR pairs (named after - Bell, and Einstein,
Podolsky, and Rosen – who first pointed out the strange properties of states like these)
These states are responsible for many surprises in quantum computation and quantum
information. They are key ingredient in quantum teleportation and superdense coding and the
prototype for many other interesting quantum states.
The Bell state |𝛽00 ⟩ has the property that upon measuring the first qubit, one obtains two
possible results: 0 with probability 1/2, leaving the post-measurement state |𝛽 ′ ⟩ = |00⟩ , and 1
with probability 1/2, leaving |𝛽 ′ ⟩ = |11⟩. As a result, a measurement of the second qubit
always gives the same result as the measurement of the first qubit. That is, the measurement
outcomes are correlated (entangled).
More generally, we may consider a system of n qubits. The computational basis states of this
system are of the form |𝑥1 𝑥2 𝑥3 … . 𝑥𝑛 ⟩ (where, each 𝑥𝑖 = 0 or 1), and so a quantum state of
such a system is specified by 2𝑛 amplitudes.
89
4.3.3 Matrix representation of qubit and multi-qubit states
As discussed earlier, the state of a qubit is a vector in a two-dimensional complex vector space.
The states |0⟩ and |1⟩ form an orthonormal basis for this vector space. The general state |𝜓⟩ of
a qubit can be written as a superposition
|𝜓⟩ = 𝛼|0⟩ + 𝛽|1⟩ .
The vectors in this 2-D vector space can be represented by (2 × 1) column matrices and
operators in this space are represented by (2 × 2) square matrices. In this representation the
basis vectors |0⟩ and |1⟩ can be represented as
For a two-qubit system, there are four independent states denoted as |00⟩, |01⟩, |10⟩ and |11⟩.
Thus the vector space corresponding to a 2-qubit system is four dimensional, where the vectors
|00⟩, |01⟩, |10⟩ and |11⟩ form the computational basis states (or the standard basis). The
vectors in this 4-D vector space can be represented by (4 × 1) column matrices and operators
in this space are represented by (4 × 4) square matrices. In this representation the basis vectors
|00⟩, |01⟩, |10⟩ and |11⟩ can be represented as
1 0 0 0
|00⟩ ≡ (0) |01⟩ ≡ (1) |10⟩ ≡ (0) |11⟩ ≡ (0)
0 0 1 0
0 0 0 1
Similarly for a three-qubit system, there are eight independent states denoted as |000⟩, |001⟩,
|010⟩, |011⟩, |100⟩, |101⟩, |110⟩ and |111⟩. Thus the vector space corresponding to a 3-qubit
system is eight dimensional, where the vectors |000⟩, |001⟩, |010⟩, |011⟩, |100⟩, |101⟩,
|110⟩ and |111⟩ form the computational basis states (or the standard basis). The vectors in this
8-D vector space can be represented by (8 × 1) column matrices and operators in this space are
represented by (8 × 8) square matrices. In this representation the basis vectors |000⟩, |001⟩,
|010⟩, |011⟩, |100⟩, |101⟩, |110⟩ and |111⟩ can be represented as
90
1 0 0 0
0 1 0 0
0 0 1 0
0
|000⟩ ≡ |001⟩ ≡ 0 |010⟩ ≡ 0 |011⟩ ≡ 1
0 0 0 0
0 0 0 0
0 0 0 0
(0) (0) (0) (0 )
0 0 0 0
0 0 0 0
0 0 0 0
|100⟩ ≡ 0 |101⟩ ≡ 0 |110⟩ ≡ 0 |111⟩ ≡ 0 .
1 0 0 0
0 1 0 0
0 0 1 0
(0) (0) (0 ) (1)
4.3.4 Quantum Gates
Changes occurring to a quantum state can be described using the language of quantum
computation.
Classical computer circuits consist of wires and logic gates. The wires are used to carry
information around the circuit, while the logic gates perform manipulations of the information,
converting it from one form to another.
91
Consider, for example, classical single bit logic gates. The only non-trivial member of this class
is the NOT gate, whose operation is defined by its truth table, in which 0 → 1 and 1 → 0, that
is, the 0 and 1 states are interchanged.
Analogously we can define the quantum NOT gate that take the state |0⟩ to the state |1⟩, and
vice versa. In fact, the quantum gate acts linearly, that is, it takes the state
𝛼|0⟩ + 𝛽|1⟩
to the corresponding state in which the role of |0and |1have been interchanged,
𝛼|1⟩ + 𝛽|0⟩ .
The circuit symbol for the 𝑋-gate is as shown below:
There is a convenient way of representing the quantum NOT gate in matrix form,
which follows directly from the linearity of quantum gates. Suppose we define a matrix 𝑋 to
represent the quantum NOT gate as follows:
0 1
𝑋≡[ ]
1 0
If the quantum state 𝛼|0⟩ + 𝛽|1⟩ is written in a vector notation as
𝛼
[𝛽 ]
with the top entry corresponding to the amplitude for |0⟩ and the bottom entry the amplitude
for |1⟩, then the corresponding output from the quantum NOT gate is
𝛼 0 1 𝛼 𝛽
𝑋 [𝛽 ] ≡ [ ][ ] = [ ] .
1 0 𝛽 𝛼
One way to interpret the matrix 𝑋 is as follows: under the action of the NOT gate, the column
vector corresponding to the basis state |0⟩ transform to the first column of 𝑋, and the column
vector corresponding to the basis state |1⟩ transform to the second column of 𝑋. (This concept
can be applied to other gates also.)
The 𝒀 gate (The Pauli-𝒀 gate):
The 𝑌 gate maps |0⟩ to 𝑖|1⟩ and |1⟩ to – 𝑖|0⟩. The effect of 𝑌 on a superposition is
𝑌(𝛼|0⟩ + 𝛽|1⟩) = −𝑖𝛽|0⟩ + 𝑖𝛼|1⟩
The matrix for 𝑌 gate is
0 −𝑖
𝑌≡[ ]
𝑖 0
The circuit symbol for the 𝑌-gate is as shown below:
92
The 𝒁 gate (The Pauli-𝒁 gate):
The 𝑍 gate leaves |0⟩ unchanged, and flips the sign of |1⟩ to give −|1⟩. The effect of 𝑍 on a
superposition is
𝑍(𝛼|0⟩ + 𝛽|1⟩) = 𝛼|0⟩ − 𝛽|1⟩
The matrix for 𝑍 gate is
1 0
𝑍≡[ ]
0 −1
The circuit symbol for the 𝑍-gate is as shown below:
93
The matrix for 𝑇 gate is
1 0
𝑇≡[ 𝑖𝜋/4 ]
0 𝑒
The circuit symbol for the 𝑇-gate is as shown below:
So quantum gates on a single qubit can be described by two by two matrices. Are there any
constraints on what matrices may be used as quantum gates? It turns out that there are. Recall
that the normalization condition requires |𝛼|2 + |𝛽|2 = 1 for a quantum state 𝛼|0⟩ + 𝛽|1⟩.
This must also be true of the quantum state |𝜓′ ⟩ = 𝛼′|0⟩ + 𝛽′|1⟩ after the gate has acted. It
turns out that the appropriate condition on the matrix representing the gate is that the matrix 𝑈
describing the single qubit gate be unitary, that is 𝑈 † 𝑈 = 𝐼, where 𝑈 † is the adjoint of 𝑈, and
𝐼 is the two by two identity matrix. For example, for the NOT gate it is easy to verify that
𝑋 † 𝑋 = 𝐼. Amazingly, this unitarity constraint is the only constraint on quantum gates. Any
unitary matrix specifies a valid quantum gate!
4.3.6 Multiple Qubit Gates
The CNOT (The CX) gate:
Now let us generalize from one to multiple qubits. First let us recall some of the familiar
multiple bit classical gates: AND, OR, XOR, NAND and NOR gates.
The prototypical multi-qubit quantum logic gate is the controlled-NOT or CNOT gate. This
gate has two input qubits, known as the control qubit and the target qubit, respectively.
The action of the CNOT gate is described as follows (In the discussion below we use this
convention: If the two qubit state is represented as |𝑥1 𝑥2 ⟩, the leftmost qubit (𝑥1 ) is the control
bit and the next qubit (𝑥2 ) is the target bit. In analysing quantum circuits, this convention need
not to be true.): If the control qubit is set to 0, then the target qubit is unchanged. If the control
qubit is set to 1, then the target qubit is flipped. In equations:
|00⟩ → |00⟩ ; |01⟩ → |01⟩ ; |10⟩ → |11⟩ ; |11⟩ → |10⟩ .
In general, the action of CNOT gate on an arbitrary basis state |𝐴𝐵⟩ can be summarized as
|𝐴𝐵⟩ → |𝐴, 𝐵 ⊕ 𝐴⟩, where ⊕ is addition modulo two. That is, the control qubit and the target
qubit are XORed and stored in the target qubit. This is exactly what the classical XOR gate
does. Thus we see that the CNOT is a generalization of the classical XOR gate.
The circuit symbol and the matrix representation (𝑈𝐶𝑁 ) of the CNOT gate is given in the figure
below. The top line represents the control qubit, while the bottom line represents the target.
94
You can easily verify that the first column of 𝑈𝐶𝑁 describes the transformation that occurs to
|00⟩, and similarly for the other computational basis states, |01⟩, |10⟩, and |11⟩.
As for the single qubit case, the requirement that probability be conserved is expressed in the
†
fact that 𝑈𝐶𝑁 is a unitary matrix, that is, 𝑈𝐶𝑁 𝑈𝐶𝑁 = 𝐼.
The Toffoli (CCNOT) gate:
A three-qubit gate that often appears in quantum computing is the Toffoli gate, or controlled-
controlled-NOT gate (CCNOT gate).
The action of the Toffoli or CCNOT gate is described as follows (In the discussion below we
use this convention: If the three qubit state is represented as |𝑥1 𝑥2 𝑥3 ⟩, the leftmost qubits
(𝑥1 and 𝑥2 ) are the control bits and the rightmost qubit (𝑥3 ) is the target bit. In analysing
quantum circuits, this convention need not to be true.): If either (or both) control qubits is (are)
set to 0, then the target qubit is unchanged. If the control qubits both are set to 1, then the target
qubit is flipped. In equations:
|000⟩ → |000⟩ ; |001⟩ → |001⟩ ; |010⟩ → |010⟩ ; |011⟩ → |011⟩
|100⟩ → |100⟩ ; |101⟩ → |101⟩ ; |110⟩ → |111⟩ ; |111⟩ → |110⟩
In general, the action of CNOT gate on an arbitrary basis state |𝐴𝐵𝐶⟩ can be summarized as
|𝐴𝐵𝐶⟩ → |𝐴, 𝐵, 𝐶 ⊕ 𝐴𝐵⟩, where ⊕ is addition modulo two.
It is tedious but not difficult to write this transformation out as an 8 by 8 matrix (as shown
above) and verify explicitly that 𝐶𝐶𝑁𝑂𝑇 is a unitary matrix, and thus the Toffoli gate is a
legitimate quantum gate.
95
4.3.7 Some remarks on quantum gates
Of course, there are many interesting multi-qubit quantum gates other than the controlled-NOT.
However, in a sense the CNOT and single qubit gates are the prototypes for all other gates
because of the following remarkable universality result: Any multiple qubit logic gate may be
composed from CNOT and single qubit gates.
It’s convenient to introduce another convention about quantum gates at this point. Suppose 𝑈
is any unitary matrix acting on some number 𝑛 of qubits, so 𝑈 can be regarded as a quantum
gate on those qubits. Then we can define a controlled-𝑈 gate which is a natural extension of
the controlled-NOT gate. This is shown in Figure below.
Such a gate has a single control qubit, indicated by the line with the black dot, and n target
qubits, indicated by the boxed 𝑈. If the control qubit is set to 0 then nothing happens to the
target qubits. If the control qubit is set to 1 then the gate 𝑈 is applied to the target qubits.
The prototypical example of the controlled-𝑈 gate is the controlled-NOT gate, which is a
controlled-𝑈 gate with 𝑈 = 𝑋, as illustrated in Figure below.
As previously described, this operation converts a single qubit state |𝜓⟩ = 𝛼|0⟩ + 𝛽|1⟩ into a
probabilistic classical bit 𝑀 (distinguished from a qubit by drawing it as a double-line wire),
which is 0 with probability |𝛼|2, or 1 with probability |𝛽|2.
96
4.3.8 Quantum Circuits
Quantum algorithms are most commonly described by a quantum circuit. A quantum circuit is
a model for quantum computation, where the steps to solve the problem are quantum gates
performed on one or more qubits.
A quantum circuit is a prescription for quantum operations we will perform on some set of
quantum data encoded in qubits. A quantum circuit consists of sequence of building blocks
(gates) that carry out computations. Each gate carry out elementary computations. A circuit as
a whole carry out complex computations.
97
gates that act on the qubits. A quantum gate acting on 𝑛 qubits has the input qubits carried to
it by 𝑛 wires, and 𝑛 other wires carry the output qubits away from the gate.
In the above figure, the rectangular box with the meter symbol at the rightmost end of the first
line, represent the measurement of a single output bit. All the output qubits need not be
measured in a quantum circuit.
Some simple quantum circuits are shown below:
1.
Here we have the input qubit in the |0⟩ state and it is carried on to an 𝑋-gate (quantum NOT
gate). Under the action of the 𝑋-gate, the input qubit is transformed to |1⟩ state. This output
state can be measured using a measurement operation as shown in the circuit below.
The output of the measurement will be with a 100% probability a classical bit 1 corresponding
to the ket |1⟩.
2.
Here we have the input qubit in the |0⟩ state and it is carried on to the first 𝑋-gate and is
transformed to a |1⟩ state. This transformed state is input to the second 𝑋-gate and we get the
state |0⟩ as the output. This output state can be measured using a measurement operation as
shown in the circuit below.
The output of the measurement will be with a 100% probability a classical bit 0 corresponding
to the ket |0⟩.
3.
Here we have the input qubit in the |0⟩ state and it is carried on to an 𝐻-gate (Hadamard gate).
Under the action of the 𝐻-gate, the input qubit is transformed to an equal superposition state
1
(|0⟩ + |1⟩). Now suppose we measure the output state using a measurement operation as
√2
98
As the outcome of the measurement, we would either get the classical bit 0 with probability
1/2 or the classical bit 1 with probability 1/2.
4. Example for a 2-qubit circuit:
In the above circuit the input state is |00⟩ (i.e. both the input qubits are in the |0⟩ state). The
first qubit passes through the 𝐻-gate and the transformed state is 1/√2 (|0⟩ + |1⟩). The second
qubit is carried on to the 𝑍-gate and the input state is not transformed. Hence the net output
state is 1/√2 (|0⟩ + |1⟩) |0⟩ = 1/√2 (|00⟩ + |10⟩).
5. 2-qubit circuit containing a CNOT gate:
The CNOT gate acts on two qubits, a control qubit (C) and a target qubit (T). In the above
circuit, the first qubit, which is the control qubit, is in state |1⟩. The second qubit, which is the
target qubit, is in the state |0⟩. Since the control qubit is |1⟩, the CNOT applies an 𝑋-gate to
the target qubit transforming it to the state |1⟩. The control qubit is carried to the output
untransformed. The net output is the two qubit state |1⟩|1⟩ = |11⟩.
6. SWAP gate/circuit:
Consider the quantum circuit at the left in the above figure. It consists of three CNOT’s in
succession. The given circuit accomplishes a simple but useful task – it swaps the states of the
two qubits. To see that this circuit accomplishes the swap operation, note that the sequence of
gates has the following sequence of effects on a computational basis state |𝑎, 𝑏⟩,
99
where all additions are done modulo 2. The figure below shows this in detail, where the states
above the wires shows the transformed qubit after the input qubit encounters each element in
the circuit and the state below the red vertical line shows the two qubit output state after each
CNOT.
The effect of this circuit, therefore, is to interchange the state of the two qubits.
Lastly, we list few features allowed in classical circuits that are not usually present in quantum
circuits:
First of all, we don’t allow ‘loops’, that is, feedback from one part of the quantum circuit to
another; we say the circuit is acyclic.
Second, classical circuits allow wires to be ‘joined’ together, an operation known as FANIN,
with the resulting single wire containing the bitwise OR of the inputs. Obviously this operation
is not reversible and therefore not unitary, so we don’t allow FANIN in our quantum circuits.
Third, the inverse operation, FANOUT, whereby several copies of a bit are produced is also
not allowed in quantum circuits. In fact, it turns out that quantum mechanics forbids the
copying of a qubit, making the FANOUT operation impossible!
4.4 REALISATION OF QUANTUM COMPUTER
To get a concrete feel for how a qubit can be realized, it may be helpful to list some of the ways
this realization may occur: as the two different polarizations of a photon; as the alignment of a
nuclear spin in a uniform magnetic field; as two states of an electron orbiting a single atom
such as shown in Figure.
100
In the atom model, the electron can exist in either the so-called ‘ground’ or ‘excited’ states,
which we’ll call |0⟩ and |1⟩, respectively. By shining light on the atom, with appropriate energy
and for an appropriate length of time, it is possible to move the electron from the |0⟩ state to
the |1⟩ state and vice versa. But more interestingly, by reducing the time we shine the light, an
electron initially in the state |0⟩ can be moved ‘halfway’ between |0⟩ and |1⟩, into the |+⟩ state.
In the race to build a quantum computer, companies are pursuing many types of quantum bits,
or qubits, each with its own strengths and weaknesses. Listed below are some of the qubit
architectures used:
101
102
Image Source: Quest for qubits, Volume: 354, Issue: 6316, Pages: 1090-1093, DOI:
(10.1126/science.354.6316.1090)
Besides the qubit architectures discussed above, photonic qubits are also used to process
quantum information and the paradigm is called photonic quantum computation. Photonic
quantum computation refers to quantum computation that uses photons as the physical system
for doing the quantum computation. Photons are ideal quantum systems because they operate
at room temperature, and photonic technologies are relatively mature.
In photonic quantum computing, the unit of light in a given mode—or photon—is used to
represent a qubit. Besides, linear optical elements of optical systems may be the simplest
building blocks to realize quantum operations and quantum gates. Thus, photonic quantum
computing uses photons as information carriers, mainly uses linear optical elements, or optical
instruments (including reciprocal mirrors and waveplates) to process quantum information, and
uses photon detectors and quantum memories to detect and store quantum information.
Advantages of photonic quantum computing: Firstly, characteristic quantum phenomena like
quantum superposition, interference, and entanglement can be observed and engineered in
photons at room temperature, in contrast to the low temperature that is often needed for
quantum systems based on matter. Secondly, a photon interacts very weakly with its
environment, thereby maintaining the coherence that is required throughout the quantum
computation.
Thirdly, a photon is a rich system that is amenable to engineering using relatively mature
technologies. For example, while the gate operations on matter systems ultimately depend on
natural properties like interaction strength between a qubit and an external field, gate operations
on a photonic quantum computer depend on classical parameters that can be engineered.
Lastly, photons can be entangled over long distances. If we are to have a network of quantum
computers in the future, making the photon as the carrier of quantum information makes sense
for connectivity and modularity.
Companies involved in photonic quantum computing include: Xanadu Quantum Technologies
(Canada), Quandela (France), Orca Computing (UK), PsiQuantum (US).
4.5 QUESTIONS
1. Using the Dirac notation define inner product of two vectors in a Hilbert space.
2. Describe the matrix representation of a ket vector.
3. Define adjoint of an operator.
4. Describe Hermitian and unitary operators. Discuss its significance in quantum mechanics.
103
5. Describe normal operators.
6. Discuss the postulates of quantum mechanics.
7. Describe the time evolution of a state vector in quantum mechanics. Why do we say that
the time evolution in quantum mechanics is unitary?
8. Discuss measurement in the context of classical and quantum physics.
9. What do you mean by the statement that the state |𝜓⟩ = 𝑎|0⟩ + 𝑏|1⟩ is normalised?
10. Describe Moore’s law and its consequences.
11. Differentiate between classical and quantum computations.
12. What do you infer from single particle double slit interference?
13. Describe superposition principle. Discuss its importance in quantum computing.
14. When do we say that two state vector are globally phase-equivalent? Discuss its
significance.
15. Differentiate between classical and quantum bit.
16. Describe a quantum bit. How to you physically realize quantum bits.
17. List the different qubit architectures currently available.
18. Explain the Bloch sphere representation of a qubit.
19. List the four EPR or Bell states.
20. Discuss the action of single qubit gates on the computational basis states.
21. Discuss the action of single qubit gates on general superposition states.
22. Explain CNOT gate.
23. Explain Toffoli gate.
24. Draw a simple quantum circuit and explain the various elements in a quantum circuit.
25. Show that the SWAP gate/circuit interchange the state of the two qubits.
4.6 PROBLEMS
1. Show that: ⟨𝑎1 𝑤1 + 𝑎2 𝑤2|𝑣⟩ = 𝑎1∗ ⟨𝑤1 |𝑣⟩ + 𝑎2∗ ⟨𝑤2 |𝑣⟩
2. Consider the following two kets:
−𝟑𝒊 𝟐
|𝝍⟩ = (𝟐 + 𝒊) , |𝝓⟩ = ( −𝒊 )
𝟒 𝟐 − 𝟑𝒊
a) Find the corresponding bra vectors ⟨𝝍| and ⟨𝝓|.
b) Evaluate the scalar products: ⟨𝝓|𝝓⟩ and ⟨𝝍|𝝍⟩.
c) Evaluate the norm of the given kets.
d) Evaluate the scalar product ⟨𝝓|𝝍⟩.
e) Are the given kets are orthonormal?
f) Normalize the kets |𝝍⟩ and |𝝓⟩.
104
Ans: a) ⟨𝜓| = (3𝑖 2−𝑖 4) ; ⟨𝜙| = (2 −𝑖 2 − 3𝑖 ) b) ⟨𝜓|𝜓⟩ = 30 ; ⟨𝜙|𝜙⟩ =
|𝜓⟩
18 ; c) ‖|𝜓⟩‖ = √30 ; ‖|𝜙⟩‖ = √18 ; d) ⟨𝜙|𝜓⟩ = 7 + 8𝑖 e) No f) |𝜓′⟩ = ‖|𝜓⟩‖ ; |𝜙′⟩ =
|𝜙⟩
‖|𝜙⟩‖
(substitute |𝜓⟩, |𝜙⟩, ‖|𝜓⟩‖ and ‖|𝜙⟩‖ )
3. Consider the sates |𝜓⟩ = 3𝑖|0⟩ − 7𝑖|1⟩ and |𝜙⟩ = −|0⟩ + 2𝑖|1⟩, where the basis kets |0⟩
and |1⟩ are orthonormal.
a) Calculate |𝜓 + 𝜙⟩ and ⟨𝜓 + 𝜙|.
b) Calculate the scalar products ⟨𝜓|𝜙⟩ and ⟨𝜙|𝜓⟩. Are the equal?
c) Show that the states |𝜓⟩ and |𝜙⟩ satisfy the Schwarz inequality:
|⟨𝜓|𝜙⟩|2 ≤ ⟨𝜓|𝜓⟩ ⟨𝜙|𝜙⟩
d) Show that the states |𝜓⟩ and |𝜙⟩ satisfy the triangle inequality:
√⟨𝜓 + 𝜙|𝜓 + 𝜙⟩ ≤ √⟨𝜓|𝜓⟩ + √⟨𝜙|𝜙⟩
Ans: a) |𝜓 + 𝜙⟩ = (−1 + 3𝑖)|0⟩ − 5𝑖|1⟩ ; ⟨𝜓 + 𝜙| = (−1 − 3𝑖)⟨0| + 5𝑖⟨1|.
b) ⟨𝜓|𝜙⟩ = −14 + 3𝑖 and ⟨𝜙|𝜓⟩ = −14 − 3𝑖. No. c) & d) substitute the numerical values
of terms in the RHS and LHS and simplify.
4. Check whether the following kets are orthonormal:
1 1 1 1
a) |+⟩ = ( ) ; |−⟩ = ( )
√2 1 √2 −1
1 1
b) |𝑦⟩ = (|0⟩ + 𝑖|1⟩) ; |𝑧⟩ = (|0⟩ − 𝑖|1⟩) (where the basis kets |0⟩ and |1⟩ are
√2 √2
orthonormal)
Ans: a) Yes b) Yes
5. Give the matrix representation of the following vectors with respect to the
orthonormal {|𝟎⟩, |𝟏⟩} basis :
𝟏 𝟏
|𝒚⟩ = (|𝟎⟩ + 𝒊|𝟏⟩) ; |𝒛⟩ = (|𝟎⟩ − 𝒊|𝟏⟩)
√𝟐 √𝟐
1 1 1 1
Ans: |𝑦⟩ = ( ) ; |𝑧⟩ = ( )
√2 𝑖 √2 −𝑖
6. Suppose 𝑽 is a vector space with basis vectors |𝟎⟩ and |𝟏⟩, and 𝑨 is a linear operator
on 𝑽, such that 𝑨|𝟎⟩ = |𝟏⟩ and 𝑨|𝟏⟩ = |𝟎⟩. Give a matrix representation for 𝑨 with
respect to the given basis.
0 1
Ans: 𝐴 = ( )
1 0
7. Find the matrix representation of operator 𝐴 defined in problem (6) with respect to the basis
vectors |+⟩ = 1/√2(|0⟩ + |1⟩) and |−⟩ = 1/√2(|0⟩ − |1⟩).
1 0
Ans: 𝐴 = ( )
0 −1
8. Show that the identity operator on a vector space 𝑉 has a matrix representation which is
one along the diagonal and zero everywhere else.
9. Consider a matrix 𝑨 (which represents an operator), a ket |𝝍⟩ and a bra ⟨𝝓|:
105
𝟓 𝟑 + 𝟐𝒊 𝟑𝒊 −𝟏 + 𝒊
𝑨 = ( −𝒊 𝟑𝒊 𝟖 ) , |𝝍⟩ = ( 𝟑 ) , ⟨𝝓| = (𝟔 − 𝒊 𝟓) .
𝟏−𝒊 𝟏 𝟒 𝟐 + 𝟑𝒊
a) Calculate the quantities: 𝑨|𝝍⟩, ⟨𝝓|𝑨 and ⟨𝝓|𝑨|𝝍⟩ .
b) Find the Hermiatian conjugate or adjoint of 𝑨, |𝝍⟩ and ⟨𝝓|.
−5 + 17𝑖
Ans: a) 𝐴|𝜓⟩ = ( 17 + 34𝑖 ) ⟨𝜙|𝐴 = (34 − 5𝑖 26 + 12𝑖 20 + 10𝑖) ⟨𝜙|𝐴|𝜓⟩ =
11 + 14𝑖
59 + 155𝑖
5 𝑖 1+𝑖 6
b) 𝐴† = (3 − 2𝑖 −3𝑖 1 ) ⟨𝜓| = (−1 − 𝑖 3 2 − 3𝑖) |𝜙⟩ = ( 𝑖 )
−3𝑖 8 4 5
10. Consider two operators 𝐴 and 𝐵 which are represented by matrices
0 0 𝑖 2 𝑖 0
𝐴 = ( 0 1 0 ) 𝐵 = (3 1 5)
−𝑖 0 0 0 −𝑖 −2
Check if 𝐴 and 𝐵 are Hermitian.
Ans: 𝐴 is Hermitian, 𝐵 is not Hermitian.
𝟏/√𝟐 𝟏/√𝟐
11. Show that the operator 𝑼 represented by the matrix ( ) is unitary.
𝒊/√𝟐 −𝒊/√𝟐
12. Consider an operator 𝐴, which is represented by a matrix
1 −𝑖√2 𝑖 𝑖
𝐴= ( 0 √2 −√2) .
2
𝑖√2 𝑖 𝑖
Check if 𝐴 is i) unitary ii) normal.
Ans: 𝐴 is both unitary and normal.
13. Find the eigenvectors and eigenvalues of the Pauli matrices 𝑋, 𝑌, and 𝑍.
1 1 1 1
Ans: Pauli-𝑋: Eigenvalues: 1, −1 Eigenvectors: ( ) ; ( )
√2 1 √2 −1
1 1 1 1
Pauli-𝑌: Eigenvalues: 1, −1 Eigenvectors: ( ) ; ( )
√2 𝑖 √2 −𝑖
1 0
Pauli-𝑍: Eigenvalues: 1, −1 Eigenvectors: ( ) ; ( )
0 1
14. Show that the Pauli matrices are Hermitian and unitary.
1
15. Consider a normalized state |𝜓⟩ = (|0⟩ + 𝑖|1⟩). If a measurement is made on this state
√2
|𝜓⟩, what are the probabilities of getting the states |0⟩ and |1⟩ after measurement?
Ans: 𝑃(|0⟩) = 1/2 𝑃(|1⟩) = 1/2
𝟑 𝟏
16. Consider a normalized state |𝝍⟩ = √𝟒 |𝟎⟩ + √𝟒 |𝟏⟩. If a measurement is made on this
state |𝝍⟩, what are the probabilities of getting the states |𝟎⟩ and |𝟏⟩ after
measurement?
106
Ans: 𝑃(|0⟩) = 3/4 𝑃(|1⟩) = 1/4
17. Consider a normalized two-qubit state:
1 1 1 3
|𝜓⟩ = √ |00⟩ + √ |01⟩ + √ |10⟩ + √ |11⟩.
4 6 3 12
If a measurement is made on this state |𝜓⟩, what is the result you would obtain?
Ans: One would get one of the standard basis states with the probabilities:
𝑃(|00⟩) = 1/4 𝑃(|01⟩) = 1/6 𝑃(|10⟩) = 1/3 𝑃(|11⟩) = 3/12
18. Find the points on the Bloch sphere which correspond to the states
|+⟩ = 𝟏/√𝟐(|𝟎⟩ + |𝟏⟩) ; |−⟩ = 𝟏/√𝟐(|𝟎⟩ − |𝟏⟩)
𝜋
Ans: |+⟩ state corresponds to the coordinates (𝜃, 𝜙) = ( 2 , 0)
𝜋
|−⟩ state corresponds to the coordinates (𝜃, 𝜙) = ( , 𝜋)
2
19. Find the points on the Bloch sphere which correspond to the states
|𝑖⟩ = 1/√2(|0⟩ + 𝑖|1⟩) ; |−𝑖⟩ = 1/√2(|0⟩ − 𝑖|1⟩)
𝜋 𝜋
Ans: |𝑖⟩ state corresponds to the coordinates (𝜃, 𝜙) = ( 2 , 2 )
𝜋 3𝜋
|−𝑖⟩ state corresponds to the coordinates (𝜃, 𝜙) = ( , )
2 2
1 1 𝑖 𝑖
20. Consider the states |𝜓⟩ = |0⟩ + |1⟩ and |𝜓′⟩ = − |0⟩ − |1⟩. Are |𝜓⟩ and |𝜓′⟩
√2 √2 √2 √2
globally phase equivalent?
Ans: Yes
21. Construct the matrices corresponding to the 𝑋, 𝑌, 𝑍 and 𝐻 gates.
22. Verify that the Hadamard gate 𝐻 is unitary.
107
29. Find the output for the circuit shown below taking the input states to be the computational
basis states.
If we measure the two qubits in the computational basis, what is the probability of getting
the result |00⟩, |01⟩, |10⟩, |11⟩?
What the probability of getting the first qubit in the state |0⟩?
Ans: 𝑃(|00⟩) = 1/11 𝑃(|01⟩) = 5/11 𝑃(|10⟩) = 2/11 𝑃(|11⟩) = 3/11
𝑃(1st qubit = 0) = 6/11
31. Evaluate the output for the circuit shown below:
1 1 1 1
Ans: 2 |00⟩ + 2 |01⟩ + 2 |10⟩ + 2 |11⟩
Evaluate the output states for the following input states: |𝒙𝒚⟩ = |𝟎𝟎⟩, |𝟎𝟏⟩, |𝟏𝟎⟩, |𝟏𝟏⟩.
Ans:
108
Ans: (Hint: Show that both circuits give the same output for the input basis states |00⟩,
|01⟩, |10⟩ and |11⟩)
34. Prove that
Ans: (Hint: Show that both circuits give the same output for the input basis states |00⟩,
|01⟩, |10⟩ and |11⟩)
***************************
109