0% found this document useful (0 votes)
2 views22 pages

Module-3 Quantum Computing

The document covers the fundamentals of quantum computing, including the differences between classical and quantum computing, the concept of qubits, and their properties such as superposition and entanglement. It also discusses quantum gates, matrix operations, and the representation of qubits using the Bloch sphere. Additionally, it highlights the implications of Moore's Law and the limitations of classical computing as technology evolves.
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)
2 views22 pages

Module-3 Quantum Computing

The document covers the fundamentals of quantum computing, including the differences between classical and quantum computing, the concept of qubits, and their properties such as superposition and entanglement. It also discusses quantum gates, matrix operations, and the representation of qubits using the Bloch sphere. Additionally, it highlights the implications of Moore's Law and the limitations of classical computing as technology evolves.
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

Quantum Physics and Applications Module-3 BBPHYB102/202

Quantum Computing

Moore’s law & its end, Differences between Classical & Quantum computing. Concept of
qubit and its properties. Representation of qubit by Bloch sphere. Single and Two qubits.

Dirac representation and matrix operations


Matrix representation of 0 and 1 States, Identity Operator, Pauli Matrices and their
operations on |0⟩ and |1⟩states, Conjugate of a matrix, Transpose of a matrix. Unitary
matrix U, Row and Column Matrices, Inner Product, Probability, Normalization rule.
Orthogonality, Orthonormality.

Quantum Gates
Single Qubit Gates: Quantum Not Gate, Pauli – X, Y and Z Gates, Hadamard Gate, S Gate,
T Gate. Multiple Qubit Gates: Controlled gate, CNOT Gate, Swap gate.
Numerical Problems.
08 Hours

Department of Physics, Atria IT, Bengaluru 1


Quantum Physics and Applications Module-3 BBPHYB102/202

Introduction
Quantum computing is a rapidly emerging technology that utilizes the laws of quantum
mechanics to solve problems too complex for classical computers. It is based on the
principles of quantum mechanics which provides a description of the behaviour of very small,
atomic, subatomic particles. Due to the way these particles behave, operations in a quantum
computer can be done much faster than in traditional computers. It is a multidisciplinary field
comprising aspects of physics, mathematics, computer science and electrical engineering.
Quantum computing has opened up opportunities across several industries and disciplines,
from pharmaceuticals, chemical engineering, information and communications technology to
finance, automotive, and aerospace etc.

In order to understand quantum computing and how it works, we need to understand


Quantum bits (qubits), superposition, entanglement and quantum interference.

Quantum bits (qubits)


Quantum bits, or qubits, are the basic unit of information in quantum computing. Sort of like
a binary bit in traditional computing. Qubits use superposition to be in multiple states at one
time. Binary bits can only represent 0 or 1. Qubits can be 0 or 1, as well as any part of 0 and 1
in superposition of both states. Qubits can be made from trapped ions, photons, artificial or
real atoms or quasiparticles.

Superposition
Superposition is a process in which the quantum system is capable of being in several
different states at the same time. The superposition of qubits gives quantum computers their
inherent parallelism and allowing them to process millions of operations simultaneously.
For example, consider a coin toss scenario. When you flip the coin, it ends up as heads or
tails. However, if we consider the state of the coin when it is suspended in the air, it holds
both heads and tails simultaneously. Similarly, quantum particles such as electrons are in a
state of quantum superposition until they are measured. As a result, the ‘uncertainty’ factor is
taken care of in quantum computers.

Entanglement
Quantum entanglement occurs when two systems link so closely that knowledge about one
gives you immediate knowledge about the other, no matter how far apart they are. Quantum

Department of Physics, Atria IT, Bengaluru 2


Quantum Physics and Applications Module-3 BBPHYB102/202

processors can draw conclusions about one particle by measuring the other. Entanglement is
the ability of qubits to correlate their state with other qubits.
For example, one can conclude that, if one qubit spins upward the other will always spin
downward and vice versa. Quantum entanglement allows quantum computers to solve
complex problems faster.

Quantum interference
Quantum interference is a method of controlling the quantum states in a quantum machine by
reinforcing or diminishing the wave functions of quantum particles. As a result, quantum
states leading to a correct output can be amplified, while one can subsequently cancel the
states yielding a wrong output.

Moore’s law and its end


In 1965, Gordon E. Moore, the co-founder of Intel, made this observation and is known as
Moore's Law. Moore did not call his observation "Moore's Law," nor did he set out to create
a law. He made a statement based on noticing emerging trends in chip manufacturing at
Fairchild Semiconductor corporation. Eventually, Moore's insight became a prediction,
which in turn became the golden rule known as Moore's Law.

Statement – “It states that the number of transistors on a microchip doubles every two
years.”

Moore's prediction has been used in the semiconductor industry to guide long-term planning
and to set targets for research and development. Advancements in digital electronics, such as
the reduction in quality-adjusted microprocessor prices, the increase in memory

Department of Physics, Atria IT, Bengaluru 3


Quantum Physics and Applications Module-3 BBPHYB102/202

capacity (RAM and flash), the improvement of sensors, and even the number and size
of pixels in digital cameras, are strongly linked to Moore's law. These ongoing changes in
digital electronics have been a driving force of technological and social change, productivity,
and economic growth.

Moore's Law implies that computers, machines that run on computers, and computing power
all become smaller, faster, and cheaper with time as transistors on integrated circuits
become more efficient.

There is a limit to Moore's Law, as transistors approach the size of a single atom, their
functionality begins to get compromised due to the particular behaviour of electrons at that
scale. In a 2005 interview, Moore himself stated that his law “can't continue forever.”
Moore's Law, which describes the historical increases in computing power is likely to end
this decade due to physical limitations and exponentially rising costs. New chip architectures
and materials will be used to develop new types of computing that will promote future
technological gains.

Differences between classical and quantum computing


Classical Computing Quantum Computing
Used by large scale, multipurpose computer Used by high speed, quantum mechanics-
and devices. based computers.
Information is stored in bits. Information is stored in quantum bits.
There is a discrete number of possible states There is an infinite, continuous number of
either 0 or 1. possible states.
Calculations are deterministic, means Calculations are probabilistic, meaning
repeating the same input results in the same there are multiple possible outputs for the
output. same input.
Data processing is carried out by logic and Data processing is carried out by quantum
in sequential order. logic at parallel instances.
Operations are governed by Boolean Operations are defined by linear algebra by
Algebra. Hilbert Space.
Circuit behaviour is defined by classical Circuit behaviour is defined by quantum
physics. mechanics.
Very robust, immune to noise event at 400 Very sensitive to noise, operates close to
K. absolute zero temperature.

Concept of qubit and its properties


The term quantum bit or qubit was first coined by Benjamin Schumacher of united states in
1995. A qubit is counterpart in quantum computing to the binary digit or bit of classical

Department of Physics, Atria IT, Bengaluru 4


Quantum Physics and Applications Module-3 BBPHYB102/202

computing. Just as a bit is the basic unit of information in a classical computer, a qubit is the
basic unit of information in a quantum computer. Qubit = quantum form of a bit. Qubits can
present 3 main properties: i) Superposition (ability to be in a state of 0 and 1 at the same
time), ii) Entanglement (spooky action at a distance) iii) Tunnelling (finite probability of a
particle moving through barriers). One qubit can take the value of two bits. Two qubits can
take the value of four bits. In general, n qubits can take the value of 2n bits. Quantum
computers use quantum bits or qubits to measure and extract information.

Unlike the bits of classical computers, which can store a 1 or 0, qubits can store multiple
values at the same time. A quantum bit can exist in superposition states, subjected to
incompatible measurements, and even be entangled with other quantum bits. Having the
ability to harness the powers of superposition, interference and entanglement the qubits are
fundamentally different and much more powerful than classical bits. This theoretically gives
them a huge speed advantage over classical computers and algorithms. Qubits represent
atoms, ions, photons or electrons and their respective control devices that are working
together to act as computer memory and a processor. A Qubit can be physically implemented
by the two states of an electron or horizontal and vertical polarizations of photons.

In quantum mechanics, the general quantum state of a qubit can be represented by a linear
superposition of its two orthonormal basis states (or basis vectors) and are usually denoted as
|0⟩ and |1⟩. They are written in the conventional “Dirac or bra-ket” notation ( |0⟩ and |1⟩),
pronounced as "ket 0" and "ket 1" respectively. These two orthonormal basis states {|0⟩, |1⟩}
together called computational basis are said to span the two-dimensional linear vector
(Hilbert) space of the qubit.

A pure qubit state of a single qubit |𝜓⟩ can be described by linear combination of |0⟩ and |1⟩:
|𝜓⟩ = 𝛼|0⟩ + 𝛽|1⟩
Where α and β are the probability amplitudes and are both complex numbers. When we
measure this qubit in the standard basis, according to the Born rule the probability of
outcome |0⟩ with value “0” is |𝛼|2 and the probability of outcome |1⟩ with value “1” is |𝛽|2.
Because the absolute squares of the amplitudes equate to probabilities, from the theory of
probability α and β must satisfies the equation,
|𝛼|2 + |𝛽|2 = 1

Department of Physics, Atria IT, Bengaluru 5


Quantum Physics and Applications Module-3 BBPHYB102/202

Properties of qubits
 A qubit can be in a superposed state of the two states 0 and 1.
 If measurements are carried out with a qubit in superposed state, then the results that we
get will be probabilistic unlike how it’s deterministic in a classical computer.
 Owing 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 in the
present computers, as there will be no similarity between the copy and the original. This is
known as "no cloning principle".

Representation of qubit by Bloch sphere


In quantum mechanics and computing, the Bloch sphere is a geometrical representation of
the pure state space of a two-level quantum mechanical system (qubit), named after the
physicist Felix Bloch.

The Bloch sphere is a unit 2-sphere, with antipodal points corresponding to a pair of mutually
orthogonal state vectors. The north and south poles of the Bloch sphere are typically chosen
to correspond to the standard basis vectors |0⟩ and |1⟩ respectively. This choice is arbitrary.
However, the points on the surface of the sphere correspond to the pure states of the system
and the interior points correspond to the mixed states. The Bloch sphere may be generalized
to an n-level quantum system.

The operations on qubits commonly used in quantum information processing can be


represented on the Bloch sphere. Any unitary operation, taking an initial state to the final
state of the single qubit, is equivalent to a composition of one or more simple rotations on the

Department of Physics, Atria IT, Bengaluru 6


Quantum Physics and Applications Module-3 BBPHYB102/202

Bloch sphere. This Bloch sphere picture is elegant and powerful for the qubit. It helps one to
visualize the superposition of quantum states in terms of the angular coordinates and the
unitary operations on the state as rotations on the unit sphere.

The north and south poles are used to represent the basis states |0⟩ and |1⟩ respectively, the
other locations are the superposition of |0⟩ and |1⟩ states. Any point |𝜓⟩ on this sphere is
represented by equation,
|𝜓⟩ = 𝛼|0⟩ + 𝛽|1⟩
Where α and β are the probability amplitudes satisfying the condition |𝛼|2 + |𝛽|2 = 1.
The Bloch sphere allows the state of the qubit to be represented by unit spherical co-
ordinates, 𝜃 (polar angle) and 𝜙 (azimuth angle). The Bloch sphere is represented by the
equation,
𝜃 𝜃
|𝜓⟩ = 𝐶𝑜𝑠 |0⟩ + 𝑒 𝑖𝜑 𝑆𝑖𝑛 |1⟩
2 2
Here 0 ≤ θ ≤ π and 0 ≤ φ ≤ 2π. The normalization condition is given by,
𝜃2 𝜃2
|𝐶𝑜𝑠 | + |𝑆𝑖𝑛 | = 1
2 2

Single and Two Qubits


Single qubit
A Single Qubit has two computational basis states |0⟩ and |1⟩. The pictorial representation of
the single qubit is as follows: 𝛼|0⟩ + 𝛽|1⟩

Two qubit
A two-qubit system has 4 computational basis states denoted as |00⟩, |01⟩, |10⟩, |11⟩. The
pictorial representation of two qubit is as follows: 𝛼|00⟩ + 𝛽 |01⟩ + 𝛾 |10⟩ + 𝛿|11⟩

Department of Physics, Atria IT, Bengaluru 7


Quantum Physics and Applications Module-3 BBPHYB102/202

Dirac representation and matrix operations:


Matrix representation of 0 and 1 States
For qubits the computational basis (0 and 1) is represented by two ket vectors: |0⟩ and |1⟩.
These vectors can be represented as column vectors,
1
|0⟩ = ( )
0
0
|1⟩ = ( )
1
The quantum state |𝜓⟩ in the equation |𝜓⟩ = 𝛼|0⟩ + 𝛽|1⟩ can be written as a unit column
vector in a two-dimensional complex plane spanned by the two basis states known as normal
basis. Here the vectors |0⟩ and |1⟩ are orthogonal, i.e., perpendicular to each other. A qubit
with states |0⟩ and |1⟩ is represented by the column vectors (10) and (01) respectively. Then
we have,
|𝜓⟩ = 𝛼|0⟩ + 𝛽|1⟩
1 0
|𝜓⟩ = 𝛼 ( ) + 𝛽 ( )
0 1
𝛼 0
|𝜓⟩ = ( ) + ( )
0 𝛽
𝛼
|𝜓⟩ = ( )
𝛽

Thus, an arbitrary qubit state is represented by the vector (𝛽𝛼).

Identity Operator (I)


The identity operator I is an operator, which operating on a state vector leaves the state
unchanged.
i.e. I|𝑎⟩ = |𝑎⟩
I|0⟩ = |0⟩
I|1⟩ = |1⟩
The Identity operator in the matrix form is given by,
1 0
I=( )
0 1
Let us consider the operation of Identity operator on |0⟩ and |1⟩ states,
1 0 1 1
I|0⟩ = ( )( ) = ( )
0 1 0 0
∴ I|0⟩ = |0⟩

Department of Physics, Atria IT, Bengaluru 8


Quantum Physics and Applications Module-3 BBPHYB102/202

1 0 0 0
I|1⟩ = ( )( ) = ( )
0 1 1 1
∴ I|1⟩ = |1⟩
Thus, the operation of identity matrix(operator) on |0⟩ and |1⟩ leaves the states unchanged.

Pauli matrices and its operations on |0⟩and |1⟩ states


The Pauli matrices are the set of three 2×2 matrices which are Hermitian and unitary. Pauli
matrices are usually denoted by the Greek letter sigma (σ).
Each Pauli matrix is Hermitian and together with the Identity matrix I (considered as the
zeroth Pauli matrix 𝜎0 ). The Pauli matrices form a basis for the real vector space of 2×2
Hermitian matrices.
Pauli matrices are given by,
1 0
𝜎0 = I = ( )
0 1
This is an Identity matrix.
0 1
𝜎1 = 𝜎𝑥 = X = ( )
1 0
0 −𝑖
𝜎2 = 𝜎𝑦 = Y = ( )
𝑖 0
1 0
𝜎3 = 𝜎𝑧 = Z = ( )
0 −1
Pauli matrix 𝜎0 operating on |0⟩and |1⟩ states
1 0 1 1
𝜎0 |0⟩ = ( )( ) = ( )
0 1 0 0
∴ 𝜎0 |0⟩ = |0⟩

1 0 0 0
𝜎0 |1⟩ = ( )( ) = ( )
0 1 1 1
∴ 𝜎0 |1⟩ = |1⟩

Pauli matrix 𝜎1 = 𝜎𝑥 operating on |0⟩and |1⟩ states


0 1 1 0
𝜎𝑥 |0⟩ = ( )( ) = ( )
1 0 0 1
∴ 𝜎𝑥 |0⟩ = |1⟩

0 1 0 1
𝜎𝑥 |1⟩ = ( )( ) = ( )
1 0 1 0
∴ 𝜎𝑥 |1⟩ = |0⟩

Department of Physics, Atria IT, Bengaluru 9


Quantum Physics and Applications Module-3 BBPHYB102/202

Pauli matrix 𝜎2 = 𝜎𝑦 operating on |0⟩ and |1⟩ states


0 −𝑖 1 0 0
𝜎𝑦 |0⟩ = ( )( ) = ( ) = 𝑖( )
𝑖 0 0 𝑖 1
∴ 𝜎𝑦 |0⟩ = 𝑖|1⟩

0 −𝑖 0 −𝑖 1
𝜎𝑦 |1⟩ = ( ) ( ) = ( ) = −𝑖 ( )
𝑖 0 1 0 0
∴ 𝜎𝑦 |1⟩ = −𝑖|0⟩

Pauli matrix 𝜎3 = 𝜎𝑧 operating on |0⟩ and |1⟩ states


1 0 1 1
𝜎𝑧 |0⟩ = ( )( ) = ( )
0 −1 0 0
∴ 𝜎𝑧 |0⟩ = |0⟩

1 0 0 0 0
𝜎𝑧 |1⟩ = ( )( ) = ( ) = −( )
0 −1 1 −1 1
∴ 𝜎𝑧 |1⟩ = −|1⟩

Conjugate of a matrix
A conjugate matrix is a complex matrix, in which all its elements have been replaced by their
complex conjugates, i.e., the sign of the imaginary part of all its complex numbers have been
changed.
̅
The conjugate matrix of any matrix A is denoted with a horizontal bar above it: A
For example, let A is a matrix such that,
1+𝑖 2 + 3𝑖
A=[ ]
5 − 2𝑖 4
To find the conjugate of this matrix A we find the conjugate of each element of matrix A i.e.,
̅ =[ 1−𝑖
A
2 − 3𝑖
]
5 + 2𝑖 4
This is the conjugate of a 2×2 matrix A.

Transpose of a matrix
The transpose of a matrix is exchanging the rows of the matrix for its columns, i.e., the
transpose of a matrix is obtained by changing the rows into columns and columns into rows
for a given matrix. The transpose of a matrix is indicated by writing a “T” at the top right of
the matrix (AT).
For example, let A is a matrix such that,

Department of Physics, Atria IT, Bengaluru 10


Quantum Physics and Applications Module-3 BBPHYB102/202

4 6 2
𝐴=[ ]
5 8 1
To transpose matrix A we just have to interchange its rows for its columns. So, the first row
of the matrix becomes the first column of the matrix, and the second row of the matrix
becomes the second column of the matrix:
4 5
𝑇
𝐴 = [6 8]
2 1
Logically, the dimension of a matrix changes when it is transposed. In this case, matrix A
was a 2×3 dimension matrix, and its transpose is a 3×2 dimension matrix.

The conjugate transpose of a matrix


The complex conjugate transpose of a matrix interchanges the row and column index for each
element in the matrix, reflecting the elements across the main diagonal. The operation also
negates the imaginary part of any complex numbers. It is denoted by a † symbol as a super
script.
For example, let A is a matrix such that,
𝑖 1
A=[ ]
0 2 − 3𝑖
The conjugate of a matrix is,
̅ = [−𝑖
A
1
]
0 2 + 3𝑖
The conjugate transpose of a matrix is
−𝑖 0
A† = [ ]
1 2 + 3𝑖

Hermitian matrix
The matrix that is equal to its conjugate-transpose is called Hermitian. Thus, for any matrix A
If A† = A then it is called Hermitian or Self-Adjoint matrix.
For example, let A is a matrix such that,
4 3+𝑖
A=[ ]
3−𝑖 9
The conjugate of A is given by
̅=[ 4
A
3−𝑖
]
3+𝑖 9
The conjugate transpose of a matrix is
4 3+𝑖
A† = [ ]
3−𝑖 9

Department of Physics, Atria IT, Bengaluru 11


Quantum Physics and Applications Module-3 BBPHYB102/202

∴ A† = A

Unitary matrix
If a matrix U is said to be unitary, the product of the matrix and the conjugate transpose of a
matrix is equal to the Identity matrix. In other words, a matrix whose inverse is equal to its
conjugate transpose is known as unitary matrix.
Thus, If U is a unitary matrix then we have
U. U † = I
U. U −1 = I
For example, let U is a matrix such that,
1 1

U = √2 √2
1 1
i − i
[√2 √2 ]
The conjugate transpose of U is,
1 1
− 𝑖
U = √2
† √2
1 1
i
[√2 √2 ]
Let us take U. U † ,
1 1 1 1
𝑖 −
U. U = † √2 √2 × √2 √2
1 1 1 1
i − i i
[√2 √2 ] [√2 √2 ]
1 1 1 1 1 1 1 1
× + × − × i+ × i

U. U = √2 √2 √2 √2 √2 √2 √2 √2
1 1 1 1 1 1 1 1
i× − i× − i× i− i× i
[√2 √2 √2 √2 √2 √2 √2 √2 ]
1 1 𝑖 𝑖
+ − +
2 2 2 2
U. U † = [ ]
𝑖 𝑖 𝑖2 𝑖2
− − −
2 2 2 2
1 0
U. U † = [ ]
0 1
∴ U. U † = I

Column and Row matrices


A column matrix is a vector represented by a ket vector |𝜓⟩ . A row matrix is vector
represented by Bra vector ⟨𝜓|.

Department of Physics, Atria IT, Bengaluru 12


Quantum Physics and Applications Module-3 BBPHYB102/202

Let us consider,
𝛼1
|𝜓⟩ = [ 𝛽 ]
1

The row matrix is represented as


⟨𝜓| = [𝛼1∗ 𝛽1∗ ]
Where Bra vector is a complex conjugate of a ket vector.
𝛼1∗
|𝜓 ∗ ⟩ = [ ]
𝛽1∗
|𝜓⟩† = [𝛼1∗ 𝛽1∗ ]
|𝜓⟩† = ⟨𝜓| Thus, Bra is the complex conjugate of ket and conversely ket is the complex
conjugate of Bra.
Flipping between kets and bras is called "Taking the Dual". Thus, for |0⟩ state the
corresponding ⟨0| is given by,
1
|0⟩ = [ ]
0
⟨0| = [1 0]
Similarly for |1⟩ state we have ⟨1| is given by,
0
|1⟩ = [ ]
1
⟨1| = [0 1]

Inner product – Multiplication of Row and Column matrices


The inner product (or dot product) of two states is denoted by a bra-ket, ⟨𝜓|𝜑⟩ consisting of a
left part ⟨𝜓| called the bra, and a right part |𝜑⟩ called the ket. The notation was introduced in
1939 by Paul Dirac and is also known as Dirac notation.
A product of two quantum states bra Psi ⟨𝜓| and ket Phi |𝜑⟩ is known as inner product. An
inner product is also referred as the overlap between quantum states.
Let us consider two states |𝜓⟩ and |𝜑⟩ such that
𝛼1
|𝜓⟩ = [ 𝛽 ]
1
𝛼2
|𝜑⟩ = [ 𝛽 ]
2

We have ⟨𝜓| = [𝛼1∗ 𝛽1∗ ]


The multiplication of the |𝜓⟩ and |𝜑⟩is possible only by taking the inner product and is given
by ⟨𝜓|𝜑⟩

Department of Physics, Atria IT, Bengaluru 13


Quantum Physics and Applications Module-3 BBPHYB102/202

𝛼2
⟨𝜓|𝜑⟩ = [𝛼1∗ 𝛽1∗ ] [𝛽 ]
2

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


Thus the inner product always results in a scalar product.

Probability, quantum superposition and Normalization


Let us consider a quantum state or qubit |𝜓⟩ in the form of |0⟩ and |1⟩ state then we have,
|𝜓⟩ = 𝛼|0⟩ + 𝛽|1⟩
The above equation represents the quantum superposition of states |0⟩ and |1⟩.
1 0 𝛼
|𝜓⟩ = 𝛼 [ ] + 𝛽 [ ] = [ ]
0 1 𝛽
Also we have, ⟨𝜓| = [𝛼 ∗ 𝛽∗]
Let us consider the inner product ⟨𝜓|𝜓⟩ i.e.,
𝛼
⟨𝜓|𝜓⟩ = [𝛼 ∗ 𝛽∗] [ ]
𝛽
⟨𝜓|𝜓⟩ = 𝛼 ∗ 𝛼 + 𝛽 ∗ 𝛽
But 𝛼 ∗ 𝛼 + 𝛽 ∗ 𝛽 = |𝛼|2 + |𝛽|2
∴ ⟨𝜓|𝜓⟩ = |𝛼|2 + |𝛽|2
This can also be written as
|𝜓|2 = 𝜓𝜓 ∗
The above equation represents the probability density.
As per the principle of normalization we have,
|𝜓|2 = 𝜓𝜓 ∗ = 1
Or ⟨𝜓|𝜓⟩ = |𝛼|2 + |𝛽|2 = 1
This implies that a quantum state |𝜓⟩ is normalized.

Orthogonality
If two quantum states |𝜓⟩ and |𝜑⟩ are said to be orthogonal if their inner product is zero.
Mathematically it can be written as ⟨𝜓|𝜑⟩ = 0
Let us consider the inner product of |0⟩ and |1⟩,
0
⟨0|1⟩ = [1 0] [ ]
1
⟨0|1⟩ = 0
Orthonormality
If two quantum states |𝜓⟩ and |𝜑⟩ are said to be orthonormal if,

Department of Physics, Atria IT, Bengaluru 14


Quantum Physics and Applications Module-3 BBPHYB102/202

 |𝜓⟩ and |𝜑⟩ are normalized.


 |𝜓⟩ and |𝜑⟩ are orthogonal to each other.

Quantum gates
In quantum computing a quantum logic gate is a basic quantum circuit operating on a small
number of qubits. A qubit is useless unless it is used to carry out a quantum calculation. The
quantum calculations are achieved by performing a series of fundamental operations, known
as quantum logic gates. They are the building blocks of quantum circuits similar to the
classical logic gates in conventional digital circuits. Unlike many classical logic gates,
quantum logic gates are reversible. It is possible to perform quantum computing using only
reversible gates.

Single qubit gates


Quantum NOT gate (X)
In quantum computing the quantum NOT gate for qubits takes the state |0⟩ to |1⟩ and vice
versa. It is analogous to the classical not gate.
The matrix representation of quantum Not gate and its operation on |0⟩ and |1⟩ are as follows
is given by
0 1
X=[ ]
1 0
0 1 1 0
X|0⟩ = [ ] [ ]=[ ]
1 0 0 1
∴ X|0⟩ = |1⟩
0 1 0 1
X|1⟩ = [ ][ ] = [ ]
1 0 1 0
∴ X|1⟩ = |0⟩

A quantum State is given by 𝛼|0⟩ + 𝛽|1⟩ and its matrix representation is given by [𝛽𝛼]. Hence

the operation of quantum Not gate on quantum state is given by


𝛼 0 1 𝛼
X[ ] = [ ][ ]
𝛽 1 0 𝛽
𝛼 𝛽
X[ ] = [ ]
𝛽 𝛼
Thus the quantum state becomes 𝛼|1⟩ + 𝛽|0⟩ . Similarly for the input 𝛼|1⟩ + 𝛽|0⟩ the
quantum Not gate changes the state to 𝛼|0⟩ + 𝛽|1⟩.

The quantum not gate circuit and the truth table are shown below.

Department of Physics, Atria IT, Bengaluru 15


Quantum Physics and Applications Module-3 BBPHYB102/202

Truth table of NOT gate


Input Output
|0⟩ |1⟩
|1⟩ |0⟩
𝛼|0⟩ + 𝛽|1⟩ 𝛼|1⟩ + 𝛽|0⟩

Pauli-X, Y and Z gates


The Pauli X gate is same as quantum Not gate

Y gate
The Y gate is represented by Pauli matrix 𝜎𝑦 or Y. This gate maps |0⟩ state to 𝑖|1⟩ state and
|1⟩ state to −𝑖|0⟩ state.
The matrix representation of Y Gate and its operation on |0⟩ and |1⟩ are as follows,
0 −𝑖 1 0 0
𝑌|0⟩ = [ ] [ ] = [ ] = 𝑖[ ]
𝑖 0 0 𝑖 1
∴ 𝑌|0⟩ = 𝑖|1⟩

0 −𝑖 0 −𝑖 1
𝑌|1⟩ = [ ] [ ] = [ ] = −𝑖 [ ]
𝑖 0 1 0 0
∴ 𝑌|1⟩ = −𝑖|0⟩
Thus the Y-gate defines the transformation
𝑌(𝛼|0⟩ + 𝛽|1⟩) = 𝛼𝑌|0⟩ + 𝛽𝑌|1⟩ = −𝑖𝛽|0⟩ + 𝑖𝛼|1⟩
The quantum Y gate is represented by

Truth table of Y gate


Input Output
|0⟩ 𝑖|1⟩
|1⟩ −𝑖|0⟩
𝛼|0⟩ + 𝛽|1⟩ −𝑖𝛽|0⟩ + 𝑖𝛼|1⟩

Department of Physics, Atria IT, Bengaluru 16


Quantum Physics and Applications Module-3 BBPHYB102/202

Z gate
The Z-gate is represented by Pauli matrix 𝜎𝑧 or 𝑍. This gate leaves a |0⟩ state unchanged but
flips the sign of the |1⟩ state to −|1⟩.
The matrix representation and the operation of Z-gate on |0⟩ and |1⟩ are as follows,
1 0 1 1
𝑍|0⟩ = [ ] [ ]=[ ]
0 −1 0 0
∴ 𝑍|0⟩ = |0⟩

1 0 0 0 0
𝑍|1⟩ = [ ] [ ] = [ ] = −[ ]
0 −1 1 −1 1
∴ 𝑍|1⟩ = −|1⟩
Thus the Z-gate defines the transformation
𝑍(𝛼|0⟩ + 𝛽|1⟩) = 𝛼𝑍|0⟩ + 𝛽𝑍|1⟩ = 𝛼|0⟩ − 𝛽|1⟩

The circuit symbol and the truth table of Z-gate are as follows.

Truth table of Z gate


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

Hadamard gate (H-gate)


The Hadamard gate (H-gate) is a quantum gate and is one of the most important gate in
quantum computing. The H-gate is a single-qubit operation that maps the basis state |0⟩ to
|0⟩+|1⟩ |0⟩−|1⟩
and |1⟩ state to , thus creating an equal superposition of the |0⟩ and |1⟩ states.
√2 √2

The Hadamard gate is a self-inverse gate and satisfies unitary condition 𝐻 † . 𝐻 = 𝐼.


The matrix representation of Hadamard gate is as follows,
1 1 1
𝐻= [ ]
√2 1 −1
The Hadamard gate operation on |0⟩ and |1⟩ states is given by,
1 1 1 1 1 1
𝐻|0⟩ = [ ] [ ]= [ ]
√2 1 −1 0 √2 1
1
∴ 𝐻|0⟩ = (|0⟩ + |1⟩) = | +⟩
√2

Department of Physics, Atria IT, Bengaluru 17


Quantum Physics and Applications Module-3 BBPHYB102/202

1 1 1 0 1 1
𝐻|1⟩ = [ ] [ ]= [ ]
√2 1 −1 1 √2 −1
1
∴ 𝐻|0⟩ = (|0⟩ − |1⟩) = | −⟩
√2

The circuit representation of Hadamard gate operating on |0⟩ and |1⟩ states is,

Truth table of Hadamard gate


Input Action of Hadamard gate Output
|0⟩ 1 1 1 1 1 1 1
[ ] [ ]= [ ] (|0⟩ + |1⟩) = | +⟩
√2 1 −1 0 √2 1 √2
|1⟩ 1 1 1 0 1 1 1
[ ] [ ]= [ ] (|0⟩ − |1⟩) = | −⟩
√2 1 −1 1 √2 −1 √2
𝛼+𝛽 𝛼−𝛽
|0⟩ + |1⟩
𝛼|0⟩ + 𝛽|1⟩ 1 1 1 𝛼 1 𝛼+𝛽 √2 √2
[ ] [𝛽 ] = [ ]
√2 1 −1 √2 𝛼 − 𝛽 OR
|0⟩ + |1⟩ |0⟩ − |1⟩
𝛼 +𝛽
√2 √2

Phase gate or S gate


Phase gate or S gate is a quantum gate that turns a state |0⟩ into |0⟩ and state |1⟩ into 𝑖|1⟩. It
is also known as Z90 gate because it represents a 90-degree rotation around the z-axis in
Bloch sphere. The S gate satisfies the unitary condition 𝑆 † . 𝑆 = 𝐼
The matrix representation of the S gate is given by
1 0
𝑆=[ ]
0 𝑖
The operation of S gate on |0⟩ and |1⟩ states is given by,
1 0 1 1
𝑆|0⟩ = [ ] [ ]=[ ]
0 𝑖 0 0
∴ 𝑆|0⟩ = |0⟩

1 0 0 0
𝑆|1⟩ = [ ] [ ] = [ ] = 𝑖|1⟩
0 𝑖 1 𝑖
∴ 𝑆|1⟩ = 𝑖|1⟩
Thus, the S gate defines the transformation,
𝑆(𝛼|0⟩ + 𝛽|1⟩) = 𝛼𝑆|0⟩ + 𝛽𝑆|1⟩ = 𝛼|0⟩ + 𝑖𝛽|1⟩

Department of Physics, Atria IT, Bengaluru 18


Quantum Physics and Applications Module-3 BBPHYB102/202

The circuit symbol for S gate is given by

Truth table of S gate


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

𝝅
T gate or 𝟖 gate

The T gate is a single qubit operation represented in the matrix form as,

1 0 1 0
𝑇=[ 𝑖𝜋 ] = [0 1 + 𝑖]
0 𝑒4 √2
The T gate is related to S gate by the relation, S = T2
The operation of T gate on |0⟩ and |1⟩ states is given by,
1
0
𝑇|0⟩ = [0 1 + 𝑖 ] [1] = [1]
0 0
√2
∴ 𝑇|0⟩ = |0⟩

1 0 0
1 + 𝑖 0 1+𝑖 0
𝑇|1⟩ = [0 ] [ ] = [ + 𝑖] =
1 [ ]
1 √2 1
√2 √2
1+𝑖
∴ 𝑇|1⟩ = |1⟩
√2
The circuit symbol for T gate is given by,

Truth table of T gate


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

Department of Physics, Atria IT, Bengaluru 19


Quantum Physics and Applications Module-3 BBPHYB102/202

Multiple qubit gates


Multiple qubit gates operate on two or more input qubits. Usually one of them is a control
qubit.

Controlled gates
A gate with operation of kind "If 𝐴 is True then do 𝐵" is called controlled gate. The qubit |𝐴⟩
is called Control qubit and |𝐵⟩ is the Target qubit. The target qubit is altered only when the
control qubit is |1⟩. The control qubit remains unaltered during the transformations.

Controlled Not gate or CNOT gate


The CNOT gate or controlled-bit-flip gate, is a quantum logic gate that is an essential
component in the construction of a gate-based quantum computer. It can be used
to entangle and disentangle bell states.
The circuit representation of CNOT gate is as follows

It is represented by a Hermitian unitary matrix,


1 0 0 0
0 1 0 0
𝐶𝑁𝑂𝑇 = [ ]
0 0 0 1
0 0 1 0
The transformation could be expressed as,
|𝐴, 𝐵⟩ → |𝐴, 𝐵 ⊕ 𝐴⟩
Let us consider the operations of CNOT gate on the four inputs |00⟩, |01⟩, |10⟩ 𝑎𝑛𝑑 |11⟩.

Operation of CNOT gate for input |𝟎𝟎⟩


In this operation the input to the CNOT Gate is |00⟩ and the control qubit is |0⟩. Hence no
change in the state of target qubit |1⟩.
|00⟩ → |00⟩
Operation of CNOT gate for input |𝟎𝟏⟩
In this operation the input to the CNOT Gate is |01⟩ and the control qubit is |0⟩. Hence no
change in the state of target qubit |1⟩.
|01⟩ → |01⟩

Department of Physics, Atria IT, Bengaluru 20


Quantum Physics and Applications Module-3 BBPHYB102/202

Operation of CNOT gate for input |𝟏𝟎⟩


In this operation the input to the CNOT Gate is |10⟩ and the control qubit is |1⟩. Hence the
state of target qubit flips from |0⟩ to |1⟩.
|10⟩ → |11⟩
Operation of CNOT gate for input |𝟏𝟏⟩
In this operation the input to the CNOT Gate is |11⟩ and the control qubit is |1⟩. Hence the
state of target qubit flips from |1⟩ to |0⟩.
|11⟩ → |10⟩

Truth table of CNOT gate


Input Output
A B A B⊕A
|0⟩ |0⟩ |0⟩ |0⟩
|0⟩ |1⟩ |0⟩ |1⟩
|1⟩ |0⟩ |1⟩ |1⟩
|1⟩ |1⟩ |1⟩ |0⟩

Swap gate
The SWAP gate is two-qubit operation. Expressed in basis states. The SWAP gate swaps the
state of the two qubits involved in the operation.
The matrix representation of Swap gate is as follows,
1 0 0 0
0 0 1 0
𝑆𝑊𝐴𝑃 = [ ]
0 1 0 0
0 0 0 1
The SWAP gate interchanges the input states say, |∅⟩ and |𝜓⟩. The schematic swap gate
circuit symbol is as follows, which is equivalent to the combined circuit of 3 CNOT gates and
the overall effect is that two input qubits are swapped at the output.

The action and truth table of the swap gate is as follows.

Department of Physics, Atria IT, Bengaluru 21


Quantum Physics and Applications Module-3 BBPHYB102/202

Gate Input to gate Output of gate


1 |𝑎, 𝑏⟩ |𝑎, 𝑎 ⊕ b⟩
2 |𝑎, 𝑎 ⊕ b⟩ |𝑏, 𝑎 ⊕ b⟩
3 |𝑏, 𝑎 ⊕ b⟩ |𝑏, 𝑎⟩

Truth table of SWAP gate


Input Output
|00⟩ |00⟩
|01⟩ |10⟩
|10⟩ |01⟩
|11⟩ |11⟩

Department of Physics, Atria IT, Bengaluru 22

You might also like