Quantum Supremacy - An Introduction To Quantum Computing and Quantum Programming
Quantum Supremacy - An Introduction To Quantum Computing and Quantum Programming
Quantum Computing
and Quantum Programming
Aniruddha Chakrabarti
Megha Mathew
Introduction..........................................................................................................................................................3
Overview of quantum computing........................................................................................................................3
Why quantum computing is revolutionary and how it is different from classical computing........................3
Usage of quantum computing..............................................................................................................................4
Concepts of quantum computing.........................................................................................................................8
I. Superposition............................................................................................................................................8
II. Entanglement............................................................................................................................................8
III. Quantum Interference..........................................................................................................................9
IV. Qubit......................................................................................................................................................9
V. Quantum Measurement........................................................................................................................9
Quantum computer, quantum chips and quantum architecture....................................................................10
I. Types of quantum hardware..................................................................................................................11
II. DiVincenzo Criteria................................................................................................................................12
Quantum computing platforms, frameworks and tools...................................................................................12
Quantum programming and quantum algorithm............................................................................................12
I. Quantum Logic Gates.............................................................................................................................13
II. Quantum Circuits...................................................................................................................................14
Quantum programming examples.....................................................................................................................15
I. Single qubit programming using Q# and Microsoft Quantum Development Kit..............................15
II. Multi qubit quantum circuit using IBM Quantum Experience...........................................................16
Quantum Algorithms.........................................................................................................................................16
I. Shor’s Algorithm for Quantum Factoring............................................................................................16
II. Grover’s Algorithm for Search..............................................................................................................16
Challenges with current generation quantum computing...............................................................................17
What’s next - Quantum Supremacy..................................................................................................................17
Reference.............................................................................................................................................................18
Introduction
Quantum Computing is undoubtedly the most discussed and revolutionary technology innovation not only in
computing, but also for other areas like chemistry, particle physics and genomics. Quantum computing is not
evolutionary, but surely is a quantum leap on classical computing that is prevalent today including smart phones,
tablets and super computers.
Quantum Computing is not only relevant for education, research, chemistry and material science, but would have
profound impact on large and small enterprises across the world from financial service, security to healthcare,
drug development and chemical industry. Gartner predicts that by 2023, 20% of organizations will be budgeting
for quantum computing projects. Tech giants including Microsoft, Google, IBM, Oracle, Intel and D-Wave
Systems are investing billions of dollars on the research and development of quantum computing, which requires
completely new stack from specialized quantum hardware, quantum chip, quantum gates to quantum algorithms,
software and libraries.
Quantum Computing uses quantum mechanics principles like Superposition, Entanglement and Quantum
Interference to solve complex computational problems in a completely different way than we solve it today.
Quantum computers were conceptualised and proposed in the 1980s by famous British physicist Richard
Feynman and few other notable physicists.
Traditional Classical Computing is based on classical Quantum computing is based on the phenomenon of
Newtonian mechanics which describes the laws for large Quantum Mechanics, which describes the laws for atoms,
macroscopic objects we see around. sub atomic particles.
Based on the fact that any system could be in a single state In Quantum Computing a quantum particle could be in a
(0 or 1) at any given point of time superposition of 0 and 1 in the same time, meaning it can
hold both the states at the same time. This is the single
most difference in comparison to classical computing.
Quantum computing algorithms uses these properties like
Superposition and Entanglement to solve problems using a
drastically different approach and solve problems that are
beyond the realm of most powerful classical computers
that exist today.
Fundamental unit of Information is bit which can hold
either 0 or 1. Classical computing stores and processes bits
to achieve the desired result.
Uses CMOS transistors which are the basic building Superconducting Quantum Interference Device or SQUID
blocks for storing and processing bits of information. or Quantum Transistors are the basic building blocks of
quantum computers.
Classical Computers uses logic gates like And, Or, Not Quantum Computers uses quantum logic gates like Pauli,
gate to operate on bits. Hadamord, CNOT, CCNOT and Swap gates to operate on
qubits.
Classical computers use von Neumann architecture In quantum computers, processing is done in Quantum
(described by John von Neumann, the famous computer Processing Unit or QPU (also called Quantum Chip),
scientist) – it uses a Central Processing Unit or CPU, which consists of a number of interconnected qubits.
which consists of Arithmetic and Logic Unit (ALU), Building QPUs with large numbers is the most difficult
memory unit and a control unit to process the input and challenge. Currently there are QPUs that has 50 to 70
send output. qubits.
Traditional computers work at room temperature. Typically quantum computers currently require
temperature near absolute zero (20-30 milli Kelvin) to
operate. Researchers across the world are trying to
engineer and build quantum computers that can operate at
much higher temperature.
Uses traditional algorithms Uses algorithms built from scratch for quantum computing
like Shor’s algorithm or Grover’s algorithm
Even the fastest super computers that exists today are Have enormous processing power compared to classical
million times slower than Quantum Computers. computers and so they are tens to hundred million times
faster than classical computers.
Area Usage
Financial Modelling The finance industry aims to create the right portfolios and models which optimise
expected returns with the right investment and risk mix. Currently, most firms use
the technique of ‘Monte Carlo’ simulations are continually being run on
conventional computers, which, needless to say, consumes enormous amounts of
time. That is where quantum technology has the edge to perform humungous and
complex calculations at the highest level of accuracy in the shortest span of time.
The financial industry is worth billions of dollars. Time is money and improvement
Area Usage
in the quality of financial models with greater accuracy, predictability and quality
and will lead to an increase in returns. Algorithmic trading especially for high
volume transactions uses complex algorithms to automatically trigger share dealings
analysing the market variables. Enter Quantum Computing and these algorithms can
be executed in a matter of seconds.
AI / ML Artificial intelligence and machine learning are some of the prominent areas right
now, as the emerging technologies have penetrated almost every aspect of humans’
lives. Some of the widespread applications we see every day are in voice, image and
handwriting recognition. However, as the number of applications increased, it
becomes a challenging task for traditional computers, to match up the accuracy and
speed. And, that’s where quantum computing can help in processing through
complex problems in very less time, which would have taken traditional computers
thousand of years.
Cryptography Quantum computing can help in creating encryption methods, also known as,
quantum cryptography. Quantum cryptography, or quantum key distribution
(QKD), uses a series of photons (light particles) to transmit data from one location
to another over a fiber optic cable. By comparing measurements of the properties of
a fraction of these photons, the two endpoints can determine what the key is and if it
is safe to use. With the development of quantum computers looming on the horizon,
the integrity of encrypted data is at risk now. Fortunately, quantum cryptography,
through QKD, offers the solution we need to safeguard our information well into
the future – all based on the complex principles of quantum mechanics.
Weather Forecasting Currently, the process of analysing weather conditions by traditional computers can
sometimes take longer than the weather itself does to change. But a quantum
computer’s ability to crunch vast amounts of data, in a short period, could indeed
lead to enhancing weather system modelling allowing scientists to predict the
changing weather patterns in no time and with excellent accuracy — something
which can be essential for the current time when the world is going under a climate
change.
Drug design & discovery Designing and developing a drug is the most challenging problem in quantum
computing. Usually, drugs are being developed via the trial and error method, which
is not only very expensive but also a risky and challenging task to complete.
Researchers believe quantum computing can be an effective way of understanding
the drugs and its reactions on humans which, in turn, can save a ton of money and
time for drug companies. These advancements in computing could enhance
efficiency dramatically, by allowing companies to carry out more drug discoveries
to uncover new medical treatments for the better pharmaceutical industry.
Optimisation, planning Tapping on the power of the technology, logistics providers can optimize supply
and logistics chain processes with real-time dynamism that is not achievable by regular desktop
computers or supercomputers.
Dynamic route optimization, for instance, continues to be an issue troubling the
industry where consumer expectations of speed and cost-effectiveness reign
supreme. With quantum computing making headway, however, this could soon
improve.
The world’s first pilot project for traffic optimization — a partnership between
automaker Volkswagen and public transport provider Carris — kicked off late last
Area Usage
year in Lisbon, Portugal. Using a quantum computer, the fastest route for each of its
nine participating buses over 26 stops was individually calculated in near real-time
to help commuters avoid traffic congestion.
If fully developed, the system could be applied to any city and to vehicle fleets of
any size, which could benefit last-mile deliveries for logistics providers.
In other aspects of the supply chain, quantum computing has also been identified as
a key technology. Operational processes can be expedited by relying on the
technology’s speed and accuracy, which will maximize the simultaneous packing
capacity of parcels for freight transport worldwide.
Particle physics Giant-scale physics experiments are increasingly reliant on big data and complex
algorithms fed into powerful computers, and managing this multiplying mass of
data presents its own unique challenges.
To better prepare for this data deluge posed by next-generation upgrades and new
experiments, physicists are turning to the fledgling field of quantum computing to
find faster ways to analyze the incoming info.
The High Luminosity Large Hadron Collider (HL-LHC) Project, a planned upgrade
of the world’s largest particle accelerator at the CERN laboratory in Europe, will
come on line in 2026. It will produce billions of particle events per second – five to
seven times more data than its current maximum rate – and CERN is seeking new
approaches to rapidly and accurately analyze this data.
In these particle events, positively charged subatomic particles called protons
collide, producing sprays of other particles, including quarks and gluons, from the
energy of the collision. The interactions of particles can also cause other particles
– like the Higgs boson – to pop into existence.
Tracking the creation and precise paths (called “tracks”) of these particles as they
travel through layers of a particle detector – while excluding the unwanted mess, or
“noise” produced in these events – is key in analyzing the collision data.
The data will be like a giant 3D connect-the-dots puzzle that contains many separate
fragments, with little guidance on how to connect the dots.
To address this next-gen problem, a group of student researchers and other scientists
at the U.S. Department of Energy’s Lawrence Berkeley National Laboratory
(Berkeley Lab) have been exploring a wide range of new solutions.
One such approach is to develop and test a variety of algorithms tailored to different
types of quantum-computing systems. Their aim: Explore whether these
technologies and techniques hold promise for reconstructing these particle tracks
better and faster than conventional computers can.
Particle detectors work by detecting energy that is deposited in different layers of
the detector materials. In the analysis of detector data, researchers work to
reconstruct the trajectory of specific particles traveling through the detector array.
Computer algorithms can aid this process through pattern recognition, and particles’
properties can be detailed by connecting the dots of individual “hits” collected by
the detector and correctly identifying individual particle trajectories.
Genomics the vast complexity when attempting the link levels of analyses from genomics to
human behavior. This challenge remains in part due to interrogating the enormous
search space for determining the mapping across levels, which constitutes a many-
to-many probabilistic problem. Computational innovation will be a key effort to
Area Usage
help close these gaps. An essential initial step in genetics and genomics is the
matching of sequences of nucleotides and amino acids to reference databases, and,
more specifically, the mapping of sequencing reads from a variety of experimental
assays to genomes. The ubiquity of the sequence-matching and mapping processes,
combined with the memory- and time-intensive computational needs, make these
conceptual problems worthwhile targets of quantum computing improvements. Due
to the incredibly large search space for a match to each sequence, any solution
needs to contend with both memory (to hold a representation of the reference
database or genome and information on the mapping) and speed concerns. In the
case of genomic read mapping, elegant classical algorithms were designed in
response to the memory and speed challenges, such as the exploitation of the
Burrows-Wheeler transform to efficiently perform DNA sequence alignments40,
and the use of seed-based approaches41 to contend with mapping RNA reads to the
boundaries between exons separated by large genomic distances
Computational One of the most promising suggested applications of quantum computing is solving
Chemistry & Molecular classically intractable chemistry problems. This may help to answer unresolved
modelling
questions about phenomena such as high temperature superconductivity, solid-state
physics, transition metal catalysis, and certain biochemical reactions. In turn, this
increased understanding may help us to refine, and perhaps even one day design,
new compounds of scientific and industrial importance.
Modern biology relies increasingly on algorithms and mathematical models.
Nowadays, whenever a researcher encounters a new gene or protein, their first
action will be to query one of the ever-growing public databases of biological
information. In a matter of seconds, they will know if, for example, there is a very
similar gene with a regulatory function in a related animal model. Using these
databases and associated tools, researchers swiftly access or predict large amounts
of information to help them design their next experiment.
Using computation to solve problems such as these would pave the way towards
many new applications — from drug discovery to catalyst design.
Aerospace Physics in the aerospace industry, the range of potential applications for quantum computing
is vast. This includes speeding up aircraft design, debugging millions of lines of
software code and resolving complex computational challenges. At the same time,
quantum computing could also help assess the optimal amount of fuel and speed at
which to operate a commercial aircraft, thereby potentially helping the industry to
improve its sustainability performance.
I. Superposition
Superposition is a fundamental principle of Quantum Mechanics. It is the ability of a quantum system (which
could be an atom or a subatomic particle etc) to be in multiple state. This is completely different than a classical
system like a bit to be either in on or off state (represented as 0 or 1).
The quantum system or a qubit (quantum bit, which is the quantum equivalent of bit used in classical computers)
could be in a superposition until it’s measured. The moment it’s measured, the quantum superposition state
collapses to either 0 or 1. Superposition is also called alternately as Quantum Cohesion.
II. Entanglement
Quantum Entanglement or Entanglement is another key feature of quantum computing. Along with
Superposition, Entanglement is what distinguishes quantum computing from classical computing. Entanglement
enables two or more quantum particles to become entangled with each other, so that all of them have the same
state.
The particles could be any distance apart (even light years), but when measured they would have the same value.
This means even if the particles are light years away, measuring the state of one can reveal the state of other
entangled particles. Any operation on one of these particles would be propagated to all other quantum particles
which are entangled.
Entanglement allows achieve Teleportation, which is unthinkable in classical physics. Quantum Teleportation
allows transferring quantum information from a sender at one location to a receiver which could be thousands of
miles away.
Because of Quantum Inference any quantum computer need to have noise and error handling mechanism built in.
IV. Qubit
Just as traditional classical computers (like laptops, tablets, smart phones we use today) uses bit to store and
process information, Qubit or Quantum Bit is the quantum computing equivalent of bit. Quantum programs,
algorithms and ultimately quantum chips operate on qubit.
While a bit, or binary digit, can have value either 0 or 1, a qubit can have a value 0, 1 or a superposition of 0 and
1. Though while measured it would be either 0 or 1, and it’s probabilistic in nature.
The quantum state of qubit is typically represented in terms of two levels – |0> and |1>. Quantum states are
described in vectors notations or using popular Bra-ket notifications invented by famous physicist Wolfgang
Pauli. Qubit states are shown below using vecor and bra-ket notations -
V. Quantum Measurement
Just as traditional classical computers (like laptops, tablets, smart phones we use today) uses bit to store and
process information, Qubit or Quantum Bit is the quantum computing equivalent of bit. Quantum programs,
algorithms and ultimately quantum chips operate on qubit.
While a bit, or binary digit, can have value either 0 or 1, a qubit can have a value 0, 1 or a superposition of 0 and
1. Though while measured it would be either 0 or 1, and it’s probabilistic in nature.
These quantum chips typically need near zero kelvin (little higher than absolute zero temperature) temperature to
operate. So, the quantum computer has special hardware to create cryogenic temperature (around few milli
kelvin) using delusion refrigerator etc.
This means as of now, it is not possible to build a quantum computer which could be on your pocket, or on your
table or even in your company’s datacentre. This also means quantum computers would not replace classical
digital computers, they would extend them. Also, there are certain problems for which quantum computing could
not be used.
This means quantum computing architecture uses a hybrid architecture. Quantum chip is always used as a
Coprocessor or Adjunct processor like GPU or FPGA. The classical computer is used to control the quantum
computer, send quantum instructions and perform other digital operations, while quantum computer performs
quantum algorithms using quantum chip.
Superconducting qubits are built with superconducting In this technique, Trapped ion quantum computers
electric circuits, that operate at cryogenic temperature implement qubits using electronic states of Ions, which
using delusion refrigerator. are charged atoms.
This is the most popular technique for building This is an alternate technique to Superconducting
quantum computers and used by Google, IBM etc. qubits, and is used by IonQ
Superconducting circuits and Trapped Ion quantum Quantum annealing uses a physical process to find a
computers are highly susceptible to noise and low energy configuration that encodes the solution of
decoherence. Topological qubits technology creates a an optimization problem
more stable qubit by utilizing non-Abelian forms of
matter to store quantum information. Quantum Annealing is used by D-Wave systems and
Fujitsu.
Microsoft Quantum Computing initiative uses
Topological Qubits.
Quantum Microsoft Quantum Google Quantum IBM Q System One D-Wave 2000Q
Hardware Computer Computer system
Quantum IonQ, Honeywell, QCI and Bristlecone & IBM quantum D-Wave 2000Q and
Chip Microsoft Sycamore quantum processors Advantage quantum
processor processor
Quantum • Azure Quantum - • Cirq - open source • Qiskit – IBM’s • Ocean – open
Computing cloud quantum quantum open source, full source software
Software & computing platform computing stack quantum development kit
Tools framework software (SDK)
• Microsoft Quantum
framework in
Computing Kit • OpenFermion - • Leap - cloud based
Python
open source integrated
• Q# - DSL for Quantum
platform for • IBM Quantum development
Computing
chemistry and Experience – environment (IDE)
• Code Katas material science Online quantum
computing
• Visual Studio, Visual
playground
Studio Code IDE
There are other quantum computing platforms including Xanadu Quantum Cloud, Quantum Inspire by Qutech,
Amazon Braket and Fujitsu Digital Annealer.
Quantum Logic Gates could be divided into Single Qubit Gate and Multi Qubit Gate. Single Qubit Gates operate
on single qubits, while Multi Qubit Gates operate on two or more qubits.
X Gate / Pauli Gate • Performs a NOT Operation like classical NOT gate, meaning it
reverses the state of the qubit from |0> to |1> or |1> to |0>
• X Gate is also called Pauli X Gate after scientist Wolfgang Pauli
Identity Gate • Does not perform any operation and returns the input qubit
• Applying Identity Gates does change the state of the input.
Doubly Controlled Not • Also called Toffoli gate (after it’s inventor Tommaso Toffoli) or
Gate / CCNOT Gate Deutsch gate
• CNOT gate operates on a quantum register consisting of 3
qubits – two control qubits and a target qubit
• It flips the second qubit (the target qubit) if and only if both the
control qubits (1st & 2nd) are |1>
CX (Controlled X), CY
(Controlled Y) and CZ
(Controlled Z) Gates
Each horizontal line depicts a qubit or a qubit register. Top line is qubit register 0 and the remainder are labelled
sequentially. The diagram should be read from left to right, and top to bottom.
Quantum Gates are denoted as box, with a alphabet inside sometime. For example, denotes a
Hadamord Quantum Gates, which is applied to bring a qubit to a superposition state of |0> and |1>. After the
Qubit is initialized their value is |0>.
After the quantum gates are applies to qubit in series, measurement of those qubits are taken which is indicated
This sample program operates on a single qubit and performs these steps –
The programs outputs qubit’s value as |0> or |1> as in quantum computing state of a qubit is probabilistic.
Following quantum circuit is known as “Bell State”. An entangled state of the two qubits is made via a
Hadamord gate on the control qubit, followed by the CNOT gate. This attaches the qubits to a entangled state
known as Bell State after the physicist John Stewart Bell.
Quantum Algorithms
I. Shor’s Algorithm for Quantum Factoring
Shor’s algorithm is a quantum algorithm for integer factorization. Shor’s algorithm named after mathematician
Peter Shor, can find the prime factors of an integer in a much shorter time than it’s classical counterparts.
Inability of finding factors of sufficiently large numbers in a short time is the key principle behind RSA and
public key cryptography. With a quantum computer with sufficient no of qubits, Shor's algorithm could be used
to break public-key cryptography because of it’s blazing fast execution.
Other well-known Quantum Algorithm include Deutsch-Jozsa Algorithm, Bernstein-Vazirani Algorithm and
Quantum Fourier Transform (QFT).
• Challenge in building large quantum hardware – Most of the current generation quantum computers
need to maintain near absolutely zero temperature, which is a huge challenge. The complex circuitry,
electronics and materials required to build a quantum computer makes it one of the biggest challenges
for quantum scientists.
• Decoherence – Loss of quantum state because of influences like temperature fluctuations,
electromagnetic waves, vibrations, and other interactions with the outside environment. This causes
quantum state to be destroyed.
• Quantum error correction – Loss of quantum state because of influences like temperature fluctuations,
electromagnetic waves, vibrations, and other interactions with the outside environment. This causes
quantum state to be destroyed
• Full stack challenge – Loss of quantum state because of influences like temperature fluctuations,
electromagnetic waves, vibrations, and other interactions with the outside environment. This causes
quantum state to be destroyed
Quantum supremacy is the term used for these next generation quantum computers which can perform large
meaningful operation quickly that would take a classical computer a very long time. These quantum computers
would have a higher stability, lower noise and high performance. While some of the tech giants claim they have
reached quantum supremacy, most of the experts believe it would still take many years.
Quantum Supremacy is the future of Quantum Computing. It would make “quantum leap” in areas including
chemistry, material science, healthcare, drug development, financial services to name a few. While achieving
quantum supremacy might take another 5 to 10 years, in near future more an more organizations are using
Quantum Inspired Algorithms on traditional hardware to solve complex business problems like optimization,
AI/ML etc.
Reference
Wikipedia - Quantum Computing
D-Wave Announces General Availability of First Quantum Computer Built for Business
Wikipedia - List of Quantum Processors
Wikipedia - Quantum Logic Gates
Microsoft Quantum Initiative and Azure Quantum
Microsoft Quantum Development Kit
Google Quantum AI
Cirq
IBM Q
IBM Quantum Experience
Qiskit
D-Wave Quantum Computing
Intel Quantum Computing
Amazon Bracket
Fujitsu Quantum Computing
Rigetti Quantum Computing