Qudit teleportation (source code)

= Qudit teleportation
{title2=$K_{rs}=n^{-1}X^sZ^{-r}$}

A sender and receiver share $n^{-1/2}\sum_j|j j\rangle$. The sender measures the input and their resource half in the <generalized Bell basis>. Outcome $(r,s)$ gives the receiver $X^sZ^{-r}|\chi\rangle/n$, with probability $1/n^2$. After <classical communication> of the outcome, the correction $Z^rX^{-s}$ restores the unknown <quantum state>. The same calculation preserves correlations with a reference, as in <teleportation as an identity channel on a reference>.