1. Why Quantum Computing?
Computers are everywhere.
They run phones, games consoles, cars, websites, hospitals, banks, satellites, and almost every part of modern life.
Most computers today are classical computers. They store and process information using bits.
A bit is very simple:
10 or 1Everything a classical computer does is built from huge numbers of these 0s and 1s.
Quantum computers are different.
They use quantum bits, usually called qubits.
A qubit can behave like a normal bit when we look at it, but before we look at it, it can behave in ways that ordinary bits cannot.
This chapter explains why that matters.
1.1 Learning goals
By the end of this chapter, you should be able to:
- Explain the difference between a bit and a qubit.
- Explain why quantum computing is not just “a faster computer.”
- Describe why measuring a qubit is different from reading a normal bit.
- Explain, in simple terms, what superposition means.
- Explain, in simple terms, what entanglement means.
- Give examples of problems where quantum computers may help.
- Explain why quantum computers do not solve every problem quickly.
1.2 Classical computers use bits
A classical computer stores information using bits.
Each bit has one of two values:
10 or 1A single bit is not very powerful on its own. But when we put many bits together, we can represent numbers, text, pictures, sound, video, websites, and programs.
For example, four bits can represent patterns like:
10000
20001
30010
40011
50100
6...
71111A modern computer uses billions of bits.
Classical computers are extremely powerful, but they are built on the idea that information has definite values. At any moment, each bit is either 0 or 1.
Quantum computing starts from a different idea.
1.3 The physical world is quantum
Very small things, such as atoms, electrons, and photons of light, do not always behave like everyday objects.
They follow the rules of quantum mechanics.
Quantum mechanics is the theory scientists use to describe the behaviour of tiny particles.
At the scale of everyday life, a football is either here or there. A switch is either off or on. A bit is either 0 or 1.
But tiny quantum objects can behave in less familiar ways.
For example, quantum objects can:
- be in states that are combinations of possibilities,
- change when measured,
- become linked together in a special way called entanglement.
Quantum computing uses these quantum behaviours to process information.
1.4 Bits and qubits
A classical bit can be:
10 or 1A qubit also has two basic states, written:
1|0> and |1>You can read these as “quantum zero” and “quantum one.”
When we measure a qubit, we get an ordinary classical answer:
10 or 1But before measurement, a qubit can be in a superposition.
A superposition is a quantum state that is a mixture-like combination of |0> and |1>.
A common beginner picture is:
A bit is like a coin lying flat as heads or tails. A qubit is more like a spinning coin before it lands.
This picture is not perfect, but it gives the right first idea: before measurement, a qubit is not just an ordinary bit with a hidden value.
1.5 Superposition
Superposition is one of the key ideas in quantum computing.
A qubit can be in a state that combines the possibilities |0> and |1>.
When we measure the qubit, we only see one result:
10 or 1But before measurement, the qubit can behave as if both possibilities matter.
This is not the same as simply not knowing whether the qubit is 0 or 1.
A hidden classical bit has a definite value, even if we do not know it.
A qubit in superposition is genuinely different. Its behaviour depends on the quantum state, not just on hidden ignorance.
Later in the course, we will describe this using numbers called amplitudes.
For now, remember:
A qubit can be prepared in a state that is not simply
0and not simply1.
1.6 Measurement changes things
Reading a normal bit does not usually change it.
If a classical bit is 0, we can read it again and again:
10, 0, 0, 0, ...A qubit is different.
When we measure a qubit, we force it to give a classical answer:
10 or 1After that measurement, the qubit has changed into the state matching the answer we got.
So if we measure a qubit and get 0, then measuring it again in the same way gives 0 again.
This is very important.
It means measurement is not just “looking.” In quantum computing, measurement is an action that affects the system.
1.7 Why can’t we get all the information out?
A qubit can have many possible quantum states.
So you might wonder:
Can one qubit store loads of information?
The answer is no.
When we measure one qubit, we only get one ordinary bit of information:
10 or 1The measurement does not reveal the whole quantum state. It only gives one outcome.
This is one reason quantum computing is subtle.
Quantum computers can use rich quantum states during the computation, but when we measure them, we only get limited classical information out.
A good quantum algorithm must be designed so that the final measurement is likely to give a useful answer.
1.8 Interference
Quantum computing is not powerful just because qubits can be in superpositions.
The important extra idea is interference.
Interference happens when quantum possibilities combine.
Some possibilities can strengthen each other.
Some possibilities can cancel each other out.
A useful quantum algorithm tries to arrange things so that:
- wrong answers cancel out,
- right answers become more likely.
This is a bit like waves.
If two water waves meet, they can make a bigger wave or cancel each other.
Quantum states behave in a wave-like way, and quantum algorithms use this.
1.9 Many qubits
One qubit is interesting.
Many qubits are much more interesting.
With n classical bits, the computer is in one definite state at a time.
For example, three classical bits might be:
1010With n qubits, the quantum state can involve many possible bit strings at once.
For three qubits, these possible strings are:
1000
2001
3010
4011
5100
6101
7110
8111That is 8 possibilities.
In general, n qubits are connected to 2^n possible classical bit strings.
This number grows very quickly.
| Number of qubits | Number of possible bit strings |
|---|---|
| 1 | 2 |
| 2 | 4 |
| 3 | 8 |
| 4 | 16 |
| 10 | 1024 |
| 20 | 1,048,576 |
| 30 | over 1 billion |
This is one reason quantum systems can be hard to simulate on classical computers.
But there is a warning.
We cannot simply read all these possibilities out. Measurement still gives only one result.
1.10 Entanglement
Entanglement is another key quantum idea.
Two classical bits always have definite separate values.
For example:
100
201
310
411But two qubits can be linked in a way that cannot be explained by saying, “the first qubit has its own state and the second qubit has its own state.”
For example, two qubits can be in a state where, when measured, they always give matching results:
100 or 11The strange part is that before measurement, we should not think of each qubit as already having its own separate value.
The pair has a shared quantum state.
This is called entanglement.
Entanglement is important for:
- quantum communication,
- quantum teleportation,
- quantum cryptography,
- some quantum algorithms,
- quantum error correction.
Entanglement is one of the things that makes quantum information different from classical information.
1.11 Quantum computers are not just faster classical computers
A common mistake is to think:
Quantum computers try every answer at once, so they solve everything instantly.
This is not correct.
Quantum computers can use superposition, but measurement only gives limited information.
To get an advantage, a quantum algorithm must use interference and structure.
Quantum computers are not known to solve every hard problem quickly.
They are useful for special kinds of problems.
1.12 What might quantum computers be good for?
Quantum computers may be useful for several important tasks.
1. Factoring large numbers
Factoring means breaking a number into smaller numbers that multiply together.
For example:
121 = 3 x 7For very large numbers, factoring is hard for classical computers.
A famous quantum algorithm called Shor’s algorithm can factor large numbers efficiently, if we have a large enough reliable quantum computer.
This matters because some internet security systems rely on factoring being hard.
2. Searching
Suppose you have a huge unsorted list and want to find one special item.
A classical computer may need to check many items.
A quantum algorithm called Grover’s algorithm can search faster.
But the speedup is limited.
Grover’s algorithm gives a quadratic speedup, not an instant solution.
That means quantum computers help, but they do not make search problems magically disappear.
3. Simulating quantum systems
Quantum computers may be especially useful for simulating molecules, materials, and other quantum systems.
This could help with:
- chemistry,
- drug discovery,
- materials science,
- batteries,
- solar cells,
- physics research.
This is a natural use because quantum computers are themselves quantum systems.
4. Secure communication
Quantum ideas can be used in cryptography.
For example, some quantum key distribution methods can reveal whether someone has tried to eavesdrop.
This works because measuring unknown quantum information can disturb it.
1.13 Why are quantum computers hard to build?
Quantum systems are delicate.
They can be disturbed by tiny interactions with the outside world.
This unwanted disturbance is called decoherence.
Decoherence can destroy the quantum effects we need for computation.
Another problem is that we cannot simply copy unknown quantum states. This is called the no-cloning principle.
In classical computing, copying information is easy.
In quantum computing, copying unknown qubits perfectly is impossible.
This makes error correction more difficult.
But scientists have discovered ways to protect quantum information using quantum error correction.
Quantum error correction is one of the reasons researchers believe large-scale quantum computers may be possible in principle.
1.14 A short history
Here are some important moments in the story of quantum computing.
| Period | What happened |
|---|---|
| Early 1980s | Scientists began connecting quantum mechanics with information. |
| 1984 | Bennett and Brassard introduced a quantum key distribution protocol called BB84. |
| 1980s | Feynman and Manin suggested that quantum computers might simulate quantum systems better than classical computers. |
| 1980s-1990s | Deutsch and others developed formal models of quantum computation. |
| 1994 | Shor discovered a quantum algorithm for factoring. |
| 1996 | Grover discovered a quantum search algorithm. |
| Mid-1990s onward | Quantum error correction showed that reliable quantum computing might be possible. |
1.15 What this course will cover
This course builds up quantum computing step by step.
Part I: Quantum building blocks
You will learn about:
- qubits,
- measurement,
- superposition,
- entanglement,
- quantum gates,
- quantum circuits,
- how classical computations can be made reversible.
Part II: Quantum algorithms
You will learn about:
- interference,
- simple quantum algorithms,
- quantum Fourier transforms,
- Shor’s algorithm,
- Grover’s algorithm.
Part III: Noise and error correction
You will learn about:
- decoherence,
- mixed states,
- quantum error correction,
- fault-tolerant quantum computing.
1.16 A first measurement simulation
This small Python program simulates repeated measurements where the chance of getting 0 is fixed.
It is not a full quantum simulator yet.
1import random
2from collections import Counter
3
4def measure_qubit(prob_zero, shots=1000):
5 results = []
6
7 for _ in range(shots):
8 if random.random() < prob_zero:
9 results.append(0)
10 else:
11 results.append(1)
12
13 return Counter(results)
14
15print(measure_qubit(0.5, shots=1000))Try changing prob_zero.
For example:
1print(measure_qubit(0.8, shots=1000))This shows that quantum measurement can produce probabilities.
But a full qubit simulation also needs:
- amplitudes,
- phase,
- quantum gates,
- interference,
- measurement in different bases.
We will add these ideas later.
1.17 Key ideas
| Idea | Meaning |
|---|---|
| Bit | A classical unit of information: 0 or 1. |
| Qubit | A quantum unit of information. |
| Superposition | A quantum state that combines possibilities. |
| Measurement | The process of getting a classical result from a quantum state. |
| Interference | Quantum possibilities strengthening or cancelling each other. |
| Entanglement | A special link between quantum systems. |
| Decoherence | Loss of quantum behaviour due to the environment. |
| Quantum algorithm | An algorithm that uses quantum states and quantum operations. |
1.18 Summary
Quantum computing is not just about making faster hardware.
It is based on a different model of information.
Classical computers use bits. Quantum computers use qubits.
Qubits can be in superpositions, can interfere, can become entangled, and change when measured.
These features can give quantum computers advantages for some tasks, such as factoring, search, simulation, and secure communication.
But quantum computers do not solve every problem quickly. They are powerful in special ways, and they are difficult to build because quantum systems are fragile.
In the next chapter, we will look more closely at a single qubit.