Quantum Teleportation
Quantum Teleportation
Quantum teleportation transmits an unknown qubit state from Alice to Bob using only a pre-shared Bell pair and 2 classical bits of communication.
Crucially, no quantum channel is used after the setup — only classical communication. The quantum information "teleports" because the entanglement carries the correlations.
The Protocol
Setup: Alice and Bob share the Bell pair .
Step 1 — Bell Measurement: Alice performs a joint measurement on her target qubit and her half of the Bell pair. This projects onto one of four Bell states, yielding two classical bits .
Step 2 — Classical Communication: Alice sends to Bob.
Step 3 — Correction: Bob applies to his qubit.
Bob's State Before Correction
| Bob's qubit | |
|---|---|
| $\alpha | |
| $\beta | |
| $\alpha | |
| $-\beta |
Applying the Correction
The gate swaps amplitudes; the gate negates the second:
- : swap
- : negate
After both corrections, Bob always holds the original .
import math
def teleport_correction(bob_state, m0, m1):
alpha, beta = complex(bob_state[0]), complex(bob_state[1])
if m1:
alpha, beta = beta, alpha # X gate
if m0:
beta = -beta # Z gate
norm = math.sqrt(abs(alpha)**2 + abs(beta)**2)
return [alpha / norm, beta / norm]
def teleport(state):
alpha, beta = complex(state[0]), complex(state[1])
sq2 = 1 / math.sqrt(2)
raw = [alpha * sq2, beta * sq2]
norm = math.sqrt(abs(raw[0])**2 + abs(raw[1])**2)
return [raw[0]/norm, raw[1]/norm]
result = teleport([1, 0])
print(round(abs(result[0]), 4)) # 1.0
print(round(abs(result[1]), 4)) # 0.0
No-Cloning Theorem
Teleportation does not violate the no-cloning theorem: Alice's original qubit is destroyed by her Bell measurement. The state is transferred, not copied.
Your Task
Implement two functions:
teleport_correction(bob_state, m0, m1)— applies to Bob's 2-element state list, then normalizes.teleport(state)— simulates the deterministic outcome path, returning the normalized recovered state.