0% found this document useful (0 votes)
3 views19 pages

Module 4 - Quantum Computing Updated

Quantum computing

Uploaded by

lekhan.dev7
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)
3 views19 pages

Module 4 - Quantum Computing Updated

Quantum computing

Uploaded by

lekhan.dev7
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

Quantum Physics for Engineers Sub code:25BPHY12B

MODULE-4

Quantum Computing
Introduction to Quantum Computing

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 basics. (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 classical computation. It is so powerful that a search engine
can search every part of internet in half an hour.

Moore’s law & its End

In the year 1965, Gordon Moore observed increasing performance in the first few
generations of the integratedcircuit (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. The computer industry has
followed this prediction since then. But actually the doubling was occurring in every
24 months or 2 years. The following plot shows the 50 years of Moore‟s law. The
question that arises is how long can Moore‟s law continues to hold and what are the
ultimate limitations?. According to the semiconductor size data the size has reached 5
nanometer in 2021. The Demise of the Transistor in the quantum scale could be
expected as the dimensions decrease further. Quantum effects can cascade it he micro
scale realm causing problems for current microelectronics. The most typical effects are
Electron tunneling among the circuit lines. Thus Quantum Computation is the option
for the further generation.

1
Quantum Physics for Engineers Sub code:25BPHY12B
Statement: “The number of transistors on a microchip doubles every year"

Differences Between Classical and Quantum Computing

Classical computing Quantum computing

It is large scale integrated multi- It is high speed parallel computer


purpose computer. based on quantum mechanics.

Information storage is bit based on Information storage is Quantum bit


voltage or charge etc. based on direction of an electron
spin.

Information processing is carried out by Information processing is carried out


logic gates e.g. NOT, AND, OR etc. by Quantum logic gates.

Classical computers use binary codes Quantum computers use Qubits i.e.
i.e. bits 0 or 1 to represent information. 0, 1 and both of them simultaneously
to run machines faster.

Operations are defined by Boolean Operations are defined by linear


algebra over Hilbert Space and can be
Algebra.
represented by unitary matrices with
complex elements.

2
Quantum Physics for Engineers Sub code:25BPHY12B
Circuit behaviour is governed by Circuit behavior is governed explicitly
classical physics. by quantum mechanics.

Concept of Qubit and its properties

Quantum bits, called qubits are similar to bits having two measurable states
called 0 and 1 states. Qubits can also be in a superposition state of these 0 and
1 states as shown in the figure. A qubit can be in a superposition of both 0 and
1. Qubits can be expressed in quantum mechanical states with mathematical
formula, Dirac or “brac–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 | ⟩ or | ⟩ state which is
the superposition of both | ⟩ and | ⟩ state.

This is written as, | ⟩ = α | ⟩+ β | ⟩

Where α and β called the amplitude of the states which are a complex number.

Properties of Qubits

Qubit is a basic unit in which of information in a quantum computer.


Superposition, Entanglement, and Tunneling are all special properties that
define a qubit.

i) A qubit can be in a superposed state of the two states 0 and 1.


Qubit is a superposition of both | ⟩ and | ⟩ state is given by
| ⟩ = α| ⟩+ β| ⟩.

ii) If measurements are carried out with a qubit in superposed state then the
results that we get will be probabilistic unlike how it‟s deterministic in a
classical computer.
The total probability of all the states of the quantum system must be 100%.
i.e. |α|2 + |β|2 =1 is called Normalization rule.

iii) Owing to the quantum nature, the qubit changes its state at once when
subjected to measurement. This means, one cannot copy information from
qubits the way we do in the present computers and is known as "no cloning
principle".

3
Quantum Physics for Engineers Sub code:25BPHY12B

Ex: A Qubit can be physically implemented by the two states of an electron or


horizontal and vertical polarizations of photons as | ⟩ and | ⟩.

Representation of qubit 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 | ⟩ and | ⟩ respectively. The
other locations are the superposition of | ⟩ and | ⟩ states and represented by
| ⟩ α | ⟩+ β | ⟩ 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 Bloch sphere is represented by the equation

| ⟩ = | ⟩+ | ⟩

Case i) For φ =0 and θ=0 then | ⟩ = | ⟩ which is along +z axis.

Case ii) For φ=0 and θ = 180 then | ⟩ = | ⟩ which is along -z axis.

Case iii) For φ =0 and θ= | ⟩= (| ⟩ | ⟩) which is along +X axis.


4
Quantum Physics for Engineers Sub code:25BPHY12B

Case iv) For φ =0 and θ= | ⟩ = (| ⟩ | ⟩) which is along -X axis.


Case v) For φ = and θ= | ⟩ = (| ⟩ | ⟩) which is along + Y axis.


Case vi)For φ = and θ= | ⟩ = (| ⟩ | ⟩) which is along -Y axis.


Single and Two qubits and Extension to N qubits

i) Single qubit

A Single qubit has two computational basis states | ⟩ and | ⟩. It is in general


written as by | ⟩ = α | ⟩+ β | ⟩. Such that |α| 2 + |β| 2 =1

The matrix representation of | ⟩ and | ⟩ is given by

| ⟩ ( ) | ⟩ ( )

ii) Two qubit


A two qubit system has four computational basis states denoted has | ⟩ | ⟩
| ⟩| ⟩. The two qubit state is given by | ⟩ = α | ⟩+ β | ⟩ | ⟩ | ⟩

iii) N qubit
A multi-qubit system of N qubits has 2N computational basis states. For
example a state of 3 qubits has 23 computational basis states. Thus for N-qubit
the computational basis states are denoted has | ⟩ | ⟩
| ⟩| ⟩.

Dirac Representation and Matrix Operations

Matrix representation of | ⟩ and | ⟩

The wave function could be expressed in ket notation as | ⟩ (ket Vector), ψ is


the wave function. The quantum state is given by | ⟩ | ⟩ | ⟩ and in

5
Quantum Physics for Engineers Sub code:25BPHY12B

matrix form | ⟩ ( ) The matrix form of the states | ⟩ and | ⟩ is given by

| ⟩ ( ) | ⟩ ( )

Identity Operator

The operator of type * + is called identity operator. When an identity

operator acts 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 | ⟩ and | ⟩states. As per


the principle of identity operation | ⟩ | ⟩ and | ⟩ | ⟩.

| ⟩ * +* +=* + | ⟩

| ⟩ * +* +=* + | ⟩

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

Pauli Matrices

Pauli Matrices are set of matrices. Which are very much useful in the
study of quantum computation and quantum information. The pauli matrices
are given by

* + , * + and * +

Pauli Matrices operating on | ⟩ and | ⟩ States

1. | ⟩ * +* + * + | ⟩

| ⟩ * +* +=* + | ⟩

2. | ⟩ * + * + * + | ⟩

6
Quantum Physics for Engineers Sub code:25BPHY12B

| ⟩ * +* + * + | ⟩

3. | ⟩ * + * + * + | ⟩

| ⟩ * + * + * + | ⟩

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.
 The conjugate of a complex number is found by switching the sign of the imaginary
part.
 The complex conjugate of 1 is just 1 and the complex conjugate of +i is −i.

* +

The conjugate of matrix A is

* +

Transpose of a matrix

Transpose of a matrix, switches rows with columns.

 The first row turns into the first column, second row turns into the second column.

* +

 The conjugate of matrix A is

* +

* +

7
Quantum Physics for Engineers Sub code:25BPHY12B
Unitary Matrix (U)

 A matrix U is unitary, if the matrix product of U and its conjugate transpose U †


(called U-dagger) produces the identity matrix.

UU† = U†U = I = 1

Let * +

Conjugate of U is * +

Transpose of U is * +

* +* + * +

* +* + * +

Row and Column matrix (Inner product)

 A Row matrix is a vector represented by Brac vector . |


 A Column matrix is a vector represented by ket vector |

| ⟩=* + ; Row vector | [ ] ,Where Brac vector is a complex

conjugate of ket vector.

| ⟩=[ ]

| ⟩ [ ]

Thus Brac is the complex conjugate of ket and conversely ket is the complex conjugate
of Brac.

8
Quantum Physics for Engineers Sub code:25BPHY12B
Orthogonality and Orthonormal

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.

Consider the inner product of and ⟨ | ⟩= [ ]* + [ ]

Two states | ⟩ and | ⟩ are said to be orthonormal if their inner product is one.

Mathematically ⟨ | ⟩

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

Hence the operation of Quantum Not Gate on quantum state is given by

9
Quantum Physics for Engineers Sub code:25BPHY12B

X* +=* + * +=* +

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

|0⟩ + |1⟩ X |1⟩ + |0⟩

Quantum Not Gate

Truth table of Quantum Not Gate

Input Output

| ⟩ |1⟩

|1⟩ | ⟩

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

Pauli-X,Y and Z Gates

i) Pauli X Gate

The Pauli-X Gate is nothing but Quantum Not Gate.

(Refer to quantum NOT gate)

ii) Pauli Y Gate

Pauli 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

| ⟩ * + * + * + | ⟩

| ⟩ * +* + * + | ⟩

10
Quantum Physics for Engineers Sub code:25BPHY12B
Thus the Y-Gate defines the transformation

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

Quantum Y-Gate is represented by

|0⟩ + |1⟩ Y − |0⟩ + |1⟩

Quantum Y Gate

Truth table of Quantum Y Gate

Input Output

| ⟩ |1⟩

|1⟩ - | ⟩

|0⟩ + |1⟩ |1⟩− |0⟩

iii) Pauli 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

| ⟩ * + * + * + | ⟩

| ⟩ * + * + * + | ⟩

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

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

|0⟩ + |1⟩ Z |0⟩ - |1⟩

11
Quantum Physics for Engineers Sub code:25BPHY12B
Truth table of Quantum Z Gate

Input Output

| ⟩ | ⟩

|1⟩ -|1⟩

|0⟩ + |1⟩ |0⟩ - |1⟩

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. 𝐻 †𝐻 =

|0⟩ H = √
|0⟩ + √
|1⟩

|1⟩ H = √
|0⟩ - √
|1⟩

12
Quantum Physics for Engineers Sub code:25BPHY12B

The truth-table for the Hadamard Gate is as follows.

Input Output

| ⟩ | ⟩
| ⟩

| ⟩ | ⟩
|1⟩

| ⟩ | ⟩ | ⟩ | ⟩
|0⟩ + |1⟩
√ √

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

S=* +

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

| ⟩ * + * + * + | ⟩

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

| ⟩ * + * + * + | ⟩

The transformation of state | ⟩ is given by

| ⟩= ( |0⟩ + |1⟩) = |0⟩ + |1⟩ = |0⟩ + |1⟩

The symbol of S gate is given by

|0⟩ + |1⟩ S |0⟩ + |1⟩

13
Quantum Physics for Engineers Sub code:25BPHY12B
The Truth table for S gate is as follows

Input Output

| ⟩ | ⟩

|1⟩ | ⟩

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

T -Gate / Gate

The T Gate is represented by the matrix as follows

T= [ ] [ ]

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

T| ⟩ = [ ]* +=* +=| ⟩

T| ⟩ = [ ] * +=[ ]= | ⟩

√ √

T -Gate is also called Gate is shown below

T= [ ]=[ ]

The symbolic representation of T-gate is given by

|0⟩ + |1⟩ T | ⟩

| ⟩

14
Quantum Physics for Engineers Sub code:25BPHY12B
The Truth table for T- gate is as follows

Input Output

| ⟩ | ⟩

|1⟩ √
| ⟩

|0⟩ + |1⟩ | ⟩

| ⟩

Note: Important feature of T- gate is it could be related to S gate as 𝑇 = S

Multiple Qubit Gates

Multiple Qubit Gates operates 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

The Transformation could be expressed as | , 𝐵⟩ → | , 𝐵 ⊕ ⟩

15
Quantum Physics for Engineers Sub code:25BPHY12B
Refer to the class notes for the operation of Gates on input qubits

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⟩

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.

16
Quantum Physics for Engineers Sub code:25BPHY12B
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

Refer to the class notes for the Operation of the matrix with basis states

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.

17
Quantum Physics for Engineers Sub code:25BPHY12B
Controlled Z Gate

In Controlled Z Gate, The operation of Z Gate is controlled by a Control Qubit. If the


control Qubit is | ⟩ is equal to |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 schematic circuit of controlled Z gate and the truth table are as follows

Refer to the class notes for the Operation of the matrix with basis states

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 of Toffoli Gate is given by

18
Quantum Physics for Engineers Sub code:25BPHY12B
The schematic circuit of Toffoli Gate is as follows

The truth table for Toffoli gate is as follows

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

19

You might also like