Edexcel International Advanced Level Computer Science, point 16.1.3
Definition
Quantum computing is a type of computing that uses the principles of quantum mechanics to process information. Instead of bits (0 or 1), it uses qubits (quantum bits), which can be in a combination of 0 and 1 at the same time. For certain problems, this lets it solve them far faster than any ordinary (classical) computer.
Function and why needed
Some problems take a classical computer an impractical amount of time (factorising huge numbers, simulating molecules, searching huge spaces, optimisation). Quantum computers aim to tackle these. They are not faster at everyday tasks (browsing, word processing), so they will complement classical computers, not replace them.
Characteristics
- Qubits are made from physical systems such as superconducting circuits, trapped ions or photons.
- Quantum computers need extreme conditions: very low temperatures (near absolute zero) and isolation from noise.
- Today's machines have tens to thousands of noisy qubits and are error-prone, so large, reliable quantum computers do not exist yet.
- They run special quantum algorithms.
b. Principles
Superposition
A classical bit is either 0 or 1. A qubit can be in a superposition: a combination of 0 and 1 at the same time, each with a probability (amplitude). When it is measured, it collapses to 0 or 1.
- qubits in superposition can represent states at once. 300 qubits could represent more states than there are atoms in the observable universe.
- This doesn't mean it tries every answer and returns the right one: measuring gives one random result, so algorithms must arrange for the correct answer to be most likely (interference, below).
Classical bit: 0 or 1
Qubit: a mix of 0 and 1 (say 70% / 30%) until
measured, then it is 0 OR 1
3 classical bits: ONE of 8 patterns at a time
3 qubits: a superposition of all 8 patterns at once
Entanglement
Two or more qubits can become entangled: their states are linked, so that measuring one immediately tells you about the other, however far apart they are. The combined state can't be described as separate qubits.
- Why it matters: entangled qubits can carry correlations that classical bits can't, which gives quantum algorithms their power.
- It does not allow faster-than-light communication.
Decoherence
Qubits are very fragile. Interaction with the environment (heat, vibration, electromagnetic noise, stray particles) destroys the quantum state: superposition and entanglement are lost, and the qubit behaves like a classical bit. This is decoherence.
- It is the main obstacle: calculations must finish before decoherence sets in (microseconds to milliseconds today).
- Responses: extreme cooling and shielding, and quantum error correction (many physical qubits are used to make one reliable "logical" qubit).
Interference
Quantum states behave like waves, and can add up (constructive interference) or cancel out (destructive interference).
- Quantum algorithms are designed so that the paths leading to wrong answers cancel out (destructive), and paths to the correct answer reinforce (constructive), so that measuring then gives the right answer with high probability.
- It is how superposition is turned into a useful result.
Quantum compared with classical computing
| Classical computer | Quantum computer | |
|---|---|---|
| Basic unit | Bit (0 or 1) | Qubit (0, 1, or a superposition) |
| Processing | Deterministic logic gates | Quantum gates, probabilistic results |
| Good at | Everyday tasks and most problems | Factorising, simulation, some optimisation and search |
| Reliability | Very reliable | Error-prone (decoherence) |
| Operating conditions | Room temperature | Near absolute zero, isolated |
| Availability | Everywhere | Research machines, early stage |
c. Threat
Quantum computers are a threat to security because they could break the encryption that protects the Internet today.
- Shor's algorithm (a quantum algorithm) can factorise large numbers in a practical time. RSA's security depends on factorising being infeasible (12.3.2), so a large enough quantum computer could break RSA, and other public-key methods (Diffie-Hellman, elliptic curves), exposing the private keys.
- "Harvest now, decrypt later": attackers can store encrypted data today and decrypt it once quantum computers are available, so long-lived secrets are at risk already.
- Digital signatures and certificates (16.1.1) would also be forgeable.
- Symmetric encryption (AES) and hash functions are less affected: Grover's algorithm can speed up a brute-force search, which roughly halves the effective key length. Doubling the key size (AES-256) keeps them safe.
| Cryptography | Affected by quantum computers? |
|---|---|
| RSA, Diffie-Hellman, elliptic curve | Yes: broken by Shor's algorithm |
| AES (symmetric) | Weakened (halved), but safe with longer keys |
| SHA-256 hashing | Weakened slightly, still safe with long digests |
d. Cryptography
Quantum-safe (post-quantum) cryptography
New algorithms designed to resist both classical and quantum attacks, running on ordinary computers. They are based on problems that quantum computers don't solve quickly, such as lattice problems, hash-based signatures and code-based methods. Standards bodies have been choosing and standardising these, and organisations are starting to migrate (crypto-agility: being able to swap algorithms).
Quantum cryptography: quantum key distribution (QKD)
QKD uses quantum states of photons to share an encryption key. Any eavesdropping disturbs the quantum states (measuring changes them), so the two parties can detect it. It needs special hardware and has limited distance, and only the key exchange is protected.
Opportunities
- Truly random numbers (from quantum processes).
- Better security through QKD.
- Faster simulation of chemistry and materials, and of optimisation problems.
Benefits of quantum computing
- Could solve problems that are impractical today (drug and materials design, logistics, finance, machine learning).
- Huge speed-ups for particular tasks.
Drawbacks and challenges
- Fragile and error-prone (decoherence).
- Very expensive, and needs extreme cooling.
- Few qubits and few useful algorithms so far.
- Threat to current encryption.
- Hard to program, and results are probabilistic.
- Not useful for general computing.
Worked example
Task: a bank stores customer records encrypted with RSA-protected keys, which must stay secret for 30 years. Explain the risk from quantum computing, and what to do.
- Risk: a future quantum computer running Shor's algorithm could factorise the RSA moduli, reveal the private keys, and decrypt the records. An attacker can copy the encrypted data now ("harvest now, decrypt later"), and decrypt it when such a machine exists, possibly within 30 years.
- What to do:
- Use symmetric encryption (AES-256) for stored data, which remains safe.
- Plan to move key exchange and signatures to post-quantum algorithms.
- Be crypto-agile, so that algorithms can be replaced without redesigning systems.
- Keep an eye on standards and guidance.
Exam tip: define each principle in one clear sentence (superposition: a qubit is 0 and 1 at once; entanglement: linked qubits; decoherence: the quantum state is lost through interaction with the environment; interference: probabilities reinforce or cancel). For the threat, say that Shor's algorithm can factorise large numbers and so break RSA. Mention post-quantum cryptography as the response.
Check yourself
What is a qubit?
The quantum equivalent of a bit, which can be 0, 1 or a superposition of both until it is measured.
What is decoherence, and why is it a problem?
Qubits losing their quantum state through interaction with the environment, which causes errors and limits how long a calculation can run.
Why are quantum computers a threat to RSA?
Shor's algorithm could factorise the large numbers RSA relies on, so private keys could be calculated from public keys.
What is post-quantum cryptography?
Encryption algorithms designed to resist attack by both classical and quantum computers.
What is the role of interference in quantum algorithms?
It makes the paths to wrong answers cancel and the path to the correct answer reinforce, so measuring gives the right result with high probability.