SUP Quantum Computing

Download as pdf or txt
Download as pdf or txt
You are on page 1of 83

Quantum Gates and Algorithms

Module IV (4L) - NC & SUP


Quantum gates and algorithms:
Universal set of gates, quantum circuits,
Deutsch-Jozsa algorithm, factoring,
Shor's algorithm, Grover’s Search
Algorithm
Quantum Gates and Algorithms

What is qubit
A qubit, or quantum bit, is the fundamental unit of quantum information, analogous to a classical bit in
traditional computing. Unlike a classical bit, which can be either 0 or 1, a qubit can exist in a state of
superposition, meaning it can be simultaneously in both states. This property allows qubits to perform
complex calculations more efficiently than classical bits.

Key Characteristics of Qubits:


• Superposition: A qubit can be in a linear combination of the states |0⟩ and |1⟩, represented
mathematically as:

where α and β are complex numbers that represent the probability amplitudes of the respective states.
• Entanglement: Qubits can be entangled, meaning the state of one qubit can depend on the state of
another, no matter the distance between them. This property is crucial for quantum computing and
quantum communication.
• Measurement: When a qubit is measured, it collapses to one of its basis states (|0⟩ or |1⟩) with
probabilities determined by the magnitudes of α and β.
Quantum Gates and Algorithms

Qubits can be physically realized using various systems, including photons, trapped ions,
superconducting circuits, and more. Their unique properties enable quantum algorithms and
applications that leverage the principles of quantum mechanics to achieve computational advantages
over classical systems.
How do qubits differ from classical bits
Qubits differ from classical bits in several fundamental ways, primarily due to the principles of quantum
mechanics that govern their behavior. Here are the key differences:
1. Superposition
• Qubits: A qubit can exist in a state of superposition, meaning it can represent both 0 and 1
simultaneously. Mathematically, a qubit state can be expressed as a linear combination of |0⟩ and |1⟩:

where α and β are complex numbers representing probability amplitudes.

• Classical Bits: A classical bit can only be in one of two states at a time - either 0 or 1.
Quantum Gates and Algorithms

2. Entanglement
• Qubits: Qubits can be entangled, meaning the state of one qubit is directly related to the state of another,
regardless of the distance between them. This property allows for complex correlations that are not possible
in classical systems.
• Classical Bits: Classical bits do not exhibit entanglement. The state of one bit does not affect the state of
another bit unless explicitly defined by a classical relationship.

3. Measurement
• Qubits: When a qubit is measured, it collapses to one of its basis states (|0⟩ or |1⟩) with probabilities
determined by the amplitudes α and β. This measurement process is inherently probabilistic.
• Classical Bits: The measurement of a classical bit yields a deterministic result, either 0 or 1, with no
probabilistic behavior involved.
4. Parallelism
• Qubits: Due to superposition, a quantum computer can process a vast number of possibilities
simultaneously, allowing for exponential speedup in certain computations.
• Classical Bits: Classical bits operate sequentially, meaning they process one state at a time, which limits
their computational power compared to quantum systems.
Quantum Gates and Algorithms
Quantum Superposition :
Quantum superposition is a fundamental concept in quantum mechanics that allows a quantum
system, such as a qubit, to exist in multiple states simultaneously. This property is crucial for the
power of quantum computing. Here’s an easy explanation with simple math and an example.
Basic Concept
In classical computing, a bit can be either 0 or 1. In contrast, a qubit can be in a state represented as:

• Here:∣0⟩∣0⟩ and ∣1⟩∣1⟩ are the basis states.


• α and β are complex numbers that determine the probability of the qubit being in each state when measured.
Probabilities
The probabilities of measuring the qubit in either state are given by:
Quantum Gates and Algorithms
Quantum Gates and Algorithms
Quantum Gates and Algorithms

HOW DOES THE SUPERPOSITION PRINCIPLE APPLY TO QUANTUM STATES


The superposition principle is a fundamental concept in quantum mechanics that describes how
quantum states can exist as a combination of multiple basis states simultaneously. Here's how it
applies to quantum states:
Quantum Gates and Algorithms
Quantum Gates and Algorithms
Quantum Gates and Algorithms

In summary, the superposition principle is a fundamental aspect of quantum mechanics that allows quantum
states to exist as a combination of multiple basis states simultaneously. This leads to unique phenomena like
interference and entanglement, which are essential for understanding and harnessing the power of quantum
systems.
Quantum Gates and Algorithms

BASIC QUANTUM GATES

A universal set of quantum gates is a minimal set of quantum logic gates that can be combined to
perform any possible quantum computation. Quantum gates are the basic building blocks of
quantum circuits, similar to classical logic gates in traditional computing. They manipulate qubits to
perform quantum computations.

The most common universal set consists of the


• Hadamard gate (H),
• Pauli X Gate
• Controlled-NOT gate (CNOT).
Quantum Gates and Algorithms

The Hadamard gate is a single-qubit gate that creates an equal superposition of the |0⟩ and |1⟩ states.
Here's how it works with a simple example:
Quantum Gates and Algorithms
Quantum Gates and Algorithms
Quantum Gates and Algorithms
Quantum Gates and Algorithms
Quantum Gates and Algorithms
Quantum Gates and Algorithms
Quantum Gates and Algorithms
Quantum Gates and Algorithms
Quantum Gates and Algorithms
Quantum Gates and Algorithms
Quantum Gates and Algorithms
Quantum Gates and Algorithms
Quantum Gates and Algorithms
Quantum Gates and Algorithms
Quantum Gates and Algorithms
Quantum Gates and Algorithms
Quantum Gates and Algorithms
Quantum Gates and Algorithms
Quantum Gates and Algorithms
Quantum Gates and Algorithms
Quantum Gates and Algorithms
Quantum Gates and Algorithms
Quantum Gates and Algorithms
Quantum Gates and Algorithms
Quantum Gates and Algorithms
Quantum Gates and Algorithms
Quantum Gates and Algorithms
Quantum Gates and Algorithms
Quantum Gates and Algorithms
Quantum Gates and Algorithms
Quantum Gates and Algorithms
Quantum Gates and Algorithms
Quantum Gates and Algorithms
Quantum Gates and Algorithms

Quantum circuits
Quantum circuits are fundamental components of quantum
computing, analogous to classical circuits but designed to
manipulate quantum bits (qubits). They consist of a sequence
of quantum gates and measurements that represent a quantum
program, enabling the execution of complex computations.
Visualization and Implementation
Quantum circuits can be visualized through circuit diagrams,
which represent the sequence of operations. In programming
environments like Qiskit, circuits can be constructed using
code, allowing for simulation and execution on quantum
hardware.
Quantum Gates and Algorithms

Components of Quantum Circuits


Quantum Registers: These contain qubits, which are the basic units of quantum information.
For example, a quantum register can be created to hold multiple qubits for manipulation.

Classical Registers: Used to store the results of measurements taken from the qubits.

Quantum Gates: These are unitary operators that manipulate the states of qubits. Common
gates include:
• Pauli-X: Acts as a bit-flip gate.
• Hadamard (H): Creates superposition states.
• CNOT: A two-qubit gate that entangles qubits.

Wires: These connect qubits and classical bits, illustrating the flow of information through
the circuit.

Measurement Operations: These collapse the quantum state of qubits into classical bits,
allowing the results of quantum computations to be read.
Quantum Gates and Algorithms

How do quantum circuits differ from classical circuits in


terms of gate operations

• Quantum circuits differ from classical circuits primarily in how they operate on
their respective information units qubits for quantum circuits and bits for
classical circuits.

• The fundamental differences in gate operations between quantum and classical


circuits stem from the unique properties of qubits and the principles of quantum
mechanics. Quantum circuits offer capabilities that classical circuits cannot
match, particularly in terms of parallel processing and information entanglement,
making them a powerful tool for solving complex computational problems.
Quantum Gates and Algorithms

Example: Quantum Circuit for Creating a Bell State

One of the most famous applications of quantum circuits is the creation of


entangled states, particularly the Bell state. A Bell state is a specific quantum
state of two qubits that exhibits maximum entanglement, meaning the state of
one qubit is directly related to the state of the other, regardless of the distance
between them.
Quantum Gates and Algorithms

|0⟩ ---- H ----●---- |0⟩ | |0⟩ ----------X


Quantum Gates and Algorithms
Quantum Gates and Algorithms

Deutsch-Jozsa algorithm
Quantum Gates and Algorithms
Quantum Gates and Algorithms
Quantum Gates and Algorithms
Quantum Gates and Algorithms
Quantum Gates and Algorithms
Quantum Gates and Algorithms
Quantum Gates and Algorithms
Quantum Gates and Algorithms
Quantum Gates and Algorithms
Quantum Gates and Algorithms
Quantum Gates and Algorithms
Quantum Gates and Algorithms

Shor's algorithm
Quantum Gates and Algorithms
Quantum Gates and Algorithms
Quantum Gates and Algorithms
Quantum Gates and Algorithms
Quantum Gates and Algorithms
Quantum Gates and Algorithms
Quantum Gates and Algorithms
Quantum Gates and Algorithms
Quantum Gates and Algorithms
Quantum Gates and Algorithms
Quantum Gates and Algorithms
Quantum Gates and Algorithms
Grover’s Search Algorithm
Quantum Gates and Algorithms
Quantum Gates and Algorithms
Quantum Gates and Algorithms
Quantum Gates and Algorithms
Quantum Gates and Algorithms
Quantum Gates and Algorithms

You might also like