Skip to content

Quantum ComputingGo deeperabout 38 min

The Qubit and the Quantum Leap

How quantum rules let tiny particles compute in ways ordinary computers cannot

This lesson explores how qubits use superposition and entanglement to process information differently from classical bits, introduces quantum gates and measurement probabilities, and examines which problems quantum computers may solve faster and why building them remains difficul

In this part you’ll

  • Explain how quantum bits (qubits) differ from classical bits by leveraging superposition and entanglement.
  • Compare and contrast quantum logic gates with classical logic gates using specific examples.
  • Calculate probabilities of measurement outcomes for simple two-qubit systems using state vector math.
  • Evaluate which computational problems quantum algorithms may solve more efficiently and explain why.
  • Assess current limitations of quantum hardware including decoherence, error rates, and scaling challenges.

Imagine trying to find one name in a phone book with a billion entries. A classical computer checks each page one by one. But what if you could check all pages at once? This is not magic—it is the promise of quantum computing, where the strange rules governing atoms and electrons become tools for solving puzzles that stump today's most powerful machines.

In this lesson you will meet the quantum bit or qubit, learn why it can be both 0 and 1 simultaneously through superposition, and discover how entanglement links qubits across space. You will work through real calculations for small quantum circuits, compare quantum and classical logic gates, and finally confront the hard truths: quantum computers are delicate, error-prone, and useful only for specific problems. No prior physics beyond school science is assumed; every new term is defined when it first appears.

Chapter 01

The Phone Book Problem: Why Ordinary Computers Hit Walls

Imagine you have a thick printed phone book with one million names listed alphabetically by name. If I ask you to find Ramesh Sharma's phone number, you flick to the middle, decide R comes after A–M, and keep halving the book. That is a binary search, and it takes only about 20 steps even for a million entries because every step splits the problem in half.

But now imagine I give you a bag with one million numbered tokens, each with a different random four-digit PIN written on it. I say one specific PIN—say 7391—exists on exactly one token inside. You must find it. The tokens are not sorted by PIN. You have no shortcut. You pull out tokens one by one and read them. In the worst case you check all one million tokens.

This is an unsorted search, and it reveals something stubborn about ordinary computers. A classical computer searching an unsorted list of N items may need up to N checks. This is not a quirk of bad programming. It is a structural limit of how classical information works. In this chapter we will see why some everyday problems share this stubbornness, why adding more ordinary computers barely helps, and why that gap created the push for a completely different machine called a quantum computer.

Worked example

0 / 4 steps shown

The lost UPI reference number

Priya is a customer-care worker at a small bank. A customer has lost their 12-digit UPI reference number. The bank's unsorted backup log holds one crore (10 million) reference numbers for that day. Priya's software checks one number per millisecond. How long could the search take in the worst case, and is that practical during a single workday?

The second row in the table deserves a closer look because it touches almost every Indian internet user. When you pay a chaiwala ₹15 through UPI, or when an Aadhaar number is hashed during authentication, public-key encryption protects the message. That encryption is built on a mathematical trapdoor: multiplying two large prime numbers is easy, but splitting the product back into its original primes is extraordinarily hard for classical computers.

The numbers used in practice are 2048 bits long, roughly 600 decimal digits. No classical computer on Earth can factor such a number by brute force before the Sun burns out. This is not because engineers are lazy. The best classical algorithms known—like the General Number Field Sieve—still run in time that grows faster than any polynomial as the number gets longer. The security of India's digital payments rests on this structural hardness.

RSA-2048 digits
~617decimal digits in a typical encryption key
Age of universe
~13.8 billionyears; still vastly smaller than brute-force factoring time
UPI daily volume
~10 crorestransactions per day in India, each protected by this hardness

Predict first

A startup claims they have built a special classical chip that checks entries 10 000 times faster. Your unsorted list holds 1 crore items. Roughly how many items must their chip still examine in the worst case before finding the target?

Keep this

What this chapter established

  • Classical computers face structural limits, not just slow hardware, on problems like unsorted search and factoring.
  • Unsorted search needs up to N checks; no classical trick escapes this for guaranteed success.
  • Factoring large numbers protects UPI and Aadhaar precisely because classical computers scale too poorly to crack it.
  • Throwing more classical computers at these problems gives only linear improvement, which fails for truly large N.
  • These limits are mathematical, not temporary. They motivated scientists to ask: what if information itself worked differently?

Chapter 02

From Bit to Qubit: Embracing Superposition

Imagine you are watching a cricket match on your phone. Every ball bowled is recorded as either a dot (0 runs) or a boundary (let us say 1 run, for simplicity). Your phone stores each ball as a bit: a 0 or a 1. This is how all ordinary computers work—every piece of information is built from billions of definite 0s and 1s.

But inside a quantum computer, the fundamental unit is not a bit. It is a qubit (pronounced "cue-bit"), short for quantum bit. A qubit can do something that sounds impossible: it can exist in a superposition of 0 and 1 at the same time. This does not mean it is "secretly 0 or secretly 1 and we just do not know." It means the qubit is genuinely in a state that is neither 0 nor 1, but something else entirely—something with no everyday equivalent. This chapter explains what that means, why it is not magic, and how we describe it with mathematics.

Let us be careful about what superposition is not. A classical coin that is hidden under your hand is either heads or tails—you just do not know which. This is classical ignorance, not superposition. A crumpled piece of paper with "0" or "1" written inside a sealed box is the same: the answer is already fixed, only your knowledge is incomplete.

A qubit in superposition is different. Before measurement, it is not secretly 0 and not secretly 1. It is in a third kind of state, one that can produce interference effects—just like light waves from two slits can cancel or reinforce each other. No hidden classical model can explain this. We know this from many experiments, including the famous double-slit experiment with single particles, which you may have studied in physics.

|ψ⟩ = α|0⟩ + β|1⟩
General single-qubit state (ψ is the Greek letter psi)
|α|² + |β|² = 1
Normalisation condition: measurement probabilities must sum to 1
P(0) = |α|², P(1) = |β|²
Born rule: probability equals amplitude squared (modulus squared)

Worked example

0 / 5 steps shown

Computing measurement probabilities

A qubit is in the state |ψ⟩ = (1/√2)|0⟩ + (1/√2)|1⟩. What is the probability of measuring 0? What is the probability of measuring 1? Verify that the state is normalised.

Classical bit states
2Definite 0 or definite 1 only
Qubit states (normalised)
Infinite continuum of superpositions on the Bloch sphere surface
Measurable outcomes
2Still only 0 or 1 when you look
Information per qubit
1 bitMaximum extractable classical information after measurement
TableClassical bit versus qubit: a precise comparison
FeatureClassical bitQubit
State before measurementDefinitely 0 or definitely 1Superposition α|0⟩ + β|1⟩
Hidden realityNone—you know the stateNo hidden value; state is complete description
ProbabilitiesUsed for ignorance about many bitsBuilt into single-qubit physics
Can interfere?NoYes—amplitudes can add or cancel
Copy freely?YesNo—quantum no-cloning theorem
Visual modelCoin on table (heads or tails)Coin spinning in air (simplified model only)

Try it

A qubit is in the state |ψ⟩ = (3/5)|0⟩ + (4/5)|1⟩. What is the probability of measuring 1? (Give your answer as a fraction or decimal.)

Keep this

What we built in this chapter

  • A qubit is a two-level quantum system whose state is a superposition α|0⟩ + β|1⟩.
  • Amplitudes α and β are complex numbers; measurement probabilities are |α|² and |β|².
  • The normalisation condition |α|² + |β|² = 1 ensures probabilities sum to 1.
  • Superposition is not classical ignorance—it is a distinct quantum state with no hidden value.
  • A spinning coin is a simplified model, not a true analog; the Bloch sphere gives the full picture.
  • When measured, a qubit collapses to |0⟩ or |1⟩; before measurement, it can show interference.
  • Next, we explore what happens when two qubits become linked in a way no classical system can replicate.

Chapter 03

Entanglement: The Einstein-Podolsky-Rosen Connection

Imagine two friends, Ananya in Bengaluru and Vikram in Chennai, each holding one half of a magic coin. When Ananya flips hers and sees Heads, she instantly knows Vikram's coin will show Heads too. When she sees Tails, Vikram's is always Tails. They can repeat this a thousand times — always matching, never random. But here's the strange part: neither coin shows a definite result until flipped, and no text message travels between the cities. This is not a trick; it is entanglement, one of the most powerful and most misunderstood ideas in quantum computing.

In Chapter 2, you met the qubit living in superposition — a blend of |0⟩ and |1⟩. Now we put two qubits together and ask: can their shared state be described by simply listing each qubit's individual condition? For most quantum states, the answer is no. When the whole system knows something that neither part knows alone, we call the qubits entangled. Entanglement is not just "two things being related." It is a specific, mathematically precise property of quantum states that has no analogue in ordinary experience. It lets quantum computers explore vast solution spaces, enables quantum teleportation, and once made Albert Einstein so uncomfortable that he helped invent it — only to argue against its completeness for decades.

Worked example

0 / 7 steps shown

Testing the Bell state for entanglement

Show that the two-qubit state (|00⟩ + |11⟩)/√2 cannot be written as the product of two single-qubit states. A general product state would look like (a|0⟩ + b|1⟩) ⊗ (c|0⟩ + d|1⟩), where |a|^2 + |b|^2 = 1 and |c|^2 + |d|^2 = 1.

TableClassical correlation vs. quantum entanglement
PropertyClassical matching coinsQuantum entangled qubits
State before measurementHidden definite result (HL or HT, etc.)No definite result; shared superposition
Measurement outcome locallyRandom but pre-determinedTruly random, Born rule probabilities
Correlation revealedImmediately obvious if you trust the sourceOnly visible after classical comparison
Can send information FTL?NoNo
Violates Bell inequalities?NoYes, experimentally confirmed
Computing powerNone extraEnables exponential state-space exploration

Entanglement's computational power comes from how it enlarges the playground. Two classical bits can represent exactly one of four states: 00, 01, 10, or 11. Two qubits can occupy any point in a four-dimensional Hilbert space, including superpositions and entangled combinations. For n qubits, the state space has dimension 2^n — exponential growth. Entanglement is the glue that lets quantum gates act on this entire space at once. A classical AND gate takes two bits and returns a definite bit. A quantum gate like the CNOT (controlled-NOT) flips the second qubit conditional on the first — but when the control is in superposition, the output can be entangled, carrying information about both possibilities simultaneously. This is why quantum algorithms like Shor's factoring and Grover's search achieve speedups impossible classically: entanglement lets the computation explore many paths together, and interference (from superposition) brings the right answer forward.

Quantum teleportation offers a dramatic demonstration. Suppose Ananya has an unknown qubit state she wants to send Vikram. She cannot clone it (the no-cloning theorem prevents copying arbitrary quantum states). Instead, she and Vikram share an entangled pair. Ananya performs a measurement on her unknown qubit and her half of the entangled pair, obtaining two classical bits. She texts these bits to Vikram — ordinary, light-speed-limited communication. Vikram applies simple operations based on her message, and his qubit becomes exactly Ananya's original state. The state has 'jumped' without passing through space, but critically, it needed both entanglement and classical communication. Neither alone suffices.

Predict first

Ananya and Vikram share the Bell state (|00⟩ + |11⟩)/√2. Ananya measures her qubit and gets 0. What is the state of Vikram's qubit immediately after her measurement, before he measures?

Terms from this chapter

Bell state
One of four maximally entangled two-qubit states; the simplest entanglement example.
Example: (|00⟩ + |11⟩)/√2 is the Bell state |Φ+⟩.
Separable state
A multi-qubit state that can be written as a product of individual qubit states.
No-cloning theorem
It is impossible to create an identical independent copy of an arbitrary unknown quantum state.
No-signalling
The principle that entanglement cannot be used to transmit information faster than light.
Quantum teleportation
Transfer of a quantum state from one location to another using entanglement plus classical communication.
Example: ISRO's quantum communication experiments test protocols like this.

Chapter 04

Quantum Logic Gates: Building the Circuit

Imagine you are building a railway switching yard. A classical signal box uses simple levers: a train either goes left or right, track A or track B. But a quantum signal box is stranger. The train can exist in a blend of both paths at once, and every switch must remember how to undo itself—no information can ever be lost. These switches are called quantum logic gates, and they are the building blocks of every quantum circuit, from the algorithms that run on IBM's quantum processors to the simulations ISRO scientists might one day use for satellite trajectory optimization.

In a classical computer, logic gates like AND, OR, and NOT process definite 0s and 1s. An AND gate outputs 1 only if both inputs are 1; otherwise it outputs 0. Once the gate fires, the original inputs are gone—you cannot recover them from the output alone. This destruction of information is so commonplace that we rarely notice it. But quantum mechanics forbids such irreversible acts. Every quantum gate must be a perfect, undo-able rotation in an abstract space called Hilbert space. This single constraint—unitary evolution—shapes every gate we can build.

TableClassical vs. Quantum Gates: Structural Differences
FeatureClassical (e.g., AND, OR)Quantum (any valid gate)
Input statesDefinite 0 or 1Superpositions: a|0⟩ + b|1⟩
Output statesSingle definite bitNew superposition: a'|0⟩ + b'|1⟩
ReversibilityIrreversible (AND loses input info)Must be reversible (unitary)
Number of inputs vs. outputsCan reduce bits (2→1)Must equal: n qubits → n qubits
Matrix sizeNot usefully represented2^n × 2^n unitary matrix
Universal gate exampleNAND alone is universalH + CNOT + T is universal
Physical analogRelay switchPrecise microwave pulse or laser

Let us meet three workhorse gates. The Pauli-X gate is the quantum cousin of classical NOT. It flips |0⟩ to |1⟩ and |1⟩ to |0⟩. Its matrix is the familiar 2×2 [[0, 1], [1, 0]], the same matrix that swaps the basis states. Unlike classical NOT, however, Pauli-X must also handle superpositions: applied to (|0⟩ + |1⟩)/√2, it simply swaps the amplitudes, yielding the same state because the amplitudes were equal. This is reversibility in action—apply X twice and you return exactly where you started.

The Hadamard gate, named after the French mathematician Jacques Hadamard, has no classical equivalent. Its matrix is [[1/√2, 1/√2], [1/√2, -1/√2]]. When it acts on |0⟩, it produces (|0⟩ + |1⟩)/√2, an equal superposition. Acting on |1⟩, it produces (|0⟩ - |1⟩)/√2, a superposition with a relative negative sign. This minus sign is not mere decoration; it creates interference patterns that quantum algorithms exploit. The Hadamard is the gate that lets a quantum computer explore multiple paths simultaneously.

Worked example

0 / 5 steps shown

Creating Entanglement with Hadamard and CNOT

Start with two qubits in state |00⟩. Apply a Hadamard gate to qubit 0 (the control), then apply a CNOT with qubit 0 as control and qubit 1 as target. What is the final two-qubit state? Why is this state special?

The CNOT gate is a two-qubit gate, represented by a 4×4 matrix because two qubits have four basis states: |00⟩, |01⟩, |10⟩, |11⟩. Its matrix has 1s on the diagonal for |00⟩ and |01⟩, but swaps the |10⟩ and |11⟩ rows—this is the 'flip target if control is 1' rule embedded in matrix form. No single-qubit gate can create entanglement; CNOT is essential because it spreads correlations across qubits. Together with single-qubit rotations, CNOT forms a powerful universal set, though the rigorous universal set Hadamard + CNOT + T gate adds the precise phase control needed for arbitrary single-qubit gates via the Solovay-Kitaev theorem.

Predict first

You apply a Hadamard gate to |0⟩, giving (|0⟩+|1⟩)/√2. Then you apply a second Hadamard gate. What is the final state?

Pauli-X matrix
2×2Unitary, Hermitian, squares to identity: X² = I
Hadamard matrix
2×2Unitary, Hermitian, H² = I; creates equal superpositions
CNOT matrix
4×4Unitary; entangles, does not clone; essential for universal QC
Universal set
H+CNOT+TCan approximate any unitary to arbitrary precision
Basis states
2^nFor n qubits; matrix dimension is 2^n × 2^n

Chapter 05

Calculating Outcomes: State Vectors for Two Qubits

Imagine you have two coins that can exist in a mysterious blended state, not just heads or tails. In the previous chapters, we saw that a single qubit can be in superposition, like a coin spinning in the air. Now we put two qubits together. The result is not just two separate spins — it is a single, four-dimensional description that captures all possible combinations.

This chapter teaches you how to calculate what happens when quantum gates act on two qubits. We will use nothing harder than multiplication and squaring. By the end, you will be able to predict the exact chance of each outcome when you measure a two-qubit system — including the famous Bell state, which even Einstein found puzzling.

|00⟩ = [1, 0, 0, 0]^T
Column vector for both qubits in state 0
|ψ_final⟩ = U × |ψ_initial⟩
Applying a gate U means matrix multiplication
P(outcome) = |amplitude|²
Probability from amplitude, never from amplitude directly

How to evolve a two-qubit state

  1. Step 01Write the initial statesetup

    Express |ψ⟩ as a four-entry column vector. |00⟩ is [1, 0, 0, 0], |01⟩ is [0, 1, 0, 0], and so on.

  2. Step 02Represent the gate as a matrixsetup

    A two-qubit gate is a 4×4 matrix. Single-qubit gates like H become 4×4 when we specify which qubit they act on.

  3. Step 03Multiply matrix by vectorcalculate

    Perform matrix multiplication: each new amplitude is the sum of products across a row.

  4. Step 04Check normalisationverify

    Add the squares of all four new amplitudes. The total must equal 1.

  5. Step 05Read probabilitiesresult

    Square each amplitude to get the probability of measuring |00⟩, |01⟩, |10⟩, or |11⟩.

Worked example

0 / 5 steps shown

Creating a Bell state: H then CNOT

Start with two qubits in state |00⟩. Apply a Hadamard gate H to qubit 1 (the first qubit), then apply a CNOT gate with qubit 1 as control and qubit 2 as target. What are the measurement probabilities?

TableCommon two-qubit states and their probability distributions
State nameState vector [a, b, c, d]P(|00⟩)P(|11⟩)
|00⟩ (computational)[1, 0, 0, 0]100%0%
|11⟩ (computational)[0, 0, 0, 1]0%100%
Bell state Φ+[1/√2, 0, 0, 1/√2]50%50%
Bell state Φ−[1/√2, 0, 0, −1/√2]50%50%
Uniform superposition[1/2, 1/2, 1/2, 1/2]25%25%

Try it

%

Reflect

This stays on this page only. It isn’t saved or sent anywhere.

Chapter 06

Algorithms That Win: Where Quantum Speeds Up

Imagine you have a dusty register book at a railway station with one million passenger names written in no particular order. To find "Ramesh Kumar," a clerk must check entries one by one. On average, this takes checking half the book—about 500,000 names. This is how ordinary computers search too: check, move on, check again. But in 1996, Lov Grover discovered that a quantum computer could find Ramesh in roughly 1,000 steps instead of 500,000. That is not a small improvement; it is a square-root speedup. Grover's algorithm is one of several quantum methods that beat classical computers, but only for specific problems. This chapter shows where quantum machines actually win, how the speedup works, and why we must be careful not to imagine them as magical all-purpose solvers.

The key idea is quantum advantage: a quantum computer completes a useful task faster, cheaper, or with better quality than any classical method could in reasonable time. The advantage is always problem-specific. Some tasks see dramatic gains; many see none at all.

TableThree major quantum algorithms and their speedups
AlgorithmProblem it solvesClassical cost (roughly)Quantum cost (roughly)Type of speedupReal-world impact
Grover's searchFind one item in unsorted list of N itemsN/2 checks on average√N stepsQuadraticDatabase search, optimization shortcuts
Shor's algorithmFactor an n-digit integer into primesSub-exponential: roughly 2^(n^(1/3)) (best known)Polynomial: roughly n^3 stepsExponentialBreaks RSA encryption; threatens current internet security
Quantum simulationModel quantum systems (molecules, materials)Exponential in number of particles: 2^(particles)Polynomial in number of particlesExponentialDrug design, battery materials, catalysts

Worked example

0 / 6 steps shown

Grover's search step-by-step for N = 16 items

A classical computer needs up to 16 checks to find one marked item among 16 unsorted entries. How does Grover's algorithm reduce this?

Shor's algorithm works very differently and carries heavier consequences. Where Grover speeds up search quadratically, Shor factors integers exponentially. Modern internet security relies on RSA encryption, which assumes that factoring large numbers (like 2048-bit products of two primes) is computationally hopeless. A sufficiently large quantum running Shor's algorithm could factor such numbers in hours or days—a task that would take classical supercomputers longer than the age of the universe with current methods. The mechanism uses quantum period-finding: the algorithm transforms factoring into finding the period of a modular exponentiation function, which a quantum computer extracts efficiently through the quantum Fourier transform. Indian banks, government portals, and payment systems using RSA are already planning migration to post-quantum cryptography precisely because of this threat.

The third major arena is quantum simulation. This is not one algorithm but a family of approaches. When chemists model a molecule with, say, 50 interacting electrons, the classical representation requires tracking roughly 2^50 quantum states—over one quadrillion numbers. No supercomputer can store this. But a quantum computer with about 50 well-behaved qubits can naturally represent the same system, because qubits are themselves quantum objects. Richard Feynman proposed this in 1982: use a controllable quantum system to simulate another. Indian pharmaceutical researchers and ISRO scientists monitor this area because catalysts for clean hydrogen production and materials for lightweight spacecraft components are fundamentally quantum problems where classical approximation reaches its limits.

Predict first

A pharmaceutical company must search a chemical library of 10,000 compounds for one that binds to a specific protein. They have a classical supercomputer and a small quantum processor. Which approach wins, and by roughly what factor?

Grover speedup
√NSearch unsorted database; proven optimal for this problem class
Shor exponent
~n^3Factor n-digit integer versus sub-exponential classical best
Simulation span
2^n → poly(n)Exponential to polynomial for quantum system modeling
NP-complete
None knownNo efficient quantum algorithm known for this broad class

Keep this

Where quantum wins—and where it does not

  • Grover's algorithm searches N unsorted items in ~√N steps, a quadratic speedup proven optimal for unstructured search.
  • Shor's algorithm factors integers in polynomial time, an exponential speedup that threatens RSA encryption and drives post-quantum cryptography research.
  • Quantum simulation naturally models molecules and materials, turning exponentially large classical problems into tractable quantum ones.
  • Quantum advantage is problem-specific; no quantum speedup is known for NP-complete problems.
  • Indian applications—secure banking, ISRO materials research, pharmaceutical modeling—are all shaped by these narrow but powerful capabilities.

Chapter 07

The Hardware Battle: Decoherence, Errors, and Scaling

Imagine holding a glass of hot chai perfectly still. Even so, the heat slowly leaks into the air, the steam rises, and eventually your chai turns cold. A qubit faces a similar tragedy. It stores delicate quantum information—superposition and entanglement—but the surrounding world constantly tugs at it. Warm air, stray magnetic fields, even vibrations from a passing truck can nudge a qubit out of its fragile state. This leaking away of quantum properties is called decoherence. It is the single biggest enemy of quantum engineers, and fighting it drives almost every design choice in a quantum computer.

Unlike ordinary bits etched in silicon that happily sit at room temperature, most qubits must be shielded, cooled, and isolated to near-extreme conditions. The reason is simple: decoherence destroys the very features that make quantum computing powerful. When decoherence strikes, superposition collapses to a definite 0 or 1, and entanglement evaporates. The computation is ruined. Understanding decoherence, error rates, and the engineering path forward is essential because it tells us why today's quantum computers are still experimental, and why building a truly useful one remains one of the hardest challenges in modern science.

Superconducting qubits
~15 mKOperating temperature, about 180 times colder than outer space, in dilution refrigerators made by companies like Bluefors and Janis
Ion trap qubits
~10^-11 TorrUltra-high vacuum pressure, roughly 100 trillion times emptier than Earth's atmosphere at sea level
Single-qubit gate error
0.1%Best reported fidelity; roughly 1 wrong operation per 1,000 gates in leading superconducting systems
Two-qubit gate error
0.5-1%Typically 5-10 times worse than single-qubit errors, making multi-qubit circuits especially fragile
Physical vs logical
1000:1Overhead ratio in standard surface-code quantum error correction; thousands of physical qubits needed per reliable logical qubit
Temperature extremes for qubit technologies

Linear scale.

  • Room temperature (silicon classical chip)300 K
  • Deep space background2.7 K
  • Superconducting qubits (Google, IBM)15 mK
  • Dilution refrigerator base temperature5 mK
  • Coldest achieved in lab100 pK

Decoherence times vary dramatically by technology. Superconducting qubits, used by Google and IBM, typically maintain coherence for 50-150 microseconds. That sounds brief—and it is. A classical computer clock ticks billions of times per second, but a superconducting quantum processor must complete all operations before the quantum state dissolves. Trapped ion qubits, pursued by companies like IonQ and Honeywell, can last for seconds or even minutes because individual atoms suspended in electromagnetic traps are naturally well-isolated. However, trapped ion systems operate more slowly because moving information between ions takes milliseconds. Photonic qubits using light avoid cold temperatures entirely but struggle with probabilistic gate operations and photon loss. Each approach trades off coherence time, operation speed, and scalability differently.

The error problem compounds brutally. Suppose a quantum algorithm uses 1,000 two-qubit gates, and each gate has a 1% error probability. The chance of the entire circuit running perfectly is (0.99)^1000, which is essentially zero—about 4 × 10^-5. Even at 0.1% error, a 10,000-gate circuit fails most of the time. This is why quantum error correction is not optional for serious computation; it is mandatory. The leading scheme, the surface code, can suppress errors exponentially if physical error rates fall below a threshold near 1%. But the cost is staggering: protecting one logical qubit might require 1,000 physical qubits in optimistic estimates, or tens of thousands in conservative ones. Today's largest machines barely have enough qubits to create even one logical qubit, let alone the hundreds needed for useful applications.

Worked example

0 / 5 steps shown

Calculating when errors overwhelm a circuit

A quantum algorithm needs 500 two-qubit gates to run. The two-qubit gate error rate is 0.5%. What is the approximate probability that the entire circuit completes without any gate error?

Try it

IBM improves its two-qubit gate error from 0.5% to 0.3%. A quantum algorithm needs 800 two-qubit gates. By what factor does the success probability improve? Choose the closest estimate.

Chapter 08

Check Yourself, and What Comes Next

You have travelled from the everyday puzzle of searching a phone book, through the strange world where a qubit can be both 0 and 1 until measured, to the数学al machinery that makes a quantum computer tick. You have seen that entanglement is not merely "correlation" but a resource without classical counterpart, that quantum gates must be reversible, and that algorithms like Grover's and Shor's exploit interference to win—not magic, but choreographed cancellation. You have also met the enemy: decoherence, the loss of quantum information to the environment.

Before you step further, pause and test whether these ideas have settled into genuine understanding. The quiz below mixes calculation, concept-checking, and the kind of subtle misconception that even graduate students wrestle with. Treat it as a map: wrong answers show you exactly where the terrain is still fuzzy.

Quick check

The Quantum Check-Up

6 questions · answer what you can, then check. Getting one wrong is useful.

  1. Q1A single qubit in state |0⟩ passes through a Hadamard gate. What is the probability of measuring 1?
  2. Q2Two qubits start in state |10⟩. Apply Hadamard to the first qubit, then CNOT with first qubit as control and second as target. What is the probability of measuring |11⟩?
  3. Q3Which statement about entanglement is FALSE?
  4. Q4Grover's algorithm searches an unsorted database of N items. How many quantum queries are needed to find the marked item with high probability, versus O(N) classically?
  5. Q5A quantum logic gate must be reversible and unitary. What does 'unitary' mean in terms of information?
  6. Q6Which hardware challenge is MOST directly fought by quantum error correction?

Worked example

0 / 5 steps shown

Tracing a Common Error: Is |00⟩ + |11⟩ the Same as |01⟩ + |10⟩?

A student argues: "Both states have two qubits in superposition with equal amplitudes, so they behave identically under measurement." Show why this fails, using the CNOT gate.

If you found the calculation above slippery, you are feeling the gap between intuitive words and mathematical precision. The next depth level—"foundations"—closes this gap by introducing Dirac notation as a native language, tensor products for multi-qubit states, and density matrices for mixed states (when you no longer know the exact quantum state). Alternatively, an "algorithms" depth derives Grover's reflection operators and Shor's period-finding in full; a "hardware" depth dives into superconducting transmons, ion traps, and the surface code that Google and IBM are racing to demonstrate. Each path assumes you now hold the mental models built in these eight chapters: superposition as amplitude, entanglement as non-factorability, gates as unitary acts, and noise as the ever-present adversary.

Keep this

What to Carry Forward

  • A qubit's state is a superposition α|0⟩ + β|1⟩ with complex amplitudes; |α|² and |β|² are the measurement probabilities.
  • Superposition is not mere 'both at once'—it is a resource only when combined with interference and entanglement.
  • Entanglement means the joint state cannot be written as a product of individual states; local measurements are correlated but cannot signal faster than light.
  • Quantum gates are reversible, unitary matrices; they preserve total probability and have classical analogues only for gates like NOT and CNOT.
  • Two-qubit states live in a 4-dimensional complex vector space; the dimension grows exponentially with qubit count, but accessible information does not.
  • Grover's search achieves O(√N) query complexity via amplitude amplification, not exponential speedup.
  • Shor's algorithm factors integers in polynomial time by finding periods in a quantum superposition, threatening RSA encryption.
  • Decoherence and operational errors are the central obstacles; quantum error correction encodes logical qubits across many physical qubits.
  • Current hardware (superconducting circuits, ion traps, photonics) operates at millikelvin temperatures or vacuum isolation; scaling to thousands of logical qubits remains unsolved.
  • Quantum computers will not replace classical computers; they accelerate specific problems in simulation, optimisation, and cryptanalysis.

Key Terms of the Lesson

Qubit
The basic unit of quantum information, existing in a superposition of |0⟩ and |1⟩ until measured.
Example: An electron's spin-up and spin-down states can encode a qubit.
Superposition
A quantum state that is a linear combination of basis states, with complex amplitudes.
Example: (|0⟩ + |1⟩)/√2 is an equal superposition of 0 and 1.
Entanglement
A correlation between qubits that cannot be described by any local hidden variable theory; the joint state is not separable.
Example: The Bell state (|00⟩ + |11⟩)/√2.
Amplitude
A complex number coefficient in a quantum superposition; its squared magnitude gives a probability.
Example: In 0.6|0⟩ + 0.8i|1⟩, the probability of |1⟩ is |0.8i|² = 0.64.
Measurement
An irreversible operation that collapses a superposition to a basis state with probability given by amplitude squared.
Example: Measuring (|0⟩ + |1⟩)/√2 yields 0 or 1 each with 50% chance.
Quantum gate
A unitary operation on one or more qubits that evolves the state reversibly.
Example: The Hadamard gate H creates equal superposition from |0⟩.
CNOT
Controlled-NOT, a two-qubit gate that flips the target qubit if and only if the control qubit is |1⟩.
Example: CNOT|11⟩ = |10⟩.
Unitary matrix
A square matrix U where U†U = I; preserves inner products and total probability.
Example: The Hadamard matrix (1/√2)[[1,1],[1,-1]].
Interference
The addition of quantum amplitudes, which can constructively reinforce or destructively cancel pathways.
Example: In Grover's algorithm, wrong answers' amplitudes cancel over iterations.
Decoherence
Loss of quantum coherence due to interaction with the environment, turning superpositions into classical mixtures.
Example: A qubit in a thermal bath losing its phase information after microseconds.
Bell state
One of four maximally entangled two-qubit states; the simplest entangled resource.
Example: |Φ+⟩ = (|00⟩ + |11⟩)/√2.
No-cloning theorem
It is impossible to create an independent and identical copy of an arbitrary unknown quantum state.
Example: Prevents simple error correction strategies from classical computing.
Grover's algorithm
A quantum search algorithm finding a marked item in an unsorted database with O(√N) queries.
Example: Searching one name in an unsorted phone book of one million entries.
Shor's algorithm
A quantum algorithm for integer factorisation in polynomial time, exploiting quantum Fourier transform period-finding.
Example: Factoring a 2048-bit RSA modulus efficiently.
Quantum error correction
Encoding logical qubits across multiple physical qubits to detect and correct errors without direct measurement destroying coherence.
Example: The surface code using a 2D lattice of qubits.

Reflect

This stays on this page only. It isn’t saved or sent anywhere.

Where this comes from

Sources

End of Go deeper

What you just read

  • Explain how quantum bits (qubits) differ from classical bits by leveraging superposition and entanglement.
  • Compare and contrast quantum logic gates with classical logic gates using specific examples.
  • Calculate probabilities of measurement outcomes for simple two-qubit systems using state vector math.
  • Evaluate which computational problems quantum algorithms may solve more efficiently and explain why.
  • Assess current limitations of quantum hardware including decoherence, error rates, and scaling challenges.

Want to save topics or ask for new ones? Invited families can connect a learning device. Everything here stays free to read without signing in.

Revision 1 · release generation-b60fa5cc-02e7-4ab0-9081-c36156ee40fe · reviewed 23/09/2026