Quantum Algorithms Foundations for Machine
Learning
Enhancing Computing with Quantum Mechanics
Dr. Sri Phani Krishna Karri
EED, NIT Andhra Pradesh
The Dawn of a New Computing Era
• The Convergence: Witnessing a paradigm shift
where Artificial Intelligence (AI) and Quantum
Computing (QC) meet.
• Why Now? Advances in both AI (complex
models, vast data) and QC (hardware progress,
algorithmic insights) are making this
intersection tangible.
• Grand Challenges: Tackling problems currently
intractable for even the most powerful classical
supercomputers.
– Drug discovery and materials science.
– Complex optimization problems in
logistics, finance.
– Enhancing machine learning capabilities.
• Transformative Potential: Quantum computing
promises to revolutionize computation, and
AI/ML is a prime area for this transformation.
• Our Goal Today: To understand the
foundational quantum concepts that could
power these future AI systems.
• A Journey of Exploration: This field is young,
dynamic, and full of opportunities for
innovation.
Lecture 1 Roadmap & Learning Objectives
● Today's Journey: What We'll Cover
a. The Quantum Realm: Basics of quantum computing (qubits,
superposition, entanglement, gates).
b. Quantum vs. Classical: Key differences and potential advantages.
c. Current Challenges: Understanding the hurdles in quantum
computing.
d. Foundational Quantum Algorithms: A peek into how quantum
computers "think."
e. Essential Physics & Math: Core concepts needed for
understanding.
f. Introduction to Quantum Machine Learning (QML): Setting the
stage.
g. AI for Quantum Computing: The synergistic relationship.
● Learning Objectives: By the end of this session, you should be able to:
a. Describe a qubit and the concepts of superposition and
entanglement.
b. Explain the basic model of quantum computation (circuits and gates).
c. Outline potential advantages and current challenges of quantum
computing.
d. Recognize key quantum algorithmic principles.
e. Appreciate how AI and QC can mutually benefit each other.
What is Computing? Classical vs. Quantum Perspective
● Computing at its Core: The process of taking input information, applying a set
of rules or operations (an algorithm), and producing output information.
● Classical Computing Paradigm:
○ Based on classical physics (Newtonian mechanics, electromagnetism).
○ Information encoded in bits (0 or 1, definite states).
○ Operations performed by logic gates (AND, OR, NOT) acting on these
bits.
○ Deterministic: Given the same input and program, you always get the
same output.
● Quantum Computing Paradigm:
○ Based on the principles of quantum mechanics.
○ Information encoded in qubits (can be 0, 1, or a superposition of both).
○ Operations performed by quantum gates (unitary transformations) acting
on qubits.
○ Inherently probabilistic at the measurement stage, but the evolution of the
quantum state is deterministic (governed by Schrödinger equation).
○ Exploits phenomena like superposition and entanglement for new
computational power.
● Fundamental Difference: Quantum computing leverages the "weirdness" of the
quantum world to perform calculations in ways that have no classical equivalent
The Classical Bit – The Light Switch
● The Foundation of Digital Information: The classical bit is the
most basic unit of information in classical computing.
● Binary Nature: A bit can only exist in one of two distinct states:
a. 0 (e.g., Off, False, Low Voltage)
b. 1 (e.g., On, True, High Voltage)
● Definite State: At any given time, a classical bit is either 0 or 1.
There is no ambiguity.
● Physical Realizations: Implemented using transistors, magnetic
states, optical pulses, etc.
● Building Blocks: Sequences of bits represent all types of
classical data: numbers, text, images, instructions.
a. Example: The number 5 can be 101 in binary.
b. Example: The letter 'A' might be 01000001 (ASCII).
● Analogy: The Light Switch
a. A simple light switch perfectly illustrates a classical bit.
b. It can be OFF (state 0).
c. It can be ON (state 1).
d. It cannot be both ON and OFF simultaneously, nor can it be
partially ON in a way that represents a third distinct logical
Introducing the Qubit – The Dimmer Switch &
Spinning Coin
● The Quantum Bit (Qubit): The fundamental unit of quantum information.
● Beyond Binary: Unlike a classical bit, a qubit can represent 0, 1, or a
superposition of both 0 and 1 simultaneously.
● Superposition Explained:
a. A qubit isn't forced to be just 0 or just 1 before measurement.
b. It exists in a weighted combination of these states.
c. This allows qubits to explore a vastly larger space of possibilities
compared to classical bits.
● Analogy 1: The Dimmer Switch
a. A classical bit is a standard ON/OFF light switch.
b. A qubit is more like a dimmer switch. It can be fully OFF (0), fully ON (1),
or at any brightness level in between. This "in-between" state hints at the
idea of holding multiple potentials.
● Analogy 2: The Spinning Coin
a. While a coin is spinning in the air, it's neither definitively heads nor tails.
b. It's in a dynamic state encompassing both possibilities.
c. Only when it lands (measurement) does it resolve to a single outcome
(heads or tails).
d. A qubit before measurement is like this spinning coin.
● The Power of Potential: This ability to exist in a superposition of states is a
cornerstone of quantum computing's potential power.
Visualizing a Qubit – The Bloch Sphere (Simplified)
● A Geometric Picture: The state of a single qubit can be visualized as
a point on the surface of a 3D sphere called the Bloch Sphere.
● Key Points on the Sphere:
a. The North Pole typically represents the classical state |0⟩.
b. The South Pole typically represents the classical state |1⟩.
● Superposition States:
a. Any other point on the surface of the sphere represents a
superposition of |0⟩ and |1⟩.
b. Points on the equator represent equal superpositions of |0⟩ and
|1⟩ (e.g., the |+⟩ state).
● Angles Define the State: The exact superposition is defined by two
angles (θ and φ) on this sphere.
a. θ (theta): The angle from the positive Z-axis (polar angle).
b. φ (phi): The angle from the positive X-axis in the XY-plane
(azimuthal angle).
● Not Just 0 or 1: This visualization clearly shows that a qubit has a
continuous range of possible states, not just two.
● Measurement: When we measure the qubit in the computational
basis ({|0⟩, |1⟩}), the state vector "projects" onto either the North Pole
(|0⟩) or the South Pole (|1⟩) with a certain probability.
Superposition Mathematically – Amplitudes and
Probabilities
● Quantum State Notation: The state of a qubit, denoted |ψ⟩ (pronounced "ket psi"),
can be written as a linear combination of its basis states |0⟩ and |1⟩:
|ψ⟩ = α|0⟩ + β|1⟩
● Amplitudes (α and β):
a. α (alpha) and β (beta) are complex numbers called probability
amplitudes.
b. They are not probabilities themselves, but their squares are.
● Significance of Amplitudes:
a. They determine the weight or contribution of each basis state (|0⟩ or |1⟩) to
the overall superposition.
b. The relative phase between α and β is also crucial and distinguishes
different quantum states (this is why they are complex).
● Normalization Condition: The sum of the squared magnitudes of the amplitudes
must equal 1:|α|This ensures that the probabilities add up to 100%.
● Probability of Measurement Outcomes:
a. When we measure the qubit |ψ⟩ in the computational basis:
i. Probability of measuring 0 is |α|.
ii. Probability of measuring 1 is |β|.
● Example: If |ψ⟩ = (1/√2)|0⟩ + (1/√2)|1⟩, then:
a. |α|<sup>2</sup> = (1/√2)<sup>2</sup> = 1/2 (50% chance of measuring
0).
b. |β|<sup>2</sup> = (1/√2)<sup>2</sup> = 1/2 (50% chance of measuring
1).
This is an equal superposition.
Multiple Qubits – Expanding the Possibilities
Exponentially
● Beyond Single Qubits: Real computations require multiple qubits working
together.
● Two Qubits: Can represent 4 basis states simultaneously in superposition:
a. |00⟩, |01⟩, |10⟩, |11⟩
b. A general 2-qubit state: α|00⟩ + β|01⟩ + γ|10⟩ + δ|11⟩
c. (where |α|<sup>2</sup> + |β|<sup>2</sup> + |γ|<sup>2</sup> +
|δ|<sup>2</sup> = 1)
● Three Qubits: Can represent 2<sup>3</sup> = 8 basis states simultaneously.
a. |000⟩, |001⟩, ..., |111⟩
● N Qubits: Can represent 2 classical states simultaneously in superposition.
● Exponential Growth: This is a key source of quantum computing's power.
a. 10 qubits = 2<sup>10</sup> = 1,024 states
b. 20 qubits = 2<sup>20</sup> ≈ 1 million states
c. 50 qubits = 2<sup>50</sup> ≈ 1 quadrillion states! (A huge number)
d. 300 qubits can represent more states than there are atoms in the
observable universe.
● Computational Workspace: This vast "quantum parallelism" allows quantum
computers to explore an enormous number of possibilities in a way classical
computers cannot.
● Challenge: While N qubits can represent 2<sup>N</sup> states, preparing a
specific desired superposition and extracting useful information after computation
are non-trivial tasks.
Entanglement – Deeper Connections
● Beyond Simple Combinations: Entanglement is a unique quantum phenomenon
where multiple qubits become linked in a way that their individual states can no
longer be described independently.
● Correlated Fates: The state of one entangled qubit is perfectly correlated (or
anti-correlated) with the state(s) of the other(s), no matter how far apart they are.
● "Spooky Action at a Distance" (Einstein): This non-local connection troubled
Einstein, but it's a verified feature of quantum mechanics.
● Example: The Bell State (Φ
a. A common entangled state of two qubits: (1/√2)(|00⟩ + |11⟩)
b. If you measure the first qubit and find it to be 0, you instantly know the
second qubit is also 0.
c. If you measure the first qubit and find it to be 1, you instantly know the
second qubit is also 1.
d. Before measurement, neither qubit is definitively 0 or 1, but their outcomes
are perfectly linked.
● Not Just Classical Correlation: Entanglement is a stronger form of correlation
than anything found in classical physics. It implies that the system as a whole has
definite properties that the individual parts do not.
● A Crucial Resource: Entanglement is a key resource in many quantum algorithms
and quantum communication protocols, enabling computations and information
processing tasks that are impossible classically.
● Analogy: The Entangled Gloves / Magic Coin Pair
a. If you have a pair of gloves (one left, one right) in two sealed boxes,
opening one box and seeing a left glove instantly tells you the other box
contains a right glove, no matter how far apart.
Quantum Gates – The Verbs of Quantum Computation
● Manipulating Qubits: To perform computations, we need to change the
state of qubits in a controlled way. This is done using quantum gates.
● Analogous to Classical Logic Gates: Just as classical computers use
AND, OR, NOT gates to manipulate bits, quantum computers use quantum
gates to manipulate qubits.
● Unitary Transformations: Mathematically, quantum gates are represented
by unitary matrices.
a. When a gate (matrix U) acts on a qubit state |ψ⟩ (a vector), it
produces a new state |ψ'⟩ = U|ψ⟩.
● Key Properties of Unitary Operations:
a. Reversibility: All quantum gates (and thus quantum computations
made of them) are reversible. Given the output state and the gate,
you can determine the input state. This is unlike many classical gates
(e.g., AND, where you can't uniquely determine inputs from the
output).
b. Probability Conservation: Unitary operations preserve the
normalization of the quantum state (i.e., |α|^2 + |β|^2 = 1 always
holds). This means total probability remains 1.
● Building Blocks of Algorithms: Quantum algorithms are essentially
sequences of quantum gates applied to qubits.
Essential Single-Qubit Gates (X, H, Z)
● Single-Qubit Gates: These operations act on individual qubits.
● Pauli-X Gate (Quantum NOT Gate):
a. Symbol: X
b. Action: Flips the state of the qubit.
i. X|0⟩ = |1⟩
ii. X|1⟩ = |0⟩
c. Analogy: Similar to a classical NOT gate.
d. Matrix: [,]
● Hadamard Gate (Superposition Creator):
a. Symbol: H
b. Action: Creates an equal superposition from a basis state.
i. H|0⟩ = (1/√2)(|0⟩ + |1⟩) (often denoted |+⟩)
ii. H|1⟩ = (1/√2)(|0⟩ - |1⟩) (often denoted |–⟩)
c.
d. Applying H twice returns the qubit to its original state (H*H = I, Identity).
e. Crucial for initializing qubits in superposition.
●
● Pauli-Z Gate (Phase Flip Gate):
a. Symbol: Z
b. Action: Leaves |0⟩ unchanged, flips the phase of |1⟩.
i. Z|0⟩ = |0⟩
ii. Z|1⟩ = -|1⟩
c.
d. Effect on superposition: Z(α|0⟩ + β|1⟩) = α|0⟩ - β|1⟩.
e. Important for many quantum algorithms where relative phases matter.
Essential Multi-Qubit Gate – The CNOT Gate
● Interacting Qubits: To perform complex computations and create
entanglement, we need gates that act on multiple qubits simultaneously.
● The Controlled-NOT (CNOT) Gate:
a. A fundamental two-qubit gate.
b. It has two input qubits: a control qubit and a target qubit.
● Action of CNOT:
a. If the control qubit is |0⟩, the target qubit is left unchanged.
b. If the control qubit is |1⟩, the target qubit is flipped (like an X-gate is
applied to it).
● Truth Table (Control, Target -> Control', Target'):
a. |00⟩ → |00⟩
b. |01⟩ → |01⟩
c. |10⟩ → |11⟩ (Target flipped because control is |1⟩)
d. |11⟩ → |10⟩ (Target flipped because control is |1⟩)
● Creating Entanglement: The CNOT gate is crucial for creating entangled
states.
a. Example: If control qubit is H|0⟩ = |+⟩ (superposition) and target is |0⟩:
Input: (1/√2)(|0⟩ + |1⟩) ⊗ |0⟩ = (1/√2)(|00⟩ + |10⟩)
Output after CNOT: (1/√2)(|00⟩ + |11⟩) – This is an entangled Bell
state!
● A Universal Gate Component: The CNOT gate, combined with all
single-qubit gates, forms a universal set for quantum computation.
Quantum Circuits – The Blueprint for Computation
● Visualizing Quantum Algorithms: Quantum circuits are diagrams that
represent how quantum computations are performed.
● Components of a Quantum Circuit Diagram:
a. Horizontal Lines (Wires): Each line represents a qubit, evolving
from left (input) to right (output).
b. Boxes/Symbols on Wires: These represent quantum gates applied
to the qubits they intersect.
c. Gate Order: Gates are applied in sequence from left to right.
d. Measurement Symbol: Typically at the end of a qubit line, indicating
a measurement is performed.
● Example: A Simple Circuit
a. Qubit 0: H-gate → CNOT (control) → Measurement
b. Qubit 1: → CNOT (target) → Measurement
c. This circuit, as we saw, creates a Bell state and then measures it.
● Readability and Design: Circuits provide a clear way for physicists and
computer scientists to design, analyze, and communicate quantum
algorithms.
● From Abstract Algorithm to Physical Implementation: The circuit model
is a crucial intermediate step, translating a high-level algorithmic idea into a
sequence of operations that could (theoretically) be run on quantum
hardware.
Universal Gate Sets – Building Any Computation
● The Power of a Few: Just like classical computers can perform any
computation using a small set of universal logic gates (e.g., NAND gates
alone are universal), a similar concept exists in quantum computing.
● Universal Quantum Gate Set: A small collection of quantum gates from
which any possible quantum computation (any unitary transformation on any
number of qubits) can be constructed or arbitrarily well-approximated.
● Common Universal Sets:
a. All single-qubit gates + the CNOT gate.
b. Specific discrete sets like {Hadamard, S, T, CNOT} (where S and T
are particular phase gates). The T-gate is often crucial for achieving
full universality but can be resource-intensive.
● Significance for Hardware:
a. Quantum computer architects don't need to build hardware capable
of performing every conceivable quantum operation directly.
b. They can focus on implementing a small set of universal gates with
high fidelity.
● Significance for Software/Compilation:
a. Quantum compilers take a high-level description of a quantum
algorithm and break it down into a sequence of gates from the
hardware's available universal set.
● Approximation:A finite universal gate set can approximate them to any
desired degree of accuracy by longer sequences of gates.
Measurement – Collapsing Possibilities to Answers
● The Bridge to the Classical World: Quantum computation happens in the quantum
realm of superposition and entanglement, but ultimately, we need classical results.
Measurement is this bridge.
● Act of Observation: Measurement is an interaction with the quantum system that
forces it to "choose" a definite classical state from its superposition.
● Wavefunction Collapse (Standard Interpretation):
a. Before measurement, a qubit |ψ⟩ = α|0⟩ + β|1⟩ exists in superposition.
b. Upon measurement in the computational basis ({|0⟩, |1⟩}), the state "collapses"
to either |0⟩ or |1⟩.
c. The original superposition is (generally) destroyed by the act of measurement in
that basis.
● Probabilistic Outcomes:
a. The outcome is not deterministic (unless α or β is 0).
b. Probability of collapsing to |0⟩ is |α|<sup>2</sup>.
c. Probability of collapsing to |1⟩ is |β|<sup>2</sup>.
● Irreversibility of Measurement: Unlike unitary gate operations, measurement is
generally an irreversible process. You can't "un-measure" to get the superposition
back.
● Information Gain vs. State Disturbance: We gain classical information (a 0 or a 1),
but we disturb/destroy the delicate quantum state that held more complex information.
● Repeated Measurements: To determine the probabilities |α|<sup>2</sup> and
|β|<sup>2</sup> (and thus infer the amplitudes), we typically need to prepare the
same quantum state |ψ⟩ many times and measure it, then count the frequency of 0,1.
What We Get from Measurement – Bits, Probabilities,
Expectation Values
● Raw Output: Classical Bits: Each individual measurement of a qubit (or a set of
qubits) yields a classical bit (0 or 1) or a classical bit string (e.g., "0110").
● Estimating Probabilities:
a. By repeating the quantum computation and measurement many times
(N<sub>shots</sub>), we can estimate the probability of each outcome.
b. P(outcome) ≈ (Number of times outcome observed) / N<sub>shots</sub>.
c. These probabilities are what relate back to the squared amplitudes in the
final quantum state.
● Expectation Values:
a. Often, we are interested in the average value of a physical observable
(represented by a quantum operator, M).
b. The expectation value ⟨M⟩ is calculated as: Σ<sub>i</sub>
(value<sub>i</sub> * P(outcome<sub>i</sub>)).
c. Example: For a single qubit and the Pauli-Z operator (Z has eigenvalues
+1 for |0⟩ and -1 for |1⟩):
⟨Z⟩ = (+1) * P(measuring 0) + (-1) * P(measuring 1)
= |α|<sup>2</sup> - |β|<sup>2</sup>.
d. Many VQAs (like VQE and QAOA) aim to minimize or measure such
expectation values.
● Interpreting Results: The classical bits, probabilities, or expectation values are
then used by classical post-processing algorithms to derive the final answer to
the computational problem.
Why Quantum? Potential for Quantum Advantage
1. The Big Question: Why invest in building complex quantum computers? What can
they do that classical computers can't (or can't do efficiently)?
2. "Quantum Advantage" (formerly "Quantum Supremacy"): Demonstrating that a
programmable quantum device can solve a problem that no classical computer can
solve in any feasible amount of time (regardless of whether the problem is useful).
3. Potential Areas for Significant Speedups:
a. Simulating Quantum Systems: Molecules, materials science, drug
discovery. Classical computers struggle with the exponential complexity of
quantum mechanics. Quantum computers are "naturally" suited for this.
b. Certain Optimization Problems: Finding optimal solutions in vast search
spaces (e.g., logistics, finance, machine learning model optimization).
c. Factoring Large Numbers: Shor's algorithm (threatens current cryptography).
d. Unstructured Database Search: Grover's algorithm.
e. Solving Certain Systems of Linear Equations: HHL algorithm and its
derivatives (potential impact on ML).
4. Not Just Speed: Quantum computers might also offer advantages in:
a. Energy Efficiency for certain computations.
b. New Algorithmic Paradigms leading to solutions for previously
unapproachable problems.
5. The Goal: To solve useful problems faster or better than classical methods.
Quantum Parallelism vs. True Parallelism
● The Power of 2^N: N qubits can represent 2^N states in superposition. This allows a
quantum computer to perform operations on all these states "simultaneously" with a single
set of gate operations.
● "Quantum Parallelism":
a. If you apply a function f(x) using a quantum circuit to a superposition of all possible
inputs x, the output state will be a superposition of all corresponding f(x) values.
b. Example: U (Σ |x⟩|0⟩) → Σ |x⟩|f(x)⟩.
c. It feels like 2<sup>N</sup> computations happened at once.
● Not Classical Parallelism:
a. Classical parallel processing uses multiple processors, each working on a different
piece of data independently and producing distinct outputs that can all be
accessed.
● The Measurement Bottleneck:
a. In the quantum case, when you measure the output state Σ<sub>x</sub> |x⟩|f(x)⟩,
you only get one specific |x⟩|f(x)⟩ pair as an outcome, due to wavefunction
collapse.
b. You don't get to see all 2<sup>N</sup> results of f(x) simultaneously.
● The Art of Quantum Algorithms:
a. Quantum algorithms are cleverly designed to use interference and other quantum
effects to ensure that when you do measure, the outcome you get is the one (or
one of the ones) that gives you the answer to your problem with high probability.
b. It's about extracting a global property of the function f(x) or finding a specific input
x that has a desired property, not about computing all values of f(x).
Not a Universal Replacement
● Quantum Computers are Specialized Tools: They are not designed to replace
classical computers for every task.
● Classical Computers Excel At:
a. Most everyday tasks: web browsing, word processing, spreadsheets,
gaming.
b. Tasks requiring large amounts of simple, sequential processing or extensive
memory access.
c. Problems where highly optimized classical algorithms already exist and
perform exceptionally well.
● Quantum Computers Target Specific Problem Types:
a. Problems with inherent quantum mechanical nature (e.g., molecular
simulation).
b. Problems with specific mathematical structures that quantum algorithms
can exploit for speedups (e.g., factoring, certain types of search and
optimization).
● The Future is Likely Hybrid:
a. Classical computers will continue to handle most computational workloads.
b. Quantum computers will act as specialized co-processors or accelerators
for specific, hard sub-problems that are passed to them by classical
computers.
c. This is similar to how GPUs accelerate graphics or specific AI computations
today.
● Focus on "Quantum Advantage" for Niche but High-Impact Problems: The aim
is to find areas where quantum provides a distinct, significant benefit.
The Current Reality – The NISQ Era
● NISQ: Noisy Intermediate-Scale Quantum
a. A term coined by John Preskill to describe the current generation of quantum
processors.
● Characteristics of NISQ Devices:
a. Intermediate-Scale: Typically have between ~50 to a few hundred qubits.
i. Not enough for full fault-tolerant error correction.
ii. Large enough to perform computations beyond exact classical simulation for
some tasks.
b. Noisy: Qubits are highly sensitive to their environment and gate operations are
imperfect.
i. Decoherence: Qubits lose their quantum properties (superposition,
entanglement) over short timescales (coherence times).
ii. Gate Errors: Quantum gates don't perform their intended operations
perfectly, introducing errors.
● No Fault Tolerance: NISQ devices lack the sophisticated quantum error correction (QEC)
needed to actively correct errors during computation. This limits the depth (number of
sequential gates) of circuits that can be run reliably.
● Implications for Algorithm Design:
a. Algorithms must be relatively shallow (short).
b. They must be inherently robust to some level of noise, or employ error mitigation
techniques.
c. Hybrid quantum-classical algorithms (like VQAs) are favored.
● A Stepping Stone: NISQ is a crucial research and development phase towards future
fault-tolerant quantum computers.
The Noise Problem – Decoherence and Gate Errors
● The Arch-Nemesis of Quantum Computation: Noise
● Decoherence: Losing "Quantumness"
a. Qubits are not isolated; they interact with their surrounding environment
(temperature, stray fields, vibrations).
b. These interactions cause the delicate superposition and entanglement to
decay over time.
c. T1 time (Relaxation): Characteristic time for a qubit in state |1⟩ to decay
to state |0⟩.
d. T2 time (Dephasing): Characteristic time for the relative phase
information in a superposition to be lost. T2 is typically ≤ T1.
e. Computations must be completed well within these coherence times.
● Gate Errors: Imperfect Operations
a. Quantum gates are physical operations (e.g., microwave pulses, laser
beams) applied to qubits.
b. These physical operations are never perfectly precise.
c. Fidelity: A measure of how close the actual operation performed by a
gate is to the ideal intended operation. (e.g., 99.9% fidelity means 0.1%
error rate per gate).
d. Errors accumulate as more gates are applied.
● Crosstalk: Unwanted interactions between qubits. An operation on one qubit
might unintentionally affect its neighbors.
● Impact: Noise and errors lead to incorrect results in quantum computations,
limiting the complexity and reliability of algorithms on NISQ devices.
Scalability – Building Bigger and Better
● The Goal: To build quantum computers with many high-quality, well-connected qubits.
● Challenges in Scaling Up Qubit Count:
a. Fabrication Consistency: Ensuring that all qubits on a chip are manufactured
with nearly identical properties (e.g., frequency, coherence times) becomes
harder as the number increases.
b. Physical Space & "Wiring": Arranging many qubits and the control/readout lines
needed for each one in a confined space is an engineering nightmare (the "wiring
problem").
c. Increased Crosstalk: More qubits packed closely together can lead to more
unwanted interactions.
d. Cooling Requirements: Many qubit technologies (e.g., superconducting) require
extremely low temperatures (milliKelvin range), and cooling larger systems is a
significant challenge.
● Maintaining Qubit Quality at Scale:
a. It's not just about having more qubits; they also need to be good qubits (long
coherence, low gate error rates). Often, there's a trade-off.
● Connectivity (Topology):
a. How many other qubits can each qubit directly interact with?
b. Limited connectivity (e.g., qubits only talk to their nearest neighbors) requires
more SWAP operations in algorithms, increasing circuit depth and error.
c. Achieving high connectivity at scale is very difficult.
● Different Qubit Technologies, Different Scaling Challenges:
a. Superconducting qubits, trapped ions, photonic qubits, neutral atoms, etc., each
have their own unique set of engineering hurdles for scaling.
The Data Bottleneck – Input and Output Gate Sets –
Building Any Computation
● The QRAM Challenge (Quantum Random Access Memory):
a. Many quantum algorithms (especially early proposals for QML) assume the ability
to efficiently load large classical datasets into a quantum superposition state.
b. This often implies the existence of a "Quantum Random Access Memory"
(QRAM).
c. Building a scalable and efficient QRAM is a major unsolved problem.
● Classical Data to Quantum States:
a. How do you take, say, a million-feature classical vector and encode it into a
manageable number of qubits in superposition quickly and accurately?
b. Current methods (amplitude encoding, angle encoding) have limitations in terms
of circuit depth or precision for very large datasets.
c. This "state preparation" step can itself be so computationally expensive that it
negates any downstream quantum speedup.
● Extracting Information (Readout):
a. A quantum state of N qubits can contain 2<sup>N</sup> complex amplitudes – a
vast amount of information.
b. However, a single measurement yields only N classical bits.
c. Full quantum state tomography (reconstructing the entire quantum state) requires
an exponential number of measurements and is impractical for large systems.
d. Algorithms must be designed to extract the desired specific information (e.g., a
global property, an expectation value, a classification label) with a polynomial
number of measurements.
● The "Input/Output Problem" is a Key Bottleneck for QML: If data can't get in and out
efficiently, quantum advantages in processing are moot.
Algorithm Design & Fault Tolerance
● New Ways of Thinking: Quantum algorithms require a different mindset than
classical algorithm design.
a. Must leverage quantum phenomena: superposition, entanglement,
interference.
b. Cannot simply "translate" most classical algorithms directly for a speedup
(Grover's and Shor's are exceptions, not the rule).
● The Search for "Quantum Speedups":
a. Identifying problems with structures amenable to quantum attack.
b. Proving theoretically that a quantum approach offers a significant (e.g.,
polynomial or exponential) speedup over the best known classical
algorithm. This is hard!
● NISQ-Era Algorithm Design Constraints:
a. Shallow circuits (to combat decoherence and gate errors).
b. Hybrid quantum-classical approaches are dominant.
c. Focus on heuristic algorithms (like VQAs) where provable speedups are
harder to establish but practical performance is hoped for.
● The Long-Term Goal: Fault-Tolerant Quantum Computing (FTQC):
a. Utilizes Quantum Error Correction (QEC) codes.
b. QEC requires many physical qubits to encode one "logical" (error-protected)
qubit (e.g., hundreds or thousands to one).
c. FTQC would enable very deep, complex quantum algorithms (like full
Shor's for large numbers) to run reliably.
d. Still many years, possibly decades, away for large-scale systems.
● Designing for Both Eras: Some research focuses on algorithms for NISQ, while
other theoretical work assumes FTQC to explore ultimate potential.
The Power of Interference – Algorithmic Principle
● Waves and Probabilities: Quantum mechanics describes particles (like electrons,
photons used for qubits) as having wave-like properties. These "probability waves" have
amplitudes.
● Constructive Interference: When waves (or computational paths in a quantum algorithm)
are "in phase," their amplitudes add up, leading to a higher probability of that outcome.
● Destructive Interference: When waves (or computational paths) are "out of phase," their
amplitudes cancel out, leading to a lower (or zero) probability of that outcome.
● Harnessing Interference: Many quantum algorithms are designed to:
a. Start with an equal superposition of many possible answers.
b. Apply a sequence of quantum gates that cleverly manipulates the phases of the
amplitudes associated with these possibilities.
c. The goal is to arrange it so that paths leading to incorrect or undesirable solutions
undergo destructive interference and vanish.
d. Simultaneously, paths leading to the correct or desired solution(s) undergo
constructive interference, significantly boosting their amplitude and thus their
probability of being observed upon measurement.
● Analogy: Noise-Canceling Headphones
a. Headphones detect ambient noise (unwanted sound waves).
b. They generate "anti-noise" sound waves that are perfectly out of phase.
c. The noise and anti-noise waves interfere destructively, canceling each other out.
● Not Just Searching, but Sculpting Probability: Quantum algorithms use interference to
"sculpt" the probability distribution of possible outcomes.
Deutsch-Jozsa Algorithm – A First Glimpse of Quantum
Speedup
● One of the First Examples: Developed by David Deutsch and Richard Jozsa in 1992.
● The Problem:
a. You are given a "black box" function (an oracle) f that takes an n-bit binary string
as input and outputs either 0 or 1.
b. You are promised that the function f is either:
i. Constant: f(x) is the same (0 or 1) for all possible inputs x.
ii. Balanced: f(x) is 0 for exactly half of the inputs and 1 for the other half.
c. Goal: Determine if f is constant or balanced with the minimum number of queries
to the oracle.
● Classical Solution:
a. In the worst case, a classical deterministic algorithm might need to query the
oracle 2<sup>n-1</sup> + 1 times to be certain. (e.g., if you see all 0s for half the
inputs plus one more, you still don't know if it's constant 0 or balanced).
● Quantum Solution (Deutsch-Jozsa Algorithm):
a. Can determine if f is constant or balanced with only one query to the quantum
version of the oracle.
b. Achieves this by using superposition to evaluate f(x) for all x simultaneously
and then using interference to make the result distinguishable.
● Significance:
a. A clear (though somewhat artificial) separation between quantum and classical
query complexity.
b. Demonstrated the potential of quantum parallelism and interference.
c. A foundational algorithm that inspired further research.
● Not a "Useful" Problem for Everyday Tasks, but a Powerful Proof of Concept.
Grover's Search Algorithm – Finding a Needle in a Haystack
● The Problem: Unstructured Search
a. Imagine a very large, unsorted database (or search space) containing N items.
b. One (or a few) of these items is "marked" or is the "target" item we are looking for.
c. We have an "oracle" that can tell us if a given item is the marked one.
d. Goal: Find the marked item with the minimum number of queries to the oracle.
● Classical Solution:
a. On average, you'd need to check N/2 items.
b. In the worst case, you might have to check all N items (if the marked item is the last one
you check).
c. Complexity: O(N).
● Quantum Solution (Grover's Algorithm, 1996):
a. Can find the marked item with high probability in approximately O(√N) queries.
b. This provides a quadratic speedup over classical search.
● How it Works (High Level):
a. Initialization: Start with an equal superposition of all N items.
b. Oracle Call: Apply the oracle, which "marks" the target item(s) by flipping their phase
c. Amplitude Amplification (Grover Diffusion Operator): Apply a special set of operations
that effectively increases the amplitude of the marked item(s) and decreases the
amplitudes of all other items. This step is like "inverting about the average."
d. Repeat: Steps 2 and 3 are repeated O(√N) times.
● Significance:
a. Applicable to a wide range of problems that can be cast as a search.
b. One of the most famous quantum algorithms with a proven speedup.
c. While quadratic speedup isn't exponential (like Shor's), it can be substantial for very large
N.
● Analogy: Finding your specific car in a massive, unorganized parking lot. Grover's is like a method
that lets you "amplify the signal" from your car with fewer "looks."
Shor's Algorithm – Breaking Classical Cryptography
(Theoretically)
● The Problem: Integer Factorization
a. Given a large composite integer N, find its prime factors (3, 5 for N=15).
b. This problem is believed to be computationally very hard if N is large
● Relevance to Cryptography:
a. Public-key cryptosystems like RSA relies on the difficulty of factoring large
numbers. If you can factor N efficiently, you can break RSA encryption.
● Classical Difficulty: The best known classical algorithms for factoring take time that
grows super-polynomially (almost exponentially) with the number of digits in N.
● Quantum Solution (Shor's Algorithm, 1994):
a. Peter Shor developed a quantum algorithm that can factor large integers in
polynomial time This represents an exponential speedup over known classical
factoring algorithms.
● How it Works (Very High Level):
a. Transforms the factoring problem into a problem of finding the "period" of a
specific mathematical function.
b. Uses the Quantum Fourier Transform (QFT) as a key subroutine to efficiently
find this period.
c. Classical post-processing then uses this period to deduce the factors of N.
● Impact:
a. If large-scale, fault-tolerant quantum computers are built, Shor's algorithm would
render current RSA encryption insecure.
b. This has spurred research into "post-quantum cryptography" (classical
algorithms resistant to quantum attack).
● Requires Fault Tolerance: Shor's algorithm needs a large number of high-fidelity qubits
and gates, making it a target for future fault-tolerant quantum computers, not NISQ
Quantum Fourier Transform (QFT) – A Powerful
Quantum Primitive
● Analogous to Classical DFT/FFT: The Quantum Fourier Transform (QFT) is the
quantum mechanical counterpart of the classical Discrete Fourier Transform (DFT),
which is often implemented efficiently by the Fast Fourier Transform (FFT).
● What it Does:
a. Transforms a quantum state from one basis (e.g., the computational basis
|x⟩) to another basis (the Fourier basis).
b. Essentially, it decomposes a state into its frequency components.
● Key Properties:
a. Linear and Unitary: It's a valid quantum operation.
b. Efficient Quantum Implementation: Can be implemented on a quantum
computer This is an exponential speedup over the classical FFT
● Crucial Subroutine:
a. Shor's Algorithm: Used for period finding, which is the core quantum step.
b. Quantum Phase Estimation: QFT is the final step to extract the phase.
c. Algorithms for solving linear systems (HHL).
d. Some QML proposals, especially for feature extraction or data analysis in
the frequency domain.
● Why the Speedup? The quantum algorithm directly manipulates all amplitudes in
superposition, whereas classical FFT processes them more sequentially.
● Output Challenge: While QFT computes all Fourier coefficients in superposition,
reading them all out is generally not possible due to the measurement problem.
Algorithms using QFT are designed to extract specific information (like a period)
from the resulting superposition.
Quantum Phase Estimation (QPE) – Unveiling
Eigenvalues
● A Fundamental Quantum Primitive: Quantum Phase Estimation (QPE) is an
algorithm used to estimate the eigenvalue of an eigenvector of a unitary operator.
● The Problem:
a. Given a unitary operator U and one of its eigenvectors |ψ⟩ goal is to
estimate the phase φ (where φ is between 0 and 1).
● Why is this Useful?
a. finding eigenvalues of matrices (e.g., energies of molecules in quantum
chemistry, which are eigenvalues of the Hamiltonian operator).
● Core Components of QPE Algorithm:
a. Ancilla Qubits (Estimation Register): A register of t ancilla qubits,
initialized and then put into an equal superposition using Hadamard gates.
b. Controlled-U Operations: A series of controlled-U operations are applied.
c. Measurement: Measuring the ancilla qubits in the computational basis
yields a binary string
● Accuracy: The precision of the phase estimate φ depends on the number of
ancilla qubits t and the number of times U is applied. More ancilla qubits give
more bits of precision.
● A Key Subroutine: QPE is a building block for other powerful algorithms,
including Shor's algorithm and some quantum simulation algorithms.
Amplitude Amplification – Generalizing Grover's Idea
● Beyond Just Grover's: Grover's search algorithm is a specific application of a more
general quantum technique called Amplitude Amplification.
● The Core Idea:
a. Suppose you have a quantum algorithm (or subroutine) A that prepares a state
|ψ⟩ = a|good⟩ + b|bad⟩, where |good⟩ represents the desired solution(s) and
|bad⟩ represents all other states.
b. Initially, the probability of measuring a "good" state, |a|<sup>2</sup>, might be
very small.
c. Amplitude amplification is a procedure that iteratively increases the amplitude a
(and thus the probability |a|<sup>2</sup>) of the |good⟩ subspace, while
decreasing the amplitude b of the |bad⟩ subspace.
● How it Works (Similar to Grover):
a. Uses an "oracle" that can distinguish "good" states from "bad" states (e.g., by
flipping the phase of "good" states).
b. Uses an operator (like Grover's diffusion operator) that reflects states about the
average amplitude, effectively boosting the marked "good" states.
● Iterative Process: Repeating these two steps can quadratically reduce the number of
times algorithm A needs to be run to find a "good" state.
● Applications:
a. Can be used to boost the success probability of other quantum algorithms that
have a moderate chance of success.
b. Forms the basis for quantum algorithms for estimating mean, median, and other
statistical properties.
c. Quantum Counting: Estimating the number of "good" solutions.
● A General Tool for Enhancing Quantum Search and Estimation.
The Rise of Variational Quantum Algorithms (VQAs)
for NISQ
● NISQ Era Demands New Approaches: Algorithms like Shor's or full QPE require
fault-tolerant quantum computers (many high-fidelity qubits, deep circuits). These are not
feasible on current NISQ devices.
● Variational Quantum Algorithms (VQAs) Emerge:
a. Also known as Hybrid Quantum-Classical Algorithms.
b. Designed to leverage the strengths of both quantum and classical processors.
c. Specifically tailored for the capabilities and limitations of NISQ hardware.
● Key Characteristics of VQAs:
a. Shallow Quantum Circuits: Use parameterized quantum circuits (PQCs or "ansatz")
with relatively few layers of gates to minimize decoherence and error accumulation.
b. Classical Optimization: Rely on a classical computer to optimize the parameters of
the quantum circuit.
c. Measurements & Cost Function: The quantum computer executes the PQC and
performs measurements to estimate a cost function (e.g., an energy, a solution
quality).
d. Iterative Feedback Loop: The classical optimizer uses the cost function value to
suggest new parameters for the PQC, and the process repeats.
● Why are VQAs Suited for NISQ?
a. Offload complex optimization to robust classical computers.
b. Quantum part (PQC execution) is kept relatively short and simple.
c. Can be somewhat more resilient to certain types of noise compared to algorithms
requiring perfect coherence over long computations.
d. Offer a pathway to potentially useful quantum computations on near-term hardware.
● Examples: VQE (Variational Quantum Eigensolver), QAOA (Quantum Approximate
Optimization Algorithm), some QML classifiers.
The VQA Workflow – A Symbiotic Loop
● tep 1: Define the Problem & Ansatz
a. Translate the problem into a suitable quantum framework (e.g., a Hamiltonian for
VQE, a cost function for QAOA).
b. Choose a Parameterized Quantum Circuit (PQC) or "ansatz" – a template circuit
with tunable gate parameters (e.g., rotation angles θ).
● Step 2: Initialize Parameters (Classical CPU)
a. The classical computer provides an initial guess for the parameters θ of the PQC.
● Step 3: Execute PQC on QPU (Quantum Computer)
a. The quantum computer prepares an initial state (e.g., |0...0⟩).
b. It applies the PQC with the current parameters θ to this state, producing an output
quantum state |ψ(θ)⟩.
● Step 4: Measure & Estimate Cost (QPU + Classical CPU)
a. The QPU measures observables on |ψ(θ)⟩.
b. These measurement results are sent to the classical CPU.
c. The CPU calculates a cost function C(θ) based on these measurements (e.g.,
expectation value ⟨H⟩<sub>θ</sub>).
● Step 5: Classical Optimization (Classical CPU)
a. The classical optimizer takes C(θ) and determines how to update the parameters θ
to try and minimize C(θ).
b. It proposes new parameters θ'.
● Step 6: Iterate
a. Repeat from Step 3 with the new parameters θ' until the cost C(θ) converges to a
minimum or a maximum number of iterations is reached.
● Output: The optimized parameters θ* and the corresponding minimum cost C(θ*), which
represents the solution or desired property.
Parameterized Quantum Circuits (PQCs) / Ansatz – The
Quantum Engine
● The Heart of the VQA's Quantum Part: The Parameterized Quantum Circuit (PQC), also
known as an "ansatz" (German for "approach" or "trial solution").
● Structure:
a. A sequence of fixed quantum gates (e.g., CNOTs, Hadamards).
b. Interspersed with parameterized quantum gates, typically single-qubit rotation
gates (R<sub>x</sub>(θ), R<sub>y</sub>(θ), R<sub>z</sub>(θ)).
c. The angles θ<sub>i</sub> of these rotation gates are the learnable parameters
that the classical optimizer tunes.
● Role of the Ansatz:
a. To prepare a family of quantum states |ψ(θ)⟩.
b. The goal is that for some optimal set of parameters θ*, the state |ψ(θ*)⟩ will be (or
be close to) the desired solution state (e.g., the ground state for VQE, or a state
encoding a good solution for QAOA).
● Design Choices for Ansätze ("Ansatz Architecture"):
a. Problem-Inspired: Designed based on the structure of the problem being solved
(e.g., Unitary Coupled Cluster for chemistry, QAOA structure for optimization).
b. Hardware-Efficient: Designed to be easily implementable on specific quantum
hardware, using native gates and respecting qubit connectivity to minimize depth
and errors.
c. Expressivity: The ability of the ansatz to generate a wide range of quantum states.
More expressive ansätze might find better solutions but can be harder to train.
d. Trainability: The ease with which the classical optimizer can find good parameters
(avoiding issues like barren plateaus).
● Trade-offs: There's often a trade-off between expressivity, trainability, and hardware
efficiency when choosing or designing an ansatz. This is an active area of research.
The Classical Optimizer – The Guiding Hand
● The "Brain" of the VQA's Learning Process: While the QPU executes the parameterized
circuit, the classical optimizer is responsible for intelligently updating the parameters to
improve performance.
● Input to Optimizer: The value of the cost function C(θ) (e.g., energy, error rate) obtained from
the QPU for the current parameters θ.
● Output of Optimizer: A new set of recommended parameters θ' that are expected to yield a
better (usually lower) cost function value.
● Types of Classical Optimizers Used:
a. Gradient-Based Optimizers:
i. Require information about the gradient (slope) of the cost function with respect
to the parameters (∇C(θ)).
ii. Examples: SGD (Stochastic Gradient Descent), Adam, BFGS.
iii. Gradients can be estimated from the QPU using techniques like the
"parameter-shift rule" or finite differences.
b. Gradient-Free Optimizers:
i. Do not require explicit gradient information; work by evaluating the cost
function at various points.
ii. Examples: COBYLA, Nelder-Mead, SPSA (Simultaneous Perturbation
Stochastic Approximation).
iii. Can be more robust to noisy cost function evaluations from NISQ devices, but
may converge slower.
● Challenges for Optimization in VQAs:
a. Noise, High Dimensionality, Local Minima
b. Barren Plateaus: Regions where gradients are nearly zero, halting learning.
● Choosing the Right Optimizer: Depends on the problem, ansatz, hardware noise,
Example VQA: Variational Quantum Eigensolver (VQE)
● Goal of VQE: To find the lowest eigenvalue (often the ground state energy) of a given
Hamiltonian H.
a. Hamiltonian H: A matrix (operator) that describes the energy of a quantum system (e.g.,
a molecule, a magnetic material).
● Why is this Important?
a. Quantum Chemistry: Determining the ground state energy of molecules is
fundamental for understanding chemical properties, reaction rates, and designing new
molecules/drugs.
b. Materials Science: Finding ground states of materials to predict their properties.
c. Optimization: Some optimization problems can be mapped to finding the ground state
of an Ising Hamiltonian.
● The Variational Principle:
a. For any trial quantum state |ψ(θ)⟩ prepared by an ansatz, the expectation value of the
Hamiltonian ⟨H⟩θ = ⟨ψ(θ)|H|ψ(θ)⟩ is always greater than or equal to the true ground
state energy E0
b. ⟨H⟩θ ≥ E0
c. By minimizing ⟨H⟩θ< by varying θ, we approach E0
● VQE Workflow (Recap of General VQA Loop):
a. Choose an ansatz PQC |ψ(θ)⟩ suitable for the problem (e.g., Unitary Coupled Cluster
for chemistry).
b. Initialize parameters θ.
c. QPU: Prepare |ψ(θ)⟩ and measure terms of H to estimate ⟨H⟩θ
d. CPU: Optimizer uses ⟨H⟩θ to propose new θ.
e. Repeat until ⟨H⟩θ is minimized.
● Output: The minimized ⟨H⟩<sub>θ is an estimate of the ground state energy, and |ψ(θ*)⟩ is an
Example VQA: Quantum Approximate Optimization
Algorithm (QAOA)
● Goal of QAOA: To find approximate solutions to combinatorial optimization problems.
● Combinatorial Optimization: Problems involving finding an optimal object (e.g., a bit string, a
path, a configuration) from a finite, but often very large, set of possibilities.
a. Examples: Max-Cut (, Traveling Salesperson Problem, scheduling problems.
b. Many such problems are NP-hard,
● QAOA Approach:
a. Encodes the solution to the optimization problem as the ground state of a "cost" or
"problem" Hamiltonian, H<sub>C. The bit string that minimizes H<sub>C is the solution.
b. Uses a specific layered ansatz structure:
H<sub>C: The cost Hamiltonian (diagonal in computational basis, eigenvalues are costs).
c. H<sub>M: A "mixer" Hamiltonian that allows transitions between different solutions.
d. γ (gamma) and β (beta) are the 2p learnable parameters.
e. p is the number of layers or "depth" of the QAOA circuit.
● VQA Loop for QAOA:
a. Classical optimizer chooses γ, β.
b. QPU prepares |ψ(γ,β)⟩ and measures the expectation value ⟨H<sub>C</sub>⟩<sub>γ,
β</sub>.
c. Optimizer updates γ, β to minimize ⟨H<sub>C</sub>⟩<sub>γ,β</sub>.
d. Repeat.
● Output: After optimization, the state |ψ(γ*,β*)⟩ is prepared and measured many times.
Challenges in VQAs – Barren Plateaus, Trainability
VQAs are Promising, but Not a Panacea: Despite their suitability for NISQ, VQAs face
significant training challenges.
Barren Plateaus:
a. A phenomenon where the gradients of the cost function (∇C(θ)) become exponentially
small with respect to the number of qubits for many choices of PQC ansätze, especially if
they are "too expressive" or deep.
b. When gradients are tiny, gradient-based optimizers make virtually no progress, and
training stalls.
c. Can occur even in the absence of hardware noise.
Trainability Issues:
a. Choice of Ansatz: A poorly chosen ansatz might not be expressive enough to represent
the solution, or it might lead to a very difficult optimization landscape.
b. Parameter Initialization: Bad initial parameters can lead to getting stuck in poor local
minima.
c. Optimizer Choice: Some optimizers are better suited for the noisy, high-dimensional
landscapes of VQAs than others.
d. Noise Impact: Hardware noise makes the cost function evaluation itself noisy, which can
severely hinder the optimizer's ability to find good minima.
Local Minima: The cost landscape of VQAs can be riddled with local minima, where the
optimizer converges to a sub-optimal solution.
Cost of Gradient Estimation: For gradient-based methods, estimating gradients on a QPU
(e.g., via parameter-shift rule) can require many additional circuit executions, adding to the
overall runtime.
Physics & Math Essentials for Quantum Algorithms &
●
ML (Part 1: Quantum Concepts)
Recap: Key Quantum Mechanical Concepts So Far:
a. Qubits: Basic unit, can be |0⟩, |1⟩, or superposition α|0⟩ + β|1⟩.
b. Superposition: Allows representation of multiple states simultaneously.
c. Entanglement: Non-local correlations between qubits, e.g., (1/√2)(|00⟩ +
|11⟩).
d. Quantum Gates: Unitary operations (X, H, Z, CNOT) that transform qubit
states.
e. Quantum Circuits: Sequences of gates defining a computation.
f. Measurement: Collapses superposition to classical bits, probabilistic
outcome.
● Hilbert Spaces – The "Arena" for Quantum States:
a. Mathematically, quantum states are vectors in a complex vector space
called a Hilbert space.
b. For n qubits, the Hilbert space has 2<sup>n</sup> dimensions.
c. Inner Product: A way to "multiply" two state vectors (e.g., ⟨φ|ψ⟩). Its
squared magnitude |⟨φ|ψ⟩|<sup>2</sup> gives the probability of state |ψ⟩
collapsing to state |φ⟩ upon measurement.
● Unitary Evolution – The "Rules of Motion":
a. The evolution of a closed quantum system (or a quantum computation via
gates) is always described by a unitary transformation.
b. U<sup>†</sup>U = I (where U<sup>†</sup> is the conjugate transpose of
U, and I is the identity matrix).
c. This ensures that the total probability is conserved (states remain
normalized).
d. Quantum computations are fundamentally reversible at the gate level.
physics & Math Essentials ( Tensor Products &
Hamiltonians)
Tensor Products – Describing Composite Quantum Systems:
a. When we have multiple qubits, the state space of the combined system is the tensor
product of the individual qubit Hilbert spaces.
b. If qubit A is in state |ψ<sub>A</sub>⟩ and qubit B is in state |ψ<sub>B</sub>⟩, the
combined state (if they are not entangled) is |ψ<sub>A</sub>⟩ ⊗ |ψ<sub>B</sub>⟩, often
written as |ψ<sub>A</sub>ψ<sub>B</sub>⟩ or |ψ<sub>A</sub>⟩|ψ<sub>B</sub>⟩.
c. Example: |0⟩ ⊗ |1⟩ = |01⟩.
d. Dimension of combined space = product of individual dimensions. (2-dim ⊗ 2-dim = 4-dim
for 2 qubits).
e. Entangled states (like Bell states) cannot be written as a simple tensor product of
individual qubit states – this is what makes them special.
Hamiltonians (H) – Operators of Energy and Dynamics:
a. In quantum mechanics, a Hamiltonian is an operator (a matrix) that corresponds to the
total energy of a system.
b. Its eigenvalues are the possible energy levels the system can have.
c. Its eigenvector corresponding to the lowest eigenvalue is the ground state of the
system.
d. Role in VQE: The cost function is ⟨H⟩ – the expectation value of the system's energy.
e. Role in QAOA: The problem is encoded into a cost Hamiltonian H<sub>C</sub>, and a
mixer Hamiltonian H<sub>M</sub> drives transitions.
f. Time Evolution: The Schrödinger equation dictates how a quantum state evolves in
time, governed by the system's Hamiltonian: iħ d/dt |ψ(t)⟩ = H|ψ(t)⟩. (Mention ħ briefly as
Planck's constant).
Classical ML Recap: Core Ideas for Context
Machine Learning (ML): Learning from Data
a. A subfield of Artificial Intelligence.
b. Algorithms that enable computer systems to learn patterns and make decisions from data,
without being explicitly programmed for each specific task.
Common ML Paradigms:
a. Supervised Learning: Learning from labeled data (input-output pairs).
i. Goal: Learn a mapping function from inputs to outputs.
ii. Tasks: Classification (predicting a category, e.g., spam/not spam), Regression
(predicting a continuous value, e.g., house price).
b.
c. Unsupervised Learning: Learning from unlabeled data.
i. Goal: Discover hidden patterns, structures, or relationships in the data.
ii. Tasks: Clustering (grouping similar data points), Dimensionality Reduction (reducing
number of features).
d.
e. Reinforcement Learning: Learning by interacting with an environment and receiving
rewards or penalties.
Key Components of (Supervised) ML:
a. Model: A mathematical function with tunable parameters (e.g., a neural network, a decision
tree).
b. Training Data: Labeled examples used to "teach" the model.
c. Loss Function (Cost Function): Measures how "wrong" the model's predictions are
compared to the true labels.
d. Optimization Algorithm: Adjusts the model's parameters to minimize the loss function (e.g.,
Why Optimization is Key in Classical ML
● Training ML Models IS Optimization: The process of "learning" in most machine learning
models (especially supervised learning) is fundamentally an optimization problem.
● The Goal: To find the set of model parameters (weights, biases in a neural network) that
minimizes the loss function on the training data.
● The Loss Landscape:
a. Imagine a high-dimensional landscape where each point represents a different set of
model parameters, and the "height" at that point is the value of the loss function.
b. Training means navigating this landscape to find the lowest possible valley (the global
minimum, or at least a very good local minimum).
●
● Challenges in Classical ML Optimization:
a. High Dimensionality: Modern neural networks can have millions or even billions of
parameters, creating an incredibly vast and complex loss landscape.
b. Non-Convexity: Loss landscapes for deep neural networks are typically non-convex,
meaning they have many local minima where an optimizer can get stuck.
c. Computational Cost: Calculating gradients and updating parameters for large models
and datasets is very computationally intensive and time-consuming.
d. Vanishing/Exploding Gradients: Problems that can hinder the training of deep
networks.
●
● Connection to Quantum: If quantum computers can offer speedups or new approaches for
certain types of optimization problems, they might be able to help train classical ML models
more efficiently or find better solutions.
●
Defining Quantum Machine Learning (QML)
● QML: The Intersection of Two Revolutions
a. An interdisciplinary field that explores the interplay between quantum computing and machine
learning.
● Two Main Directions of QML Research:
a. Quantum Algorithms for ML Tasks (QC for ML):
i. Using quantum computers to enhance or speed up classical machine learning tasks.
ii. This involves designing quantum algorithms for data analysis, classification,
regression, clustering, etc.
iii. Often focuses on processing classical data using quantum mechanics.
iv. This is the primary focus of our lecture series.
b.
c. Classical ML for Quantum Systems (ML for QC):
i. Using classical machine learning techniques to help design, control, calibrate, and
understand quantum computers and quantum systems.
ii. (We will touch upon this as the "AI-Quantum Synergy" later).
d.
●
● Goals of QML (QC for ML focus):
a. Achieve speedups for computationally expensive ML algorithms.
b. Develop models with better generalization (perform better on unseen data).
c. Create models that can learn from less data or handle more complex data structures.
d. Explore entirely new types of learning models inspired by quantum mechanics.
●
● Still an Emerging Field: Many theoretical proposals, active research, but practical, widespread
applications with proven quantum advantage are still largely in the future.
Motivations for QML – Why Bother?
● Addressing Classical ML Bottlenecks:
a. Computational Complexity: Training large models (e.g., deep neural nets) or processing
massive datasets can take days, weeks, or require huge compute clusters. QML hopes to
reduce this.
b. "Curse of Dimensionality": Many classical algorithms suffer as the number of features
(dimensions) in the data grows very large. Quantum state spaces can naturally handle high
dimensions.
c. Optimization Challenges: Finding optimal parameters in complex, non-convex loss
landscapes.
● Potential for Novel Capabilities:
a. Enhanced Feature Spaces: Quantum feature maps might project classical data into richer,
higher-dimensional Hilbert spaces where patterns become more apparent or easier to
separate.
b. New Models of Correlation: Entanglement could allow QML models to capture complex,
non-local correlations in data that are hard for classical models.
c. Sampling from Complex Distributions: Quantum systems might be better at generating
samples from very complex probability distributions, useful for generative models.
●
● Specific Algorithmic Speedups (Theoretical):
a. Quantum algorithms for linear algebra (e.g., HHL for matrix inversion) could accelerate parts
of some ML algorithms, if data loading and readout are efficient.
b. Grover's algorithm for search could speed up certain query-based learning tasks.
●
● Exploring the "Quantum Nature" of Data: For problems where the underlying data itself might
have quantum origins (e.g., data from quantum sensors, simulations of quantum systems), QML
might be a more natural fit.
Broad Categories of QML Algorithms
A Diverse Landscape of QML Approaches: (Details in Session 2)
1. Quantum-Enhanced Linear Algebra & Data Analysis:
a. Algorithms like HHL (for solving Ax=b), Quantum PCA (Principal Component Analysis).
b. Aim to speed up core linear algebraic subroutines common in many ML algorithms.
c. Often face challenges with data loading (QRAM) and state readout for practical impact.
2. Quantum Optimization for ML Model Training:
a. Using VQAs like QAOA or quantum annealers to solve optimization problems that arise
in ML.
b. Examples: Training support vector machines, finding optimal neural network weights
(less common for deep nets currently), feature selection.
3. Quantum Sampling & Generative Models:
a. Using quantum circuits to sample from complex probability distributions.
b. Quantum Boltzmann Machines (QBMs), Quantum Generative Adversarial Networks
(QGANs).
c. Potential for creating more powerful generative models.
4. Quantum Kernel Methods:
a. Use a quantum computer to estimate kernel functions K(x<sub>i</sub>, x<sub>j</sub>)
= |⟨φ(x<sub>i</sub>)|φ(x<sub>j</sub>)⟩|<sup>2</sup>.
b. Classical data x<sub>i</sub> is mapped to quantum states |φ(x<sub>i</sub>)⟩ via a
quantum feature map.
c. The quantumly computed kernel matrix is then used with classical algorithms like
Support Vector Machines (QSVM).
5. Variational Quantum Classifiers (VQCs) / Quantum Neural Networks (QNNs):
Quantum Feature Maps – Encoding Data into
Quantum States
● The Crucial First Step for QML with Classical Data: Before a quantum computer can process classical
data (vectors, images, text features), this data must be encoded into the state of qubits. This is done via a
quantum feature map.
● What is a Quantum Feature Map? Φ(x) → |Φ(x)⟩
a. A procedure (often a parameterized or fixed quantum circuit) that takes a classical data point x as
input.
b. It outputs a quantum state |Φ(x)⟩ that "encodes" x in a Hilbert space.
●
● Goals of a Good Feature Map:
a. To represent the classical data efficiently in the quantum state space.
b. To potentially map data to a higher-dimensional Hilbert space where it becomes more easily
separable or where new patterns emerge (similar to the classical "kernel trick").
c. To create quantum states whose inner products |⟨Φ(x<sub>i</sub>)|Φ(x<sub>j</sub>)⟩
|<sup>2</sup> (which can define a quantum kernel) capture useful notions of similarity between data
points x<sub>i</sub> and x<sub>j</sub>.
●
● Common Encoding Strategies:
a. Angle Encoding (Qubit Encoding): Classical features x<sub>k</sub> are encoded into the rotation
angles of single-qubit gates (e.g., R<sub>x</sub>(x<sub>k</sub>),
R<sub>y</sub>(x<sub>k</sub>)) applied to specific qubits.
b. Amplitude Encoding: A normalized classical vector of N elements is encoded into the
2<sup>n</sup> amplitudes of an n-qubit state (N=2<sup>n</sup>). Very qubit-efficient, but state
preparation can be complex.
c. Basis Encoding: Each distinct classical input is mapped to a unique computational basis state |x⟩.
Simple, but doesn't leverage superposition for encoding a single data point.
Flow Diagram of a Generic Hybrid QML Algorithm
(VQC-based)
Putting it All Together (Conceptual Flow for many NISQ QML models):
1. Classical Data Input:
a. Start with a classical dataset (e.g., feature vectors {x<sub>i</sub>} and labels
{y<sub>i</sub>}).
2. Quantum Feature Mapping (Data Encoding - on QPU or prepared for QPU):
a. For each classical data point x<sub>i</sub>, apply a quantum feature map Φ to encode
it into an initial quantum state |Φ(x<sub>i</sub>)⟩.
b. This might involve setting rotation angles on qubits based on x<sub>i</sub>.
3. Parameterized Quantum Circuit (PQC) / Ansatz (on QPU):
a. The state |Φ(x<sub>i</sub>)⟩ is then evolved by a PQC, U(θ), which has learnable
parameters θ.
b. Output state: |ψ(x<sub>i</sub>, θ)⟩ = U(θ)|Φ(x<sub>i</sub>)⟩.
4. Measurement (on QPU):
a. Measure one or more qubits of |ψ(x<sub>i</sub>, θ)⟩.
b. This yields classical measurement outcomes (bit strings).
5. Classical Post-Processing & Prediction (on CPU):
a. Convert measurement outcomes into a prediction ŷ<sub>i</sub> (e.g., a class label, a
probability, an expectation value).
b. This might involve averaging results from multiple shots.
6. Loss Function Calculation (on CPU):
The Promise and Current State of QML
● The Promise is Immense:
a. Potential for exponential speedups in certain linear algebra tasks (HHL).
b. Quadratic speedups in search-like components (Grover).
c. Access to vastly larger feature spaces via quantum feature maps.
d. Novel ways to model correlations and probability distributions.
e. Possibility of more powerful or efficient learning models.
● Current State: Excitement Tempered by Realism
a. Largely Theoretical & Experimental: Many QML algorithms are
theoretical proposals or have been demonstrated on very small-scale, toy
problems using simulators or limited NISQ hardware.
b. "Quantum Advantage" for ML is Not Yet Proven: There is currently no
definitive, practical QML application that clearly outperforms state-of-the-art
classical ML on real-world datasets for a useful task.
c. NISQ Limitations are a Major Bottleneck: Noise, limited qubit counts, and
short coherence times severely restrict the size and complexity of QML
models that can be implemented.
d. Data Loading & Readout Challenges: As discussed, these remain
significant hurdles.
e. Barren Plateaus & Trainability: Training VQC-based QML models can be
very difficult.
●
● Active and Rapidly Evolving Research Field:
a. Focus on developing NISQ-friendly QML algorithms.
b. Designing better quantum feature maps and ansätze.
c. Benchmarking QML models against classical counterparts rigorously.
The Synergy – AI Enhancing Quantum Computing (
● A Two-Way Street: So far, we've focused on how quantum computing might enhance AI/ML.
● Flipping the Script: Now, let's briefly explore how classical Artificial Intelligence, particularly
Machine Learning, is helping to advance the field of quantum computing itself.
● Why is AI Needed for Quantum Computing?
a. Extreme Complexity: Building, controlling, and understanding quantum computers is
an incredibly complex scientific and engineering endeavor.
b. Sensitivity: Qubits are exquisitely sensitive to their environment.
c. Vast Parameter Spaces: Optimizing control pulses, calibrating devices, designing
circuits involves navigating enormous search spaces.
d. Large Data Volumes: Quantum experiments generate complex data requiring
sophisticated analysis.
e. Non-Intuitive Behavior: Quantum mechanics often defies classical intuition.
●
● Classical AI/ML Strengths to the Rescue:
a. Pattern Recognition: Identifying subtle patterns in noisy, high-dimensional quantum
data.
b. Optimization: Finding optimal solutions in complex parameter spaces.
c. Automation: Automating tedious calibration and control tasks.
d. Model Building: Creating predictive models of quantum systems even when
underlying physics is not fully known.
●
● This AI-Quantum Synergy is Accelerating Progress in QC.
●
AI for Quantum Control & Calibration
● Challenge: Precision Qubit Manipulation
a. Quantum gates must be performed with extremely high fidelity.
b. This requires precisely shaped control pulses (microwave, laser).
c. Finding optimal pulse shapes manually is difficult due to complex qubit responses
and environmental factors.
● AI Solution 1: Reinforcement Learning (RL) for Pulse Shaping
a. An RL agent learns to design optimal control pulses.
b. State: Current pulse parameters or qubit response.
c. Action: Modify pulse parameters.
d. Reward: Measured gate fidelity or speed.
e. The agent iteratively explores and refines pulses to maximize fidelity, often
outperforming human-designed pulses.
●
● AI Solution 2: Bayesian Optimization / ML Surrogates for Calibration
a. Quantum devices need frequent, complex calibration (tuning frequencies, gate
parameters).
b. Bayesian optimization can efficiently find optimal device settings by minimizing the
number of slow experimental measurements.
c. ML models can learn surrogate models of the device response, allowing faster
optimization in simulation before applying to hardware.
●
● Benefits: Higher gate fidelities, reduced calibration time, adaptation to hardware drifts.
● Analogy: AI as a "Super-Tuner" for a delicate quantum orchestra, finding the perfect way
to "play" each qubit.
●
AI for Quantum Device Characterization
● Challenge: Understanding Your Quantum Hardware
a. To improve quantum devices and algorithms, we need to accurately characterize
their properties and imperfections.
b. Measuring qubit coherence times (T1, T2), gate fidelities, crosstalk rates, noise
spectra is complex and data-intensive.
● AI Solution 1: Automated Experiment Design & Analysis
a. ML can optimize the characterization process itself.
b. Bayesian Experimental Design: AI suggests the most informative measurements
to perform next to learn device parameters most efficiently, reducing the total
number of experiments needed.
c. ML models (e.g., neural networks) can be trained to rapidly analyze the raw
experimental data (e.g., measurement traces) and extract key parameters or
recognize signatures of different noise processes.
●
● AI Solution 2: Anomaly Detection for Identifying Faults
a. In large quantum processors, pinpointing underperforming qubits, faulty couplers, or
unexpected noise sources can be like finding a needle in a haystack.
b. AI-based anomaly detection algorithms can sift through device performance data
(from many calibration runs or user experiments) to automatically flag outliers or
unusual behaviors that might indicate a problem.
c. This guides physicists to areas requiring closer inspection and debugging.
●
● Benefits: Faster and more comprehensive device characterization, quicker identification of
hardware issues, leading to improved qubit quality and device design.
● Analogy: AI as a "Master Detective" meticulously examining a complex quantum machine,
AI for Quantum Error Correction/Mitigation
● The Enduring Problem of Quantum Errors: Noise is unavoidable in NISQ devices, and
even future fault-tolerant computers will rely on correcting errors.
● Quantum Error Correction (QEC): Actively Correcting Errors
a. QEC codes (e.g., surface code) encode logical information into many physical qubits.
b. "Syndrome" measurements detect errors without disturbing the logical state.
c. A classical "decoder" algorithm infers the most likely error from the syndrome and
suggests corrections.
d. AI for QEC Decoders: Training ML models (e.g., neural networks, RL agents) to act
as decoders. They can learn complex error-syndrome relationships, potentially
outperforming traditional decoders for certain noise models or code types.
●
● Quantum Error Mitigation (QEM): Reducing Noise Impact (NISQ focus)
a. Techniques used when full QEC is not available.
b. Aim to estimate the ideal, noise-free result from noisy experimental outcomes.
c. Examples: Zero-Noise Extrapolation (ZNE), Probabilistic Error Cancellation (PEC),
Readout Error Mitigation.
d. AI for QEM: ML can help learn accurate noise models needed for QEM techniques, or
optimize QEM parameters, or even learn to directly map noisy results to mitigated
results.
●
● Benefits: Improved reliability of quantum computations, pushing the boundaries of what's
possible with noisy hardware.
● Analogy: AI as a "Super-Doctor" for quantum computations, either performing "surgery"
(QEC) to fix errors or providing "rehabilitative therapy" (QEM) to recover the best possible
outcome from a noisy system.
AI for Quantum Circuit Compilation & Synthesis
● Challenge: From Algorithm to Hardware Execution
a. A quantum algorithm is often expressed abstractly or using gates not directly
available on specific hardware.
b. Quantum hardware has constraints: limited qubit connectivity (topology), a native
gate set, gate error rates.
● Quantum Compilation: The process of translating a high-level quantum circuit into a
low-level sequence of physical gate operations executable on a target quantum device,
while optimizing for fidelity and resource usage.
● Key Compilation Tasks where AI Can Help:
a. Gate Synthesis/Decomposition: Breaking down a desired complex unitary
operation (e.g., a multi-qubit gate) into a sequence of available native hardware
gates (e.g., single-qubit rotations and CNOTs). AI can search for shorter, more
efficient decompositions.
b. Qubit Mapping/Routing: Assigning logical qubits in the algorithm to physical qubits
on the chip, and inserting SWAP gates if necessary to enable interactions between
non-adjacent qubits, while minimizing SWAP overhead. RL and search heuristics
are used.
c. Circuit Optimization/Reduction: Applying rewrite rules or transformations to
reduce the overall gate count or circuit depth, thereby minimizing accumulated
error. AI can learn effective optimization policies.
●
● Benefits: More efficient circuits, reduced error rates, better utilization of quantum
hardware.
● Analogy: AI as a "Master Architect & Smart Translator" for quantum blueprints, adapting a
grand design to the specific building codes and materials of a particular construction site
AI for Discovering Quantum Algorithms & Experiments
● The Creative Frontier: Can AI assist in the human endeavor of discovering entirely new
quantum algorithms or designing novel quantum experiments?
● AI for Algorithm Discovery:
a. Genetic Programming / Evolutionary Algorithms: "Evolve" populations of quantum
circuits (sequences of gates) by applying principles of natural selection.
i. Circuits are "mutated" and "crossed-over."
ii. A "fitness function" evaluates how well each circuit solves a target problem or
prepares a desired state.
iii. Promising circuits "survive" and "reproduce."
b.
c. Reinforcement Learning: An RL agent learns a policy for constructing a quantum
circuit step-by-step (gate by gate) to achieve a specific computational goal, receiving
rewards for efficiency or correctness.
d. Has shown success in finding novel, compact circuits for specific small-scale tasks or
state preparation.
●
● AI for Designing Quantum Experiments:
a. For physicists exploring new quantum phenomena or optimizing complex experimental
setups (e.g., for quantum sensing, creating exotic states of matter).
b. AI can suggest new experimental configurations or parameter settings by learning a
model of the complex quantum system from past experimental data.
c. Can help navigate vast parameter spaces to find regions of interesting physical
behavior or optimal sensor performance.
●
● Human-AI Collaboration: Often, AI acts as a powerful assistant or a source of inspiration for
Quantum Architecture Search (QAS) with ML
● A Specific Application of AI for Design: Quantum Architecture Search (QAS) focuses on
automatically designing the structure (architecture) of Parameterized Quantum Circuits (PQCs) or
ansätze, especially for Variational Quantum Algorithms.
● The Challenge of Ansatz Design:
a. The performance of a VQA (like VQE or QAOA, or a VQC for QML) heavily depends on the
chosen ansatz architecture.
b. Manually designing optimal ansätze for new problems or different hardware is difficult,
time-consuming, and requires expert intuition.
●
● QAS using Machine Learning:
a. Leverages classical ML techniques (often RL or evolutionary algorithms) to search through a
vast space of possible PQC structures.
b. Search Space: Defines the types of gates, connectivity, and layering patterns allowed.
c. Search Strategy: How the ML algorithm explores this space (e.g., RL agent adding/removing
gates, evolutionary algorithm mutating circuit structures).
d. Performance Evaluation: How a candidate PQC architecture is scored (e.g., accuracy on a
validation task, estimated ground state energy, circuit depth, trainability metrics like gradient
variance).
●
● Goal: To find PQC architectures that are:
a. Expressive enough to solve the problem.
b. Trainable (avoiding barren plateaus).
c. Hardware-efficient (low depth, few CNOTs).
●
● Benefits: Potential for discovering novel, high-performing PQCs tailored to specific problems and
AI for Analyzing Quantum Data
Challenge: Extracting Insights from Complex Quantum Data
a. Quantum experiments and simulations (both classical and quantum) can generate large,
high-dimensional, and often noisy datasets.
b. Examples: Measurement outcomes from many shots, qubit state tomography data, outputs of
quantum sensors.
c. Manually sifting through this data for meaningful patterns or physical insights can be
overwhelming.
AI Solutions for Quantum Data Analysis:
a. Quantum State Classification/Characterization:
i. Training ML models (e.g., CNNs, SVMs) to directly classify quantum states based on
measurement data, without needing full state tomography.
ii. E.g., "Is this state entangled?", "Which quantum phase of matter does this data
represent?".
b.
c. Pattern Recognition in Simulation Outputs:
i. Using unsupervised learning (clustering, dimensionality reduction like PCA or
autoencoders) to find hidden structures, phases, or transitions in data from large-scale
quantum simulations.
d.
e. Improving Quantum Sensing:
i. ML can enhance the precision of quantum sensors by learning to filter noise from sensor
readouts or by optimizing sensor control protocols based on incoming data.
f.
g. Automated Anomaly Detection in Experimental Data Streams.
Real-World Examples of AI for QC
● This Synergy is Not Just Theoretical – It's Happening Now!
● Example 1: Google Quantum AI – Automated Qubit Calibration & Control
a. Used reinforcement learning and neural networks to automate the complex
calibration of their superconducting quantum processors (e.g., Sycamore).
b. AI agents learned to tune qubit parameters faster and sometimes better
than manual or traditional automated methods.
c. Reported significant reductions in calibration time.
●
● Example 2: IBM Quantum – Noise Characterization & Error Mitigation
a. Leverage ML techniques to build accurate noise models for their devices
from experimental data.
b. These models are then used to improve the effectiveness of quantum error
mitigation strategies, leading to more accurate results from their NISQ
computers.
●
● Example 3: University Research Labs Worldwide – Diverse Applications
a. ML for designing QEC decoders (e.g., at Sherbrooke, Sydney).
b. AI for discovering new quantum optical experiment setups (e.g., in Vienna,
Innsbruck).
c. ML for classifying phases of matter from simulated or experimental data.
d. Using generative models (classical) to propose new ansatz structures for
VQAs.
●
● Key Takeaway: AI is becoming an indispensable toolkit for researchers pushing the
frontiers of quantum computing hardware and software.
Getting Hands-On: Simulators
● Your Gateway to Quantum Exploration: You don't need access to a multi-million dollar quantum
computer to start learning and experimenting!
● Quantum Simulators: Classical software programs that simulate the behavior of a quantum
computer on your classical computer (laptop, desktop).
● How They Work:
a. Represent quantum states as complex vectors and quantum gates as matrices.
b. Perform matrix-vector multiplications to simulate gate operations.
c. Can simulate ideal, noise-free quantum circuits.
d. Many can also model different types of noise to mimic real NISQ devices.
●
● Popular Simulators (often part of larger SDKs):
a. Qiskit Aer (IBM): High-performance simulators (statevector, qasm_simulator for noise).
b. PennyLane's Excellent for QML, differentiable.
c. Cirq's built-in simulators (Google).
d. Microsoft Quantum Development Kit simulators.
●
● Advantages of Simulators:
a. Accessible (often free, open-source).
b. Allow full access to the quantum state vector (for debugging, understanding – something
you can't do on real hardware).
c. Faster for small numbers of qubits.
d. Repeatable, controllable environment.
●
● Limitations of Simulators:
a. Memory & Speed: Simulating N qubits classically requires storing and manipulating
Accessing Real Quantum Hardware via the Cloud
● Beyond Simulation: Running on Actual QPUs (Quantum Processing
Units)
● Cloud-Based Access: Most quantum hardware providers offer access
to their devices via cloud platforms.
● You write your quantum program locally (using SDKs like Qiskit,
PennyLane, Cirq, Braket).
● You submit your program (circuit) as a "job" to a queue for a specific
QPU.
● The job runs on the real quantum hardware in a specialized facility.
● Results (measurement outcomes) are returned to you via the cloud.
● Major Cloud Platforms & Providers:
● IBM Quantum Experience / IBM Quantum Platform: Access to IBM's
fleet of superconducting qubit devices. Free tier available. (Uses
Qiskit).
● Amazon Braket: Access QPUs from multiple hardware partners (e.g.,
IonQ, Rigetti, Oxford Quantum Circuits) and D-Wave annealers, plus
managed simulators.
● Microsoft Azure Quantum: Access to hardware from IonQ,
Quantinuum, Pasqal, Rigetti, etc., plus optimization solutions.
● Google Quantum AI: Access to their Sycamore and other processors
(often for research collaborators). (Uses Cirq).
● Quantinuum: Access to their high-fidelity trapped-ion quantum
computers (e.g., H-Series).
Key Open-Source Software Stacks (Qiskit, PennyLane)
● Empowering Developers and Researchers: Open-source software development kits
(SDKs) are crucial for the growth of quantum computing and QML.
● Qiskit (IBM): A Comprehensive Quantum Toolkit
a. Full-stack open-source framework for working with quantum computers at the level of
circuits, pulses, and application modules.
b. Terra: Foundation for composing quantum programs (circuits).
c. Aer: High-performance simulators (statevector, qasm, unitary, noise modeling).
d. Ignis (Legacy, functionality moved): Characterization and error mitigation (now
integrated into Qiskit Experiments and Terra).
e. Aqua (Legacy, functionality moved): Algorithms for NISQ applications including AI,
optimization, chemistry (now in Qiskit Nature, Qiskit Finance, Qiskit Optimization,
Qiskit Machine Learning).
f. Qiskit Machine Learning: Specific module for QML algorithms (VQCs, QSVM,
Quantum Kernels).
g. Allows execution on IBM Quantum hardware and simulators.
●
● PennyLane (Xanadu): Quantum Differentiable Programming
a. Python library for QML, quantum chemistry, and quantum optimization.
b. Focuses on quantum differentiable programming: allows automatic differentiation
of quantum circuits, essential for gradient-based training of VQCs.
c. Integrates with familiar ML libraries like NumPy, PyTorch, TensorFlow.
d. Hardware-agnostic: supports many different quantum simulators and hardware
backends (IBM, Google, Rigetti, IonQ, AWS Braket, etc.) through a plugin system.
e. Excellent for rapid prototyping and research in VQAs and QML.
●
Current Research Hotspots & Challenges in QML
Foundations
● An Active and Evolving Landscape: The foundations of QML are still being actively
explored and debated.
● Key Research Questions & Challenges:
a. Demonstrating Practical Quantum Advantage for ML:
i. The "holy grail": Finding a real-world ML task where a QML algorithm
provably and practically outperforms the best classical algorithms. Still
elusive.
b.
c. Effective Data Encoding / Quantum Feature Maps:
i. How to best represent classical data in quantum states to leverage quantum
properties?
ii. Designing feature maps that are efficient to implement and lead to better
model performance.
iii. Avoiding the "data loading bottleneck."
d.
e. Trainability of Parameterized Quantum Circuits (VQCs/QNNs):
i. Mitigating barren plateaus.
ii. Developing better ansatz architectures (expressive yet trainable).
iii. More robust classical optimization strategies for noisy quantum cost
functions.
f.
g. Understanding the Role of Entanglement and Other Quantum Resources:
i. When and how much entanglement is truly beneficial (or necessary) for
QML advantage?
ii. What other quantum phenomena (e.g., contextuality, non-locality) can be
The Long Road to Fault-Tolerant Quantum Computing
(FTQC)
Beyond NISQ: The Ultimate Goal: While NISQ allows for exploration and potential near-term
advantages, the full power of many quantum algorithms (Shor's, Grover's for large N, complex
QML) requires Fault-Tolerant Quantum Computing (FTQC).
What is FTQC?
a. Quantum computers that can actively correct errors as they occur during computation.
b. Relies on Quantum Error Correction (QEC) codes.
Quantum Error Correction (QEC) Basics:
a. Encodes information of one "logical qubit" (error-protected) across many "physical
qubits."
b. Redundancy allows detection and correction of errors on physical qubits without
disturbing the logical information.
c. Example: Surface code, Steane code.
The Overhead of QEC:
a. Requires a large number of physical qubits for each logical qubit (e.g., estimates range
from hundreds to thousands of physical qubits for one useful logical qubit, depending on
physical error rates).
b. Also requires complex classical processing for decoding syndromes and applying
corrections in real-time.
Timescale: Achieving FTQC with a significant number of logical qubits is a long-term endeavor,
likely many years or even decades away for complex problems.
Impact of FTQC on QML:
a. Would enable much deeper and wider quantum circuits for QML.
The Interdisciplinary Future – Your Role?
● A Confluence of Expertise: QML is not just for quantum physicists or just for ML experts. Its
advancement requires a deep collaboration across many disciplines.
● Skills Needed in the QML Ecosystem:
a. Quantum Physicists/Engineers: Designing and building better quantum hardware,
understanding quantum information theory.
b. Computer Scientists (Theoretical & Applied): Designing new quantum algorithms,
analyzing their complexity, developing quantum software and compilers.
c. Machine Learning Researchers/Practitioners: Identifying ML problems suitable for
quantum approaches, designing hybrid algorithms, benchmarking QML vs. classical,
understanding learning theory in a quantum context.
d. Mathematicians: Formalizing concepts, developing new mathematical tools for
quantum information and learning.
e. Domain Experts (Chemistry, Finance, Materials, etc.): Identifying high-impact
problems in their fields where QML could provide solutions.
f. Software Engineers: Building the SDKs, cloud platforms, and tools that enable QML
research and development.
●
● Opportunities for Undergraduates:
a. Learn the Fundamentals: Solid grounding in linear algebra, probability, calculus,
basic programming, and introductory quantum mechanics/computing.
b. Explore Open-Source Tools: Get hands-on with Qiskit, PennyLane, etc., using
simulators.
c. Read Research Papers & Attend Seminars: Stay curious and updated.
d. Consider Interdisciplinary Projects/Research: Look for opportunities at the
intersection of fields.
Summary of Key Takeaways
● Quantum Computing Basics:
a. Qubits: Use superposition (α|0⟩ + β|1⟩) and entanglement for power.
b. Quantum Gates & Circuits: Manipulate qubits via unitary operations.
c. Measurement: Probabilistic collapse to classical bits.
● Quantum vs. Classical:
a. QC offers potential speedups for specific hard problems (factoring, search,
simulation, some optimization). Not a universal replacement.
b. Currently in the NISQ era (noisy, intermediate-scale, no fault tolerance).
●
● Key Algorithmic Principles & Examples:
a. Interference is crucial for amplifying correct answers.
b. Deutsch-Jozsa, Grover, Shor, QPE are foundational examples of quantum
power.
c. Variational Quantum Algorithms (VQAs) like VQE and QAOA are hybrid
approaches suited for NISQ, using parameterized quantum circuits and
classical optimizers.
●
● QML Foundations:
a. QML aims to use QC to enhance ML tasks.
b. Data encoding (feature maps) and trainability (barren plateaus) are key
challenges.
●
● AI-Quantum Synergy: Classical AI/ML is vital for advancing QC hardware, control,
error handling, and algorithm design.
● Tools: Simulators and cloud platforms provide access for learning and research.
Q&A and Thank You