First time studying this topic?

Launch the interactive walkthrough to discover each component, including the 3D Q-Sphere Lab & Python in Colab.

Topic 5.14

Real-World Applications of Quantum Computing

Survey industries poised for disruption: Quantum Chemistry, Drug Discovery, Financial Portfolio Optimization, Logistics, and Cryptography.

Learning Objectives

  • ✓Analyze primary industrial domains primed for quantum advantage
  • ✓Understand Molecular Simulation and ground-state energy computation
  • ✓Examine Quantum Combinatorial Optimization (QAOA, VQE) in supply chain logistics

📖Let's Begin with a Story

In 2020, pharmaceutical researchers synthesized millions of candidate molecules in the race to develop treatments for COVID-19. Testing drug molecules in biological wet labs takes 10 to 15 years and costs over $2.5 billion per approved therapeutic drug, with a 90% failure rate in human clinical trials. Why? Because classical computers cannot simulate how complex folded proteins bond with drug candidates at the quantum mechanical electron level. With quantum computers, biochemists will simulate molecular binding affinity in silico with atomic precision before synthesizing a single chemical drop in the lab. Quantum computing promises to compress a 10-year drug discovery pipeline into weeks.

Why Should You Learn Real-World Applications of Quantum Computing?

🎯 Practical & Engineering Stakes

Commercial value creation

Quantum computing is not an academic exercise. McKinsey estimates that quantum computing will create over $1.3 Trillion in corporate value across chemistry, finance, automotive, and logistics by 2035.

🎮 Fun Learning Zone

Grasp complex quantum concepts visually with zero prior physics or math knowledge!

Zero Prerequisites
Visual Concept Storyboard

The Molecular Master Keymaker & The Bacterial Superpower

Haber-Bosch Factory (2% World Energy)
🏭 ♨️ ⚡

Brutal 450°C, 200 atm Pressure

Crushing energy cost because classical computers can't simulate catalysts.

Clover Root Bacteria & Drug Keymaker
☘️ 🦠 🔑

Pleasant Room Temperature Nitrogenase

Quantum simulation unlocks bacteria's enzyme secrets and custom cure keys!

Classical: Serial / ConstrainedQuantum: Coherent Wave Parallelism
Visual takeaway: Understand in 5 seconds

Everyday Analogy: The Molecular Master Keymaker & The Bacterial Superpower

Every single year, human chemical factories consume roughly 2% of the entire planet Earth’s electricity and natural gas just to manufacture synthetic nitrogen fertilizer (the Haber-Bosch process). To force nitrogen and hydrogen atoms to bond into ammonia, we have to cook them at a brutal 450°C under 200 atmospheres of crushing pressure! Yet, right outside in your garden, humble bacteria living on the roots of clover plants produce natural fertilizer at pleasant room temperature without breaking a sweat, using a single enzyme called nitrogenase. Why can’t humanity copy this bacteria? Because simulating the quantum electron dance of nitrogenase would require a classical supercomputer larger than the solar system!
🧪

Interactive Mental Sandbox

Try It Yourself
Molecular Master Keymaker (Nitrogenase Catalyst)

Simulate room-temperature bacterial fertilizer vs industrial Haber-Bosch.

Click "Classical Trial & Error" or "Quantum Hamiltonian Sim" to test discovery speed!

📖 The Thought Experiment Prompt:“Think of diseases like Alzheimer’s, cancer, or viral infections as locks with intricate 3D keyholes made of proteins. Today, pharmaceutical companies test millions of chemical candidate molecules by trial-and-error in test tubes, taking 10 to 15 years and billions of dollars. A fault-tolerant quantum computer acts as a digital molecular microscope: it can simulate the exact electronic binding energy of drug molecules in seconds, designing perfect cure keys on demand.”

✨ The "Aha!" Moment

Quantum computing is the ultimate design tool for nature: cracking room-temperature fertilizer, designing room-temperature superconductors, building 10x denser EV batteries, and inventing life-saving medicines!

What Is It?

Simple Explanation

Where quantum computers will change the world: 1. Medicine: Designing custom cancer therapies atom-by-atom on a screen. 2. Clean Energy: Designing room-temperature superconductors that transmit electricity with zero power loss. 3. Logistics: Routing 100,000 FedEx delivery planes and ships in the optimal fuel-saving path. 4. Finance: Finding the most profitable investment portfolios under complex market risks.

Technical Explanation

Quantum computing applications target problems whose mathematical structure maps to: - Quantum Simulation: Hamiltonian simulation e−iHte^{-iHt} for quantum chemistry and material science. - Combinatorial Optimization: Quadratic Unconstrained Binary Optimization (QUBO) mapped to Ising spin Hamiltonians solved via Quantum Approximate Optimization Algorithm (QAOA). - Linear Systems: Inverting N×NN \times N sparse matrices in O(poly(log⁡N))O(\text{poly}(\log N)) via the Harrow-Hassidim-Lloyd (HHL) algorithm.

📚 Key Terms

Variational Quantum Eigensolver (VQE)

Simple: A hybrid algorithm where a quantum computer works with a classical computer to find the lowest energy of a molecule.
Technical: Hybrid quantum-classical algorithm using parameterized quantum circuits to minimize expectation values ⟨ψ(θ)∣H∣ψ(θ)⟩\langle \psi(\theta) | H | \psi(\theta) \rangle via classical gradient descent.

QAOAQAOA

Simple: A quantum algorithm designed to find the best solution to complex scheduling and logistics puzzles.
Technical: Quantum Approximate Optimization Algorithm for combinatorial optimization on NISQ hardware.

Q-Sphere Lab: Real-World Applications of Quantum Computing

IBM Q-Sphere Model

Interactive 3D state vector exploration, unitary transformation gates, and Born rule collapse for Topic 5.14

Azimuth: 45°Elevation: 25°
+Z |0⟩-Z |1⟩+X |+⟩+Y |+i⟩01|ψ⟩
Q-Sphere Phase Color:
0 π/2 π 3π/2

Quantum Statevector

dim(H) = 2
|ψ⟩ = (1.000 + 0.000i)|0⟩
     + (0.000 + 0.000i)|1⟩
Polar Angle (θ):0.0° (0.000π rad)
Phase Angle (ϕ):0.0° (0.000π rad)

Born Rule Probabilities: P(x) = |⟨x|ψ⟩|²Σ P = 1.00

P(|0⟩) = |α|²100.0%
P(|1⟩) = |β|²0.0%
Quantum Measurement

Apply Single-Qubit Unitary Gates

Presets:
Continuous Polar Angle θ (0° = |0⟩, 180° = |1⟩):0.0°
Continuous Phase Angle ϕ (0° to 360°):0.0°
Recent Operations Log:
#1Initial state: |0⟩

📐 Mathematical Foundation

LaTeX KaTeX
TGrover=O(N)vsTclassical=O(N)T_{\text{Grover}} = \mathcal{O}(\sqrt{N}) \quad \text{vs} \quad T_{\text{classical}} = \mathcal{O}(N)

What does it mean?

Grover's Search Speedup: Quadratic speedup for searching unsorted databases, unstructured search spaces, or brute-forcing symmetric encryption keys (AES).

Understanding the Symbols

Symbol / TermMeaningBeginner Interpretation
NNSize of database / search spaceTotal items to search through
O(N)\mathcal{O}(N)Classical linear search complexityChecking items one-by-one sequentially
O(N)\mathcal{O}(\sqrt{N})Quantum Grover complexityAmplifying the correct item amplitude using wave interference

📊 Numerical Example

Searching an unsorted database of 1 trillion items (N = 10^12):

Classical Search Steps: Average checks: N / 2 = 10^12 / 2 = 500,000,000,000 checks At 1,000 checks/sec = 500,000,000 seconds ≈ 15.8 YEARS! Quantum Grover Search Steps: Optimal checks: (π/4) × √(10^12) = 0.785 × 1,000,000 = 785,000 checks At 1,000 checks/sec = 785 seconds ≈ 13 MINUTES!

Result: Reduces search time from 15.8 years to 13 minutes (a 637,000× real-world speedup).

📐 Mathematical Foundation

LaTeX KaTeX
TShor=O((log⁡2N)3)vsTclassical=O(e1.9(ln⁡N)1/3(ln⁡ln⁡N)2/3)T_{\text{Shor}} = \mathcal{O}\left((\log_2 N)^3\right) \quad \text{vs} \quad T_{\text{classical}} = \mathcal{O}\left(e^{1.9 (\ln N)^{1/3} (\ln \ln N)^{2/3}}\right)

What does it mean?

Shor's Factoring Breakthrough: Exponential speedup for factoring large composite integers and computing discrete logarithms, breaking classical RSA and ECC public-key cryptography.

Understanding the Symbols

Symbol / TermMeaningBeginner Interpretation
NNThe large composite RSA numberProduct of two prime numbers p×qp \times q
log⁡2N\log_2 NKey length in bits (k)Number of binary digits (e.g., 2,048 bits for RSA-2048)
(log⁡2N)3(\log_2 N)^3Polynomial time complexityFeasible computation in hours or days on a quantum computer
e...e^{...}Sub-exponential complexity (GNFS)Classical factoring complexity requiring billions of years

📊 Numerical Example

Factoring a 2,048-bit RSA key (k = 2,048):

Classical GNFS: Requires ~10^30 operations At 1 quadrillion ops/sec = ~31.7 billion years (> age of universe: 13.8 billion years) Quantum Shor's Algorithm: Requires ~(2,048)^3 ≈ 8.59 × 10^9 operations At 1 MHz gate clock rate ≈ 8,590 seconds ≈ 2.4 HOURS!

Result: Breaks RSA-2048 in a few hours on a fault-tolerant quantum computer.

⚙️ How Does It Work?

1

Problem Mapping

Translate business problem (e.g. traveling salesperson or chemical molecule) into an Ising spin Hamiltonian matrix H.

2

Hybrid Optimization

Quantum computer evaluates quantum expectation values; classical optimizer updates circuit parameters theta.

3

Convergence

Iterate until minimum energy ground state reveals optimal logistical schedule or molecular energy.

🌍 Where Is It Used?

Air Traffic Optimization (Airbus)

Problem: Routing hundreds of aircraft through airport runways during severe thunderstorm disruptions.

Solution: QAOA combinatorial algorithms compute optimal gate reassignments in seconds.

Financial Risk Management (Goldman Sachs / JPMorgan)

Problem: Pricing complex multi-asset derivatives using Monte Carlo simulation requires hours of compute.

Solution: Quantum Amplitude Estimation achieves quadratic speedup ($O(1/\epsilon)$ vs $O(1/\epsilon^2)$).

🎯 Try It Yourself

Which of the following problems is best suited for a Quantum Computer rather than a classical computer?

Interactive activity component

🐍 Python Hands-On: Quantum Chemistry with VQE: Ground State Energy of Hydrogen Molecule (H2)

Simulate the electronic ground state energy of the H2 molecule using PySCFDriver, JordanWignerMapper, TwoLocal ansatz, and the VQE algorithm in Qiskit Nature.

Open Colab

1Install Required Packages

For Google Colab or Jupyter notebooks, run this shell command to install the required dependencies:

Terminal / Notebook Install Commandbash
!pip install qiskit qiskit-nature qiskit-algorithms pyscf
Packages:
qiskitqiskit-natureqiskit-algorithmspyscf

2Import Libraries

Import Statementspython
1import numpy as np
2from qiskit_nature.second_q.drivers import PySCFDriver
3from qiskit_nature.second_q.problems import ElectronicStructureProblem
4from qiskit_nature.second_q.transformers import FreezeCoreTransformer
5from qiskit_nature.second_q.mappers import JordanWignerMapper
6from qiskit.circuit.library import TwoLocal
7from qiskit_algorithms import VQE
8from qiskit_algorithms.optimizers import COBYLA
9from qiskit.primitives import Estimator

import numpy as np → NumPy math library

from qiskit_nature.second_q.drivers import PySCFDriver → Hartree-Fock quantum chemistry driver

from qiskit_nature.second_q.problems import ElectronicStructureProblem → Electronic structure Hamiltonian formulation

from qiskit_nature.second_q.transformers import FreezeCoreTransformer → Core electron orbital freezing approximation

from qiskit_nature.second_q.mappers import JordanWignerMapper → Fermionic to qubit operator mapping

from qiskit.circuit.library import TwoLocal → Parameterized variational ansatz circuit

from qiskit_algorithms import VQE → Variational Quantum Eigensolver solver

from qiskit_algorithms.optimizers import COBYLA → Derivative-free classical optimizer

from qiskit.primitives import Estimator → Qiskit primitive for expectation value evaluation

3Demonstration Code & Logic

Python Execution Codepython
1# Define molecule (H2) geometry with 0.735 Angstrom bond distance
2molecule_geometry = "H 0 0 0; H 0 0 0.735"
3
4# Use PySCFDriver to compute molecular integrals with STO-3G basis set
5driver = PySCFDriver(atom=molecule_geometry, basis="sto3g")
6es_problem = ElectronicStructureProblem(driver)
7
8# Apply freeze-core approximation
9transformer = FreezeCoreTransformer()
10es_problem = transformer.transform(es_problem)
11
12# Map fermionic creation/annihilation operators to qubit Pauli terms
13mapper = JordanWignerMapper()
14hamiltonian = mapper.map(es_problem.hamiltonian.second_q_op())
15
16# Define variational ansatz (TwoLocal circuit with Ry, Rz and CZ gates)
17ansatz = TwoLocal(rotation_blocks=["ry", "rz"], entanglement_blocks="cz")
18
19# Set up COBYLA optimizer and Estimator primitive
20optimizer = COBYLA(maxiter=100)
21estimator = Estimator()
22
23# Execute Variational Quantum Eigensolver (VQE)
24vqe = VQE(estimator, ansatz, optimizer)
25result = vqe.compute_minimum_eigenvalue(hamiltonian)
26print(f"Estimated ground state energy: {result.optimal_value:.4f} Hartree")
Step-by-Step Code Breakdown:

# Define molecule (H2) geometry with 0.735 Angstrom bond distance

Molecular geometry

molecule_geometry = "H 0 0 0; H 0 0 0.735"

H2 spatial coordinates

# Use PySCFDriver to compute molecular integrals with STO-3G basis set

Driver setup

driver = PySCFDriver(atom=molecule_geometry, basis="sto3g")

PySCF electronic driver

es_problem = ElectronicStructureProblem(driver)

Electronic structure problem

# Apply freeze-core approximation

Core transformation

transformer = FreezeCoreTransformer()

Freeze core transformer

es_problem = transformer.transform(es_problem)

Reduce active space

# Map fermionic creation/annihilation operators to qubit Pauli terms

Qubit mapping

mapper = JordanWignerMapper()

Jordan-Wigner transformation

hamiltonian = mapper.map(es_problem.hamiltonian.second_q_op())

Qubit Hamiltonian

# Define variational ansatz (TwoLocal circuit with Ry, Rz and CZ gates)

Ansatz

ansatz = TwoLocal(rotation_blocks=["ry", "rz"], entanglement_blocks="cz")

Hardware-efficient ansatz

# Set up COBYLA optimizer and Estimator primitive

Optimizer

optimizer = COBYLA(maxiter=100)

100 optimization steps

estimator = Estimator()

Estimator primitive

# Execute Variational Quantum Eigensolver (VQE)

VQE execution

vqe = VQE(estimator, ansatz, optimizer)

Instantiate VQE

result = vqe.compute_minimum_eigenvalue(hamiltonian)

Optimize ground state

print(f"Estimated ground state energy: {result.optimal_value:.4f} Hartree")

Print ground state energy

📋 Complete Script (All-in-One)

Click "Copy for Colab", open Google Colab, paste into a single cell, and run.

Google Colab Notebook Scriptpython
1# =========================================================
2# Quantum Chemistry with VQE: Ground State Energy of Hydrogen Molecule (H2)
3# Prepared for Google Colab (Run with Shift + Enter)
4# =========================================================
5
6# Step 1: Install required packages
7!pip install qiskit qiskit-nature qiskit-algorithms pyscf
8
9# Step 2: Import libraries
10import numpy as np
11from qiskit_nature.second_q.drivers import PySCFDriver
12from qiskit_nature.second_q.problems import ElectronicStructureProblem
13from qiskit_nature.second_q.transformers import FreezeCoreTransformer
14from qiskit_nature.second_q.mappers import JordanWignerMapper
15from qiskit.circuit.library import TwoLocal
16from qiskit_algorithms import VQE
17from qiskit_algorithms.optimizers import COBYLA
18from qiskit.primitives import Estimator
19
20# Step 3: Run Demonstration
21# Define molecule (H2) geometry with 0.735 Angstrom bond distance
22molecule_geometry = "H 0 0 0; H 0 0 0.735"
23
24# Use PySCFDriver to compute molecular integrals with STO-3G basis set
25driver = PySCFDriver(atom=molecule_geometry, basis="sto3g")
26es_problem = ElectronicStructureProblem(driver)
27
28# Apply freeze-core approximation
29transformer = FreezeCoreTransformer()
30es_problem = transformer.transform(es_problem)
31
32# Map fermionic creation/annihilation operators to qubit Pauli terms
33mapper = JordanWignerMapper()
34hamiltonian = mapper.map(es_problem.hamiltonian.second_q_op())
35
36# Define variational ansatz (TwoLocal circuit with Ry, Rz and CZ gates)
37ansatz = TwoLocal(rotation_blocks=["ry", "rz"], entanglement_blocks="cz")
38
39# Set up COBYLA optimizer and Estimator primitive
40optimizer = COBYLA(maxiter=100)
41estimator = Estimator()
42
43# Execute Variational Quantum Eigensolver (VQE)
44vqe = VQE(estimator, ansatz, optimizer)
45result = vqe.compute_minimum_eigenvalue(hamiltonian)
46print(f"Estimated ground state energy: {result.optimal_value:.4f} Hartree")
⚡ How to Run in Google Colab (3 Quick Steps)
  1. Click "Copy for Google Colab" above.
  2. Click Open New Google Colab Notebook (opens in a new tab).
  3. Click on the first empty code cell, press Ctrl + V (or Cmd + V) to paste, then press Shift + Enter to execute!

🔄 Algorithmic Execution Flow

1
Molecular Formulation

PySCFDriver computes 1- and 2-electron integrals for H2 at 0.735Å equilibrium bond length.

→
2
Jordan-Wigner Transformation

Maps electron orbital anti-commutation relations to a multi-qubit Pauli operator Hamiltonian.

→
3
VQE Ground State Convergence

TwoLocal ansatz and COBYLA iteratively minimize the energy expectation value to locate the ground state energy (~ -1.137 Hartree).

📥 Input / Initial State
Hydrogen molecule H2 geometry with STO-3G basis set
📤 Expected Output
Estimated ground state energy: -1.1373 Hartree
💡 What Does This Demonstration Show?

The hybrid VQE algorithm successfully converged to the ground state potential energy of H2, demonstrating how near-term quantum computers can tackle real quantum chemistry problems without exponential classical memory.

Course Learning Resource • Slide DeckLesson 1311 Slides

Lesson 13: Quantum Chemistry with VQE

Molecular H2 electronic structure, Jordan-Wigner fermion-to-qubit mapping, TwoLocal ansatz, and VQE ground state energy computation.

Author: Dr. Syed Muzamil Basha• FDP Approved Curriculum
Open in New Tab

📝 Learning Check

Test your understanding with these questions. Remember, this is for learning, not examination!

Question 1: What is the primary commercial motivation for using quantum computers in the pharmaceutical industry?

Question 2: What is the primary application of quantum computers in cryptography?

Question 3: What is Variational Quantum Eigensolver (VQE) used for?

Question 4: What industry problem can quantum computers solve via quantum annealing?

Question 5: What is quantum machine learning (QML)?