Simulating qubit measurement probabilities with the Born rule
P. K. Majumdar
Abstract
This Jupyter Notebook provides a reproducible simulation of single qubit measurement probabilities using the Born rule. It accompanies Chapter 2 of Quantum Computing Preliminaries and demonstrates the relationship between complex vector calculations, Bloch sphere geometry and experimentally observed measurement frequencies. The notebook implements a validated Python function that calculates both the complex probability amplitude and the corresponding transition probability for an initial quantum state and a measurement state. It checks that the supplied vectors are finite, one dimensional, equal in size and correctly normalised. Invalid or physically inconsistent inputs produce informative errors. A worked example prepares a qubit in the computational zero state and measures it in the Pauli X basis. The calculated probabilities of obtaining the plus and minus outcomes are both 0.5, and their sum is verified to be 1. The result is independently confirmed using the geometric relationship between the corresponding Bloch sphere vectors. The notebook also constructs general pure qubit states at different polar and azimuthal angles. It compares numerical transition probabilities with the Bloch sphere half angle prediction across a range of sampled angles and verifies agreement within a numerical tolerance. A finite measurement simulation using 10000 trials illustrates the distinction between an exact theoretical probability and an observed experimental frequency. A fixed random seed of 2026 ensures that this demonstration is reproducible. The notebook records the Python version, NumPy version and execution platform. It requires only Python 3, Jupyter Notebook or JupyterLab, and NumPy. No external datasets, internet connection, quantum computing framework or physical quantum hardware are required.