35 min read

A single qubit lives in $\mathbb{C}^2$. To describe $n$ qubits, we need a Hilbert space of dimension $2^n$. The mathematical tool for combining Hilbert spaces is the tensor product.

Chapter 5: Multiple Qubits — Tensor Products, Entanglement, Bell States, and the Resource That Makes Quantum Computing Powerful

Learning Objectives

By the end of this chapter, you will be able to:

  • Construct multi-qubit state spaces using the tensor product and perform calculations with multi-qubit states.
  • Write and interpret states in the computational basis for $n$ qubits, and appreciate the exponential growth of the state space.
  • Define entanglement mathematically and distinguish entangled states from separable (product) states using algebraic criteria.
  • Enumerate the four Bell states, derive their properties, and create them in Qiskit.
  • Describe the EPR paradox and its resolution via Bell's inequality, including a full derivation of the CHSH inequality.
  • Explain why entanglement is a resource for quantum computation and communication, with concrete protocol examples.
  • Predict the outcomes of partial measurements on entangled states and compute reduced density matrices.
  • Compute entanglement entropy and understand the Schmidt decomposition.
  • Use Qiskit to create, manipulate, and measure entangled multi-qubit states.
  • Distinguish between GHZ and W states and understand their different entanglement properties.
  • Appreciate the historical and philosophical significance of entanglement for our understanding of reality.

5.1 The Tensor Product: Building Larger State Spaces

A single qubit lives in $\mathbb{C}^2$. To describe $n$ qubits, we need a Hilbert space of dimension $2^n$. The mathematical tool for combining Hilbert spaces is the tensor product.

5.1.1 Definition

Given two Hilbert spaces $\mathcal{H}_A$ (dimension $d_A$) and $\mathcal{H}_B$ (dimension $d_B$), their tensor product $\mathcal{H}_A \otimes \mathcal{H}_B$ is a Hilbert space of dimension $d_A \cdot d_B$. If $\{|i\rangle_A\}$ is a basis for $\mathcal{H}_A$ and $\{|j\rangle_B\}$ is a basis for $\mathcal{H}_B$, then $\{|i\rangle_A \otimes |j\rangle_B\}$ is a basis for $\mathcal{H}_A \otimes \mathcal{H}_B$.

For two qubits, the computational basis consists of four states:

$$|00\rangle \equiv |0\rangle \otimes |0\rangle, \quad |01\rangle \equiv |0\rangle \otimes |1\rangle, \quad |10\rangle \equiv |1\rangle \otimes |0\rangle, \quad |11\rangle \equiv |1\rangle \otimes |1\rangle$$

We often write $|0\rangle|0\rangle$ or simply $|00\rangle$ for brevity.

5.1.2 The Tensor Product of Vectors

Given $|\psi\rangle_A = \begin{pmatrix} \alpha_0 \\ \alpha_1 \end{pmatrix}$ and $|\phi\rangle_B = \begin{pmatrix} \beta_0 \\ \beta_1 \end{pmatrix}$, their tensor product is:

$$|\psi\rangle_A \otimes |\phi\rangle_B = \begin{pmatrix} \alpha_0 \\ \alpha_1 \end{pmatrix} \otimes \begin{pmatrix} \beta_0 \\ \beta_1 \end{pmatrix} = \begin{pmatrix} \alpha_0\beta_0 \\ \alpha_0\beta_1 \\ \alpha_1\beta_0 \\ \alpha_1\beta_1 \end{pmatrix}$$

Worked Example 5.1: Let $|\psi\rangle = |+\rangle = \frac{1}{\sqrt{2}}\begin{pmatrix} 1 \\ 1 \end{pmatrix}$ and $|\phi\rangle = |1\rangle = \begin{pmatrix} 0 \\ 1 \end{pmatrix}$.

$$|+\rangle \otimes |1\rangle = \frac{1}{\sqrt{2}}\begin{pmatrix} 1 \cdot 0 \\ 1 \cdot 1 \\ 1 \cdot 0 \\ 1 \cdot 1 \end{pmatrix} = \frac{1}{\sqrt{2}}\begin{pmatrix} 0 \\ 1 \\ 0 \\ 1 \end{pmatrix} = \frac{1}{\sqrt{2}}(|01\rangle + |11\rangle)$$

This is a separable state (product of $|+\rangle$ and $|1\rangle$), not entangled.

Worked Example 5.2: Let $|\psi\rangle = \begin{pmatrix} 1/2 \\ \sqrt{3}/2 \end{pmatrix}$ and $|\phi\rangle = \begin{pmatrix} \sqrt{2}/2 \\ \sqrt{2}/2 \end{pmatrix}$. Then:

$$|\psi\rangle \otimes |\phi\rangle = \begin{pmatrix} (1/2)(\sqrt{2}/2) \\ (1/2)(\sqrt{2}/2) \\ (\sqrt{3}/2)(\sqrt{2}/2) \\ (\sqrt{3}/2)(\sqrt{2}/2) \end{pmatrix} = \begin{pmatrix} \sqrt{2}/4 \\ \sqrt{2}/4 \\ \sqrt{6}/4 \\ \sqrt{6}/4 \end{pmatrix}$$

Check: $\frac{1}{4} + \frac{1}{4} + \frac{3}{4} + \frac{3}{4} = 2$ — wait, that doesn't look right. Let's verify: $\sum |c_i|^2 = \frac{2}{16} + \frac{2}{16} + \frac{6}{16} + \frac{6}{16} = \frac{16}{16} = 1$. ✓

The general two-qubit state is a superposition of all four basis states:

$$|\Psi\rangle = c_{00}|00\rangle + c_{01}|01\rangle + c_{10}|10\rangle + c_{11}|11\rangle, \quad \sum_{i,j} |c_{ij}|^2 = 1$$

Try It Yourself: Compute $|1\rangle \otimes |+\rangle$ explicitly. Verify that it is not the same as $|+\rangle \otimes |1\rangle$ — the tensor product is not commutative.

5.1.3 The Tensor Product of Operators

If $A$ acts on $\mathcal{H}_A$ and $B$ acts on $\mathcal{H}_B$, then $A \otimes B$ acts on $\mathcal{H}_A \otimes \mathcal{H}_B$ as:

$$(A \otimes B)(|\psi\rangle_A \otimes |\phi\rangle_B) = (A|\psi\rangle_A) \otimes (B|\phi\rangle_B)$$

In matrix form, $A \otimes B$ is the Kronecker product:

$$A \otimes B = \begin{pmatrix} a_{11}B & a_{12}B & \cdots \\ a_{21}B & a_{22}B & \cdots \\ \vdots & \vdots & \ddots \end{pmatrix}$$

Worked Example 5.3: $X \otimes I$ (X on qubit 1, identity on qubit 2):

$$X \otimes I = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix} \otimes \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix} = \begin{pmatrix} 0 \cdot I & 1 \cdot I \\ 1 \cdot I & 0 \cdot I \end{pmatrix} = \begin{pmatrix} 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \\ 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \end{pmatrix}$$

This swaps $|00\rangle \leftrightarrow |10\rangle$ and $|01\rangle \leftrightarrow |11\rangle$, i.e., it flips the first qubit.

Worked Example 5.4: $I \otimes X$ (identity on qubit 1, X on qubit 2):

$$I \otimes X = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix} \otimes \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix} = \begin{pmatrix} 0 & 1 & 0 & 0 \\ 1 & 0 & 0 & 0 \\ 0 & 0 & 0 & 1 \\ 0 & 0 & 1 & 0 \end{pmatrix}$$

This swaps $|00\rangle \leftrightarrow |01\rangle$ and $|10\rangle \leftrightarrow |11\rangle$, i.e., it flips the second qubit.

For example, the Hadamard gate applied to the first qubit of a two-qubit system is $H \otimes I$, where $I$ is the $2 \times 2$ identity.

5.1.4 Key Properties of the Tensor Product

  1. Bilinearity: $(\alpha|\psi\rangle + \beta|\phi\rangle) \otimes |\chi\rangle = \alpha(|\psi\rangle \otimes |\chi\rangle) + \beta(|\phi\rangle \otimes |\chi\rangle)$
  2. Non-commutativity: $|\psi\rangle \otimes |\phi\rangle \neq |\phi\rangle \otimes |\psi\rangle$ in general (they live in different copies of Hilbert space)
  3. Associativity: $(|\psi\rangle \otimes |\phi\rangle) \otimes |\chi\rangle = |\psi\rangle \otimes (|\phi\rangle \otimes |\chi\rangle)$ (allowing us to write $|\psi\rangle \otimes |\phi\rangle \otimes |\chi\rangle$)
  4. Operator composition: $(A \otimes B)(C \otimes D) = AC \otimes BD$ (when the matrix products are defined)
# Qiskit: Demonstrating the tensor product structure
import numpy as np

# Two single-qubit states
psi = np.array([1/np.sqrt(2), 1/np.sqrt(2)])  # |+>
phi = np.array([1, 0])                          # |0>

# Tensor product (Kronecker product)
psi_phi = np.kron(psi, phi)
print("|+> ⊗ |0> =", psi_phi)
print("This equals (1/√2)(|00> + |10>)")

# Verify normalization
norm = np.sum(np.abs(psi_phi)**2)
print(f"Norm: {norm:.4f}")

# Verify non-commutativity
phi_psi = np.kron(phi, psi)
print("|0> ⊗ |+> =", phi_psi)
print("Are they equal?", np.allclose(psi_phi, phi_psi))
# Qiskit: Tensor product of operators
from qiskit.quantum_info import Operator
import numpy as np

X = np.array([[0, 1], [1, 0]])
I = np.array([[1, 0], [0, 1]])
H = np.array([[1, 1], [1, -1]]) / np.sqrt(2)

# X ⊗ I (flip first qubit)
X_I = np.kron(X, I)
print("X ⊗ I =")
print(X_I)

# I ⊗ X (flip second qubit)
I_X = np.kron(I, X)
print("\nI ⊗ X =")
print(I_X)

# H ⊗ I (Hadamard on first qubit)
H_I = np.kron(H, I)
print("\nH ⊗ I =")
print(np.round(H_I, 4))

# Verify: H ⊗ I acting on |00>
state_00 = np.array([1, 0, 0, 0])
result = H_I @ state_00
print("\n(H ⊗ I)|00> =", np.round(result, 4))
print("Expected: (1/√2)(|00> + |10>) =", np.round([1/np.sqrt(2), 0, 1/np.sqrt(2), 0], 4))

5.1.5 Partial Inner Products

When we write $\langle \psi_A |$ acting on $|\Psi_{AB}\rangle$, we mean the partial inner product (or "bra-ket on one subsystem"):

$$\langle \psi_A | \Psi_{AB} \rangle = \sum_i \langle \psi_A | i \rangle_A \cdot |j\rangle_B \langle i| \otimes \langle j | \Psi_{AB} \rangle$$

More concretely, for $|\Psi_{AB}\rangle = \sum_{ij} c_{ij} |i\rangle_A |j\rangle_B$ and $\langle \psi_A| = \sum_k \alpha_k^* \langle k|_A$:

$$\langle \psi_A | \Psi_{AB} \rangle = \sum_j \left(\sum_i \alpha_i^* c_{ij}\right) |j\rangle_B$$

This is a state in $\mathcal{H}_B$ — we have "contracted" the $A$ index. This operation is closely related to the partial trace that we will encounter later.

Common Misconception: "The tensor product is just multiplication." The tensor product is not ordinary multiplication. It is a mathematical operation that creates a new vector space from two existing ones. The key difference: ordinary multiplication gives a number (scalar), while the tensor product gives a new vector in a larger space. The Kronecker product is the matrix representation of the tensor product, and it produces a $4 \times 4$ matrix from two $2 \times 2$ matrices, not a $2 \times 2$ result.

5.1.6 Tensor Product Properties in Detail

The tensor product obeys several important algebraic properties that are used constantly in quantum computing:

Distributivity over addition: $(|\psi\rangle + |\phi\rangle) \otimes |\chi\rangle = |\psi\rangle \otimes |\chi\rangle + |\phi\rangle \otimes |\chi\rangle$

Scalar multiplication: $(\alpha|\psi\rangle) \otimes |\phi\rangle = |\psi\rangle \otimes (\alpha|\phi\rangle) = \alpha(|\psi\rangle \otimes |\phi\rangle)$

Operator composition: $(A \otimes B)(C \otimes D) = AC \otimes BD$ (when products are defined)

Partial inner product: $\langle\psi|_A (|\phi\rangle_A \otimes |\chi\rangle_B) = \langle\psi|\phi\rangle_A \cdot |\chi\rangle_B$

These properties allow us to manipulate multi-qubit expressions with confidence. Let's verify the operator composition property with an example:

$(X \otimes Z)(H \otimes I) = XH \otimes ZI = (XH) \otimes Z$

Since $XH = \frac{1}{\sqrt{2}}\begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}\begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix} = \frac{1}{\sqrt{2}}\begin{pmatrix} 1 & -1 \\ 1 & 1 \end{pmatrix}$, we get:

$(X \otimes Z)(H \otimes I) = \frac{1}{\sqrt{2}}\begin{pmatrix} 1 & -1 \\ 1 & 1 \end{pmatrix} \otimes \begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix}$

This is a $4 \times 4$ matrix that we can verify by direct computation.

Worked Example 5.10: Compute $(H \otimes H)|00\rangle$.

$(H \otimes H)|00\rangle = (H \otimes H)(|0\rangle \otimes |0\rangle) = H|0\rangle \otimes H|0\rangle = |+\rangle \otimes |+\rangle = \frac{1}{2}(|00\rangle + |01\rangle + |10\rangle + |11\rangle)$

This is the uniform superposition over all two-bit strings — the starting point for many quantum algorithms.

Worked Example 5.11: The $n$-qubit Hadamard transform $H^{\otimes n}$.

Applying $H$ to each of $n$ qubits initially in $|0\rangle$:

$$H^{\otimes n}|0\rangle^{\otimes n} = \frac{1}{\sqrt{2^n}}\sum_{x=0}^{2^n-1}|x\rangle$$

This is the uniform superposition over all $n$-bit strings, which is the starting point for Grover's algorithm, the Deutsch-Jozsa algorithm, and many others. The matrix $H^{\otimes n}$ has entries:

$$(H^{\otimes n})_{ij} = \frac{1}{\sqrt{2^n}}(-1)^{i \cdot j}$$

where $i \cdot j$ is the bitwise dot product (number of positions where both $i$ and $j$ have a 1, mod 2).

# Qiskit: n-qubit Hadamard transform
from qiskit import QuantumCircuit
from qiskit_aer import AerSimulator
from qiskit.quantum_info import Statevector
import numpy as np

# Create uniform superposition over n qubits
n = 3
qc = QuantumCircuit(n)
for i in range(n):
    qc.h(i)

# Get the statevector
state = Statevector.from_instruction(qc)
print(f"H^⊗{n}|0...0> =")
print(np.round(state.data, 4))
print(f"\nAmplitudes are all {1/np.sqrt(2**n):.4f} (±)")
print(f"Total states: {2**n} = {2**n}")

# Verify probabilities
probs = state.probabilities()
print(f"\nProbabilities: all {1/2**n:.4f}")

5.1.7 The Density Matrix Formalism for Multi-Qubit States

So far we have described states using state vectors (pure states). The density matrix (or density operator) provides a more general framework that handles both pure and mixed states.

Pure state: $\rho = |\psi\rangle\langle\psi|$

Mixed state: $\rho = \sum_i p_i |\psi_i\rangle\langle\psi_i|$ where $p_i > 0$ and $\sum_i p_i = 1$.

For a single qubit, the density matrix has the Bloch sphere representation:

$$\rho = \frac{1}{2}(I + \vec{r} \cdot \vec{\sigma})$$

where $\vec{r}$ is the Bloch vector ($|\vec{r}| = 1$ for pure states, $|\vec{r}| < 1$ for mixed states, $\vec{r} = \vec{0}$ for the maximally mixed state).

For two qubits, the density matrix is $4 \times 4$ and can be written as:

$$\rho = \frac{1}{4}\sum_{i,j=0}^{3} t_{ij} \sigma_i \otimes \sigma_j$$

where $\sigma_0 = I$, $\sigma_1 = X$, $\sigma_2 = Y$, $\sigma_3 = Z$, and $t_{ij} = \text{Tr}(\rho \cdot \sigma_i \otimes \sigma_j)$ is the correlation matrix.

Worked Example 5.12: The density matrix of $|\Phi^+\rangle = \frac{1}{\sqrt{2}}(|00\rangle + |11\rangle)$:

$$\rho = |\Phi^+\rangle\langle\Phi^+| = \frac{1}{2}(|00\rangle\langle 00| + |00\rangle\langle 11| + |11\rangle\langle 00| + |11\rangle\langle 11|)$$

In matrix form:

$$\rho = \frac{1}{2}\begin{pmatrix} 1 & 0 & 0 & 1 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \\ 1 & 0 & 0 & 1 \end{pmatrix}$$

The off-diagonal elements $|00\rangle\langle 11|$ and $|11\rangle\langle 00|$ represent the coherence of the superposition. If these were zero, the state would be a classical mixture $\frac{1}{2}(|00\rangle\langle 00| + |11\rangle\langle 11|)$, which is a very different (and less useful) state.

Common Misconception: "The Bell state is just a random mixture of $|00\rangle$ and $|11\rangle$." This is wrong. The Bell state $|\Phi^+\rangle$ has off-diagonal coherence terms $\frac{1}{2}|00\rangle\langle 11|$ and $\frac{1}{2}|11\rangle\langle 00|$ that are essential for quantum effects. A mixture $\frac{1}{2}|00\rangle\langle 00| + \frac{1}{2}|11\rangle\langle 11|$ is a separable (unentangled!) state that cannot violate Bell's inequality. The coherence is what makes the Bell state entangled.

Properties of density matrices: 1. $\rho \geq 0$ (positive semi-definite): all eigenvalues are non-negative 2. $\text{Tr}(\rho) = 1$ (unit trace) 3. $\rho = \rho^\dagger$ (Hermitian) 4. Pure states satisfy $\text{Tr}(\rho^2) = 1$; mixed states satisfy $\text{Tr}(\rho^2) < 1$ 5. $\text{Tr}(\rho^2)$ is called the purity of the state

# Qiskit: Density matrices of entangled vs. mixed states
from qiskit.quantum_info import DensityMatrix, partial_trace
import numpy as np

# Bell state |Phi+>
rho_bell = np.array([[0.5, 0, 0, 0.5],
                       [0, 0, 0, 0],
                       [0, 0, 0, 0],
                       [0.5, 0, 0, 0.5]])

# Classical mixture of |00> and |11>
rho_mixed = np.array([[0.5, 0, 0, 0],
                       [0, 0, 0, 0],
                       [0, 0, 0, 0],
                       [0, 0, 0, 0.5]])

print("Bell state density matrix:")
print(rho_bell)
print(f"  Purity: Tr(rho^2) = {np.trace(rho_bell @ rho_bell):.4f} (should be 1.0)")

print("\nClassical mixture density matrix:")
print(rho_mixed)
print(f"  Purity: Tr(rho^2) = {np.trace(rho_mixed @ rho_mixed):.4f} (should be 0.5)")

# Both give the SAME measurement statistics in the Z-basis!
print("\nZ-basis probabilities:")
print(f"  Bell: P(00) = {rho_bell[0,0]:.3f}, P(11) = {rho_bell[3,3]:.3f}")
print(f"  Mixed: P(00) = {rho_mixed[0,0]:.3f}, P(11) = {rho_mixed[3,3]:.3f}")

# But different in the X-basis!
# Convert to X-basis by applying H⊗H before measuring
H = np.array([[1, 1], [1, -1]]) / np.sqrt(2)
HH = np.kron(H, H)
rho_bell_x = HH @ rho_bell @ HH.conj().T
rho_mixed_x = HH @ rho_mixed @ HH.conj().T
print("\nX-basis probabilities:")
print(f"  Bell: P(++) = {rho_bell_x[0,0]:.3f}, P(--) = {rho_bell_x[3,3]:.3f}")
print(f"  Mixed: P(++) = {rho_mixed_x[0,0]:.3f}, P(--) = {rho_mixed_x[3,3]:.3f}")
print("  The Bell state shows correlations in BOTH bases; the mixed state only in Z!")

5.2 The Computational Basis for $n$ Qubits

For $n$ qubits, the computational basis consists of $2^n$ states:

$$\{|b_1 b_2 \ldots b_n\rangle : b_i \in \{0, 1\}\}$$

We often write basis states using decimal notation: $|0\rangle, |1\rangle, |2\rangle, \ldots, |2^n - 1\rangle$, where the binary representation of the integer gives the bit string. For example, for $n=3$:

$$|5\rangle = |101\rangle = |1\rangle \otimes |0\rangle \otimes |1\rangle$$

A general $n$-qubit state is:

$$|\Psi\rangle = \sum_{x=0}^{2^n-1} c_x |x\rangle, \quad \sum_x |c_x|^2 = 1$$

The exponential growth of the state space ($2^n$ complex amplitudes for $n$ qubits) is the source of both the power and the challenge of quantum computing. Storing $2^n$ amplitudes classically becomes infeasible for $n \gtrsim 50$, yet a quantum computer manipulates them natively.

Recurring Theme — Exponential State Space: The $2^n$-dimensional Hilbert space is the engine of quantum speedup. But it also means that classical simulation of quantum systems is exponentially expensive — a fact that motivates building quantum computers in the first place.

5.2.1 The Exponential Explosion in Detail

How quickly does the state space grow?

Qubits $n$ Dimension $2^n$ Amplitudes to store Classical storage
1 2 2 16 bytes
2 4 4 32 bytes
10 1,024 1,024 ~8 KB
20 1,048,576 ~10^6 ~8 MB
30 ~10^9 ~10^9 ~8 GB
50 ~10^15 ~10^15 ~8 PB
100 ~10^30 ~10^30 exceeds all storage
300 ~10^90 ~10^90 exceeds atoms in observable universe

The jump from "trivial" to "impossible" happens around 50 qubits — this is why quantum supremacy experiments target the 50-60 qubit range. By 100 qubits, no classical computer could store the state vector, let alone simulate it.

ASCII Art: State Space Growth

n=1:  2 amplitudes    ██
n=2:  4 amplitudes    ████
n=3:  8 amplitudes    ████████
n=4: 16 amplitudes    ████████████████
n=10: 1,024 amplitades
n=20: 1,048,576 amplitudes
n=50: ~10^15 amplitudes (petabytes of classical storage)
n=100: ~10^30 amplitudes (more than atoms in the observable universe)

Common Misconception: "A quantum computer tries all possibilities simultaneously." While the state space is exponentially large, measurement extracts only $n$ bits of classical information. The art of quantum algorithm design is arranging interference so that the correct answer has high probability and wrong answers destructively interfere. The quantum computer does not "try all possibilities and pick the best" — it manipulates amplitudes so that the measurement outcome is informative. This is why not every problem benefits from quantum computing.


5.3 Separable States vs. Entangled States

5.3.1 Product (Separable) States

A multi-qubit state is separable (or a product state) if it can be written as a tensor product of single-qubit states:

$$|\Psi\rangle = |\psi_1\rangle \otimes |\psi_2\rangle \otimes \cdots \otimes |\psi_n\rangle$$

For two qubits, $|\Psi\rangle$ is separable if and only if there exist single-qubit states $|\psi\rangle_A = \alpha_0|0\rangle + \alpha_1|1\rangle$ and $|\phi\rangle_B = \beta_0|0\rangle + \beta_1|1\rangle$ such that:

$$|\Psi\rangle = |\psi\rangle_A \otimes |\phi\rangle_B = \alpha_0\beta_0|00\rangle + \alpha_0\beta_1|01\rangle + \alpha_1\beta_0|10\rangle + \alpha_1\beta_1|11\rangle$$

A necessary condition for separability is that the coefficient matrix $C = (c_{ij})$ has rank 1 (since $c_{ij} = \alpha_i \beta_j$). Equivalently, $c_{00}c_{11} = c_{01}c_{10}$.

Worked Example 5.5: Is $|\Psi\rangle = \frac{1}{2}(|00\rangle + |01\rangle + |10\rangle + |11\rangle)$ separable?

The coefficient matrix is $C = \begin{pmatrix} 1/2 & 1/2 \\ 1/2 & 1/2 \end{pmatrix}$. Check: $c_{00} \cdot c_{11} = \frac{1}{4} = c_{01} \cdot c_{10} = \frac{1}{4}$. Yes! And indeed:

$$|\Psi\rangle = \frac{1}{\sqrt{2}}(|0\rangle + |1\rangle) \otimes \frac{1}{\sqrt{2}}(|0\rangle + |1\rangle) = |+\rangle \otimes |+\rangle$$

Worked Example 5.6: Is $|\Psi\rangle = \frac{1}{\sqrt{2}}(|00\rangle + |11\rangle)$ separable?

The coefficient matrix is $C = \begin{pmatrix} 1/\sqrt{2} & 0 \\ 0 & 1/\sqrt{2} \end{pmatrix}$. Check: $c_{00} \cdot c_{11} = \frac{1}{2} \neq c_{01} \cdot c_{10} = 0$. No! This state is entangled.

5.3.2 Entangled States

A state that is not separable is called entangled. Entanglement is the quintessential quantum correlation — it has no classical analogue.

Definition. A bipartite pure state $|\Psi\rangle \in \mathcal{H}_A \otimes \mathcal{H}_B$ is entangled if it cannot be written as $|\psi\rangle_A \otimes |\phi\rangle_B$ for any $|\psi\rangle_A \in \mathcal{H}_A$, $|\phi\rangle_B \in \mathcal{H}_B$.

Example (detailed proof). The state $|\Psi\rangle = \frac{1}{\sqrt{2}}(|00\rangle + |11\rangle)$ is entangled. Suppose it were separable: $(\alpha_0|0\rangle + \alpha_1|1\rangle) \otimes (\beta_0|0\rangle + \beta_1|1\rangle) = \alpha_0\beta_0|00\rangle + \alpha_0\beta_1|01\rangle + \alpha_1\beta_0|10\rangle + \alpha_1\beta_1|11\rangle$. For this to equal $\frac{1}{\sqrt{2}}(|00\rangle + |11\rangle)$, we need:

  • $\alpha_0\beta_0 = \frac{1}{\sqrt{2}}$ (coefficient of $|00\rangle$)
  • $\alpha_0\beta_1 = 0$ (coefficient of $|01\rangle$)
  • $\alpha_1\beta_0 = 0$ (coefficient of $|10\rangle$)
  • $\alpha_1\beta_1 = \frac{1}{\sqrt{2}}$ (coefficient of $|11\rangle$)

From condition 2: either $\alpha_0 = 0$ or $\beta_1 = 0$. - If $\alpha_0 = 0$, then condition 1 gives $0 = \frac{1}{\sqrt{2}}$, contradiction. - If $\beta_1 = 0$, then condition 4 gives $0 = \frac{1}{\sqrt{2}}$, contradiction.

Thus the state is entangled. $\square$

Common Misconception: "Entanglement means the qubits are correlated." Classical correlation is not entanglement. The state $\frac{1}{2}(|00\rangle + |01\rangle + |10\rangle + |11\rangle)$ describes qubits that are independent (it factors as $|+\rangle \otimes |+\rangle$). The state $\frac{1}{\sqrt{2}}(|00\rangle + |11\rangle)$ describes quantum correlations — measuring one qubit instantaneously determines the other, but the outcome is random. Entanglement is stronger than classical correlation.

5.3.3 Why Entanglement Matters: A Preview

Entanglement is the key resource that separates quantum computing from classical computing:

  1. Quantum teleportation uses one entangled pair and two classical bits to transmit a qubit.
  2. Superdense coding uses one entangled pair and one qubit to transmit two classical bits.
  3. Quantum key distribution (Ekert91) uses entanglement to generate shared secret keys with security guaranteed by Bell's inequality violations.
  4. Quantum error correction encodes logical qubits into entangled states of many physical qubits.
  5. Quantum speedups in algorithms like Shor's and Grover's rely on entanglement, though the precise role of entanglement in quantum advantage is still being studied.

5.4 The Bell States

The four Bell states (or EPR pairs) are maximally entangled two-qubit states that form an orthonormal basis for $\mathbb{C}^4$:

$$|\Phi^+\rangle = \frac{1}{\sqrt{2}}(|00\rangle + |11\rangle)$$ $$|\Phi^-\rangle = \frac{1}{\sqrt{2}}(|00\rangle - |11\rangle)$$ $$|\Psi^+\rangle = \frac{1}{\sqrt{2}}(|01\rangle + |10\rangle)$$ $$|\Psi^-\rangle = \frac{1}{\sqrt{2}}(|01\rangle - |10\rangle)$$

The notation: $\Phi$ states have parallel correlations (both qubits the same), $\Psi$ states have anti-parallel correlations (qubits opposite). The $\pm$ superscript indicates the relative phase.

5.4.1 Creating Bell States

Bell states are created by applying a Hadamard gate to the first qubit followed by a CNOT gate with the first qubit as control and the second as target:

ASCII Art: Bell State Preparation Circuit

|Φ+>:
q0: ──[H]──■──
            │
q1: ───────[X]──   (CNOT: q0 control, q1 target)

|Ψ+>:
q0: ──[H]──■──
            │
q1: ──[X]──[X]──   (X on q1 first, then CNOT)

|Φ->:
q0: ──[H]──■──[Z]──
            │
q1: ───────[X]─────

|Ψ->:
q0: ──[H]──■──[Z]──
            │
q1: ──[X]──[X]─────

Starting from $|00\rangle$, the Hadamard creates $\frac{1}{\sqrt{2}}(|0\rangle + |1\rangle) \otimes |0\rangle = \frac{1}{\sqrt{2}}(|00\rangle + |10\rangle)$. The CNOT flips the target when the control is $|1\rangle$, yielding $\frac{1}{\sqrt{2}}(|00\rangle + |11\rangle) = |\Phi^+\rangle$.

Step-by-step derivation:

Step 1: $H \otimes I$ applied to $|00\rangle$:

$$(H \otimes I)|00\rangle = \frac{1}{\sqrt{2}}(|0\rangle + |1\rangle) \otimes |0\rangle = \frac{1}{\sqrt{2}}(|00\rangle + |10\rangle)$$

Step 2: CNOT applied to the result:

$$\text{CNOT} \cdot \frac{1}{\sqrt{2}}(|00\rangle + |10\rangle) = \frac{1}{\sqrt{2}}(\text{CNOT}|00\rangle + \text{CNOT}|10\rangle) = \frac{1}{\sqrt{2}}(|00\rangle + |11\rangle) = |\Phi^+\rangle$$

# Qiskit: Creating all four Bell states
from qiskit import QuantumCircuit
from qiskit_aer import AerSimulator

def create_bell_state(bell_type):
    """Create one of the four Bell states."""
    qc = QuantumCircuit(2, 2)

    if bell_type in ['Psi+', 'Psi-']:
        qc.x(1)  # Start from |01> for Psi states

    qc.h(0)
    qc.cx(0, 1)

    if bell_type in ['Phi-', 'Psi-']:
        qc.z(0)  # Add relative minus sign

    qc.measure([0, 1], [0, 1])
    return qc

simulator = AerSimulator()
for bell in ['Phi+', 'Phi-', 'Psi+', 'Psi-']:
    qc = create_bell_state(bell)
    job = simulator.run(qc, shots=10000)
    counts = job.result().get_counts()
    print(f"|{bell}> measurement results: {counts}")

5.4.2 Properties of Bell States

  1. Maximal entanglement: Tracing out either qubit yields the maximally mixed state $\rho_A = \rho_B = I/2$. Each qubit individually contains no information — the information is entirely in the correlations.

  2. Rotational invariance: $|\Psi^-\rangle = \frac{1}{\sqrt{2}}(|01\rangle - |10\rangle)$ is the singlet state. It has the same form in any basis: if we rotate both qubits by the same unitary $U$, the state remains $|\Psi^-\rangle$ (up to a global phase). This is because $|\Psi^-\rangle$ is the unique antisymmetric two-qubit state.

Proof sketch: $(U \otimes U)|\Psi^-\rangle = \frac{1}{\sqrt{2}}(U|0\rangle \otimes U|1\rangle - U|1\rangle \otimes U|0\rangle)$. Since $U$ maps the basis $\{|0\rangle, |1\rangle\}$ to a new basis $\{U|0\rangle, U|1\rangle\}$, and $|\Psi^-\rangle$ is antisymmetric, the state is preserved.

  1. Perfect correlations: Measuring both qubits of $|\Phi^+\rangle$ in the computational basis always yields the same result (both 0 or both 1). Measuring $|\Psi^+\rangle$ always yields opposite results.

  2. Bell basis measurement: The four Bell states form an orthonormal basis. A measurement in the Bell basis (Bell state measurement, or BSM) can be performed by running the Bell preparation circuit in reverse: CNOT followed by Hadamard on the first qubit, then measuring both qubits in the computational basis.

ASCII Art: Bell State Measurement (BSM)

q0: ──■──[H]──[M]──
      │
q1: ──[X]─────[M]──

Input Bell state  →  Output (q0, q1)
|Φ+>              →  |00>
|Φ->              →  |10>
|Ψ+>              →  |01>
|Ψ->              →  |11>

Verification of BSM mapping. Let's verify that the BSM maps $|\Phi^+\rangle$ to $|00\rangle$:

$$(H \otimes I) \cdot \text{CNOT} \cdot |\Phi^+\rangle = (H \otimes I) \cdot \text{CNOT} \cdot \frac{1}{\sqrt{2}}(|00\rangle + |11\rangle)$$

$$= (H \otimes I) \cdot \frac{1}{\sqrt{2}}(|00\rangle + |10\rangle)$$

$$= \frac{1}{\sqrt{2}}(H|0\rangle \otimes |0\rangle + H|1\rangle \otimes |0\rangle) = \frac{1}{\sqrt{2}}(|+\rangle|0\rangle + |-\rangle|0\rangle) = \frac{1}{\sqrt{2}} \cdot \frac{2}{\sqrt{2}}|00\rangle = |00\rangle$$

5.4.3 Bell State Orthonormality

The four Bell states form an orthonormal set. Let us verify a few inner products:

$$\langle \Phi^+ | \Phi^+ \rangle = \frac{1}{2}(\langle 00| + \langle 11|)(|00\rangle + |11\rangle) = \frac{1}{2}(1 + 0 + 0 + 1) = 1$$

$$\langle \Phi^+ | \Psi^+ \rangle = \frac{1}{2}(\langle 00| + \langle 11|)(|01\rangle + |10\rangle) = \frac{1}{2}(0 + 0 + 0 + 0) = 0$$

$$\langle \Phi^+ | \Phi^- \rangle = \frac{1}{2}(\langle 00| + \langle 11|)(|00\rangle - |11\rangle) = \frac{1}{2}(1 - 0 + 0 - 1) = 0$$

All pairs are orthogonal. Since we have 4 orthonormal vectors in $\mathbb{C}^4$ (dimension 4), they form a complete basis.

Try It Yourself: Verify that $\langle \Psi^- | \Psi^- \rangle = 1$ and $\langle \Psi^+ | \Psi^- \rangle = 0$.


5.5 The EPR Paradox and Bell's Inequality

5.5.1 Historical Context

In 1935, Einstein, Podolsky, and Rosen (EPR) published a paper titled "Can Quantum-Mechanical Description of Physical Reality Be Considered Complete?" They argued that quantum mechanics must be incomplete because it allows "spooky action at a distance" — the instantaneous correlation of measurements on entangled particles separated by arbitrary distances.

EPR's argument (adapted to the Bohm version using spins):

  1. Consider the singlet state $|\Psi^-\rangle = \frac{1}{\sqrt{2}}(|01\rangle - |10\rangle)$ shared between Alice and Bob, who are far apart.
  2. Alice measures her qubit in the $Z$-basis. If she gets 0, Bob's qubit is instantly in state $|1\rangle$; if she gets 1, Bob's is in $|0\rangle$.
  3. Alternatively, Alice measures in the $X$-basis. If she gets $+$, Bob's qubit is in $|-\rangle$; if she gets $-$, Bob's is in $|+\rangle$.
  4. Since Alice's measurement cannot influence Bob (by relativistic causality, if they are spacelike separated), Bob's qubit must have had both definite $Z$ and definite $X$ values all along.
  5. But quantum mechanics assigns no simultaneous definite values to non-commuting observables. Therefore, quantum mechanics is incomplete — there must be "hidden variables" that determine the outcomes.

5.5.2 Bell's Theorem: A Full Derivation

In 1964, John Bell showed that any local hidden-variable theory makes predictions that differ from quantum mechanics. He derived an inequality that must be satisfied by all local realistic theories but is violated by quantum mechanics.

Setup. Alice and Bob share a singlet state. Each chooses one of two measurement settings: - Alice: $A$ or $A'$ (angles $\theta_a$ and $\theta_{a'}$) - Bob: $B$ or $B'$ (angles $\theta_b$ and $\theta_{b'}$)

Each measurement yields $\pm 1$.

Local hidden-variable assumption. There exists a hidden variable $\lambda$ such that the measurement outcomes are deterministic functions of $\lambda$ and the measurement setting: $A(\lambda) \in \{-1, +1\}$, $A'(\lambda) \in \{-1, +1\}$, $B(\lambda) \in \{-1, +1\}$, $B'(\lambda) \in \{-1, +1\}$.

Derivation of CHSH inequality. Consider the quantity:

$$S(\lambda) = A(\lambda)B(\lambda) - A(\lambda)B'(\lambda) + A'(\lambda)B(\lambda) + A'(\lambda)B'(\lambda)$$

Since each term is $\pm 1$, we can factor:

$$S(\lambda) = A(\lambda)[B(\lambda) - B'(\lambda)] + A'(\lambda)[B(\lambda) + B'(\lambda)]$$

Now, either $B(\lambda) = B'(\lambda)$ or $B(\lambda) = -B'(\lambda)$:

  • If $B(\lambda) = B'(\lambda)$: $S(\lambda) = A(\lambda) \cdot 0 + A'(\lambda) \cdot 2B(\lambda) = \pm 2$
  • If $B(\lambda) = -B'(\lambda)$: $S(\lambda) = A(\lambda) \cdot 2B(\lambda) + A'(\lambda) \cdot 0 = \pm 2$

In either case, $|S(\lambda)| = 2$. Taking the expectation value over $\lambda$:

$$|\langle S \rangle| = |\langle AB \rangle - \langle AB' \rangle + \langle A'B \rangle + \langle A'B' \rangle| \leq 2$$

This is the CHSH inequality: for any local hidden-variable theory, $S \leq 2$.

Quantum violation. For the singlet state $|\Psi^-\rangle$ with measurements at angles: - $A$: angle $0$ - $A'$: angle $\pi/2$ - $B$: angle $\pi/4$ - $B'$: angle $3\pi/4$

The quantum correlator for measurements at angles $\theta_a$ and $\theta_b$ is:

$$E(\theta_a, \theta_b) = -\cos(\theta_a - \theta_b)$$

Computing:

$$\langle AB \rangle = -\cos(0 - \pi/4) = -\cos(\pi/4) = -\frac{1}{\sqrt{2}}$$

$$\langle AB' \rangle = -\cos(0 - 3\pi/4) = -\cos(-3\pi/4) = \frac{1}{\sqrt{2}}$$

$$\langle A'B \rangle = -\cos(\pi/2 - \pi/4) = -\cos(\pi/4) = -\frac{1}{\sqrt{2}}$$

$$\langle A'B' \rangle = -\cos(\pi/2 - 3\pi/4) = -\cos(-\pi/4) = -\frac{1}{\sqrt{2}}$$

$$S = |-\frac{1}{\sqrt{2}} - \frac{1}{\sqrt{2}} - \frac{1}{\sqrt{2}} - \frac{1}{\sqrt{2}}| = \frac{4}{\sqrt{2}} = 2\sqrt{2} \approx 2.828$$

This violates the CHSH bound of 2! The quantum prediction has been confirmed experimentally (Aspect, 1982; Hensen et al., 2015 — the "loophole-free" tests).

Recurring Theme — Non-locality: Bell's theorem shows that quantum correlations cannot be explained by any theory that respects locality and realism. Entanglement is a genuinely non-classical resource that enables tasks impossible with classical correlations alone. However, entanglement does not enable faster-than-light communication — the no-signaling theorem ensures that Alice's local measurement statistics are unaffected by Bob's choice of measurement basis.

# Qiskit: Demonstrating Bell/CHSH correlations
from qiskit import QuantumCircuit
from qiskit_aer import AerSimulator
import numpy as np

def measure_correlator(theta_a, theta_b, shots=10000):
    """Measure E(A,B) for measurement angles theta_a, theta_b."""
    qc = QuantumCircuit(2, 2)
    # Create singlet state |Psi->
    qc.x(1)
    qc.h(0)
    qc.cx(0, 1)
    qc.z(0)  # Now in |Psi->

    # Rotate measurement bases
    qc.ry(2 * theta_a, 0)  # Rotate qubit 0 measurement axis
    qc.ry(2 * theta_b, 1)  # Rotate qubit 1 measurement axis

    qc.measure_all()
    simulator = AerSimulator()
    job = simulator.run(qc, shots=shots)
    counts = job.result().get_counts()

    # Compute correlator: +1 for same outcomes, -1 for different
    same = counts.get('00', 0) + counts.get('11', 0)
    diff = counts.get('01', 0) + counts.get('10', 0)
    return (same - diff) / shots

# Optimal CHSH angles
angles = [0, np.pi/4, np.pi/2, 3*np.pi/4]
E = {}
E['AB']   = measure_correlator(angles[0], angles[1])
E['AB\''] = measure_correlator(angles[0], angles[3])
E['A\'B'] = measure_correlator(angles[2], angles[1])
E['A\'B\''] = measure_correlator(angles[2], angles[3])

S = abs(E['AB'] - E['AB\''] + E['A\'B'] + E['A\'B\''])
print(f"CHSH S value: {S:.4f}")
print(f"Classical bound: S ≤ 2")
print(f"Quantum prediction: S = 2√2 ≈ 2.8284")

5.5.3 Why Bell's Inequality Matters for Quantum Computing

Bell's inequality is not just a philosophical curiosity. It has direct implications for quantum computing:

  1. Security of quantum key distribution: Bell violation certifies that the shared correlations are genuinely quantum — no classical eavesdropper could have produced them.

  2. Device-independent protocols: Bell tests allow protocols that are secure even when the quantum devices are untrusted (device-independent QKD, randomness certification).

  3. Entanglement verification: Bell inequality violation is an experimental test for genuine entanglement.

  4. Quantum advantage certification: In a deep sense, quantum computational advantage requires entanglement. Bell's theorem shows that this entanglement is not reproducible by classical means.

5.5.4 Experimental Tests of Bell's Inequality

The CHSH inequality has been tested experimentally many times, with increasingly sophisticated setups:

  • Aspect (1982): First convincing demonstration of Bell inequality violation using calcium atoms. Used switching between measurement bases to close the "locality loophole" partially.

  • Weihs et al. (1998): Closed both the locality and freedom-of-choice loopholes using photons separated by 400m, with random basis choices made by fast random number generators.

  • Hensen et al. (2015): First loophole-free Bell test using electron spins in diamond, separated by 1.3 km. Simultaneously closed the locality, detection, and freedom-of-choice loopholes.

  • Shalm et al. (2015); Giustina et al. (2015): Independent loophole-free tests using photons, confirming the results.

All experiments agree: $S \approx 2\sqrt{2} \approx 2.828$, violating the classical bound of 2 by many standard deviations.

ASCII Art: Timeline of Bell Tests

1982  Aspect:                    "Spooky action" confirmed
      ↓
1998  Weihs:                     Locality loophole closed
      ↓
2015  Hensen, Shalm, Giustina: Loophole-free tests
      ↓
      S = 2√2 ≈ 2.828 > 2  ←→  Classical bound: S ≤ 2

      Quantum mechanics wins. Local realism is ruled out.

Recurring Theme — We're at the Beginning: While Bell inequality violations have been confirmed beyond doubt, practical quantum technologies that exploit entanglement at scale are still in their infancy. Quantum key distribution is commercially available, but large-scale quantum computers and quantum networks remain research challenges. The experiments of 1982-2015 laid the foundation; the engineering of the 2020s-2030s will build on it.


5.6 Entanglement as a Resource

Entanglement is not merely a philosophical curiosity — it is a computational resource that enables protocols impossible in the classical world.

5.6.1 Quantum Teleportation

Using one Bell pair shared between Alice and Bob, plus two classical bits of communication, Alice can transmit an unknown qubit state to Bob. The protocol:

  1. Alice has qubit $|\psi\rangle = \alpha|0\rangle + \beta|1\rangle$ and the first qubit of a Bell pair $|\Phi^+\rangle_{AB}$.
  2. Alice performs a Bell measurement on her two qubits ($|\psi\rangle$ and her half of the Bell pair).
  3. Alice sends the 2-bit measurement outcome to Bob.
  4. Bob applies a Pauli correction ($I, X, Z,$ or $ZX$) to his half of the Bell pair, recovering $|\psi\rangle$.

Full derivation of teleportation:

Initial state: $|\psi\rangle \otimes |\Phi^+\rangle = (\alpha|0\rangle + \beta|1\rangle) \otimes \frac{1}{\sqrt{2}}(|00\rangle + |11\rangle)$

$$= \frac{1}{\sqrt{2}}(\alpha|000\rangle + \alpha|011\rangle + \beta|100\rangle + \beta|111\rangle)$$

Rewriting in the Bell basis for Alice's qubits:

$$= \frac{1}{2}\Big[|\Phi^+\rangle(\alpha|0\rangle + \beta|1\rangle) + |\Phi^-\rangle(\alpha|0\rangle - \beta|1\rangle) + |\Psi^+\rangle(\alpha|1\rangle + \beta|0\rangle) + |\Psi^-\rangle(\alpha|1\rangle - \beta|0\rangle)\Big]$$

After Alice's Bell measurement: - If she gets $|\Phi^+\rangle$: Bob's state is $\alpha|0\rangle + \beta|1\rangle = |\psi\rangle$ — Bob applies $I$ - If she gets $|\Phi^-\rangle$: Bob's state is $\alpha|0\rangle - \beta|1\rangle$ — Bob applies $Z$ - If she gets $|\Psi^+\rangle$: Bob's state is $\beta|0\rangle + \alpha|1\rangle$ — Bob applies $X$ - If she gets $|\Psi^-\rangle$: Bob's state is $-\beta|0\rangle + \alpha|1\rangle$ — Bob applies $ZX$

After Bob's correction, he always has $|\psi\rangle$.

ASCII Art: Quantum Teleportation Circuit

         ┌───┐     ┌──────┐
|ψ> ────┤ H ├──■──┤      ├──[M]──── b₀ ──┐
         └───┘  │  │ Bell │               │
         ┌───┐  │  │ Meas │               │
|0> ────┤ H ├──┼──┤      ├──[M]──── b₁ ──┼──┐
         └───┘  │  └──────┘                  │  │
                │                            │  │
|0> ───────────[X]──────[X^b₀]──[Z^b₁]────┘  │
                    (Bob's corrections)
# Qiskit: Complete quantum teleportation
from qiskit import QuantumCircuit, ClassicalRegister, QuantumRegister
from qiskit_aer import AerSimulator
from qiskit.quantum_info import Statevector
import numpy as np

# Create a circuit with 3 qubits and 2 classical bits
qr = QuantumRegister(3, name='q')
crz = ClassicalRegister(1, name='crz')
crx = ClassicalRegister(1, name='crx')
qc = QuantumCircuit(qr, crz, crx)

# Prepare the state to teleport: |ψ> = cos(π/8)|0> + sin(π/8)|1>
theta = np.pi / 4
qc.ry(theta, 0)

# Create Bell pair between qubits 1 and 2
qc.h(1)
qc.cx(1, 2)

# Bell measurement on qubits 0 and 1
qc.cx(0, 1)
qc.h(0)
qc.measure(0, crz)
qc.measure(1, crx)

# Bob's corrections (classical conditioning)
qc.x(2).c_if(crx, 1)
qc.z(2).c_if(crz, 1)

# Verify by measuring qubit 2
qc.measure(2, crz)  # Reusing classical register for output
simulator = AerSimulator()
result = simulator.run(qc, shots=10000).result()
counts = result.get_counts()
print("Teleportation results:", counts)

5.6.2 Superdense Coding

With one Bell pair and one qubit of communication, Alice can transmit two classical bits to Bob. This doubles the classical capacity of a quantum channel.

Protocol: 1. Alice and Bob share $|\Phi^+\rangle$. 2. Alice applies one of $\{I, X, Z, XZ\}$ to her qubit: - $I \otimes I$: state remains $|\Phi^+\rangle$ → message "00" - $X \otimes I$: state becomes $|\Psi^+\rangle$ → message "01" - $Z \otimes I$: state becomes $|\Phi^-\rangle$ → message "10" - $XZ \otimes I$: state becomes $|\Psi^-\rangle$ → message "11" 3. Alice sends her qubit to Bob. 4. Bob performs a Bell measurement on both qubits, recovering 2 classical bits.

Verification: $(X \otimes I)|\Phi^+\rangle = \frac{1}{\sqrt{2}}(|10\rangle + |01\rangle) = |\Psi^+\rangle$ ✓

5.6.3 Quantum Key Distribution (Ekert91)

Entanglement-based QKD uses Bell pairs: Alice and Bob each measure their half in randomly chosen bases. The violation of Bell's inequality certifies that no eavesdropper has compromised the correlation.

If an eavesdropper Eve intercepts the particles, she must disturb the entanglement. The Bell parameter $S$ will drop from $2\sqrt{2}$ toward the classical bound of 2. Alice and Bob can detect this and abort the protocol.

5.6.4 Measurement-Based Quantum Computation

In the one-way quantum computer (Raussendorf & Briegel, 2001), computation proceeds by performing single-qubit measurements on a highly entangled cluster state. The entanglement is the resource; the measurements are the computation.

The cluster state is prepared by applying CNOT gates between nearest-neighbor qubits initialized in $|+\rangle$. Then, single-qubit measurements in adaptive bases drive the computation forward. This model is computationally equivalent to the circuit model but provides a different perspective on the role of entanglement.

5.6.5 Entanglement and Quantum Error Correction

Quantum error correction (QEC) provides the most compelling practical application of entanglement for quantum computing. Classical error correction uses redundancy: copy the bits. The no-cloning theorem forbids this for quantum information. Instead, QEC uses entanglement to encode logical information across multiple physical qubits.

The simplest quantum error-correcting code is the three-qubit bit-flip code:

Encoding: $|0\rangle_L \to |000\rangle$, $|1\rangle_L \to |111\rangle$

The logical state $|\psi\rangle_L = \alpha|0\rangle_L + \beta|1\rangle_L = \alpha|000\rangle + \beta|111\rangle$ is an entangled state of three physical qubits. If a single bit-flip error occurs on any one qubit, we can detect and correct it using parity measurements without collapsing the logical state.

Error detection: Measure $Z \otimes Z \otimes I$ and $I \otimes Z \otimes Z$ (parity checks). These measurements yield: - No error: both parities even (00) - Error on qubit 1: first parity odd, second even (01) - Error on qubit 2: both parities odd (11) - Error on qubit 3: first parity even, second odd (10)

Error correction: Apply $X$ to the identified qubit.

This code protects against single bit-flip errors but not phase errors. The Shor nine-qubit code and the surface code protect against both types of errors by using more entanglement.

ASCII Art: Three-Qubit Bit-Flip Code

Encoding:
|ψ> ──■──■──     |ψ> = α|0> + β|1>
      │  │
|0> ──⊕──┼──     Encoded: α|000> + β|111>
         │
|0> ─────⊕──

Error detection (syndrome measurement):
Z⊗Z⊗I: measures parity of qubits 1 and 2
I⊗Z⊗Z: measures parity of qubits 2 and 3

Error correction:
Syndrome 00 → no error
Syndrome 01 → flip qubit 1
Syndrome 11 → flip qubit 2  
Syndrome 10 → flip qubit 3
# Qiskit: Three-qubit bit-flip code
from qiskit import QuantumCircuit
from qiskit_aer import AerSimulator
import numpy as np

# Encoding
def encode_bitflip(qc, logical_qubit=0):
    """Encode a single logical qubit using three-qubit bit-flip code."""
    qc.cx(logical_qubit, 1)
    qc.cx(logical_qubit, 2)

# Error detection and correction
def correct_bitflip(qc):
    """Detect and correct a single bit-flip error."""
    # Use two ancilla qubits for syndrome measurement
    qc.cx(0, 3)
    qc.cx(1, 3)  # ancilla 3: parity of qubits 0 and 1
    qc.cx(1, 4)
    qc.cx(2, 4)  # ancilla 4: parity of qubits 1 and 2

    # Measure syndromes
    qc.measure(3, 0)  # first parity
    qc.measure(4, 1)  # second parity

    # Conditional correction (simplified - in practice use if-then)
    # This is a demonstration; real error correction uses feedback

# Full example
qc = QuantumCircuit(5, 2)  # 3 data + 2 ancilla, 2 classical bits
# Prepare |1> logical state
qc.x(0)
encode_bitflip(qc)

# Introduce a bit-flip error on qubit 1
qc.x(1)

# Detect and correct (simplified)
qc.cx(0, 3)
qc.cx(1, 3)
qc.cx(1, 4)
qc.cx(2, 4)
qc.measure(3, 0)
qc.measure(4, 1)

simulator = AerSimulator()
result = simulator.run(qc, shots=10000).result()
counts = result.get_counts()
print("Syndrome measurement:", counts)
print("01 → error on qubit 0, 11 → error on qubit 1, 10 → error on qubit 2")

5.7 Partial Measurements on Entangled States

Measuring one qubit of an entangled pair has an instantaneous effect on the state of the other qubit — even if they are spacelike separated. This is the phenomenon Einstein called "spooky action at a distance."

5.7.1 Example: Measuring One Qubit of $|\Phi^+\rangle$

Consider $|\Phi^+\rangle = \frac{1}{\sqrt{2}}(|00\rangle + |11\rangle)$. If we measure the first qubit in the computational basis:

  • Outcome 0 (probability 1/2): The state collapses to $|00\rangle$. The second qubit is now in $|0\rangle$.
  • Outcome 1 (probability 1/2): The state collapses to $|11\rangle$. The second qubit is now in $|1\rangle$.

The measurement on qubit 1 instantaneously determines the state of qubit 2, regardless of distance. However, this cannot be used for faster-than-light communication because the measurement outcome is random — Bob cannot tell whether his qubit's state was determined by Alice's measurement or by his own.

Detailed calculation: The probability of outcome 0 is:

$$P(0_A) = \langle \Phi^+ | (|0\rangle\langle 0| \otimes I) | \Phi^+ \rangle = \frac{1}{2}$$

The post-measurement state (projected and renormalized):

$$\frac{(|0\rangle\langle 0| \otimes I)|\Phi^+\rangle}{\sqrt{1/2}} = \frac{\frac{1}{\sqrt{2}}|0\rangle|0\rangle}{1/\sqrt{2}} = |00\rangle$$

The second qubit is now in the pure state $|0\rangle$.

5.7.2 The Reduced Density Operator

The correct description of a subsystem of an entangled state is given by the reduced density operator, obtained by the partial trace:

$$\rho_A = \text{Tr}_B(|\Psi\rangle\langle\Psi|)$$

For $|\Phi^+\rangle$:

$$\rho_A = \text{Tr}_B\left(\frac{1}{2}(|00\rangle\langle 00| + |00\rangle\langle 11| + |11\rangle\langle 00| + |11\rangle\langle 11|)\right)$$

$$= \frac{1}{2}(|0\rangle\langle 0| \cdot \langle 0|0\rangle + |1\rangle\langle 1| \cdot \langle 1|1\rangle) + \frac{1}{2}(|0\rangle\langle 1| \cdot \langle 0|1\rangle + |1\rangle\langle 0| \cdot \langle 1|0\rangle)$$

Wait, let me be more careful. The partial trace over $B$ means:

$$\rho_A = \sum_j (\langle j|_B \otimes I_A) |\Phi^+\rangle\langle\Phi^+| (|j\rangle_B \otimes I_A)$$

$$= \sum_j \frac{1}{2}\langle j|_B(|00\rangle + |11\rangle) \cdot (\langle 00| + \langle 11|)|j\rangle_B$$

For $j = 0$: $\langle 0|_B(|00\rangle + |11\rangle) = |0\rangle_A$

So $\rho_A = \frac{1}{2}|0\rangle\langle 0| + \frac{1}{2}|1\rangle\langle 1| = \frac{I}{2}$

The reduced state is maximally mixed — it contains no information about the original state. All information resides in the correlations.

Worked Example 5.7: Partial trace of a partially entangled state.

For $|\Psi\rangle = \sqrt{\frac{3}{4}}|00\rangle + \sqrt{\frac{1}{4}}|11\rangle$:

$$|\Psi\rangle\langle\Psi| = \frac{3}{4}|00\rangle\langle 00| + \frac{\sqrt{3}}{4}|00\rangle\langle 11| + \frac{\sqrt{3}}{4}|11\rangle\langle 00| + \frac{1}{4}|11\rangle\langle 11|$$

$$\rho_A = \frac{3}{4}|0\rangle\langle 0| + \frac{1}{4}|1\rangle\langle 1| = \begin{pmatrix} 3/4 & 0 \\ 0 & 1/4 \end{pmatrix}$$

This is a mixed state with Bloch vector $z = 3/4 - 1/4 = 1/2$, pointing along the Z-axis with magnitude $1/2$.

# Qiskit: Partial measurement demonstration
from qiskit import QuantumCircuit
from qiskit_aer import AerSimulator

# Create |Phi+> and measure only the first qubit
qc = QuantumCircuit(2, 1)
qc.h(0)
qc.cx(0, 1)
qc.measure(0, 0)  # Measure only qubit 0

simulator = AerSimulator()
job = simulator.run(qc, shots=10000)
counts = job.result().get_counts()
print("Measuring only qubit 0 of |Phi+>:", counts)
print("P(0) = P(1) = 0.5 — the reduced state is maximally mixed")

# Now measure both qubits to see the correlation
qc2 = QuantumCircuit(2, 2)
qc2.h(0)
qc2.cx(0, 1)
qc2.measure([0, 1], [0, 1])
job2 = simulator.run(qc2, shots=10000)
counts2 = job2.result().get_counts()
print("Measuring both qubits of |Phi+>:", counts2)
print("Only |00> and |11> appear — perfect correlation!")
# Qiskit: Computing the reduced density matrix
from qiskit.quantum_info import DensityMatrix, partial_trace
import numpy as np

# Create the |Phi+> Bell state
from qiskit import QuantumCircuit
qc = QuantumCircuit(2)
qc.h(0)
qc.cx(0, 1)
rho = DensityMatrix.from_instruction(qc)
print("Full density matrix of |Phi+>:")
print(rho.data)

# Partial trace over qubit 1 (keep qubit 0)
rho_A = partial_trace(rho, [1])
print("\nReduced density matrix of qubit 0:")
print(rho_A.data)
print("This is I/2 — maximally mixed!")

# Compute eigenvalues (they should both be 0.5)
print("Eigenvalues:", np.linalg.eigvalsh(rho_A.data))
print("Entropy = -sum(lambda * log2(lambda)) =", -np.sum([p * np.log2(p) for p in np.linalg.eigvalsh(rho_A.data) if p > 0]))

5.7.3 The No-Signaling Theorem

Despite the "spooky" instantaneous correlation, entanglement cannot be used for faster-than-light communication. This is the no-signaling theorem.

Proof sketch: Alice's measurement statistics on her qubit alone are described by the reduced density matrix $\rho_A$, which is independent of Bob's choice of measurement basis or whether Bob measures at all. Bob's actions on his qubit cannot change $\rho_A$, so Alice cannot extract any information about Bob's actions from her local measurements.

Formally, for any POVM $\{M_k\}$ on Alice's system:

$$P(k) = \text{Tr}(\rho_A M_k) = \text{Tr}_A(\text{Tr}_B(\rho_{AB}) M_k)$$

This depends only on $\rho_A$, not on any operation Bob performs on his system. Hence, no signaling.

5.7.4 The Density Matrix and the Partial Trace: Detailed Derivation

Let's derive the partial trace more carefully. Given a bipartite state $\rho_{AB}$ on $\mathcal{H}_A \otimes \mathcal{H}_B$, the reduced density matrix of subsystem $A$ is:

$$\rho_A = \text{Tr}_B(\rho_{AB}) = \sum_j (\langle j|_B \otimes I_A) \rho_{AB} (|j\rangle_B \otimes I_A)$$

where $\{|j\rangle_B\}$ is any orthonormal basis for $\mathcal{H}_B$.

Worked Example 5.13: Compute $\rho_A$ for $|\Phi^+\rangle$.

$$\rho_{AB} = |\Phi^+\rangle\langle\Phi^+| = \frac{1}{2}(|00\rangle\langle 00| + |00\rangle\langle 11| + |11\rangle\langle 00| + |11\rangle\langle 11|)$$

$$\rho_A = \text{Tr}_B(\rho_{AB}) = \sum_{j=0}^{1} \langle j|_B \rho_{AB} |j\rangle_B$$

$$= \langle 0|_B \rho_{AB} |0\rangle_B + \langle 1|_B \rho_{AB} |1\rangle_B$$

$$= \frac{1}{2}|0\rangle\langle 0| + \frac{1}{2}|1\rangle\langle 1| = \frac{I}{2}$$

The reduced state is maximally mixed — no information about the original state can be extracted from subsystem $A$ alone.

Worked Example 5.14: Compute $\rho_A$ for $|\Psi\rangle = \sqrt{\frac{3}{4}}|00\rangle + \sqrt{\frac{1}{4}}|11\rangle$.

$$\rho_{AB} = \frac{3}{4}|00\rangle\langle 00| + \frac{\sqrt{3}}{4}|00\rangle\langle 11| + \frac{\sqrt{3}}{4}|11\rangle\langle 00| + \frac{1}{4}|11\rangle\langle 11|$$

$$\rho_A = \langle 0|_B \rho_{AB} |0\rangle_B + \langle 1|_B \rho_{AB} |1\rangle_B$$

$$= \frac{3}{4}|0\rangle\langle 0| + \frac{1}{4}|1\rangle\langle 1| = \begin{pmatrix} 3/4 & 0 \\ 0 & 1/4 \end{pmatrix}$$

The purity is $\text{Tr}(\rho_A^2) = (3/4)^2 + (1/4)^2 = 10/16 = 5/8 < 1$, confirming that subsystem $A$ is in a mixed state (the overall state is entangled).

The entropy of this reduced state is:

$$S(\rho_A) = -\frac{3}{4}\log_2\frac{3}{4} - \frac{1}{4}\log_2\frac{1}{4} \approx 0.811 \text{ bits}$$

This is the entanglement entropy — the amount of entanglement between qubits $A$ and $B$.

# Qiskit: Computing reduced density matrices for various states
from qiskit.quantum_info import DensityMatrix, partial_trace, entropy, Statevector
from qiskit import QuantumCircuit
import numpy as np

def compute_reduced_entanglement(state_vector, n_qubits, trace_out):
    """Compute the reduced density matrix and entanglement entropy."""
    rho = DensityMatrix(state_vector)
    rho_reduced = partial_trace(rho, trace_out)
    S = entropy(rho_reduced, base=2)
    return rho_reduced, S

# Bell state |Phi+>
qc_bell = QuantumCircuit(2)
qc_bell.h(0)
qc_bell.cx(0, 1)
bell_state = Statevector.from_instruction(qc_bell)
rho_A_bell, S_bell = compute_reduced_entanglement(bell_state, 2, [1])
print("Bell state |Phi+>:")
print(f"  Reduced density matrix:\n{rho_A_bell.data}")
print(f"  Entanglement entropy: {S_bell:.4f} ebits (should be 1.0)")

# Partially entangled state
qc_partial = QuantumCircuit(2)
qc_partial.ry(2*np.arccos(np.sqrt(3/4)), 0)  # cos(theta/2) = sqrt(3/4)
qc_partial.cx(0, 1)
partial_state = Statevector.from_instruction(qc_partial)
rho_A_partial, S_partial = compute_reduced_entanglement(partial_state, 2, [1])
print(f"\nPartially entangled state:")
print(f"  Reduced density matrix:\n{np.round(rho_A_partial.data, 4)}")
print(f"  Entanglement entropy: {S_partial:.4f} ebits")

# Product state |0>|+>
qc_product = QuantumCircuit(2)
qc_product.h(1)
product_state = Statevector.from_instruction(qc_product)
rho_A_product, S_product = compute_reduced_entanglement(product_state, 2, [1])
print(f"\nProduct state |0>|+>:")
print(f"  Entanglement entropy: {S_product:.4f} ebits (should be 0.0)")

5.7.5 The Purity Criterion for Entanglement Detection

For pure bipartite states, entanglement is easy to detect: compute $\rho_A = \text{Tr}_B(|\Psi\rangle\langle\Psi|)$ and check if $\rho_A$ is pure ($\text{Tr}(\rho_A^2) = 1$) or mixed ($\text{Tr}(\rho_A^2) < 1$). The state is entangled if and only if $\rho_A$ is mixed.

Purity of the reduced state:

State $\text{Tr}(\rho_A^2)$ Entangled?
$\|0\rangle\|0\rangle$ (product) 1 No
$\|+\rangle\|+\rangle$ (product) 1 No
$\|\Phi^+\rangle$ (Bell) 1/2 Yes
$\sqrt{3/4}\|00\rangle + \sqrt{1/4}\|11\rangle$ 5/8 Yes
$\frac{1}{2}\|00\rangle + \frac{1}{2}\|11\rangle$ (unnormalized) Yes

For mixed states, detecting entanglement is harder. The simplest test is the positive partial transpose (PPT) criterion (Peres-Horodecki criterion): a state $\rho_{AB}$ is separable only if $\rho_{AB}^{T_B} \geq 0$, where $T_B$ denotes partial transpose with respect to subsystem $B$.

For two-qubit and qubit-qutrit systems, PPT is necessary and sufficient for separability. For higher dimensions, there exist entangled states that pass the PPT test (called "bound entangled" states).


5.8 Entanglement Measures

How do we quantify entanglement? For pure bipartite states, the unique asymptotic measure is the entanglement entropy:

$$E(|\Psi\rangle_{AB}) = S(\rho_A) = S(\rho_B) = -\text{Tr}(\rho_A \log_2 \rho_A)$$

where $S(\rho) = -\sum_i \lambda_i \log_2 \lambda_i$ is the von Neumann entropy and $\lambda_i$ are the eigenvalues of $\rho_A$.

For a separable state, $\rho_A$ is pure, so $S(\rho_A) = 0$. For a Bell state, $\rho_A = I/2$, so $S(\rho_A) = 1$ (one "ebit" of entanglement). For a general two-qubit state, $0 \leq E \leq 1$.

5.8.1 The Schmidt Decomposition

The Schmidt decomposition provides a canonical form for any bipartite pure state:

$$|\Psi\rangle_{AB} = \sum_{i=1}^r \sqrt{\lambda_i} |u_i\rangle_A \otimes |v_i\rangle_B$$

where $r$ is the Schmidt rank, $\lambda_i > 0$, $\sum_i \lambda_i = 1$, and $\{|u_i\rangle\}$, $\{|v_i\rangle\}$ are orthonormal sets. The state is entangled if and only if $r > 1$.

Worked Example 5.8: Find the Schmidt decomposition of $|\Psi\rangle = \frac{1}{2}|00\rangle + \frac{1}{2}|01\rangle + \frac{1}{2}|10\rangle + \frac{1}{2}|11\rangle$.

The coefficient matrix is $C = \begin{pmatrix} 1/2 & 1/2 \\ 1/2 & 1/2 \end{pmatrix}$. The SVD gives:

$$C = U \Sigma V^\dagger = I \begin{pmatrix} 1 & 0 \\ 0 & 0 \end{pmatrix} \begin{pmatrix} 1/\sqrt{2} & 1/\sqrt{2} \\ 1/\sqrt{2} & -1/\sqrt{2} \end{pmatrix}$$

The only non-zero singular value is 1, so the Schmidt rank is 1. This confirms the state is separable: $|\Psi\rangle = |+\rangle \otimes |+\rangle$.

Worked Example 5.9: Schmidt decomposition of $|\Psi\rangle = \frac{1}{\sqrt{3}}|00\rangle + \frac{1}{\sqrt{3}}|01\rangle + \frac{1}{\sqrt{3}}|10\rangle$.

The coefficient matrix is $C = \begin{pmatrix} 1/\sqrt{3} & 1/\sqrt{3} \\ 1/\sqrt{3} & 0 \end{pmatrix}$. Computing $C^\dagger C$:

$$C^\dagger C = \begin{pmatrix} 2/3 & 1/3 \\ 1/3 & 1/3 \end{pmatrix}$$

Eigenvalues: $\lambda_1 = \frac{3+\sqrt{5}}{6}$, $\lambda_2 = \frac{3-\sqrt{5}}{6}$. Both are positive, so the Schmidt rank is 2 — the state is entangled.

The entanglement entropy is $E = -\lambda_1 \log_2 \lambda_1 - \lambda_2 \log_2 \lambda_2 \approx 0.55$ ebits.

The entanglement entropy is:

$$E(|\Psi\rangle) = -\sum_i \lambda_i \log_2 \lambda_i$$

where the $\lambda_i$ are the eigenvalues of $\rho_A$ (equivalently, the squared Schmidt coefficients).


5.9 Multi-Partite Entanglement

Entanglement is not limited to two qubits. Three qubits admit two inequivalent classes of genuine tripartite entanglement:

  • GHZ state: $|GHZ\rangle = \frac{1}{\sqrt{2}}(|000\rangle + |111\rangle)$. Maximally entangled in a three-party sense. Losing one qubit destroys all entanglement — the remaining two-qubit state is $\frac{1}{2}(|00\rangle\langle 00| + |11\rangle\langle 11|)$, which is separable (a classical mixture of $|00\rangle$ and $|11\rangle$).

  • W state: $|W\rangle = \frac{1}{\sqrt{3}}(|001\rangle + |010\rangle + |100\rangle)$. Robust against particle loss — tracing out one qubit leaves an entangled two-qubit state: $\rho_{12} = \frac{2}{3}|\Psi^+\rangle\langle\Psi^+| + \frac{1}{3}|00\rangle\langle 00|$, which has non-zero entanglement.

5.9.1 GHZ vs W: Why They're Different

ASCII Art: GHZ vs W Entanglement Structure

GHZ State: |000> + |111>
  ┌───────────────────┐
  │  All-or-nothing:  │
  │  Lose 1 qubit →   │
  │  No entanglement  │
  │  left at all      │
  └───────────────────┘
     q0 ─── q1 ─── q2
     (all connected or none)

W State: |001> + |010> + |100>
  ┌───────────────────┐
  │  Robust:           │
  │  Lose 1 qubit →   │
  │  Still entangled   │
  └───────────────────┘
     q0 ─── q1
      \   /
       q2
     (pairwise entanglement)

The GHZ and W states belong to different SLOCC (stochastic local operations and classical communication) equivalence classes. There is no sequence of local operations that can transform a GHZ state into a W state (except with zero probability). This reflects a deep structure in multipartite entanglement that goes beyond the bipartite case.

# Qiskit: Creating GHZ and W states
from qiskit import QuantumCircuit
from qiskit_aer import AerSimulator
from qiskit.quantum_info import DensityMatrix, partial_trace, entropy
import numpy as np

# GHZ state
qc_ghz = QuantumCircuit(3)
qc_ghz.h(0)
qc_ghz.cx(0, 1)
qc_ghz.cx(1, 2)

# Compute entanglement properties
rho_ghz = DensityMatrix.from_instruction(qc_ghz)
print("GHZ state density matrix shape:", rho_ghz.data.shape)

# Partial trace over qubit 2 (to see if GHZ is fragile)
rho_ghz_12 = partial_trace(rho_ghz, [2])
print("\nGHZ: Reduced state after tracing out qubit 2:")
print(np.round(rho_ghz_12.data, 3))
print("This is a classical mixture (off-diagonal = 0) — NO entanglement!")

# W state (proper preparation)
qc_w = QuantumCircuit(3)
theta_w = 2 * np.arccos(1/np.sqrt(3))
qc_w.ry(theta_w, 0)
qc_w.cx(0, 1)
qc_w.cx(0, 2)
qc_w.x(0)

# Compute reduced state after tracing out qubit 2
rho_w = DensityMatrix.from_instruction(qc_w)
rho_w_12 = partial_trace(rho_w, [2])
print("\nW state: Reduced state after tracing out qubit 2:")
print(np.round(rho_w_12.data, 3))
print("Off-diagonal elements present — entanglement persists!")

# Measure GHZ and W
simulator = AerSimulator()
for name, qc in [("GHZ", qc_ghz), ("W", qc_w)]:
    qc_meas = qc.copy()
    qc_meas.measure_all()
    job = simulator.run(qc_meas, shots=10000)
    counts = job.result().get_counts()
    print(f"|{name}> measurement results: {counts}")

5.9.2 Genuine Multipartite Entanglement

A state has genuine multipartite entanglement if it cannot be written as a mixture of product states across any bipartition. The GHZ and W states are both genuinely multipartite entangled, but in fundamentally different ways.

For $n \geq 3$ qubits, there are exponentially many SLOCC equivalence classes. The entanglement structure becomes increasingly rich and complex as the number of qubits grows. This richness is both a resource (enabling more powerful protocols) and a challenge (requiring new theoretical tools to classify and quantify).


5.10 Entanglement in Quantum Algorithms

Entanglement is not just a resource for communication protocols — it is essential for quantum computational speedup.

5.10.1 Entanglement and Quantum Advantage

The Gottesman-Knill theorem shows that Clifford circuits (which can generate entanglement) are classically simulable. However, the entanglement in Clifford circuits has a specific structure (stabilizer states) that can be efficiently described. True quantum advantage requires entanglement beyond the stabilizer formalism — specifically, entanglement involving non-Clifford operations like the $T$ gate.

The Jozsa-Linden theorem proves that any quantum speedup requires entanglement across all qubits at some point during the computation. Low-entanglement states can be efficiently simulated classically, so computational advantage needs high entanglement.

5.10.2 Entanglement Depth

The entanglement depth of a state is the maximum number of qubits that are mutually entangled. A state with entanglement depth $k$ contains at least one group of $k$ qubits that are genuinely $k$-partite entangled.

GHZ states have maximum entanglement depth ($n$ for $n$ qubits), while product states have depth 1. In between are states like:

$$\frac{1}{\sqrt{2}}(|00\rangle + |11\rangle) \otimes \frac{1}{\sqrt{2}}(|00\rangle + |11\rangle)$$

which has entanglement depth 2 (two separate entangled pairs, but no entanglement across all four qubits).

5.10.3 Multi-Qubit Entanglement and Quantum Advantage

The relationship between entanglement and quantum computational advantage is subtle and still an active area of research:

Shallow circuits: Some quantum algorithms achieve advantage with only limited entanglement. For instance, the output of a shallow constant-depth quantum circuit can be hard to sample classically (Bravyi, Gosset, König, 2018), even though the entanglement is limited to nearest neighbors.

Volume law: Generic quantum states exhibit volume-law entanglement, meaning the entanglement entropy of a subsystem scales with its volume. Classical representation of such states requires exponential resources.

Area law: Ground states of gapped local Hamiltonians obey an area law, where entanglement entropy scales with the boundary of the subsystem, not its volume. These states can be efficiently represented by tensor networks — a key insight behind classical simulation methods like DMRG and MPS.

The bottom line: entanglement is necessary for quantum advantage (Clifford circuits prove this), but how much entanglement is needed, and in what form, depends on the specific algorithm and problem.

5.10.4 Entanglement Monotones and Concurrence

For mixed states, entanglement quantification becomes much harder. An entanglement monotone is a function $E(\rho_{AB})$ that satisfies:

  1. Monotonicity: $E$ does not increase under local operations and classical communication (LOCC).
  2. Normalization: $E$ is zero for separable states and positive for entangled states.
  3. Invariance: $E$ is invariant under local unitary operations.

For two-qubit mixed states, the concurrence is a widely used monotone:

$$C(\rho) = \max(0, \lambda_1 - \lambda_2 - \lambda_3 - \lambda_4)$$

where $\lambda_i$ are the square roots of the eigenvalues of $\rho \tilde{\rho}$ in decreasing order, and $\tilde{\rho} = (\sigma_y \otimes \sigma_y)\rho^*(\sigma_y \otimes \sigma_y)$ is the spin-flipped state.

The entanglement of formation is related to the concurrence by:

$$E_F(C) = h\left(\frac{1 + \sqrt{1 - C^2}}{2}\right)$$

where $h(x) = -x\log_2 x - (1-x)\log_2(1-x)$ is the binary entropy function.

For pure states, $C = 2\sqrt{\det(\rho_A)}$ and $E_F = S(\rho_A)$, recovering our earlier result.

# Qiskit: Computing concurrence for Bell states and mixed states
from qiskit.quantum_info import DensityMatrix, partial_trace, entropy
import numpy as np

# Bell state |Phi+>
qc_bell = QuantumCircuit(2)
qc_bell.h(0)
qc_bell.cx(0, 1)
rho_bell = DensityMatrix.from_instruction(qc_bell)

# Compute entanglement entropy
rho_A = partial_trace(rho_bell, [1])
E = entropy(rho_A, base=2)
print(f"Bell state entanglement entropy: {E:.4f} (should be 1.0 ebit)")

# Werner state: p * |Phi+><Phi+| + (1-p) * I/4
p = 0.8
rho_werner_data = p * rho_bell.data + (1 - p) * np.eye(4) / 4
rho_werner_data = rho_werner_data / np.trace(rho_werner_data)

def concurrence(rho):
    """Compute concurrence of a two-qubit density matrix."""
    sigma_y = np.array([[0, -1j], [1j, 0]])
    yy = np.kron(sigma_y, sigma_y)
    rho_tilde = yy @ np.conj(rho) @ yy
    product = rho @ rho_tilde
    eigenvalues = np.sort(np.sqrt(np.abs(np.linalg.eigvals(product))))[::-1]
    return max(0, eigenvalues[0] - eigenvalues[1] - eigenvalues[2] - eigenvalues[3])

C_bell = concurrence(rho_bell.data)
print(f"\nBell state concurrence: {C_bell:.4f} (should be 1.0)")

C_werner = concurrence(rho_werner_data)
print(f"Werner state (p={p}) concurrence: {C_werner:.4f}")

# Werner state is entangled when p > 1/3
print(f"\nWerner state is entangled when p > 1/3; current p = {p}")

5.10.5 Werner States and the Entanglement Threshold

A Werner state is a mixture of a maximally entangled state and the maximally mixed state:

$$\rho_W(p) = p|\Phi^+\rangle\langle\Phi^+| + (1-p)\frac{I}{4}$$

where $p \in [0, 1]$. This is a one-parameter family that interpolates between the maximally entangled state ($p = 1$) and white noise ($p = 0$).

Key properties: - For $p > 1/3$: the state is entangled (concurrence > 0) - For $p \leq 1/3$: the state is separable (can be written as a mixture of product states) - For $p > 1/\sqrt{2} \approx 0.707$: the state violates the CHSH inequality

The gap between the entanglement threshold ($p > 1/3$) and the Bell violation threshold ($p > 1/\sqrt{2}$) is significant: there exist entangled states that do not violate any Bell inequality. This shows that entanglement alone is not sufficient for non-local correlations — the entanglement must be "strong enough."

Common Misconception: "All entangled states violate Bell inequalities." Werner states with $1/3 < p \leq 1/\sqrt{2}$ are entangled but do not violate any Bell inequality. They have "hidden" entanglement that cannot be detected by Bell tests. This is another instance of the gap between quantum mechanics and classical intuition.