6. Entanglement

Why this layer exists

This chapter is the reason a quantum computer is more than the sum of its qubits, and it is the third time this book has said that, and it is the third time it is true. Entanglement is the property of a composite system that has no classical analogue: it is a superposition of a composite system that cannot be written as a product of the states of its parts. If you understand entanglement, you understand the single most important resource in quantum computation. If you only understand superposition, you have a one-qubit computer, and you will be confused about every algorithm after this one.

What breaks without this chapter is the circuit model. Chapter 16 is Grover, which is interference amplified on a register of qubits. Chapter 17 is Shor, which is the quantum Fourier transform on a register of qubits, and the quantum Fourier transform is a superposition of a composite system that cannot be written as a product. Every algorithm in Part III is a circuit on a register of qubits, and if you do not understand entanglement, you do not understand the circuit model. This chapter is the why; the rest is the how.

The tensor product

A composite system is a tensor product of the states of its parts. Two qubits, each in $\mathbb{C}^2$, live in $\mathbb{C}^2 \otimes \mathbb{C}^2 = \mathbb{C}^4$, a four-dimensional space with basis $|00\rangle, |01\rangle, |10\rangle, |11\rangle$. If qubit one is $|\psi\rangle = a|0\rangle + b|1\rangle$ and qubit two is $|\phi\rangle = c|0\rangle + d|1\rangle$, their joint state is the tensor product

∣ψ⟩⊗∣ϕ⟩=(acadbcbd). |\psi\rangle \otimes |\phi\rangle = \begin{pmatrix} a\,c \\ a\,d \\ b\,c \\ b\,d \end{pmatrix} .

The reason the tensor product is a tensor product and not a regular product is that it is the only way to describe a composite system that allows entanglement. Not every vector in $\mathbb{C}^4$ is a tensor product of two qubits; the vectors that are not are entangled, and they are the reason a quantum computer is more than the sum of its qubits.

In tqp the tensor product is kron, and basis builds the computational basis states of a multi-qubit register:

import numpy as np
from tqp import tensor
# tensor product of |0> and |1>
q0 = np.array([1, 0])
q1 = np.array([0, 1])
joint = tensor.kron(q0, q1)
# the joint state is |01> = [0, 1, 0, 0]
# the computational basis of two qubits
basis00 = tensor.basis(2, 0)  # |00> = [1, 0, 0, 0]
basis11 = tensor.basis(2, 3)  # |11> = [0, 0, 0, 1]

The joint state is $|01\rangle$, the tensor product of $|0\rangle$ and $|1\rangle$, and the basis states are the computational basis of two qubits.

Entanglement

Entanglement is the property of a composite system that cannot be written as a product of the states of its parts. A state $|\psi\rangle$ is a product state if it can be written as $|\psi\rangle = |\psi_1\rangle \otimes |\psi_2\rangle$; it is entangled if it cannot.

The canonical example of an entangled state is the Bell state

∣Φ+⟩=12(∣00⟩+∣11⟩). |\Phi^+\rangle = \frac{1}{\sqrt{2}}(|00\rangle + |11\rangle) .

The Bell state cannot be written as a product of two qubits: if it could, it would be $\frac{1}{\sqrt{2}}(|0\rangle + |1\rangle) \otimes (a|0\rangle + b|1\rangle)$, and expanding gives $\frac{1}{\sqrt{2}}(a|00\rangle + b|01\rangle + a|10\rangle + b|11\rangle)$, which has four terms, not two. The Bell state has two terms, $|00\rangle$ and $|11\rangle$, and the two terms are correlated: if you measure qubit one and get $|0\rangle$, you know qubit two is $|0\rangle$, and vice versa. This correlation is the entanglement, and it is what makes the Bell state more than the sum of its qubits.

In tqp the Bell state is bell, and entangled checks whether a state is entangled:

import numpy as np
from tqp import tensor
# Bell state
bell = tensor.bell()
# is it entangled?
is_entangled = tensor.entangled(bell)
# the Bell state is entangled

The bell state is entangled, and entangled checks that it cannot be written as a product of two qubits.

Why entanglement is physical

The reason entanglement is physical is that it is a property of the composite system, and the composite system is a tensor product, and the tensor product is the only way to describe a composite system that allows entanglement. The entanglement is the correlation between the qubits, and the correlation is what makes the Bell state more than the sum of its qubits.

The reason this matters is that it is the thing that makes a quantum computer more than the sum of its qubits. A classical computer is the sum of its bits: each bit is 0 or 1, and the computer is the product of the bits. A quantum computer is not the sum of its qubits: the qubits are entangled, and the entanglement is the resource that lets a quantum computer do more than a classical computer. This is the difference, and it is the whole difference.

The reason entanglement is the resource is that it is the correlation between the qubits, and the correlation is what lets a quantum computer cancel the wrong answers and amplify the right ones. The Bell state is a superposition of $|00\rangle$ and $|11\rangle$, and the two terms are correlated, and the correlation is what lets a quantum computer exploit the entanglement. This is the lesson of the chapter: entanglement is the correlation between the qubits, and the correlation is the resource that makes a quantum computer quantum.

The measurement of an entangled state

The measurement of an entangled state is the canonical example of the collapse, and it is the one that makes the point clear. The Bell state $|\Phi^+\rangle = \frac{1}{\sqrt{2}}(|00\rangle + |11\rangle)$ is a superposition of $|00\rangle$ and $|11\rangle$, and if you measure qubit one and get $|0\rangle$, the state collapses onto $|00\rangle$, and you know qubit two is $|0\rangle$. If you measure qubit one and get $|1\rangle$, the state collapses onto $|11\rangle$, and you know qubit two is $|1\rangle$. The measurement of one qubit determines the other, and the correlation is the entanglement.

The reason the measurement of an entangled state is the canonical example of the collapse is that it shows the collapse is a property of the composite system, not the parts. If you measure qubit one, you collapse the whole state, not just qubit one, and the collapse is onto the basis state you measure. The correlation is the entanglement, and the entanglement is the resource that makes a quantum computer quantum.

In tqp the measurement of an entangled state is projective, and the collapse is collapse:

import numpy as np
from tqp import measurement, tensor
# Bell state
bell = tensor.bell()
# measure qubit one in the computational basis
# if you get |0>, the state collapses onto |00>
# if you get |1>, the state collapses onto |11>
# the correlation is the entanglement

The bell state is entangled, and the measurement of qubit one determines qubit two, and the correlation is the entanglement.

Exercises

(a) Why cannot the Bell state be written as a product of two qubits?

Answer

The Bell state $|\Phi^+\rangle = \frac{1}{\sqrt{2}}(|00\rangle + |11\rangle)$ has two terms, $|00\rangle$ and $|11\rangle$. If it could be written as a product $|\psi_1\rangle \otimes |\psi_2\rangle$, it would be $\frac{1}{\sqrt{2}}(a|00\rangle + b|01\rangle + a|10\rangle + b|11\rangle)$, which has four terms. The Bell state has two terms, and the two terms are correlated: if you measure qubit one and get $|0\rangle$, you know qubit two is $|0\rangle$, and vice versa. The correlation is the entanglement, and the entanglement is what makes the Bell state more than the sum of its qubits.

(b) Why is the measurement of one qubit in a Bell state correlated with the other?

Answer

The Bell state $|\Phi^+\rangle = \frac{1}{\sqrt{2}}(|00\rangle + |11\rangle)$ is a superposition of $|00\rangle$ and $|11\rangle$, and the two terms are correlated: if you measure qubit one and get $|0\rangle$, the state collapses onto $|00\rangle$, and you know qubit two is $|0\rangle$. If you measure qubit one and get $|1\rangle$, the state collapses onto $|11\rangle$, and you know qubit two is $|1\rangle$. The correlation is the entanglement, and the entanglement is the resource that makes a quantum computer quantum.

(c) Why is entanglement the resource that makes a quantum computer quantum?

Answer

Entanglement is the correlation between the qubits, and the correlation is what lets a quantum computer cancel the wrong answers and amplify the right ones. The Bell state is a superposition of $|00\rangle$ and $|11\rangle$, and the two terms are correlated, and the correlation is what lets a quantum computer exploit the entanglement. A classical computer is the sum of its bits: each bit is 0 or 1, and the computer is the product of the bits. A quantum computer is not the sum of its qubits: the qubits are entangled, and the entanglement is the resource that lets a quantum computer do more than a classical computer. This is the difference, and it is the whole difference.

(d) Why is the tensor product the only way to describe a composite system that allows entanglement?

Answer

The tensor product is the only way to describe a composite system that allows entanglement because it is the only way to describe a composite system whose state space is the product of the state spaces of its parts. A regular product would describe a composite system whose state is the product of the states of its parts, and that is a product state, not an entangled state. The tensor product describes a composite system whose state is the tensor product of the states of its parts, and the tensor product allows states that cannot be written as a product, and those are the entangled states. The entangled states are the reason a quantum computer is more than the sum of its qubits.

Lab: entanglement in tqp

The first circuit that runs is chapter 14’s, but this lab runs entanglement directly, in tqp, so you can see the Bell state.

Build labs/ch06/ from the repository root:

mkdir -p labs/ch06

Write a script that does four things:

  1. Build the Bell state $|\Phi^+\rangle = (|00\rangle + |11\rangle)/\sqrt{2}$ and check it is entangled with entangled.
  2. Measure qubit one in the computational basis and check the state collapses onto $|00\rangle$ or $|11\rangle$.
  3. Build the product state $|+\rangle \otimes |+\rangle$ and check it is not entangled.
  4. Build the two-qubit state $|00\rangle$ and check it is a product state.

Run it:

make lab CH=06

The acceptance test checks that the Bell state is entangled, that the measurement collapses the entangled state, and that the product state is not entangled.

make test

should be green.

Further reading

The three documents this book keeps open:

  • Entanglement — the correlation between the qubits, the Bell state, the resource that makes a quantum computer quantum. The why behind the circuit model.
  • The Bell state — the canonical example of an entangled state.
  • The tensor product — the only way to describe a composite system that allows entanglement.

And the paper behind the cloud QPU, read in Part III:

results matching ""

    No results matching ""