Introduction to Quantum Computing
A step-by-step, picture-first course โ from the very first idea of quantum computing all the way to how it joins hands with machine learning.
How to use this material
๐ Read in order
The pages on the left-hand menu are arranged like a story. Each page builds on the one before it. Start from Page 1 and move down. Use the Next page button at the bottom of each page.
๐๏ธ Touch the pictures
Many of the pictures in this course are alive โ you can click buttons, drag sliders, and toss coins. Please play with them! You will understand ten times faster by doing than by reading.
โ๏ธ Answer the quizzes
Every page ends with short Check Yourself questions. Click an answer and it tells you immediately if you are correct, and why. Nothing is hidden; nothing needs the internet.
๐จ๏ธ Print if you like
This whole material can be printed (Ctrl+P / Cmd+P). The interactive parts become still pictures, but all the text and tables print well as handouts for students.
The journey ahead
Basic Concepts of Quantum Computing
Before any big grammar, let us build the picture in our heads with things we already know.
Start from the computer you already know
Every computer you have ever used โ your phone, your laptop, the ATM โ thinks using bits. A bit is the smallest piece of information, and it can only ever be one of two things:
Interactive ยท The light switch (a classical bit)
A classical bit is like a light switch. It is either OFF (0) or ON (1) โ never both, never in between. Click the switch.
Now the quantum idea โ in one sentence
That sounds strange, so here is the everyday picture that carries the whole course:
Interactive ยท The spinning coin (a quantum bit)
A coin lying on the table is Heads OR Tails โ like a classical bit. But a coin spinning on the table is, in a real sense, both at once. It only becomes one of them when you slap your hand on it (that is a measurement). Press "Spin" first, then "Slap" โ and repeat several times:
Why should anybody care?
Because of a simple mathematics of counting. One spinning coin holds 2 possibilities at once. Two spinning coins hold 4 possibilities at once (HH, HT, TH, TT). Ten coins hold 1,024. The number doubles every time you add one coin.
Interactive ยท The doubling machine
Drag the slider to add qubits and watch how many possibilities the machine can hold at the same time.
At 50 qubits, the machine is holding over a quadrillion possibilities at once โ that is a 1 followed by 15 zeros, more than a million times a thousand million. No ordinary computer can line up that many options simultaneously โ it would have to check them one after the other. This is the source of quantum computing's power: for certain problems, it explores a huge space of answers in parallel, then uses clever tricks to make the right answer the one you see when you "slap the coin".
The three words to carry forward
Qubit
The quantum version of a bit. The spinning coin. Covered fully on Page 5.
Superposition
Being in a blend of 0 and 1 at once โ the spin itself. Page 6.
Measurement
Slapping the coin. The act of looking, which forces one definite answer out.
When Dr. Ophori โ the lecturer of this very course โ asked a class this question, every single hand said "the computer โ it is faster!" Her reply: "How can you say it is better, when YOU are the one that developed it? You wrote the algorithm. If you remove the human, the computer cannot process anything again. You are the author โ it is only the pen." Before we build these powerful quantum machines together, settle this question in your own heart. Turn to the person beside you and argue it out for two minutes.
Definitions of Quantum Computing
One idea, defined at four levels โ from the market square to the examination hall. All four are correct; they differ only in formality.
The definitions, written out fully
๐ฃ๏ธ Level 1 โ The everyday definition
"A quantum computer is a new kind of computer that can consider very many possible answers at the same time, instead of checking them one by one."
๐ Level 2 โ The student definition (recommended for class)
"Quantum computing is a type of computing that uses qubits instead of ordinary bits. Because a qubit can exist as a mixture of 0 and 1 at the same time (superposition), a quantum computer can process many possibilities in parallel, which makes it far more powerful than a classical computer for certain kinds of problems."
๐ฌ Level 3 โ The technical definition
"Quantum computing is the use of quantum-mechanical phenomena โ superposition, entanglement, and interference โ to perform computation. Devices that perform such computation are called quantum computers."
You will not just memorise this definition โ you will run every word of it as code: superposition in Lab 1, entanglement in Lab 2, and interference beating a classical computer in Lab 2.5 (Deutsch's algorithm), all in Part B.
๐ Level 4 โ The formal definition
"Quantum computation is a model of computation in which information is stored in quantum states (qubits) and processed by unitary transformations called quantum gates, with results extracted by measurement."
Key terms that live inside the definitions
| Term | Plain meaning | Picture to hold |
|---|---|---|
| Quantum mechanics | The physics of very small things (atoms, electrons, light particles), where objects behave in surprising ways. | The rulebook nature uses at the smallest scale. |
| Qubit | Quantum bit โ the basic unit of quantum information. | The spinning coin. |
| Superposition | A qubit being in a blend of 0 and 1 at once. | The spin itself. |
| Entanglement | Two or more qubits linked so that they behave as one system, even far apart. | Twin coins that always agree. |
| Interference | Possibilities can add up (louder) or cancel out (silent), like ripples meeting on water. Quantum algorithms use this to cancel wrong answers. | Two ripples meeting on a calm river. |
| Measurement | Reading the qubit โ which forces it to pick 0 or 1. | Slapping the spinning coin flat. |
| Quantum gate | An operation that changes a qubit's state โ the quantum version of AND, OR, NOT. | A hand that flicks or re-spins the coin in a controlled way. |
Lock the terms in โ play the matching game
Interactive ยท Match the term to its picture (works offline)
Tap a term on the left, then tap the picture that belongs to it on the right. Correct pairs lock in green. Can you clear the board without a single miss?
You have just read four definitions of quantum computing. Here is an uncomfortable secret: even the professors who write these definitions admit the deep "why" of quantum mechanics is still mysterious. So โ is it honest to build billion-dollar machines on it? Before you answer, think: do you fully understand electricity? Your own brain? Yet you use both every day.
Historical Development
Not a history lesson โ a short relay race. Each runner passed the baton to the next. ๐ Click any event to open its story.
The greatest scientist of the 20th century never accepted that nature is random at the bottom. He fought Bohr about it for decades. And here is the beautiful twist: Einstein's sharpest attack (the 1935 EPR paper) forced physicists to study entanglement so carefully that it became the experiments that won the 2022 Nobel Prize โ and the technology inside quantum computers. His doubt built the field he doubted.
Examples of Quantum Computers
Real machines exist today. They differ mainly in what they build their qubits out of โ and each choice has a trade-off.
๐ง Superconducting qubits โ IBM & Google
Machines: IBM Quantum (Eagle 127 qubits, Osprey 433, Condor 1,121; now the Heron series), Google Sycamore (53) and Willow (105).
How: Tiny electric circuits cooled to about โ273 ยฐC (colder than outer space) so current flows without resistance and behaves quantum-mechanically.
Fast gatesEasy to manufacture like chipsNeeds giant fridgeShort memory (microseconds)
โ๏ธ Trapped-ion qubits โ IonQ & Quantinuum
Machines: IonQ Forte, Quantinuum H2.
How: Individual charged atoms (ions) held floating in a vacuum by electric fields, controlled with laser beams. Each atom is one qubit.
Very accurateLong memoryIdentical qubits (atoms are perfect)Slower gatesHard to scale to thousands
๐ก Photonic qubits โ PsiQuantum & Xanadu
Machines: Xanadu Borealis; PsiQuantum (building toward a million qubits).
How: Particles of light (photons) carry the quantum information through optical chips.
Works at room temperatureLight travels โ good for quantum networksPhotons are hard to make interact
๐งฒ Quantum annealers โ D-Wave
Machines: D-Wave Advantage (5,000+ qubits โ but a different, weaker kind).
How: Not a general-purpose quantum computer. It is a specialist machine that only solves optimisation problems (finding the best arrangement โ e.g., cheapest delivery routes, best schedule).
Available commercially since 2011Many qubitsOnly one problem typeCannot run Shor/Grover
Comparing them at a glance
| Technology | Who | Qubit made from | Temperature | Main strength | Main weakness |
|---|---|---|---|---|---|
| Superconducting | IBM, Google, Rigetti | Tiny cold electric circuit | โ โ273 ยฐC | Fast, chip-like manufacturing | Noisy, giant fridges |
| Trapped ion | IonQ, Quantinuum | A single floating atom | Room-temp trap (lasers do the work) | Highest accuracy | Slow, hard to scale |
| Photonic | Xanadu, PsiQuantum | A particle of light | Mostly room temperature | Networking, no fridge | Photons barely interact |
| Annealer | D-Wave | Superconducting loops | โ โ273 ยฐC | Optimisation problems now | Not general-purpose |
| Neutral atoms / spin qubits | QuEra, Pasqal, Intel | Uncharged atoms / electrons in silicon | Varies | Promising scaling paths | Younger technology |
Test your eye โ "Which machine am I?"
Interactive ยท Guess the technology from its clue (works offline)
Each clue describes one of the four machine families above. Tap your answer โ then get a fresh clue.
Qubits
Everything in quantum computing stands on this one object. Take this page slowly โ once qubits are clear, every other topic becomes easy.
One idea only: the LEAN
A bit is a pole lying flat against a wall โ fully on the "0" side or fully on the "1" side. Finished. Certain. Nothing more to say.
A qubit is that pole stood up and spinning โ and here is this entire page in one sentence: a qubit is a spin that can LEAN. Lean it toward one side, and when you slap it, it falls to that side more often โ in exact proportion to the lean. That is the whole idea. Everything below is just this one picture, practiced with your own hands.
Interactive ยท The spinning coin that LEANS โ your first real qubit
Drag the slider = set the lean. Slap = one toss. The big numbers on the floor are not decoration โ they ARE the answer: a 60% lean means 60 out of every 100 slaps land on "1". That is the whole machine. Play:
"But what MAKES it fall 60/40 โ where is the machinery?" There is none hidden. The lean IS the whole story โ the same way nothing extra "makes" a leaning pole fall the way it leans. That the fall-shares match the lean exactly is the measured law of nature (physicists call it the Born rule) that every quantum computer stands on. The qubit's secret is not machinery; it is geometry.
Nothing in this demo learns. Nothing improves. Nothing changes. You set a lean with the slider. Then you slapped the pole, many times, and counted the falls. A leaning pole falls the way it leans โ slap it 10 times and the tally is rough, slap it 1,000 times and the tally clearly shows the lean. The lean stayed the same from the first slap to the last. Only your COUNT grew.
Picture a woman selling puff-puff who drops one in ten on a bad day. Watch her for 10 customers and maybe she drops none โ you'd wrongly think she never drops any. Watch her for 500 customers and you will count very close to one-in-ten drops. She did not change. You just watched long enough to see the truth. That is ALL the right chart is doing: watching long enough.
So when IS something actually learning? Learning would be if the pole re-leaned itself after every slap to please you. That never happens here โ but machines that genuinely re-adjust themselves after every mistake DO exist, and you will build one in Part B (Lab 6). When you get there, remember this page: counting tosses (here) and a machine re-adjusting itself (there) look similar on a chart, but they are completely different things.
The two particles, side by side
Interactive ยท BIT vs QUBIT โ same floor, different physics
Left โ the classical bit: a coin lying flat. Certain. Flip it to change it; read it a thousand times โ same answer, no damage. Right โ the qubit: spinning with a 60% lean. Reading it is an EVENT: one slap, one forced fall, one answer โ then it must be re-spun. Try both sides:
"Some materials say a qubit can be in three states: quantum state 0, quantum state 1, and superposition. But if superposition is 0-and-1, what does 'quantum state of 1' even mean โ and what would the computer print?"
Beautiful question โ and the confusion disappears with one sentence: |0โฉ and |1โฉ are themselves quantum states. They are the two "resting poles" of the qubit โ the north and south of the Bloch sphere below. A qubit sitting in quantum state |1โฉ is not spinning at all: measure it 100 times and it prints 1 all 100 times. It is still fully quantum โ you can rotate it into superposition any moment โ it is simply resting at a pole right now.
In coin language, the "three states" are:
| Textbook name | Coin picture | If you measure 100 times, it printsโฆ |
|---|---|---|
| Quantum state |0โฉ | Coin lying flat, tails up | 0, all 100 times โ {'0': 100} |
| Quantum state |1โฉ | Coin lying flat, heads up | 1, all 100 times โ {'1': 100} |
| Superposition | Coin spinning | A mixture โ e.g. {'0': 48, '1': 52} for a fair spin |
And the full truth is even richer: between the two poles lie infinitely many blends (every tilt of the arrow below) โ "three states" is just the beginner's summary of poles + everything-in-between. In Part B, Lab 1, you will run all three on a real simulator and watch each one print exactly this table.
From the coin to the globe โ one small step
In the demo above, your coin could only lean left or right. But a real spinning coin can lean in any direction โ toward you, away from you, north-east, anywhere around the circle. Now ask: if I drew a dot for every possible lean โ every direction, every amount โ what shape would all those dots make? A ball. That ball is the famous Bloch sphere: nothing mysterious, just the map of every lean a qubit can have, with an arrow showing the lean it has right now.
How to read the globe in ten seconds:
- Top of the ball = no lean toward "1" at all โ always falls "0".
- Bottom = fully leaned โ always falls "1".
- How far DOWN the arrow points = the percentage. Equator = exactly 50/50. That is the same slider you have been dragging all along โ just drawn on a map.
Interactive ยท The map of every lean โ in 3D
Slider = lean the arrow (watch the percentages follow it, same as the coin). Drag the ball itself = turn the map in your hands.
What is a qubit physically?
Remember Page 4: anything quantum with two controllable states can be a qubit.
- Superconducting circuit (IBM/Google): two energy levels of a cold circuit.
- Trapped ion (IonQ): two energy levels of a single atom.
- Photon (Xanadu): e.g., two polarisations of light.
- Electron spin (Intel): spin-up vs spin-down in silicon.
The mathematics is identical for all of them. That is why we can learn qubits once and program any machine.
The two hard truths about qubits
โ ๏ธ Truth 1 โ Measurement destroys the blend
The moment you measure, the superposition collapses to plain 0 or 1 and the extra information is gone. You cannot peek and continue. Algorithms must do all their clever work before measuring.
โ ๏ธ Truth 2 โ Qubits are fragile (decoherence)
Heat, vibration, stray radio waves โ any disturbance acts like an accidental measurement and ruins the state. This is why machines live in extreme cold and why error correction is the biggest challenge in the field today.
You just played with the blend slider and watched measurements collapse. Now sit with the deeper question. Einstein once asked a colleague, walking under the night sky: does the moon exist only when somebody looks at it? For big things like moons, of course it is there. But for a qubit, experiment says the answer genuinely was not there before the measurement. Where, then, does "reality" begin?
Superposition, Entanglement & Quantum Supremacy
Three terms, one family: the first two are the powers a quantum computer uses; the third is the finish line that proves those powers beat classical machines.
Power 1 โ Superposition (the spinning coin, now official)
You already own this idea from Pages 1 and 5: a qubit can exist in a blend of |0โฉ and |1โฉ until measured. The real-life payoff is parallelism: with n qubits in superposition, a quantum computer manipulates 2โฟ possibilities in a single operation.
The experiment behind it all โ the double slit
The setup: a gun fires particles (electrons or photons) one at a time at a wall with two narrow slits. Behind the wall is a screen that records where each particle lands. Common sense says particles are like small stones โ they should pile up in two bands, one behind each slit. Watch what actually happens:
Interactive ยท The double-slit experiment โ watch a single particle travel
๐ฌ Fire ONE and watch: with the detector OFF, the particle leaves the gun as a dot, then spreads into a ripple that passes through BOTH slits at once โ the two ripples overlap, and it lands as a single dot placed by their meeting pattern. Switch the detector ON and fire again: now it stays a dot, takes ONE slit (the detector flashes), and lands in a plain band. Then use the fast buttons to build the statistics.
๐โ๐จ Detector OFF โ the mystery
The particles land in many alternating stripes (an interference pattern) โ the signature of a wave passing through both slits at once and interfering with itself. Yet each particle arrives as a single dot! Each one travelled as a superposition of "through the left slit" AND "through the right slit" โ the spinning coin, in flight.
๐ Detector ON โ the collapse
Place a detector at the slits to see which path each particle takes, and the stripes vanish โ just two plain bands, like stones. Knowing the path IS a measurement, and measurement collapses the superposition. Nature behaves differently when the information exists โ whether or not any human is looking.
Why stripes when nobody watches? Drop two stones into a calm river and watch the ripples meet: where crest meets crest the water jumps high; where crest meets trough the water cancels flat. An unwatched particle travels exactly like that ripple โ one wave of possibilities that passes through both slits and then meets itself on the far side. Where its two halves agree โ many landings (a bright stripe). Where they cancel โ almost none (a dark gap). The stripes are the meeting-pattern of a particle overlapping itself.
Then why does each particle land as ONE dot? Because travelling and arriving are different acts. It travels as a wave โ but the screen is a measurement, a slap: the wave must surrender one definite landing point, chosen with chances set by its own stripes. This is not philosophy โ in 1989, physicists in Japan (Tonomura's team) filmed electrons arriving one at a time: each a lone dot, random-lookingโฆ and after thousands, the stripes stood there, assembled dot by dot. Travels as a wave. Arrives as a particle. Both, honestly.
And why does watching kill the stripes? Here is the answer to give a student slowly: it is not eyes, not minds โ it is INFORMATION. The stripes exist only while "went through the top" and "went through the bottom" remain two indistinguishable halves of one spinning possibility โ your coin being both faces at once. A detector at the slit makes a permanent record of which path โ and two recorded, distinguishable histories can no longer overlap and cancel. The detector's record is a slap delivered at the slit instead of at the screen: the coin is forced to land early, so it flies the rest of the way as a decided little stone โ two slits, two plain piles. The universe never cared that someone looked; it cares that anything kept the record.
Power 2 โ Entanglement (the twin coins)
Take two qubits and link them with a special operation. They now form one shared state: measuring one instantly tells you about the other, even if they were separated across the world. Einstein was so uncomfortable with this that he called it "spooky action at a distance" โ but experiments (Nobel Prize 2022: Aspect, Clauser, Zeilinger) confirm it is real.
Interactive ยท Entangled twin coins
These two coins are entangled so they always land the same way. Both are spinning (superposition). Measure either one โ and watch its distant twin collapse instantly to match.
How the two powers work together
The finish line โ Quantum Supremacy
- 2019 โ Google Sycamore: 53 qubits performed a sampling task in ~200 seconds; Google estimated ~10,000 years for the top supercomputer. IBM argued it could be done in days โ but even "days vs 200 seconds" made the point.
- Important honesty: the task was artificial, chosen because it suits quantum machines. Supremacy โ "quantum computers are now better at everything." The current race is for useful quantum advantage โ a real-world problem (chemistry, materials, finance) solved better. That milestone is still being contested today.
You just measured the Lagos coin and watched the London coin obey instantly. Everything in your daily experience says influence needs travel โ a letter, a signal, a journey. Entanglement says: not always. Some physicists believe this hints that space itself is not fundamental โ that connection is deeper than distance. Others say the correlation is simply how shared quantum states work, nothing mystical. In your own life, you already know relationships that distance cannot weaken. Is nature telling us something similar โ or is that reading too much poetry into physics?
Difference Between Classical and Quantum Computers
Everything from the previous pages, now arranged side by side โ the page to revise from the night before a test.
The full comparison table
| Feature | Classical computer | Quantum computer |
|---|---|---|
| Basic unit | Bit (0 or 1) | Qubit (blend of 0 and 1) |
| Information in n units | One pattern out of 2โฟ | All 2โฟ patterns in superposition |
| Physical basis | Transistors on silicon chips | Superconducting circuits, trapped ions, photonsโฆ |
| Operating condition | Room temperature | Often near โ273 ยฐC, heavily shielded |
| Logic operations | AND, OR, NOT gates | Quantum gates (H, X, CNOTโฆ) โ all reversible |
| Reading data | Harmless, repeatable | Measurement collapses the state โ one chance |
| Copying data | Trivial (copyโpaste) | Impossible (no-cloning theorem) |
| Errors | Extremely rare | Frequent โ error correction is the central challenge |
| Results | Deterministic โ same input, same output | Probabilistic โ run many shots, read the histogram |
| Best at | Everyday tasks: documents, web, databases, video | Simulation of molecules, optimisation, factoring, (quantum) machine learning |
| Today's maturity | Decades of refinement, billions of devices | Early era (NISQ) โ powerful but noisy prototypes |
Watch them race
Interactive ยท The search race (works offline)
A prize is hidden in one of 16 boxes. The classical computer must open boxes one at a time. The quantum computer holds all 16 in superposition, then uses interference waves (โโ16 = 4 of them) to make the prize box stand out. Race them!
Application Areas of Quantum Computing
Where will all this power actually be used? Six big areas โ each with a picture you can hold, and a Nigerian angle where it fits naturally.
๐ 1. Drug discovery & chemistry
Molecules are quantum systems โ simulating them is exactly what Feynman said quantum computers were born for. Instead of years of trial-and-error in the lab, researchers could test candidate drugs inside the computer first.
Picture: designing a new malaria or sickle-cell drug by simulating how the molecule binds โ before a single test tube is opened.
๐ 2. Cryptography & security
Two sides of one coin: Shor's algorithm will one day break today's RSA encryption โ so banks and governments are already migrating to post-quantum cryptography. Meanwhile, quantum physics itself gives quantum key distribution: communication where eavesdropping is physically detectable (thanks to no-cloning, Page 5).
Picture: every bank's security team, including Nigerian banks, planning their "quantum-safe" migration.
๐ 3. Optimisation & logistics
Best routes for hundreds of delivery vans in Lagos traffic; optimal scheduling of flights; smartest arrangement of a national power grid. These problems explode combinatorially โ perfect targets for quantum optimisation (and today, for D-Wave-style annealers).
๐ฐ 4. Finance
Portfolio optimisation (best mix of investments under risk limits), fraud detection, and option pricing via quantum-accelerated simulations. Banks like JPMorgan and Goldman Sachs run active quantum research teams today.
๐ค 5. Machine learning & AI
Quantum computers may speed up the heavy linear algebra inside machine learning, and quantum models can explore patterns in data differently from classical ones. This is our destination topic โ fully opened on Page 10.
๐งช 6. Materials & energy
Designing better batteries, superconductors, and fertilizers. One famous target: nitrogen fixation โ nature makes fertilizer at room temperature while our factories (Haber process) burn ~1โ2% of the world's energy. Simulating the responsible enzyme could transform agriculture โ a direct African food-security interest.
Make it yours โ match the problem to its quantum answer
Interactive ยท Nigerian problems, quantum application areas (works offline)
Tap a real problem on the left, then the application area that would attack it on the right.
How close is each application?
| Application | Status today | Rough horizon |
|---|---|---|
| Optimisation (annealers, hybrid) | Pilot projects running now | Now โ near term |
| Quantum machine learning | Active research, small demos (Qiskit!) | Near โ mid term |
| Chemistry & drug simulation | Small molecules demonstrated | Mid term |
| Finance models | Bank research teams, prototypes | Mid term |
| Breaking RSA (Shor at scale) | Needs millions of error-corrected qubits | Long term โ but defences must start now |
The same discovery funds cancer-drug simulation and threatens your account balance. This is the dual-use dilemma, and it is as old as fire โ the knife that cooks dinner can also wound. Peter Shor published openly in 1994. Because he did, the world got a thirty-year head start on building quantum-proof locks. Would secrecy have been safer โ or more dangerous?
The Architecture of a Quantum Computer
What is actually inside those golden "chandelier" machines you see in photos? Let us open one up, layer by layer โ from a computer-science point of view.
The golden chandelier, explained
That famous golden structure is not the computer โ it is mostly the fridge (a dilution refrigerator). Each layer downward is colder, and the actual quantum chip โ about the size of a thumbnail โ sits at the very bottom at โ 0.015 K, colder than outer space. ๐ Click each layer below.
Interactive ยท Inside the machine (click the layers)
The five layers every computer scientist should name
Just as a classical computer has layers (transistor โ logic gate โ CPU โ operating system โ application), a quantum computer has a clean layered architecture:
| # | Layer | What it is | Classical cousin |
|---|---|---|---|
| 1 | Physical layer | The qubits themselves + the fridge, lasers, shielding keeping them alive | Transistors on silicon |
| 2 | Control layer | Classical electronics firing precise microwave/laser pulses โ each pulse is a quantum gate | Clock + control circuitry |
| 3 | Gate / circuit layer | Sequences of quantum gates (H, X, CNOTโฆ) arranged into circuits โ the quantum "program" | Logic gates โ machine code |
| 4 | Software layer | Languages & compilers: Qiskit (IBM, Python), Cirq (Google), Q# (Microsoft). Translates your code into pulse schedules | OS, compilers, Python |
| 5 | Application layer | The actual algorithms: Shor, Grover, chemistry simulation, quantum machine learning | Apps: Word, browsers, ML models |
One job's journey through the machine
Quantum and Machine Learning
The two biggest ideas in modern computing, joined. This page bridges everything you have learned into the first topic of the practical course.
First, machine learning in one minute
Machine learning (ML) is teaching a computer by examples instead of by rules. You do not write "if the fruit is yellow and curved, it is a banana" โ you show the computer 1,000 photos of bananas and oranges, and it works out the pattern by itself.
1 ยท Data
Examples with answers: photos labelled "banana"/"orange", past house prices, past exam scores.
2 ยท Model
A flexible mathematical machine with adjustable knobs (parameters/weights). A neural network is the most famous model.
3 ยท Training
Show the data, measure the mistakes (loss), nudge the knobs to reduce mistakes, repeat thousands of times. The nudging recipe is backpropagation + gradient descent.
Interactive ยท Watch a machine "learn"
This tiny model must learn to separate โ oranges from โ bananas by moving a dividing line. Press Train and watch the mistakes (loss) fall step by step โ this is the heart of all machine learning.
Now โ why bring quantum into it?
Machine learning is, under the bonnet, mountains of linear algebra โ multiplying huge grids of numbers (vectors and matrices). And here is the beautiful coincidence:
Quantum Machine Learning (QML) โ the idea
QML uses quantum computers to do part of the machine-learning work. Today's standard recipe is the hybrid loop โ remember the classicalโquantum partnership from Page 7:
The dictionary: every ML idea has a quantum twin
| Classical ML concept | Quantum twin | Where you'll meet it in Part B |
|---|---|---|
| Input features (numbers) | Data encoding โ rotating qubits by angles that represent the data | Quantum circuits practical |
| Neural network layers | Parameterised quantum circuit โ gates with adjustable rotation angles ฮธ | Quantum neural network in Python |
| Weights / parameters | The rotation angles ฮธ | QNN practical |
| Prediction (output) | Measurement statistics (the histogram!) | Plotting histogram practical |
| Backpropagation | Parameter-shift rule โ run the circuit at shifted angles to find the gradient | Backpropagation practical |
| Training loop | The hybrid loop in the diagram above | ML algorithms for QC practical |
| Randomness in data | Quantum probability โ e.g., a Hadamard gate = a perfect coin toss | Qiskit coin-tossing practical |
Honest expectations (important for a teacher)
- QML is young. Today's quantum computers are small and noisy; QML has not yet beaten classical ML on big real-world problems. We teach it because the field is being built right now โ and our students can be builders, not just users.
- The skills transfer. Learning QML forces mastery of linear algebra, probability, Python and ML fundamentals โ valuable even outside quantum.
- Everything we need is free: Python, Qiskit, and IBM's cloud machines.
- One quiet trend to keep in your pocket: the field is drifting toward teams of small models working together โ like a committee of wise elders โ rather than one giant brain. Hold that picture loosely; it will grow on its own as the course continues.
Machine learning borrowed a human word โ learning โ for a mathematical process of adjusting numbers. The model that recognises a banana has never tasted one, never peeled one, never shared one with a friend. Does it know what a banana is? Now be careful before you laugh โ someone may ask the same of a student who memorises definitions for an exam without ever using them. What, truly, is the difference between knowing and performing?
Final Revision Quiz
Ten questions covering the whole of Part A. Answer all, then check your score at the bottom. Suitable as a class test template.
Your score
Answer the questions above โ your score updates automatically.
The fridges and chips may be built abroad โ but Qiskit is free, the cloud is open, and the algorithms are unwritten. The nations that won the internet era were not only the chip-makers: they were the ones whose young people built solutions. You, reading this in Nigeria, have the same access to IBM's quantum computers as a student in New York โ this very material proves it. So the honest question is not "can we participate?" It is: what will you build?