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

Quantum Computing 2 (Repaired)

Engineering Physics Module 2 Notes

Uploaded by

pradeepsunkad9
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)
57 views22 pages

Quantum Computing 2 (Repaired)

Engineering Physics Module 2 Notes

Uploaded by

pradeepsunkad9
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

Dept.

of Physics, BIET, Davanagere

MODULE 3:
Quantum Computing & Quantum Gates
Introduction: Quantum Computing is the area of study focused on developing computing
methods based on the principle of quantum theory. Quantum computing is based on the
principle of quantum superposition. In Quantum computing, the information is encoded in
quantum system such as atoms, ions or quantum dots. One quantum rule in particular creates
enormous incentives to apply quantum mechanics to computing. The algorithms are also
written based on quantum principles in which, Shor‟s algorithm for factorization and
Grover‟s search algorithm are basic. (Grover is an Indian born Physicist working in Bell
Labs). The process of computation is incredibly fast but it has to be done by the help of
quantum computers which are yet to be realized in practice. It is expected that 140 digit log
number could be factored a billion (109) times faster than is possible with classical
computation. It is so powerful that a search engine can search every part of internet in half an
hour.

Differences between classical and quantum information


Quantum Information
Classical Information

 Classical information obeys laws of  Quantum information obeys las of quantum


classical physics mechanics.
 Information is deterministic.  Information is in probabilistic
 Information is represented by 0 & 1  The states of quantum information is
represented 𝟎 and 𝟏 or liner combination of
 Classical Information cannot be two 𝜓 = 𝛼 0 + 𝛽 1
manipulated  Information can be manipulated

Dr. Santhosh Kumar M V, Dept. of Physics, BIET, Davanagere. Page 1


Dept. of Physics, BIET, Davanagere

Differences between classical and quantum computing


Classical Computing Quantum Computing

 Classical information obeys laws of  Quantum information obeys law of quantum


classical physics mechanics.
 Information obtained by classical  Information obtained by quantum computing is
computing is deterministic. in probabilistic
 Classical computing uses 0 & 1 bit  quantum computing uses qubits for extract
for extract information information
 Stores either 0 & 1  it stores multiple values simultaneously
 The classical algorithms uses N  The quantum algorithms uses 𝑁 operators
operators  Operations are defined by linear algebra by
 Operations are governed by Boolean Hilbert Space.
algebra.
Moore’s Law and its end
In the year 1965, Gardon Moore observed increasing performance in the first few
generations of the integrated- circuit (IC) technology. Moore predicted that it would continue
to improve at an exponential rate with the performance per unit cost increasing by a factor or
two every 18 months are so. Statement: “The number of transistors on a microchip doubles
every year"
Reduce in the size of the transistor results in causing problems for current microelectronics,
which results in electron tunnelling.
∴ Quantum Computation is the option for the further computational studies.

As we continue to minimize the dimension of semiconducting chip and increase number of


transistor in a chip we may enter to the critical dimensional state further macroscopically
reduce the size of the chip cannot possible because, we reach to the quantum mechanical
regime where the Heisenberg‟s uncertainty principle come in to play. After that Moore‟s law
will not be validate the growth of performance of the IC technology. Therefore, instead of
reduce the dimension of chip, we must find the alternative method of computing to improve
performance per unit cost. The best way to overcome the future difficulties in computing is
quantum computing.

Dr. Santhosh Kumar M V, Dept. of Physics, BIET, Davanagere. Page 2


Dept. of Physics, BIET, Davanagere

Concept of qubit and its properties


Bits and Qubit:
Bits stands for unit region that is reserved to process unit information or smallest unit
information that computer can process.
Qubit: the quantum computer that can process the data in terms of qubit it represents the
abstract state of rotation vector of quantum states 𝟎 and 𝟏 . It also exist in superposed state
𝜓 =𝜶 𝟎 +𝜷 𝟏
Dirac or “bra–ket” notation is commonly used in quantum mechanics and quantum
computing. The state of a qubit is enclosed in the right half of an angled bracket, called the
“ket”. A qubit 𝜓 , could be in a 𝟎 or 𝟏 state which is a superposition of both 𝟎 and 𝟏 .
This is written as, 𝜓 = 𝛼 0 + 𝛽 1
Bloch sphere:
The distinct states 𝟎 and 𝟏 can be represented as North and South poles of a sphere of
unit radius called “Bloch sphere”. The state of a qubit is represented by vector in this sphere
as shown in the figure.

It is the type of geometrical representation of state of


qubit is known are bloch sphere. The bloch sphere is a
sphere having unit radius and the state is represented
by the vector 𝜓
θ θ
𝜓 = 𝑐𝑜𝑠 0 + 𝑒 𝑖𝜑 𝑠𝑖𝑛 1
2 2
Note: The values of ′θ′ and ′𝜑′ are the deciding factors
to the direction of vector 𝜓 in the bloch sphere; Bloch
sphere represents the single qubit hence there is no
generalization of bloch sphere for multiple qubit.

𝜑 = 0° θ = 0° 𝜓 = 0 𝜓 𝑖𝑠 𝑎𝑙𝑜𝑛𝑔 + 𝑧 𝑎𝑥𝑖𝑠
𝜑 = 0° θ = 180° 𝜓 = 1 𝜓 𝑖𝑠 𝑎𝑙𝑜𝑛𝑔 − 𝑧 𝑎𝑥𝑖𝑠
𝜑 = 90° θ = 90° 1 𝜓 𝑖𝑠 𝑎𝑙𝑜𝑛𝑔 + 𝑦 𝑎𝑥𝑖𝑠
𝜓 = 0 +𝑖 1
2
𝜑 = 90° θ = −90° 1 𝜓 𝑖𝑠 𝑎𝑙𝑜𝑛𝑔 − 𝑦 𝑎𝑥𝑖𝑠
𝜓 = 0 −𝑖 1
2
𝜑 = 0° θ = 90° 1 𝜓 𝑖𝑠 𝑎𝑙𝑜𝑛𝑔 + 𝑥 𝑎𝑥𝑖𝑠
𝜓 = 0 + 1
2
𝜑 = 180° θ = 90° 1 𝜓 𝑖𝑠 𝑎𝑙𝑜𝑛𝑔 − 𝑥 𝑎𝑥𝑖𝑠
𝜓 = 0 − 1
2

Dr. Santhosh Kumar M V, Dept. of Physics, BIET, Davanagere. Page 3


Dept. of Physics, BIET, Davanagere

Physical realization of qubit 𝟎 & 𝟏 :


The physically can realize the qubits in the following manner;
 Down spin and Up spin of electron ⇃&↾

 Ground state and Excited state of atom ⇓&⇑

 Horizontal and vertical polarization photon ⇔& ⇕

 Left circular and right circular polarization of photon ↺ &↻

Properties of qubit:
1. Qubits are exist in 0 𝑎𝑛𝑑 1 state or in exist in superposition of both 0 and 1 .
State i.e. 𝜓 = 𝛼 0 + 𝛽 1
2. Qubit follows entanglement means if the two states of the qubit are entangled then
their states are mutually dependent on each other even how far they are.
3. Interference: one qubit state interfere with other they follows low of interference
4. Qubit moves against the naturally acceptable conditions means Tunnelling process.
5. Qubits are normalization rules i.e. 𝛼 2 + 𝛽 2 = 1
Single qubits:
The qubit contains the single element in the „ket‟ space called single qubit it signifies the
rotation vector in the bloch sphere.
∴ Single qubit basis states are 0 𝑎𝑛𝑑 1 0
Binary representation:
0 = 0 × 20 = 0
1
1 = 1 × 20 = 1
In general
𝜓 =𝛼 0 +𝛽 1
Examples; all Pauli matrices are called single qubit state operators
𝟏 𝟎 𝟎 𝟏 𝟎 −𝒊 𝟏 𝟎
𝑰 = 𝝈𝟎 = , 𝝈𝒙 = , 𝝈𝒚 = , 𝝈𝟎 =
𝟎 𝟏 𝟏 𝟎 𝒊 𝟎 𝟎 −𝟏

Two qubits:
The two qubit contains the two elements in the „ket‟ space called two qubit it signifies the
rotation vector in the two individual bloch sphere.
∴ Two qubit basis states are 00 , 01 , 10 𝑎𝑛𝑑 11
Binary representation: the two qubit has ‘2n’ elements. Where: ‘n’ implies the number of
bits.

Dr. Santhosh Kumar M V, Dept. of Physics, BIET, Davanagere. Page 4


Dept. of Physics, BIET, Davanagere

00 = 0 × 21 + 0 × 20 =0
01 = 0 × 21 + 1 × 20 =1
10 = 1 × 21 + 0 × 20 =2
11 = 1 × 21 + 1 × 20 =3
In general
𝜓 = 𝛼1 0 + 𝛼2 1 𝛽1 0 + 𝛽2 1
Matrix representation of two qubits
1 0 0 0
0 1 0 0
0 0 = 𝐼4
1 0
0 0 0 1
Multiple qubit: (three qubit)
The 3 qubit contains the 3 elements in the „ket‟ space called 3 qubit it signifies the rotation
vector in the 3 individual bloch sphere.
∴ Basis states are 000 , 001 , 010 , 011 , 100 , 101 , 110 𝑎𝑛𝑑 111
Binary representation: the three qubit has ‘2n’ elements. Where: ‘n=3’ implies the number
of bits.
000 = 0 × 22 + 0 × 21 + 0 × 20 =0
001 = 0 × 22 + 0 × 21 + 1 × 20 =1
010 = 0 × 22 + 1 × 21 + 0 × 20 =2
011 = 0 × 22 + 1 × 21 + 1 × 20 =3
100 = 1 × 22 + 0 × 21 + 0 × 20 =4
101 = 1 × 22 + 0 × 21 + 1 × 20 =5
110 = 1 × 22 + 1 × 21 + 0 × 20 =6
111 = 1 × 22 + 1 × 21 + 1 × 20 =7
In general
𝜓 = 𝛼1 0 + 𝛼2 1 𝛽1 0 + 𝛽2 1 𝛾1 0 + 𝛾2 1
Matrix representation of three qubits
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 = 𝐼8
0 0 0 1 0 0 0
0 0 0 0 0 1 0 0
0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 1
Extension to ‘n’ qubits:
∴ Basis states are
000, , , , , ,00 , 000, , , , , ,01 , 000, , , ,10 − − − − 000, , , , ,11 , 𝑎𝑛𝑑 111, , , , ,11
Matrix representation of n qubit

Dr. Santhosh Kumar M V, Dept. of Physics, BIET, Davanagere. Page 5


Dept. of Physics, BIET, Davanagere

10, , , , , , , , , , , , , ,00
01, , , , , , , , , , , , , ,00
,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,, = 𝐼2𝑛 (2𝑛 𝑋2𝑛 )
,,,,,,,,,,,,,,,,,,,,
00, , , , , , , , , , , , , ,10
00, , , , , , , , , , , , , ,01
Dirac Representation and matrix operations.

The basis states of Qubits expressed in BRA or KET space called dirac representation

„KET‟ space represents the column Matrix


𝜓1
𝜓2
,
𝜓 = ,
,
𝜓𝑛
„BRA‟ space represents the row Matrix
𝜑 = 𝜑1 𝜑2 … … . . 𝜑𝑛

Matrix formulation of basis states


KET-space;
1
0 =
0
0
1 =
1
BRA-space;
0 = 1 0
1 = 0 1
Note: KET vector is the complex conjugate transpose of BRA vector vice versa

Outer product of matrices/ vector product /tensor product:


Rules:
1. Multiply the 1st element of 1st matrix to 1st & 2nd element of 2nd matrix.
2. Similarly, multiply the 2nd element of 1st matrix with 1st & 2nd element of 2nd matrix.
3. Write all results in single column.
Example: Obtained the basis states of 2-qubit state in matrix form
The states are 𝟎𝟎 , 𝟎𝟏 , 𝟏𝟎 𝒂𝒏𝒅 𝟏𝟏

Dr. Santhosh Kumar M V, Dept. of Physics, BIET, Davanagere. Page 6


Dept. of Physics, BIET, Davanagere

1
1 1
00 = 0 ⊗ 0 = ⊗ = 0 𝑖𝑠 𝑡ℎ𝑒 𝑓𝑖𝑟𝑠𝑡 𝑐𝑜𝑙𝑢𝑚 𝑜𝑓 𝑚𝑎𝑡𝑟𝑖𝑥
0 0 0
0
0
1 0
01 = 0 ⊗ 1 = ⊗ = 1 𝑖𝑠 𝑡ℎ𝑒 𝑠𝑒𝑐𝑜𝑛𝑑 𝑐𝑜𝑙𝑢𝑚 𝑜𝑓 𝑚𝑎𝑡𝑟𝑖𝑥
0 1 0
0
0
0 1
10 = 1 ⊗ 0 = ⊗ = 0 𝑖𝑠 𝑡ℎ𝑒 𝑡ℎ𝑖𝑟𝑑 𝑐𝑜𝑙𝑢𝑚 𝑜𝑓 𝑚𝑎𝑡𝑟𝑖𝑥
1 0 1
0
0
0 0
11 = 1 ⊗ 1 = ⊗ = 0 𝑖𝑠 𝑡ℎ𝑒 𝑓𝑜𝑢𝑟𝑡ℎ 𝑐𝑜𝑙𝑢𝑚 𝑜𝑓 𝑚𝑎𝑡𝑟𝑖𝑥
1 1 0
1
1 0 0 0
0 1 0 0
0 0 1 0 = 𝐼4
0 0 0 1
It is the identity matrices of 4x4

Three qubits ∴ Basis states are 000 , 001 , 010 , 011 , 100 , 101 , 110 𝑎𝑛𝑑 111

1
0
1 0
1 1 1 0 1
= 0 ⊗ 0 ⊗ 0 = ⊗ ⊗ = ⊗ = 0
0 0 0 0 0 0
0 0
0
0
0
1
1 0
1 1 0 0
0 ⊗ 0 ⊗ 1 = ⊗ ⊗ = 0 ⊗ = 0
0 0 1 0 1 0
0 0
0
0

Likewise, all other column are derived by taking outer product of basis states; the
resultant matrix is Identity matrix of (8x8)

Dr. Santhosh Kumar M V, Dept. of Physics, BIET, Davanagere. Page 7


Dept. of Physics, BIET, Davanagere

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 = 𝐼8
0 0 0 1 0 0 0
0 0 0 0 0 1 0 0
0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 1

Inner product of matrices/ Dot product /Scalar product:


 Matrix multiplication or inner product is simply obtained by multiply rows and
column
𝜓1
𝜓2
,
𝝋 𝛙 = 𝜑1 𝜑2 …….. 𝜑𝑛 . ,
,
,
𝜓𝑛
𝝋 𝛙 = 𝜑1 𝜓1 + 𝜑2 𝜓2 +, , , , , , , +𝜑𝑛 𝜓𝑛
Example: Find the matrix form of 𝝍 = 𝜶 𝟎 + 𝜷 𝟏
1 0
We know 0 = and 1 =
0 1
1 𝛼
Then 𝛼 0 = 𝛼 =
0 0
0 0
𝛽1 =𝛽 =
1 𝛽
𝛼 0 𝛼
∴ 𝜓 =𝛼 0 +𝛽 1 = + = 𝛽
0 𝛽
Operation of 𝟎 & 𝟏 on Identity matrix; Let the identity operator I operates on 0 state of
qubit.

Therefore Identity matrices operate on basis states 0 & 1 the basis states are unaltered.

Dr. Santhosh Kumar M V, Dept. of Physics, BIET, Davanagere. Page 8


Dept. of Physics, BIET, Davanagere

Pauli matrices: Pauli matrices and their operations on basis states 𝟎 & 𝟏
There are four extremely useful matrices called Pauli Matrices. The Pauli matrices of the following form
𝟏 𝟎 𝟎 𝟏 𝟎 −𝒊 𝟏 𝟎
𝑰 = 𝝈𝟎 = , 𝝈𝒙 = 𝑿 = , 𝝈𝒚 = 𝒀 = , 𝝈𝟎 = 𝒁 =
𝟎 𝟏 𝟏 𝟎 𝒊 𝟎 𝟎 −𝟏

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.(conjugate of imaginary terms must changes its sign, real terms keep as it is)

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.

Dr. Santhosh Kumar M V, Dept. of Physics, BIET, Davanagere. Page 9


Dept. of Physics, BIET, Davanagere

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.

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

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 𝑈.

Dr. Santhosh Kumar M V, Dept. of Physics, BIET, Davanagere. Page 10


Dept. of Physics, BIET, Davanagere

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.

Inner Product - Multiplication of Row and Column Matrices:

Dr. Santhosh Kumar M V, Dept. of Physics, BIET, Davanagere. Page 11


Dept. of Physics, BIET, Davanagere

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

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

Using equation the inner product 𝜓|𝜓 is given by,

Thus the above equation represents Probability Density. As per the principle of
Normalization

Dr. Santhosh Kumar M V, Dept. of Physics, BIET, Davanagere. Page 12


Dept. of Physics, BIET, Davanagere

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

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 ortho-normal if
1. |𝜓 and |𝜙 are normalized.
2. |𝜓 and |𝜙 are orthogonal to each other.
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.
Single Qubit QUANTUM-Gates;
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 is given by 𝛽
Hence the operation of Quantum Not Gate on quantum state is given by

Dr. Santhosh Kumar M V, Dept. of Physics, BIET, Davanagere. Page 13


Dept. of Physics, BIET, Davanagere

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

Quantum Y-Gate is represented by

Dr. Santhosh Kumar M V, Dept. of Physics, BIET, Davanagere. Page 14


Dept. of Physics, BIET, Davanagere

Z-Gate:
The Z-gate is represented by Pauli Matrix 𝜎𝑧 or 𝑍. 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

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

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 superposition 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.

Dr. Santhosh Kumar M V, Dept. of Physics, BIET, Davanagere. Page 15


Dept. of Physics, BIET, Davanagere

Phase Gate or S Gate:


The phase gate turns a |0 into |0 and a |1 into 𝑖 |1 The Matrix representation of the S gate
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

Dr. Santhosh Kumar M V, Dept. of Physics, BIET, Davanagere. Page 16


Dept. of Physics, BIET, Davanagere

𝑆†𝑆 = 𝐼 and hence it is Unitary.


T -Gate or 𝜋/8 Gate: The T Gate is represented by the matrix as follows

Dr. Santhosh Kumar M V, Dept. of Physics, BIET, Davanagere. Page 17


Dept. of Physics, BIET, Davanagere

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 is a typical
multi-qubit logic gate and the
Circuit is as follows.

The Matrix representation of CNOT gate is given by

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
|01 → |01
Operation of CNOT Gate for input |10
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

Dr. Santhosh Kumar M V, Dept. of Physics, BIET, Davanagere. Page 18


Dept. of Physics, BIET, Davanagere

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.

Dr. Santhosh Kumar M V, Dept. of Physics, BIET, Davanagere. Page 19


Dept. of Physics, BIET, Davanagere

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.

Dr. Santhosh Kumar M V, Dept. of Physics, BIET, Davanagere. Page 20


Dept. of Physics, BIET, Davanagere

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,
Matrix representation

10 0 0 0 0 0 0
01 0 0 0 0 0 0
00 1 0 0 0 0 0
00 0 1 0 0 0 0 = 𝑈𝑇
00 0 0 1 0 0 0
00 0 0 0 1 0 0
00 0 0 0 0 0 1
00 0 0 0 0 1 0
Gate Circuit and the Truth Table of Toffoli Gate are as follows.

The Toffolli matrix is unitary. The Toffolli Gate is its own inverse. It could be used for
NAND Gate Simulation.

Dr. Santhosh Kumar M V, Dept. of Physics, BIET, Davanagere. Page 21


Dept. of Physics, BIET, Davanagere

Dr. Santhosh Kumar M V, Dept. of Physics, BIET, Davanagere. Page 22

You might also like