You are on page 1of 34

INTRODUCTION

TO QUANTUM
COMPUTING
Smiti Nigam, Vineet Kumar

Qiskit Fall Fest ‘23


What is Quantum Computing

• A quantum computer is a computer that takes advantage


of quantum mechanical phenomena.
• At small scales, physical matter exhibits properties of both
particles and waves, and quantum computing leverages
this behavior
• Superposition, Entanglement and Interference are the three
effects that basically provide the Quantum Advantage.
Bits and Qubits
• Bits are the basic units of • Qubits are the basic units of
information in classical computing. information in quantum computing.
• They can store only one of two • Unlike classical bits, qubits can exist
values: 0 or 1. in a superposition of multiple basic
states.
Qubits
• In contrast to classical computing, qubits are used in quantum computing to
represent the state of a system.
• In quantum theory, an object enclosed using the notation “ | > “ can be called a
state, a vector, or a ket. This is known as the dirac notation.
• Considering a 1-qubit system, 0 and 1 can be represented as and
respectively.
• Similarly, in a 2-qubit system, the states can be represented as |00>, |01>, |10> and
|11>.
Dirac Notation and Vectors
• The states 0 and 1 can also be represented as two orthogonal vectors, in row or
column form.
Tensor Product
• If we have two uncorrelated qubits, we can describe their collective state using the
tensor product (or kronecker product).
Tensor Product (cont.)
The basis states for 2-qubit system can be represented in this way:
Tensor Product (cont.)

Using the same rules, we can use the tensor


product to describe the collective state of
any number of qubits. For a three qubit
system we have:
Superposition

• The property that distinguishes a qubit from a bit is its ability to superimpose.
• That is, a bit can exist in the state |0> or |1> at a time, but a qubit can exist in both
states simultaneously, that is in a superposition state.
• This is a linear combination of the basis states |0> and |1>.

Here α,β are complex numbers.


Superposition (cont.)

For a normalised state:


= Probability of finding |ψ > in state |0>
= Probability of finding |ψ > in state |1 >
More generally, we can say that every quantum system can be represented as a
superposition of its possible states:

When we measure the state of the quantum system it collapses to one of its superposed
states with probability:

And,
For example, we can express the state of 2-qubit quantum system using 4 complex
amplitudes:

The rules of measurement and normalization work as mentioned before.


Bloch Sphere Representation
• The Bloch sphere is a 3-dimensional sphere, where
any point on the surface of the sphere represents
a unique pure state of a qubit.
• The north and south poles of the Bloch sphere
usually represent the basis states |0⟩ and |1⟩,
respectively.
• Any state can thus be represented by the following
formula:
Quantum Gates

Quantum gates are the enchanting tools of


quantum computing, choreographing qubits into
mesmerizing dances of superposition,
entanglement, and transformation.
They act on Quantum states to modify them, like the
classical gates AND and OR which operate on
classical states.
Single quBit Gates

Single-qubit gates are quantum operations acting on a single qubit, rotating its state

Some common single quBit Gates used in Quantum Computing :

❏ Pauli-X Gate: Flips the qubit's state (|0⟩ to |1⟩ and vice versa).
❏ Pauli-Y Gate: Induces a bit flip and a phase flip.
❏ Pauli-Z Gate: Introduces a phase flip.
❏ Hadamard Gate: Creates superposition and rotates states.
❏ Phase Shift Gates
❏ S Gate : Add a π/2 phase to the |1⟩ state.
❏ T Gate: Adds a π/4 phase to the |1⟩ state.
Pauli-X Gate

The Pauli-X gate is also known as the "bit-flip" gate. It flips the state of a qubit, changing |0⟩
to |1⟩ and vice versa. It's analogous to classical NOT gate

Dirac Notation of X gate


Pauli-Y Gate

The Pauli-Y gate combines a bit-flip and a phase-flip operation. It is also called the
"bit-phase" gate.

Dirac Notation of Y gate


Pauli-Z Gate

The Pauli-Z gate is often called the "phase-flip" gate because it changes the phase of the |1⟩
state.

Dirac Notation of Z gate


Hadamard Gate

The Hadamard gate, often denoted as "H," is a fundamental single-qubit quantum gate with
various important applications in quantum computing and quantum algorithms. It plays a
pivotal role in creating superposition states, a key feature of quantum computation. Here
are the main characteristics and applications of the Hadamard gate:

Dirac Notation of H gate


Phase Shift gates

The phase shift gate is a family of single qubit gates that add a phase of φ to state |1>

Some of these gates have special name

❏ S Gate : Add a π/2 phase to the |1⟩ state.


Dirac Notations
❏ T Gate: Adds a π/4 phase to the |1⟩ state.
Quantum Gates are No More than Matrices
Bloch Sphere Visualization

❖ Pauli-X Gate (X-gate) : It rotates the Bloch vector around the x-axis by 180 degrees.
❖ Pauli-Y Gate (Y-gate) : It rotates the Bloch vector around the y-axis by 180 degrees.
❖ Pauli-Z Gate (Z-gate) : It does the same around z-axis
❖ Hadamard-Gate (H) : Got two way to think
➢ Rotation by π about z=x line
➢ Rotation by π/2 around Y-axis, followed by π rotation around X-axis [ Rx(π) Ry(π/2) ]
❖ S-Gate (S) : The S-gate performs a π/2 (90-degree) counterclockwise rotation about the Bloch sphere
z-axis. It introduces a phase change without affecting the amplitude.
❖ T-Gate (T) : The T-gate performs a smaller π/4 (45-degree) counterclockwise rotation about the Bloch
sphere z-axis. It introduces a smaller phase change.

Let’s Visualize : Bloch Sphere Simulator


Multi-quBit System

A multi-quBit system is a fundamental concept in quantum computing, combining qubits to represent


complex quantum states. These systems rely on entanglement, tensor products, and quantum gates, enabling
powerful quantum algorithms with applications across diverse fields.

Let’s take a example of combining 2 qubits


All of the possible state ⟹
Details of Tensor Product

Tensor Product on Matrix Few More Tips

Reverse of a Tensor ⟹
Multiple quBit Gates

Multiple qubit gates in quantum computing manipulate entangled states, crucial for
quantum algorithms. Notable examples include CNOT and Toffoli gates, enabling
complex quantum computations.

We can combine gates using


Tensor Product

Learn More
Controlled quBit Gates

Controlled gates, like CNOT, CZ and CCX, act on target qubits based on the state of control
qubits, enabling conditional quantum operations in algorithms and error correction.

Two qubit controlled gate : CNOT & CZ

➔ CNOT ⟹ When control bit is 1 NOT is applied on


target bit
➔ CZ ⟹ When control bit is 1 Z gate is applied on
target bit

Sometimes we can also have a general two bit controlled


gate where any general U gate applied to target Representation
depending on state to control
Entangled State
Entangled quantum states are inseparable, highly correlated quantum states where the
measurement of one particle instantaneously influences the state of another, regardless of
distance. They are pivotal in quantum technologies like computing and cryptography.

An Entangled State can’t be written as Tensor Product of Two or more qubits

This can be broken down into two tensor


product : Not an entangled state

Few more Examples


Bell States : Two quBit Entanglement

Bell states are a set of four maximally entangled quantum states. They represent the
fundamental examples of quantum entanglement, enabling instantaneous correlation
between particles separated by vast distances. Bell states have essential applications in
quantum cryptography and quantum teleportation, underpinning secure quantum
communication and computing.
Toffoli Gates

The Toffoli gate is a three-qubit quantum gate that performs a controlled-XOR


operation on two target qubits based on the state of a third control qubit, essential
for reversible quantum computing.
Implementation of Toffoli Gate

Toffoli Gate Implementation


➢ These are quite difficult to implement
Best known :
Generalized Toffoli Gate

A Toffoli Gate with n-controls, need (n-1)Toffoli gates and (n-2)ancillary qubits

Implementation of n=3 Toffoli gate : Control-qubit(0,1,2) and Target-qubit(3)


More Resources
Qiskit Notebooks : Link

IBM Learning (Composer + Lab + N\B) : Link

QCG Blogs : Link

If you wish to explore more, feel free to browse through our resources, available on
our website: https://qcg.iitr.ac.in/
Thank You

Our next discussion will be on Quantum Algorithms where


we will show how to use quantum gates to modify quantum
states in order to achieve a specific goal.
Date: 21st October
Time and venue will be informed (on our insta, facebook,
slack and our website)
Insta: @qcgiitr qcg.iitr.ac.in

You might also like