One-bit teleportation (source code)

= One-bit teleportation

Apply a <Controlled-Z gate> to input $a|0\rangle+b|1\rangle$ and a fresh $|+\rangle$ <quantum ancilla>. Measuring the input in the <equatorial qubit measurement> basis at angle $\alpha$, with outcome $s$, leaves the unnormalized output
$$
\frac1{\sqrt2}\left(a|+\rangle+(-1)^se^{i\alpha}b|-\rangle\right)=\frac1{\sqrt2}X^sJ(\alpha)|\psi\rangle.
$$
Each branch has <probability> $1/2$, independently of the input. The logical output is $J(\alpha)|\psi\rangle$ with known <Pauli frame> $X^s$; the input <qubit> has been measured, so this does not clone it.