What Is A Bit?
A bit is the basic unit of classical information. It is either 0 or 1. Files, apps, images, and programs are ultimately built from long patterns of bits.
Quantum Computing From The First Bit
Quantum computing is a different way to represent and transform information. This primer starts with ordinary bits, then builds up to qubits, states, gates, measurement, and what an emulator like miniQ can help you explore.
Classical computers are built around bits. A bit is a tiny choice: 0 or 1. Quantum computers use qubits, which can carry a richer state before you measure them. That extra structure lets some algorithms use interference and entanglement in ways classical bits do not.
These are the pieces you need before Bell states, Grover search, QFT, or Shor-style factoring start to feel grounded.
A bit is the basic unit of classical information. It is either 0 or 1. Files, apps, images, and programs are ultimately built from long patterns of bits.
A qubit is the basic unit of quantum information. Before measurement, a qubit is described by amplitudes for |0> and |1>. Those amplitudes determine measurement probabilities.
A state is the full description of the qubits. One qubit has two amplitudes. Two qubits have four amplitudes: |00>, |01>, |10>, and |11>.
Superposition means more than one outcome has a nonzero amplitude before measurement. A common first example gives |0> and |1> equal probabilities.
|ψ> = 0.707|0> + 0.707|1>Measurement turns a quantum state into a classical result. If a qubit has 50 percent probability for |0> and 50 percent for |1>, one measurement returns one of those outcomes.
Entanglement links qubits so their outcomes are connected. In a Bell state, measuring two qubits gives 00 or 11, but not 01 or 10.
A quantum program is built from gates. Gates are operations that transform amplitudes. In miniQ, applying a gate updates the state vector directly, so you can inspect the result.
A quantum emulator is a classical program that runs quantum circuits by simulating their state. One helpful analogy: miniQ is like an iOS simulator for quantum circuits. It lets you run and inspect small quantum programs without having quantum hardware nearby.
The analogy has a scale caveat. An iOS simulator can run real production apps. A full state-vector quantum emulator stores every amplitude, so memory grows exponentially. miniQ is for learning, small circuits, and early algorithm experiments.
cargo run --bin miniq -- superposition --shots 1000
miniQ is not quantum hardware. It is a clear, small place to learn how quantum circuits behave and to test ideas at a scale where the whole state remains inspectable.
Run circuits for superposition, measurement, entanglement, and small gate sequences while seeing probabilities and history.
Real devices return measurement samples. miniQ can also show the full state vector, amplitudes, and exact probabilities.
Walk through an educational Shor-style example that factors 15 into 3 and 5, showing period finding and classical postprocessing.
Over time, miniQ can become a small test bench for quantum algorithm structure before hardware, noise, or scale enter the picture.
cargo run --bin miniq -- bell --shots 1000 --history
cargo run --example shor_factor_15
miniQ uses full state-vector simulation. That means one qubit needs 2 amplitudes, two qubits need 4, ten qubits need 1,024, and thirty qubits need over one billion. That exponential growth is exactly why emulators are wonderful learning tools but not replacements for large quantum computers.