Quantum computing starts with a prepared state, applies controlled physical operations, and measures at the end. Exact arithmetic here means exact results for the stated model inputs; measured inputs still carry uncertainty and significant-figure limits.

highlighted = computed this step

Prepare a known state

A quantum computation starts by preparing a controlled physical state. Here the prepared state is zero with probability 1.

prepare 0\text{prepare }\lvert 0\rangle
PrepareThe prepared basis state has one certain outcome.zeroone(1, 0)state1zero0onestate1 zero0 one

Apply a checked state transformation

The H gate transforms the prepared state into an equal superposition with exact symbolic amplitudes.

preparegate\text{prepare} \rightarrow \text{gate}
GateThe gate output is computed from the input state.state1 zero0 onestate1/sqrt(2) zero1/sqrt(2) oneHgate

Measurement reads a probability distribution

The final measurement reads probabilities. This page shows the distribution; it does not simulate a random measurement draw.

gatemeasure\text{gate} \rightarrow \text{measure}
MeasureThe measurement bars come from squared amplitudes.1/2zero1/2onestate1/sqrt(2) zero1/sqrt(2) onestate1 zero0 oneafter measurement

The sequence keeps a probability budget

The prepared state starts certain, the gate spreads the budget, and measurement reads that final budget. The rows are states of the same computation, not random samples.

stagePzeroPone0101121221212\begin{array}{c|c|c}\text{stage}&P_{\text{zero}}&P_{\text{one}}\\0&1&0\\1&\frac{1}{2}&\frac{1}{2}\\2&\frac{1}{2}&\frac{1}{2}\end{array}
MeasureThe measured distribution is the last table row.1/2zero1/2onestate1/sqrt(2) zero1/sqrt(2) onestate1 zero0 oneafter measurement