ACHARYA INSTITUTE OF TECHNOLOGY
DEPARTMENT OF PHYSICS
Physics for CSE stream Subject Code: 22PHYS12/22
Total Marks: 100
CIE Marks: 50 (30 Marks Theory IA+ 20 Marks Practical’s)
SEE Marks: 50
Hours/ Week: 03(L)+02(T)+02(P)=7 Exam Hours: 03
Total Hours: 40 Credit for the Course: 04
Module-3
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.
8 Hours
ACHARYA INSTITUTE OF TECHNOLOGY
DEPARTMENT OF PHYSICS
Physics for CSE stream Subject Code: 22PHYS12/22
Quantum Computation
Introduction to Quantum Computation and Quantum Information
Computers are getting smaller and faster day by day because electronic components are
getting smaller and smaller. But this process is about to meet its physical limit.
Electricity is the flow of electrons. Since the size of transistors is shrinking to the size of a
few atoms, transistors cannot be used as switches because electrons may transfer
themselves to the other side of blocked passage by the process called quantum tunnelling.
Quantum mechanics is a branch of physics that explores the physical world at a most
fundamental level. At this level, particles behave differently from the classical world taking
more than one state at the same time and interacting with other particles that are very far
away. Phenomena like superposition and entanglement take place.
▪ “I think I can safely say that nobody understands quantum
mechanics” - Feynman
▪ 1982 - Feynman proposed the idea of creating machines
based on the laws of quantum mechanics instead of the laws
of classical physics.
▪ 1985 - David Deutsch developed the quantum tunneling
machine, showing that quantum circuits are universal.
▪ 1994 - Peter Shor came up with a quantum algorithm to factor very large numbers in
polynomial time.
▪ 1997 - Lov Grover develops a quantum search algorithm with O(√N) complexity
Moore’s Law
Moore’s Law states that since the
number of transistors on a silicon chip
roughly doubles every two years, the
performance and capabilities of
computers will continue to increase
while the price of computers decreases.
It is a prediction made by American
engineer Gordon Moore in 1965
ACHARYA INSTITUTE OF TECHNOLOGY
DEPARTMENT OF PHYSICS
Physics for CSE stream Subject Code: 22PHYS12/22
End of Moore’s law:
Moore’s law is said to be breaking down, according to theoretical physicist Michio Kaku.
Kaku says that when Moore's law finally collapse by the end of the next decade, we will
simply tweak it a bit with chip-like computers in three dimensions. He then says "we may
have to go to molecular computers and perhaps late in the 21st century quantum computers".
Miniaturisation:
• When components come closer the results will no longer reliable.
• Heat produced by one component will affects the neighbouring components.
What is a quantum computer?
A quantum computer is a machine that performs calculations based on the laws of quantum
mechanics, which is the behavior of particles at the sub-atomic level.
What can quantum computers do?
1. Quantum computers can easily crack the encryption algorithms used today in very little
time whereas it takes billions of years to best supercomputer available today. Even
though quantum computers would be able to crack many of today’s encryption
techniques, predictions are that they would create hack-proof replacements.
2. Quantum computers are great for solving optimization problems.
Conventional Computing vs Quantum Computing
We’ve been using computers since early 19th century. We’re currently in the fourth
generation of computers with the microprocessors after vacuum tubes, transistors and
integrated circuits.
They were all based on conventional computing which is based on the classical
phenomenon of electrical circuits being in a single state at a given time, either on or off.
The fifth generation of computers is currently under development of which quantum
computing or quantum computers being most popular. Quantum computers are totally
different from conventional computers on how they work. Quantum computers are based on
the phenomenon of Quantum Mechanics, the phenomenon where it is possible to be in
more than one state at a time.
ACHARYA INSTITUTE OF TECHNOLOGY
DEPARTMENT OF PHYSICS
Physics for CSE stream Subject Code: 22PHYS12/22
Difference between conventional computing and quantum computing:
Conventional Computing Quantum Computing
Classical computing is based on the classical Quantum computing is based on the phenomenon
phenomenon of electrical circuits being in a of Quantum Mechanics, such as superposition and
single state at a given time, either on or off. entanglement, the phenomenon where it is
possible to be in more than one state at a time.
Classical structure of results is deterministic Quantum computing results are Probabilistic.
Classical algebraic structure of physical events The quantum event mathematical structure is
are Boolean algebra abstract operators in Hilbert space.
Information storage and manipulation is based Information storage and manipulation is based on
on “bit”, which is based on voltage or charge; Quantum Bit or “qubit”, which is based on the
low is 0 and high is 1. spin of electron or polarization of a single photon.
CMOS transistors are the basic building blocks Superconducting Quantum Interference Device or
of conventional computers. SQUID or Quantum Transistors are the basic
building blocks of quantum computers.
Classical information can be manipulated Classical information cannot be manipulated
Advantages of Quantum computing:
1. The main advantage of quantum computing is that it is even classical algorithm
calculations. They are also performed easily which is similar to the classical computer.
2. If we adding the qubits to the register we increase its storage capacity exponentially.
3. In this computing qubit is the conventional superposition state. So there are advantages
of exponential speedup to the resulted by handle the number of calculations and
method.
4. Quantum computing required less power.
5. The other advantage of quantum computing is it can execute any task very faster and
very accurately compared to a classical computer. Generally, the atom changes very
faster in the case of traditional computing whereas in quantum computing it changes
even faster.
Disadvantages of Quantum computing:
1. The research for this problem is still continuing the effort applied to identify a solution
for this problem that has no positive progress.
2. Qubits are not digital bits of the day thus they cannot use as conventional error
correction.
ACHARYA INSTITUTE OF TECHNOLOGY
DEPARTMENT OF PHYSICS
Physics for CSE stream Subject Code: 22PHYS12/22
3. The main disadvantage of Quantum computing is the technology required to
implement a quantum computer is not available at present days.
4. The minimum energy requirement for quantum logical operations is five times that of
classical computers.
5. Quantum CPU will have efficiency and heating problems of its own.
6. When a measurement of any type is made to a quantum system, decoherence is totally
broken down and the wave function collapses into a single state.
Applications of Quantum Computing
➢ Artificial intelligence.
➢ Better batteries.
➢ Cleaner fertilization.
➢ Cybersecurity.
➢ Drug development.
➢ Electronic materials discovery.
➢ Financial modelling.
➢ Solar capture.
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—
the quantum version of the classical binary bit physically realized with a two-state device.
A qubit is a two-state quantum-mechanical system, one of the simplest quantum systems
displaying the peculiarity of quantum mechanics.
Properties of Qubit:
1. Superposition – It is the ability of the quantum system to be in multiple states at
the same time.
One of these properties is superposition, which states that instead of holding one
binary value (“0” or “1”) like a classical bit, a qubit can hold a combination of “0”
and “1” simultaneously. In the quantum world, qubits don’t have to be in one of those
states. It can be in any proportion of those states. This is called superposition
2. Quantum decoherence
ACHARYA INSTITUTE OF TECHNOLOGY
DEPARTMENT OF PHYSICS
Physics for CSE stream Subject Code: 22PHYS12/22
Quantum decoherence is the aspect of quantum physics that hinders the progress of
quantum computing. When we try to observe or measure quantum particles, it can
collapse the superposition state. This is called decoherence.
3. Entanglement
Entanglement is an extremely strong correlation that exists between quantum particles
even if separated by great distances. Two qubits are entangled through the action of the
laser. Once they have entangled, they are in an indeterminate state. When one of the
qubits is manipulated, the manipulation happens instantly to its entangled twin as well.
4. Interference
Quantum Interreference is a by-product of superposition, is that it allows to bias the
measurement of a qubit towards a desired state or set of states.
5. Tunnelling
It is a phenomenon of Quantum particle that can travel to the opposite side of the barrier
which is impossible. Example: (Semiconductors, Super conducting Quantum
Interference device (SQUID))
Difference between Bits & Qubits
The device computes by The device computes by manipulating those bits
manipulating those bits with the with the help of quantum logic gates.
help of logical gates (AND, OR,
NOT).
A classical computer has a memory A qubit (quantum bits) can hold a one, a zero or
made up of bits where each bit hold crucially a superposition of these.
either a one or zero.
Bits are used in classical computers. Qubits (Quantum bits) are use in quantum
computer
Information is stored in bits, which Information is stored in quantum bits, or qubits. A
take the discrete values 0 and 1. qubit can be in states labelled |0} and |1}, but it
can also be in a superposition of these states, a|0}
+ b|1}, where a and b are complex numbers. If we
think of the state of a qubit as a vector, then
superposition of states is just vector addition.
For example, if storing one number For example, for every extra qubit you get, you
takes 64 bits, then storing N can store twice as many numbers. For example,
numbers takes N times 64 bits. with 3 qubits, you get coefficients for |000},
|001}, |010}, |011}, |100}, |101}, |110} and |111}.
ACHARYA INSTITUTE OF TECHNOLOGY
DEPARTMENT OF PHYSICS
Physics for CSE stream Subject Code: 22PHYS12/22
Bits are slow. Qubits are faster.
Its circuit behaviour based on Its circuit behaviour based on quantum mechanics.
classical physics.
Bloch Sphere:
It is a way to geometrical representation of a Qubit states in 3-D spherical coordinates [R=1,
θ & ϕ].
As state of a Q-bit is represented by a vector |𝛹⟩ =∝ |0⟩ + 𝛽|1⟩
𝜃
|𝛹 = 𝑐𝑜𝑠 |0⟩ + 𝑒 𝑖ϕ
𝑠𝑖𝑛 𝜃 |1⟩
2 2
⟩
𝜃 𝜃
|𝛹⟩ = 𝑐𝑜𝑠 |0⟩ + [𝑐𝑜𝑠ϕ + isin ϕ]𝑠𝑖𝑛 |1⟩ ------------------ (a)
2 2
7
ACHARYA INSTITUTE OF TECHNOLOGY
DEPARTMENT OF PHYSICS
Physics for CSE stream Subject Code: 22PHYS12/22
State of a Q-bits
+𝒛 −𝒛 +𝒙 −𝒙 +𝒚 −𝒚
θ 0 π 𝝅⁄ 𝝅⁄ 𝝅⁄ 𝝅⁄
𝟐 𝟐 𝟐 𝟐
ϕ 0 0 0 𝝅 𝝅⁄ 𝟑𝝅⁄
𝟐 𝟐
|𝟎⟩ + |𝟏⟩ |𝟎⟩ − |𝟏⟩ |𝟎⟩ + 𝒊|𝟏⟩ |𝟎⟩ − 𝒊|𝟏⟩
|𝟏⟩ |𝟎⟩ |𝟏⟩
√𝟐 √𝟐 √𝟐 √𝟐
Single and Two qubits and Extension to N qubits
A Single Qubit has two computational basis states |0⟩ and |1⟩. the pictorial representation of
the single qubit is as follows. α |0⟩ + β |1⟩
A Two-qubit system has 4 computational basis states denoted as |00⟩, |01⟩, |10⟩, |11⟩. The
pictorial representation of two qubit is as follows.
8
ACHARYA INSTITUTE OF TECHNOLOGY
DEPARTMENT OF PHYSICS
Physics for CSE stream Subject Code: 22PHYS12/22
A multi-qubit system of N qubits has 2N computational basis states. For example, a state with
3 qubits has 23 computational basis states. Thus for N qubits the computational basis states
are donated as |00 · · · 00 ⟩, |00 · · · 01 ⟩, |00 · · · 10 ⟩, |00 · · · 11⟩ · · · |11 · · · 11 ⟩. The
block diagram of representation of N qubits is as follows.
ACHARYA INSTITUTE OF TECHNOLOGY
DEPARTMENT OF PHYSICS
Physics for CSE stream Subject Code: 22PHYS12/22
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 and is called a ket vector. The examples of ket vectors are
|𝜓⟩, |𝜙⟩ and |𝑢⟩ etc. All Ket vectors are represented by Column matrix and Bra Vectors in
Row matrix.
Matrix Representation of 0 and 1 States
The wave function could be expressed in ket notation as |𝜓⟩ (ket Vector), 𝜓 is the wave
function.
The matrix for of the states |0⟩ and |1⟩. Where
Identity Operator
The operator of type is called identity operator. When an identity operator acts
on a state vector it keeps the state intact. By analogy we study identity operators an identity
matrix. As per the principle of identity operation 𝐼 |0⟩ = |0⟩ and 𝐼 |1⟩ = |1⟩
Thus the operation of identity matrix(operator) on |0⟩ and |1⟩ leaves the states unchanged.
ACHARYA INSTITUTE OF TECHNOLOGY
DEPARTMENT OF PHYSICS
Physics for CSE stream Subject Code: 22PHYS12/22
Pauli Matrices
Pauli Matrices and Their operation on |0⟩ and |1⟩ States
There are four extremely useful matrices used to explain the quantum mechanical
phenomenon such as electron spin and polarization a photon in quantum mechanics called
Pauli Matrices.
The Pauli matrices of the following form
This is an identity matrix.
Pauli Matrices operating on |0⟩ and |1⟩ States
ACHARYA INSTITUTE OF TECHNOLOGY
DEPARTMENT OF PHYSICS
Physics for CSE stream Subject Code: 22PHYS12/22
Conjugate of a Matrix
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.
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.
The Transpose of the matrix 𝐴 is given by
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
The Transpose of the matrix 𝐴 is given by
ACHARYA INSTITUTE OF TECHNOLOGY
DEPARTMENT OF PHYSICS
Physics for CSE stream Subject Code: 22PHYS12/22
Thus 𝐴† is the Conjugate-Transpose of 𝐴.
Hermitian
The matrix that is equal to its conjugate-transpose is called Hermitian. Thus If 𝐴† = 𝐴 then it
is called Hermitian or Self-Adjoint matrix.
The conjugate of A is given by
The transpose of A∗ is given by
Hence 𝐴† = 𝐴
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 𝑈.
Hence U Is Unitary
ACHARYA INSTITUTE OF TECHNOLOGY
DEPARTMENT OF PHYSICS
Physics for CSE stream Subject Code: 22PHYS12/22
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.
Thus the Bra is the complex conjugate of ket and vice versa.
For example
Flipping between kets and bras is called "Taking the Dual". Thus for |0⟩ state the
corresponding ⟨0| is given by
and similarly for and |1⟩ states we have ⟨1| as follows
ACHARYA INSTITUTE OF TECHNOLOGY
DEPARTMENT OF PHYSICS
Physics for CSE stream Subject Code: 22PHYS12/22
Inner Product - Multiplication of Row and Column Matrices
Let us consider two states |𝜓⟩ and |𝜙⟩ as follows
The multiplication of the |𝜓⟩ and |𝜙⟩ is possible only by taking the inner product and is given
by ⟨𝜓|𝜙⟩
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⟩.
Using equation 5.31 the inner product ⟨𝜓|𝜓⟩ is given by
Thus the above equation represents Probability Density.
As per the principle of Normalization
ACHARYA INSTITUTE OF TECHNOLOGY
DEPARTMENT OF PHYSICS
Physics for CSE stream Subject Code: 22PHYS12/22
Thus it implies |𝜓⟩ is normalized
Orthogonality: Two states |𝜓⟩ and |𝜙⟩ are said to be orthogonal if their inner product
inner product of two vectors is Zero.
Mathematically
⟨𝜙|𝜓⟩ = 0
The two states are orthogonal means they are mutually exclusive. Like Spin Up and Spin
Down of an electron.
Orthonormality: The states |𝜓⟩ and |𝜙⟩ are said to be orthonormal if their inner product
of two vectors is One
⟨𝜙|𝜓⟩ = 1
ACHARYA INSTITUTE OF TECHNOLOGY
DEPARTMENT OF PHYSICS
Physics for CSE stream Subject Code: 22PHYS12/22
Quantum Gates
Introduction to 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.
Quantum gates are reversible --- classical gates are not.
That means that the input data is destroyed in the classical operations but is retained in the
quantum system
Classical gates (if they work) give an exact result --- quantum gates give superpositions of
states which are characterized by probabilities
That means (1) that you need “high-fidelity” readouts of the state that can distinguish which
state the system is in after an operation, and (2) even with perfect fidelity that you need to
work with ensembles and do enough measurements to get the final state
Single Qubit Gates:
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
A Quantum State is given by 𝛼 |0⟩ + 𝛽 |1⟩ and its matrix representation of Quantum Not
Gate on quantum state is given by
ACHARYA INSTITUTE OF TECHNOLOGY
DEPARTMENT OF PHYSICS
Physics for CSE stream Subject Code: 22PHYS12/22
Hence the operation of
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
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
Thus the Y-Gate defines the transformation
ACHARYA INSTITUTE OF TECHNOLOGY
DEPARTMENT OF PHYSICS
Physics for CSE stream Subject Code: 22PHYS12/22
Quantum Y Gate is represented by
Z-Gate
The Z-gate is represented by Pauli Matrix 𝜎𝑧 . Z Gate maps input state |𝑘⟩ to (−1)
𝑘 |𝑘⟩.
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
𝑍(𝛼 |0⟩ + 𝛽 |1⟩) = 𝛼𝑍 |0⟩ + 𝛽𝑍 |1⟩ = 𝛼 |0⟩ − 𝛽 |1⟩
The circuit symbol and the truth table of Z-Gate are as follows.
19
ACHARYA INSTITUTE OF TECHNOLOGY
DEPARTMENT OF PHYSICS
Physics for CSE stream Subject Code: 22PHYS12/22
Hadamard Gate
The Hadamard Gate is a truly quantum gate and is one of the most important in Quantum
Computing. It is has similar characteristics of √𝑁𝑂𝑇 Gate. 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
The Hadamard Gate and the output states for the |0⟩ and |1⟩ input states are represented as
follows. The Hadamard Gate satisfies Unitary Condition
The truth-table for the Hadamard Gate is as follows
Phase Gate or S Gate
ACHARYA INSTITUTE OF TECHNOLOGY
DEPARTMENT OF PHYSICS
Physics for CSE stream Subject Code: 22PHYS12/22
The phase gate turns a |0⟩ into |0⟩ and a |1⟩ into 𝑖 |1⟩ The Matrix representation of the S gate is
given by
The effect of S gate on input |0⟩ is given by
Similarly, the effect of S gate on input |1⟩ is given by The effect of S gate on input |0⟩ is
given by
The transformation of state |𝜓⟩ is given by
𝑆 |𝜓⟩ = 𝑆 (𝛼 |0⟩ + 𝛽 |1⟩) = 𝛼𝑆 |0⟩ + 𝛽𝑆 |1⟩ = 𝛼 |0⟩ + 𝑖𝛽 |1⟩
The S Gate and the Truth table are given by For S gate
𝑆†𝑆 = 𝐼 and hence it is Unitary.
ACHARYA INSTITUTE OF TECHNOLOGY
DEPARTMENT OF PHYSICS
Physics for CSE stream Subject Code: 22PHYS12/22
T Gate or 𝜋/8 Gate
The T Gate is represented by the matrix as follows
It is also called 𝜋/8 gate as it could be represented in the following form
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
The T Gate and the Truth Table are as follows
ACHARYA INSTITUTE OF TECHNOLOGY
DEPARTMENT OF PHYSICS
Physics for CSE stream Subject Code: 22PHYS12/22
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.
Controlled Not Gate or CNOT Gate
The CNOT gate is a typical multi-qubit logic gate and the circuit is as follows.
The Matrix representation of CNOT is given by
The Transformation could be expressed as
|𝐴, 𝐵⟩ → |𝐴, 𝐵 ⊕ 𝐴⟩
Consider the operations of CNOT gate on the four inputs |00⟩,|01⟩,|10⟩ and |11⟩.
Operation of CNOT Gate for input |00⟩
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⟩
Here in the inputs to the CNOT Gate the control qubit is |0⟩. Hence no change in the state of
Target qubit |1⟩
ACHARYA INSTITUTE OF TECHNOLOGY
DEPARTMENT OF PHYSICS
Physics for CSE stream Subject Code: 22PHYS12/22
|01⟩ → |01⟩
Operation of CNOT Gate for input |11⟩
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
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
The schematic symbol of swap gate circuit is as follows
which is equivalent to 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.
ACHARYA INSTITUTE OF TECHNOLOGY
DEPARTMENT OF PHYSICS
Physics for CSE stream Subject Code: 22PHYS12/22
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.
The controlled Z gate and the truth table are as follows.
ACHARYA INSTITUTE OF TECHNOLOGY
DEPARTMENT OF PHYSICS
Physics for CSE stream Subject Code: 22PHYS12/22
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.
The Toffoli matrix is unitary. The Toffoli Gate is its own inverse. It could be used for NAND
Gate Simulation.