---
title: "Entanglement"
format:
  html:
    toc: true
    number-sections: true
---

::: {.hidden}
$$
\newcommand{\braket}[2]{\langle{#1}|{#2}\rangle}
$$
:::

[In-class notes](HandWrittenNotes/EntanglementClass3.pdf)


## Learning Goals

- Describe entangled states and product states
- Describe why entanglement helps us win CHSH
- Determine if a 2-qubit state is entangled
- Practice 2 qubit measurements

## Entanglement

### Definitions

How did the quantum state help us win the CHSH game? The state
$$\ket{\beta_{00}}_{AB}=\frac{1}{\sqrt{2}}\ket{00}_{AB}+\frac{1}{\sqrt{2}}\ket{11}_{AB}$$
has a special property: entanglement.

:::{#def-entagle}

- A state $\ket{\psi}_{AB}$ is a *product state* if $\exists \ket{\psi_1},\ket{\psi_2}$ such that $\ket{\psi}_{AB}=\ket{\psi_1}_A\ket{\psi_2}_B$.
- A state $\ket{\psi}_{AB}$ is an *entangled state* if $\neg\exists \ket{\psi_1},\ket{\psi_2}$ such that $\ket{\psi}_{AB}=\ket{\psi_1}_A\ket{\psi_2}_B$.
:::

In other words, there are valid $2$-qubit states that can not be described as $A$ system in one state and $B$ system in another state, but rather, the $A$ system and the $B$ system are correlated.

This is similar to classical correlation. An example of classical correlation is if you have two bits, and the probability that both bits have value $0$ is $1/2$, and the probability that both bits have value $1$ is $1/2$. If you ask what value the first bit has, I don't know, but I do know that there is a relationship between the two bits.


### Winning the CHSH Game

The state $\ket{\beta_{00}}_{AB}$ has a very special correlation between the $A$ and $B$ qubits. In particular, if we think of these two qubits as photons, and you take two polarizing filters both at the same angle, and pass each photon through one of these filters, either both photons will pass through the filters, or both photons will be blocked. Thus the photons' polarization states are perfectly correlated with this measurement. Or if one polarizer is at a $90^\circ$ angle to the other polarizer, one photon will always pass through and one will be blocked. Thus the photons' polarization states are perfectly anticorrelated with this type of measurement. (Note that if we use circularly polarized filter instead of angled filters, the photons will not be correlated or anticorrelated, but with pass through or not pass through at random.)

Given this correlation, we can picture the measurements in the CHSH game as filters at particular angles:

![Questions from referees and the corresponding measurements Amir and Bei choose to use in the CHSH strategy, represented as polarizing filters](QuartoImages/AngledPols.png)

- When $x\wedge y=0$, we want $a\oplus b=0$, which happens when $a=b$, which means we want both photons to either pass through the filters or both get blocked by the filters. If we look at the corresponding polarizers when $x\wedge y=0$, while they are not exactly aligned, but they are only $\pi/8$ radians away from being aligned, which is why we get correlated photons with $85\%$ probability in those cases.
- When $x\wedge y=1$, which only happens with $x=y=1$ we want $a\oplus b=1$, which happens when $a\neq b$, which means we want one photon to pass through its filter and one to get blocked. In other words, we want the photons to be anticorrelated. When $x=y=1$, the filters are $3\pi/8$ radians apart, which is close to $\pi/2$, so they are close to being perfectly anticorrelated. 


### Determining Whether a State is Entangled

Recall from the [CHSH Game Notes](CHSH.qmd#mathematically-representing-2-qubits) that when two qubits are not entangled, their individual states can be described with generic amplitudes as:

  * Qubit A: $\ket{\psi_1}_A=a_0\ket{0}+a_1\ket{1}$   
  * Qubit B: $\ket{\psi_2}_B=b_0\ket{0}+b_1\ket{1}$

and their combined state can be written as
$$
\begin{align}
\ket{\psi}_{AB}
=&a_0b_0\ket{00}+a_0b_1\ket{01}+a_1b_0\ket{10}+a_1b_1\ket{11}.
\end{align}
$${#eq-product}

On the other hand, general 2-qubit states do not have this product structure to their amplitudes, and are written as 
$$\ket{\psi}_{AB}=a_{00}\ket{00}+a_{01}\ket{01}+a_{10}\ket{10}+a_{11}\ket{11},\quad \textrm{s.t. }a_i\in \mathbb{C}, \textrm{ and } \sum_{i\in \{0,1\}^2}|a_i|^2=1.$$

To prove that a state is entangled, we will use a proof by contradiction:

::: {.callout-tip appearance="simple"}
### Group Exercise

Prove $$\ket{\beta_{00}}_{AB}=\frac{1}{\sqrt{2}}\ket{00}_{AB}+\frac{1}{\sqrt{2}}\ket{11}_{AB}.$$

::: {.proof}
Assume for contradiction that $\ket{\beta_{00}}_{AB}$ is not entangled. Then it can be written in the form of @eq-product. Show that there is no way to write $\ket{\beta_{00}}_{AB}$ in the form of @eq-product.
:::

:::

The following are more practice with two-qubit states and measurements

::: {.callout-tip appearance="simple"}
### Group Exercise

* Let $\ket{\psi}_{AB}=\sqrt{\frac{3}{10}}i\ket{00}_{AB}+\frac{1}{\sqrt{10}}\ket{01}_{AB}-\sqrt{\frac{2}{10}}\ket{10}_{AB}-\sqrt{\frac{4}{10}}i\ket{11}_{AB}$. If you measure the $A$ qubit and the $B$ qubit of $\ket{\psi}_{AB}$ each with $M_A=\{\ket{0},\ket{1}\}$ what is the probability of each outcome?

* Let $\ket{\beta_{00}}_{AB}=\frac{1}{\sqrt{2}}\ket{00}_{AB}+\frac{1}{\sqrt{2}}\ket{11}_{AB}$. If you measure the $A$ qubit of $\ket{\psi}_{AB}$ with $M_A=\{\ket{+},\ket{-}\}$ and the $B$ qubit of $\ket{\psi}_{AB}$ with $M_B=\{\ket{+},\ket{-}\}$, what is the probability of getting outcome $\ket{+}_A\ket{-}_B$?

:::
