Phase-gate discretization error (source code)

= Phase-gate discretization error
{title2=$\|R(\theta+\delta)-R(\theta)\|=2|\sin(\delta/2)|\leq|\delta|$}

For $R(\theta)=\operatorname{diag}(1,e^{i\theta})$, the difference vanishes on $|0\rangle$ and multiplies $|1\rangle$ by $e^{i\theta}(e^{i\delta}-1)$. Its <operator norm> is therefore $|e^{i\delta}-1|=2|\sin(\delta/2)|$. Choosing the nearest angle on the grid $2\pi m/2^n$, with circular distance, gives $|\delta|\leq\pi/2^n$ and a uniform bound of this size on the output-state norm error. This bound concerns state vectors, not an asserted equality with measurement-probability error.