0% found this document useful (0 votes)
4 views

Quantum computing

The document outlines the syllabus and key concepts of Quantum Computing as part of the Applied Physics course at PESCE, Mandya. It covers topics such as wave functions in ket notation, matrix operations, Dirac notation, and quantum logic gates, emphasizing the differences between classical and quantum computing. Additionally, it includes practical components and self-learning aspects related to the operation of logic gates on qubits.

Uploaded by

Faiz Akhtar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Quantum computing

The document outlines the syllabus and key concepts of Quantum Computing as part of the Applied Physics course at PESCE, Mandya. It covers topics such as wave functions in ket notation, matrix operations, Dirac notation, and quantum logic gates, emphasizing the differences between classical and quantum computing. Additionally, it includes practical components and self-learning aspects related to the operation of logic gates on qubits.

Uploaded by

Faiz Akhtar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

Applied Physics: (P22PHCS102/202) Unit – IV: Photonics PESCE, Mandya

P.E.S. College of Engineering


Mandya – 571 401, Karnataka
(An Autonomous Institution affiliated to VTU, Belagavi)

DEPARTMENT OF PHYSICS
Course Title: Applied Physics
Course Code: P22PHCS102/202

Unit – V
Quantum Computing Notes

2024-25

1
Applied Physics: (P22PHCS102/202) Unit – IV: Photonics PESCE, Mandya

Syllabus

Unit-III: Quantum Computing 8 Hrs

Wave Function in Ket Notation: Matrix form of wave function, Identity Operator, Pauli Matrices

(its operations on 0 and 1 states), Mention of Conjugate and Transpose, Unitary Matrix U, Examples:

Row and Column Matrices and their multiplication (Inner Product), Probability, Orthogonality.

Quantum computers: Difference between classical and quantum computers, Moore’s law and its

end. Dirac bracket notations, Qubits and their different types, Bloch sphere, quantum logic gates: single

qubit logic gates - Quantum Not Gate, Pauli - Z Gate, Hadamard Gate, Phase Gate (or S Gate), T Gate.

Multi qubit logic gates - Controlled gate, CNOT Gate and 4 different input states. Representation of Swap

gate, Controlled -Z gate, Toffoli gate.

Self-learning: Operation of logic gates on single and multi – qubits

Practical component:

2
Applied Physics: (P22PHCS102/202) Unit – IV: Photonics PESCE, Mandya

Fundamental Concepts of Quantum Computations


Matrices:

A matrix is a set or group of numbers arranged in a square or rectangular array enclosed by two brackets.

4 2 𝑎 𝑏
Example: [1 −1] [ ] [ ]
−3 0 𝑐 𝑑
Matrix algebra has at least two advantages:

1. Reduces complicated systems of equations to simple expressions


2. Adaptable to systematic method of mathematical treatment is well suited to computers

Rectangular array of numbers


𝑎11 𝑎12 𝑎13 … 𝑎1𝑛
𝑎21 𝑎22 𝑎23 … 𝑎2𝑛
: ∶ ∶ ∶ ∶
𝑎𝑚1 𝑎𝑚2 𝑎𝑚3 … 𝑎𝑚𝑛
[ ]

Each entry is an element 𝑎𝑟𝑜𝑤′𝑐𝑜𝑙𝑢𝑚𝑛

Order of Matrix:

Matrices are defined as a rectangular array, it is two dimensional. Basically, a two dimensional matrix
consists of the number of rows (m) and number of columns (n). Order of matrix is equal to 𝑚 × 𝑛 (also
pronounced as m by n).

Order of matrix = Number of rows × Number of columns

1 2 3
Example: [ ]
4 5 6 2×3

Square Matrix: A matrix where the number of rows and columns are equal.

2 3 𝑖
Example: [6 3 1]
0 2 5 3×3

Column Matrix: A matrix with one column and any number of rows.

2
Example: [ 3 ]
−𝑖 3×1

Row Matrix: A matrix with one row and any number of columns.

Example: A = [−1 0 𝑖]1×3

3
Applied Physics: (P22PHCS102/202) Unit – IV: Photonics PESCE, Mandya

Matrix Operations:

Matrix operations mainly involve three algebraic operations which are addition, subtraction and
multiplication.

To add or subtract matrices the order of matrix must be identical and for matrix multiplication the number
of columns in the first matrix equals the number of rows in the second matrix.

Addition of matrices/subtraction of matrices:

If A[𝑎𝑖𝑗 ] and B[𝑏𝑖𝑗 ] are two matrices of the same order, then sum A+B or difference A-B is a
𝑚×𝑛 𝑚×𝑛
matrix and each element of that matrix is the sum or difference of the corresponding elements.

i.e., A+B = [𝑎𝑖𝑗 + 𝑏𝑖𝑗 ]


𝑚×𝑛

Example: consider the two matrices A and B of the order 2× 2. Then the sum is given by:

1 2 3 2 1+3 2+2 4 4
A+B = [ ]+[ ]=[ ]=[ ]
−1 4 1 5 −1 + 1 4+5 0 9

Example: consider the two matrices A and B of the order 2× 2. Then the difference A-B is given by:

1 2 3 2 1−3 2−2 −2 0
A-B = [ ]+[ ]=[ ]=[ ]
−1 4 1 5 −1 − 1 4−5 −2 −1

Properties of matrix addition /subtraction: If A, B and C are matrices of same order, then

a. Commutative law: A+B = B+A


b. Associative law : (A+B)+C = A+(B+C)
c. Identity of the matrix: A+O = O+A = A, where O is zero matrix which is additive identity of the
matrix.
d. Additive inverse: A+(-A) = 0 = (-A)+A, where (-A) is obtained by changing the sign of every
element of A which is additive inverse of the matrix.

Scalar Multiplication: Each entry in the matrix is multiplied by the given scalar.

1 2 3 3 6 9
A = 3[ ]= [ ]
0 −1 −2 0 −3 −6

Multiplication of a Column by a Row:

2 2
A = [4 5 8]1×3 & B = [6]  A× 𝐵 = [4 5 8] × [6] = [4(2) 5(6) 8(9)] = [110]1×1
9 3×1 9

If A and B are the row and column vectors, the inner product/dot product of the vectors are always a
scalar or 1× 1 matrix.

4
Applied Physics: (P22PHCS102/202) Unit – IV: Photonics PESCE, Mandya

Dirac Notation:

The Dirac notation is a concise and convenient way to describe the state of the quantum system, such as
momentum, spin etc., there are two types of vectors in Dirac notation: the bra vector and the ket vector, so
named because when put together they form a bracket or inner product. If 𝜓 is the column vector, then
you can write it in Dirac notation as |𝜓〉 , where the |. 〉 denotes that it is a unit column vector, known as
ket vector. Similarly, the row vector 𝜓† is expressed as 〈𝜓|, refered as bra vector (anti-ket). The brac-ket
notation directly implies that 〈𝜓|𝜓〉 is the inner product of vector 𝜓with itself, which is by definition 1.

More generally, if 𝜓 and 𝜙 are quantum state vectors, then there inner product is 〈𝜙|𝜓〉 . This inner
product implies that the probability of measuring the state |𝜓〉 to be |𝜙 〉 is |〈𝜙 |𝜓〉|2 .

The following convention is used to describe the quantum states that encode the values of zero and one
(the single – qubit computational basis state):

1 0
[ ] = |0〉 & [ ] = |1〉
0 1

Consider two ket vector |𝑎〉 𝑎𝑛𝑑 |𝑏 〉 and arbitrary complex number c1 and c2 then the linear combination
of ket vector is given by, |𝑣 〉 = 𝑐1 |𝑎〉 + 𝑐2 |𝑏 〉

Similarly linear combination of bra vector can be written as 〈𝑣 | = 𝑐1∗ 〈𝑎| + 𝑐2∗ 〈𝑏 |

The scalar product of two states of vectors |𝜓1 〉 and |𝜓2 〉 can be written as

〈𝜓1 |𝜓2 〉 = ∫−∞ 𝜓1 (𝑥 ) 𝜓2 (𝑥)𝑑𝑥

If the scalar product of two vectors is zero i.e.,



〈𝜓1 |𝜓2 〉 = ∫−∞ 𝜓1 (𝑥 ) 𝜓2 (𝑥 )𝑑𝑥 = 0

Then the corresponding vectors are said to be orthogonal

And, if the scalar product of two vectors is unitary i.e.,



〈𝜓1 |𝜓2 〉 = ∫−∞ 𝜓1 (𝑥 ) 𝜓2 (𝑥 )𝑑𝑥 = 1

Then the corresponding vectors are said to be normalized.

5
Applied Physics: (P22PHCS102/202) Unit – IV: Photonics PESCE, Mandya

Wave Function in Ket Notation:

Matrix form of wave function:

The state of a physical system is represented by wave function 𝜓, and then the state of system can be
written in terms of Eigen function as

𝜓 = 𝑐1 𝜙1 + 𝑐2 𝜙2 + 𝑐3 𝜙3 + ⋯ + 𝑐𝑛 𝜙𝑛

Where, 𝜙1 , 𝜙2 , 𝜙3 , … . 𝜙𝑛 are the Eigen functions and 𝑐1 , 𝑐2 , 𝑐3 , … . 𝑐𝑛 are the co-efficient of the Eigen
functions, which can be real or complex.

Let, 𝜓 ∗ = 𝑐1∗ 𝜙1∗ + 𝑐2∗ 𝜙2∗ + 𝑐3∗ 𝜙3∗ + ⋯ + 𝑐𝑛∗ 𝜙𝑛∗

Where , 𝜙1∗, 𝜙2∗ , 𝜙3∗ … 𝜙𝑛∗ are the complex conjugate of Eigen functions and 𝑐1∗ , 𝑐2∗ , 𝑐3∗ , … 𝑐𝑛∗ are the complex
conjugate co-efficient of 𝑐1 , 𝑐2 , 𝑐3 , … . 𝑐𝑛 respectively.

So, 𝜓 𝑎𝑛𝑑 𝜓∗ can be written in bra and ket notations as follows,

|𝜓〉 = 𝑐1 |𝜙1 〉 + 𝑐2 |𝜙2 〉 +𝑐3 |𝜙3 〉 + … . +𝑐𝑛 |𝜙𝑛〉

〈𝜓| = 𝑐1∗ 〈𝜙1 | + 𝑐2∗ 〈𝜙2 | + 𝑐3∗ 〈𝜙3 | + ⋯ + 𝑐𝑛∗ 〈𝜙𝑛 |

The |𝜓〉 𝑎𝑛𝑑 〈𝜓| can be written in matrix form as

〈𝜙1 |𝜓〉 𝑐1
〈𝜙2 |𝜓〉 𝑐2
|𝜓〉 = 〈𝜙3 |𝜓〉 = 𝑐3
⋮ ⋮
[〈𝜙𝑛|𝜓〉] [𝑐 𝑛]

∗ ∗ ∗ ∗
The bra vector 〈𝜓| = 〈𝜙1 |𝜓〉 , 〈𝜙2 |𝜓〉 , 〈𝜙3 |𝜓〉 … , 〈𝜙𝑛 |𝜓〉 = [𝑐1∗ , 𝑐2∗ , 𝑐3∗ , … 𝑐𝑛∗ ]

This type representation of a state vector 𝜓 is known as matrix representation.

Identity Operator:

The operator which operating on functions and leaves the function unchanged is known as identity
operator, i.e., Ȋ |𝑎〉 = |𝑎〉 or Ȋ |𝜓〉 = |𝜓〉

An identity matrix is a square matrix in which all the elements of principal axis are one, a nd all other
elements are zeros and the matrix representation is given as follow

1 0 0 ⋯ 0
1 0 0 0 1 0 ⋯ 0
1 0 ⋯
Ȋ=[ ] , Ȋ = [0 1 0] ……. , I n = 0 0 1 0
0 1 2×2 ⋮ ⋮ ⋮ ⋱ ⋮
0 0 1 3×3
[0 0 0 ⋯ 1]

6
Applied Physics: (P22PHCS102/202) Unit – IV: Photonics PESCE, Mandya

Operations of Ȋ on |𝟎〉 and |𝟏〉 States:

1 0
Consider |0〉 and |1〉 states, expressed in matrix form as |0〉 = [ ] , |1〉 = [ ] and the identity operator,
0 1

From the above proof of equation 1 and 2, it verifies that, when an identity operator Ȋ operates on any
qubit basis states, leaves it unchanged. Such that, when identity operator operates on any input state of
quantum logic gate of quantum circuit the output state remains same.

Pauli Matrices:

The Pauli matrices / pauli spin matrices are set of three 2 × 2 matrices which are Hermitian and unitary.
They are denoted by,

1 0
Apart from this three matrices, 𝜎0 = ( ) is also considered in few cases which is an Identity matrix.
0 1
i.e., 𝜎0 = 𝐼.

Operations of Pauli Matrices on |𝟎〉:

7
Applied Physics: (P22PHCS102/202) Unit – IV: Photonics PESCE, Mandya

Operations of Pauli Matrices on |𝟏〉:

Conjugate of Matrix:

The complex conjugate of a given matrix is that matrix whose elements are the complex conjugate of the
corresponding elements of a given matrix. If the elements of matrix are real then no change, if the
elements of matrix are complex, then each complex element change its conjugate, that means sign of the
elements changes from –i to i and i to –i.

1 𝑖 1 −𝑖
Example: let A = [ ] , 𝐴∗ = [ ]
−𝑖 1 𝑖 1
2𝑖 4+𝑖 1 −2𝑖 4−𝑖 1
A = (6 − 𝑖 3 + 5𝑖 4 − 9𝑖 ) → Ᾱ = (6 + 𝑖 3 − 5𝑖 4 + 9𝑖 )
−6𝑖 7 + 2𝑖 0 6𝑖 7 − 2𝑖 0

A and 𝐴∗ are conjugate to each other. All imaginary elements of a given matrix is replaced by opposite
sign.

Note: If all elements are real then 𝐴 = 𝐴∗

If all the elements are complex then 𝐴∗ = −𝐴, the matrix is purely imaginary.

Transpose of a Matrix:

The transpose of a given matrix is obtained by inter changing rows and columns of the given matrix. The
transpose of the matrix is denoted by using the letter “T” in the superscript of the given matrix. For
example, if “A” is the given matrix then the transpose of the matrix is represented by A′ or AT.

Let us consider a matrix A defined by 𝑚 × 𝑛 (‘m’ rows and ‘n’ columns, read as m by n matrix)

𝐴𝑚×𝑛 then its transpose is given by 𝐴𝑇 = 𝐴𝑚×𝑛

1 2 4 1 6 7 4
Ex: A = [6 9 11]  AT = [2 9 10] , A = [4 5 8]1×3  AT = [5]
7 10 0 3×3 4 11 0 3×3 8 3×1

8
Applied Physics: (P22PHCS102/202) Unit – IV: Photonics PESCE, Mandya

The symbol 𝐴† (read as dagger) represents the transpose of the complex conjugate of a given matrix A,
i.e., 𝐴 † = (𝐴∗ )𝑇 .

Conjugate Transpose of a Matrix:

The complex conjugate transpose of a matrix interchanges the row & column index for element,
reflecting the elements across the main diagonal and it is denoted by Ϯ (dagger).

𝑖 1 𝑖 0 −𝑖 0
𝐸𝑥: 𝐴=[ ]  𝐴∗ = [ ]  𝐴Ϯ = [ ]
0 2 − 3𝑖 1 2 − 3𝑖 1 2 + 3𝑖

Hermitian Matrix:

The matrix that is equal to its conjugate transpose is called Hermitian matrix.

3 3+𝑖 3 3−𝑖
𝐸𝑥: 𝐴=[ ]  𝐴∗ = [ ]
3−𝑖 2 3+𝑖 2

3 3−𝑖
 𝐴𝑇 = [ ]
3+𝑖 2
3 3+𝑖
 (𝐴∗ )𝑇 = [ ]
3−𝑖 2
 (𝐴∗ )𝑇 = 𝐴  𝐴Ϯ = 𝐴 ( (𝐴∗ )𝑇 = 𝐴Ϯ )

Unitary Matrix:

The complex matrix which is multiplied by its conjugate transpose, which is equal to the identify matrix
is called unitary matrix.

In general 𝑈 †𝑈 = 𝑈𝑈 † = 𝐼 (or) UU-1= I

Where U is unitary matrix and 𝑈 † is conjugate transpose.

cos 𝜃 𝑖 sin 𝜃 cos 𝜃 −𝑖 sin 𝜃


Ex: A = [ ] 𝐴† = [ ]
𝑖 sin 𝜃 cos 𝜃 −𝑖 sin 𝜃 cos 𝜃
cos 𝜃 𝑖 sin 𝜃 cos 𝜃 −𝑖 sin 𝜃
A𝐴 † = [ ][ ]
𝑖 sin 𝜃 cos 𝜃 −𝑖 sin 𝜃 cos 𝜃

=[ cos2 𝜃 + sin2 𝜃 −𝑖 cos 𝜃 sin 𝜃 + 𝑖 cos 𝜃 sin 𝜃 ]


𝑖 cos 𝜃 sin 𝜃 − 𝑖 sin 𝜃 cos 𝜃 cos2 𝜃 + sin2 𝜃
1 0
A𝐴 † = [ ]=𝐼
0 1
1 0
Similarly, 𝐴†𝐴 = [ ]=𝐼
0 1

Hence, A𝐴† = 𝐴†𝐴 = 𝐼

9
Applied Physics: (P22PHCS102/202) Unit – IV: Photonics PESCE, Mandya

NOTE: The inner product or multiplication of two unitary matrix is again a unitary matrix.

Matrix Multiplication (Inner product):

The matrix multiplication between two matrixes exists only when the number of columns of first matrix
must be equal to number rows of second matrix. In vector space this is called as dot or inner product of
two vectors which must be scalar quantity.

NOTE: the reverse multiplication does not exist.

0
2 −1 7
Example: A = [ ] B = [−2]
0 6 −3 2×1
3 3×1

(2 × 0) + (−1)(−2) + 7×3 23
A.B = [ ] =[ ]
0×0+ 6 × (−2) + (−3) × 3 2×1 −21 2×1

Probability (or) Quantum Superposition: is the ability of a quantum system exists in multiple states at
the same time until it is measured.

Let us consider Dirac notation of a quantum system in Hilbert space

1 0
i.e., |0〉 = [ ] and |1〉 = [ ]which are the states of quantum mechanical system or physical object which
0 1
are called quantum binary digits or simply qubits.

The qubits exists not only in |0〉 and |1〉 but are also in the linear combination of states often called
superposition. |𝜓〉 = 𝛼 |0〉 + 𝛽 |1〉.

Where 𝛼 and 𝛽 are complex numbers, 𝜓 is a state of quantum mechanical system or wave function.

Orthogonality:

We say that two vectors are orthogonal if they are perpendicular to each other. i.e., the dot product of the
two vectors is zero. (or ) we say that a set of set vectors {v1,v2,….,vn} are mutually orthogonal, if every
pair of vectors is orthogonal.

i.e., 〈𝜙 |𝜓〉 = 0

Where, |𝜓〉 is a wave function and 〈𝜙| = 𝜙 ∗ complex conjugate of 𝜓

Orthonormality:

The state  and  are said to be orthonormal if

(i)  and  are normalized. i.e.,       1

(ii)  and  are orthonormal to each other. i.e.,    0

10
Applied Physics: (P22PHCS102/202) Unit – IV: Photonics PESCE, Mandya

Quantum Computers
 Quantum computers are the machines that perform calculations based on the laws of quantum mechanics.
 Quantum computing is the computer technology based on the principles of superposition and quantum
theory, which explains the nature and behaviour of energy and matter in the atomic and subatomic level.
 In quantum computing, the information is encoded in quantum system such as atoms, ions or quantum dots.

Difference between classical and quantum computers:

Sl.
Classical Computer Quantum Computer
No.
Quantum computers use Qubits i.e. 0, 1 and
Classical computers use binary codes i.e.
1 both of them simultaneously to run machines
bits 0 or 1 to represent information.
faster.
In classical computers information In quantum computers information storage is
2 storage is bit based on voltage or charge Quantum bit based on direction of an electron
etc. spin.
Quantum computers can perform many
It is large scale integrated multi-purpose calculations in parallel, making them much
3
computer. faster than classical computers for certain
types of problems.
Operations are defined by linear algebra over
Operations are defined by Boolean
4 Hilbert Space and can be represented by
Algebra.
unitary matrices with complex elements.
Information processing is carried out by Information processing is carried out by
5
logic gates e.g. NOT, AND, OR etc. Quantum logic gates.
Classical Computers use bits in the form A Qubit can be as simple as a single Photon,
6 of transistors which take either of two Electron, Ion/Atom.
values – 0 or 1.
Information is obtained through

Information is obtained in terms of bits (1) Photon: Polarization – 0 – Horizontal


1 – Vertical
7
Encoding: 0 - Close (2) Electron: Spin - 0 – Up
1 - Open 1 – Down
(3) Atom/Ion: Energy level - 0 – Ground state
1 – Excited state
Circuit behavior is defined by Classical Circuit behavior is defined by Quantum
8
Physics Mechanics.
Example: A scanner makes an image of a Example: A camera makes an image of a paper
paper by scanning the paper’s points, one by photographic the paper’s points, all points
9
point at a time. This is related/similar to a at a time. This is related/similar to a quantum
classical computer. computer.

11
Applied Physics: (P22PHCS102/202) Unit – IV: Photonics PESCE, Mandya

Moor’s law and its end:

In 1965, Gordon E. Moore, cofounder of Intel, predicted that roughly every two years, the number of
transistors on microchips (computer processor) will double. Commonly referred to as Moore’s Law, this
phenomenon suggests that computational progress (speed, size and capability) will become significantly
faster, smaller, and more efficient over time.

According to expert opinion, Moore’s Law is estimated to end sometime in the 2020s. In a 2005
interview, Moore himself stated that his law “can’t continue forever.” The above graphical representation
shows the growing number of transistors per chip with time and the declining trend in the number of
electrons in a transistor.

Computers are projected to reach their limits because transistors will be unable to operate within smaller
circuits at increasingly higher temperatures. This is due to the fact that cooling the transistors will require
more energy than the energy that passes through the transistor itself.

Qubits and working principle of their different types:

A quantum bit or qubit (sometimes qbit) is a unit of quantum information. A qubit of data is represented
by a single atom that is in one of the two states denoted by 0 and 1 . A single bit of this form is known
as a qubit.

Example: white and black colour corresponds to the states 0 and 1 , then a qubit can be imagined to
have shade of grey.
Qubit:    0   1
The above equation represents the quantum superposition of states |0⟩ and |1⟩.

1 0  
             
 0 1  

Where  and  are complex numbers. These complex numbers are amplitudes.

Single qubit:

A Single qubit has two computational basis states |0⟩ and |1⟩. Then the single qubit is represented as
follows     0   1

12
Applied Physics: (P22PHCS102/202) Unit – IV: Photonics PESCE, Mandya

Two qubits:

A two-qubit system has 4 computational basis states denoted as |00⟩, |01⟩, |10⟩, |11⟩. Then the two qubit is
represented as follows

 1  1 0  1 1  and  2   2 0   2 1 

1   2

 1 2  1 2 00  1 2 01  1 2 10  1 2 11 

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

Dirac bracket notations:

We use a specific type of notation called bra-ket notation in quantum mechanics to represent vectors in a
more condensed form. Let’s look at the most basic vectors, the “0” vector and the “1” vector, in bra -ket
notation:

The symbol “|>” denotes a column vector, and is known as a “ket”.


1 0
0    , 1   
 0 1

The “bra” “<|” form of a vector is just the conjugate transpose of the original, shown below:
0  1 0 , 1  0 1

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.

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 are the super positions of |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 unit
spherical co-ordinates. They are the polar angle 𝜃 and the azimuth angle
𝜙. The block sphere is represented by the equation

13
Applied Physics: (P22PHCS102/202) Unit – IV: Photonics PESCE, Mandya

 
  cos 0  e i sin 1
2 2
here 0 ≤ 𝜃 ≤ 𝜋 and 0 ≤ 𝜙 ≤ 2𝜋.

For   0 and   0, the state  corresponds to 0 and is along + z-axis.

For   0 and   180 0 , the state  corresponds to 1 and is along - z-axis.

When   90 0 , the vector is the x-y plane.

For   90 0 ,  
1
0  i 1 , is a superposition state along + y-axis.
2

For   90 0 ,  
1
0  i 1 , is a superposition state along - y-axis.
2

For   0 0 ,  
1
0  1 , is a superposition state along + x-axis.
2

For   180 0 ,  
1
0  1 , is a superposition state along - x-axis.
2

Quantum logic gates:

In quantum computing a quantum logic gate is a basic quantum circuit operating on a small number of
qubits. The quantum calculations are achieved by performing a series of fundamental operations, known
as quantum logic gates.

Single qubit logic gates:

Quantum Not Gate:

In Quantum Computing the quantum NOT gate for qubits changes the state |0⟩ to |1⟩ and |1⟩ to |0⟩.

1. For input |0⟩ the output is (|1⟩).


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

The X-gate is represented by the Pauli-X matrix. (The Pauli-X Gate is nothing but Quantum Not Gate).
The Matrix representation of Quantum Not Gate is given by
0 1
   
1 0

 0 1 1  0
 0          1
1 0  0 1

14
Applied Physics: (P22PHCS102/202) Unit – IV: Photonics PESCE, Mandya

 0 1  0 1
 1          0
1 0 1  0

The circuit symbol and the truth table of Quantum Not Gate are as follows.

Truth table of NOT gate


Input Output
|0⟩ |1⟩
|1⟩ |0⟩

Pauli – Z Gate:

The Z-gate is represented by Pauli Matrix 𝜎𝑧 or 𝑍.

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


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

Due to this nature, Pauli Z Gate is sometimes called phase-flip.


It performs rotations by  around the z-axis of the Bloch sphere.

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 

1 0   0  0   0
Z 1          -    - 1
 0 - 1  1   - 1  1 

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

Truth table of Pauli – Z Gate


Input Output
|0⟩ |0⟩
|1⟩ -|1⟩

15
Applied Physics: (P22PHCS102/202) Unit – IV: Photonics PESCE, Mandya

Hadamard Gate:

The Hadamard Gate is a truly quantum gate and is one of the most important in quantum computing. It is
used to create the superpositions of |0⟩ and |1⟩ states.

0 1
1. For input |0⟩ the output is
2
0 1
2. For input |1⟩ the output is
2

The Matrix representation of Hadamard Gate is as follows

1 1 1 
H  
2 1  1

The Hadamard Gate satisfies Unitary Condition. 𝐻†𝐻 = 𝐼

The operation of Hadamard Gate on |0⟩ and |1⟩ input states are represented as follows

1 1 1  1 1 1 1  1 0  0 1


H 0  1  1 0  1       
2   2  2  0 1  2

1 1 1  0 1 1 1  1  0   0 1


H1  1  1 1  - 1       
2   2   2  0  1  2

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

Truth table of Hadamard Gate


Input Output
|0⟩ 0 1
2
|1⟩ 0 1
2

16
Applied Physics: (P22PHCS102/202) Unit – IV: Photonics PESCE, Mandya

Phase Gate (S Gate):

The phase gate (S-gate) changes the basis state

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


2. For input |1⟩ it changes the output to i|1⟩.
1 0
The Matrix representation of the S gate is given by S   
0 i 
The operation of Phase Gate on |0⟩ and |1⟩ are represented as follows

1 0 1 1
S 0         0
0 i  0 0

1 0 0 0 
S1          i1
0 i  1 i 

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

Truth table of Phase Gate (S Gate)


Input Output
|0⟩ |0⟩ (No change)
|1⟩ i|1⟩
 
T - Gate  Gate  :
8 

The T – gate changes the basis state

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


 i 
2. For input |1⟩ it changes the output to exp   1 .
 4
1 0  1 0 
The Matrix representation of the T - gate is given by T   i     1  i 
0 exp 4  0  2 
 
 
As it is also called as  Gate  , the matrix representation of the T - gate is given by
8 

  i 
i exp 8 0 
T  exp 
8 i 
 0 exp 
 8
The operation of T - Gate on |0⟩ and |1⟩ are represented as follows

17
Applied Physics: (P22PHCS102/202) Unit – IV: Photonics PESCE, Mandya

1 0 
1 1
T 0  0  1  i        0
  0 0
  2 

1 0   0 
   0  1  i   1  i 

T1  0     
 1     2  1
1 i
  
  2   2 

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

 
Truth table of T - Gate  Gate 
8 
Input Output
|0⟩ |0⟩ (No change)
i
|1⟩ exp |1⟩
4

Multiple Qubit Logic Gates:

Multiple Qubit Gates operate on two or more input Qubits. Usually one of them is a control qubit.

Controlled Gates:

The gate has two input qubits known as the control bit and target bit respectively.This tells us that the first
qubit is the controlled, and the second qubit is the target. The target qubit is altered (flipped) only when
the control qubit is |1⟩. The control qubit remains unaltered when the controlled qubit is |0⟩.

Controlled Not Gate or CNOT Gate:

The CNOT gate is a typical multi-qubit logic gate

1. When control qubit is |0⟩ then the target remains unchanged (|0⟩).
2. When control qubit is |1⟩ it changes (flips) the Target.

The Matrix representation of the CNOT Gate is given by

18
Applied Physics: (P22PHCS102/202) Unit – IV: Photonics PESCE, Mandya

1 0 0 0
0 1 0 0
U CN 
0 0 0 1
 
0 0 1 0

The circuit diagram and the truth table of CNOT Gate are as follows.

Truth table of CNOT Gate


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

Operations of CNOT gate on the four inputs |00⟩, |01⟩, |10⟩ and |11⟩:

(1) Operation of CNOT Gate for input |00⟩ (Control qubit = 0 and Target qubit = 0):

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

|00⟩ → |00⟩

(2) Operation of CNOT Gate for input |01⟩ (Control qubit = 0 and Target qubit = 1):

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

|01⟩ → |01⟩

(3) Operation of CNOT Gate for input |10⟩ (Control qubit = 1 and Target qubit = 0):

Here in the inputs the control qubit is |1⟩. Hence the state of Target qubit flips (changes) from |0⟩ to |1⟩.

|10⟩ → |11⟩

(4) Operation of CNOT Gate for input |11⟩ (Control qubit = 1 and Target qubit = 1):

Here in the inputs the control qubit is |1⟩. Hence the state of Target qubit flips (changes) from |1⟩ to |0⟩.

|11⟩ → |10⟩

19
Applied Physics: (P22PHCS102/202) Unit – IV: Photonics PESCE, Mandya

Swap Gate:

The SWAP gate is two-qubit operation

1. For input |00⟩ and |11⟩ the output remains unchanged (|00⟩ and |11⟩)
2. For input |01⟩ and |10⟩ the output changes to |10⟩ and |01⟩

The Matrix representation of the Swap Gate is as follows

1 0 0 0
0 0 1 0
U SWAP 
0 1 0 0
 
0 0 0 1

The circuit symbols of Swap Gate are as follows

The swap gate is a combined circuit of 3 CNOT gates and the overall effect is that two input qubits are
swapped at the output. The action and truth table of the swap gate is as follows.

Truth table of Swap Gate


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

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.

1. For input |00⟩, |01⟩ and |10⟩ the output remains unchanged (|00⟩, |01⟩ and |10⟩)
2. For input |11⟩ the output changes to -|11⟩

The Matrix representation of the Controlled Z Gate is as follows

20
Applied Physics: (P22PHCS102/202) Unit – IV: Photonics PESCE, Mandya

1 0 0 0
0 1 0 0 
UZ  
0 0 1 0
 
0 0 0  1

The circuit symbols of controlled Z gate and the truth table are as follows

Truth table of Controlled Z Gate


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

Toffoli Gate:

The Toffoli Gate is also known as CCNOT Gate (Controlled-Controlled-NOT Gate). 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.

1. For input |000⟩, |001⟩, |010⟩, |011⟩, |100⟩ and |101⟩ the output remains same.
2. For input |110⟩ and |111⟩ the output changes to |111⟩ and |110⟩

The Matrix representation of the Toffoli Gate is as follows

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
UT  
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

The circuit symbols of Toffoli Gate and the truth table are as follows

21
Applied Physics: (P22PHCS102/202) Unit – IV: Photonics PESCE, Mandya

Truth table of Toffoli Gate


Input Output
|000⟩ |000⟩
|001⟩ |001⟩
|010⟩ |010⟩
|011⟩ |011⟩
|100⟩ |100⟩
|101⟩ |101⟩
|110⟩ |111⟩
|111⟩ |110⟩

The Toffoli matrix is unitary matrix.

22

You might also like