Quantum Computing Relatable — Part 2

"The physical principles"

Quantum Computing Relatable — Part 2

In Part 1, I tried to remove the shortcuts: quantum computers do not send messages faster than light, inspect every answer and print the best one, or automatically solve every NP problem.

Now we can look at the ideas that make quantum information different from ordinary probabilities. I will use as little mathematics as possible, but I will keep the part that makes the subject work: amplitudes can interfere.

Start with one qubit

An ordinary computer stores information in bits: 0 or 1. Physically, those labels might correspond to two voltage ranges in a circuit. The numbers are how we describe the hardware.

A qubit also has two distinguishable basis states, labelled 0 and 1. But we can prepare it in a superposition: a combination of those states. When we measure it in the 0/1 basis, we get one of those two answers.

For some superpositions, each answer has a 50% chance. For others, the chances are different. Superposition does not automatically mean fifty-fifty.

Still, a random bit can give us a 50/50 result too. Imagine tossing a coin and covering it. You do not know the outcome, but the coin has already landed on one side. To understand what makes a qubit different, we need to look beyond the percentages.

The part percentages leave out

A quantum state is described using amplitudes, one for each possible measurement result. To get a probability, we take the magnitude of the corresponding amplitude and square it.

For our example, we can use ordinary positive and negative numbers. An amplitude of about +0.707 gives a probability of about 50%. So does an amplitude of about −0.707.

Both signs give the same probability when squared. But the sign matters when we apply another operation.

More generally, amplitudes are complex numbers with a magnitude and a phase. Think of a small arrow: its length gives the magnitude, and its direction represents the phase. The plus and minus signs in our example are arrows pointing in opposite directions. IBM's introduction to quantum states explains the mathematics behind this.

When different contributions to the same outcome combine, their amplitudes can reinforce each other or cancel. This is interference.

For a familiar image, think of noise-cancelling headphones. They generate sound that opposes incoming noise, reducing the resulting vibration at your ear. That illustrates how adding contributions can make something smaller. Quantum amplitudes follow their own rules, but the idea of reinforcement and cancellation is useful to keep in mind.

A tiny experiment

Let's use a qubit and one operation called a Hadamard gate. I'll call it H. A gate is simply a controlled operation on the qubit.

First, prepare the qubit in state 0. Apply H once, then measure it. Repeat the whole experiment with a freshly prepared qubit each time.

We get 0 about half the time and 1 about half the time. So far, it looks like a coin toss.

Now change the experiment: prepare 0, apply H, apply H again, and only then measure.

The result is always 0 in an ideal, error-free experiment.

The same operation that first gave us uncertain measurement outcomes takes us back to a certain outcome when applied again. IBM walks through this operation in its single-system lesson.

We can follow the arithmetic without learning matrix algebra. The exact number behind our rounded 0.707 is s = 1/√2. H acts according to these two rules:

Starting from 0: amplitude +s for 0, +s for 1
Starting from 1: amplitude +s for 0, −s for 1

After the first H, both amplitudes are +s. The second H acts on both parts of that superposition. Each contributes to the final outcomes:

Final 0: (+s × +s) + (+s × +s) = ½ + ½ = 1
Final 1: (+s × +s) + (+s × −s) = ½ − ½ = 0

Only after adding those contributions do we square to get probabilities. The probability of 0 is therefore 100%; the probability of 1 is zero.

The minus sign does the work. If we had kept only the 50/50 probabilities after the first operation, we would have lost the information needed to predict this.

There is one more version to try. Prepare 0, apply H, measure, apply H again, then measure again.

Now the final result is back to 50/50. The intermediate measurement leaves the qubit in whichever state was measured, 0 or 1. Applying H to either of those gives equal probabilities at the end. The amplitude cancellation from the previous experiment no longer happens.

Start at 0:

H → measure                 50% 0, 50% 1
H → H → measure             100% 0
H → measure → H → measure   50% 0, 50% 1

Here, measurement is a physical interaction that records an outcome. Nobody has to watch the screen. Ignoring the intermediate result does not undo its effect on the qubit. IBM's treatment of quantum circuits includes measurements and their effect on subsequent operations.

We can simulate this tiny experiment on a laptop. It demonstrates interference, not a speed advantage. But it gives us something concrete to build on.

Entanglement is a relationship

With two qubits, the possible measurement results are 00, 01, 10 and 11. A quantum state assigns amplitudes to those joint possibilities.

Some joint states can be described as two independent qubit states. Others cannot. In an entangled state, the whole has information that cannot be split into a complete description of each part separately.

For example, two entangled qubits can be prepared so that measuring them in the same basis always produces matching results. Each individual result is still unpredictable. The correlation becomes visible when the results are compared.

That correlation is stronger and more structured than a pair of ordinary coins that were secretly prepared in the same way. It is also not a faster-than-light communication channel: the local result is not controllable, and the comparison still requires a classical message.

Entanglement is useful because a circuit can create relationships between qubits and then use operations on those relationships. It is one ingredient of quantum algorithms, alongside superposition, interference and measurement. It is not a magical connection that sends usable information instantly. IBM's lesson on multiple systems introduces entangled states.

From physics to a computation

As we add qubits, the description grows quickly. A general pure state of 100 qubits has 2^100 amplitude entries in a full description. Some states have much simpler descriptions, but arbitrary ones are enormously expensive to represent that way on a classical computer.

Measuring all 100 qubits still gives us just one string of 100 bits per run. We cannot simply read out the entire collection of amplitudes.

The programmer therefore needs a sequence of operations that turns the structure of a problem into useful measurement outcomes. Interference is central to that process. Often the quantum part is run repeatedly, and an ordinary computer processes the results.

Designing that sequence is the difficult part. There is no general instruction that says “cancel every wrong answer”. The algorithm has to exploit something specific about the problem.

That also explains why I do not want to begin with a list of applications. Before asking what a quantum computer is good for, I need to understand what the machine can physically preserve and manipulate. That is the subject of Part 3 — How Do You Build a Quantum Computer?.