0% found this document useful (0 votes)
61 views17 pages

M3 - Quantum Computing - 2022-23

This document provides an overview of the syllabus for a module on quantum computing. It discusses several key topics: 1) It introduces principles of quantum information and computing, including differences from classical computing such as the ability of qubits to exist in superposition states. 2) It covers matrix representations used in quantum computing and quantum gates like the Hadamard gate. 3) It explains concepts like qubits, their properties including Bloch sphere representation, and how multiple qubits can represent an exponentially large state space.

Uploaded by

latput321
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)
61 views17 pages

M3 - Quantum Computing - 2022-23

This document provides an overview of the syllabus for a module on quantum computing. It discusses several key topics: 1) It introduces principles of quantum information and computing, including differences from classical computing such as the ability of qubits to exist in superposition states. 2) It covers matrix representations used in quantum computing and quantum gates like the Hadamard gate. 3) It explains concepts like qubits, their properties including Bloch sphere representation, and how multiple qubits can represent an exponentially large state space.

Uploaded by

latput321
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
You are on page 1/ 17

Module-3

Quantum Computing
Syllabus:

Principles of Quantum Information & Quantum Computing: Introduction to Quantum


Computing, Moore’s law & its end. Classical & quantum information comparison.
Differences between classical & quantum computing. Concept of qubit and its properties,
representation of qubit by Bloch sphere, single and two qubits. Extension to N qubits.

Dirac representation and matrix operations: Matrix representation of 0 and 1 states,


Identity Operator I, applying I to|0> and |1> states to show there is no change, Pauli Matrices
and its operations on 0 and 1 states, Explanation of i) Conjugate of a matrix and ii)
Transpose of a matrix, Unitary Matrix U, Examples : Row and Column Matrices and their
multiplication (Inner Product), Probability and quantum superposition, normalisation rule,
Orthogonality and orthonormality.

Quantum Gates: Single Qubit Gates: Quantum Not Gate , Pauli X-Gate, Y-Gate and Z
Gates, Hadamard Gate , Phase Gate (or S Gate), T Gate

Multiple Qubit Gates: Controlled gate, CNOT Gate, (Discussion for 4 different input
states). Representation of Swap gate, Controlled -Z gate, Toffoli gate.

Prerequisites: Matrices

Self learning: Moore’s law

Principles of Quantum Information & Quantum Computing

Introduction to Quantum Computing


Modern computers operate according to programs that divide a task into elementary
operations, which are then carried out serially, one operation at time. Even if we persuade
two or more computers to work on different aspects of a problem at the same time, the
computing process would be slow. This is because the logic built into microprocessors is
inherently serial. Fortunately, a parallel computer that would be able to carry out many
operations at once does exist. They are called quantum computers, which work according to
the rules of quantum mechanics. The discovery that elementary particles such as protons,
neutrons and electrons can exist in two or more states at a time has made it possible in
principle to harness them as processing units in a machine that is more efficient than classical
computers.

Quantum computers can perform computational tasks such as factorizing a number or carry
out searches in database. Quantum computer networks can efficiently transmit and receive
information in unusual ways. They find immense potential in the science of cryptography
(science of maintaining secrecy and security in communication).
Moore’s law & its end:

In 1965, Gordon Moore observed that the number of transistors on a microchip doubles
every two years. This is known as Moore’s law. The computer industry has followed his
prediction throughout for 45 years. Because of this, conventional computers have increased
the speed and miniaturisation at an exponential rate. So, we might reach a stage where a
number of electrons to be small as 10 per device. Clearly there is an upper limit for the
miniaturisation. A physical device of such microscopic dimensions may not behave the same
way as a device of bigger dimensions. The present day research in the field of
nanotechnology suggests that materials behave differently at such small scales. Also,
miniaturisation will have direct impact on the progress of computing power. What this
means specifically, is that transistors in integrated circuits have become faster. The faster the
integrated circuit conducts electricity, the faster the computer operates. This means that
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. So, Moore’s law should come to an end soon. All these observations have
encouraged the development of new computing system.

Classical & quantum information comparison

The units of information processing system in classical system are bits. A bit has just two
possible states (namely, ‘0’ and ‘1’). In quantum information system the units used for
information processing are qubits. A qubit has two basic states represented by |0⟩ and |1⟩.
But it can also exist in a superposition state, which is a state other than |0⟩ or |1⟩. A single
qubit can thus encode an infinite number of classical bits. In classical information processing
the joint states of bits are changed and manipulated by means of classical logic gates.
Quantum information processing is also achieved by the operation of gates. As in the
classical case, the states of qubits making up a quantum register can be changed step by step
by the action of a number of quantum gates that constitute a universal set, where there can be
more than one possible set of universal gates.

Differences between classical & quantum computing

Classical computing Quantum computing


Quantum computers use Qubits i.e. 0, 1 and
Classical computers use binary codes i.e. bits both of them simultaneously to run machines
0 or 1 to represent information faster
Information storage is bit based on voltage or Information storage is Quantum bit based on
charge etc. direction of an electron spin
Information processing is carried out by logic Information processing is carried out by
gates e.g. NOT, AND, OR etc. Quantum logic gates
Circuit behaviour is governed by classical Circuit behaviour is governed by quantum
physics mechanics
Operations are defined by Boolean Algebra Operations are defined by linear algebra and
can be represented by unitary matrices with
complex elements
It is large scale integrated multi-purpose It is high speed parallel computer based on
computer quantum mechanics
No restrictions exist on copying or measuring Severe restrictions exist on copying and
signals measuring signals

Concept of qubit and its properties

This basic unit of information in quantum computing is called the qubit, which is short for
quantum bit. There is a fundamental difference between a classical bit and a qubit. Like a bit,
a qubit can also be in one of two states. We label these two states by |0⟩ and |1⟩. But it can
also exist in a superposition state, which is a state other than |0⟩ or |1⟩ . In other words, the
state of a qubit is a vector in a two-dimensional complex vector space. The special states |0⟩
and |1⟩ are known as computational basis states. For example if white and black colours
correspond to state |0⟩ and |1⟩ then a qubit is imagined to be to have any shade of grey.

The superposition state is a linear combination of the states |0⟩ and |1⟩. If we label this state
|𝜓⟩, a superposition state is written as

|𝜓⟩ = α|0⟩+ β|1⟩ -----------------(1)

Here α, β are complex numbers. That is, the numbers of the form z = x + iy, where i = √−1

The laws of quantum mechanics tell us that the modulus squared of α, β in the above equation
gives us the probability of finding the qubit in state|0⟩ or |1⟩. In other words,
|α|2: Tells us the probability of finding |𝜓⟩ in state |0⟩

|β|2: Tells us the probability of finding |𝜓⟩ in state |1⟩

Therefore, when we measure a qubit we get either the result 0, with probability |α|2, or the
result 1, with probability |β|2. Also, the total probability |α|2 + |β|2 = 1, according to theory of
probability. Thus, we cannot examine a qubit to determine its quantum state, that is, the
values of α and β. Instead, quantum mechanics tells us that we can only acquire much more
restricted information about the quantum state. It is because a qubit can exist in a continuum
of states between |0⟩ and |1⟩ until it is observed. So, we have to keep in mind that when a
qubit is measured, it only gives ‘0’ or ‘1’ as the measurement result – probabilistically.

For example, a qubit can be in the state


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

1 1
By comparing with equation (1) we get α = and β =
√2 √2

1
Which means |α|2= |β|2 = 2 , Therefore, the measurement gives 0 fifty percent of the time and
1 another fifty percent of the time. Hence we often return the state represented by | +⟩.

Examples for physical systems used to realize qubits:

1. Two states of an electron orbiting a single atom are as shown in Figure. In the atom
model, the electron can exist in either the ‘ground’ or ‘excited’ states, which we call
|0⟩ and |1⟩, respectively. By shining light on the atom, with appropriate energy and
for an appropriate length of time, it is possible to move the electron from the |0⟩ to
|1⟩ and vice versa. But, by reducing the time we shine the light, an electron initially in
the state |0⟩ can be moved ‘halfway’ between |0⟩ and |1⟩, into the | +⟩ state.
2. Two different polarisations of a photon.
3. Alignment of a nuclear spin in a uniform magnetic field.

If we consider a system of n qubits, the quantum state of such a system is specified by 2 n


amplitudes. For n = 500 this number is larger than the estimated number of atoms in the
Universe. Storing all these complex numbers would not be possible on any conceivable
classical computer. But it is possible in quantum computers.
Representation of a qubit by Bloch Sphere

Bloch Sphere representation of a qubit

To represent qubits geometrically, we use a three dimensional sphere of unit radius called
Bloch sphere. It provides a useful means of visualising the state of a single qubit.

A complex number 𝑍 = 𝑥 + 𝑖𝑦 can be expressed in polar form as

𝑥 = 𝑟𝑐𝑜𝑠𝜃

𝑦 = 𝑟𝑠𝑖𝑛𝜃

𝑍 = 𝑟(𝑐𝑜𝑠𝜃 + 𝑖𝑠𝑖𝑛𝜃) = 𝑟𝑒 𝑖𝜃

We know that a superposed state is represented by the equation |𝜓⟩ = α|0⟩+ β|1⟩.
Since |α|2 + |β|2 = 1, we can rewrite the superposed state as

𝜃 𝜃
|𝜓⟩ = 𝑐𝑜𝑠 ( ) |0⟩ + 𝑒 𝑖∅ 𝑠𝑖𝑛 ( ) |1⟩
2 2
Where 𝜃 and ∅ define a point on the Bloch sphere as shown in figure.

For ∅ = 0o and 𝜃 = 0, the state |𝜓⟩ corresponds to |0⟩ and is along +Z- axis.

For ∅ = 0o and 𝜃 = 180o, the state |𝜓⟩ corresponds to |1⟩ and is along -Z- axis.

When 𝜃 = 90o, the vector is in the x-y plane


1
For ∅ = 90o, |𝜓⟩ = (|0⟩+ 𝑖|1⟩), is a superposition state along + y axis.
√2

1
For ∅ = -90o, |𝜓⟩ = (|0⟩- 𝑖|1⟩), is a superposition state along - y axis.
√2

1
For ∅ = 0o, |𝜓⟩ = (|0⟩+ |1⟩), is a superposition state along + x axis.
√2
1
For ∅ = 180o, |𝜓⟩ = (|0⟩ −|1⟩), is a superposition state along - x axis.
√2

For a classical computer the states the two logical states 0 and 1 are represented by poles of
the sphere. In contrast, the state of a qubit can be represented by any point on the sphere.
Since there are infinite points on the sphere, a qubit has capacity to store more information
compared to classical bit.

Single and two qubits, extension to N qubits

Two qubits:

In case we have two classical bits the possible configurations are 00, 01, 10 and 11. Suppose
we have two qubits, they can be in one of the four computational basis states denoted by
|00⟩, |01⟩, |10⟩ and |11⟩. Similarly a pair of qubits can also exist in superposition of these
four states, so that

|𝜓⟩ = 𝛼00 |00⟩+𝛼01 |01⟩+𝛼10 |10⟩+ 𝛼11 |11⟩

These four states define various possibilities. Thus a two qubit system can store all four
numbers simultaneously. An interesting feature with two qubit system is the occurrence of
entangled states. They are known as Bell states or EPR (Einstein-Podolsky-Rosen) states.
These states enormously enhance the power of computation and communication. The Bell
state is represented by

|00⟩ + |11⟩
√2
If we measure the first qubit, then with 50% probability we obtain the result 0. The resulting
post-measurement state will be |00⟩ so measuring the second qubit will also give a result of
0.

On the other hand, if we measure the first qubit as 1 with 50% probability, then the resulting
post-measurement state will be |11⟩, so measuring the second qubit will now give a result of
1. In general for n-qubit states, there will be superposition involving 2n terms and can be
represented by
𝑛
|𝜓⟩ = ∑2𝑥=0
−1
𝑎𝑥 |𝑥⟩

Where 𝑥 within the symbol | ⟩ (this symbol is called ket) is written in the binary notation.
Thus in general a system of L qubits can store up to 2L numbers at the same time in
superposition.

Dirac representation and matrix operations:

Matrix representation of 0 and 1 states:

In quantum mechanics 0 and 1 states are represented by kets |0⟩ and |1⟩. They are given by
the column matrices
1 0
|0⟩ = [0] and |1⟩ = [1]

Identity Operator I:

1 0
The Identity Operator I is given by 𝐼 = [ ]
0 1
It is the simplest operator, and does nothing to any ket on application, ie. I|𝑢⟩ = |𝑢⟩

On applying I to |0⟩ and |1⟩ , no change occurs as shown below

1 0 1 1
[ ] [0] = [0]
0 1
1 0 0 0
[ ] [1] = [1]
0 1

Pauli Matrices and its operations on 0 and 1 states:

Pauli matrices:

These are 2 by 2 matrices, which go by a variety of notations. The matrices, and their
corresponding notations, are shown below. The Pauli matrices are very useful in the study of
quantum computation and quantum information.

1 0
𝜎0 = 𝐼 = [ ]
0 1
0 1
𝜎1 = 𝜎𝑋 = 𝑋 = [ ]
1 0
0 −𝑖
𝜎2 = 𝜎𝑌 = 𝑌 = [ ]
𝑖 0
1 0
𝜎3 = 𝜎𝑧 = 𝑍 = [ ]
0 −1
Operation of Pauli matrices on |𝟎⟩ and |𝟏⟩ basis states

We know that the basis states are given by

|0⟩ = [10] and |1⟩ = [01]

For X, we find that

0 1 1 0∗1 + 1∗0 0
X|0⟩ = [ ] [ ] =[ ] = [1] = |1⟩
1 0 0 1∗1 + 0∗0
0 1 0 0∗0 + 1∗1 1
X|1⟩ = [ ] [ 1] = [ ] = [0] = |0⟩
1 0 1∗0 + 0∗1

As noted above, since X transforms one basis state into the other, it is sometimes called the
NOT operator.
0 −𝑖 1 0∗1 − 𝑖∗0 0
Y|0⟩ = [ ] [0] = [ ] = [ 𝑖 ] = 𝑖|1⟩
𝑖 0 𝑖∗1 + 0∗0

0 −𝑖 0 0∗0 − 𝑖∗1 −𝑖
Y|1⟩ = [ ] [1] = [ ] = [ 0 ] = −𝑖|0⟩
𝑖 0 𝑖∗0 + 0∗1

And for Z, we have

1 0 1 1∗1 + 0∗0 1
Z|0⟩ = [ ] [ ] =[ ] = [0] = |0⟩
0 −1 0 0∗1 − 1∗0
1 0 0 1∗0 + 0∗1 0
Z|1⟩ = [ ] [ ] =[ ] = [−1] = −|1⟩
0 −1 1 0∗0 − 1∗1

Conjugate of a matrix:

If a matrix A consists of a complex number as elements, then the matrix obtained by the
corresponding conjugate complex elements is called the conjugate of A and is denoted by 𝐴∗

0 𝑖 0 −𝑖
If A = [ ] then 𝐴∗ = [ ]
𝑖 0 −𝑖 0
𝑖 0 −𝑖 0
If A = [ ] then 𝐴∗ = [ ]
𝑖 0 −𝑖 0
1 𝑖 1 −𝑖
If A = [ ] then 𝐴∗ = [ ]
1 𝑖 1 −𝑖
1 + 3𝑖 1+𝑖 1 − 3𝑖 1−𝑖
If A = [ ] then 𝐴∗ = [ ]
2𝑖 1 − 4𝑖 −2𝑖 1 + 4𝑖

Transpose of a matrix:

If A is a matrix of order 𝑚 × 𝑛, then a matrix of order 𝑛 × 𝑚 obtained by interchanging the


rows and columns of matrix A is called the transpose of A and is denoted by 𝐴𝑇 .

1 𝑖 1 1
If A = [ ] then 𝐴𝑇 = [ ]
1 𝑖 𝑖 𝑖
0 1 0 𝑖
If A = [ ] then 𝐴𝑇 = [ ]
𝑖 0 1 0
1 + 3𝑖 2𝑖 1 + 3𝑖 1+𝑖
If A = [ ] then 𝐴𝑇 = [ ]
1+𝑖 1 − 4𝑖 2𝑖 1 − 4𝑖
Unitary Matrix U:

A Unitary matrix is represented as U. Conjugate transpose of U is 𝑈 † (called U-dagger).

The property of Unitary matrix is 𝑈𝑈 † = I

where I is a unit matrix (a square matrix having unit elements in the principal diagonal or
leading diagonal and zero element everywhere else). Unitary operators are important because
they describe the time evolution of a quantum state.

Row and Column Matrices and their multiplication (Inner Product):

All bra vectors are row matrices

ie ⟨𝛽| = (𝛽1 𝛽2)

and all ket vectors are column matrices

𝛼
ie |𝜓⟩ = (𝛼1 ) which also means ⟨𝜓| = (𝛼1∗ 𝛼2∗ )
2

𝛼
Now, the inner product is ⟨𝛽|𝜓⟩ = (𝛽1 𝛽2) (𝛼1 ) = 𝛼1 𝛽1 + 𝛼2 𝛽2
2

For example: Wave function 𝜓⃗ = 𝑎𝑖̂ + 𝑖𝑏𝑗̂

𝑖̂ = (10) 𝑗̂ = (01)

Therefore 𝜓⃗ = 𝑎(10) + 𝑖𝑏(01) = (𝑎0) + (𝑖𝑏


0
)

𝑎
|𝜓⟩ = (𝑖𝑏) |𝜓 † ⟩ = (𝑎 − 𝑖𝑏)

𝑎
|𝜓 † ⟩|𝜓⟩ = (𝑎 − 𝑖𝑏) (𝑖𝑏 ) = 𝑎2 + 𝑏 2 -------gives probability

|𝜓 † ⟩|𝜓⟩ = ⟨𝜓|𝜓⟩ is the inner product

Orthogonality:

Condition for orthogonality:

Inner product is ⟨𝜓|∅⟩ = 0

0
For example: ⟨0| = (1 0) and |1⟩ = (1)

0
Therefore ⟨0|1⟩ = (1 0) (1) = 0 + 0= 0
Orthonormality:

If ⟨𝑎|𝑎⟩ = 1, then the vector is normalised.

If each element of a set of vectors is normalized and the elements are orthogonal with respect
to each other, we say the set is orthonormal.

For example: Consider the set {⟨0|, |1⟩}

⟨0|0⟩ = (1 0) (10) = 1 × 1 + 0 × 0 = 1 (normalized)

⟨0|1⟩ = (1 0) (01) = 1 × 0 + 0 × 1 = 0 (orthogonal)

⟨1|0⟩ = (0 1) (10) = 0 × 1 + 1 × 0 = 0 (orthogonal)

⟨1|1⟩ = (0 1) (01) = 0 × 0 + 1 × 1 = 1 (normalized)

Hence the set {⟨0|, |1⟩} is orthonormal

Quantum Gates
Single Qubit Gates

Quantum Not Gate: A quantum NOT gate for a qubit is a process that takes the state |0⟩ to
the state |1⟩ and vice-versa. It is the quantum analogue for the NOT gate. In case of
superposition, the quantum NOT gate acting linearly in the state α|0⟩+ β|1⟩ is taken to the
state α|1⟩+ β|0⟩.

A quantum NOT gate is represented in matrix form by matrix X as shown below.

0 1
𝑋=[ ]
1 0

𝛼
If the quantum state α|0⟩+ β|1⟩ is written in vector notations as [𝛽 ]

Then output from the quantum NOT gate is

𝑋 [𝛽𝛼 ] = [01 1 𝛼
0
𝛽
] [𝛽 ]=[𝛼 ] or α|1⟩+ β|0⟩

Similarly, if the input to the quantum NOT gate is α|1⟩+ β|0⟩

𝛽 1 𝛽 𝛼
Then the output becomes 𝑋[𝛼 ] = [01 0
] [𝛼 ]=[𝛽 ] or α|0⟩+ β|1⟩

Following are the figure and truth table for quantum NOT gate
Input Output
|0⟩ |1⟩
|1⟩ |0⟩
α|0⟩+ β|1⟩ α|1⟩+ β|0⟩

Pauli Z gate:

Pauli Z gate is defined as

1 0
𝑍=[ ] (Recall Pauli matrices)
0 −1
If it operates on |0⟩, we get

1 0 1 1
[ ] [0]= [0] ie Z|0⟩= |0⟩
0 −1

If it operates on |1⟩, we get

1 0 0 0
[ ] [1]= [−1] ie Z|1⟩= −|1⟩
0 −1

Thus the state α|0⟩+ β|1⟩ is transformed to α|0⟩- β|1⟩

Following are the figure and truth table for Pauli Z gate

Input Output
|0⟩ |0⟩
|1⟩ −|1⟩
α|0⟩+ β|1⟩ α|0⟩- β|1⟩

Similarly for Pauli X and Y Gates

0 1
𝑋=[ ] (Recall Pauli matrices)
1 0
0 −𝑖
𝑌=[ ]
𝑖 0
and similar kind of operation can be carried out on |0⟩ and |1⟩ as shown in the truth table
below:

Truth table for Pauli X Gate


Input Output
|0⟩ |1⟩
|1⟩ |0⟩
α|0⟩+ β|1⟩ α|1⟩+ β|0⟩

Truth table for Pauli Y Gate


Input Output
|0⟩ 𝑖|1⟩
|1⟩ −𝑖|0⟩
α|0⟩+ β|1⟩ −𝑖 β|0⟩ + 𝑖𝛼|1⟩

Hadamard Gate:

Hadamard Gate is defined as

1 1 1
𝐻= [ ]
√2 1 −1

𝛼
If the quantum state α|0⟩+ β|1⟩ is written in vector notations as [𝛽 ]

Then it is transformed due to Hadamard Gate as

𝟏 1 1 𝛼 1 𝛼+𝛽 𝛼+𝛽 𝛼−𝛽 |0⟩+|1⟩ |0⟩−|1⟩


[ ] [ ]= [ ]= |0⟩+ |1⟩ = 𝛼 +𝛽
√𝟐 1 −1 𝛽 √2 𝛼−𝛽 √2 √2 √2 √2

Therefore

If Hadamard Gate operates on |0⟩, we get

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


[ ] [0]= 1 + 0 √2 =
√𝟐 1 −1 √2 √2

If Hadamard Gate operates on |1⟩, we get

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


[ ] [1]= 0 +1 =
√2 1 −1 √2 √2 √2

Following are the figure and truth table for Hadamard gate
Input Output
|0⟩ (|0⟩ + |1⟩)
√2
|1⟩ |0⟩ − |1⟩
√2

Phase Gate (or S Gate):

The S or phase gate is defined as

1 0
𝑆=[ ]
0 𝑖
The effect of phase gate on |0⟩

1 0 1 1
[ ] [0]= [0]
0 𝑖

Hence the output is |0⟩

The effect of phase gate on |1⟩

1 0 0 0
[ ] [1]= [ 𝑖 ]
0 𝑖

Hence the output is 𝑖|1⟩

The S or phase gate transforms the state α|0⟩+ β|1⟩ as

1 0 𝛼 𝛼
[ ] [𝛽 ]= [𝑖𝛽 ]
0 𝑖

To the state α|0⟩+ 𝑖β|1⟩

Following are the figure and truth table for S or phase gate

Input Output
|0⟩ |0⟩
|1⟩ 𝑖|1⟩
α|0⟩+ β|1⟩ α|0⟩+ 𝑖 β|1⟩
T Gate:

The T Gate is defined as

1 0
𝑇=[ 𝑖𝜋 ]
0 𝑒𝑥𝑝( )
4
If the input is |0⟩, then the output is

1 0 1 1
𝑒𝑥𝑝( 4 )] [0] = [0]
[0 𝑖𝜋

i.e the state is |0⟩,

If the input is |1⟩, then the output is

1 0 0 0
[0 𝑒𝑥𝑝( )] [1]= [exp(𝑖𝜋4)]
𝑖𝜋
4

𝑖𝜋
i.e the state is 𝑒𝑥𝑝( 4 ) |1⟩,

It transforms the state α|0⟩+ β|1⟩ as

1 0 𝛼 𝛼
[0 𝑒𝑥𝑝( 4 )] [𝛽]= [βexp(𝑖𝜋4)]
𝑖𝜋

𝑖𝜋
to α|0⟩+ βexp( 4 )|1⟩

The following are the truth table and figure for a T Gate

Input Output
|0⟩ |0⟩

|1⟩ 𝑖𝜋
exp( )|1⟩
4
𝑖𝜋
α|0⟩+ β|1⟩ α|0⟩+𝛽exp( 4 )|1⟩
Multiple Qubit Gates:

Controlled gate:

A controlled gate is one in which the operation is of the kind “If A is true then B is also true”.
A is usually referred to as control qubit and B is the target qubit. If the control qubit is 0, then
the target qubit is not altered. If the control qubit is 1, then the target qubit is transformed
(inverted). However, the control qubit remains unaltered in both cases.

Controlled NOT (CNOT Gate):

The circuit of CNOT Gate control qubit A and target qubit B is shown below

where ⊕ is modulo 2 addition (Modulo 2 addition/subtraction is performed using an XOR


gate in classical computing. For ex: 0 ± 0 = 0; 0 ± 1 = 1; 1 ± 0 = 1; 1 ± 1 = 0)

This kind of Gate has two input qubits:

(a) Control qubit: It is shown by the top line in the figure


(b) Target qubit: It is shown by the bottom line in the figure

For input state |00⟩ (control qubit = 0 and target qubit = 0): Both the bits remain unaltered
and hence the output state becomes |00⟩, which is same as input state.

For input state |01⟩ (control qubit = 0 and target qubit = 1): Both the bits remain unaltered
and hence the output state becomes |01⟩, which is same as input state.

For input state |10⟩ (control qubit = 1 and target qubit = 0): The target qubit is flipped to 1.
Therefore the output state becomes |11⟩

For input state |11⟩ (control qubit = 1 and target qubit = 1): The target qubit is flipped to 0.
Therefore the output state becomes |10⟩.

Truth table for CNOT Gate

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

In general, |𝐴, 𝐵⟩ |𝐴, 𝐵 ⊕ 𝐴⟩


Swap Gate:

A Swap Gate is a quantum circuit which contains three quantum Gates

In a Swap Gate the output of the first CNOT Gate is fed as input to the second Gate and this
result is fed to the third Gate. Therefore two qubits are swapped in the final output.

In general, |𝐴, 𝐵⟩ |𝐵, 𝐴⟩

Truth table for Swap Gate

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

Controlled -Z gate:

Truth table for Controlled -Z gate

Input Output
|00⟩ |00⟩
|01⟩ |01⟩
|10⟩ |10⟩
|11⟩ −|11⟩
Toffoli Gate:

It is a reversible Gate having three inputs (a, b, c) and three output bits (a’, b’ c’). The first
two bits are control bits which remain unaffected by the action of Toffoli Gate. The third is
the target bit which is inverted if both the control bits are 1; else it does not change. The
quantum Taffolli Gate can be used to simulate irreversible classical logical Gates and ensures
that they are capable of doing any computation.
Truth table for Toffoli Gate

Input Output
a b c a’ b’ c’
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 0 1 1 0 1
1 1 0 1 1 1
1 1 1 1 1 0

NOTE:

While the basic unit of information in quantum computation is the qubit, the arena in which
quantum computation takes place is a mathematical abstraction called a vector space. It turns
out that quantum states behave mathematically in an analogous way to physical vectors—
hence the term vector space. This type of space is one that shares most basic properties that
vectors have with physical vectors— for example, a length.

You might also like