Entanglement ​
Entanglement is a uniquely quantum phenomenon where two or more qubits become correlated in ways impossible classically. Measuring one instantly determines the other, regardless of distance.
What is Entanglement? ​
When qubits are entangled, their states cannot be described independently. The classic example is a Bell state:
(|00> + |11>) / sqrt(2)In this state:
- Each qubit individually has 50% chance of being 0 or 1
- But they always measure to the same value
- If one measures 0, the other is guaranteed to be 0
- If one measures 1, the other is guaranteed to be 1
The qubits share a single quantum state that cannot be factored into independent parts.
Creating Bell States ​
Kettle provides the bell() function to create an entangled pair:
How Bell States Work ​
You can create a Bell state manually with Hadamard and CNOT:
The circuit works like this:
hadamardputs the first qubit in superposition: (|0> + |1>)/sqrt(2)cnotcorrelates the second qubit with the first- Result: (|00> + |11>)/sqrt(2) - entangled!
Verifying Entanglement ​
The signature of entanglement is perfect correlation:
Every pair matches - this is impossible to achieve classically without pre-shared information.
Multi-Qubit Entanglement ​
Entanglement extends beyond two qubits. A GHZ state entangles three or more qubits:
Entanglement is Not Cloning ​
Entanglement might seem like copying, but it is fundamentally different:
Key differences from cloning:
- Cloning would create an independent copy
- Entanglement creates correlated qubits
- Entangled qubits share one quantum state, not two copies
The no-cloning theorem says you cannot copy an unknown quantum state. Kettle enforces this with linear types.
Applications ​
Entanglement enables:
- Quantum teleportation - Transfer quantum states using entanglement + classical bits
- Superdense coding - Send 2 classical bits using pre-shared entanglement + 1 qubit
- Quantum cryptography - Detect eavesdroppers via entanglement
- Quantum algorithms - Speed up computation via entangled parallelism
SWAP Test ​
The SWAP test uses entanglement to measure how similar two quantum states are:
This is a practical example of using entanglement for quantum state comparison.