Skip to main content

Measurements

Why measurement feels strange

Measurement is one of the biggest places where classical intuition starts to fail.

In classical computing, reading a bit is boring. You look at it, and it stays what it was.

In quantum computing, reading a qubit is a major event. Measurement does not just reveal the state. It also affects the state.

That is why measurement must be treated carefully.

What measurement gives us

When we measure a qubit in the computational basis, the result is classical:

  • 0
  • or 1

If the qubit is in the state

ψ=α0+β1(1)|\psi\rangle = \alpha|0\rangle + \beta|1\rangle \tag{1}

then:

  • outcome 0 appears with probability α2|\alpha|^2,
  • outcome 1 appears with probability β2|\beta|^2.

So the amplitudes themselves are not what we directly observe. We observe outcomes whose probabilities come from those amplitudes.

You might be thinking: why can we not just read the amplitudes directly?

Because amplitudes are not stored like ordinary numbers in a spreadsheet cell that we can safely inspect one by one.

Quantum information is more delicate than that. The circuit lets amplitudes influence final probabilities through interference, but measurement gives us classical outcomes, not a printout of the full hidden state.

Everyday analogy

Imagine a spinning coin hidden under a cup.

Before you lift the cup, the coin is not yet giving you the clean everyday answer "heads" or "tails" in the same way a resting coin does.

When you finally lift the cup, you force the situation into a definite result that you can record.

This is not a perfect analogy, but it helps with one key idea:

  • measurement is the moment when quantum possibility becomes classical data.

Collapse of the state

Suppose we have:

ψ=12(0+1)(2)|\psi\rangle = \frac{1}{\sqrt{2}}(|0\rangle + |1\rangle) \tag{2}

If we measure this qubit:

  • there is a 50% chance of getting 0,
  • there is a 50% chance of getting 1.

If the result is 0, the state collapses to 0|0\rangle.

If the result is 1, the state collapses to 1|1\rangle.

So measurement is not like peeking through a window. It is more like opening a sealed box and changing the future of the system by doing so.

That leads to another natural doubt: "Then why not measure in the middle just to check whether things are going well?"

Usually because measuring early can destroy the very quantum effect we are trying to use. It is like stopping a cake halfway through baking and opening the oven every minute. You get information, but you may also ruin the process.

Measuring many qubits

If we measure two qubits, we may get outcomes like:

  • 00
  • 01
  • 10
  • 11

For example, suppose the state is:

ψ=12(00+11)(3)|\psi\rangle = \frac{1}{\sqrt{2}}(|00\rangle + |11\rangle) \tag{3}

Then measurement gives:

  • 00 with probability 1/21/2,
  • 11 with probability 1/21/2.

You will never get 01 or 10 from that state.

This is one reason measurement is so useful: it reveals the structure created by the circuit.

One run is usually not enough

A very common beginner mistake is thinking one circuit execution gives the full answer.

Usually it does not.

Because measurement is probabilistic, we often run the same circuit many times. Each run is called a shot.

After many shots, we collect a histogram such as:

  • 00: 503 times
  • 11: 497 times

This tells us the output distribution of the circuit.

Think of it like tossing a coin many times. One toss does not tell you much. A thousand tosses tell you the pattern.

Measurement in a circuit

A measurement is often drawn at the end:

q0: ---H---M

The M means we are converting the quantum state into a classical result.

In larger diagrams, measurement may feed into a classical register:

q0: ---H---M---
|
c0: ------0---

This means the measured result is stored classically.

Why measurement is usually near the end

Before measurement, quantum circuits rely on:

  • superposition,
  • phase,
  • interference,
  • entanglement.

Measurement destroys part of that quantum behavior by converting it into a classical answer.

That is why many circuits delay measurement until the end. They want to let the quantum effects do their work first.

This is similar to training a model before checking final metrics. If you interrupt too early, you may destroy the process before it has achieved anything useful.

Different bases

Most early examples use measurement in the computational basis, meaning we ask whether the state is 0 or 1.

But a qubit can also be measured in other bases.

For example, if we want to know whether a qubit is in the +|+\rangle or |-\rangle direction, we often apply a Hadamard first and then measure.

This is like rotating an object before taking a photo from a useful angle.

Example

Start with one qubit in 0|0\rangle and apply Hadamard:

q0: ---H---M

The state before measurement is:

H0=12(0+1)(4)H|0\rangle = \frac{1}{\sqrt{2}}(|0\rangle + |1\rangle) \tag{4}

Now measure.

Possible outcomes:

  • 0 with probability 1/21/2
  • 1 with probability 1/21/2

If you run the circuit many times, the counts should be roughly balanced.

Connection to machine learning

Measurement is a little like the final readout layer in a model.

Inside the model, there may be rich hidden representations. But at the end, we ask for a practical answer:

  • predicted class,
  • score,
  • probability,
  • decoded token.

Quantum circuits do something similar. A lot of the richness lives inside the hidden state. Measurement is how we finally turn that internal structure into usable output.

Key idea to remember

Measurement is not just observation.

It is:

  • the bridge from quantum to classical,
  • the source of probabilistic outcomes,
  • and often the final step that turns a circuit into an answer.