0% found this document useful (0 votes)
12 views27 pages

Quantum Computing Principles and Qubits

The document provides an overview of quantum computing, detailing its principles, differences from classical computing, and the concept of qubits. It discusses the limitations of classical computing as per Moore's law and introduces quantum bits, superposition, entanglement, and quantum gates. Additionally, it covers matrix operations, Dirac representation, and the representation of qubits using the Bloch sphere.

Uploaded by

Jitendra
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)
12 views27 pages

Quantum Computing Principles and Qubits

The document provides an overview of quantum computing, detailing its principles, differences from classical computing, and the concept of qubits. It discusses the limitations of classical computing as per Moore's law and introduces quantum bits, superposition, entanglement, and quantum gates. Additionally, it covers matrix operations, Dirac representation, and the representation of qubits using the Bloch sphere.

Uploaded by

Jitendra
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

Made with Xodo PDF Reader and Editor

MODULE III

QUANTUM COMPUTING
Principles of Quantum Information & Quantum Computing:
Introduction to 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. Extension to N qubits.
Dirac representation and matrix operations:
Matrix representation of 0 and 1 States, Identity Operator I, Applying I to|0⟩and |1⟩ states,
Pauli Matrices and its operations on |0⟩and |1⟩states, Explanation of i) Conjugate of a matrix
and ii) Transpose of a matrix. Unitary matrix U, Examples: Row and Column Matrices and
their multiplication (Inner Product), Probability, and Quantum Superposition, normalization
rule. Orthogonality, Orthonormality. Numerical Problems.
Quantum Gates:
Single Qubit Gates: Quantum Not Gate, Pauli – X, Y and Z Gates, Hadamard Gate, Phase
Gate (or S Gate), T Gate.
Multiple Qubit Gates: Controlled gate, CNOT Gate, (Discussion for 4 different input states).
Representation of Swap gate, Controlled -Z gate, Toffoli gate.

Introduction
Today’s computers—both in theory and practice (PCs, HPCs, laptops, tablets, smartphone )
are based on classical physics. They are limited by locality (operations have only local
effects) and by the classical fact that systems can be in only one state at the time. However,
modern quantum physics tells us that the world behaves quite differently. A quantum system
can be 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. It combines two of the
most important strands of 20th-century science: quantum mechanics (developed by Planck,
Einstein, Bohr, Heisenberg, Schrödinger and others in the period 1900–1925) and computer
science . An important objective is to find quantum algorithms that are significantly faster
than any classical algorithm solving the same problem.

Quantum computing is a type of computation whose operations can harness the phenomena
of quantum mechanics, such as superposition, interference, and entanglement.
To store and manipulate the information, they use their own quantum bits also called ‘Qubits’
unlike other classical computers which are based on 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. Instead of 0 and 1, Quantum
computers can choose two electronics states of an atom or two different polarization
orientations of light for the two states They can be superposed and can give more
combinations.
.
Made with Xodo PDF Reader and Editor

MODULE III

Moore’s law & its end

In the year 1965, Gordon Moore, co-founder of Intel discovered that “the number of
transistors in a dense integrated circuit (IC) doubles about every two years”. Moore's
law is an observation and projection of a historical trend. Rather than a law of physics, it is
an empirical relationship linked to gains from experience in production.
Moore’s Law is considerable because it means that computers and their computing power get
smaller and faster over time. Though this law is putting the brakes on now and consequently,
the improvement in classical computers is not like before it used to be. This shows that the
size of the circuits of the classical computer after 3-2 nanometres has reached their limit. At
these scales, controlling the flow of electrons becomes increasingly more difficult as all kinds
of quantum effects play themselves within the transistor itself. Since, the transistor is
approaching the point where it is simply as small as we can ever make it and have it still
function.
The way we’ve been building and improving silicon chips is coming to its final iteration.
Thus Quantum Computation is the option for the further generation.

Classical Bits :
It’s a single unit of information that has a value of either 0 or 1 (off or on, false or true, low
or high).

Quantum Bits :
In quantum computing, a qubit or quantum bit is the basic unit of quantum information. A
quantum system like atom or electrons can exist in states as 0 and 1 or simultaneously both
as 0 and 1.

Differences Between Classical and Quantum Computing

Classical Computing

1. .Used by large scale, multipurpose and devices.


2. Information is stored in bits. There is discrete number of possible states. Either 0 or 1.
3. Power increases in 1:1 relationship with number of transistor
4. They have low error rates and can operate at room temperature
5. Calculations are deterministic. This means repeating the same inputs results in the
same output.
6. Data processing is carried out by logic and in sequential order
7. Operations are governed by Boolean Algebra.
8. Circuit behaviour is defined by Classical Physics.
Made with Xodo PDF Reader and Editor

MODULE III

Quantum Computing

1. Used by high speed, quantum mechanics-based computers.


2. Information is based on Quantum Bits. There is an infinite, continuous number of
possible states. They are the result of quantum superposition.
3. Power increases in exponentially in proportion to the number of qubits
4. They have high error rates and need to be kept at ultracold
5. The calculations are probabilistic, meaning there are multiple possible outputs to the
same inputs.
6. Data processing is carried out by quantum logic at parallel instances.
7. Operations are defined by linear algebra by Hilbert Space.
8. Circuit behaviour is defined by Quantum Mechanics.

Concept of Qubit and its properties

Concept of Qubit

❖ In quantum computing, a qubit or quantum bit is a basic unit of quantum


information
❖ A quantum system like atom or electrons can exist in states as 0 and 1 or
simultaneously both as 0 and 1.
❖ It will not be know definitely, in which states they would be.
❖ But the number called probability factor associated with the corresponding state
provide the probability of the atoms/electrons existence in each of these states.
❖ Since, they follow the quantum principles, it becomes a quantum system and called as
quantum bits or Qubit.
❖ Similarly in case of light, a Qubit may correspond to superposed state of horizontal
and vertical polarization of photons apart from two individual states. .

Properties of Qubits

❖ A Qubit can be physically implemented by the two states of an electron or horizontal


and vertical polarizations of photons as |↓⟩ and |↑⟩

❖ Superposition

A Qubit can be in a superposed state of the two states /0> and /1> (Ket notation) . If
measurements are carried out with a qubit in superposed state then the results that we
get will be probabilistic

It is represented as /> = /0> +/1>

Where  and  are complex numbers and ||2 + ||2 = 1

❖ No Cloning Theorem

The Qubit changes its state once it is subjected to the measurement. It means, one
cannot copy the information from the qubit the way we do it in classical computers, as
there will be no similarity between the copy and the [Link] is known as “no
cloning principle”
Made with Xodo PDF Reader and Editor

MODULE III

❖ Entanglement

Two Qubits can strongly correlated with each other. Changing state of one of the
qubits will instantaneously change the the state of the other one in predictable way.
This happens even if they are separated by very long distances.

Representation of Qubits by Bloch Sphere

❖ The pure state space qubits (Two Level Quantum Mechanical Systems) can be
visualized using an imaginary sphere called Bloch Sphere. It has a unit radius
❖ This Bloch sphere picture is elegant and powerful for the single qubit.

❖ The Arrow on the sphere represents the state of the Qubit. The north and south poles
are used to represent the basis states |0⟩ and |1⟩ respectively. The other locations on
the bloch sphere represents the superpositions state i.e |0⟩ and |1⟩ states and
represented by 𝛼 |0⟩ + 𝛽 |1⟩ with |α|2 + |𝛽|2 = 1. Thus a Qubit can be any point on the
Bloch Sphere.
❖ The Bloch sphere allows the state of the qubit to be represented in unit spherical co-
ordinates. They are the polar angle 𝜃 and the azimuth angle 𝜙. The block sphere is
represented by the equation

θ θ
|𝜓⟩ = 𝑐𝑜𝑠 2 |0⟩ + 𝑒 𝑖 𝜙 𝑠𝑖𝑛 2 |1⟩

here 0 ≤ 𝜃 ≤ 𝜋 and 0 ≤ 𝜙 ≤ 2𝜋. The normalization constraint is given by


Made with Xodo PDF Reader and Editor

MODULE III

θ θ
|𝑐os 2 |2 + | sin 2 |2 = 1

❖ For any Gate 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 Bloch sphere.

Single and Two qubits and Extension to N qubits

Single qubit

A Single Qubit has two computational basis states |0⟩ and |1⟩. In single qubit the state of
1 0
qubit will be either in 0 and 1 where 0 = [ ] and 1 = [ ]
0 1

Above basis vectors are written as column matrix in the form of identity matrix

1 0
[ ] Which represents the single qubit state. The pictorial representation of the single
0 1
qubit is as follows. 𝛼 |0⟩ + 𝛽 |1⟩

Two qubit

A two-qubit system has 4 computational basis states denoted as |00⟩, |01⟩, |10⟩, |11⟩.The
1 0 0 0
matrix representation of two qubit state is [0 1 0 0]
0 0 1 0
0 0 0 1

The pictorial representation of two qubit is as follows. 𝛼 |00⟩ + 𝛽 |01⟩ + 𝛾 |10⟩ + 𝛿 |11⟩

Extension to N qubits

A multi-qubit system of N qubits has 2𝑁 computational basis states. For example a state
with 3 qubits has 23 computational basis states. Thus for N qubits the computational
basis states are denoted as |00 · · · 00⟩, |00 · · · 01⟩, |00 · · · 10⟩, |00 · · · 11⟩ · · · |11 · · ·
11⟩. The block diagram of representation of N qubits is as follows
Made with Xodo PDF Reader and Editor

MODULE III

Dirac Representation and Matrix Operations

Linear Algebra

Linear Algebra is the study of vector spaces and operations on vector spaces. The Standard
quantum mechanical notation for a quantum state 𝜓 in a vector space is |𝜓⟩. The notation |⟩
indicates that the object is a vector rand is called a ket vector. The examples of ket vectors are
|𝜓⟩, |𝜙⟩ and |𝑢⟩ etc.

Matrix Representation of 0 and 1 States

The wave function could be expressed in ket notation as |𝜓⟩ (ket Vector), 𝜓 is the wave
α1 1 0
function. The |𝜓⟩ = [ ] . The matrix for of the states |0⟩ and |1⟩. |0⟩ = [ ] & |1⟩ = [ ]
α2 0 1

a. Identity Operator

1 0
The operator of type 𝐼 = ( ) is called identity operator. When an identity operator acts
0 1
on a state vector its keeps the state intact. By analogy we study identity operator as an
identity matrix.

Let us consider the operation of Identity operator on |0⟩ and |1⟩ states. As per the principle of
identity operation 𝐼 |0⟩ = |0⟩ and 𝐼 |1⟩ = |1⟩

1 0 1 1
𝐼 |0⟩ = ( )( ) = ( )
0 1 0 0

1 0 0 0
𝐼 |1⟩ = ( )( ) = ( )
0 1 1 1

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

b. Pauli Matrices and Their operation on |0⟩ and |1⟩ States

There are four extreamly useful matrices called Pauli Matrices that are often used in quantum
computers. The Pauli matrices of the following form

1 0
𝜎0 = 𝐼 = ( )
0 1

This is an identity matrix.


Made with Xodo PDF Reader and Editor

MODULE III

0 1
𝜎1 = 𝜎𝑋 = X = ( )
1 0

0 −𝑖
𝜎2 = 𝜎𝑌 = Y = ( )
1 0

1 0
𝜎3 = 𝜎𝑍 = Z = ( )
0 −1

Here X,Y,Z are known as Pauli Matrices

Pauli Matrices operating on |0⟩ and |1⟩ States

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

1 0 0 0
𝜎0 |1⟩ = ( ) ( ) = ( ) = |1⟩
0 1 1 1
0 1 1 0
2. 𝜎𝑥 |0⟩ = ( ) ( ) = ( ) = |1⟩
1 0 0 1
0 1 0 1
𝜎𝑥 |1⟩ = ( ) ( ) = ( ) = |0⟩
1 0 1 0

0 −𝑖 1 0
3. 𝜎𝑦 |0⟩ = ( ) ( ) = ( ) = 𝑖|1⟩
𝑖 0 0 1
0 −𝑖 0 1
𝜎𝑦 |1⟩ = ( ) ( ) = ( ) = −𝑖|0⟩
𝑖 0 1 0
1 0 1 1
4. 𝜎𝑧 |0⟩ = ( ) ( ) = ( ) = |0⟩
0 −1 0 0
1 0 0 0
𝜎𝑧 |1⟩ = ( ) ( ) = ( ) = −|1⟩
0 −1 1 −1

c. Conjugate of a Matrix

It is possible to find the conjugate for a given matrix by replacing each element of the matrix
with its complex conjugate for example consider a matrix 𝐴 as given below.

𝑖 1
A=( )
0 2 − 3𝑖

The conjugate of the matrix 𝐴 is given by

−𝑖 1
𝐴∗ = ( )
0 2 + 3𝑖

Thus 𝐴∗ is the conjugate of A.


Made with Xodo PDF Reader and Editor

MODULE III

d. Transpose of a Matrix

The transpose of a matrix is found by interchanging its rows into columns or columns into
rows. The Transpose of a matrix 𝐴 is denoted by using the superscript as𝐴𝑇 . Consider a
matrix 𝐴 as given below.

𝑖 1
A=( )
0 2 − 3𝑖

The Transpose of the matrix 𝐴 is given by

𝑖 0
𝐴𝑇 = ( )
1 2 − 3𝑖

Thus 𝐴𝑇 is the Transpose of 𝐴

e. The Conjugate Transpose of a Matrix

The complex conjugate transpose of a matrix interchanges the row and column index for each
element, 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.

𝑖 1
A=( )
0 2 − 3𝑖

The Conjugate Transpose of the matrix 𝐴 is given by

−𝑖 0
𝐴† = (𝐴∗ )𝑇 = ( )
1 2 + 3𝑖

Thus 𝐴† is the Conjugate-Transpose of A

d. Hermitian

The matrix that is equal to its conjugate-transpose is called Hermitian. Thus If 𝐴† = 𝐴 then it
is called Hermitian or Self-Adjoint matrix

3 3+𝑖
A=( )
3−𝑖 2

The complex conjugate of A is given by

3 3−𝑖
𝐴∗ = ( )
3+𝑖 2

The transpose of 𝐴∗ is given by

3 3+𝑖
𝐴† = (𝐴∗ )𝑇 = ( )
3−𝑖 2

Hence 𝐴† = A
Made with Xodo PDF Reader and Editor

MODULE III

e. Unitary Matrix

A matrix is said to be Unitary if the condition 𝑈 †𝑈 = 𝐼 is satisfied. Thus, an operator is said


to be Unitary if each of its matrix representations are unitary. Consider an operator in matrix
form 𝑈.

1 1
√2 √2
𝑈=(𝑖 −𝑖 )
√2 √2

1 1
2 √2
𝑈 ∗ = (√−𝑖 𝑖 )
√2 √2

1 −𝑖
2 √2
𝑈 † = (𝑈 ∗ )𝑇 = (√1 𝑖 )
√2 √2

1 1 1 −𝑖 1 1 −𝑖 𝑖
√2 √2 √2 √2
+ + 1 0
𝑈† 𝑈 = (𝑖 −𝑖 ) ( 1 𝑖 )
= (2𝑖 2
𝑖
2
1
2
1 )
=( )=I
− + 0 1
√2 √2 √2 √2 2 2 2 2

Hence 𝑈 is unitary

Column and Row Matrices

The Column Vectors are called ket Vectors denoted by |𝜓⟩ and are represented by Column
Matrices. The Row Vectors are called Bra 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 †
[β ] = [α1∗ β1∗ ]
1

Thus the Bra is the complex conjugate of ket and viceversa. For example

1†
[ ] = [1 −𝑖 ]
i

Flipping between kets and bras is called "Taking the Dual".


Made with Xodo PDF Reader and Editor

MODULE III

Thus for |0⟩ state the corresponding ⟨0| is given by

1
|0⟩ = [ ]
0

⟨0| = [1 0]

and similarly for and |1⟩ states we have ⟨1| as follows.

0
|1⟩ = [ ]
1

⟨1| = [0 1]

Inner Product - Multiplication of Row and Column Matrices

Let us consider two states |𝜓⟩ and |𝜙⟩ as follows

α1
|𝜓⟩ = [β ]
1

α2
|𝜙⟩ = [β ]
2

⟨𝜓| = [α1∗ β1∗ ]

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

α2
⟨𝜓|𝜙⟩ = [α1∗ β1∗ ] [β ]
2

⟨𝜓|𝜙⟩ = α1∗ α2 + β1∗ β2

The inner product always results in a scalar product.

Probability

Let us consider a Quantum State

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

The above equation represents the Quantum Superposition of states |0⟩ and |1⟩

1 0 α
|𝜓⟩ = 𝛼 [ ] + 𝛽[ ] = [β]
0 1

The inner product ⟨𝜓|𝜓⟩ is given by

α
⟨𝜓|𝜓⟩ = [α∗ β∗ ] [β] = αα∗ + ββ∗
Made with Xodo PDF Reader and Editor

MODULE III

Thus,

αα∗ + ββ∗ = | α |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.

Orthogonality

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

Mathematically

⟨𝜙|𝜓⟩ = 0

The two states are orthogonal means they are mutually exclusive. Like Spin Up and Spin
Down of an electron.

Consider ⟨0|1⟩

0
⟨0|1⟩ = [1 0] [ ] = (0 + 0) = (0)
1

Consider ⟨1|0⟩

1
⟨1|0⟩ = [0 1] [ ] = (0 + 0) = (0)
0

Thus the states |1⟩ and |0⟩ are Orthogonal

Orthonormality

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

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

i.e < 𝜓 | 𝜓 > = < 𝜙 | 𝜙 > = 1

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

i.e ⟨𝜙|𝜓⟩ = 0
Made with Xodo PDF Reader and Editor

MODULE III

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.

Single Qubit Gates

a. Quantum Not Gate

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 is given by

0 1
𝑋=( )
1 0

0 1 1 0
X|0⟩ = ( ) ( ) = ( ) = |1⟩
1 0 0 1
0 1 0 1
X|1⟩ = ( ) ( ) = ( ) = |0⟩
1 0 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 α

Thus the quantum state becomes 𝛼 |1⟩ + 𝛽 |0⟩. Similarly, The input 𝛼 |1⟩ + 𝛽 |0⟩ to the
quantum not gates changes the state to 𝛼 |0⟩ + 𝛽 |1⟩. The quantum not gate circuit and the
truth table are as shown below.

Truth table of Quantum NOT Gate

Input Output
|0> |1>
|1> |0>
α|0> + β|1> β|0> + α|1>

Symbol:

α|0> + β|1> X β|0> + α|1>


Made with Xodo PDF Reader and Editor

MODULE III

b. Pauli-X,Y and Z Gates

• X Gate

The Pauli-X Gate is nothing but Quantum Not Gate

• Y Gate

Y Gate is represented by Pauli matrix 𝜎𝑦 or 𝑌. This gate Maps |0⟩ state to 𝑖 |1⟩ state and |1⟩
state to −𝑖 |0⟩ state. The Y Gate and its operation is as given below

0 −𝑖
Y=( )
𝑖 0

0 −𝑖 1 0
𝑌 |0⟩ = ( ) ( ) = ( ) = 0|0⟩ + 𝑖 |1⟩ = 𝑖 |1⟩
𝑖 0 0 𝑖

0 −𝑖 0 −𝑖
𝑌 |1⟩ = ( ) ( ) = ( ) = - 𝑖 |0⟩ + 0|1⟩ = - 𝑖 |0⟩
𝑖 0 1 0

Thus the Y-Gate defines the transformation

α
𝑌 (𝛼 |0⟩ + 𝛽 |1⟩) = 𝑌 (β) = −𝑖𝛽 |0⟩ +𝑖𝛼 |1⟩

Quantum Y-Gate is represented by

𝛼 |0⟩ + 𝛽 |1⟩) Y −𝑖𝛽 |0⟩ +𝑖𝛼 |1⟩

Truth table of Y-gate

Input Output
|0> i|1>
|1> -i|0>
α|0> + β|1> -iβ|0> +iα |1>

• Z-Gate

The Z-gate is represented by Pauli Matrix 𝜎𝑍 or 𝑍. Z-Gate maps input state |𝑘⟩ to (−1) k |𝑘⟩.

1. For input |0⟩ the output remains unchanged.

2. For input |1⟩ the output is − |1⟩.

The Matrix representation and the operation of Z-Gate on |0⟩ and |1⟩ are as follows

1 0 1 1
Z |0⟩ = ( ) ( ) = ( ) = |0⟩
0 −1 0 0
Made with Xodo PDF Reader and Editor

MODULE III

1 0 0 0
Z |1⟩ = ( ) ( ) = ( ) = -|1⟩
0 −1 1 −1
α
𝑍(𝛼 |0⟩ + 𝛽 |1⟩) = Z (β) = 𝛼 |0⟩ − 𝛽 |1⟩

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

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

Truth Table of Z-gate is

|0> |0>
|1> -|1>
α|0> + β|1> α|0> - β|1>

c. Hadamard Gate

The Hadamard Gate is a truly quantum gate and is one of the most important in Quantum
Computing. It is a self-inverse gate. It is used to create the superpositions of |0⟩ and |1⟩ states.
The Matrix representation of Hadamard Gate is as follows

1 1 1
H= [ ]
√2 1 −1

The Hadamard Gate and the output states for the |0⟩ and |1⟩ input states are represented as
follows. The Hadamard Gate satisfies Unitary Condition.

𝐻†𝐻 = 1

The truth-table for the Hadamard Gate is as follows


Made with Xodo PDF Reader and Editor

MODULE III

Input Action of Hadamard gate Output

|0⟩ 1 1 1 1 1 1 |0⟩ + |1⟩)


[ ][ ] = [ ]
√2 1 −1 0 √2 1
√𝟐

|1⟩ 1 1 1 0 1 1 |0⟩ − |1⟩)


[ ][ ] = [ ]
√2 1 −1 1 √2 −1
√𝟐

α|0⟩ + β|1⟩ 1 1 1 𝛼 1 𝛼+ 𝛽 𝛂
|0⟩+ |1⟩)

|0⟩− |1⟩)
[ ] [𝛽 ] = [ ] √𝟐 √𝟐
√2 1 −1 √2 𝛼 − 𝛽

d. Phase Gate or S Gate

The S-gate is an Rϕ gate with ϕ = π/2 or in other terms, it rotates the vector π/2 radians around
the z-axis. Unlike other gates, the S-gate is not its own inverse. Although it is still [Link]
phase gate turns a |0⟩ into |0⟩ and a |1⟩ into 𝑖 |1⟩

𝑆 †𝑆 = 𝐼 and hence it is Unitary.

The Matrix representation of the S gate is given by

1 0 1 0
S=[ ]=[ 𝑖𝜋 ]
0 𝑖 0 𝑒2

The effect of S gate on input |0⟩ is given by

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

Similarly the effect of S gate on input |1⟩ is given by

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

The transformation of state |𝜓⟩ is given by

𝛼
𝑆 (𝛼 |0⟩ + 𝛽 |1⟩) = S [𝛽 ] = 𝛼 |0⟩ + 𝑖𝛽 |1⟩

The S Gate and the Truth table are given by For S gate

𝛼 |0⟩ + 𝛽 |1⟩ S 𝛼 |0⟩ +i 𝛽 |1⟩


Made with Xodo PDF Reader and Editor

MODULE III

Truth Table of S Gate

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

𝛑
e. T Gate or Gate
𝟖

The T-gate is again a specific case of Rϕ gate with ϕ = π/4. It follows the same behaviour as
that of the S-gate.

The T Gate is represented by the matrix as follows

1 0 1 0
T=[ 𝑖𝜋 ] = [0 1+𝑖]
0 𝑒 4 √2

𝛑
It is also called 𝟖 gate as it could be represented in the following form

−𝐢𝛑
𝐢𝛑
exp 0
𝟖
𝑇 = exp [ 𝐢𝛑 ]
𝟖
0 exp 𝟖

Another Important Feature of T gate is it could be related to S gate as

𝑇2 = 𝑆

The Operation of T gate on |0⟩ and |1⟩ are given by

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

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

The transformation of state |𝜓⟩ is given by

𝛼 𝑖𝜋
T (𝛼 |0⟩ + 𝛽 |1⟩) = T [𝛽 ] = 𝛼 |0⟩ + 𝑒 4 𝛽 |1⟩

The T Gate and the Truth Table are as follows


𝑖𝜋
𝛼 |0⟩ + 𝛽 |1⟩ T 𝛼 |0⟩ +𝑒 4 𝛽 |1⟩
Made with Xodo PDF Reader and Editor

MODULE III

Truth Table of T Gate

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

Multiple Qubit Gates

Multiple Qubit Gates operate on Two or More input Qubits. Usually on 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.

a. Controlled Not Gate or CNOT Gate

The CNOT gate is a typical multi-qubit logic gate. The CNOT gate operates on a quantum
register that consists of 2 qubits. The CNOT gate flips the second qubit (the target qubit) if
and only if the first qubit (the control qubit) is |1> and the circuit is as follows.

Control Qubit
Target qubit

The Matrix representation of CNOT Gate is given by

1 0 0 0
𝑈𝐶𝑁 = [0 1 0 0]
0 0 0 1
0 0 1 0

The Transformation could be expressed as

|𝐴, 𝐵⟩ → |𝐴, 𝐵 ⊕ 𝐴⟩

Consider the operations of CNOT gate on the four inputs |00⟩,|01⟩,|10⟩ and |11⟩.
Made with Xodo PDF Reader and Editor

MODULE III

Operation of CNOT Gate for input |00⟩

𝑈𝐶𝑁 |00⟩ = |00⟩

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

Here in the inputs to the CNOT Gate the control qubit is |0⟩. Hence no change in the state of
Target qubit |0⟩

|00⟩ → |00⟩

Operation of CNOT Gate for input |01⟩

𝑈𝐶𝑁 |01⟩ = |01⟩

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

Here in the inputs to the CNOT Gate the control qubit is |0⟩. Hence no change in the state of
Target qubit |1⟩

|01⟩ → |01⟩

Operation of CNOT Gate for input |10⟩

𝑈𝐶𝑁 |10⟩ = |11⟩

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

Here in the inputs to the CNOT Gate the control qubit is |1⟩. Hence the state of Target qubit
flips from |0⟩ to |1⟩.

|10⟩ → |11⟩

Operation of CNOT Gate for input |11⟩

𝑈𝐶𝑁 |11⟩ = |10⟩


Made with Xodo PDF Reader and Editor

MODULE III

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

Here in the inputs to the CNOT Gate the control qubit is |1⟩. Hence the state of Target qubit
flips from |1⟩ to |0⟩.

|11⟩ → |10⟩

The Truth Table of operation of CNOT gate is as follows

Input Output
|00> |00>
|01> |01>
|10> |11>
|11> |10>

b. 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 the Swap Gate
is as follows

1 0 0 0
𝑈𝑆𝑊𝐴𝑃 = [0 0 1 0]
0 1 0 0
0 0 0 1

Operation of SWAP Gate for input |00⟩

𝑈𝑆𝑊𝐴𝑃 |00⟩ = |00⟩

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

|00⟩ → |00⟩

Operation of SWAP Gate for input |01⟩

𝑈𝑆𝑊𝐴𝑃 |01⟩ = |10⟩

1 0 0 0 0 0
[0 0 1 0] [1] = [0]
0 1 0 0 0 1
0 0 0 1 0 0
Made with Xodo PDF Reader and Editor

MODULE III

|01⟩ → |10⟩

Operation of SWAP Gate for input |10⟩

𝑈𝑆𝑊𝐴𝑃 |10⟩ = |01⟩

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

|10⟩ → |01⟩

Operation of SWAP Gate for input |11⟩

𝑈𝑆𝑊𝐴𝑃 |11⟩ = |11⟩

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

|11⟩ → |11⟩

The schematic symbol of swap gate circuit is as follows

equivalent circuit symbol

The swap gate is a combined circuit of 3 CNOT gates and the over all effect is that two input
qubits are swapped at the output. The Action and truth table of the swap gate is as follows.
Made with Xodo PDF Reader and Editor

MODULE III

Gate Input Output


1 |𝐴, 𝐵⟩ |𝐴, A ⊕ B⟩
2 |𝐴, A ⊕ B⟩ |B, A ⊕ B⟩
3 |B, A ⊕ B⟩ |B, A⟩

The Truth table of SWAP Gate

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

c. Controlled Z Gate

In Controlled Z Gate, The operation of Z Gate is controlled by a Control Qubit. If the control
Qubit is |𝐴⟩ = |1⟩ then only the Z gate transforms the Target Qubit |𝐵⟩ as per the Pauli-Z
operation. The action of Controlled Z-Gate could is specified by a matrix as follows.

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

Operation of C-Z Gate for input |00⟩

𝑈𝑍 |00⟩ = |00⟩

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

|00⟩ → |00⟩

Operation of C-Z Gate for input |01⟩

𝑈𝑍 |01⟩ = |01⟩

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

|01⟩ → |01⟩
Made with Xodo PDF Reader and Editor

MODULE III

Operation of C-Z Gate for input |10⟩

𝑈𝑍 |10⟩ = |10⟩

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

|10⟩ → |10⟩

Operation of C-Z Gate for input |11⟩

𝑈𝑆𝑊𝐴𝑃 |11⟩ = -|11⟩

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

|11⟩ → -|11⟩

The controlled Z gate and the truth table are as follows

Input Output
|00> |00>
|01> |01>
|10> |10>
|11> -|11>
Made with Xodo PDF Reader and Editor

MODULE III

d. Toffoli Gate

The Toffoli Gate is also known as CCNOT Gate (Controlled-Controlled-Not). It has three
inputs out of which two are Control Qubits and one is the Target Qubit. The Target Qubit
flips only when both the Control Qubits are |1⟩. The two Control Qubits are not altered during
the operation. The matrix representation, Gate Circuit and the Truth Table of Toffoli Gate are
as follows.

1 0 0 0 0 0 0 0
0 1 0 0 0 0 0 0
UT = 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

Truth Table of Toffoli gate

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

Representation of Toffoli gate

The Toffolli matrix is unitary. The Toffolli Gate is its own inverse. It could be used for
NAND Gate Simulation.
Made with Xodo PDF Reader and Editor

Chapter 1

Module-3:Quantum Computing

1.1 Linear Operators and Matix Operations

1. A Linar Operator ’𝑋’ operates such that 𝑋 |0⟩ = |1⟩ and 𝑋 |1⟩ = |0⟩. Find the matrix
representation of" ’𝑋’. # ! !
𝑥 11 𝑥12 1 0
Solution : 𝑋 = , |0⟩ = , |1⟩ =
𝑥 21 𝑥22 0 1
Given" 𝑋 |0⟩ = #|1⟩ ! !
𝑥 11 𝑥 12 1 0
𝑋= =
𝑥 21 𝑥 22 0 1
Multiplying the Matrices on LHS and equating with the Matrix on the RHS we get
𝑥 11 = 0 & 𝑥 21 = 1
Given" 𝑋 |1⟩ = #|0⟩ ! !
𝑥 11 𝑥 12 1 0
𝑋= =
𝑥 21 𝑥 22 0 1
Multiplying the Matrices on LHS and equating with the Matrix on the RHS we get
𝑥 12 = 1 & 𝑥 22 =" 0 #
0 1
Therefore 𝑋 =
1 0
" #
0 −𝑖
2. Given 𝐴 = , Prove that 𝐴† = 𝐴.
𝑖 0
" #
0 −𝑖
Soution : Given 𝐴 =
𝑖 0
We Know That 𝐴† = ( 𝐴∗ )𝑇 " #
0 𝑖
The Conjugate of Matrix A is Given by 𝐴∗ =
−𝑖 0
" #
0 −𝑖
Thus ( 𝐴∗ )𝑇 = =𝐴
𝑖 0

3
Made with Xodo PDF Reader and Editor

APPLIED PPHYSICS CSE STREAM

 √1 1 
 (2) √ (2) 
3. Show that the Matrix 𝑈 =  𝑖 −𝑖 
 is Unitary.
 √ (2) √ (2) 
 
Solution : A Matrix is Unitary if 𝑈 †𝑈 = 𝐼
 √1 −𝑖 

 (2) √ (2) 
Therefore 𝑈 =  1 
 √ (2) √ (2) 
𝑖 
 
=⇒
 √1 √−𝑖   √1 √1 
" #
 (2) (2) (2) (2) 1 0
𝑈 †𝑈 =  1 
−𝑖 
= =𝐼

 (2) √ 𝑖   √𝑖 √ 0 1
(2)   (2) (2) 
  

Here I is identity Matrix.

4. Find the inner product of states |1⟩ 𝑎𝑛𝑑 |0⟩ and draw conclusions on the result.
Solution : The inner product is given by ⟨𝜓|𝜙⟩ here ⟨𝜓| is conjugate-transpose of |𝜓⟩ .
We know! that !
1 0
|0⟩ = , |1⟩ =
0 1
 
⟨1| = 0 1
!
  1
Therefore ⟨1|0⟩ = 0 1 =0
0
Thus the states |1⟩ and |0⟩ are Orthogonal.
! !
𝛼1 𝛽1
5. Given |𝜓⟩ = and |𝜙⟩ = Prove that ⟨𝜓|𝜙⟩ = ⟨𝜙|𝜓⟩ ∗
𝛼2 𝛽2
!
  𝛼
1
Solution : ⟨𝜙|𝜓⟩ = 𝛽1∗ 𝛽2∗ = 𝛽1∗ 𝛼1 + 𝛽2∗ 𝛼2 ..........(1)
𝛼2
!
  𝛽
1
⟨𝜓|𝜙⟩ = 𝛼1∗ 𝛼2∗ = 𝛽1 𝛼1∗ + 𝛽2 𝛼2∗
𝛽2

⟨𝜓|𝜙⟩ = (𝛽1 𝛼1 + 𝛽2 𝛼2∗ ) ∗ = 𝛽1∗ 𝛼1 + 𝛽2∗ 𝛼2 ..........(2)

Thus from (1) and (2)


⟨𝜓|𝜙⟩ = ⟨𝜙|𝜓⟩ ∗

1.2 Quantum Gates

1. Using Matrix multiplication show that on applying Hadamard gate twice to a |0⟩ results in
its original state.
Solution : To show that 𝐻𝐻 |0⟩ = |0⟩
" # " # " #
1 1 1 1 2 0
𝐻𝐻 = √1 √1 = 1
2 2 2
1 −1 1 −1 0 2

NUMERICAL PROBLEMS & SOLUTIONS 4 ATME COLLEGE OF ENGINEERING


Made with Xodo PDF Reader and Editor

APPLIED PPHYSICS CSE STREAM

" #
1 0
=⇒ =𝐼
0 1

Since 𝐼 |0⟩ = |0⟩


Thus applying two Hadamard gates result in the original state of |0⟩.

2. Using two X-gates in series show that two not gates in serries are equivalent to a quantum
wire.
Solution : To show that 𝑋 𝑋 |0⟩ = |0⟩
" #" # " #
0 1 0 1 1 0
= =𝐼
1 0 1 0 0 1

Since 𝐼 |0⟩ = |0⟩


Hence two Not gates in series result in Quantum Wire.

3. Show the Hadamard Gate is Unitary.

Solution : To Show that 𝐻 † 𝐻 = 𝐼


" #
1 1
We Know That 𝐻 = √1
2 1 −1
" #
1 1
𝐻 † = (𝐻 ∗ )𝑇 = √1 =𝐻
2
1 −1
Thus using the solution in problem number 1
𝐻 † 𝐻 = 𝐻𝐻 = 𝐼
Thus the Hadamard Gate is Unitary.

4. Two Qbits are passed through CNOT [Link] the first qubit is the control qubit then what is
the output for the following initial states 1. |00⟩, 2. |01⟩, and 3.|11⟩.
Solution : The Operation of the CNOT gate could be represented as
|𝑥, 𝑦⟩ → |𝑥, 𝑥 ⊕ 𝑦⟩
⊕ is analogous to Classical XOR gate. XOR gate out put is high when both the inputs are
dissimilar.
|00⟩ → |0, 0 ⊕ 0⟩ = |00⟩
|01⟩ → |0, 0 ⊕ 1⟩ = |01⟩
|11⟩ → |1, 1 ⊕ 1⟩ = |10⟩

5. Show that S gate can be formed by connecting two T gates in Series.

𝜋
Solution : The T gate is is also called 8 gate and is given by

NUMERICAL PROBLEMS & SOLUTIONS 5 ATME COLLEGE OF ENGINEERING


Made with Xodo PDF Reader and Editor

APPLIED PPHYSICS CSE STREAM

" # 
1 0 

1 0
𝑇= = √
 (1+𝑖) 
𝑖𝜋
0 𝑒4 0
 (2) 
 
To Prove that 𝑇 2 = 𝑆

 " #
1 0  1 0 
 
 1 0
𝑇 2 = 𝑇𝑇 =  √ (1+𝑖)   (1+𝑖)  =
√ =𝑆
0 0 0 𝑖
 (2)   (2) 
      2 
∵ 1+𝑖
√ 1+𝑖
√ = (1+𝑖)
2 =𝑖
2 2

NUMERICAL PROBLEMS & SOLUTIONS 6 ATME COLLEGE OF ENGINEERING

Common questions

Powered by AI

Quantum gates are fundamental components in quantum circuits, analogous to classical logic gates but with abilities that harness quantum mechanical phenomena. Unlike classical gates that operate with deterministic outcomes, quantum gates manipulate qubit states through unitary transformations, allowing superposition and entanglement. They enable the construction of complex quantum algorithms, such as the quantum NOT (X), Hadamard, and CNOT gates, providing computational means unachievable by classical gates, exemplified by operations like quantum parallelism and non-deterministic problem solving. This ability underpins the potential for solving certain problems exponentially faster than classical gates .

The CNOT gate is a two-qubit gate where one qubit serves as the control and the other as the target. The CNOT gate flips the state of the target qubit if and only if the control qubit is in the state |1⟩. The gate plays a crucial role in generating entanglement, a vital resource for quantum computation and quantum error correction. Its ability to manipulate qubits conditionally allows for complex operations, which are fundamental in quantum algorithms and simulations that exploit quantum parallelism .

Classical computing processes information using bits that exist in one of two definite states (0 or 1), operating deterministically through logic and Boolean Algebra. In contrast, quantum computing utilizes qubits, which can exist in a superposition of states (both 0 and 1 simultaneously), leading to probabilistic calculations with multiple potential outcomes from the same inputs. Quantum computers employ quantum logic and linear algebra, specifically within Hilbert Space, allowing for parallel data processing and potentially exponentially higher power with increasing qubit numbers .

Moore's Law predicts the doubling of transistors in a dense integrated circuit approximately every two years, leading to increased computational power. However, as the size of transistors approaches atomic scales, quantum effects interfere with electron flow control, marking a limit to this trend. This limitation indicates a saturation in the improvement of classical computers, promoting interest in quantum computing as a means to continue advancement in computational power beyond what Moore's Law can achieve with classical methods .

Qubits, unlike classical bits, can exist in a superposition of states, allowing them to represent both 0 and 1 simultaneously. This property enables quantum computers to perform many calculations at once. Furthermore, entanglement allows qubits to be correlated such that the state of one qubit can instantaneously affect another, no matter the distance between them. Additionally, the no-cloning theorem, which prevents exact state replication of an unknown qubit, ensures security advantages in quantum information. These properties enable quantum computers to solve problems with complex interdependencies more efficiently, taking advantage of parallelism and non-determinism .

The no cloning theorem asserts that it is impossible to create an identical copy of an arbitrary unknown quantum state. In quantum computing, this foundational principle results in significant impacts: it preserves the integrity and security of quantum information, as it prevents unauthorized duplication of qubit states. This property is essential in quantum cryptography, providing a higher degree of security than classical systems since any attempt to measure a qubit's state for copying will alter it. Therefore, this theorem ensures robust protection against eavesdropping and is instrumental in developing secure quantum communication protocols .

Pauli matrices form a set of complex matrices serving as essential operators in quantum mechanics, crucial in qubit manipulation. Each matrix (X, Y, Z) corresponds to quantum operations akin to classical NOT operations, enabling rotations and flips of qubit states on the Bloch sphere. For instance, the Pauli-X acts as a quantum NOT gate flipping |0⟩ to |1⟩ and vice versa, and the Pauli-Z flips the phase of superposed qubit states. These matrices underpin many quantum algorithms as they implement basic building blocks in quantum circuits, facilitating operations such as superposition enhancement, entanglement, and quantum state transformation .

Quantum superposition challenges classical computation by allowing a qubit to exist in multiple states simultaneously, contrasting with the binary state nature (0 or 1) of classical bits. This capability enables quantum computers to process exponentially more information than classical ones for certain problems, leveraging parallelism inherent in superposition. Superposition allows execution of multiple parallel computations, transforming tasks like database searches and factorization, which are inefficient classically, into solvable problems with significant speedups, thus redefining efficiency metrics within computational theory .

The Bloch sphere is a geometrical representation of a qubit's state, where any pure state of a qubit (a two-level quantum mechanical system) can be visualized as a point on the surface of this imaginary sphere with a unit radius. The north and south poles correspond to the basis states |0⟩ and |1⟩ respectively, while other points represent superpositions of these states. A qubit's state can be expressed as α|0⟩ + β|1⟩, where |α|² + |β|² = 1, and the Bloch sphere offers a visualization of these complex coefficients as a single point in a 3D space .

The Toffoli gate, also known as the controlled-controlled-NOT (CCNOT) gate, is a universal reversible logic gate significant in fault-tolerant quantum computing. It uses three qubits, with the operation performed on the third qubit being controlled by the first two. The gate flips the state of the third qubit only if the first two qubits are in the state |1⟩. This feature makes it integral in constructing complex quantum circuits from simple primitives and implementing error correction codes and algorithms. The Toffoli gate demonstrates conditional logic capabilities needed for universal quantum computation .

You might also like