0% found this document useful (0 votes)
5 views13 pages

Module-3 Quantum Computing

Uploaded by

manojbumarani
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)
5 views13 pages

Module-3 Quantum Computing

Uploaded by

manojbumarani
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

Applied Physics for CSE stream Module-3 BPHYS102/202 Applied Physics for CSE stream Module-3 BPHYS102/202

Quantum Computing Introduction


Quantum computing is a rapidly emerging technology that utilizes the laws of quantum
Principles of Quantum Information & Quantum Computing: mechanics to solve problems too complex for classical computers. It is based on the
Introduction to Quantum Computing, Moore’s law & its end, Differences between Classical principles of quantum mechanics which provides a description of the behaviour of very small,
& Quantum computing. Concept of qubit and its properties. Representation of qubit by Bloch atomic, subatomic particles. Due to the way these particles behave, operations in a quantum
sphere. Single and Two qubits. Extension to N qubits. computer can be done much faster than in traditional computers. It is a multidisciplinary field
comprising aspects of physics, mathematics computer science and electrical engineering.
Dirac representation and matrix operations:
Quantum computing has opened up opportunities across several industries and disciplines,
Matrix representation of 0 and 1 States, Identity Operator I, Applying I to|0⟩and |1⟩ states,
from pharmaceuticals, chemical engineering, and information and communications
Pauli Matrices and its operations on |0⟩and |1⟩states, Explanation of i) Conjugate of a matrix
technology to finance, automotive, and aerospace.
and ii) Transpose of a matrix. Unitary matrix U, Examples: Row and Column Matrices and
their multiplication (Inner Product), Probability, and Quantum Superposition, normalization In order to understand quantum computing and how it works, we need to understand
rule. Orthogonality, Orthonormality. Numerical Problems. Quantum bits (qubits), superposition, entanglement and quantum interference.

Quantum Gates: Quantum bits (qubits)


Single Qubit Gates: Quantum Not Gate, Pauli – X, Y and Z Gates, Hadamard Gate, Phase Quantum bits, or qubits, are the basic unit of information in quantum computing. Sort of like
Gate (or S Gate), T Gate Multiple Qubit Gates: Controlled gate, CNOT Gate, (Discussion for a traditional binary bit in traditional computing. Qubits use superposition to be in multiple
4 different input states). Representation of Swap gate, Controlled -Z gate, Toffoli gate. states at one time. Binary bits can only represent 0 or 1. Qubits can be 0 or 1, as well as any
part of 0 and 1 in superposition of both states. Qubits can be made from trapped ions,
Prerequisites: Matrices
photons, artificial or real atoms or quasiparticles.
Self-learning: Moore’s law
08 Hours Superposition
Superposition is a process in which the quantum system is capable of being in several
different states at the same time. The superposition of qubits gives quantum computers their
inherent parallelism and allowing them to process millions of operations simultaneously.
For example, consider a coin toss scenario. When you flip the coin, it ends up as heads or
tails. However, if we consider the state of the coin when it is suspended in the air, it holds
both heads and tails simultaneously. Similarly, quantum particles such as electrons are in a
state of quantum superposition until they are measured. As a result, the ‘uncertainty’ factor is
taken care of in quantum computers.

Entanglement
Quantum entanglement occurs when two systems link so closely that knowledge about one
gives you immediate knowledge about the other, no matter how far apart they are. Quantum

Department of Physics, Atria IT, Bengaluru 1 Department of Physics, Atria IT, Bengaluru 2
Applied Physics for CSE stream Module-3 BPHYS102/202 Applied Physics for CSE stream Module-3 BPHYS102/202

processors can draw conclusions about one particle by measuring another one. Entanglement capacity (RAM and flash), the improvement of sensors, and even the number and size
is the ability of qubits to correlate their state with other qubits. of pixels in digital cameras, are strongly linked to Moore's law. These ongoing changes in
For example, they can determine that if one qubit spins upward, the other will always spin digital electronics have been a driving force of technological and social change, productivity,
downward, and vice versa. Quantum entanglement allows quantum computers to solve and economic growth.
complex problems faster.
Moore's Law implies that computers, machines that run on computers, and computing power
Quantum interference all become smaller, faster, and cheaper with time, as transistors on integrated circuits
Quantum interference is a method of controlling the quantum states in a quantum machine by become more efficient.
reinforcing or diminishing the wave functions of quantum particles. As a result, quantum
There is a limit to Moore's Law, however. As transistors approach the size of a single atom,
states leading to a correct output can be amplified, while one can subsequently cancel the
their functionality begins to get compromised due to the particular behaviour of electrons at
states yielding a wrong output.
that scale. In a 2005 interview, Moore himself stated that his law “can't continue forever.”
Moore’s law and it’s end Moore’s law is ending due to physical limitations and exponentially rising costs, Moore's
In 1965, Gordon E. Moore, the co-founder of Intel, made this observation that became Law, which describes the historical increases in computing power, is likely to end this
known as Moore's Law. Gordon Moore did not call his observation "Moore's Law," nor did decade, if it hasn't already. New chip architectures and materials will be used to develop new
he set out to create a "law." Moore made that statement based on noticing emerging trends types of computing that will promote future technological gains.
in chip manufacturing at Fairchild Semiconductor corporation. Eventually, Moore's insight
Differences between classical and quantum computing
became a prediction, which in turn became the golden rule known as Moore's Law.
Classical Computing Quantum Computing
Statement – “It states that the number of transistors on a microchip doubles every two Used by large scale, multipurpose and Used by high speed, quantum mechanics-
years.” devices. based computers.
Information is stored in bits. Information is based on Quantum bits.
There is a discrete number of possible There is an infinite, continuous number of
states either 0 or 1. possible states. They are the result of
quantum superposition.
Calculations are deterministic. This means The calculations are probabilistic, meaning
repeating the same inputs results in the there are multiple possible outputs to the
same output. same inputs.
Data processing is carried out by logic and Data processing is carried out by quantum
in sequential order. logic at parallel instances.
Operations are governed by Boolean Operations are defined by linear algebra by
Algebra. Hilbert Space.
Circuit behaviour is defined by Classical Circuit behaviour is defined by quantum
Physics. mechanics.
Very robust, immune to noise event at 400 Very sensitive to noise, operates at close to
K. absolute zero temperature.
Moore's prediction has been used in the semiconductor industry to guide long-term planning
and to set targets for research and development. Advancements in digital electronics, such as
the reduction in quality-adjusted microprocessor prices, the increase in memory

Department of Physics, Atria IT, Bengaluru 3 Department of Physics, Atria IT, Bengaluru 4
Applied Physics for CSE stream Module-3 BPHYS102/202 Applied Physics for CSE stream Module-3 BPHYS102/202

Concept of qubit and its properties Because the absolute squares of the amplitudes equate to probabilities, from the theory of
The term quantum bit or qubit was first coined by Benjamin Schumacher of united states in probability α and β must satisfies the equation,
1995. A qubit is a quantum bit, the counterpart in quantum computing to the binary digit or |𝛼|2 + |𝛽|2 = 1
bit of classical computing. Just as a bit is the basic unit of information in a classical Properties of qubits
computer, a qubit is the basic unit of information in a quantum computer. Qubit = quantum • A qubit can be in a superposed state of the two states 0 and 1.
form of a bit. Qubits can present 3 main properties: i) Superposition (ability to be in a state • If measurements are carried out with a qubit in superposed state then the results that we
of 0 and 1 at the same time), ii) Entanglement (spooky action at a distance) iii) Tunnelling get will be probabilistic unlike how it’s deterministic in a classical computer.
(finite probability of a particle moving through barriers). One qubit can take the value of two • Owing to the quantum nature, the qubit changes its state at once when subjected to
bits. Two qubits can take the values of four bits. In general, n qubits can take the values of 2n. measurement. This means, one cannot copy information from qubits the way we do in the
Quantum computers use quantum bits, or qubits, to measure and extract information. present computers, as there will be no similarity between the copy and the original. This is
known as "no cloning principle".
Unlike the bits of classical computers, which can store a 1 or 0, qubits can store multiple
values at the same time. A quantum bit can also exist in superposition states, be subjected to Representation of qubit by Bloch sphere
incompatible measurements, and even be entangled with other quantum bits. Having the In quantum mechanics and computing, the Bloch sphere is a geometrical representation of
ability to harness the powers of superposition, interference and entanglement makes qubits the pure state space of a two-level quantum mechanical system (qubit), named after the
fundamentally different and much more powerful than classical bits. This theoretically gives physicist Felix Bloch.
them a huge speed advantage over classical computers and algorithms. This is the advantage
of using qubits in quantum computing. Qubits represent atoms, ions, photons or electrons and The Bloch sphere is a unit 2-sphere, with antipodal points corresponding to a pair of mutually

their respective control devices that are working together to act as computer memory and a orthogonal state vectors. The north and south poles of the Bloch sphere are typically chosen

processor. A Qubit can be physically implemented by the two states of an electron or to correspond to the standard basis vectors |0⟩ and |1⟩ respectively, which in turn might

horizontal and vertical polarizations of photons. correspond example to the spin-up and spin-down states of an electron. This choice is
arbitrary. However, the points on the surface of the sphere correspond to the pure states of the
In quantum mechanics, the general quantum state of a qubit can be represented by a linear system, whereas the interior points correspond to the mixed states. The Bloch sphere may be
superposition of its two orthonormal basis states (or basis vectors). These vectors are usually generalized to an n-level quantum system.
denoted as |0⟩ and |1⟩. They are written in the conventional “Dirac or bra-ket” notation the
|0⟩ and |1⟩ are pronounced "ket 0" and "ket 1" respectively. These two orthonormal basis The operations on qubits commonly used in quantum information processing can be

states {|0⟩, |1⟩} together called the computational basis, are said to span the two-dimensional represented on the Bloch sphere. Any unitary operation, taking an initial state to the final

linear vector (Hilbert) space of the qubit. state of the single qubit, is equivalent to a composition of one or more simple rotations on the
Bloch sphere. This Bloch sphere picture is elegant and powerful for the qubit. It helps one
A pure qubit state of a single qubit |𝜓⟩ can be described by linear combination of |0⟩ and |1⟩: visualize the superposition of quantum states in terms of the angular coordinates and the
|𝜓⟩ = 𝛼|0⟩ + 𝛽|1⟩ unitary operations on the state as rotations on the unit sphere.
Where α and β are the probability amplitudes and are both complex numbers. When we
measure this qubit in the standard basis, according to the Born rule the probability of
outcome |0⟩ with value “0” is |𝛼|2 and the probability of outcome |1⟩ with value “1” is |𝛽|2.

Department of Physics, Atria IT, Bengaluru 5 Department of Physics, Atria IT, Bengaluru 6
Applied Physics for CSE stream Module-3 BPHYS102/202 Applied Physics for CSE stream Module-3 BPHYS102/202

Extension to N qubits
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 denoted as |00 ⋯ ⋯ 00⟩, |00 ⋯ ⋯ 01⟩, |00 ⋯ ⋯ 10⟩, |00 ⋯ ⋯ 11⟩ ⋯ ⋯ ⋯ ⋯ |11 ⋯ ⋯ 11⟩.
The block diagram of representation of N qubits is as follows,

The north and south poles are used to represent the basis states |0⟩ and |1⟩ respectively, the
other locations are the superpositions of |0⟩ and |1⟩ states. Any point |𝜓⟩ on this sphere is
represented by equation,
Dirac representation and matrix operations:
|𝜓⟩ = 𝛼|0⟩ + 𝛽|1⟩
Matrix representation of 0 and 1 States
Where α and β are the probability amplitudes satisfying the condition |𝛼|2 + |𝛽|2 = 1.
For qubits the computational basis (0 and 1) is represented by two ket vectors: |0⟩ = 0 and
The Bloch sphere allows the state of the qubit to be represented by unit spherical co-
|1⟩ = 1. These vectors can be represented as column vectors,
ordinates. They are the polar angle 𝜃 and the azimuth angle 𝜙. The block sphere is
1
represented by the equation, |0⟩ = ( )
0
𝜃 𝜃
|𝜓⟩ = 𝐶𝑜𝑠 |0⟩ + 𝑒 𝑖𝜑 𝑆𝑖𝑛 |1⟩ 0
2 2 |1⟩ = ( )
1
Here 0 ≤ θ ≤ π and 0 ≤ φ ≤ 2π. The normalization condition is given by,
The quantum state |𝜓⟩ in the equation |𝜓⟩ = 𝛼|0⟩ + 𝛽|1⟩ can be written as a unit column
𝜃2 𝜃2 vector in a two-dimensional complex plane spanned by the two basis states known as normal
|𝐶𝑜𝑠 | + |𝑆𝑖𝑛 | = 1
2 2
basis. Here the vectors |0⟩ and |1⟩ are orthogonal, i.e., perpendicular to each other. A qubit
Single and Two Qubits and Extension to N qubits with states |0⟩ and |1⟩ is represented by the column vectors (10) and (01) respectively. Then
Single qubit we have,
A Single Qubit has two computational basis states |0⟩ and |1⟩. The pictorial representation of |𝜓⟩ = 𝛼|0⟩ + 𝛽|1⟩
the single qubit is as follows: 𝛼|0⟩ + 𝛽|1⟩ 1 0
|𝜓⟩ = 𝛼 ( ) + 𝛽 ( )
0 1
𝛼 0
|𝜓⟩ = ( ) + ( )
0 𝛽
𝛼
|𝜓⟩ = ( )
𝛽
Two qubit
Thus, an arbitrary qubit state is represented by the vector (𝛽𝛼).
A two-qubit system has 4 computational basis states denoted as |00⟩, |01⟩, |10⟩, |11⟩. The
pictorial representation of two qubit is as follows: 𝛼|00⟩ + 𝛽 |01⟩ + 𝛾 |10⟩ + 𝛿|11⟩
Department of Physics, Atria IT, Bengaluru 7 Department of Physics, Atria IT, Bengaluru 8
Applied Physics for CSE stream Module-3 BPHYS102/202 Applied Physics for CSE stream Module-3 BPHYS102/202

Identity Operator (I) ∴ 𝜎0 |0⟩ = |0⟩


The identity operator I is an operator, which operating on a state vector, leaves the state
unchanged. 1 0 0 0
𝜎0 |1⟩ = ( )( ) = ( )
0 1 1 1
i.e. I|𝑎⟩ = |𝑎⟩
∴ 𝜎0 |1⟩ = |1⟩
I|0⟩ = |0⟩
I|1⟩ = |1⟩ Pauli matrix 𝜎1 = 𝜎𝑥 operating on |0⟩and |1⟩ states
The Identity operator in the matrix form is given by, 0 1 1 0
𝜎𝑥 |0⟩ = ( )( ) = ( )
1 0 1 0 0 1
I=( )
0 1 ∴ 𝜎𝑥 |0⟩ = |1⟩
Let us consider the operation of Identity operator on |0⟩ and |1⟩ states,
1 0 1 1 0 1 0 1
I|0⟩ = ( )( ) = ( ) 𝜎𝑥 |1⟩ = ( )( ) = ( )
0 1 0 0 1 0 1 0
∴ I|0⟩ = |0⟩ ∴ 𝜎𝑥 |1⟩ = |0⟩

1 0 0 0
I|1⟩ = ( )( ) = ( ) Pauli matrix 𝜎2 = 𝜎𝑦 operating on |0⟩ and |1⟩ states
0 1 1 1
∴ I|1⟩ = |1⟩ 0 −𝑖 1 0 0
𝜎𝑦 |0⟩ = ( )( ) = ( ) = 𝑖( )
𝑖 0 0 𝑖 1
Thus, the operation of identity matrix(operator) on |0⟩ and |1⟩ leaves the states unchanged.
∴ 𝜎𝑦 |0⟩ = 𝑖|1⟩
Pauli matrices and its operations on |0⟩and |1⟩ states
0 −𝑖 0 −𝑖 1
The Pauli matrices are the set of three 2×2 matrices which are Hermitian and unitary. Pauli 𝜎𝑦 |1⟩ = ( ) ( ) = ( ) = −𝑖 ( )
𝑖 0 1 0 0
matrices are usually denoted by the Greek letter sigma (σ). ∴ 𝜎𝑦 |1⟩ = −𝑖|0⟩
Each Pauli matrix is Hermitian and together with the Identity matrix I (considered as the
zeroth Pauli matrix 𝜎0 ). The Pauli matrices form a basis for the real vector space of 2×2 Pauli matrix 𝜎3 = 𝜎𝑧 operating on |0⟩ and |1⟩ states
Hermitian matrices. 1 0 1 1
𝜎𝑧 |0⟩ = ( )( ) = ( )
Pauli matrices are given by, 0 −1 0 0
1 0 ∴ 𝜎𝑧 |0⟩ = |0⟩
𝜎0 = I = ( )
0 1
This is an Identity matrix. 1 0 0 0 0
𝜎𝑧 |1⟩ = ( )( ) = ( ) = −( )
0 −1 1 −1 1
0 1 ∴ 𝜎𝑧 |1⟩ = −|1⟩
𝜎1 = 𝜎𝑥 = X = ( )
1 0
0 −𝑖 Conjugate of a matrix
𝜎2 = 𝜎𝑦 = Y = ( )
𝑖 0
A conjugate matrix is a complex matrix, in which all its elements have been replaced by their
1 0
𝜎3 = 𝜎𝑧 = Z = ( )
0 −1 complex conjugates, i.e., the sign of the imaginary part of all its complex numbers have been
Pauli matrix 𝜎0 operating on |0⟩and |1⟩ states changed.
1 0 1 1 ̅
The conjugate matrix of any matrix A is denoted with a horizontal bar above it: A
𝜎0 |0⟩ = ( )( ) = ( )
0 1 0 0
For example, let A is a matrix such that,

Department of Physics, Atria IT, Bengaluru 9 Department of Physics, Atria IT, Bengaluru 10
Applied Physics for CSE stream Module-3 BPHYS102/202 Applied Physics for CSE stream Module-3 BPHYS102/202

1+𝑖 2 + 3𝑖 To transpose matrix A we just have to interchange its rows for its columns. So, the first row
A=[ ]
5 − 2𝑖 4
of the matrix becomes the first column of the matrix, and the second row of the matrix
To find the conjugate of this matrix A we find the conjugate of each element of matrix A i.e.,
becomes the second column of the matrix:
A̅ = [1−𝑖 2 − 3𝑖
]
5 + 2𝑖 4 4 5
This is the conjugate of a 2×2 matrix A. 𝐴𝑇 = [6 8]
2 1
Properties of the conjugate matrix Logically, the dimension of a matrix changes when it is transposed. In this case, matrix A
The characteristics of the conjugate matrix are as follows: was a 2×3 dimension matrix, and its transpose is a 3×2 dimension matrix.

• The conjugate of a conjugate matrix A results in the original matrix.


Properties of the transpose of a matrix
The transpose of a matrix has the following characteristics:
• Adding or subtracting two matrices A and B and conjugating is same as first conjugating
• Involutory property: The transpose of a transposed matrix A is equal to the original
the two matrices A and B separately and then adding or subtracting them.
matrix A.

• The conjugate product of two matrices A and B is equal to conjugating them separately
• Distributive property: Adding any two matrices A and B then transposing is same as
and then calculating the matrix multiplication.
transposing of each matrix first and then adding them.

• Multiplying a matrix A by a scalar k and conjugating is same as first doing the conjugates
• Multiplying two matrices A and B then transposing is equivalent to transposing each
of the scalar and the matrix and then solving the product.
matrix first and then multiplying them but changing their order of multiplication.

• Transposing a matrix A and then conjugating it is same as first conjugating the matrix and
• Transposing the result of the product of a matrix A by a scalar c is the same as multiplying
then calculating its transpose.
the already transposed matrix by the scalar.

• Calculating the inverse of a matrix A and then its conjugate is identical to first conjugate
• Inverse of a transposed matrix: Calculating the inverse of a transposed matrix A is the
the matrix and later finding its inverse.
same as first calculating its inverse and then transposing the result. Thus, if a matrix is
invertible, the transpose of that matrix is also invertible.

Transpose of a matrix • Symmetric matrix: If the transpose of a matrix A results in the same matrix, then it is
The transpose of a matrix is exchanging the rows of the matrix for its columns, i.e., the called as symmetric matrix.
transpose of a matrix is obtained by changing the rows into columns and columns into rows
for a given matrix. The transpose of a matrix is indicated by writing a “T” at the top right of • Antisymmetric matrix: If the transpose of a matrix A results in the same matrix but with
the matrix (AT). all elements changed its sign, then it is called as antisymmetric matrix, also known as
For example, let A is a matrix such that, skew-symmetric matrix.
4 6 2
𝐴=[ ]
5 8 1

Department of Physics, Atria IT, Bengaluru 11 Department of Physics, Atria IT, Bengaluru 12
Applied Physics for CSE stream Module-3 BPHYS102/202 Applied Physics for CSE stream Module-3 BPHYS102/202

The conjugate transpose of a matrix 1 1


The complex conjugate transpose of a matrix interchanges the row and column index for each U = √2 √2
1 1
element in the matrix, reflecting the elements across the main diagonal. The operation also i − i
[√2 √2 ]
negates the imaginary part of any complex numbers. It is denoted by a † symbol as a super
The conjugate transpose of U is,
script. 1 1
− 𝑖
For example, let A is a matrix such that,
U = √2
† √2
𝑖 1 1 1
A=[ ] i
0 2 − 3𝑖 [√2 √2 ]
The conjugate of a matrix is, Let us take U. U † ,
̅ = [−𝑖
A
1
] 1 1 1 1
0 2 + 3𝑖 − 𝑖
U. U = † √2 √2 × √2 √2
The conjugate transpose of a matrix is 1 1 1 1
i − i i
−𝑖 0 [√2 √2 ] [ √2 √2 ]
A† = [ ]
1 2 + 3𝑖
1 1 1 1 1 1 1 1
× + × − × i+ × i

U. U = √2 √2 √2 √2 √2 √2 √2 √2
Hermitian matrix 1 1 1 1 1 1 1 1
i× − i× − i× i− i× i
The matrix that is equal to its conjugate-transpose is called Hermitian. Thus, for any matrix A [√2 √2 √2 √2 √2 √2 √2 √2 ]
1 1 𝑖 𝑖
If A† = A then it is called Hermitian or Self-Adjoint matrix. + − +
† 2 2 2 2
For example, let A is a matrix such that, U. U = [ ]
𝑖 𝑖 𝑖2 𝑖2
− − −
4 3+𝑖 2 2 2 2
A=[ ]
3−𝑖 9 1 0
U. U † = [ ]
The conjugate of A is given by 0 1

̅=[ 4 3−𝑖 ∴ U. U † = I
A ]
3+𝑖 9
The conjugate transpose of a matrix is Properties of a unitary matrix
4 3+𝑖 The characteristics of unitary matrices are as follows:
A† = [ ]
3−𝑖 9
• Every unitary matrix is a normal matrix. Although not all normal matrices are unitary
∴ A† = A
matrices.
Unitary matrix • Unitary matrices are always square matrices.
If a matrix U is said to be unitary, the product of the matrix and the conjugate transpose of a • The identity matrix is a unitary matrix.
matrix is equal to the Identity matrix. In other words a matrix whose inverse is equal to its • The multiplication of two unitary matrices of the same order results in another unitary
conjugate transpose is known as unitary matrix. matrix.
Thus, If U is a unitary matrix then we have • The absolute value of the determinant of a unitary matrix U is always equal to 1. i.e.,

U. U = I |det (𝑈)| = 1

U. U −1 = I
For example let U is a matrix such that,

Department of Physics, Atria IT, Bengaluru 13 Department of Physics, Atria IT, Bengaluru 14
Applied Physics for CSE stream Module-3 BPHYS102/202 Applied Physics for CSE stream Module-3 BPHYS102/202

Column and Row matrices The multiplication of the |𝜓⟩ and |𝜑⟩is possible only by taking the inner product and is given
A column matrix is a vector represented by a ket vector |𝜓⟩ . A row matrix is vector by ⟨𝜓|𝜑⟩
represented by Bra vector ⟨𝜓|. 𝛼2
⟨𝜓|𝜑⟩ = [𝛼1∗ 𝛽1∗ ] [ ]
𝛽2
Let us consider a ket vector represented in the form of a column matrix
⟨𝜓|𝜑⟩ = 𝛼1∗ 𝛼2 + 𝛽1∗ 𝛽2
𝛼1
|𝜓⟩ = [𝛽 ] Thus the inner product always results in a scalar product.
1

The row matrix is represented as


Probability, quantum superposition and Normalization
⟨𝜓| = [𝛼1∗ 𝛽1∗ ]
Let us consider a quantum state or qubit |𝜓⟩ in the form of |0⟩ and |1⟩ state then we have,
Where Bra vector is a complex conjugate of a ket vector.
𝛼1∗ |𝜓⟩ = 𝛼|0⟩ + 𝛽|1⟩
|𝜓 ∗ ⟩ = [ ]
𝛽1∗ The above equation represents the quantum superposition of states |0⟩ and |1⟩.
|𝜓⟩† = [𝛼1∗ 𝛽1∗ ] 1 0 𝛼
|𝜓⟩ = 𝛼 [ ] + 𝛽 [ ] = [ ]
0 1 𝛽
|𝜓⟩† = ⟨𝜓| Thus, Bra is the complex conjugate of ket and conversely ket is the complex
Also we have, ⟨𝜓| = [𝛼 ∗ 𝛽∗]
conjugate of Bra.
Let us consider the inner product ⟨𝜓|𝜓⟩ i.e.,
Flipping between kets and bras is called "Taking the Dual". Thus, for |0⟩ state the
𝛼
corresponding ⟨0| is given by, ⟨𝜓|𝜓⟩ = [𝛼 ∗ 𝛽∗] [ ]
𝛽
1
|0⟩ = [ ] ⟨𝜓|𝜓⟩ = 𝛼 ∗ 𝛼 + 𝛽 ∗ 𝛽
0
But 𝛼 ∗ 𝛼 + 𝛽 ∗ 𝛽 = |𝛼|2 + |𝛽|2
⟨0| = [1 0]
∴ ⟨𝜓|𝜓⟩ = |𝛼|2 + |𝛽|2
Similarly for |1⟩ state we have ⟨1| is given by,
0 This can also be written as
|1⟩ = [ ] |𝜓|2 = 𝜓𝜓 ∗
1
⟨1| = [0 1] The above equation represents the probability density.
As per the principle of normalization we have,
Inner product – Multiplication of Row and Column matrices
|𝜓|2 = 𝜓𝜓 ∗ = 1
The inner product (or dot product) of two states is denoted by a bra-ket, ⟨𝜓|𝜑⟩ consisting of a
Or ⟨𝜓|𝜓⟩ = |𝛼|2 + |𝛽|2 = 1
left part ⟨𝜓| called the bra, and a right part |𝜑⟩ called the ket. The notation was introduced in
This implies that a quantum state |𝜓⟩ is normalized.
1939 by Paul Dirac and is also known as Dirac notation.
A product of two quantum states bra Psi ⟨𝜓| and ket Phi |𝜑⟩ is known as inner product. An Orthogonality
inner product is also referred as the overlap between quantum states. If two quantum states |𝜓⟩ and |𝜑⟩ are said to be orthogonal if their inner product is zero.
Let us consider two states |𝜓⟩ and |𝜑⟩ such that Mathematically it can be written as ⟨𝜓|𝜑⟩ = 0
𝛼1 Let us consider the inner product of |0⟩ and |1⟩,
|𝜓⟩ = [𝛽 ]
1
0
𝛼2 ⟨0|1⟩ = [1 0] [ ]
|𝜑⟩ = [𝛽 ] 1
2
⟨0|1⟩ = 0
We have ⟨𝜓| = [𝛼1∗ 𝛽1∗ ]

Department of Physics, Atria IT, Bengaluru 15 Department of Physics, Atria IT, Bengaluru 16
Applied Physics for CSE stream Module-3 BPHYS102/202 Applied Physics for CSE stream Module-3 BPHYS102/202

Orthonormality The quantum not gate circuit and the truth table are as shown below.
If two quantum states |𝜓⟩ and |𝜑⟩ are said to be orthonormal if,
• |𝜓⟩ and |𝜑⟩ are normalized.
• |𝜓⟩ and |𝜑⟩ are orthogonal to each other.

Quantum gates Truth table of NOT gate


In quantum computing a quantum logic gate is a basic quantum circuit operating on a small Input Output
number of qubits. A qubit is useless unless it is used to carry out a quantum calculation. The |0⟩ |1⟩
quantum calculations are achieved by performing a series of fundamental operations, known |1⟩ |0⟩
𝛼|0⟩ + 𝛽|1⟩ 𝛼|1⟩ + 𝛽|0⟩
as quantum logic gates. They are the building blocks of quantum circuits similar to the
classical logic gates in conventional digital circuits. Unlike many classical logic gates, Pauli-X, Y and Z gates
quantum logic gates are reversible. It is possible to perform quantum computing using only The Pauli X gate is same as quantum Not gate
reversible gates.
Y gate
Single qubit gates The Y gate is represented by Pauli matrix 𝜎𝑦 or Y. This gate maps |0⟩ state to 𝑖|1⟩ state and
Quantum NOT gate (X) |1⟩ state to −𝑖|0⟩ state.
In quantum computing the quantum NOT gate for qubits takes the state |0⟩ to |1⟩ and vice The matrix representation of Y Gate and its operation on |0⟩ and |1⟩ are as follows,
versa. It is analogous to the classical not gate. 0 −𝑖 1 0 0
𝑌|0⟩ = [ ] [ ] = [ ] = 𝑖[ ]
The matrix representation of quantum Not gate and its operation on |0⟩ and |1⟩ are as follows 𝑖 0 0 𝑖 1
∴ 𝑌|0⟩ = 𝑖|1⟩
is given by
0 1
X=[ ] 0 −𝑖 0 −𝑖 1
1 0 𝑌|1⟩ = [ ] [ ] = [ ] = −𝑖 [ ]
𝑖 0 1 0 0
0 1 1 0
X|0⟩ = [ ] [ ]=[ ] ∴ 𝑌|1⟩ = −𝑖|0⟩
1 0 0 1
∴ X|0⟩ = |1⟩ Thus the Y-gate defines the transformation
0 1 0 1 𝑌(𝛼|0⟩ + 𝛽|1⟩) = 𝛼𝑌|0⟩ + 𝛽𝑌|1⟩ = −𝑖𝛽|0⟩ + 𝑖𝛼|1⟩
X|1⟩ = [ ][ ] = [ ]
1 0 1 0 The quantum Y gate is represented by
∴ X|1⟩ = |0⟩

A quantum State is given by 𝛼|0⟩ + 𝛽|1⟩ and its matrix representation is given by [𝛽𝛼]. Hence

the operation of quantum Not gate on quantum state is given by


𝛼 0 1 𝛼 Truth table of Y gate
X[ ] = [ ][ ]
𝛽 1 0 𝛽
Input Output
𝛼 𝛽 |0⟩ 𝑖|1⟩
X[ ] = [ ]
𝛽 𝛼 |1⟩ −𝑖|0⟩
Thus the quantum state becomes 𝛼|1⟩ + 𝛽|0⟩ . Similarly for the input 𝛼|1⟩ + 𝛽|0⟩ the 𝛼|0⟩ + 𝛽|1⟩ −𝑖𝛽|0⟩ + 𝑖𝛼|1⟩
quantum Not gate changes the state to 𝛼|0⟩ + 𝛽|1⟩.

Department of Physics, Atria IT, Bengaluru 17 Department of Physics, Atria IT, Bengaluru 18
Applied Physics for CSE stream Module-3 BPHYS102/202 Applied Physics for CSE stream Module-3 BPHYS102/202

Z gate 1 1 1 0 1 1
𝐻|1⟩ = [ ] [ ]= [ ]
The Z-gate is represented by Pauli matrix 𝜎𝑧 or 𝑍. Z gate leaves a |0⟩ state unchanged but √2 1 −1 1 √2 −1
1
flips the sign of the |1⟩ state to −|1⟩. ∴ 𝐻|0⟩ = (|0⟩ − |1⟩) = | −⟩
√2
The matrix representation and the operation of Z-gate on |0⟩ and |1⟩ are as follows,
1 0 1 1 The circuit representation of Hadamard gate operating on |0⟩ and |1⟩ states is,
𝑍|0⟩ = [ ] [ ]=[ ]
0 −1 0 0
∴ 𝑍|0⟩ = |0⟩

1 0 0 0 0
𝑍|1⟩ = [ ] [ ] = [ ] = −[ ]
0 −1 1 −1 1
∴ 𝑍|1⟩ = −|1⟩ Truth table of Hadamard gate
Thus the Z-gate defines the transformation Input Action of Hadamard gate Output
|0⟩ 1 1 1 1 1 1 1
𝑍(𝛼|0⟩ + 𝛽|1⟩) = 𝛼𝑍|0⟩ + 𝛽𝑍|1⟩ = 𝛼|0⟩ − 𝛽|1⟩ [ ] [ ]= [ ] (|0⟩ + |1⟩) = | +⟩
√2 1 −1 0 √2 1 √2
The circuit symbol and the truth table of Z-gate are as follows. |1⟩ 1 1 1 0 1 1 1
[ ] [ ]= [ ] (|0⟩ − |1⟩) = | −⟩
√2 1 −1 1 √2 −1 √2
𝛼+𝛽 𝛼−𝛽
|0⟩ + |1⟩
𝛼|0⟩ + 𝛽|1⟩ 1 1 1 𝛼 1 𝛼+𝛽 √2 √2
[ ] [ ]= [ ]
√2 1 −1 𝛽 √2 𝛼 − 𝛽 OR
Truth table of Z gate |0⟩ + |1⟩ |0⟩ − |1⟩
𝛼 +𝛽
Input Output √2 √2
|0⟩ |0⟩
|1⟩ −|1⟩ Phase gate or S gate
𝛼|0⟩ + 𝛽|1⟩ 𝛼|0⟩ − 𝛽|1⟩ Phase gate or S gate is a quantum gate that turns a state |0⟩ into |0⟩ and state |1⟩ into 𝑖|1⟩. It
is also known as Z90 gate because it represents a 90-degree rotation around the z-axis in
Hadamard gate (H-gate)
Bloch sphere. The S gate satisfies the unitary condition 𝑆 † . 𝑆 = 𝐼
The Hadamard gate (H-gate) is a truly quantum gate and is one of the most important gate in
The matrix representation of the S gate is given by
quantum computing. The H-gate is a single-qubit operation that maps the basis state |0⟩ to
1 0
|0⟩+|1⟩ |0⟩−|1⟩ 𝑆=[ ]
and |1⟩ state to , thus creating an equal superposition of the |0⟩ and |1⟩ states. 0 𝑖
√2 √2
The operation of S gate on |0⟩ and |1⟩ states is given by,
The Hadamard gate is a self-inverse gate and satisfies unitary condition 𝐻 † . 𝐻 = 𝐼.
1 0 1 1
The matrix representation of Hadamard gate is as follows, 𝑆|0⟩ = [ ] [ ]=[ ]
0 𝑖 0 0
1 1 1 ∴ 𝑆|0⟩ = |0⟩
𝐻= [ ]
√2 1 −1
The Hadamard gate operation on |0⟩ and |1⟩ states is given by, 1 0 0 0
𝑆|1⟩ = [ ] [ ] = [ ] = 𝑖|1⟩
0 𝑖 1 𝑖
1 1 1 1 1 1
𝐻|0⟩ = [ ] [ ]= [ ] ∴ 𝑆|1⟩ = 𝑖|1⟩
√2 1 −1 0 √2 1
1 Thus, the S gate defines the transformation,
∴ 𝐻|0⟩ = (|0⟩ + |1⟩) = | +⟩
√2 𝑆(𝛼|0⟩ + 𝛽|1⟩) = 𝛼𝑆|0⟩ + 𝛽𝑆|1⟩ = 𝛼|0⟩ + 𝑖𝛽|1⟩

Department of Physics, Atria IT, Bengaluru 19 Department of Physics, Atria IT, Bengaluru 20
Applied Physics for CSE stream Module-3 BPHYS102/202 Applied Physics for CSE stream Module-3 BPHYS102/202

The circuit symbol for S gate is given by Multiple qubit gates


Multiple qubit gates operate on two or more input qubits. Usually one of them is a control
qubit.

Truth table of S gate Controlled gates


Input Output A gate with operation of kind "If 𝐴 is True then do 𝐵" is called controlled gate. The qubit |𝐴⟩
|0⟩ |0⟩
is called Control qubit and |𝐵⟩ is the Target qubit. The target qubit is altered only when the
|1⟩ 𝑖|1⟩
control qubit is |1⟩. The control qubit remains unaltered during the transformations.
𝛼|0⟩ + 𝛽|1⟩ 𝛼|0⟩ + 𝑖𝛽|1⟩

𝝅 Controlled Not gate or CNOT gate


T gate or gate
𝟖
The CNOT gate or controlled-bit-flip gate, is a quantum logic gate that is an essential
The T gate is a single qubit operation represented in the matrix form as,
1 0 component in the construction of a gate-based quantum computer. It can be used
1 0
𝑇=[ 𝑖𝜋 ] = [0 1 + 𝑖] to entangle and disentangle bell states.
0 𝑒4 √2 The circuit representation of CNOT gate is as follows
The T gate is related to S gate by the relation, S = T2
The operation of T gate on |0⟩ and |1⟩ states is given by,
1 0
1 1
𝑇|0⟩ = [0 1 + 𝑖 ] [ ] = [ ]
0 0
√2
∴ 𝑇|0⟩ = |0⟩ It is represented by a Hermitian unitary matrix,
1 0 0 0
1 0 0 0 1 0 0
𝑇|1⟩ = [0 1 + 𝑖 ] [0] = [1 + 𝑖 ] = 1 + 𝑖 [0] 𝐶𝑁𝑂𝑇 = [ ]
1 0 0 0 1
√2 √2 √2 1
0 0 1 0
1+𝑖 The transformation could be expressed as,
∴ 𝑇|1⟩ = |1⟩
√2 |𝐴, 𝐵⟩ → |𝐴, 𝐵 ⊕ 𝐴⟩
The circuit symbol for T gate is given by,
Let us consider the operations of CNOT gate on the four inputs |00⟩, |01⟩, |10⟩ 𝑎𝑛𝑑 |11⟩.

Operation of CNOT gate for input |𝟎𝟎⟩


In this operation the input to the CNOT Gate is |00⟩ and the control qubit is |0⟩. Hence no
Truth table of T gate
change in the state of target qubit |1⟩.
Input Output
|00⟩ → |00⟩
|0⟩ |0⟩
|1⟩ 𝑖𝜋 Operation of CNOT gate for input |𝟎𝟏⟩
𝑒 4 |1⟩
𝑖𝜋 In this operation the input to the CNOT Gate is |01⟩ and the control qubit is |0⟩. Hence no
𝛼|0⟩ + 𝛽|1⟩
𝛼|0⟩ + 𝛽𝑒 4 |1⟩
change in the state of target qubit |1⟩.
|00⟩ → |01⟩

Department of Physics, Atria IT, Bengaluru 21 Department of Physics, Atria IT, Bengaluru 22
Applied Physics for CSE stream Module-3 BPHYS102/202 Applied Physics for CSE stream Module-3 BPHYS102/202

Operation of CNOT gate for input |𝟏𝟎⟩ Gate Input to gate Output of gate
In this operation the input to the CNOT Gate is |10⟩ and the control qubit is |1⟩. Hence the 1 |𝑎, 𝑏⟩ |𝑎, 𝑎 ⊕ b⟩
state of target qubit flips from |0⟩ to |1⟩. 2 |𝑎, 𝑎 ⊕ b⟩ |𝑏, 𝑎 ⊕ b⟩
|10⟩ → |11⟩ 3 |𝑏, 𝑎 ⊕ b⟩ |𝑏, 𝑎⟩
Operation of CNOT gate for input |𝟏𝟏⟩
In this operation the input to the CNOT Gate is |11⟩ and the control qubit is |1⟩. Hence the Truth table of SWAP gate

state of target qubit flips from |1⟩ to |0⟩. Input Output

|11⟩ → |10⟩ |00⟩ |00⟩


|01⟩ |10⟩
Truth table of CNOT gate |10⟩ |01⟩
Input Output |11⟩ |11⟩
A B A B⊕A
|0⟩ |0⟩ |0⟩ |0⟩ Controlled Z (CZ) gate
|0⟩ |1⟩ |0⟩ |1⟩
In Controlled Z gate, the operation of Z gate is controlled by a control qubit. If the control
|1⟩ |0⟩ |1⟩ |1⟩
|1⟩ |1⟩ |1⟩ |0⟩ qubit is |𝐴⟩ = |1⟩ then only the Z gate transforms the target qubit |𝐵⟩ as per the Pauli-Z
operation. The CZ gate is a two qubit operation and is specified by a matrix as follows,
Swap gate
1 0 0 0
The SWAP gate is two-qubit operation. Expressed in basis states. The SWAP gate swaps the 0 1 0 0
𝐶𝑍 = [ ]
state of the two qubits involved in the operation. 0 0 1 0
0 0 0 −1
The matrix representation of Swap gate is as follows,
The symbolic representation of CZ gate is as follows
1 0 0 0
0 0 1 0
𝑆𝑊𝐴𝑃 = [ ]
0 1 0 0
0 0 0 1
The SWAP gate interchanges the input states say, |∅⟩ and |𝜓⟩. The schematic swap gate
circuit symbol is as follows, which is equivalent to the combined circuit of 3 CNOT gates and
the overall effect is that two input qubits are swapped at the output.

Truth table of Controlled Z gate


Input Output
|00⟩ |00⟩
|01⟩ |01⟩
|10⟩ |01⟩
The action and truth table of the swap gate is as follows. |11⟩ −|11⟩

Department of Physics, Atria IT, Bengaluru 23 Department of Physics, Atria IT, Bengaluru 24
Applied Physics for CSE stream Module-3 BPHYS102/202

Toffoli gate (CCNOT) gate


The Toffoli gate also known as CCNOT gate invented by Tommaso Toffoli is a universal
reversible logic gate which means that any classical reversible circuit can be constructed from
Toffoli gates.
It is also known as the controlled-controlled-not gate that describes the action. It has 3 bit
inputs and outputs; the first two bits are control bits which are unaffected by the action of the
Toffoli gate. The third is the target bit which is inverted if both the control bits are |1⟩ else it
remains unchanged. The Toffoli matrix is unitary. The Toffoli gate is its own inverse. It could
be used for NAND gate simulation.

The matrix representation of 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
𝑇𝑜𝑓𝑓𝑜𝑙𝑖 =
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 representation of Toffoli gate is as follows

Truth table of Toffoli gate


Input Output
|𝑎⟩ |𝑏⟩ |𝑐⟩ |𝑎′ ⟩ |𝑏 ′ ⟩ |𝑐 ′ ⟩
0 0 0 0 0 0
0 0 1 0 0 1
0 1 0 0 1 0
0 1 1 0 1 1
1 0 0 1 0 0
1 1 0 1 1 1
1 1 1 1 1 0

Department of Physics, Atria IT, Bengaluru 25

You might also like