Average pure-qubit fidelity of a bit-flip channel (source code)

= Average pure-qubit fidelity of a bit-flip channel
{title2=$\langle F^2\rangle=1-2p/3$}

For pure input $|\psi\rangle$, squared <quantum fidelity> after the bit-flip channel is $(1-p)+p|\langle\psi|X|\psi\rangle|^2$. The last factor is the square of the input's Bloch $x$ component. Rotational symmetry of the <uniform pure-qubit average> gives $\langle r_x^2\rangle=1/3$, because $r_x^2+r_y^2+r_z^2=1$. Hence the average squared fidelity is $1-2p/3$. Averaging an unsquared fidelity or over a different ensemble gives a different quantity.

// Target: quantum-mechanics.bigb