Abstract
We give a rigorous and self-contained analysis of the Grover--Rudolph quantum state-preparation algorithm, which encodes a probability distribution {p_k} as an n-qubit amplitude state Σ_k√p_kk via a hierarchy of controlled rotations determined by a dyadic refinement of the target. We formalize the dyadic probability tree, derive the trigonometric factorization of conditional masses, and prove by induction that the circuit prepares exactly the desired measurement law. We further prove that perturbing each rotation angle by at most η changes the output distribution by at most min(1,nη) in total variation, and combine this with a Hoeffding concentration bound to obtain an explicit design rule: b≥log₂(2nπ/ε) bits and S≥ 2ⁿ⁺¹log(2/δ)/ε² shots suffice to achieve accuracy ε with confidence 1-δ. As a circuit-theoretic complement, we provide an ancilla-free transpilation of each stage into {(·),X,} via Gray-code ladders and a Walsh--Hadamard angle transform.