Uploaded by Sarthak Mishra

dsf

advertisement
Quantum Computing: A Comprehensive
Overview
Sarthak Mishra
August 3, 2023
1
Contents
1 Introduction
1.1 Quantum Mechanics . . . . . . . . . . . . . . . . . . . . . . . . .
1.2 Quantum Computing . . . . . . . . . . . . . . . . . . . . . . . . .
1.3 Qubits and their properties . . . . . . . . . . . . . . . . . . . . .
4
4
4
4
2 Physics of Quantum Information Processing
5
3 Quantum Logic and Circuits
6
4 The Measurement Problem
7
5 Quantum Algorithms
5.1 Shor’s Factoring Algorithm . . . . . . . . . . . . . . . . . . . . .
5.2 Grover’s Search Algorithm . . . . . . . . . . . . . . . . . . . . . .
5.3 Quantum Simulation . . . . . . . . . . . . . . . . . . . . . . . . .
8
8
9
10
6 Quantum Error Correction
6.1 Principles of Quantum Error Correction
6.2 Quantum Codes . . . . . . . . . . . . .
6.3 Error Detection . . . . . . . . . . . . . .
6.4 Error Correction . . . . . . . . . . . . .
6.5 Challenges and Advances . . . . . . . .
6.6 Fault-Tolerant Quantum Computation .
6.7 Topological Codes . . . . . . . . . . . .
6.8 Conclusion . . . . . . . . . . . . . . . .
12
12
12
12
12
12
13
13
13
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
7 Conclusion - Midsem
13
8 Mathematics of Qubits
8.1 Superposition and Entanglement . . . .
8.2 Quantum Gates and Quantum Circuits .
8.3 Unitary Operators and Quantum Gates
8.4 Quantum Circuit Diagrams . . . . . . .
8.5 Quantum Algorithms . . . . . . . . . . .
8.6 Conclusion . . . . . . . . . . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
14
14
14
14
15
15
15
9 Mathematical Theorems
9.1 Solovay-Kitaev theorem . . . . . . .
9.1.1 Proof . . . . . . . . . . . . .
9.2 No-Cloning Theorem . . . . . . . . .
9.2.1 Proof of No-Cloning Theorem
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
15
15
16
16
16
2
.
.
.
.
.
.
.
.
10 The
10.1
10.2
10.3
10.4
Practical application
Basic Thought process . . . . . . . .
Introduction to Python . . . . . . .
Qiskit: Python Library for Quantum
Basic Qiskit Implementation . . . . .
10.4.1 Explanation . . . . . . . . . .
10.5 Deutsch-Josza algorithm . . . . . . .
10.5.1 Explaination . . . . . . . . .
11 References
. . . . . . .
. . . . . . .
Computing
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
17
17
17
17
20
20
21
22
23
3
1
1.1
Introduction
Quantum Mechanics
Quantum mechanics is a branch of physics that describes the behavior of particles at the microscopic level. It is a fundamental theory that revolutionized
our understa nding of the physical world, introducing concepts such as superposition, entanglement, and quantum uncertainty. Quantum mechanics provides
a mathematical framework to describe the behavior of particles as waves, with
probabilities determining the outcomes of measurements.
1.2
Quantum Computing
Quantum computing is an interdisciplinary field that combines principles from
quantum mechanics and computer science to harness the unique properties of
quantum systems for information processing. Classical computers use bits, represented as 0s and 1s, as the basic units of information. In contrast, quantum
computers utilize qubits, which can exist in superpositions of 0 and 1, allowing
for exponentially more information storage and processing capabilities.
1.3
Qubits and their properties
Qubits, short for quantum bits, are the quantum analogs of classical bits. Unlike
classical bits, which can only be in a definite state of 0 or 1, qubits can exist
in a superposition of both states simultaneously. This superposition property
enables quantum computers to perform multiple calculations in parallel, offering
the potential for significant speedups for certain computational problems.
In addition to superposition, another key property of qubits is entanglement.
Entanglement is a phenomenon where two or more qubits become correlated in
such a way that the state of one qubit is instantly linked to the state of the
others, regardless of the distance between them. Entanglement allows for the
creation of highly interconnected quantum systems and enables novel applications such as quantum teleportation and secure quantum communication.
Quantum computers are designed to manipulate and process qubits using
quantum gates. These gates are analogous to the logic gates used in classical
computers but operate on the principles of quantum mechanics. Quantum algorithms, such as Shor’s factoring algorithm and Grover’s search algorithm, have
demonstrated the potential of quantum computers to solve problems that are
intractable for classical computers.
While quantum computing shows great promise, it also faces significant challenges. The delicate nature of qubits makes them susceptible to noise and errors,
which can lead to computational inaccuracies. Researchers are actively working
on developing quantum error correction techniques to mitigate these issues and
improve the reliability of quantum computers.
In conclusion, quantum mechanics forms the foundation for quantum computing, a rapidly advancing field that explores the potential of quantum systems
4
for information processing. Qubits, with their ability to exist in superpositions
and be entangled, offer new possibilities for more powerful and efficient computation. Quantum computers have the potential to revolutionize various fields,
from cryptography and optimization to drug discovery and simulations, opening
up new frontiers in scientific exploration and technological advancement.
2
Physics of Quantum Information Processing
Quantum information theory is a branch of physics and computer science that
explores the fundamental principles underlying the storage, transmission, and
processing of information in quantum systems. It combines concepts from quantum mechanics and information theory to study the unique properties and capabilities of quantum information. This report provides a brief overview of the
key concepts and applications of quantum information theory.
At the core of quantum information theory is the concept of a qubit, the
quantum analog of a classical bit. Unlike classical bits, which can be either in a
state of 0 or 1, qubits can exist in superpositions of both states. This property
allows quantum systems to represent and manipulate information in ways that
are not possible with classical systems.
One of the most significant breakthroughs in quantum information theory is
quantum entanglement. Entanglement occurs when two or more qubits become
correlated in such a way that the state of one qubit is intimately connected to
the state of the others, even if they are physically separated. Entangled states
enable phenomena such as quantum teleportation and quantum cryptography,
offering new possibilities for secure communication and information processing.
Another key concept in quantum information theory is quantum superposition. This principle allows multiple qubits to exist in a coherent combination
of states simultaneously. Quantum superposition is exploited in quantum algorithms, such as Shor’s factoring algorithm and Grover’s search algorithm,
which offer exponential speedups over their classical counterparts for certain
computational tasks.
Quantum information theory also addresses the measurement process in
quantum systems. In classical information theory, measurements are non-invasive
and do not disturb the state of the system. However, in the quantum realm,
measurements generally cause the collapse of the quantum state, irreversibly
changing the system. The probabilistic nature of measurements and the resulting wavefunction collapse are essential considerations in quantum information
processing.
Quantum information theory has found applications in various fields. In
quantum computing, quantum information theory provides the foundation for
designing and analyzing quantum algorithms that leverage the unique properties of quantum systems. Quantum cryptography explores methods for secure
communication based on the principles of quantum information theory. Quantum communication protocols, such as quantum teleportation and quantum key
distribution, offer promising avenues for secure data transmission.
5
3
Quantum Logic and Circuits
Quantum gates are fundamental building blocks of quantum circuits that allow
for the manipulation and transformation of qubits, the basic units of quantum
information. Each quantum gate is represented by a mathematical matrix that
describes its operation on the quantum state. This report provides an overview
of various types of quantum gates, their names, and their corresponding mathematical matrices.
• Pauli-X Gate:
X=
0
1
1
0
The Pauli-X gate is often called the ”quantum NOT” gate. It flips the
state of a qubit, exchanging the probability amplitudes of the states 0 and
1.
• Pauli-Y Gate:
0
Y =
i
−i
0
The Pauli-Y gate rotates the state of a qubit around the y-axis of the
Bloch sphere. It introduces a phase change and a swap of the amplitudes
between 0 and 1.
• Pauli-Z Gate:
Z=
1
0
0
−1
The Pauli-Z gate applies a phase flip to the state of a qubit, multiplying
the amplitude of state 1 by -1.
• Hadamard Gate:
1
H=√
2
1
−1
1
1
The Hadamard gate creates a superposition of the states 0 and 1. It maps
the basis states to the states on the equator of the Bloch sphere.
• CNOT Gate:

1
0
CN OT = 
0
0
0
1
0
0
0
0
0
1

0
0

1
0
The CNOT gate, or controlled-NOT gate, is a two-qubit gate. It performs a NOT operation on the second qubit if the first qubit is in state 1;
otherwise, it leaves the second qubit unchanged.
6
• Toffoli Gate:

1
0

0

0
T of f oli = 
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 Toffoli gate, or controlled-controlled-NOT gate, is a three-qubit gate.
It performs a NOT operation on the third qubit if the first two qubits are
both in state 1; otherwise, it leaves the third qubit unchanged.
These are just a few examples of the numerous quantum gates used in quantum computing. Each gate has its own unique properties and plays a crucial
role in performing quantum operations and computations. Understanding these
gates is essential for designing and analyzing quantum circuits and algorithms.
4
The Measurement Problem
The quantum measurement problem is a fundamental challenge in quantum mechanics that arises when attempting to understand the process of measurement
and its relationship to the wave function collapse. According to the principles of
quantum mechanics, a particle’s properties are described by a superposition of
possible states until a measurement is made, at which point the system collapses
into one of the possible states.
This raises the question: How does the wave function collapse occur? And
why do we observe definite outcomes rather than a superposition of possibilities?
These questions have led to various interpretations and debates within the field.
One interpretation is the Copenhagen interpretation, which states that the
act of measurement causes an irreversible collapse of the wave function, randomly selecting one of the possible outcomes. However, this interpretation does
not provide a clear explanation of how the collapse occurs or what constitutes
a measurement.
Another approach is the many-worlds interpretation, proposed by Hugh Everett, which suggests that when a measurement is made, the universe splits
into multiple branches, each corresponding to a different outcome. In this interpretation, all possible outcomes exist simultaneously in different branches of
reality.
In recent years, researchers have developed techniques to address the measurement problem and investigate its implications. One such approach is quantum decoherence, which explains how the interaction of a quantum system with
its environment leads to the emergence of classical behavior. Decoherence causes
7
the system to lose its quantum properties, effectively ”measuring” itself without
requiring an external observer.
Another solution to the measurement problem is the use of quantum error
correction codes. These codes are designed to protect quantum information from
the effects of noise and decoherence, allowing for accurate measurements and
reliable quantum computations. By encoding qubits in larger quantum systems
and applying error correction techniques, researchers can mitigate the impact
of measurement errors.
Furthermore, advances in quantum information theory and quantum algorithms have provided alternative perspectives on the measurement problem.
Quantum state tomography techniques allow for the reconstruction of the quantum state of a system through repeated measurements, providing insight into
the evolution of the wave function during the measurement process.
While the quantum measurement problem remains an active area of research
and debate, the development of these techniques and interpretations has significantly enhanced our understanding and ability to address the challenges it
presents. As quantum technologies continue to advance, resolving the measurement problem and its implications will be crucial for the practical implementation of quantum devices and the realization of their full potential.
5
Quantum Algorithms
Quantum algorithms are specialized algorithms designed to be executed on
quantum computers, taking advantage of the unique properties of quantum
systems to solve specific computational problems more efficiently than classical
algorithms. In this report, we will briefly explain some of the most common
quantum algorithms, along with accompanying images to aid understanding.
5.1
Shor’s Factoring Algorithm
Shor’s factoring algorithm is a breakthrough quantum algorithm that efficiently
factors large composite numbers, a task that is believed to be computationally
infeasible for classical computers. The algorithm combines classical and quantum computations to find the prime factors of a given number. It has significant
implications for cryptography and poses a potential threat to widely used public
key encryption algorithms.
Let’s outline the key steps of Shor’s algorithm for integer factorization:
Step 1: Choose a random integer a between 2 and N − 1, where N
is the number to be factorized.
Step 2: Apply modular exponentiation to a, finding ax mod N ,
where x is an integer exponent.
Step 3: Use the Quantum Fourier Transform (QFT) to find the
period (r) of the function f (x) = ax mod N .
Step 4: Use the period r to find factors of N using classical algorithms (e.g., Euclidean algorithm).
8
Figure 1: Shor’s Factoring Algorithm
Shor’s algorithm demonstrates the power of quantum computing in tackling
computationally hard problems efficiently.
5.2
Grover’s Search Algorithm
Figure 2: Grover’s Search Algorithm
Grover’s search algorithm provides a quadratic speedup compared to classical search algorithms, making it a valuable tool for searching unstructured
databases or finding a specific item in an unsorted list. The algorithm amplifies
the amplitude of the desired solution, allowing for a faster search process. It has
applications in areas such as optimization, database search, and data analysis.
Grover’s algorithm addresses the problem of unstructured search, finding
a marked item in an unsorted database. It offers a quadratic speed-up over
classical algorithms.
Problem Statement: Given an unsorted database of N items, where one
item is marked, find the marked item with the minimum number of queries.
Grover’s Algorithm Steps:
9
PN −1
Step 1: Initialization: Start with |s⟩ = √1N x=0 |x⟩, where |x⟩ are
computational basis states.
Step 2: Oracle: Apply an oracle O that marks the solution state with a
phase flip: O|x⟩ = (−1)f (x) |x⟩, where f (x) = 1 if x is the marked item and
f (x) = 0 otherwise.
Step 3: Amplitude Amplification: Perform Grover iteration to amplify
the amplitude
√ of the marked state:
Repeat N times: Apply Hadamard transform H to |s⟩, apply the oracle
O, and then apply a reflection R about the average.
Step 4: Measurement: Measure the qubits, and the marked item will be
found with high probability.
Grover’s algorithm is optimal in terms of the number of queries requiredfor
unstructured search.
5.3
Quantum Simulation
Figure 3: Quantum Simulation
Quantum simulation algorithms aim to simulate and study the behavior of
complex quantum systems, such as chemical reactions or materials, that are
10
challenging to investigate using classical computational methods. By leveraging the inherent quantum properties of quantum computers, these algorithms
enable more accurate simulations, leading to insights in various scientific and
technological domains.
While these are just a few examples of quantum algorithms, they demonstrate the potential power of quantum computing in solving problems that are
difficult or infeasible for classical computers. As the field of quantum algorithms
continues to evolve, researchers are exploring new applications and developing
innovative techniques to harness the capabilities of quantum computers for various computational tasks.
11
6
Quantum Error Correction
Quantum error correction is a critical field within quantum computing that
addresses the challenges posed by noise and errors in quantum systems. Quantum computers are highly susceptible to environmental disturbances, such as
decoherence and other forms of interference, which can cause information loss
and computational errors. Quantum error correction techniques aim to mitigate
these effects and enhance the reliability and accuracy of quantum computations.
6.1
Principles of Quantum Error Correction
At the heart of quantum error correction lies the concept of encoding quantum
information in a larger quantum system, making it more robust against errors.
The main principles of quantum error correction include:
6.2
Quantum Codes
Quantum codes are specific encoding schemes that protect quantum information
against errors. These codes use additional qubits to encode logical qubits in a
larger quantum system, enabling the detection and correction of errors. Popular
quantum codes include the stabilizer codes, such as the well-known Steane code
and the surface code.
6.3
Error Detection
Error detection is a crucial step in quantum error correction. By using carefully designed measurement protocols, errors can be detected without directly
observing the fragile quantum information. Stabilizer codes, for instance, rely
on the measurement of stabilizer operators to identify errors in the encoded
quantum state.
6.4
Error Correction
Once errors are detected, quantum error correction techniques can be applied
to recover the original quantum information. These techniques involve applying
a series of quantum gates to the encoded qubits based on the detected errors.
By properly designing the error correction protocols, the original state can be
reconstructed, effectively mitigating the impact of errors.
6.5
Challenges and Advances
Implementing quantum error correction faces several challenges, including the
need for a large number of physical qubits to encode a single logical qubit and
the vulnerability of quantum systems to noise and decoherence. Nonetheless,
researchers have made significant advances in the field:
12
6.6
Fault-Tolerant Quantum Computation
Fault-tolerant quantum computation aims to build quantum systems capable
of performing reliable computations even in the presence of errors. Various
fault-tolerant techniques have been developed, including the threshold theorem,
which shows that error rates below a certain threshold can be tolerated with
arbitrarily low computational errors.
6.7
Topological Codes
Topological codes, such as the surface code, have gained considerable attention
due to their ability to provide high levels of error protection. These codes exploit
the properties of two-dimensional lattices and utilize the concept of topological
order to encode quantum information in a way that is resistant to local errors.
6.8
Conclusion
Quantum error correction is an essential field in quantum computing, addressing
the challenges posed by noise and errors in quantum systems. Through the use
of quantum codes, error detection, and error correction techniques, researchers
aim to enhance the reliability and accuracy of quantum computations. While
significant progress has been made, further advancements are required to realize
fault-tolerant quantum computers capable of performing complex computations
reliably.
7
Conclusion - Midsem
In conclusion, quantum computing represents a promising paradigm that has the
potential to revolutionize various fields, including cryptography, optimization,
and simulation. Although many challenges remain, the rapid progress in hardware and algorithms brings us closer to harnessing the full power of quantum
information processing.
13
8
Mathematics of Qubits
A qubit is the basic unit of quantum information, analogous to a classical bit.
However, unlike classical bits that can only be 0 or 1, qubits can exist in a
linear combination of both states, represented by the Dirac notation as |ψ⟩ =
α|0⟩ + β|1⟩, where α and β are complex amplitudes satisfying the normalization
condition |α|2 + |β|2 = 1. The probability of measuring the qubit in state |0⟩ is
|α|2 , and in state |1⟩ is |β|2 .
8.1
Superposition and Entanglement
The superposition property of qubits allows them to represent multiple states simultaneously. Suppose we have two qubits |ψ⟩ and |ϕ⟩, then their superposition
is given by the tensor product of their individual states:
 
αγ
 αδ 
α
γ

|ψ⟩ ⊗ |ϕ⟩ =
⊗
=
βγ 
β
δ
βδ
Entanglement is a unique quantum phenomenon where two or more qubits
become correlated in such a way that their states are interdependent. Entangled
qubits cannot be described independently, even when they are far apart. This
property is a key resource in quantum computing and enables exponential speedup in some algorithms.
8.2
Quantum Gates and Quantum Circuits
Quantum gates are the building blocks of quantum circuits, similar to classical
logic gates. They are represented by unitary matrices and act on qubits to
perform specific transformations. Common quantum gates include the Pauli-X,
Pauli-Y, Pauli-Z, Hadamard, CNOT, and Toffoli gates. The unitary nature of
quantum gates ensures that quantum computations are reversible.
8.3
Unitary Operators and Quantum Gates
A quantum gate can be represented as a unitary operator acting on a single
qubit or a set of qubits. A unitary operator is a complex square matrix whose
conjugate transpose is its inverse. For a single-qubit gate, the general form is:
a b
U=
c d
where |a|2 + |b|2 = |c|2 + |d|2 = 1, ensuring that the gate is both unitary and
reversible.
14
8.4
Quantum Circuit Diagrams
A quantum circuit is a sequence of quantum gates applied to a set of qubits. The
order in which the gates are applied matters, leading to quantum parallelism
and entanglement, the key features that give quantum computing its power.
Quantum circuits are represented as quantum circuit diagrams, where qubits
are represented as horizontal lines and gates as boxes acting on those lines.
8.5
Quantum Algorithms
Quantum algorithms exploit quantum parallelism to perform certain computations more efficiently than classical algorithms. One such example is Shor’s
algorithm for integer factorization, which can factorize large numbers in polynomial time, while the best-known classical algorithms require exponential time.
8.6
Conclusion
Quantum computing and information are at the forefront of cutting-edge technology, and their potential impact on various fields, including cryptography, optimization, and machine learning, is immense. This report provided a detailed
exploration of the mathematics behind quantum computing and information,
covering the foundational concepts of qubits, quantum gates, quantum circuits,
and quantum algorithms. The mathematical principles of superposition, entanglement, unitary operators, and quantum parallelism are at the core of quantum
computing’s power. Further research and development in quantum algorithms
hold great promise for the future of quantum computing.
9
9.1
Mathematical Theorems
Solovay-Kitaev theorem
The Solovay-Kitaev theorem is a significant result in quantum computing and
quantum information theory. It addresses the problem of approximating quantum gates with a sequence of universal gates. Specifically, the theorem states
that any quantum gate can be approximated to any desired precision using a
sequence of gates from a universal set, such as the set of all single-qubit gates
and the CNOT gate.
The theorem’s importance lies in its implication for quantum computation.
It allows us to efficiently approximate any quantum gate, which is crucial for
compiling quantum algorithms into physical quantum devices, considering that
exact gate operations may not be available or may be subject to noise and
imperfections.
Let G be a set of universal gates, and ε > 0 be the desired approximation
precision. The Solovay-Kitaev theorem states that for any unitary gate U on a
quantum system, there exists a sequence of gates V1 , V2 , . . . , Vk ∈ G such that
∥U − Vk . . . V2 V1 ∥ < ε,
15
where ∥ · ∥ is the operator norm.
9.1.1
Proof
To prove the Solovay-Kitaev theorem, we start with some definitions and lemmas.
Definition 1: The operator norm of a matrix A is defined as
∥A∥ = max ∥Av∥,
∥v∥=1
where ∥ · ∥ is the Euclidean norm.
Definition 2: The Lie algebra generated by a set of matrices G is denoted
as span(G) and is defined as the set of all linear combinations of products of
elements from G and their adjoints.
Lemma 1: Let H be a self-adjoint matrix, and ε > 0 be given. There exists
a unitary matrix V ∈ span(G) such that ∥H − V ∥ < ε.
Proof of Lemma 1: We can use the Baker-Campbell-Hausdorff formula to
show that any self-adjoint matrix H can be approximated by a unitary matrix
V from span(G) to any desired precision ε.
Now, we proceed to prove the main theorem.
Proof of Solovay-Kitaev Theorem: Let U be a unitary gate, and ε > 0
be given. We aim to find a sequence of gates V1 , V2 , . . . , Vk ∈ G such that
∥U − Vk . . . V2 V1 ∥ < ε.
The proof follows by recursion on the number of qubits and the approximation precision.
Base Case: For a single qubit, any unitary gate can be approximated to
any desired precision using the gates in G.
Inductive Step: Assume the theorem holds for systems with n − 1 qubits.
Let U be a unitary gate on n qubits. We can decompose U into two parts: U1
and U2 , where U1 acts on the first qubit, and U2 acts on the remaining n − 1
qubits. Since U1 is a single-qubit gate, we can approximate it using the gates
in G. By the inductive hypothesis, we can approximate U2 using a sequence of
gates from G. Thus, we can approximate U to any desired precision.
9.2
No-Cloning Theorem
The No-Cloning Theorem is a fundamental result in quantum mechanics that
states it is impossible to create an identical copy of an arbitrary unknown quantum state. In other words, there is no universal quantum copier. This theorem
has far-reaching consequences for quantum information processing, as it means
that quantum states cannot be cloned perfectly, preventing certain types of
eavesdropping in quantum communication protocols.
9.2.1
Proof of No-Cloning Theorem
To prove the No-Cloning Theorem, let’s assume that there exists a universal
quantum cloning machine C that can clone arbitrary quantum states.
16
Theorem Statement: For any arbitrary unknown quantum state |ψ⟩, there
exists another state |ϕ⟩ such that C can clone |ψ⟩ to produce two identical copies:
C(|ψ⟩ ⊗ |ϕ⟩) = |ψ⟩ ⊗ |ψ⟩.
Proof: Let’s consider two arbitrary quantum states |ψ⟩ and |ϕ⟩, where
|ψ⟩ =
̸ |ϕ⟩. We have the following:
C(|ψ⟩ ⊗ |ϕ⟩) = C(|ψ⟩ ⊗ |ϕ⟩)
= C(|ψ⟩ ⊗ |ϕ⟩ + |ψ⟩ ⊗ |ϕ⟩)
= C(|ψ⟩ ⊗ (|ϕ⟩ + |ϕ⟩))
= C(|ψ⟩ ⊗ 2|ϕ⟩)
= 2C(|ψ⟩ ⊗ |ϕ⟩).
Since C is a linear operator, this implies that C(|ψ⟩ ⊗ |ϕ⟩) = 12 C(|ψ⟩ ⊗ |ϕ⟩).
However, this is a contradiction, as |ψ⟩ ⊗ |ϕ⟩ is an arbitrary state, and C should
clone any input state. Hence, our assumption that C exists is incorrect, and we
have proved the No-Cloning Theorem.
10
10.1
The Practical application
Basic Thought process
We may wonder what is the point of discussing all these not so trivial ideas
and abstract maths and promises of a future that seems so fantasy like a utopia
perhaps where all possible computations there is and will there ever will be
solved by the manipulation of these quantum processes. Well we shall answer
that here by showing something that we can do at current generation of the
technology cycle.
10.2
Introduction to Python
First we shall take a D-tour and familiarise ourselves with Python 3 a versatile
and high level programming language that has proven itself very groundbreaking for its easy to learn and use syntax and readability while sacrificing for
some amount of performance. One big aspect of python we are interested in
is its libraries and how to implement the things we have learnt to simulate our
hypothesis.
10.3
Qiskit: Python Library for Quantum Computing
Qiskit, an open-source Python library developed by IBM Quantum, stands as
a pivotal tool in the domain of quantum computing. Its origins trace back to
2017, and since then, it has matured into a comprehensive platform, empowering
researchers and developers to explore the realm of quantum programming with
ease. One of Qiskit’s standout abilities is its versatility in handling quantum
17
Figure 4: Qiskit
circuits. Users can construct complex circuits using the QuantumCircuit class,
enabling them to manipulate quantum states, apply various quantum gates,
and measure outcomes efficiently. The library boasts a rich set of functionalities,
such as quantum algorithms, including the famous Shor’s algorithm for factoring
large numbers and Grover’s algorithm for unstructured search. This makes
Qiskit a valuable resource for exploring cutting-edge quantum algorithms that
promise to revolutionize diverse industries, from cryptography to optimization
and machine learning.
A key advantage of Qiskit is its seamless integration with quantum simulators, allowing users to run quantum programs locally without the need for quantum hardware. These simulators provide valuable insights into circuit behavior,
helping researchers fine-tune their quantum algorithms before deploying them
on real quantum processors. Qiskit also offers direct access to cloud-based quantum processors, allowing users to execute quantum circuits on IBM’s quantum
devices remotely. This ease of access to real quantum hardware is a significant
boon, facilitating experimentation and fostering a deeper understanding of the
practical challenges associated with quantum computation.
Furthermore, Qiskit provides support for quantum error correction and quantum information processing, enabling researchers to study and mitigate the
detrimental effects of noise in quantum systems. This feature is vital in quantum
computing’s nascent stages, as noise remains a significant obstacle to achieving
fault-tolerant quantum computation.
As an open-source project, Qiskit encourages collaboration and contribution
from the quantum computing community. Its active development and continuous updates ensure that it remains at the forefront of quantum programming
tools. The Qiskit community is constantly working to improve documentation,
usability, and performance, making it an ideal platform for both novices and
seasoned quantum programmers.
In conclusion, Qiskit serves as an indispensable companion for anyone venturing into quantum computing. Its versatility, ease of use, support for quantum algorithms, and integration with quantum hardware make it a powerful
toolset for quantum researchers, developers, and enthusiasts. With Qiskit’s
continued growth and the collective efforts of the quantum community, quan-
18
tum computing is steadily advancing towards transformative breakthroughs in
computational power and problem-solving capabilities.
Figure 5: IBM Quantum Circuit Composer
19
10.4
Basic Qiskit Implementation
Here we will implement a basic quantum circuit simulation.
1 # Step 1: Import necessary libraries
2 from qiskit import QuantumCircuit , transpile , Aer ,
assemble , execute
3 from qiskit . visualization import plot_histogram
4
5 # Step 2: Create a quantum circuit
6 qc = QuantumCircuit (2 , 2)
# Creating a quantum
circuit with 2 quantum and 2 classical bits
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Step 3: Quantum gates and operations
# Apply a Hadamard gate to the first qubit
qc . h (0)
# Apply a CNOT gate to create an entangled state
qc . cx (0 , 1)
# Step 4: Measurement operations
qc . measure ([0 , 1] , [0 , 1]) # Measure the qubits and
store the results in classical bits
# Step 5: Simulate and execute the quantum circuit
simulator = Aer . get_backend ( ’ qasm_simulator ’)
compiled_circuit = transpile ( qc , simulator )
qobj = assemble ( compiled_circuit )
result = execute ( qobj , simulator ) . result ()
# Step 6: Get and visualize the results
counts = result . get_counts ( qc )
print ( " Measurement results : " , counts )
plot_histogram ( counts )
10.4.1
Explanation
• Step 1: We start by importing the necessary libraries from Qiskit for
quantum circuit construction and visualization.
• Step 2: We create a quantum circuit with two quantum bits (qubits) and
two classical bits (classical registers).
• Step 3: We apply quantum gates to manipulate the qubits. In this example, we apply a Hadamard gate to the first qubit and a Controlled-NOT
(CNOT) gate between the first and second qubit to create an entangled
state.
20
• Step 4: We perform measurement operations to obtain classical information from the quantum state. The measurement results are stored in
classical bits.
• Step 5: We simulate and execute the quantum circuit using the QASM
simulator backend provided by Qiskit.
• Step 6: Finally, we get the measurement results and visualize them as a
histogram using Qiskit’s built-in plotting function.
Thus we have actually demostrated a very basic quantum circuit with simple
python code that too with an open source program.
10.5
Deutsch-Josza algorithm
The Deutsch-Josza algorithm solves a binary function f(x) that is either constant
(f(x) is the same for all x) or balanced (f(x) is 0 for half of the inputs and 1 for
the other half). The algorithm uses a single query to the oracle function f(x) to
determine whether it is constant or balanced.
1 # Step 1: Import necessary libraries
2 from qiskit import QuantumCircuit , transpile , Aer ,
assemble , execute
3 from qiskit . visualization import plot_histogram
4
5 # Step 2: Create a quantum circuit with 3 qubits (2
qubits for input and 1 for output ) and 1 classical
bit
6 qc = QuantumCircuit (3 , 1)
7
8 # Step 3: Apply Hadamard gate to all qubits
9 qc . h ( range (3) )
10
11 # Step 4: Define the Oracle function for a balanced
function
12 # For simplicity , let ’s consider a balanced function
13
14
15
16
17
18
19
20
21
22
where
qc . cx (0 ,
qc . cx (1 ,
qc . x (2)
qc . cx (2 ,
f (0) = f (1) = 1 and f (2) = f (3) = 0
3) # Oracle for f (0) = f (1) = 1
3) # Oracle for f (0) = f (1) = 1
# Oracle for f (2) = f (3) = 0
3) # Oracle for f (2) = f (3) = 0
# Step 5: Apply Hadamard gate to the input qubits
qc . h ( range (2) )
# Step 6: Measure the first qubit
qc . measure (2 , 0)
21
23
24
25
26
27
28
29
30
31
32
33
# Step 7: Simulate and execute the quantum circuit
simulator = Aer . get_backend ( ’ qasm_simulator ’)
compiled_circuit = transpile ( qc , simulator )
qobj = assemble ( compiled_circuit )
result = execute ( qobj , simulator ) . result ()
# Step 8: Get and visualize the results
counts = result . get_counts ( qc )
print ( " Measurement results : " , counts )
plot_histogram ( counts )
10.5.1
Explaination
The histogram will show the measurement results for the single output qubit.
For the example provided, you will observe an output of ’1’ with a high probability, indicating that the function is balanced.
You can experiment with different oracle functions to see how the algorithm
works for various cases of constant or balanced functions. The Deutsch-Josza
algorithm showcases the power of quantum parallelism, as it can determine the
function’s property with a single query, whereas a classical algorithm would
require multiple queries to achieve the same result.
22
11
References
1. Domain of Science YouTube Channel. Available at: https://www.youtube.com/domainofscience
2. MIT OpenCourseWare. Available at: https://ocw.mit.edu
3. Nielsen, M. A., & Chuang, I. L. (2010). Quantum Computation and Quantum Information. 10th Anniversary Edition. Cambridge University Press.
4. Google Images. Available at: https://images.google.com
5. Physics Stack Exchange. Available at: https://physics.stackexchange.com
6. ResearchGate. Available at: https://www.researchgate.net
7. IBMQuantum. Available at: https://quantumcomputing.ibm.com
8. Qiskit. Available at: https://qiskit.org
23
Download