Measurement

Reads a qubit and returns 0 or 1 with probabilities set by the amplitudes.

Readout · 1 qubit · reviewed November 2026

Matrix

Not a unitary gate: probabilities are |amplitude|²

What it does

(|0⟩ + |1⟩)/√2→0 or 1, 50% each, and the qubit is then in that state

In plain words

Measurement is where quantum becomes classical. In this builder, measurement gates choose which qubits appear in the shot histogram. If you place none, all qubits are read at the end. The simulator does not model mid-circuit measurement followed by classical control.

Identities

  • Measuring in another basis = apply a basis-change gate first (H for X, S† then H for Y)

Where it is used

  • Producing the final answer
  • Sampling output distributions

Code

# Qiskit
qc.measure(0, 0)

// OpenQASM 2.0
measure q[0] -> c[0];

Qiskit prints qubit 0 on the right of a bitstring. The builder prints it on the left.

See it in an example

Related gates

Questions

Can I measure in the middle of the circuit here?

A measurement gate selects what is read out at the end. The simulator keeps the full ideal state, so use the deferred-measurement trick shown in the teleportation example for protocols that need mid-circuit logic.

Try the M gate in the Circuit Builder →