Quantum Circuit Lab / conceptual bridge
Lesson 01 · conceptual bridge

Bits vs. Qubits: A Software Engineer’s Guide

A no-physics-degree introduction to qubits, measurement, and the mental model classical programmers need before writing a circuit.

Beginner10–14 min readsoftware engineering · quantum computing

The useful analogy—and where it breaks

A classical bit is predictable memory: it is either 0 or 1, and reading it does not change it. A qubit also has two named basis states, usually written |0⟩ and |1⟩, but its pre-measurement state is not simply a hidden classical value waiting to be revealed.

state = [alpha, beta]
# alpha and beta are complex amplitudes
# abs(alpha)**2 + abs(beta)**2 == 1

The squared magnitudes are the probabilities you will observe. The amplitudes also carry phase, which is why two states with the same measurement probabilities can behave differently after another gate.

Superposition is a state, not a third value

(|0⟩ + |1⟩) / √2 is shorthand for a state that produces zero and one with equal probability. It is not a third boolean. The useful programming distinction is: probabilities describe what measurement may return; amplitudes describe how a circuit will continue to evolve.

Rule of thumb: measurement is an explicit boundary between quantum data and ordinary classical data.

Try it in the lab

Use the interactive circuit lab to place an H gate on one qubit. The histogram shows outcomes while the state-vector table shows the amplitudes that produced them. Next, continue with Python objects for superposition and entanglement.