0% found this document useful (0 votes)
6 views39 pages

Quantum Computing Principles and Concepts

The document outlines a syllabus for a module on Quantum Computing, covering principles of quantum information, quantum gates, and the differences between classical and quantum computing. It discusses the significance of quantum mechanics in computing, the concept of qubits, and the implications of Moore's Law on the future of technology. Additionally, it highlights the unique properties of quantum systems, such as superposition and entanglement, which enable quantum computers to perform complex computations more efficiently than classical computers.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views39 pages

Quantum Computing Principles and Concepts

The document outlines a syllabus for a module on Quantum Computing, covering principles of quantum information, quantum gates, and the differences between classical and quantum computing. It discusses the significance of quantum mechanics in computing, the concept of qubits, and the implications of Moore's Law on the future of technology. Additionally, it highlights the unique properties of quantum systems, such as superposition and entanglement, which enable quantum computers to perform complex computations more efficiently than classical computers.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Department of Physics

Module 3 – Quantum Computing

Syllabus (8 Hours)

Principles of Quantum Information & Quantum Computing: Introduction to Quantum


Computing, Moore’s law & its end, single particle quantum interference, Classical & Quantum
Information comparison, Differences between classical and quantum computing, quantum
superposition and the concept of qubit.

Wave Function in Ket Notation: Matrix form of wave function, Identity Operator,
Determination of I|0> and I|1>, Pauli Matrices and its operations on 0 and 1 states, Mention of
Conjugate and Transpose, Unitary Matrix U, Examples: Row and Column Matrices and their
multiplication (Inner Product), Probability, Orthogonality.

Properties of Qubit: Mathematical representation, Summation of probabilities,


Representation of qubit by Bloch sphere.

Quantum Gates:

Single Qubit Gates: Quantum Not Gate, Pauli -Z Gate, Hadamard Gate, Pauli Matrices, Phase
Gate (or S Gate), T Gate.

Multiple Qubit Gates: Controlled Gate, CNOT Gate (Discussion of 4 different input states),
Representation of Swap Gate, Controlled -Z Gate, Toffoli Gate, Accounting for the extra-
ordinary capacity of quantum computing, Model Realizations.

Pre-requisites: Matrices

Self-learning: Moore’s Law

Page | 1
I & II-Semester, Engineering Physics (BPHY102/202)
Department of Physics
Principles of Quantum Information & Quantum Computing

The primary focus will be on learning how to quantify information. This will be done using a
concept known as entropy, a quantity that can be said to be a measure of disorder in physics.
Information is certainly the opposite of disorder, so we will see how entropy can be used to
characterize the information content in a signal and how to determine how many bits we need
to reliably transmit a signal. Later these ideas will be tied in with quantum information
processing.

- Quantum Computation by Mc. Mohan.

Introduction:

Evolution in one region of science and technology leads to the discovery of a new one.
In less than a century, research and development of functional computing technologies have
renovated science, technology, and nation massively. The first practical computer around the
20th century was not capable of doing mathematical computations, on its own. Practical
devices need a solid physical implementation of theoretical concepts. Nowadays, computers
are solving problems instantly and accurately provided the input is relevant, and a set of
instructions given are favorable. It all started from World War II when Alan Turing created a
real general-purpose computer with a storable program model and is known as the ‘Universal
Turing Machine’. It was redesigned by Von Neumann and is now the most important
architecture for almost every computer. The computers and their physical parts kept improving
with time in terms of performance and their strengths. And gradually, the industry of computers
became larger than the military department which initiated it. The advancement in control and
understanding of humans over nature and physical systems has given us the latest electronic
devices we are utilizing today.

Quantum Computing is a new kind of computing based on Quantum mechanics that


deals with the physical world that is probabilistic and unpredictable in nature. Quantum
mechanics being a more general model of physics than classical mechanics give rise to a more
general model of computing- quantum computing that has more potential to solve problems
that cannot be solved by classical ones. To store and manipulate the information, they use their
own quantum bits also called ‘Qubits’ unlike other classical computers which are based on

Page | 2
I & II-Semester, Engineering Physics (BPHY102/202)
Department of Physics
classical computing that uses binary bits 0 and 1 individually. The computers using such type
of computing are known as ‘Quantum Computers’. In such small computers, circuits with
transistors, logic gates, and Integrated Circuits are not possible. Hence, it uses the subatomic
particles like atoms, electrons, photons, and ions as their bits along with their information of
spins and states. They can be superposed and can give more combinations. Therefore, they can
run in parallel using memory efficiently and hence is more powerful. Quantum computing is
the only model that could disobey the Church-Turing thesis and thus quantum computers can
perform exponentially faster than classical computers.

Classical & quantum information comparison

Quantum computation is an entirely new way of information processing. For this


reason, traditional methods of computing and information processing you are familiar with are
referred to as classical information. For those new to the subject, we begin with a simple and
brief review of how information is stored and used in computers. The most basic piece of
information is called a bit, and this basically represents a yes–no answer to a question. To
represent this mathematically, we use the fact that we’re dealing with a two-state system and
choose to represent information using base 2 or binary numbers. A binary number can be 0 or
1, and a bit can assume one or the other of these values. Physically we can implement a bit with
an electrical circuit that is either at ground or zero volts (binary 0), or at say +5 volts (binary
1).

A classical information is represented by the combination of zero’s and one’s known


as binary digits (bits). Computer performs calculations using these bits that is ‘0’ representing
‘off’ state and ‘1’ representing ‘on’ state. These binary states are realized through suitable
voltage, current or magnetization. The computing in this system employs Boolean algebra
through transistors to process the classical information provided in the form of sequences of
zeros and ones. By increasing the number of transistors in a circuit the information processing
capability will be increased.

On the other hand, a quantum information is described by the states of quantum


particles owing to their internal angular momentum known as spin. The two states 0 and 1 can
be represented in the spin of the particle. For example: clockwise spin denotes ‘1’ and
counterclockwise denotes ‘0’. The benefit of using a quantum information is that the particle

Page | 3
I & II-Semester, Engineering Physics (BPHY102/202)
Department of Physics
can be in multiple quantum states simultaneously. Such phenomenon is known as superposition
of states. Due to this phenomenon a quantum computer can exhibit both ‘0’ and ‘1’ states at
the same time, as well as in number of intermediate superposed states. Thus, in a classical
computer information is expressed through single number either 0 or 1. A quantum computer
uses qubits which is described as a 0 and 1 at the same time giving us more processing power.
In particular, a two-bit classical computer to analyse 01 11 10 11, it has to follow a set of
instruction step by step to obtain a result. But for a two-qubit quantum computer, parallelism
allows to analyses every possibility at the given instant of time. Hence, computation time is
reduced drastically.

Quantum Computing:

Quantum computing is a type of computation whose operations can harness the


phenomena of quantum mechanics, such as superposition, interference, and entanglement.
Devices that perform quantum computations are known as quantum computers.

The history of computing and information processing back to early forties of the past
century, when an English mathematician Alan Turing invented an idealized computer,
popularly known as “Turing machine”. This device performs computation with a simple set of
instructions and infinite memories. In general, a computing device contains many circuits that
includes inputs, outputs, wires and logic gates. These circuits will be implemented via
semiconductors, which have two functionalities namely, conductor and insulator. For a given
condition, it acts as a highspeed switch that leads and stops electricity.

Modern day computing devices such as computers, mobile phones, televisions, network
switches are based on integrated circuits of semiconductor. Although semiconductor is entirely
based on Physics of quantum mechanics, we do not refer these computers as “quantum
computers” but rather called “classical computers”. This is due to the fact that the data for logic
gates are represented by two logical input values 0 and 1 in the circuits using devices with
current on/off, high voltage/low voltage, and/or direction of magnetization up/down without
involving any quantum state of atom or molecule. Thus, the operation of present-day computers
is purely based on classical physics. They are governed by locality and the classical behavior

Page | 4
I & II-Semester, Engineering Physics (BPHY102/202)
Department of Physics
defined as only one state at the time. However, the behavior of modern quantum systems
implies that the world behaves quite differently.

A quantum system can be present in a superposition of many different states at the same
time, and can exhibit interference effects during the course of its evolution. Moreover, spatially
separated quantum systems may be entangled with each other and operations may have “non-
local” effects because of this. Quantum computation is the field that investigates the
computational power and other properties of computers based on quantum-mechanical
principles. An important objective is to find quantum algorithms that are significantly faster
than any classical algorithm solving the same problem. The following are few reasons to study
the quantum computing

1. The recent advancements of semiconductor industry allowed the developments in


miniaturized, powerful, and cheap classical computers. Besides, it has already reached
the microlevels where quantum effects are significant. In this situation, a significant
effort is necessary to suppress those quantum effects for maintaining their classical
operation. However, alternatively, one might also try to work with them using quantum
principles for computing by enabling further miniaturization.

2. Additionally, engaging quantum effects allows the speeding up of computations


enormously, and even enables calculations that are impossible for classical ones.

3. Finally, to study and understand the power and limitations of the strongest possible
computational devices that can be realized through quantum principles.

Page | 5
I & II-Semester, Engineering Physics (BPHY102/202)
Department of Physics
Moore’s law & its end:

In 1965, Gordon Moore predicted that the number of transistors on an integrated circuit
will doubles about every two years. This statement is known as Moore’s Law, signifying that
the computational progress will become significantly faster, miniaturized, and more efficient
over time. Also, it is regarded as one of the hallmark theories of the 21st century that carries
significant implications for the future of technological progress in semiconductor industry
along with its possible limitations.

Moore’s Law had a direct impact on the progress of computing power. This specifically means
that transistors in integrated circuits have become faster. According to present situation in
computing industry, Moore’s Law is estimated to reach its end sometime around 2025. This
implies that computers are expected to reach their maximum limit because the transistors will
not be able to perform within smaller circuits due increasingly higher temperature. This results
in thermal damage to the transistor chips and can be avoided to some extent by cooling the
transistor, yet, the energy required in this process will be significantly more than that needed
for the functioning of the transistor itself.

Whilst the more power results in the ability to carry out more advanced tasks through
computers, still it is not feasible to keep pushing the limit on smaller transistors. At some extent,
transistors will reach a smaller dimension where the quantum size effects will disrupt normal
operation. This leads to quantum tunneling, where electrons tunnel through the components of
the circuit. In general, processors rely on the logic gates, integrated components that either pass
or block the movements of electrons, to perform a specific operation. If electrons can simply
bypass or tunneled through logic gates at the quantum level, then the regular operation of the
processor will be hindered.

Page | 6
I & II-Semester, Engineering Physics (BPHY102/202)
Department of Physics
Single particle quantum interference:

D1

A 45º C
45º D2

Beam splitters

S
B
45º O 45º

Fig. 3.1 Single particle quantum interference.

With this arrangement, the path length of photon along OAC is same as OBC, such that,
OAC = OBC. After a photon leaves the source and travels up its path here also one expects that
it will be detected by either D1 or D2. However, as per quantum mechanical considerations, it
is always the detector D1 which the photon reaches and never the detector D2. This effect is
explained as follows.

Every time a photon leaves the source, the two sets of waves that represent the photon
existing simultaneously along the two paths, would always cancel each other before reaching
D2. But those which proceed D1 will reinforce, and thus will be detected there. This means that
the photon has in reality travelled not one but both paths simultaneously and underwent self-
interference to be detected only at D1.

This experiment is known as ‘Single particle quantum interference’, the fact that the
particle exists in both the paths (states) and it considered superposition.

Page | 7
I & II-Semester, Engineering Physics (BPHY102/202)
Department of Physics
Differences between classical and quantum computing:

Sl.
Classical computing Quantum computing
No.
It works on the principle based on It works on the principle based on
1.
classical physics. quantum mechanics.
Information is stored in any of the Information is store in the form of
2. following forms: voltage, current, or quantum bit. Eg. Direction of an
magnetization. electron spin.
3. Information is stored in bits Information is stored in qubits
Used by large-scale multipurpose Used by high-speed, quantum
4.
computers and devices. mechanics-based computers.
Number of possible states are discrete: Number of possible states are
5.
0 or 1 continuous: infinite.
Output measurements are Output measurements are probabilistic,
deterministic, i.e., repeated i.e., measurements on superposed
6.
computations on any given input will states lead to probabilistic answers,
yield the same output. then it is reduced to 0 or 1.
Information processing is sequentially
carried out through logic gates. Eg. Information processing is carried out in
7.
AND, OR, NOT in a basis of parallel through quantum logic gates.
sequence.
Operations are governed by linear
8. Operations follow Boolean algebra.
algebra over Hilbert space.
There is no restriction in measuring There exist severe restrictions in
and copying signals. It possesses low measuring and copying signals. Also,
9.
error rates and can operate at room possess high error rates and to be
temperature. maintained at ultracold temperature

Quantum Superposition and concept of qubit:

In quantum computing, either an atom or a photon is used to encode the information.


For Ex., one can choose two electronic states of an atom or two different polarization
orientations of light for an atom or two different polarization orientations of light for the two
states. But according to the quantum mechanics, the atom apart from the two distinct electronic

Page | 8
I & II-Semester, Engineering Physics (BPHY102/202)
Department of Physics
states, can also be prepared to a state that contains coherent superposition of both the states,
i.e., the atom can exist in states as a zero, a one or simultaneously both as 0 and 1. It will not
be known definitely, in which of these states the atom would be. But a number called
probability factor associated with the corresponding states provides the probability of the
atom’s existence in each of these states. Since it follows quantum principles, it becomes a
quantum system and it is called as a quantum bit or a qubit. Thus, one qubit can encode at a
time both 0 and 1. In case of light a qubit may correspond to the superposed state of horizontal
and vertical polarization of photons apart from the two individual states of polarization.

Thus, a qubit can be defined as a quantum bit the counterpart in quantum computing to
the binary digit or bit of a classical computing. Similar to the bit is the basic unit of information
in a classical computer, a qubit is the basic unit of information in a quantum computer.

Fig. 3.2 Representation of qubit by two electronic levels in an atom.

1 0 
𝑄𝑢𝑏𝑖𝑡:  = |0⟩ + |1⟩ =  ( ) +  ( ) = ( )
0 1 

Qubit:

We know that, ‘bit’ is the fundamental concept of classical computation and classical
information. It can take values either ‘0’ or ‘1’. A digital computer both stores and processes
information using bits, which can be either 0 or 1. Physically, a bit can be anything that has
two distinct configurations: one represented by “0”, and the other represented by “1”. It could

Page | 9
I & II-Semester, Engineering Physics (BPHY102/202)
Department of Physics
be a light bulb that is on or off, a coin that is heads or tails, or any other system with two distinct
and distinguishable possibilities. In modern computing and communications, bits are
represented by the absence or presence of an electrical signal, encoding “0” and “1”
respectively.

Consequently, quantum computation and quantum information are built upon an


analogous concept called quantum bit also known as qubit. A quantum bit is any bit made out
of a quantum system, like an electron or photon. Just like classical bits, a quantum bit must
have two distinct states: one representing “0” and one representing “1”. Unlike a classical bit,
a quantum bit can also exist in superposition states, be subjected to incompatible
measurements, and even be entangled with other quantum bits. Having the ability to harness
the powers of superposition, interference and entanglement makes qubits fundamentally
different and much more powerful than classical bits.

A qubit is a quantum bit in quantum computation and quantum information. Qubit can
exist in |0⟩, |1⟩ and the combination (superposition) of both. Where, |0⟩ and |1⟩ are the
computational basis states in quantum computation.

In general, the qubit state |0⟩ can be written as the linear combination of both |0⟩ and |1⟩ as
follows;

|𝜓⟩ = 𝛼|0⟩ + 𝛽|1⟩

Where, |𝛼⟩ and |𝛽⟩ are the complex numbers called probability amplitudes, such that,

|𝛼|2 + |𝛽|2 = 1

Which means, the probability of |𝜓⟩ exist in |0⟩ state is |𝛼|2 and the probability of |𝜓⟩ exist in
|1⟩ state is |𝛽|2.

Page | 10
I & II-Semester, Engineering Physics (BPHY102/202)
Department of Physics
Note:

 Qubit is a vector in 2-D complex vector space.


 To build quantum computers and other quantum information technologies we need
quantum objects that will act as qubits. Scientists have learned to harness and control
many physical systems to act as qubits. This allows us to match the demands of different
quantum technologies to the advantages of each type of qubit.

Properties of a Qubit:

(i) A qubit can be in a superposed state of the two states |0⟩ and |1⟩.

(ii) If measurements are carried out with a qubit in superposed state then the results that we
get will be probabilistic.

(iii) Due to the quantum nature, the qubit changes its state at once when subjected to
measurement. This means, one cannot copy information from qubits the way we do it in the
present-day computers, as there will be no similarity between the copy and the original. This
is known as ‘no cloning principle’.

Physical realization of qubits:

There are many kinds of qubits, some occurring naturally and others that are
engineered. Some of the most common types include: (i) Spin; (ii) Photons.

Electron will have either spin up ‘↑’ or spin down ‘↓’ or both. Same way photons in
terms of their polarization, right circular or left circular polarizations can be realized as |0⟩
and |1⟩ states of qubit respectively.

Representation of qubit by Bloch Sphere:

The Bloch sphere is a geometrical representation of pure single qubit states as a point on the
unit sphere.

Page | 11
I & II-Semester, Engineering Physics (BPHY102/202)
Department of Physics
We can visualize these distinct states, |0⟩ and |1⟩, as the north and south poles of a sphere of
radius 1 called the Bloch sphere (Fig. 3.3).

The operations on single qubits commonly used in quantum information processing can be
represented on the Bloch sphere.

Fig. 3.3 Bloch sphere

The two qubits |0⟩ and |1⟩ represented by z and -z axis respectively. Here, as |0⟩ denotes the
upward spin of electron and |1⟩ denotes the downward spin of the electron.

At any point on the Bloch sphere, the state |𝜓⟩ can be represented by the equation;

|𝜓⟩ = 𝛼|0⟩ + 𝛽|1⟩

Where, 𝛼 2 and 𝛽 2 are the probabilities of electron having upward and downward spins
respectively, such that, |𝛼|2 + |𝛽|2 = 1.

In general, any qubit on this Bloch sphere can be represented as

𝜃 𝜃
|𝜓⟩ = 𝐶𝑜𝑠 ( ) |0⟩ + 𝑒 𝑖𝜙 𝑆𝑖𝑛 ( ) |1⟩
2 2

Where, 0 ≤ 𝜃 ≤ 𝜋 and 0 ≤ 𝜙 < 2𝜋

Page | 12
I & II-Semester, Engineering Physics (BPHY102/202)
Department of Physics

Single Qubits

A single classical bit has two possible states 0 & 1. Similarly, a single qubit can be
written as |0⟩ & |1⟩ in the computational states. A single qubit is a state vector in 2-D complex
vector space, C. It is in general written as 𝛼|0⟩ + 𝛽|1⟩, where 𝛼, 𝛽 ∈ 𝐶, such that, |𝛼|2 +
|𝛽|2 = 1 and |0⟩ & |1⟩ are orthonormal basis vectors.

Two Qubits:

Classically two bits can have four possible states such as 00, 01, 10 & 11. Similarly,
two qubits will need four computational basis states such as, |00⟩, |01⟩, |10⟩ & |11⟩, hence
four complex amplitudes to represent them.

The quantum state (two qubit) in the superposition form can be written as,

|𝑞⟩ = 𝛼00 |00⟩ + 𝛼01 |01⟩ + 𝛼10 |10⟩ + 𝛼11 |11⟩

Where, 𝛼00 , 𝛼01 , 𝛼10 &𝛼11 are probability amplitudes, such that, |𝛼00 |2 + |𝛼01 |2 + |𝛼10 |2 +
|𝛼11 |2 = 1.

The rule of the measurement is still working in the same way. That is, the probability of |00⟩
state is |𝛼00 |2 .

Note:

 If we have two separated qubits, we can describe their collective (total) state using the
tensor product as follows,

𝑎1 𝑏
Example: Let |𝑎⟩ = [𝑎 ] and |𝑏⟩ = [ 1 ]; then the tensor product (cross product)
2 𝑏
between them will be as follows;

𝑏1 𝑎1 𝑏1
𝑎1 𝑎1 [ ]
𝑏1 𝑏2 𝑎 𝑏
|𝑎⟩⨂|𝑏⟩ = |𝑎𝑏⟩ = [𝑎 ] ⨂ [ ] = [ ]= [ 1 2]
2 𝑏2 𝑏 𝑎2 𝑏1
𝑎2 [ 1 ]
𝑏2 𝑎2 𝑏2

Allowing the same rules,

Page | 13
I & II-Semester, Engineering Physics (BPHY102/202)
Department of Physics
𝑏1 𝑎1 𝑏1
𝑎1 𝑐1 𝑎1 [ ] 𝑐1 𝑐1
𝑏1 𝑏2 𝑎 𝑏
|𝑎⟩⨂|𝑏⟩⨂|𝑐⟩ = |𝑎𝑏𝑐⟩ = [𝑎 ] ⨂ [ ] ⨂ [𝑐 ] = [ ] ⨂ [𝑐 ] = [ 1 2 ] ⨂ [𝑐 ]
2 𝑏2 2 𝑏 2 𝑎2 𝑏1 2
𝑎2 [ 1 ]
𝑏2 𝑎2 𝑏2
𝑐1 𝑎1 𝑏1 𝑐1
𝑎1 𝑏1 [𝑐 ] 𝑎1 𝑏1 𝑐2
2
𝑐1 𝑎1 𝑏2 𝑐1
𝑎1 𝑏2 [𝑐 ] 𝑎1 𝑏2 𝑐2
2
= 𝑐1 = 𝑎2 𝑏1 𝑐1
𝑎2 𝑏1 [𝑐 ]
2 𝑎2 𝑏1 𝑐2
𝑐1 𝑎2 𝑏2 𝑐1
[𝑎2 𝑏2 [𝑐2 ]]
[𝑎2 𝑏2 𝑐2 ]

 In general, if we have n qubits, we will need 2n complex amplitudes.


 We see that, the vector grows exponentially with number of qubits. This is the reason
quantum computers with large number of qubits are so difficult to simulate.
 A modern laptop can easily simulate a general quantum state of around 20 qubits but
simulating 100 qubits is too difficult for the largest supercomputer.

Exercise 1: Write the tensor product of the following qubits; (i) |01⟩, (ii) |0 +⟩, (iii) |+1⟩,
(iv) |− +⟩.

Page | 14
I & II-Semester, Engineering Physics (BPHY102/202)
Department of Physics
Wave Function in Ket Notation

Matrix form of wave function (Representation of Ket and Bra vectors)

In Dirac notation of quantum mechanics, a wave function, 𝜓, represents the state of the
particle / system. Dirac or “bra-ket” notation is commonly used in quantum mechanics and
quantum computing. The state of a qubit is enclosed in the right half of an angled bracket,
called the “ket” can be written as |𝜓⟩ (called as Ket Psi). The complex conjugate of the wave
function (𝜓*) can be written as ⟨𝜓| (called as Bra Psi). In this chapter, here onwards, a wave
function and its conjugates are used in terms of Ket and Bra (Dirac) notations.

Consider a state function in 2D;

𝜓⃗ = 𝑎𝑖̂ + 𝑖𝑏𝑗̂

Where, 𝑖̂ and 𝑗̂ are unit vectors, which represent a column matrix as follows;

1 0
𝑖̂ = ( ) ; 𝑗̂ = ( )
0 1

1 0
Such that, 𝜓⃗ = 𝑎 ( ) + 𝑖𝑏 ( )
0 1

𝑎 0
𝜓⃗ = ( ) + ( )
0 𝑖𝑏

𝑎
This can be represented as; |𝜓⟩ = ( )
𝑖𝑏

Where, ‘| ⟩’ is Ket vector can be represented as a column matrix.

The complex conjugate of |𝜓⟩ nothing but |𝜓⟩∗ = ⟨𝜓| known as ‘Bra’ vector can be represented
as a row matrix, as follows.

⟨𝜓| = (𝑎 𝑖𝑏)

Page | 15
I & II-Semester, Engineering Physics (BPHY102/202)
Department of Physics
Identity Operator (𝐈̂)

An identity operator, 𝐈̂ is a matrix in which diagonal elements are non-zero, but 1 and all
other non-diagonal elements are zero. In terms of 2x2 matrix, an identity operator can be
represented as follows.

𝟏 𝟎
𝐈̂ = [ ]
𝟎 𝟏

That is, the eigen values of 𝐈̂ operator is 1’s. Thus;

Determination of 𝐈̂|𝟎⟩ and 𝐈̂|𝟏⟩ :

When an Identity matrix acts on a wave function (Ket), result is unaffected.

𝐈̂|𝝍⟩ = |𝝍⟩

Similarly, the operation of Î on |0⟩ and |1⟩ are as follows;

Î|0⟩ = |0⟩ and Î|1⟩ = |1⟩

Proof:

1 0 1 1 1 0 0 0
Î|0⟩ = [ ] [ ] = [ ] = |0⟩ Î|1⟩ = [ ] [ ] = [ ] = |1⟩
0 1 0 0 0 1 1 1

Pauli Matrices and its operations on |𝟎⟩ and |𝟏⟩:

The Pauli matrices (also called as operators), 𝜎1 = 𝑋, 𝜎2 = 𝑌 and 𝜎3 = 𝑍 are corresponds to


the measurement of spin along x-, y- and z- axes respectively.

Pauli matrices are a set of 2x2 complex matrices, which are Hermitian, Involutory & Unitary.

(Involutory Matrix: It is a square matrix that is its own inverse).

The Pauli matrices are

0 1 0 −𝑖 1 0
𝑋=[ ];𝑌 =[ ]; & 𝑍 = [ ]
1 0 𝑖 0 0 −1

Page | 16
I & II-Semester, Engineering Physics (BPHY102/202)
Department of Physics
The action of Pauli matrices on |0⟩ and |1⟩ are as follows;

𝑋|0⟩ = |1⟩ 𝑌|0⟩ = 𝑖|1⟩ 𝑍|0⟩ = |0⟩

𝑋|1⟩ = |0⟩ 𝑌|1⟩ = −𝑖|0⟩ 𝑍|1⟩ = −|1⟩

Proof:

0 1 1 0 −𝑖 1 1 0 1
𝑋|0⟩ = [ ][ ] 𝑌|0⟩ = [ ][ ] 𝑍|0⟩ = [ ][ ]
1 0 0 𝑖 0 0 0 −1 0

0 0 0 1
= [ ] = [ ] = 𝑖[ ] = [ ]
1 𝑖 1 0

= |1⟩ = 𝑖|1⟩ = |0⟩

0 1 0 0 −𝑖 0 1 0 0
𝑋|1⟩ = [ ][ ] 𝑌|1⟩ = [ ][ ] 𝑍|1⟩ = [ ][ ]
1 0 1 𝑖 0 1 0 −1 1

1 −𝑖 1 0
= [ ] = [ ] = −𝑖 [ ] = [ ]
0 0 0 −1

= |0⟩ = −𝑖|0⟩ = −|1⟩

Conjugate and Transpose:

Conjugate of a matrix can be obtained for a given matrix by replacing each element of the
matrix with its complex conjugate.

Example: If ‘A’ is a matrix,

𝑖 2−𝑖
𝐴= [ ];
4+𝑖 1

Its conjugate is

Page | 17
I & II-Semester, Engineering Physics (BPHY102/202)
Department of Physics

−𝑖 2+𝑖
𝐴∗ = [ ]
4−𝑖 1

Here, 𝐴∗ is the conjugate of the matrix A.

The transpose of a matrix can be obtained by interchanging its rows into columns or columns
into rows.

Example: If ‘A’ is a matrix,

𝑖 2−𝑖
𝐴= [ ];
4+𝑖 1

Its transpose is

𝑖 4+𝑖
𝐴𝑇 = [ ]
2−𝑖 1

Here, 𝐴𝑇 is the transpose of the matrix A.

Hermitian Matrix:

An operator 𝐴̂ is said to be Hermitian if

𝐴̂ = 𝐴̂†

Where, 𝐴̂† is called as Hermitian conjugate; 𝐴̂† = (𝐴∗ )𝑇 = (𝐴𝑇 )∗

𝑎 𝑏 𝑎∗ 𝑐∗
That is 𝐴 = [ ] ⇔ 𝐴̂† = [ ∗ ]
𝑐 𝑑 𝑏 𝑑∗

Example: Check the given matrix is Hermitian.

1 𝑖
𝐴= [ ]
−𝑖 0

Page | 18
I & II-Semester, Engineering Physics (BPHY102/202)
Department of Physics
1 −𝑖 1 𝑖
Solution: 𝐴∗ = [ ] ⇔ (𝐴∗ )𝑇 = [ ]
𝑖 0 −𝑖 0

We have, (𝐴∗ )𝑇 = 𝐴̂† = 𝐴

Hence, matrix A is Hermitian.

Unitary Matrix:

A matrix U is unitary if the matrix product of U and its conjugate transpose 𝑈 † (called U-
dagger) produces the identity matrix: 𝑈𝑈 † = 𝑈 † 𝑈 = 𝐼.

Or

A linear operator U is said to be unitary, if its inverse, 𝑈 −1 is equal to its adjoint, 𝑈 † .

That is, 𝑈 † = 𝑈 −1

Note:

1. Unitary operators describe the time evolution of quantum state.


2. Unitary operators preserve its length (inner product between vectors).
3. In all mathematical constructions of quantum mechanics, one fundamental assumption
is that each (matrix) operator must be unitary. Such that, after changing the state
through some action the total probability to observe all possible states still adds up to
100%. If this did not happen, then we could not interpret the results of quantum
mechanics to be probabilities, and the results would disagree with the many
experiments we have performed.

1 𝑖
Problem: Is the matrix, 𝐴 = [ ] unitary?
1 𝑖

1 1
Solution: Consider 𝐴† = (𝐴∗ )† = [ ]
−𝑖 −𝑖

Then,

2
𝐴𝐴† = [
1 𝑖 1
][
1
] = [1 − 𝑖 2 1 − 𝑖 2 ] = [2 2
] = 2[
1 1
] ≠𝐼=[
1 0
]
1 𝑖 −𝑖 −𝑖 1−𝑖 1 − 𝑖2 2 2 1 1 0 1

Multiplying A by its conjugate transpose does not produce the identity matrix, so A is not

Page | 19
I & II-Semester, Engineering Physics (BPHY102/202)
Department of Physics
unitary.

Row and Column matrices:

A ket vector can be represented as a column vector as follows;

𝛼1
|𝑣⟩ = (𝛼 )
2

Similarly, a complex conjugate of |𝑣⟩ denotes the row matrices represented as follows;

|𝑣⟩∗ = ⟨𝑣| = (𝛼1∗ 𝛼2∗ )

𝛼1 ∗
Where, (𝛼 ) = (𝛼1∗ 𝛼2∗ )
2

∗ represents the complex conjugate.

Note: The states |0⟩ and |1⟩ are usually represented by a column matrix as follows;

1 0
|0⟩ = ( ); |1⟩ = ( )
0 1

The complex conjugate of |0⟩ and |1⟩ denotes the row matrices represented as follows;

|0⟩∗ = ⟨0| = (1 0) & |1⟩∗ = ⟨1| = (0 1)

Inner Product:

𝛼1 𝛽
If we have two states, |𝜓⟩ = (𝛼 ) and |𝜑⟩ = ( 1 ); then we can multiply them by taking their
2 𝛽2
inner product as follows;

⟨𝜓|𝜑⟩ = (⟨𝜓|) ∗ (|𝜑⟩)

𝛽
= (𝛼1∗ 𝛼2∗ ) ( 1 )
𝛽2

= 𝛼1∗ 𝛽1 + 𝛼2∗ 𝛽2

Page | 20
I & II-Semester, Engineering Physics (BPHY102/202)
Department of Physics
Hence, ⟨𝜓|𝜑⟩ is called the inner product or the multiplication of row and column matrix and
the result is always a scalar product.

Probability:

Consider a quantum state, |𝜓⟩ = 𝛼|0⟩ + 𝛽|1⟩

1 0 𝛼 0 𝛼
|𝜓⟩ = 𝛼 ( ) + 𝛽 ( ) = ( ) + ( ) = (𝛽 )
0 1 0 𝛽

Let us now take the inner product with itself;

𝛼
⟨𝜓|𝜓⟩ = (𝛼 ∗ 𝛽 ∗ ) (𝛽 )

= 𝛼𝛼 ∗ + 𝛽𝛽 ∗

= |𝛼|2 + |𝛽|2

We know that, 𝜓 ∗ 𝜓 = |𝜓|2 ⇒ Probability and 𝜓 ∗ = |𝜓⟩∗ = ⟨𝜓|.

Thus, we have

⟨𝜓|𝜓⟩ = |𝜓|2 = |𝛼|2 + |𝛽|2 = 1

implying that the state |𝜓⟩ is normalized.

Orthogonality:

The states |𝜓⟩ and |𝜙⟩ are said to be orthogonal if their inner product is said to be zero.

That is,

⟨𝜓|𝜙⟩ = 0

Orthonormal:

The states |𝜓⟩ and |𝜙⟩ are said to be orthonormal if

1. |𝜓⟩ and |𝜙⟩ are normalized states.


2. |𝜓⟩ and |𝜙⟩ are orthogonal with each other.

Page | 21
I & II-Semester, Engineering Physics (BPHY102/202)
Department of Physics
That is, |𝜓⟩ and |𝜙⟩ should satisfy, ⟨𝜓|𝜙⟩ = 0; ⟨𝜓|𝜓⟩ = 1 and ⟨𝜙|𝜙⟩ = 1.

Example: Show that, states |0⟩ and |1⟩ are orthogonal with each other and parallel among
themselves.

Consider, ⟨0|1⟩ = (1 0) (0) = (1 ∗ 0) + (0 ∗ 1) = 0 + 0 = 0


1

Also,

1
⟨0|0⟩ = (1 0) ( ) = (1 ∗ 1) + (0 ∗ 0) = 1 + 0 = 1
0

&

⟨1|1⟩ = (0 0
1) ( ) = (0 ∗ 0) + (1 ∗ 1) = 0 + 1 = 1
1

Hence 0⟩ and |1⟩ are orthogonal with each other and parallel among themselves known as
orthonormal vectors.

Cross product or Tensor product:

𝛼1 𝛽
If we have two vectors |𝜓⟩ = [𝛼 ] and |𝜙⟩ = [ 1 ]; then the tensor product (cross product)
2 𝛽2
between them will be as follows;

𝛽1 𝛼1 𝛽1
𝛼1 𝛼1 [
]
𝛽1 𝛽2 𝛼 𝛽
|𝜓⟩⨂|𝜙⟩ = [𝛼 ] ⨂ [ ] = [ ]= [ 1 2]
2 𝛽2 𝛽1 𝛼2 𝛽1
𝛼2 [ ]
𝛽2 𝛼2 𝛽2

Example: Find the tensor product between |0⟩ and |0⟩.

1 1
1[ ]
1 1
Solution: |0⟩⨂|0⟩ = |00⟩ = [ ] ⨂ [ ] = [ 0 ] = [0 ]
0 0 1 0
0[ ]
0 0

Exercise Problems. Find the tensor products of |01⟩, |10⟩ and |11⟩.

Page | 22
I & II-Semester, Engineering Physics (BPHY102/202)
Department of Physics
Quantum Gates

Single Qubit Gates

1. Quantum NOT Gate:

The Quantum NOT gate is defined as

0 1
𝑋= [ ]
1 0

The action of quantum NOT gate in the computational basis is as follows; That is it changes
|0⟩ to |1⟩ and vice versa. That is,

𝑋|0⟩ → |1⟩ and 𝑋|1⟩ → |0⟩

0 1 1 0
𝑋|0⟩ = [ ] [ ] = [ ] = |1⟩
1 0 0 1

0 1 0 1
𝑋|1⟩ = [ ] [ ] = [ ] = |0⟩
1 0 1 0

Also, in the superposition state, its action is linear, i.e. superposition is preserved.

𝛼|0⟩ + 𝛽|1⟩ → 𝛼|1⟩ + 𝛽|0⟩

Gate representation:

Quantum wire (single qubit)

𝛼|0⟩ + 𝛽|1⟩ X 𝛼|1⟩ + 𝛽|0⟩

Quantum Logic Gate

Fig. 3.4 Circuit symbol of Quantum NOT Gate.

Page | 23
I & II-Semester, Engineering Physics (BPHY102/202)
Department of Physics
Truth Table:

Input Output

|0⟩ |1⟩

|1⟩ |0⟩

𝛼|0⟩ + 𝛽|1⟩ 𝛼|1⟩ + 𝛽|0⟩

Note: Let us analyze the two quantum NOT gates.

𝛼|0⟩ + 𝛽|1⟩ X X 𝛼|0⟩ + 𝛽|1⟩


𝛼|1⟩ + 𝛽|0⟩

𝛼|0⟩ + 𝛽|1⟩ 𝛼|0⟩ + 𝛽|1⟩

In general,

|𝜓⟩ → 𝑋|𝜓⟩ → 𝑋𝑋|𝜓⟩ → 𝐼|𝜓⟩ = 𝜓⟩

0 1 0 1 1 0
Here, 𝑋𝑋 = [ ][ ]=[ ]=𝐼
1 0 1 0 0 1

2. Pauli Z-Gate:

The Pauli Z-gate is defined as

1 0
𝑍=[ ]
0 −1

The action of Pauli Z-gate in the computational basis is as follows; It leaves |0⟩ unchanged
and inverts the sign of |1⟩ to −|1⟩. That is,

𝑍|0⟩ → |0⟩ and 𝑍|1⟩ → −|1⟩

Page | 24
I & II-Semester, Engineering Physics (BPHY102/202)
Department of Physics
1 0 1 1
𝑍|0⟩ = [ ] [ ] = [ ] = |0⟩
0 −1 0 0

1 0 0 0 0
𝑍|1⟩ = [ ] [ ] = [ ] = − [ ] = −|1⟩
0 −1 1 −1 1

Also, in the superposition state, its action is linear, i.e. superposition is preserved.

𝛼|0⟩ + 𝛽|1⟩ → 𝛼|0⟩ − 𝛽|1⟩

Gate representation:

𝛼|0⟩ + 𝛽|1⟩ Z 𝛼|0⟩ − 𝛽|1⟩

Fig. 3.5 Circuit symbol of Pauli Z-Gate.

Truth Table:

Input Output

|0⟩ |0⟩

|1⟩ −|1⟩

𝛼|0⟩ + 𝛽|1⟩ 𝛼|0⟩ − 𝛽|1⟩

Page | 25
I & II-Semester, Engineering Physics (BPHY102/202)
Department of Physics
Note: Let us analyze the two Pauli Z-gates.

𝛼|0⟩ + 𝛽|1⟩ Z Z 𝛼|0⟩ + 𝛽|1⟩


𝛼|0⟩ − 𝛽|1⟩


𝛼|0⟩ + 𝛽|1⟩ 𝛼|0⟩ + 𝛽|1⟩

In general,

|𝜓⟩ → 𝑍|𝜓⟩ → 𝑍𝑍|𝜓⟩ → 𝐼|𝜓⟩ = 𝜓⟩

1 0 1 0 1 0
Here, 𝑍𝑍 = [ ][ ]=[ ]=𝐼
0 −1 0 −1 0 1

3. Hadamard Gate:

It is defined as

1 1 1
𝐻= [ ]
√2 1 −1

The action of Hadamard Gate in the computational basis is as follows; It transforms |0⟩ into
|0⟩+|1⟩ |0⟩−|1⟩
and |1⟩ to . That is,
√2 √2

|0⟩+|1⟩ |0⟩−|1⟩
𝐻|0⟩ → and 𝐻|1⟩ →
√2 √2

1 1 1 1 1 1 1 1 0 |0⟩ + |1⟩
𝐻|0⟩ = [ ][ ] = [ ]= {[ ] + [ ]} =
√2 1 −1 0 √2 1 √2 0 1 √2

Page | 26
I & II-Semester, Engineering Physics (BPHY102/202)
Department of Physics
1 1 1 0 1 1 1 1 0 |0⟩ − |1⟩
𝐻|1⟩ = [ ][ ] = [ ]= {[ ] − [ ]} =
√2 1 −1 1 √2 −1 √2 0 1 √2

Also, in the superposition state, its action is linear, i.e. superposition is preserved.

|0⟩ + |1⟩ |0⟩ − |1⟩


𝛼|0⟩ + 𝛽|1⟩ → 𝛼 ( )+𝛽( )
√2 √2

Gate representation:

|0⟩+|1⟩ |0⟩−|1⟩
𝛼( )+𝛽( ) or
√2 √2
𝛼|0⟩ + 𝛽|1⟩ H 𝛼+𝛽 𝛼−𝛽
( ) |0⟩ + ( ) |1⟩
√2 √2

Fig. 3.6 Circuit symbol of Hadamard Gate.

Truth Table:

Input Output

|0⟩ |0⟩ + |1⟩


√2

|1⟩ |0⟩ − |1⟩


√2

𝛼|0⟩ + 𝛽|1⟩ |0⟩ + |1⟩ |0⟩ − |1⟩


𝛼( )+𝛽( )
√2 √2

Or

𝛼+𝛽 𝛼−𝛽
( ) |0⟩ + ( ) |1⟩
√2 √2

Note: Let us analyze the two Hadamard gates.

Page | 27
I & II-Semester, Engineering Physics (BPHY102/202)
Department of Physics

H H

|0⟩ →
𝐻 |0⟩ + |1⟩ 𝐻

1
{(
|0⟩ + |1⟩
)+ ( ⇔
|0⟩ − |1⟩ 1
)} = {|0⟩ + |1⟩ + |0⟩ − |1⟩} = |0⟩
2
√2 √2 √2 √2

𝐻 |0⟩ − |1⟩ 𝐻 1 |0⟩ + |1⟩ |0⟩ − |1⟩ 1


|1⟩ → → {( )− ( )} = {|0⟩ + |1⟩ − |0⟩ + |1⟩} = |1⟩
√2 √2 √2 √2 2

In general,

|𝜓⟩ → 𝐻|𝜓⟩ → 𝐻𝐻|𝜓⟩ → 𝐼|𝜓⟩ = 𝜓⟩

1 1 1 1 1 1 1 2 0 1 0
Here, 𝐻𝐻 = [ ] [ ] = 2[ ]=[ ]= 𝐼
√2 1 −1 √2 1 −1 0 2 0 1

4. Phase Gate (or S Gate)

The Phase gate (P - gate) is parametrized, that is it needs a number (𝜙) to tell it exactly what
to do.

The P – gate performs a rotation of 𝜙 around the z-axis direction.

It is defined as (in the matrix form);

1 0
𝑃(𝜙) = [ ] ; 𝜙 𝑖𝑠 𝑎 𝑟𝑒𝑎𝑙 𝑛𝑢𝑚𝑏𝑒𝑟.
0 𝑒 𝑖𝜙

Note: Z-gate is a special gate of P – gate.

Page | 28
I & II-Semester, Engineering Physics (BPHY102/202)
Department of Physics
𝑖𝜙 𝑖𝜋
If 𝜙 = 𝜋 ⟹ 𝑒 =𝑒 = 𝐶𝑜𝑠𝜋 + 𝑖 𝑆𝑖𝑛𝜋 = 1 + 0 = 1

1 0 1 0
Then for 𝜙 = 𝜋, 𝑃(𝜙 = 𝜋) = [ ]=[ ] = 𝑍 − 𝑔𝑎𝑡𝑒.
0 𝑒 𝑖𝜋 0 1

4.1. S – gate

It is defined as

1 0
𝑆=[ ]
0 𝑖
𝜋
It is a P – gate with 𝜙 = 2 .

𝜋 𝑖𝜋 𝜋 𝜋
𝜙= ⟹ 𝑒 𝑖𝜙 = 𝑒 2 = 𝐶𝑜𝑠 ( ) + 𝑖 𝑆𝑖𝑛 ( ) = 0 + 𝑖(1) = 𝑖
2 2 2

The action of S-gate is; it rotates qubit state (vector) quarter turn around the Bloch sphere.

In the computational basis, it leaves |0⟩ unchanged and transforms |1⟩ to i|1⟩. That is,

𝑆|0⟩ → |0⟩ and 𝑆|1⟩ → 𝑖|1⟩

1 0 1 1
𝑆|0⟩ = [ ] [ ] = [ ] = |0⟩
0 𝑖 0 0

1 0 0 0 0
𝑆|1⟩ = [ ] [ ] = [ ] = 𝑖 [ ] = 𝑖|1⟩
0 𝑖 1 𝑖 1

Also, in the superposition state, its action is linear, i.e. superposition is preserved.

𝛼|0⟩ + 𝛽|1⟩ → 𝛼|0⟩ + 𝑖𝛽|1⟩

Gate representation:

Page | 29
I & II-Semester, Engineering Physics (BPHY102/202)
Department of Physics
𝛼|0⟩ + 𝛽|1⟩ S 𝛼|0⟩ + 𝛽𝑖|1⟩

Fig. 3.7 Circuit symbol of S-gate.

Truth Table:

Input Output

|0⟩ |0⟩

|1⟩ 𝑖|1⟩

𝛼|0⟩ + 𝛽|1⟩ 𝛼|0⟩ + 𝛽𝑖|1⟩

Note 1: S-gate is not its own inverse. That is 𝑆 † exist.

If
1 0 1 0
𝑆=[ 𝑖𝜋 ]=[ ]
0 𝑒2 0 𝑖

1 0 1 0
𝑆† = [ −𝑖𝜋 ]=[ ]
0 𝑒 2 0 −𝑖

Note 2: S-gate is also known as √𝑍 gate. That is,

√𝑍√𝑍|𝑞⟩ = 𝑆𝑆|𝑞⟩ = 𝑍|𝑞⟩

⟹ 𝑆𝑆 = 𝑍

Proof:

1 0 1 0 1 0 1 0
𝑆𝑆 = [ ][ ]=[ 2] = [ ]=𝑍
0 𝑖 0 𝑖 0 𝑖 0 −1

Page | 30
I & II-Semester, Engineering Physics (BPHY102/202)
Department of Physics
4.2. T – gate
𝜋
It is a P – gate with 𝜙 = 4 .

It is defined as

1 0 1 0
𝑇=[ 𝑖𝜋 ]; 𝑇† = [ 𝑖𝜋 ]
0 𝑒 4 0 𝑒4

The action of T-gate in the computational basis is it leaves |0⟩ unchanged and transforms |1⟩
𝑖𝜋
to 𝑒 4 |1⟩. That is,

𝑖𝜋
𝑇|0⟩ → |0⟩ and 𝑇|1⟩ → 𝑒 4 |1⟩

1 0 1 1
𝑇|0⟩ = [ 𝑖𝜋 ] [ ] = [ ] = |0⟩
0 𝑒4 0 0

1 0 0 0 𝑖𝜋
0 𝑖𝜋
𝑇|1⟩ = [ 𝑖𝜋 ] [ 𝑖𝜋 ] = [ 𝑖𝜋 ] = 𝑒 4 [ ] = 𝑒 4 |1⟩
0 𝑒4 𝑒4 𝑒4 1

Also, in the superposition state, its action is linear, i.e. superposition is preserved.

𝑖𝜋
𝛼|0⟩ + 𝛽|1⟩ → 𝛼|0⟩ + 𝑒 4 𝛽|1⟩

Gate representation:

𝑖𝜋
𝛼|0⟩ + 𝛽|1⟩ T 𝛼|0⟩ + 𝑒 4 𝛽|1⟩

Fig. 3.8 Circuit symbol of T-gate.

Truth Table:

Page | 31
I & II-Semester, Engineering Physics (BPHY102/202)
Department of Physics
Input Output

|0⟩ |0⟩

|1⟩ 𝑖𝜋
𝑒 4 |1⟩

𝛼|0⟩ + 𝛽|1⟩ 𝑖𝜋
𝛼|0⟩ + 𝑒 4 𝛽|1⟩

Multiple Qubit Gates

1. Controlled NOT (C-NOT) gate:

It has two inputs; (a) controlled bit and (b) target bit and two output qubits. The control qubit
stays the same, while the target obeys the following rule.

Its action is as follows; If the controlled bit is |0⟩ then the operation on the target bit is
unchanged. If the controlled bit is |1⟩ then the target bit is altered. That is

|0, 1⟩ ⟶ |0,1⟩

|1, 1⟩ ⟶ |1,0⟩

In general,

|𝐴, 𝐵⟩ ⟶ |𝐴, 𝐵 ⊕ 𝐴⟩

The CNOT gate performs an X gate on the target qubit if the control qubit is |1⟩. It is similar
to the classical XOR gate.

Gate representation:

Page | 32
I & II-Semester, Engineering Physics (BPHY102/202)
Department of Physics

Control |𝐴⟩ |𝐴⟩

Target |𝐵⟩ |𝐴⟩ ⊕ |𝐵⟩

Fig. 3.9 Circuit symbol of CNOT-gate.

The action of the CNOT gate is depends on the type of input state. There are four input states,
they are;

Case 1: If the input state is |00⟩, the output will be |00⟩, that is target is unaltered.

Case 2: If the input state is |01, the output will be |01⟩, that is target is unaltered.

Case 3: If the input state is |10⟩, the output will be |11⟩, that is target is altered.

Case 4: If the input state is |11⟩, the output will be |10⟩, that is target is altered.

Truth Table for CNOT gate:

Input Output

Control bit Target bit Control bit Target bit

|0⟩ |0⟩ |0⟩ |0⟩

|0⟩ |1⟩ |0⟩ |1⟩

|1⟩ |0⟩ |1⟩ |1⟩

|1⟩ |1⟩ |1⟩ |0⟩

Matrix form of CNOT gate:

Page | 33
I & II-Semester, Engineering Physics (BPHY102/202)
Department of Physics
1 0 0 0
𝑈𝐶𝑁 = [0 1 0 0]
0 0 0 1
0 0 1 0

2. Toffoli gate:

It has 3 inputs and 3 outputs. Any classical circuit can be replaced by an equivalent circuit
containing only reversible elements by using reversible gate called Toffoli gate.

Toffoli gates can be used to simulate irreversible classical logic gates and ensures that quantum
gates are capable of performing any computations that a classical computer can do.

The action of Toffoli gate on the qubits (inputs) is as follows;

|𝐴, 𝐵, 𝐶⟩ ⟶ |𝐴, 𝐵, 𝐶 ⊕ 𝐴𝐵⟩

Gate representation:

|𝐴⟩ |𝐴⟩

|𝐵⟩ |𝐵⟩

|𝐶⟩ |𝐶 ⊕ 𝐴𝐵⟩

Fig. 3.10 Circuit symbol of Toffoli-gate.

Truth Table of Toffoli gate:

Page | 34
I & II-Semester, Engineering Physics (BPHY102/202)
Department of Physics
Input Output

|𝑨⟩ |𝑩⟩ |𝑪 |𝑨⟩ |𝑩⟩ |𝑪 ⊕ 𝑨𝑩⟩

|0⟩ |0⟩ |0⟩ |0⟩ |0⟩ |0⟩

|0⟩ |0⟩ |1⟩ |0⟩ |0⟩ |1⟩

|0⟩ |1⟩ |0⟩ |0⟩ |1⟩ |0⟩

|0⟩ |1⟩ |1⟩ |0⟩ |1⟩ |1⟩

|1⟩ |0⟩ |0⟩ |1⟩ |0⟩ |0⟩

|1⟩ |0⟩ |1⟩ |1⟩ |0⟩ |1⟩

|1⟩ |1⟩ |0⟩ |1⟩ |1⟩ |1⟩

|1⟩ |1⟩ |1⟩ |1⟩ |1⟩ |0⟩

Note: 0⊕0=0

0⊕1= 1

1⊕0= 1

1⊕1= 0

Matrix form of Toffoli gate:

1 0 0 0 0 0 0 0
0 1 0 0 0 0 0 0
0 0 1 0 0 0 0 0
𝑈𝑇 = 0 0 0 1 0 0 0 0
0 0 0 0 1 0 0 0
0 0 0 0 0 1 0 0
0 0 0 0 0 0 0 1
[0 0 0 0 0 0 1 0]

3. Swap gate:

Page | 35
I & II-Semester, Engineering Physics (BPHY102/202)
Department of Physics
It is a simple quantum circuit containing 3 quantum gates. The circuit is read from left to
right and each line represents a quantum passage.

Gate representation:

|𝑎⟩ |𝑏⟩


|𝑏⟩ |𝑎⟩

Fig. 3.11 Circuit symbol of Swap-gate.

The detailed action of swap gate is as follows;

|𝑎, 𝑏⟩ ⟶ |𝑎, 𝑎 ⊕ 𝑏⟩ ⟶ |𝑎 ⊕ 𝑏 ⊕ 𝑎, 𝑎 ⊕ 𝑏⟩ = |𝑏, 𝑎 ⊕ 𝑏⟩ ⟶ |𝑏, 𝑏 ⊕ 𝑎 ⊕ 𝑏⟩ = |𝑏, 𝑎⟩

Truth Table of Swap gate:

Input Output

|00⟩ |00⟩

|01⟩ |10⟩

|10⟩ |01⟩

|11⟩ |11⟩

4. Controlled Z-gate:

It is another example of controlled gate. It is a gate in which the operation is of the kind “if A
is true, then do B”.

Page | 36
I & II-Semester, Engineering Physics (BPHY102/202)
Department of Physics
Gate representation:

Control 𝑇𝑟𝑢𝑒

Target Z 𝐷𝑜

Fig. 3.12 Circuit symbol of Controlled Z-gate.

Matrix form of Controlled Z-gate:

1 0 0 0
𝑈𝑍 = [0 1 0 0]
0 0 1 0
0 0 0 −1

Truth Table of Controlled Z-gate:

Input Output

|00⟩ |00⟩

|01⟩ |01⟩

|10⟩ |10⟩

|11⟩ −|11⟩

Note:

Page | 37
I & II-Semester, Engineering Physics (BPHY102/202)
Department of Physics
 In case of classical computers, AND & NOT gates can compute any function. Hence
AND & NOT gates ae called as universal gates.
 In case of quantum computers, CNOT & single qubit gates can build up any unitary
operation on ‘n’ qubits. Hence, CNOT + single qubit gates are universal for quantum
computer.

Quantum Computation:

|0⟩

Measurement
|0⟩

|0⟩

|0⟩

In quantum computation the following steps should be followed in order to perform the
computation involved with universal gates such as CNOT and single qubit gates.

Process:

1. Start in a computational basis state.


2. Apply a sequence of CNOT and single qubit gates.
3. Measure in the computational basis states, such that to obtain probabilities.

Pr(0,0,0,0 … . .0) = |0,0,0,0, … … .0|2

In quantum computation, the model is inspired by the classical model.

Note: Any Unitary matrix can be a general single qubit gate. The Unitary condition is;

Page | 38
I & II-Semester, Engineering Physics (BPHY102/202)
Department of Physics
† † (𝑈 𝑇 )∗
𝑈𝑈 = 𝐼 ⇒ 𝑈 =

Questions: What does unitary mean?

Answer: Unitary matrix preserve length. That is, ‖|𝑈|𝜓⟩‖ = ‖𝜓⟩‖ for all |𝜓⟩

Proof: Consider,

‖|𝑈|𝜓⟩‖2 = ∑(𝑈𝜓)𝑗 ∗ (𝑈𝜓)𝑗


𝑗


= ∑(𝑈𝑗𝑘 𝜓𝑘 ) (𝑈𝑗𝑙 𝜓𝑙 )
𝑗𝑘𝑙


= ∑ 𝑈𝑘𝑗 𝑈𝑗𝑙 𝜓𝑘∗ 𝜓𝑙
𝑗𝑘𝑙

= ∑ 𝛿𝑘𝑙 𝜓𝑘∗ 𝜓𝑙
𝑘𝑙

= ∑ 𝜓𝑘∗ 𝜓𝑘
𝑘

‖|𝑈|𝜓⟩‖2 = ‖𝜓⟩‖2

Hence, we have ‖|𝑈|𝜓⟩‖ = ‖𝜓⟩‖

Conclusion: Let M be a matrix, then ‖|𝑀|𝜓⟩‖ = ‖𝜓⟩‖ for all |𝜓⟩ iff M is Unitary.

Page | 39
I & II-Semester, Engineering Physics (BPHY102/202)

You might also like