Pricing…Open Lab
Chapter 06 of 6 · ~28 min · FREE

Exponentials, Logarithms, and Decay

Multiply by the same number again and again, and small changes get huge. 1.01 multiplied by itself a hundred times is about 2.70. And 0.99 multiplied by itself a hundred times is about 0.37. That second number rules quantum computing. If every gate works 99% of the time, a 100-gate circuit runs with no mistake only about 37% of the time. That is why error correction exists.

What happens when you multiply by the same number a hundred times?

Why care? Because the same simple habit — multiply, then multiply again — decides whether a quantum computer gives you a right answer.

Start with money. Put 100 dollars in a bank account that pays 1% interest each year. Interest is the extra money the bank adds. After one year, multiply by 1.01. You have 101 dollars. After the next year, multiply by 1.01 again. This time the interest earns interest too.

Step by step: 101 × 1.01 = 101 + 1.01 = 102.01. Two years in, you have 102.01 dollars. That is one penny more than the "2% of the original" you might guess. That extra penny is the seed of an explosion.

In chapter 1 you met power notation. Multiplying by 1.01 a hundred times is written 1.01^100. Say it as "1.01 to the power 100".

Worked example 1: the doubling ladder. You never need a hundred multiplications. Squaring a number doubles its power, so you can climb in big steps:

  • 1.01 × 1.01 = 1.0201. That is 1.01^2.
  • 1.0201 × 1.0201 = 1.0406. That is 1.01^4.
  • 1.0406 squared ≈ 1.0829. That is 1.01^8.
  • Keep going: 1.1726 (^16), 1.3749 (^32), 1.8905 (^64).

Now 64 + 32 + 4 = 100. So multiply those three rungs: 1.8905 × 1.3749 × 1.0406 ≈ 2.7048. So 1.01^100 ≈ 2.70. Your 100 dollars became about 270. It did not become the 200 that "1% a hundred times" suggests. Growth by repeated multiplying is called exponential growth. It beats your gut feeling every time, just like chapter 1's chessboard.

What does the same trick look like going down?

Now multiply again and again by a number a little below 1.

Here is an everyday example. Make a photocopy of a photocopy of a photocopy. Say each copy keeps 99% of the quality. Then every new copy multiplies the quality by 0.99. (The example stops working in one way: a blurry copy can still be read, but one error in a quantum run can spoil the whole answer.)

Worked example 2 uses the same ladder, going down:

  • 0.99 × 0.99 = 0.9801. That is 0.99^2.
  • 0.9801 × 0.9801 = 0.9606. That is 0.99^4.
  • Keep going: 0.9227 (^8), 0.8515 (^16), 0.7250 (^32), 0.5256 (^64).

Multiply the rungs for 64 + 32 + 4 = 100 steps: 0.5256 × 0.7250 × 0.9606 ≈ 0.366. So 0.99^100 ≈ 0.37.

Stop and think about that. Each step loses only 1%. Yet a hundred steps lose almost two thirds of everything. This is called exponential decay. It is the single number that rules quantum computing.

Here is why. A gate is one step in a quantum program. On today's better hardware, a gate does its job right about 99% of the time. A circuit is fully right only if every gate works. For events that don't affect each other, you multiply their chances. That is the rule from chapter 2. So a 100-gate circuit has no error at all on only about 0.99^100 ≈ 37% of its runs. The other 63% carry at least one mistake.

What is the number e?

Play the growth game with smaller and smaller slices. Grow by 0.1% a thousand times: 1.001^1000 ≈ 2.7169. Grow by 0.01% ten thousand times: 1.0001^10000 ≈ 2.7181. The finer you slice, the closer the answers crowd toward one special number.

That number is e ≈ 2.71828. People call it the natural growth constant. It is a fixed landmark, like π. It shows up wherever smooth growth or decay happens. You find it in bank interest, in growing populations, in radioactive atoms, and in the decay curves of quantum hardware.

You don't need to compute anything with e today. Just learn to spot it. Later in the course it appears next to the number i from chapter 3. Together they are a favorite way to write a rotation. When you see e, think: "smooth growth or decay is being described here."

What is a logarithm?

A logarithm ("log" for short) answers one question: which power?

"10 to the power what makes 1000?" Well, 10 × 10 × 10 = 1000. So the answer is 3. That is all log10(1000) = 3 says. The power you need is 3. The "log" button on a calculator answers this question for any number.

Let's use the idea once, on a question that really matters. How many 99%-reliable gates can a circuit have before its chance of a fully right run drops below one half? Do the arithmetic:

  1. From the ladder: 0.99^64 ≈ 0.5256. That is still above half at 64 gates.
  2. Add four more gates: 0.99^68 = 0.5256 × 0.9606 ≈ 0.5049. That is just barely above half.
  3. Add one more gate: 0.5049 × 0.99 ≈ 0.4998. That is below half, at 69 gates.

So the answer is about 69 gates. A logarithm finds this in one step, with no ladder hunting. It turns "how many multiplications until…?" into a single button press.

Why does this force error correction?

Useful quantum programs don't need 100 gates. They need thousands, often millions. Run the decay that far and the numbers get harsh. 0.99^1000 ≈ 0.000043. That is about 4 perfect runs in every 100,000.

What if gates get ten times better, so each works 99.9% of the time? That only moves the wall. 0.999^1000 ≈ 0.37. It is the same two-thirds loss. It just arrives ten times later.

No gate we can build beats exponential decay on its own. The way out is quantum error correction. The idea: join many imperfect qubits (called physical qubits) into one much more reliable qubit (called a logical qubit). Then errors get caught and fixed faster than they pile up.

Think of a group of friends each copying down a phone number. If one friend writes a wrong digit, the others can outvote them. Unlike paper notes, qubits can't simply be copied, so the real method is cleverer. But the goal is the same.

The course covers why qubits fail. It also covers what the fix really costs in logical qubits and overhead. At heart, both chapters use this chapter's arithmetic.

To see what decay is up against, let's build something worth protecting. It is a three-qubit state with a strict pattern. The circuit uses one H gate — chapter 2's fair coin. It also uses two CX gates. A CX flips its second qubit only when its first qubit is 1. Chain two of them, and all three qubits always agree.

Run it: a structure decay would love to destroy

Prediction: only 000 and 111 appear. Each has probability exactly 0.5 — about 500 of each in 1000 shots. The other six strings have probability exactly 0 and never appear, because this simulator is perfect. On real hardware, say each of the three gates works about 99% of the time. Then the pattern would survive a run fully intact only about 0.99 × 0.99 × 0.99 = 0.9703 of the time. A thousand-gate version almost never would.standby
1234q0|0⟩q1|0⟩q2|0⟩H
press run to acquire
|000⟩|001⟩|010⟩|011⟩|100⟩|101⟩|110⟩|111⟩
————————
counts: sampledamplitudes: statevector, exactengine: in-browser
Open in the Lab →

Where will you use this?

You have now finished the math warm-up. This chapter's decay arithmetic shows up in everything ahead:

  • Entanglement. The all-agree state you just built is a famous one, called a GHZ state. It can't be built by chapter 5's entry-by-entry multiplication of separate qubits.
  • Why qubits fail and logical qubits and overhead. The whole error-correction course is 0.99 to a power, taken seriously.
  • How to judge a quantum use case. The first honest question is always: how many gates does this need, and what does decay do to that number?
  • The Lab. Build the three-qubit circuit yourself. Count the gates that stand between a perfect simulator and a real machine.
Exponentials, Logarithms, and Decay · QPU137