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

Understanding Quantum Computing Basics

Quantum Computing focuses on developing computing methods based on quantum theory, utilizing qubits that can exist in multiple states simultaneously, unlike classical bits. Moore's Law, which predicted the exponential growth of transistors in integrated circuits, is reaching its limits, necessitating alternative computing methods like quantum computing. The document also discusses the differences between classical and quantum computing, the properties of qubits, and their representation using Bloch spheres and Dirac notation.

Uploaded by

rbarnali95
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 views18 pages

Understanding Quantum Computing Basics

Quantum Computing focuses on developing computing methods based on quantum theory, utilizing qubits that can exist in multiple states simultaneously, unlike classical bits. Moore's Law, which predicted the exponential growth of transistors in integrated circuits, is reaching its limits, necessitating alternative computing methods like quantum computing. The document also discusses the differences between classical and quantum computing, the properties of qubits, and their representation using Bloch spheres and Dirac notation.

Uploaded by

rbarnali95
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

Module 2

QUANTUM COMPUTING
Introduction
Quantum Computing is the area of study focused on developing computing methods based on
the principle of quantum theory. Quantum Physics explains the nature and behaviour of energy
and matter on the quantum (atomic and subatomic) scale. Elementary particles such as protons,
neutrons and electrons can exist in two or more states at a time. This fundamental behaviour is
utilized in designing the quantum computation processing units. Quantum computing uses a
combination of bits of 1’s, 0’s and both 1 and 0 at a time to perform computational tasks with
greater efficiency.

In Quantum computing, the information is encoded in quantum system such as atoms, ions or
quantum dots.

Moore’s law & its end


In 1965, Gordon E. Moore—co-founder of Intel—postulated that “The number of transistors on
an integrated circuit chip doubles approximately every two years”, in the semiconductor industry.
This is also known as Moore's Law.

Moore made this statement based on noticing emerging trends in chip manufacturing industry
and his prediction became the golden rule known as Moore's Law. Moore predicted that it would
continue to improve at an exponential rate for every 2 years. Semiconductor industry has followed
his prediction to guide long term planning and to set targets for R&D since then functioning to
some extent. Here is a graphical representation.

According to Moore’s law, the number of transistors per integrated circuit chip is doubles
approximately every 18 – 24 months. The present limit is approximately 108 transistors per
chip and the typical size of circuit components is of the order of 100 nanometers. That
means, we have reached the atomic size for storing a single bit of information and quantum
effects have become unavoidably dominant. Taking all these factors into consideration,
it is necessary to look for alternative ways of computing methods. One such alternative
is quantum computing. Quantum computers are based on quantum bits (qubits) and use

Dr. Prasanna B P
quantum effects like superposition and entanglement to their benefit, hence overcoming
the problems of classical computing.

Differences between classical and quantum computing:

Key points classical computing quantum computing


Basis of Large scale multipurpose High speed computers based on
computing computer based on classical quantum
physics.
mechanics.
Information Bit-based information storage Quantum bit-based information
storage using voltage/charge. storage
using electron spin or polarization.
Bit values Bits having a value of either 0 or 1 Qubits have a value of 0, 1 or
sometimes
can have a single value at any
linear combination of both, (a property
instant.
known as superposition).
Number of The number of possible states is The number of possible states is infinite
possible 2 which is either 0 or 1. since it can hold combinations of 0 or
states 1
along with some complex information.
Output Deterministic (repetition of Probabilistic (repetition of computation
computation on the same input on
gives the same output)
superposed states gives
probabilistic answer)
Gates used for Logic gates (AND, OR, NOT, etc.) Quantum gates (X, Y, Z, H, CNOT etc.)
processing
Operations Operations use Boolean Algebra. Operations use linear algebra and
are
represented with unitary matrices.
Circuit Circuit implemented in Circuits implemented in
implementation macroscopic technologies microscopic technologies.
Data Data processing is carried out by Data processing is carried out by
logic quantum
processing
and in sequential order. logic at parallel instances.
Concept of bit and qubit:

Bit: A digital computer 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 be a system with two distinct and distinguishable

Dr. Prasanna B P
possibilities. In modern computing and communications, bits are represented by the absence
or presence of an electrical signal, encoding “0” and “1” respectively.

Qubit: Qubit is the physical carrier of quantum information. It is the quantum version of a bit,
and its quantum state can be written in terms of two levels, labelled |0⟩ and |1⟩.

| ⟩ this notation is known as ‘ket’ notation and  | is known as ‘brac’ notation. Both are together
called Dirac notations ‘Ket’ are analogous to a column vector. They are also called basis
vectors and represented by two-dimensional column vectors as follows

The qubit can be in any one of the two states as well as in the superposed state simultaneously.
In quantum computation two distinguishable states of a system are needed to represent a bit of
data.

For example, two states of an electron orbiting a single atom. Spin up is taken as |1⟩ and spin
down is taken as |0⟩. Similarly ground state energy level is |0⟩ and excited state level is |1⟩

The difference between qubits and classical bits is that a qubit can be in a linear combination
(superposition) of the two states |0⟩ and |1⟩.

For example, if  and  are the probability amplitudes of electron in ground state (ie, in |0⟩ state)
and in excited state (ie, in |1⟩ state) then the linear combination of two states is

|ψ⟩ = α |0⟩ + β|1⟩

The numbers α and β are complex but due to normalization conditions

|∝|2 + |𝛽|2 = 1.

Here, |∝|2 is the probability of finding | ⟩ in state |0⟩ and


|𝛽|2 is the probability of finding | ⟩ in state |1⟩. So, when a qubit is measured, it only gives
either ‘0’ or ‘1’ as the measurement result probabilistically.

Consider the following example of qubit representation

1 1
Ψ= |0⟩ + |1⟩
√2 √2
1 1
Here, 𝛼 = and 𝛽 =
√2 √2

1
|𝛼|2 = |𝛽|2 =
2
This means that with 50% probability the qubit will be found in |0⟩ state as well as in |1⟩
state. The superposed states are also called as space states where as |0⟩ and |1⟩ are called
basis states.

Dr. Prasanna B P
Properties of qubits
1. Qubits make use of discrete energy state particles such as electrons and photons.
2. Qubits exist in two quantum state |0⟩ and |1⟩ or in a linear combination of both states.
This is known as superposition.
3. Unlike classical bits, qubit can work with the overlap of both 0 & 1 states.
4. For example, a 4-bit register can store one number from 0 to 15 (because of 2 n =
24=16), but 4-qubit register can store all 16 numbers.
5. When the qubit is measured, it collapses to one of the two basis states |0⟩ or |1⟩
6. Quantum entanglement and quantum tunnelling are two exclusive properties of
qubit.
7. State of the qubits is represented using Bloch sphere.

Representation of Qubits by Bloch Sphere: (single qubit state)

Bloch sphere is an imaginary sphere which is used to represent pure single-qubit states as a
point on its surface. It has unit radius. Its North Pole and South Pole are selected to represent
the basis states namely |0⟩ and |1⟩. North Pole represents |0⟩ (say spin up ↑) and South Pole
represents |1⟩ (say spin down ↓). All other points on the sphere represent superposed states
(ie, state space). Bloch sphere allows the state of a qubit to be represented in spherical
coordinates (ie, r,  and ). It is as follows

The state qubit |ψ⟩ on the Bloch sphere makes an angle


 with z-axis and its projection (azimuth) makes angle 
with x-axis as shown. It is clear from the fig that 0 <  <
 and 0 <  < 2. Now |ψ⟩ is represented as

|ψ⟩ = α |0⟩ + β|1⟩

It can be written that

|ψ⟩ = 𝑐𝑜𝑠(𝜃/2) |0⟩ + 𝑒 𝑖𝜙 𝑠𝑖𝑛 (𝜃/2)|1⟩ …….. (1)


Using this equation, we can represent |ψ⟩ for different
 and  as follows
Case-1: let  = 0 and  = 0, substitute in eqn (1), then eqn (1) becomes
|ψ⟩ = 𝑐𝑜𝑠(0) |0⟩ + 𝑒 𝑖0 𝑠𝑖𝑛 (0)|1⟩
|ψ⟩ = |0⟩ + 0
|𝛙⟩ = |𝟎⟩

Dr. Prasanna B P
Case-2: let  =  and  = 0, substitute in eqn (1), then eqn (1) becomes
|ψ⟩ = 𝑐𝑜𝑠(/2) |0⟩ + 𝑒 𝑖0 𝑠𝑖𝑛 (/2)|1⟩
|ψ⟩ = 0 + |1⟩
|ψ⟩ = |1⟩
Case-3: let  = /2 and  = 0, substitute in eqn (1), then eqn (1) becomes
|ψ⟩ = 𝑐𝑜𝑠(/4) |0⟩ + 𝑒 𝑖0 𝑠𝑖𝑛 (/4)|1⟩
1 1
|ψ⟩ = |0⟩ + |1⟩
√2 √2
|0⟩ + |1⟩
|𝛙⟩ =
√2
Case-4: let  = /2 and  = , substitute in eqn (1), then eqn (1) becomes
|ψ⟩ = 𝑐𝑜𝑠(/4) |0⟩ + 𝑒 𝑖 𝑠𝑖𝑛 (/4)|1⟩
1 1
|ψ⟩ = |0⟩ − |1⟩
√2 √2
|0⟩ − |1⟩
|𝛙⟩ =
√2
In the above discussion we have represented only single qubit state. Bloch sphere is a nice
visualization of single qubit states.

Representation of Multiple Qubits (Two qubits and Extension to N qubits):


Two qubits:
Two qubits system or multi qubit system are implemented by performing tensor operations
on quantum states (qubits). These operations are performed on the basis vectors of |0⟩
and|1⟩.
For example, to implement two qubit state |00⟩, the tensor operation should be performed
on states |0⟩, |0⟩, which is expressed as
1 1
1[ ]
1 1 0
|0⟩ ⊗ |0⟩ = [ ] ⊗ [ ] = [ ] = [0]
0 0 1 0
0[ ]
0 0
Thus, for two qubits, it can be in any one of four possible states represented as |00⟩, |01⟩,
|10⟩ and |11⟩ as followed.
1 0 0 0
|00⟩ = [0] |01⟩ = [1] |10⟩ = [0] |11⟩ = [0]
0 0 1 0
0 0 0 1
Then the superposed state of two qubits is the linear combination of these four states. It will

Dr. Prasanna B P
be represented by
|ψ⟩ = 𝛼00 |00⟩ + 𝛼01 |01⟩ + 𝛼10 |10⟩ + 𝛼11 |11⟩
For two qubit system we have 4 complex amplitudes namely 𝛼00 , 𝛼01 , 𝛼10 and 𝛼11 .
As per normalization condition,
|𝛼00 |2 + |𝛼01 |2 + |𝛼10 |2 + |𝛼11 |2 = 1
Similarly, if there are 3 qubits there will be 8 complex amplitudes.

N qubits
In general, for N qubits, there will be having 2N complex amplitudes. This means that a basis
state is represented by a number 0 to 2N-1.
The superposition state is represented as
2𝑁 −1

|ψ⟩ = ∑ 𝛼𝑥 |x⟩
𝑥=0

Qubit has two quantum states similar to the classical binary states. The qubit can be in any
one of the two states as well as in the superposed state simultaneously.

Dirac representation and Matrix operations:


In Quantum mechanics, Bra-Ket notation is a standard notation for describing quantum
states. The notation | ⟩ is known as ‘ket’ notation and  | is known as ‘brac’ notation. Both
are together called as Dirac notations.
Matrix representation of 0 and 1 states:
Consider a quantum state 𝜓 in a vector space represented by | ⟩. The notation | ⟩ indicates
that the object is a vector and is called a ket vector. The examples of such ket vectors are like
|ψ⟩, |⟩ and |u⟩ etc.
The wave function could be expressed in ket notation as |ψ⟩ (ket Vector), ψ is the wave
function.
Hence, any arbitrary state can be represented as
𝛼
|ψ⟩ = [𝛽 ] or |ψ⟩ = 𝛼|0⟩ + 𝛽|1⟩

The ‘ket’ vector typically represented as a column vector and ‘brac’ vector typically
represented as a row vector. The matrix for of the states |0⟩ and |1⟩ as follows;

|0⟩ = [1] |1⟩ = [0] ket notations


0 1
⟨0| = [1 0] ⟨1| = [0 1] brac notations

Dr. Prasanna B P
Operators and matrices:
An operator is a mathematical rule that transform a given function into another function.
Consider an operator ‘A’ transforms the vector |a⟩ to another vector |b⟩, it can be written as
̂ |a⟩ = |b⟩
A
There are different types of operators like Linear operator, Identity operator, Null operator,
Inverse operator, Singular & non-singular operator etc.

Identity operator I :
The identity operator is an operator which, operating on a function, leaves the function
unchanged
i.e., I|a⟩ = |a⟩ It is given in matrix form by
1 0
I=[ ]
0 1
This is also called as identity matrix. There will be no change when I operate on either |0⟩
state or |1⟩ state. It is explained as follows
1 0 1 1
I|0⟩ = [ ][ ] = [ ]
0 1 0 0
I|0⟩ = |0⟩
Similarly,
1 0 0 0
I|1⟩ = [ ][ ] = [ ]
0 1 1 1
I|1⟩ = |1⟩
Identity matrix acts as number 1. It is always a square matrix.

Conjugate matrices:
If the elements in a matrix A are complex numbers, then the matrix obtained by the
corresponding conjugate complex elements is called the conjugate of A and is denoted by A*.
For example,
0 i 0 −i
If, A = [ ] then, A∗ = [ ]
−i 0 i 0
1 i 1 −i
If, A = [ ] then, A∗ = [ ]
−i 1 i 1
Transpose matrices:
If columns and rows of a matrix A are interchanged, then the resultant matrix is transpose of
A and represented as AT. For example,
0 1 0 −i
If, A = [ ] then, AT = [ ]
−i 0 1 0

Dr. Prasanna B P
1 2i 1 4i + 1
If, A = [ ] then, AT = [ ]
4i + 1 0 2i 0
Hermitian matrices:
The transpose of complex conjugate of a matrix is known as Hermitian operator and the
resultant matrix is known as Hermitian matrix. It is represented by A†

Let A be a matrix, A* be its complex conjugate and A∗ is its transpose then its Hermitian
matrix is,

A† = A∗
1 2i 1 −2i 1 −(4i + 1)
If, A = [ ] then, A∗ = [ ] then, A† = [ ]
4i + 1 0 −(4i + 1) 0 −2i 0
Unitary matrices:
Matrix A is said to be unitary if it produces an identity matrix I when multiplied by its conjugate
transpose AA† = I
In other words, A is a unitary matrix if its conjugate transpose is equal to its reciprocal, ie
I 1
A† = = = 𝐴−1
A A
Column and Row Matrices and their inner product:
The Column Vectors are called ket Vectors denoted by |ψ⟩ and are represented by Column
Matrices.
The Row Vectors are called Brac Vectors denoted by ⟨| and are represented by Row
Matrices.
Let us consider a ket vector represented in the form of a column matrix.
𝛼1
|ψ⟩ = [ 𝛽 ]
1

The Row Matrix is represented as


⟨𝜙| = [𝛼1∗ 𝛽1∗ ]
𝛼1 †
Here, [𝛽 ] = [𝛼1∗ 𝛽1∗ ]
1

Thus the Brac is the complex conjugate of ket and vice versa.

Inner product:
The inner product of two vectors U and V in the complex space is a function that takes U and
V as inputs and produces a complex number as output.
In terms of Dirac notation, the inner product is given as ⟨U|V⟩ = C
In matrix form U and V are written as,

Dr. Prasanna B P
𝑥1 𝑥2
|U⟩ = [𝑦 ] and |V⟩ = [𝑦 ]
1 2

Their inner product is written as ⟨U|V⟩, but ⟨U| is equal to conjugate transpose of |U⟩
ie, ⟨U| = |U ∗ ⟩−1 = |U⟩† = [𝑥1∗ 𝑦1∗ ]
𝑥
⟨𝑈|𝑉⟩ = [𝑥1∗ 𝑦1∗ ] [𝑦2 ] = 𝑥1∗ 𝑥2 + 𝑦1∗ 𝑦2
2

The square root of the inner product of a vector with itself is also called as norm or the length
of the vector. It is given by

|U| = √⟨U|U⟩
Example: Find the inner product of

|U⟩ = [3 + i] and |V⟩ = [3i]


4−i 4
First, we shall find the conjugate transpose of |U⟩
3−i
|U ∗ ⟩ = [ ]
4+i
|U⟩† = [3 − i 4 + i]
⟨U| = |U⟩† = [3 − i 4 + i]

⟨U|V⟩ = [3 − i 4 + i] [3i]
4
⟨U|V⟩ = (3 − i) ∗ 3i + (4 + i) ∗ 4
⟨U|V⟩ = (9i + 3) + (16 + 4i)
⟨U|V⟩ = (13i + 19)

Orthogonality:
If the inner product of two vectors is equal to 0 then they are said to be orthogonal (or
perpendicular) to each other.
If ⟨U|V⟩ = 0 then |U⟩ and |V⟩ are perpendicular
Consider,

|0⟩ = [1] and |1⟩ = [0]


0 1

⟨0|1⟩ = [1 0] [0]
1
⟨0|1⟩ = 0
Hence |0⟩ is perpendicular to |1⟩

Normalization:
The inner product of a vector with itself is equal to one. This is known as normalization

Dr. Prasanna B P
condition.
⟨ψ|ψ⟩ = 1
The physical significance of normalization is that the "probability amplitude" of the quantum
system.

Orthonormality:
If each element of a set of vectors is normalized and the elements are orthogonal with respect
to each other, we say the set is orthonormal.
1 0
Consider the set, |0⟩ = [ ] and |1⟩ = [ ]
0 1

⟨0|0⟩ = [1 0] [1] = 1 - normalized


0

⟨0|1⟩ = [1 0] [0] = 0 - orthogonal


1

⟨1|1⟩ = [0 1] [0] = 1 - normalized


1

⟨1|0⟩ = [0 1] [1] = 0 - orthogonal


0
Hence set of |0⟩ and |1⟩ is orthonormal.
From the above relations, if states |ψ⟩ and |ϕ⟩ are said to be orthonormal if
1. |ψ⟩ and |ϕ⟩ are normalized.
2. |ψ⟩ and |ϕ⟩ are orthogonal to each other.

Probability:
Let us consider a Quantum State,
𝛼
|ψ⟩ = 𝛼 [1] + 𝛽 [0] = [𝛽 ]
0 1
The inner product ⟨ψ|ψ⟩ is given by,
𝛼
⟨ψ|ψ⟩ = [𝛼 ∗ 𝛽 ∗ ] [𝛽 ] = 𝛼 ∗ 𝛼 + 𝛽 ∗ 𝛽

𝛼 ∗ 𝛼 + 𝛽 ∗ 𝛽 = |𝛼|2 + |𝛽|2
This could also be written as,
|ψ|2 = ψψ∗
Thus, the above equation represents Probability Density. As per the principle of
Normalization
|ψ|2 = ψψ∗ = ⟨ψ|ψ⟩ = 1 = |α|2 + |β|2
Thus, it implies |ψ⟩ is normalized.

Dr. Prasanna B P
Pauli Matrices:
These are the 2 × 2 complex matrices introduced by Pauli, in order to account for the
interaction of the spin with an external electromagnetic field. They are given by
0 1
σ1 = σx = X = [ ]
1 0
0 −i
σ2 = σy = Y = [ ]
i 0
1 0
σ3 = σ𝑧 = Z = [ ]
0 −1
Properties of Pauli matrices:
➢ Square of Pauli matrices gives identity matrix I.
0 1 0 1 1 0
X2 = [ ][ ]=[ ]=I
1 0 1 0 0 1
Similarly,
Y 2 = I and Z 2 = I
➢ Pauli matrices are unitary matrix.
X X † = 1, Y Y † = 1 and Z Z † = 1
➢ Pauli matrices are Hermitian.
Let A be a matrix, A* be its complex conjugate and A† is its transpose. If A = A† then the matrix
is Hermitian.
0 −i
Y=[ ]
i 0
0 i
Y∗ = [ ]
−i 0
0 −i
Y† = [ ]
i 0
Y = Y†

Operation of Pauli Matrices on 0 and 1 states:


Three Pauli matrices X, Y and Z operates on states |0⟩ and |1⟩ as follows
X operating on |0⟩ and |1⟩ states
0 1 1 0
X|0⟩ = [ ] [ ] = [ ] = |1⟩
1 0 0 1
X|0⟩ = |1⟩
0 1 0 1
X|1⟩ = [ ] [ ] = [ ] = |0⟩
1 0 1 0
X|1⟩ = |0⟩

Dr. Prasanna B P
Since X inverts each input (ie, |0⟩ becomes |1⟩ and |1⟩ becomes |0⟩.
It is also called as bit-flip gate.
If a superposed qubit goes through X matrix, the result will be
0 1 𝛼 𝛽
X|ψ⟩ = [ ] [𝛽 ] = [ ] = 𝛽|0⟩ + α|1⟩
1 0 𝛼
X|ψ⟩ = 𝛽|0⟩ + α|1⟩
Y operating on |0⟩ and |1⟩ states
0 −i 1 0 0
Y|0⟩ = [ ] [ ] = [ ] = i [ ] = i|1⟩
i 0 0 i 1
Y|0⟩ = i|1⟩
0 −i 0 −i 1
Y|1⟩ = [ ] [ ] = [ ] = −i [ ] = −i|0⟩
i 0 1 0 0
Y|1⟩ = −i|0⟩
If a superposed qubit goes through Y matrix, the result will be
0 −i 𝛼 −iβ
Y|ψ⟩ = [ ] [𝛽 ] = [ ] = −iβ|0⟩ + iα|1⟩
i 0 iα
Y|ψ⟩ = −iβ|0⟩ + iα|1⟩
Z operating on |0⟩ and |1⟩ states
1 0 1 1
Z|0⟩ = [ ] [ ] = [ ] = |0⟩
0 −1 0 0
Z|0⟩ = |0⟩
1 0 0 0 0
Z|1⟩ = [ ] [ ] = [ ] = −1 [ ] = −|1⟩
0 −1 1 −1 1
Z|1⟩ = −|1⟩
If a superposed qubit goes through Z matrix, the result will be
1 0 𝛼 𝛼
Z|ψ⟩ = [ ] [𝛽 ] = [−𝛽 ] = α|0⟩ − β|1⟩
0 −1
Z|ψ⟩ = α|0⟩ − β|1⟩

Quantum Gates:
A quantum gate is a very simple computing device that performs quantum operation on
qubits. Quantum gates are one of the essential parts of a quantum computer and are the
building blocks of all quantum algorithms.
Quantum gates are mathematically represented as transformation matrices which operate
on inputs to give outputs.
There are different types of quantum gates. Single-qubit gates and multiple qubit gates. These
gates can flip a qubit from 0 to 1 as well as allowing superposition states to be created.

Dr. Prasanna B P
Single-Qubit Gates:
Single qubit inputs are |0⟩ to |1⟩ and can be represented by matrix forms as

|0⟩ = [1] and |1⟩ = [0]


0 1
Single Qubit Gates are X- gate, Y-gate, Z- gate, H –gate, S-gate, T-gate.

1. X – Gate or Quantum Not Gate:


X-gate is the single qubit input gate and is also called as Pauli X – gate or quantum NOT gate.
The Matrix form of X is given by
0 1
X=[ ]
1 0
Action of the X-gate on inputs: When X gate operates of inputs |0⟩, |1⟩ and |ψ⟩
When X operates on |0⟩ and |1⟩ the output will be inverted (ie, |0⟩ becomes |1⟩ and |1⟩
becomes |0⟩)
0 1 1 0
X|0⟩ = [ ] [ ] = [ ] = |1⟩
1 0 0 1
X|0⟩ = |1⟩
0 1 0 1
X|1⟩ = [ ] [ ] = [ ] = |0⟩
1 0 1 0
X|1⟩ = |0⟩
Since X inverts each input, it is also called as bit-flip gate.
If a superposed qubit goes through X gate, the result will be
0 1 𝛼 𝛽
X|ψ⟩ = [ ] [ ] = [ ] = 𝛽|0⟩ + α|1⟩
1 0 𝛽 𝛼
X|ψ⟩ = 𝛽|0⟩ + α|1⟩
Gate representation is

X - Gate
Input Output
|𝟎⟩ |𝟏⟩
|𝟏⟩ |𝟎⟩
𝜶|𝟎⟩ + 𝜷|𝟏⟩ 𝜷|𝟎⟩ + 𝜶|𝟏⟩
Example for superposed state
1 1 1 1
|0⟩ + |1⟩ |1⟩ + |0⟩
√2 √2 √2 √2
(+)

Dr. Prasanna B P
1 1 1 1
|0⟩ − |1⟩ |1⟩ − |0⟩
√2 √2 √2 √2
(-)
2. Y – Gate
Y-gate is the single qubit input gate. This is also called as Pauli Y – gate.
The matrix form of Y gate is,
0 −i
Y=[ ]
i 0
Action of Y gate on inputs: When Y operates |0⟩, |1⟩ and |ψ⟩
0 −i 1 0 0
Y|0⟩ = [ ] [ ] = [ ] = i [ ] = i|1⟩
i 0 0 i 1
Y|0⟩ = i|1⟩
0 −i 0 −i 1
Y|1⟩ = [ ] [ ] = [ ] = −i [ ] = −i|0⟩
i 0 1 0 0
Y|1⟩ = −i|0⟩
If a superposed qubit goes through Y gate, the result will be
0 −i 𝛼 −iβ
Y|ψ⟩ = [ ] [𝛽 ] = [ ] = −iβ|0⟩ + iα|1⟩
i 0 iα
Y|ψ⟩ = −iβ|0⟩ + iα|1⟩
Gate representation is,

Y - Gate
Input Output
|𝟎⟩ 𝒊|𝟏⟩
|𝟏⟩ −𝒊|𝟎⟩
𝜶|𝟎⟩ + 𝜷|𝟏⟩ −𝒊𝜷|𝟎⟩ + 𝒊𝜶|𝟏⟩
Example for superposed state
1 1 i i
|0⟩ + |1⟩ |1⟩ − |0⟩
√2 √2 √2 √2
(+)
1 1 i i
|0⟩ − |1⟩ |1⟩ + |0⟩
√2 √2 √2 √2
(-)

3. Z – Gate
Z-gate is the single qubit input gate. This is also called as Pauli Z – gate.
Dr. Prasanna B P
The matrix form of Z gate is
1 0
Z=[ ]
0 −1
Action of Z gate on inputs: When Z operates on |0⟩ and |1⟩ the phase will change. Hence this
is also called as phase-flip gate.
1 0 1 1
Z|0⟩ = [ ] [ ] = [ ] = |0⟩
0 −1 0 0
Z|0⟩ = |0⟩
1 0 0 0 0
Z|1⟩ = [ ] [ ] = [ ] = −1 [ ] = −|1⟩
0 −1 1 −1 1
Z|1⟩ = −|1⟩
If a superposed qubit goes through Z gate, the result will be
1 0 𝛼 𝛼
Z|ψ⟩ = [ ] [𝛽 ] = [−𝛽 ] = α|0⟩ − β|1⟩
0 −1
Z|ψ⟩ = α|0⟩ − β|1⟩
Gate representation is,

Z - Gate
Input Output
|𝟎⟩ |𝟎⟩
|𝟏⟩ −|𝟏⟩
𝜶|𝟎⟩ + 𝜷|𝟏⟩ 𝜶|𝟎⟩ − 𝜷|𝟏⟩
Example for superposed state
1 1 1 1
|0⟩ + |1⟩ |0⟩ − |1⟩
√2 √2 √2 √2
(+)
1 1 1 1
|0⟩ − |1⟩ |0⟩ + |1⟩
√2 √2 √2 √2
(-)

4. Hadamard Gate (H-gate)

H- gate is a single qubit gate and is also gate to superposition. H gate acts on single qubit input
and produce superposition state output.
Matrix form of H gate and its symbol is,
1 1 1
H= [ ]
√2 1 −1

Dr. Prasanna B P
Action of H gate on inputs:
Let us find out what happens when Hadamard gate operates on a qubit that is in the |0⟩ state,
1 1 1 1 1 1 1
H|0⟩ = [ ][ ] = [ ]= (|0⟩ + |1⟩)
√2 1 −1 0 √2 1 √2
|0⟩ + |1⟩
H|0⟩ =
√2
Let us find out what happens when Hadamard gate operates on a qubit that is in the |1⟩ state,
1 1 1 0 1 1 1
H|1⟩ = [ ][ ] = [ ]= (|0⟩ − |1⟩)
√2 1 −1 1 √2 −1 √2
|0⟩ − |1⟩
H|1⟩ =
√2
If a superposed qubit goes through H gate, the result will be,
1 1 1 𝛼 1 𝛼+𝛽 𝛼+𝛽 𝛼−𝛽
H|ψ⟩ = [ ] [𝛽 ] = [ ]=( ) |0⟩ − ( ) |1⟩
√2 1 −1 √2 𝛼 − 𝛽 √2 √2
|0⟩ + |1⟩ |0⟩ − |1⟩
H|ψ⟩ = α ( ) + β( )
√2 √2

Gate representation is,

H - Gate
Input Output
|𝟎⟩ + |𝟏⟩
|𝟎⟩
√𝟐
|𝟎⟩ − |𝟏⟩
|𝟏⟩
√𝟐
|𝟎⟩ + |𝟏⟩ |𝟎⟩ − |𝟏⟩
𝜶|𝟎⟩ + 𝜷|𝟏⟩ 𝜶( ) + 𝜷( )
√𝟐 √𝟐

Dr. Prasanna B P
Example for superposed state
1 1
|0⟩ + |1⟩
√2 √2 |0⟩
(+)
1 1
|0⟩ − |1⟩
√2 √2 |1⟩
(-)
Note: Difference between X, Y, Z and H gates is that in X, Y and Z gates, output is in single
state whereas in H gate output is superposed state.

5. Phase Gate (S Gate):


S Gate is a single qubit gate. The Phase gate or S gate is a gate that transfers |0⟩ into |0⟩ and
|1⟩ into |1⟩.
The matrix form of S gate is
1 0
S=[ ]
0 i
Action of S gate on inputs:
Consider S gate apply to a state |0⟩ it will remain same
1 0 1 1
S|0⟩ = [ ] [ ] = [ ] = |0⟩
0 i 0 0
S|0⟩ = |0⟩
If S gate apply to a state |1⟩ it will be transformed into i|1⟩
1 0 0 0
S|1⟩ = [ ] [ ] = i [ ] = i|1⟩
0 i 1 1
S|1⟩ = i|1⟩
S gate apply to the state α|0⟩ + β|1⟩ it transforms to the state α|0⟩ + iβ|1⟩
1 0 𝛼 α
S|ψ⟩ = [ ] [𝛽 ] = [iβ] = α|0⟩ + iβ|1⟩
0 i
S|ψ⟩ = α|0⟩ + iβ|1⟩
The S gate representation is as follows

S - Gate
Input Output
|𝟎⟩ |𝟎⟩
|𝟏⟩ 𝐢|𝟏⟩
𝜶|𝟎⟩ + 𝜷|𝟏⟩ 𝜶|𝟎⟩ + 𝒊𝜷|𝟏⟩

Dr. Prasanna B P
Example for superposed state
1 1 1 i
|0⟩ + |1⟩ |0⟩ + |1⟩
√2 √2 √2 √2
(+)
1 1 1 i
|0⟩ − |1⟩ |0⟩ − |1⟩
√2 √2 √2 √2
(-)

Question Bank
1. Explain Moore’s law and its end.
2. Elucidate the difference between classical computing and quantum computing.
3. Define bit and qubit. Explain the properties of qubit.
4. Explain the mathematical representation of qubit using Block sphere.
5. Explain the Representation of two qubits using Tensor operation and their extension
to Multiple Qubits.
6. Define identity operator and apply identity operator to |0⟩ and |1⟩ states.
7. Explain Conjugate and Transpose matrix with example.
1 1+i 1−i
8. If A = 2 [ ]. Show that A is unitary matrix and also A† = A−1 .
1−i 1+i
3+i 3i
9. Find the inner product of |U⟩ = [ ] and |V⟩ = [ ].
4−i 4
10. Show that set of |0⟩ and |1⟩ is orthonormal.
11. What are Pauli Matrices? Explain the Properties of Pauli Matrices with examples.
12. Compute the output of Pauli matrices X, Y and Z operating on the states |0⟩ and |1⟩.
13. Compute the output of Pauli matrices X, Y and Z operating on superposed states of 0⟩
and |1⟩.
14. Explain Quantum NOT gate and its operation on |0⟩ and |1⟩ and their superposition
states.
15. Explain Hadamard Gate. Apply Hadamard Gate on the states |0⟩ and |1⟩.
16. Discuss the output of the H gate operating on superposed states of 0⟩ and |1⟩.
17. Discuss the output of the Phase (S) gate operating on |0⟩ and |1⟩ and their
superposition states.

Dr. Prasanna B P

You might also like