# In quantum teleportation, how do the measurement & reconstruction steps work mathematically?

In the quantum teleportation protocol, we have Alice trying to teleport a qbit $\begin{bmatrix} \alpha \\ \beta \end{bmatrix}$ to Bob. Alice has two qbits in her possession, one of which starts out entangled with a third qbit in Bob's possession. Alice entangles the qbit she wants to teleport with her already-entangled second qbit, and so we have the following entangled 3-qbit state right before Alice measures the two qbits in her possession (assume the qbit Alice wants to teleport is the most-significant qbit):

$\frac 1 2 \begin{bmatrix} \alpha \\ \beta \\ \beta \\ \alpha \\ \alpha \\ -\beta \\ -\beta \\ \alpha \end{bmatrix} =\frac 1 2 (|00\rangle \begin{bmatrix} \alpha \\ \beta \end{bmatrix} + |01\rangle \begin{bmatrix} \beta \\ \alpha \end{bmatrix} + |10\rangle \begin{bmatrix} \alpha \\ -\beta \end{bmatrix} + |11\rangle \begin{bmatrix} -\beta \\ \alpha \end{bmatrix})$

I can see how this product state vector breaks down into four cases depending on how the two most-significant qbits collapse and thus requires application of various combinations of the $X$ and $Z$ gates to get Bob's qbit to $\begin{bmatrix} \alpha \\ \beta \end{bmatrix}$, but am unsure how to write that mathematically.

1) How do we represent the action of Alice measuring the two qbits in her possession on the above quantum state?

2) How can outcomes of the measurement be associated with $X$ and $Z$ gate combinations mathematically? Something to do with projection operators?

• Have you heard of the concept of a partial inner product? This is usually how measurement is represented. – probably_someone Feb 9 '18 at 23:05

There are two ways to do this. There's the easy, intuitive way, and the complicated, mathematically-rigorous way. Here I'll go over the latter:

### The Density Operator

The density operator is an alternative method of representing quantum states and the action of quantum operators upon them, which allows for representation of uncertainty about the current state of a quantum system. It was introduced by John Von Neumann in 1927. In the quantum teleportation example, Bob's qbit ends up in one of four states (with equal $1/4$ probability for each):

$\begin{bmatrix} \alpha \\ \beta \end{bmatrix}, \begin{bmatrix} \beta\\ \alpha\end{bmatrix}, \begin{bmatrix} \alpha \\ -\beta \end{bmatrix}, \begin{bmatrix} -\beta \\ \alpha \end{bmatrix}$

but Bob is uncertain about which of these states it is. Alice, who has the measurement results of her two qbits, does know Bob's qbit's state, but Bob is not privy to that knowledge until he receives those classical bits from Alice. We say a qbit is in a mixed state when we don't know its actual state, versus a pure state when we do.

It is important to distinguish uncertainty from superposition. Uncertainty strictly refers to classical knowledge about the state of a quantum system: Bob doesn't know which of these four states his qbit is in, but the qbit is definitely in one of those four states. By contrast, if Bob has a single qbit in the superposition of states $|0\rangle$ and $|1\rangle$, it isn't that Bob just doesn't know whether the qbit is $|0\rangle$ or $|1\rangle$; rather, the qbit is neither $|0\rangle$ nor $|1\rangle$, but a linear combination thereof.

Now, the density operator is defined as follows:

$\rho = \sum_i p_i |\psi_i\rangle \langle\psi_i|$

where $\psi_i$ is a possible quantum state value and $p_i$ is the classical probability (within the range $[0, 1]$) of the quantum state actually being that value. Recall that $\langle\psi|$ is the conjugate-transpose of $|\psi\rangle$. We call $|\psi_i\rangle \langle\psi_i|$ the outer product.

Since the density operator represents classical knowledge of quantum states, we must specify whose knowledge we're representing. In the quantum teleportation example, we're concerned with Bob's knowledge and so Bob's density operator is as follows:

$\rho = \frac 1 4 \begin{bmatrix} \alpha \\ \beta \end{bmatrix} ⊗ \begin{bmatrix} \alpha^*, \beta^* \end{bmatrix} + \frac 1 4 \begin{bmatrix} \beta \\ \alpha \end{bmatrix} ⊗ \begin{bmatrix} \beta^*, \alpha^* \end{bmatrix} + \frac 1 4 \begin{bmatrix} \alpha \\ -\beta \end{bmatrix} ⊗ \begin{bmatrix} \alpha^*, -\beta^* \end{bmatrix} + \frac 1 4 \begin{bmatrix} -\beta \\ \alpha \end{bmatrix} ⊗ \begin{bmatrix} -\beta^*, \alpha^* \end{bmatrix}$

where $\alpha^*$ and $\beta^*$ are the complex conjugates of $\alpha$ and $\beta$. The above equation expands to:

$\rho = \frac 1 4 \begin{bmatrix} \alpha\alpha^* & \alpha\beta^* \\ \beta\alpha^* & \beta\beta^* \end{bmatrix} + \frac 1 4 \begin{bmatrix} \beta\beta^* & \beta\alpha^* \\ \alpha\beta^* & \alpha\alpha^* \end{bmatrix} + \frac 1 4 \begin{bmatrix} \alpha\alpha^* & -\alpha\beta^* \\ -\beta\alpha^* & \beta\beta^* \end{bmatrix} + \frac 1 4 \begin{bmatrix} \beta\beta^* & -\beta\alpha^* \\ -\alpha\beta^* & \alpha\alpha^* \end{bmatrix}$

### Empirical Indistinguishability

As a very interesting aside, we can simplify this to:

$\rho = \frac 1 4 \begin{bmatrix} 2(\alpha\alpha^* + \beta\beta^*) & 0 \\ 0 & 2(\alpha\alpha^* + \beta\beta^*)) \end{bmatrix}$

Recall that qbits obey the 2-norm, so we have the identity $||\alpha||^2 + ||\beta^2|| = 1$ which is equivalent to $\alpha\alpha^* + \beta\beta^* = 1$; thus:

$\rho = \frac 1 4 \begin{bmatrix} 2(1) & 0 \\ 0 & 2(1) \end{bmatrix} = \begin{bmatrix} 1/2 & 0 \\ 0 & 1/2 \end{bmatrix}$

Coincidentally, this is the exact same density matrix as for a single qbit whose value is unknown and might be $|0\rangle$ or $|1\rangle$ with equal probability (again, to emphasize, this is different from the qbit being in superposition of $|0\rangle$ and $|1\rangle$):

$\rho = \frac 1 2 \begin{bmatrix} 1 \\ 0 \end{bmatrix} ⊗ \begin{bmatrix} 1, 0 \end{bmatrix} + \frac 1 2 \begin{bmatrix} 0 \\ 1 \end{bmatrix} ⊗ \begin{bmatrix} 0, 1 \end{bmatrix} = \frac 1 2 \begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix} + \frac 1 2 \begin{bmatrix} 0 & 0 \\ 0 & 1 \end{bmatrix} = \begin{bmatrix} 1/2 & 0 \\ 0 & 1/2 \end{bmatrix}$

Now, if two distributions give rise to the same density matrix, then they are empirically indistinguishable and no operation you can possibly perform will distinguish one from the other. Thus, what we've done here is prove that Bob cannot extract any information from his qbit before receiving the classical bits from Alice: from his perspective, he's in the same situation as if his qbit were already secretly $|0\rangle$ or $|1\rangle$ with equal probability. Newcomers to quantum teleportation tend to suspect that some tricky series of operations by Bob will enable him to extract information from his qbit that was transferred faster than light, but here we've shown that is impossible.

### Measurement

The density operator really shines when representing measurement. Representing measurement in the standard column-vector quantum state paradigm is pretty clunky: you end up drawing stuff like branching arrows to different states to capture the probabilistic nature of collapse. Things are much nicer with the density operator, but first we have to take a closer look at measurement!

Measurement is defined by a set of measurement operators $P_i$, one for each possible measurement outcome. For example, when measuring in the computational basis (collapsing to $|0\rangle$ or $|1\rangle$) we have the following measurement operators:

$P_0 = |0\rangle\langle0| = \begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix}$, $P_1 = |1\rangle\langle1| = \begin{bmatrix} 0 & 0 \\ 0 & 1 \end{bmatrix}$

where $P_0$ is associated with outcome $|0\rangle$ and $P_1$ is associated with outcome $|1\rangle$. These matrices are also called projectors.

Now, given a single-qbit density operator $\rho$, we can calculate the probability of it collapsing to some value with the following formula:

$p_i = Tr(P_i \rho)$

where $Tr(M)$ is the trace, which is the sum of the elements along the main diagonal of matrix $M$. For example, consider the density operator of a qbit in state $|+\rangle$:

$\rho = |+\rangle\langle+| = \begin{bmatrix} \frac{1}{\sqrt{2}} \\ \frac{1}{\sqrt{2}} \end{bmatrix} ⊗ \begin{bmatrix} \frac{1}{\sqrt{2}}, \frac{1}{\sqrt{2}} \end{bmatrix} = \begin{bmatrix} \frac 1 2 & \frac 1 2 \\ \frac 1 2 & \frac 1 2 \end{bmatrix}$

We calculate the probability of it collapsing to $|0\rangle$ as follows:

$p_0 = Tr(P_0 \rho) = Tr(\begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix} \begin{bmatrix} \frac 1 2 & \frac 1 2 \\ \frac 1 2 & \frac 1 2 \end{bmatrix}) = Tr(\begin{bmatrix} \frac 1 2 & \frac 1 2 \\ 0 & 0 \end{bmatrix}) = \frac 1 2$

And the formula for the post-measurement density operator is:

$\rho_i = \frac{P_i \rho P_i}{p_i}$

which in our example is:

$\rho_0 = \frac{\begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix} \begin{bmatrix} \frac 1 2 & \frac 1 2 \\ \frac 1 2 & \frac 1 2 \end{bmatrix} \begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix}}{\frac 1 2} = \begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix}$

which is indeed the density matrix for the pure state $|0\rangle$.

We don't just want the density operator for a certain measurement outcome, though - what we want is a density operator which captures the branching nature of measurement, representing it as an ensemble of possible collapsed states! For this, we use the following formula:

$\rho' = \sum_i p_i \rho_i = \sum_i P_i \rho P_i$

in our example:

$\rho' = (\begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix} \begin{bmatrix} \frac 1 2 & \frac 1 2 \\ \frac 1 2 & \frac 1 2 \end{bmatrix} \begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix}) + (\begin{bmatrix} 0 & 0 \\ 0 & 1 \end{bmatrix} \begin{bmatrix} \frac 1 2 & \frac 1 2 \\ \frac 1 2 & \frac 1 2 \end{bmatrix} \begin{bmatrix} 0 & 0 \\ 0 & 1 \end{bmatrix}) = \begin{bmatrix} \frac 1 2 & 0 \\ 0 & 0 \end{bmatrix} + \begin{bmatrix} 0 & 0 \\ 0 & \frac 1 2 \end{bmatrix}$

Things work similarly for multi-qbit systems, although if you're measuring a single qbit out of a multi-qbit system then your measurement operator is derived a bit differently. For example, if you want to measure the middle qbit of a 3-qbit system, then we have:

$P_0 = \mathbb{I}_2 ⊗ |0\rangle\langle0| ⊗ \mathbb{I}_2 = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} ⊗ \begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix} ⊗ \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}$

$P_1 = \mathbb{I}_2 ⊗ |1\rangle\langle1| ⊗ \mathbb{I}_2 = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} ⊗ \begin{bmatrix} 0 & 0 \\ 0 & 1 \end{bmatrix} ⊗ \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}$

Basically, the single-qbit $P_i$ operator is tensored with the 2x2 identity matrix ($\mathbb{I}_2$) in the place of significance of the qbit you want to measure. Note that things get extremely clunky when writing out lots of 8x8 matrices (64 elements each!) so if you really want to check the math you can write it all out yourself.

### Teleportation

We now have all the pieces to analyze quantum teleportation. Recall the state right before Alice measures her two qbits is as follows:

$\psi = \frac 1 2 \begin{bmatrix} \alpha \\ \beta \\ \beta \\ \alpha \\ \alpha \\ -\beta \\ -\beta \\ \alpha \end{bmatrix}$

and so the density operator is as follows:

$\rho = |\psi\rangle\langle\psi|$

Since we're measuring two different qbits, let's define $P_x^{(n)}$ as the measurement operator for outcome $x$ on qbit $n$, where $n$ is the significance of that qbit - so in a 3-qbit system, the measurement operator for outcome $|0\rangle$ of the middle qbit would be $P_0^{(1)}$ (since significance starts counting from 0 for the rightmost qbit). Thus the density operator after Alice measures her two qbits (the most significant ones) is:

$\rho' = P_0^{(2)}P_0^{(1)}\rho P_0^{(1)}P_0^{(2)} + P_0^{(2)}P_1^{(1)}\rho P_0^{(1)}P_1^{(2)} + P_1^{(2)}P_0^{(1)}\rho P_1^{(1)}P_0^{(2)} + P_1^{(2)}P_1^{(1)}\rho P_1^{(1)}P_1^{(2)}$

which given a teleportation qbit value of $\phi = \begin{bmatrix} \alpha \\ \beta \end{bmatrix}$ simplifies to:

$\rho' = \frac 1 4 |00\phi\rangle\langle00\phi| + \frac 1 4 |01(X\phi)\rangle\langle01(X\phi)| + \frac 1 4 |10(Z\phi)\rangle\langle10(Z\phi)| + \frac 1 4 |11(ZX\phi)\rangle\langle11(ZX\phi)|$

Now recall Bob runs his qbit through an $X$ gate if Alice measures the middle qbit as $|1\rangle$, and also a $Z$ gate if Alice measures the most-significant qbit as $|1\rangle$. We can represent these as CNOT and CZ (controlled-Z) operators, respectively! Unitary transformations are applied to the density operator as follows:

$\rho_u = U\rho U^{\dagger}$

where $U^{\dagger}$ is the conjugate-transpose of $U$. So, we just apply the $CX_{10}$ and $CZ_{20}$ operators to our measured density operator:

$\rho'' = CZ_{20}CX_{10} \rho' CX_{10}^{\dagger}CZ_{20}^{\dagger}$

To expand this, recall that matrix multiplication is distributive over addition:

$U (A + B + C) U^{\dagger} = UAU^{\dagger} + UBU^{\dagger} + UCU^{\dagger}$

and so we end up with:

$\rho'' = \frac 1 4|00\phi\rangle\langle00\phi| + \frac 1 4|01\phi\rangle\langle01\phi| + \frac 1 4|10\phi\rangle\langle10\phi| + \frac 1 4|11\phi\rangle\langle11\phi|$

where of course Bob's qbit is $\phi$ in all cases. Done!