Let's dispel the science fiction immediately: quantum teleportation does not transport matter or energy faster than light. It is a protocol that transfers the quantum state of one qubit to another, distant qubit, using pre-shared entanglement and...
In This Chapter
- Learning Objectives
- 9.1 Introduction: What Teleportation Is and Is Not
- 9.2 The Teleportation Protocol
- 9.3 Mathematical Derivation
- 9.4 Complete Qiskit Implementation
- 9.5 Why Teleportation Doesn't Violate Physics
- 9.6 Experimental Realizations
- 9.7 Quantum Repeaters and the Quantum Internet
- 9.8 Variations on Teleportation
- 9.9 Teleportation in Practice: Error Budget
- 9.10 Quantum Teleportation on Real Hardware
- 9.11 Advanced Topics in Teleportation
- 9.12 Quantum Process Tomography of Teleportation
- 9.13 Teleportation Networks and Distributed Quantum Computing
- 9.14 Teleportation and the No-Communication Theorem
- 9.15 Teleportation and Error Correction
- 9.16 Teleportation in Different Physical Systems
- 9.17 Summary: The Teleportation Protocol in Context
- 9.18 Common Bugs and Debugging Teleportation Circuits
- 9.19 Teleportation in the Broader Context
Chapter 9: Quantum Teleportation: Transmitting Quantum Information Using Entanglement (It's Not Sci-Fi — It's a Protocol)
Learning Objectives
By the end of this chapter, you will be able to:
- Explain the quantum teleportation protocol step by step, including the roles of entanglement and classical communication
- Derive the mathematics of teleportation from first principles
- Implement the complete teleportation circuit in Qiskit and verify it with measurement results
- Articulate why teleportation does not violate the no-cloning theorem or special relativity
- Understand the role of teleportation in quantum repeaters and the vision of a quantum internet
- Perform state tomography to verify teleportation fidelity
- Analyze the impact of noise on teleportation fidelity
- Implement entanglement swapping as a quantum repeater primitive
9.1 Introduction: What Teleportation Is and Is Not
Let's dispel the science fiction immediately: quantum teleportation does not transport matter or energy faster than light. It is a protocol that transfers the quantum state of one qubit to another, distant qubit, using pre-shared entanglement and two bits of classical communication. The original qubit's state is destroyed in the process (a consequence of the no-cloning theorem), and the classical bits travel at or below the speed of light.
What makes teleportation remarkable is that it moves quantum information — the complex amplitudes $\alpha$ and $\beta$ — without ever directly measuring them. You cannot determine $\alpha$ and $\beta$ from a single measurement (that would violate the Holevo bound), yet teleportation faithfully transfers them. This is the power of entanglement.
Recurring Theme: Teleportation is not magic. It is a linear-algebraic protocol that consumes entanglement as a resource and uses classical communication as a control channel. The "spooky" part is just the non-local correlations of an entangled pair.
Historical Context. Quantum teleportation was proposed by Charles Bennett, Gilles Brassard, Claude Crépeau, Richard Jozsa, Asher Peres, and William Wootters in 1993. The name "teleportation" was chosen deliberately — it captures the essence of transferring a quantum state without transmitting the physical particle. The first experimental demonstration came in 1997, when Francesco De Martini's group in Rome and Anton Zeilinger's group in Innsbruck independently teleported photon states across a laboratory table. Since then, teleportation has been demonstrated over distances of 1,400 km (via the Micius satellite in 2017) and is a cornerstone of quantum networking.
Common Misconception. "Quantum teleportation moves particles instantaneously." No. The quantum state is transferred, but only after two classical bits are communicated — which takes time limited by the speed of light. Before the classical bits arrive, the receiving qubit contains no information about the teleported state.
9.2 The Teleportation Protocol
9.2.1 The Setup
We have three qubits:
- Qubit A (Alice's data qubit): The state to be teleported, $|\psi\rangle_A = \alpha|0\rangle_A + \beta|1\rangle_A$
- Qubit B (Alice's half of the EPR pair): Part of the entangled Bell state
- Qubit C (Bob's half of the EPR pair): The other part of the entangled Bell state
Qubits B and C are prepared in the Bell state $|\Phi^+\rangle_{BC} = \frac{|00\rangle_{BC} + |11\rangle_{BC}}{\sqrt{2}}$.
The initial three-qubit state is:
$$|\Psi_0\rangle = |\psi\rangle_A \otimes |\Phi^+\rangle_{BC} = (\alpha|0\rangle_A + \beta|1\rangle_A) \otimes \frac{|0\rangle_B|0\rangle_C + |1\rangle_B|1\rangle_C}{\sqrt{2}}$$
Why three qubits? Two for the Bell pair (one for Alice, one for Bob) and one carrying the unknown state. The Bell pair is the "entanglement resource" — it must be shared in advance, before the protocol begins.
9.2.2 The Protocol Steps
Alice's Side Classical Channel Bob's Side
──────────── ──────────────── ──────────
|ψ⟩_A ──●──H──╲╱╲╱╲╱╲╱╲╱╲╱ ╲╱╲╱╲╱╲╱╲╱╲╱── X^{b2} ── Z^{b1} ── |ψ⟩_C
|
|Φ+⟩_BC │
|
|0⟩_B ──⊕───────────────────── (measure b2) ──→ classical bits b1,b2 ──→
|0⟩_C ────────────────────────────────────────────────────────────────── (Bob's qubit)
Step 1 — Entanglement Distribution: Alice and Bob share the Bell pair (B, C). Alice has qubit B; Bob has qubit C. This must be done before the protocol starts. In practice, this could be done by creating an entangled pair on a chip and distributing the qubits, or by using entanglement distribution through an optical fiber.
Step 2 — Bell Measurement: Alice performs a CNOT with A as control and B as target, then a Hadamard on A, then measures both A and B in the computational basis. This yields two classical bits $b_1, b_2 \in \{0, 1\}$.
The Bell measurement is so named because it projects Alice's two qubits (A, B) onto one of the four Bell states. It cannot be done with just a computational basis measurement — it requires the CNOT and Hadamard to rotate the measurement basis.
Step 3 — Classical Communication: Alice sends the two bits $b_1, b_2$ to Bob over a classical channel (phone, internet, carrier pigeon — anything that respects the speed of light). This is the only communication that happens; no quantum information is transmitted directly.
Step 4 — Conditional Correction: Based on the received bits, Bob applies: - If $b_2 = 1$: apply $X$ gate (bit flip) - If $b_1 = 1$: apply $Z$ gate (phase flip)
After these corrections, Bob's qubit C is in the state $|\psi\rangle = \alpha|0\rangle + \beta|1\rangle$ — the original state has been teleported.
Try it yourself: Draw the full teleportation circuit from memory. Label each qubit (A, B, C), each gate, and each measurement. What classical bits does Alice send to Bob? What corrections does Bob apply for each possible outcome?
9.3 Mathematical Derivation
Let's work through the algebra in full detail. The initial state is:
$$|\Psi_0\rangle = (\alpha|0\rangle_A + \beta|1\rangle_A) \otimes \frac{1}{\sqrt{2}}(|0\rangle_B|0\rangle_C + |1\rangle_B|1\rangle_C)$$
Expanding:
$$= \frac{1}{\sqrt{2}}\Big(\alpha|0\rangle_A|0\rangle_B|0\rangle_C + \alpha|0\rangle_A|1\rangle_B|1\rangle_C + \beta|1\rangle_A|0\rangle_B|0\rangle_C + \beta|1\rangle_A|1\rangle_B|1\rangle_C\Big)$$
After CNOT (A→B): The CNOT flips qubit B when qubit A is $|1\rangle$:
- $|0\rangle_A|0\rangle_B \to |0\rangle_A|0\rangle_B$ (control is 0, no flip)
- $|0\rangle_A|1\rangle_B \to |0\rangle_A|1\rangle_B$ (control is 0, no flip)
- $|1\rangle_A|0\rangle_B \to |1\rangle_A|1\rangle_B$ (control is 1, flip)
- $|1\rangle_A|1\rangle_B \to |1\rangle_A|0\rangle_B$ (control is 1, flip)
$$|\Psi_1\rangle = \frac{1}{\sqrt{2}}\Big(\alpha|0\rangle_A|0\rangle_B|0\rangle_C + \alpha|0\rangle_A|1\rangle_B|1\rangle_C + \beta|1\rangle_A|1\rangle_B|0\rangle_C + \beta|1\rangle_A|0\rangle_B|1\rangle_C\Big)$$
After Hadamard on A: Recall $H|0\rangle = \frac{|0\rangle + |1\rangle}{\sqrt{2}}$ and $H|1\rangle = \frac{|0\rangle - |1\rangle}{\sqrt{2}}$:
Applying $H$ to qubit A:
$$|0\rangle_A \to \frac{1}{\sqrt{2}}(|0\rangle_A + |1\rangle_A)$$ $$|1\rangle_A \to \frac{1}{\sqrt{2}}(|0\rangle_A - |1\rangle_A)$$
Substituting into $|\Psi_1\rangle$:
$$|\Psi_2\rangle = \frac{1}{2}\Big[|0\rangle_A|0\rangle_B(\alpha|0\rangle_C + \beta|1\rangle_C) + |0\rangle_A|1\rangle_B(\alpha|1\rangle_C + \beta|0\rangle_C)$$ $$\qquad + |1\rangle_A|0\rangle_B(\alpha|0\rangle_C - \beta|1\rangle_C) + |1\rangle_A|1\rangle_B(\alpha|1\rangle_C - \beta|0\rangle_C)\Big]$$
Now observe the structure. The state is a superposition of four terms, each corresponding to a measurement outcome $(b_1, b_2)$ on Alice's qubits (A, B):
| $b_1 b_2$ (A, B) | Alice measures | Bob's state (before correction) | Correction needed |
|---|---|---|---|
| 00 | $|0\rangle_A|0\rangle_B$ | $\alpha|0\rangle_C + \beta|1\rangle_C$ | $I$ (none) |
| 01 | $|0\rangle_A|1\rangle_B$ | $\alpha|1\rangle_C + \beta|0\rangle_C$ | $X$ |
| 10 | $|1\rangle_A|0\rangle_B$ | $\alpha|0\rangle_C - \beta|1\rangle_C$ | $Z$ |
| 11 | $|1\rangle_A|1\rangle_B$ | $\alpha|1\rangle_C - \beta|0\rangle_C$ | $XZ$ (or $ZX$) |
After applying the correction, Bob's qubit is always $\alpha|0\rangle + \beta|1\rangle = |\psi\rangle$. The state has been teleported.
9.3.1 Why This Works: The Bell Basis
The key insight is that Alice's measurement is in the Bell basis:
$$|\Phi^+\rangle = \frac{|00\rangle + |11\rangle}{\sqrt{2}}, \quad |\Phi^-\rangle = \frac{|00\rangle - |11\rangle}{\sqrt{2}}$$ $$|\Psi^+\rangle = \frac{|01\rangle + |10\rangle}{\sqrt{2}}, \quad |\Psi^-\rangle = \frac{|01\rangle - |10\rangle}{\sqrt{2}}$$
We can rewrite the initial three-qubit state in terms of Bell states of (A, B):
$$|\Psi_0\rangle = \frac{1}{2}\Big[|\Phi^+\rangle_{AB} \otimes |\psi\rangle_C + |\Phi^-\rangle_{AB} \otimes Z|\psi\rangle_C + |\Psi^+\rangle_{AB} \otimes X|\psi\rangle_C + |\Psi^-\rangle_{AB} \otimes XZ|\psi\rangle_C\Big]$$
Derivation of this decomposition:
Starting from the expanded state $|\Psi_0\rangle$, we group the terms by Alice's qubits:
$$|\Psi_0\rangle = \frac{1}{\sqrt{2}}\Big(\alpha|00\rangle_{AB}|0\rangle_C + \alpha|01\rangle_{AB}|1\rangle_C + \beta|10\rangle_{AB}|0\rangle_C + \beta|11\rangle_{AB}|1\rangle_C\Big) \cdot \frac{1}{\sqrt{2}}$$
Now express each $|ab\rangle_{AB}$ in the Bell basis. Using the inverse relations:
$$|00\rangle = \frac{|\Phi^+\rangle + |\Phi^-\rangle}{\sqrt{2}}, \quad |11\rangle = \frac{|\Phi^+\rangle - |\Phi^-\rangle}{\sqrt{2}}$$ $$|01\rangle = \frac{|\Psi^+\rangle + |\Psi^-\rangle}{\sqrt{2}}, \quad |10\rangle = \frac{|\Psi^+\rangle - |\Psi^-\rangle}{\sqrt{2}}$$
Substituting and collecting terms by Bell state:
$$|\Psi_0\rangle = \frac{1}{2}\Big[|\Phi^+\rangle_{AB}(\alpha|0\rangle + \beta|1\rangle)_C + |\Phi^-\rangle_{AB}(\alpha|0\rangle - \beta|1\rangle)_C + |\Psi^+\rangle_{AB}(\alpha|1\rangle + \beta|0\rangle)_C + |\Psi^-\rangle_{AB}(\alpha|1\rangle - \beta|0\rangle)_C\Big]$$
Now we can identify each correction:
- $|\Phi^+\rangle$ outcome → Bob has $|\psi\rangle$ → no correction needed
- $|\Phi^-\rangle$ outcome → Bob has $Z|\psi\rangle$ → apply $Z$
- $|\Psi^+\rangle$ outcome → Bob has $X|\psi\rangle$ → apply $X$
- $|\Psi^-\rangle$ outcome → Bob has $XZ|\psi\rangle$ → apply $XZ$
This makes it obvious: measuring (A, B) in the Bell basis projects Bob's qubit into one of four states, each related to $|\psi\rangle$ by a known Pauli correction. The classical bits tell Bob which correction to apply.
9.3.2 Why CNOT + Hadamard Implements a Bell Measurement
The Bell measurement projects onto the four Bell states. But we can't measure directly in the Bell basis — our measurement apparatus measures in the computational basis. The trick is to rotate the Bell basis into the computational basis, then measure.
The transformation from the Bell basis to the computational basis is precisely $\text{CNOT}_{A \to B} \cdot (H_A \otimes I_B)$:
$$\text{CNOT} \cdot (H \otimes I) |\Phi^+\rangle = |00\rangle$$ $$\text{CNOT} \cdot (H \otimes I) |\Psi^+\rangle = |01\rangle$$ $$\text{CNOT} \cdot (H \otimes I) |\Phi^-\rangle = |10\rangle$$ $$\text{CNOT} \cdot (H \otimes I) |\Psi^-\rangle = |11\rangle$$
So the CNOT and Hadamard before measurement are not part of the "correction" — they are part of the measurement itself, rotating the Bell basis into the computational basis so that a standard Z-basis measurement suffices.
9.3.3 The Resource Accounting
Teleportation consumes: - 1 Bell pair (2 qubits of entanglement, or 1 ebit) - 2 classical bits (communicated from Alice to Bob)
This 1 ebit + 2 cbits resource cost is optimal — it has been proven that teleportation cannot be done with less. The trade-off is:
$$\text{1 ebit} + \text{2 cbits} \iff \text{1 qubit of quantum communication}$$
This is a fundamental result in quantum Shannon theory.
9.4 Complete Qiskit Implementation
9.4.1 Basic Teleportation Circuit
import numpy as np
from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister
from qiskit.quantum_info import Statevector, random_statevector
from qiskit_aer import AerSimulator
from qiskit.visualization import plot_histogram
# ============================================================
# QUANTUM TELEPORTATION CIRCUIT
# ============================================================
def create_teleportation_circuit(psi_statevector=None):
"""
Build the full teleportation circuit.
Qubit layout:
q[0] = Alice's data qubit (the state to teleport)
q[1] = Alice's half of the Bell pair
q[2] = Bob's half of the Bell pair
Classical bits:
c[0] = measurement of q[0] (b1 - Hadamard measurement)
c[1] = measurement of q[1] (b2 - CNOT target measurement)
c[2] = measurement of q[2] (verification)
"""
qr = QuantumRegister(3, 'q')
cr = ClassicalRegister(3, 'c')
qc = QuantumCircuit(qr, cr)
# Step 0: Prepare the state to teleport on q[0]
if psi_statevector is not None:
qc.initialize(psi_statevector, qr[0])
else:
# Default: prepare |+⟩ = (|0⟩ + |1⟩)/√2
qc.h(qr[0])
qc.barrier(label='State prepared')
# Step 1: Create Bell pair between q[1] (Alice) and q[2] (Bob)
qc.h(qr[1])
qc.cx(qr[1], qr[2])
qc.barrier(label='Bell pair created')
# Step 2: Alice's Bell measurement
qc.cx(qr[0], qr[1]) # CNOT: control=q0, target=q1
qc.h(qr[0]) # Hadamard on q0
qc.measure(qr[0], cr[0]) # b1
qc.measure(qr[1], cr[1]) # b2
qc.barrier(label='Measured')
# Step 3: Bob's conditional corrections
# If b2=1 (cr[1]=1), apply X
qc.x(qr[2]).c_if(cr[1], 1)
# If b1=1 (cr[0]=1), apply Z
qc.z(qr[2]).c_if(cr[0], 1)
qc.barrier(label='Corrected')
# Step 4: Verify by measuring Bob's qubit
qc.measure(qr[2], cr[2])
return qc
# ============================================================
# DEMONSTRATION 1: Teleport |+⟩ state
# ============================================================
print("=" * 60)
print("DEMO 1: Teleporting the |+⟩ state")
print("=" * 60)
qc1 = create_teleportation_circuit()
print("\nCircuit diagram:")
print(qc1.draw('text'))
simulator = AerSimulator()
result1 = simulator.run(qc1, shots=8192).result()
counts1 = result1.get_counts()
print("\nMeasurement results (c2c1c0):")
for outcome, count in sorted(counts1.items()):
print(f" {outcome}: {count} ({100*count/8192:.1f}%)")
# Bob's qubit (c2) should be |+⟩, so ~50% 0, ~50% 1
# regardless of the Bell measurement outcome (c1c0)
bob_zeros = sum(count for outcome, count in counts1.items() if outcome[0] == '0')
bob_ones = sum(count for outcome, count in counts1.items() if outcome[0] == '1')
print(f"\nBob's qubit: |0⟩={bob_zeros} ({100*bob_zeros/8192:.1f}%), "
f"|1⟩={bob_ones} ({100*bob_ones/8192:.1f}%)")
9.4.2 Teleporting an Arbitrary State
# ============================================================
# DEMONSTRATION 2: Teleport an arbitrary state
# ============================================================
print("\n" + "=" * 60)
print("DEMO 2: Teleporting an arbitrary state")
print("=" * 60)
# Create a random state
np.random.seed(42)
random_psi = random_statevector(2, seed=42)
alpha = random_psi.data[0]
beta = random_psi.data[1]
print(f"\nState to teleport: α|0⟩ + β|1⟩")
print(f" α = {alpha:.4f} (|α|² = {np.abs(alpha)**2:.4f})")
print(f" β = {beta:.4f} (|β|² = {np.abs(beta)**2:.4f})")
qc2 = create_teleportation_circuit(psi_statevector=random_psi.data)
result2 = simulator.run(qc2, shots=8192).result()
counts2 = result2.get_counts()
bob_zeros2 = sum(count for outcome, count in counts2.items() if outcome[0] == '0')
bob_ones2 = sum(count for outcome, count in counts2.items() if outcome[0] == '1')
print(f"\nBob's qubit: |0⟩={bob_zeros2} ({100*bob_zeros2/8192:.1f}%), "
f"|1⟩={bob_ones2} ({100*bob_ones2/8192:.1f}%)")
print(f"Expected: |0⟩={np.abs(alpha)**2*8192:.0f}, "
f"|1⟩={np.abs(beta)**2*8192:.0f}")
9.4.3 State Tomography Verification
# ============================================================
# DEMONSTRATION 3: State tomography of teleported state
# ============================================================
print("\n" + "=" * 60)
print("DEMO 3: State tomography verification")
print("=" * 60)
def tomography_teleportation(psi_data, shots=4096):
"""Verify teleportation by measuring in X, Y, Z bases."""
from qiskit_aer import AerSimulator
results = {}
for basis in ['Z', 'X', 'Y']:
qr = QuantumRegister(3, 'q')
cr = ClassicalRegister(1, 'c')
qc = QuantumCircuit(qr, cr)
# Prepare state to teleport
qc.initialize(psi_data, qr[0])
# Bell pair
qc.h(qr[1])
qc.cx(qr[1], qr[2])
# Bell measurement
qc.cx(qr[0], qr[1])
qc.h(qr[0])
qc.measure(qr[0], cr[0]) # We don't use this for correction
qc.measure(qr[1], cr[0]) # Reuse classical bit
# For a proper tomography, we'd need conditional corrections
# Here we simplify by post-selecting on outcome 00
# (In practice, we'd need dynamic circuits)
# For now, measure Bob's qubit in the specified basis
if basis == 'X':
qc.h(qr[2])
elif basis == 'Y':
qc.sdg(qr[2])
qc.h(qr[2])
qc.measure(qr[2], cr[0])
sim = AerSimulator()
counts = sim.run(qc, shots=shots).result().get_counts()
prob_0 = counts.get('0', 0) / shots
results[basis] = prob_0
return results
# Verify with statevector simulation
def verify_teleportation_statevector(psi_data):
"""Verify teleportation using exact statevector simulation."""
from qiskit.quantum_info import Statevector, DensityMatrix, partial_trace
qr = QuantumRegister(3)
qc = QuantumCircuit(qr)
# Prepare state
qc.initialize(psi_data, qr[0])
# Bell pair
qc.h(qr[1])
qc.cx(qr[1], qr[2])
# Bell measurement (without actual measurement)
qc.cx(qr[0], qr[1])
qc.h(qr[0])
# Get the full statevector
sv = Statevector.from_instruction(qc)
# For each measurement outcome, compute Bob's state
corrections = {
'00': [], # I
'01': ['X'], # X
'10': ['Z'], # Z
'11': ['X', 'Z'] # XZ
}
print("\nBob's state for each measurement outcome:")
for outcome, correction in corrections.items():
# Project onto measurement outcome
idx_a = int(outcome[0]) # qubit 0
idx_b = int(outcome[1]) # qubit 1
# Create projection operator |outcome⟩⟨outcome| on qubits 0,1
proj = np.zeros((8, 8), dtype=complex)
for i in range(2): # qubit 2 (Bob)
for j in range(2): # qubit 2 (Bob)
row = 4*idx_a + 2*idx_b + i
col = 4*idx_a + 2*idx_b + j
proj[row, col] = 1.0
# Apply projection
projected = proj @ sv.data
projected = projected / np.linalg.norm(projected)
# Extract Bob's qubit (partial trace over qubits 0, 1)
bob_state = np.zeros(2, dtype=complex)
for i in range(2):
bob_state[i] = projected[4*idx_a + 2*idx_b + i]
# Apply correction
if 'X' in correction:
bob_state = np.array([bob_state[1], bob_state[0]])
if 'Z' in correction:
bob_state = np.array([bob_state[0], -bob_state[1]])
# Compute fidelity with original state
fidelity = np.abs(np.conj(psi_data) @ bob_state)**2
print(f" Outcome {outcome}: fidelity = {fidelity:.6f}")
verify_teleportation_statevector(random_psi.data)
print("Teleportation verified: Bob's state matches the original for all outcomes.")
9.4.4 Teleportation with Noise
# ============================================================
# DEMONSTRATION 4: Teleportation with depolarizing noise
# ============================================================
print("\n" + "=" * 60)
print("DEMO 4: Teleportation with depolarizing noise")
print("=" * 60)
from qiskit_aer.noise import NoiseModel, depolarizing_error
# Create noise models with varying severity
noise_levels = [0.001, 0.005, 0.01, 0.02, 0.05]
fidelities = []
target_state = random_psi.data
target_prob_0 = np.abs(target_state[0])**2
for noise_level in noise_levels:
noise_model = NoiseModel()
error_1q = depolarizing_error(noise_level, 1)
error_2q = depolarizing_error(noise_level * 10, 2) # 2q gates ~10× worse
noise_model.add_all_qubit_quantum_error(error_1q, ['h', 'x', 'z', 's'])
noise_model.add_all_qubit_quantum_error(error_2q, ['cx'])
qc = create_teleportation_circuit(psi_statevector=target_state)
sim_noisy = AerSimulator(noise_model=noise_model)
result = sim_noisy.run(qc, shots=8192).result()
counts = result.get_counts()
bob_zeros = sum(count for outcome, count in counts.items() if outcome[0] == '0')
measured_prob_0 = bob_zeros / 8192
# Compute fidelity as overlap
fidelity = 1 - abs(measured_prob_0 - target_prob_0)
fidelities.append(fidelity)
print(f" Noise {noise_level:.3f}: P(|0⟩) = {measured_prob_0:.4f} "
f"(target: {target_prob_0:.4f}), Fidelity ≈ {fidelity:.4f}")
# Plot fidelity vs noise
import matplotlib.pyplot as plt
plt.figure(figsize=(8, 5))
plt.plot(noise_levels, fidelities, 'bo-', linewidth=2, markersize=8)
plt.xlabel('Single-qubit gate error rate')
plt.ylabel('Estimated fidelity')
plt.title('Teleportation Fidelity vs Gate Error Rate')
plt.grid(True)
plt.savefig('teleportation_fidelity_vs_noise.png', dpi=150)
print("\nPlot saved to teleportation_fidelity_vs_noise.png")
9.5 Why Teleportation Doesn't Violate Physics
9.5.1 No-Cloning Theorem
The no-cloning theorem states that there is no unitary operation $U$ that can copy an arbitrary unknown quantum state:
$$\not\exists U: U(|\psi\rangle \otimes |0\rangle) = |\psi\rangle \otimes |\psi\rangle \quad \forall |\psi\rangle$$
Proof of the no-cloning theorem:
Suppose such a $U$ exists. Then for any two states $|\psi\rangle$ and $|\phi\rangle$:
$$U(|\psi\rangle|0\rangle) = |\psi\rangle|\psi\rangle$$ $$U(|\phi\rangle|0\rangle) = |\phi\rangle|\phi\rangle$$
Taking the inner product of both sides:
$$\langle\psi|\phi\rangle \cdot \langle 0|0\rangle = \langle\psi|\phi\rangle \cdot \langle\psi|\phi\rangle$$ $$\langle\psi|\phi\rangle = (\langle\psi|\phi\rangle)^2$$
This means $\langle\psi|\phi\rangle \in \{0, 1\}$, which is only true when $|\psi\rangle$ and $|\phi\rangle$ are either orthogonal or identical. But cloning must work for all states, not just orthogonal ones. Contradiction. $\square$
Teleportation does not clone. Alice's original qubit is measured in the Bell basis and its state is destroyed — the amplitudes $\alpha, \beta$ are irreversibly projected onto the Bell basis outcomes. Bob's qubit receives the state, but there is never a moment when two copies exist. The no-cloning theorem is respected.
Worked Example 9.1: What happens to Alice's qubit?
After the Bell measurement, Alice's two qubits (A and B) collapse to one of the four Bell states. Specifically, if the measurement outcome is $b_1 b_2 = 00$, then Alice's qubits are in state $|\Phi^+\rangle = \frac{1}{\sqrt{2}}(|00\rangle + |11\rangle)$. The original state $|\psi\rangle$ is completely gone from Alice's possession — it has been "consumed" by the measurement.
9.5.2 No Faster-Than-Light Signaling
Teleportation requires two bits of classical communication. These bits travel at or below the speed of light. Before Bob receives the classical bits, his qubit is in the maximally mixed state $\rho_C = I/2$ — it contains zero information about $|\psi\rangle$.
Proof that Bob's qubit is maximally mixed before classical communication:
After the Bell measurement setup (CNOT + Hadamard) but before the actual measurement, the reduced density matrix of Bob's qubit is:
$$\rho_C = \text{Tr}_{AB}(|\Psi_2\rangle\langle\Psi_2|)$$
This can be computed directly:
$$\rho_C = \frac{1}{4}\Big[(\alpha|0\rangle + \beta|1\rangle)(\alpha^*\langle 0| + \beta^*\langle 1|) + (\alpha|1\rangle + \beta|0\rangle)(\alpha^*\langle 1| + \beta^*\langle 0|)$$ $$+ (\alpha|0\rangle - \beta|1\rangle)(\alpha^*\langle 0| - \beta^*\langle 1|) + (\alpha|1\rangle - \beta|0\rangle)(\alpha^*\langle 1| - \beta^*\langle 0|)\Big]$$
Collecting terms:
$$\rho_C = \frac{1}{4}\Big[4|\alpha|^2|0\rangle\langle 0| + 4|\beta|^2|1\rangle\langle 1| + 4\alpha\beta^*|0\rangle\langle 1| + 4\alpha^*\beta|1\rangle\langle 0|\Big]$$
Wait — let me redo this more carefully. The key point is that we're tracing out Alice's qubits, so we sum over all possible Alice outcomes:
$$\rho_C = \text{Tr}_{AB}(|\Psi_2\rangle\langle\Psi_2|)$$
Since $|\Psi_2\rangle = \frac{1}{2}\sum_{b_1,b_2} |b_1\rangle_A |b_2\rangle_B |\psi_{b_1 b_2}\rangle_C$ where $|\psi_{b_1 b_2}\rangle$ is Bob's conditional state for outcome $(b_1, b_2)$, and the Bell states are orthogonal, we get:
$$\rho_C = \frac{1}{4}\sum_{b_1,b_2} |\psi_{b_1 b_2}\rangle\langle\psi_{b_1 b_2}|$$
Each $|\psi_{b_1 b_2}\rangle$ has the form $P|\psi\rangle$ for some Pauli $P$. Since $\sum_{P \in \{I,X,Z,XZ\}} P|\psi\rangle\langle\psi|P^\dagger = 2I$ (the twirl operation), we get:
$$\rho_C = \frac{1}{4} \cdot 2I = \frac{I}{2}$$
This is the maximally mixed state, regardless of what $|\psi\rangle$ was. Bob has zero information about $|\psi\rangle$ before receiving the classical bits.
# Demonstrate: before classical communication, Bob's qubit is maximally mixed
import numpy as np
from qiskit.quantum_info import Statevector, DensityMatrix, partial_trace
qr = QuantumRegister(3)
qc = QuantumCircuit(qr)
# Prepare |+⟩ on q0
qc.h(qr[0])
# Bell pair on q1,q2
qc.h(qr[1])
qc.cx(qr[1], qr[2])
# Bell measurement setup (but don't measure yet)
qc.cx(qr[0], qr[1])
qc.h(qr[0])
sv = Statevector.from_instruction(qc)
rho_full = DensityMatrix(sv)
# Trace out qubits 0 and 1 (Alice's qubits), keeping qubit 2 (Bob's)
rho_bob = partial_trace(rho_full, [0, 1])
print("\nBob's state before classical communication:")
print(rho_bob.data)
print(f"Is maximally mixed (I/2)? {np.allclose(rho_bob.data, np.eye(2)/2)}")
This is a general feature of entanglement: entanglement alone cannot transmit information. The correlations are real, but they are only observable when the measurement outcomes are brought together via classical communication. This is the content of the no-signaling theorem.
Common Misconception. "Entanglement allows faster-than-light communication." No! Entanglement creates correlations, but without classical communication, those correlations are invisible. Bob's local state is always maximally mixed — he cannot detect whether Alice has measured her qubit or not.
9.5.3 The Resource Counting Argument
Teleportation consumes exactly: - 1 ebit of entanglement (one Bell pair) - 2 cbits of classical communication
And produces: - 1 qubit of quantum state transfer
This is optimal: it has been proven that teleportation cannot succeed with fewer resources. The 2 cbits are necessary because there are 4 possible measurement outcomes, and Bob must know which one occurred to apply the correct Pauli correction. The 1 ebit is necessary because without it, Alice cannot convey the continuous parameters $\alpha$ and $\beta$ using only 2 classical bits (Holevo's bound limits classical bits to 2 bits of information, but a qubit contains infinite classical information in the amplitudes $\alpha, \beta$).
9.6 Experimental Realizations
Quantum teleportation has been demonstrated in numerous physical systems:
| Year | System | Distance | Fidelity | Group |
|---|---|---|---|---|
| 1997 | Photons (polarization) | Laboratory | ~70% | Zeilinger (Innsbruck) |
| 1998 | Photons (parametric down-conversion) | Laboratory | ~80% | Kimble (Caltech) |
| 2004 | Atomic qubits (trapped ions) | Laboratory | ~78% | Blatt (Innsbruck) |
| 2012 | Photons | 143 km (Canary Islands) | ~80% | Zeilinger (Vienna) |
| 2015 | Telecom photons (1.55 μm) | 102 km (fiber) | ~80% | NTT (Japan) |
| 2017 | Satellite-to-ground | >1200 km | ~80% | Pan (Micius satellite) |
| 2020 | Silicon photonic chip | On-chip | ~90% | Various groups |
| 2022 | Multi-node quantum network | Metropolitan | >90% | QuTech (Delft) |
The 1997 Innsbruck experiment (Bouwmeester et al.):
In this landmark experiment, a UV laser pulse created two entangled photon pairs. One pair served as the EPR pair, and one photon from the other pair (the "data" qubit) was teleported. The Bell measurement was performed using a beam splitter, and the results were communicated classically. The observed fidelity was ~70%, well above the classical limit of 2/3 (the maximum fidelity achievable without entanglement).
The 2017 Micius satellite experiment:
This was the most dramatic demonstration to date. Teleportation of single-photon qubits from a ground station to the Micius satellite 500-1400 km overhead, proving that space-based quantum communication is feasible. The key challenge was maintaining quantum state fidelity through the atmosphere and across the enormous distance.
Fidelity benchmark: The maximum fidelity achievable by classical means (measure-and-prepare strategy) is $F_{\text{classical}} = 2/3$ for an unknown qubit state. Any teleportation experiment achieving $F > 2/3$ demonstrates genuine quantum teleportation. Modern experiments achieve $F > 0.9$.
9.7 Quantum Repeaters and the Quantum Internet
9.7.1 The Problem: Photon Loss
Photons traveling through optical fiber experience exponential loss: a 1000 km fiber has transmission probability $\sim 10^{-20}$. Direct transmission of entangled photons is impossible at scale.
The loss in optical fiber follows the Beer-Lambert law:
$$P_{\text{transmission}}(d) = 10^{-\alpha d / 10}$$
where $\alpha$ is the attenuation coefficient (typically 0.2 dB/km for telecom fiber) and $d$ is the distance. For $d = 1000$ km: $P \approx 10^{-200}$ — essentially zero.
This is why quantum repeaters are essential.
9.7.2 Quantum Repeaters
A quantum repeater uses entanglement swapping (teleportation of entanglement) to extend the range:
Node A ──── Repeater 1 ──── Repeater 2 ──── ... ──── Node B
| | | |
└── EPR ────┘ | |
entanglement └──── EPR ───────────────┘
swapping └──────── EPR ───────────┘
Entanglement swapping is teleportation applied to one half of an entangled pair. If A shares entanglement with R1, and R1 shares entanglement with R2, then a Bell measurement at R1 entangles A and R2. Repeating this process creates end-to-end entanglement.
Mathematical derivation of entanglement swapping:
Start with two Bell pairs: $|\Phi^+\rangle_{A,R1a}$ and $|\Phi^+\rangle_{R1b,B}$:
$$|\Phi^+\rangle_{A,R1a} \otimes |\Phi^+\rangle_{R1b,B}$$
Expanding:
$$= \frac{1}{2}(|00\rangle_{A,R1a} + |11\rangle_{A,R1a}) \otimes (|00\rangle_{R1b,B} + |11\rangle_{R1b,B})$$
Now perform a Bell measurement on qubits $R1a$ and $R1b$. The four-qubit state can be rewritten in terms of Bell states on $(R1a, R1b)$:
$$= \frac{1}{2}\Big[|\Phi^+\rangle_{R1a,R1b}|\Phi^+\rangle_{A,B} + |\Phi^-\rangle_{R1a,R1b}|\Phi^-\rangle_{A,B} + |\Psi^+\rangle_{R1a,R1b}|\Psi^+\rangle_{A,B} + |\Psi^-\rangle_{R1a,R1b}|\Psi^-\rangle_{A,B}\Big]$$
When we measure $(R1a, R1b)$ in the Bell basis, qubits $A$ and $B$ collapse to the same Bell state (up to Pauli corrections). This is entanglement swapping!
# Entanglement swapping demonstration
def entanglement_swapping_demo():
"""Demonstrate entanglement swapping: create A-R1 and R1-B entanglement,
then Bell-measure R1 to entangle A and B."""
qr = QuantumRegister(4, 'q') # A, R1a, R1b, B
cr = ClassicalRegister(2, 'c')
qc = QuantumCircuit(qr, cr)
# Create EPR pair (A, R1a)
qc.h(qr[0])
qc.cx(qr[0], qr[1])
# Create EPR pair (R1b, B)
qc.h(qr[2])
qc.cx(qr[2], qr[3])
qc.barrier(label='EPR pairs created')
# Bell measurement on R1a and R1b (the repeater node)
qc.cx(qr[1], qr[2])
qc.h(qr[1])
qc.measure(qr[1], cr[0])
qc.measure(qr[2], cr[1])
# After this, A and B are entangled (up to Pauli corrections)
# Verify by measuring A and B in the computational basis
qc.barrier(label='Swapped')
qc.measure(qr[0], cr[0]) # Reuse classical bits for demo
qc.measure(qr[3], cr[1])
return qc
print("\n" + "=" * 60)
print("Entanglement Swapping (Quantum Repeater Primitive)")
print("=" * 60)
qc_swap = entanglement_swapping_demo()
result_swap = simulator.run(qc_swap, shots=8192).result()
counts_swap = result_swap.get_counts()
print("A-B correlations (should be perfectly correlated):")
for outcome, count in sorted(counts_swap.items()):
print(f" {outcome}: {count}")
9.7.3 Entanglement Purification
Real-world Bell pairs are noisy. Entanglement purification (also called distillation) is a protocol that takes several noisy Bell pairs and produces fewer, higher-fidelity Bell pairs.
The Bennett et al. (1996) protocol:
- Start with two copies of a noisy Bell pair: $\rho^{\otimes 2}$
- Perform bilateral CNOTs (CNOT on both sides of the Bell pairs)
- Measure the target pairs
- If the measurements agree, keep the source pair; otherwise, discard it
- The resulting pair has higher fidelity than the originals
The protocol works because errors tend to be detected by the measurement. If the fidelity of the initial pairs is $F > 0.5$, the purified pair has fidelity:
$$F' = \frac{F^2 + (1-F)^2/4}{F^2 + 2F(1-F)/2 + (1-F)^2/4} > F$$
# Entanglement purification simulation
def simulate_purification(initial_fidelity, n_pairs=10000):
"""Simulate entanglement purification protocol."""
# Generate noisy Bell pairs
# A Werner state with fidelity F: ρ = F|Φ+⟩⟨Φ+| + (1-F)/3(P_Ψ+ + P_Ψ- + P_Φ-)
from qiskit.quantum_info import DensityMatrix
phi_plus = DensityMatrix.from_label('phi+')
psi_plus = DensityMatrix.from_label('psi+')
psi_minus = DensityMatrix.from_label('psi-')
phi_minus = DensityMatrix.from_label('phi-')
F = initial_fidelity
rho = F * phi_plus + (1-F)/3 * (psi_plus + psi_minus + phi_minus)
# Simplified: count how many pairs are in |Φ+⟩
n_purified = 0
f_purified = 0
for _ in range(n_pairs):
# Randomly choose state based on Werner state probabilities
r = np.random.random()
if r < F:
state = 'phi_plus'
elif r < F + (1-F)/3:
state = 'psi_plus'
elif r < F + 2*(1-F)/3:
state = 'psi_minus'
else:
state = 'phi_minus'
# ... (purification logic would go here)
return F # Simplified; full simulation requires more work
print(f"\nEntanglement purification:")
print(f" Initial fidelity: 0.75")
print(f" After one round of purification: ~0.90 (theoretical)")
print(f" After two rounds: ~0.98 (theoretical)")
9.7.4 The Quantum Internet Vision
A future quantum internet would provide: - Secure communication via QKD (Chapter 10) - Distributed quantum computing via teleportation of qubits between quantum processors - Blind quantum computation — a client can run computations on a remote quantum server without revealing the computation - Quantum sensor networks with precision beyond the standard quantum limit - Secure voting and auction protocols leveraging quantum entanglement
The protocol stack of a quantum internet:
- Physical layer: Photonic qubits, quantum memories, transducers
- Link layer: Entanglement generation, purification, and swapping
- Network layer: Routing of entanglement, path selection
- Transport layer: Reliable qubit delivery, retransmission
- Application layer: QKD, blind computation, sensor networks
Teleportation is the fundamental primitive that makes all of this possible.
Recurring Theme. We're at the beginning. The quantum internet today is where the classical internet was in the 1970s — proof-of-concept demonstrations exist, but the engineering challenges are immense. Noise, loss, and decoherence are the enemies at every layer.
9.8 Variations on Teleportation
9.8.1 Teleportation with Continuous Variables
So far we've discussed teleportation of discrete qubits. In continuous-variable (CV) quantum optics, teleportation works with the quadrature operators $\hat{x}$ and $\hat{p}$ (position and momentum). The EPR pair is replaced by a two-mode squeezed state, and the Bell measurement is replaced by a homodyne measurement.
CV teleportation was demonstrated by Furusawa et al. in 1998 and achieves higher efficiency for optical quantum information.
9.8.2 Teleportation with Partial Entanglement
What if the shared Bell pair is not perfectly entangled? If the state is a Werner state $\rho = F|\Phi^+\rangle\langle\Phi^+| + \frac{1-F}{3}(I - |\Phi^+\rangle\langle\Phi^+|)$, the teleportation fidelity is:
$$\mathcal{F} = \frac{2F + 1}{3}$$
This exceeds the classical limit of $2/3$ only when $F > 1/2$. So we need a Bell pair with fidelity above 50% to beat classical teleportation.
Worked Example 9.2: Fidelity with a Werner state
For $F = 0.9$ (a realistic imperfect Bell pair):
$$\mathcal{F} = \frac{2(0.9) + 1}{3} = \frac{2.8}{3} = 0.933$$
For $F = 0.5$ (maximally mixed entanglement):
$$\mathcal{F} = \frac{2(0.5) + 1}{3} = \frac{2}{3} = 0.667$$
This is exactly the classical teleportation limit — no advantage from the noisy entanglement.
9.8.3 Dense Teleportation
If Alice and Bob share a maximally entangled state in $d$ dimensions (a qudit Bell pair), they can teleport a $d$-dimensional quantum state using $2\log_2 d$ classical bits. The protocol generalizes naturally:
- The qudit Bell measurement has $d^2$ possible outcomes
- Alice sends $\log_2(d^2) = 2\log_2 d$ classical bits
- Bob applies one of $d^2$ generalized Pauli corrections
9.8.4 Port-Based Teleportation
In standard teleportation, Bob must apply a Pauli correction based on the classical bits. In port-based teleportation (Ishizaka & Hiroshima, 2008), Alice and Bob share $N$ Bell pairs, and Bob has $N$ "ports." After Alice's measurement, Bob's state appears on one of the $N$ ports — no correction needed. The trade-off is that port-based teleportation requires exponentially many Bell pairs to achieve high fidelity, but it avoids the need for conditional operations, which is advantageous for some quantum algorithms.
9.9 Teleportation in Practice: Error Budget
On a real quantum computer, every operation in the teleportation protocol introduces error:
- Bell pair creation: The Hadamard + CNOT that creates $|\Phi^+\rangle$ has error $\approx \epsilon_H + \epsilon_{\text{CNOT}}$
- Bell measurement: The CNOT + Hadamard + measurement has error $\approx \epsilon_{\text{CNOT}} + \epsilon_H + \epsilon_{\text{meas}}$
- Classical correction: The conditional X and Z gates each have error $\approx \epsilon_X$ or $\epsilon_Z$
- Decoherence: Qubits idle during the classical communication, suffering $T_1$ and $T_2$ decay
The total fidelity of teleportation on a real device is approximately:
$$\mathcal{F} \approx 1 - (2\epsilon_H + 2\epsilon_{\text{CNOT}} + 2\epsilon_{\text{meas}} + \epsilon_X + \epsilon_Z) - \frac{t_{\text{classical}}}{T_2}$$
where $t_{\text{classical}}$ is the time for classical communication.
On current hardware with $\epsilon_H \sim 0.001$, $\epsilon_{\text{CNOT}} \sim 0.01$, $\epsilon_{\text{meas}} \sim 0.02$:
$$\mathcal{F} \approx 1 - (0.002 + 0.02 + 0.04 + 0.001 + 0.001) \approx 0.936$$
This is above the classical limit of $2/3$, so teleportation works on current hardware, but with significant room for improvement.
9.10 Quantum Teleportation on Real Hardware
9.10.1 Running Teleportation on IBM Quantum
Let's put everything together and run the teleportation protocol on real quantum hardware:
"""
Complete Teleportation on IBM Quantum Hardware
================================================
This script demonstrates teleportation on a real device,
comparing with simulation and analyzing fidelity degradation.
"""
from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister, transpile
from qiskit_aer import AerSimulator
from qiskit.quantum_info import Statevector, random_statevector
from qiskit.visualization import plot_histogram
import numpy as np
# Step 1: Create the teleportation circuit
def create_teleportation_circuit_for_hardware(psi_vec=None):
"""Create a teleportation circuit optimized for hardware."""
qr = QuantumRegister(3, 'q')
# Use separate classical registers for conditional operations
crz = ClassicalRegister(1, 'crz') # For Z correction
crx = ClassicalRegister(1, 'crx') # For X correction
cr_result = ClassicalRegister(1, 'result') # For final measurement
qc = QuantumCircuit(qr, crz, crx, cr_result)
# Prepare the state to teleport
if psi_vec is not None:
qc.initialize(psi_vec, qr[0])
else:
# Prepare |+⟩ as a simple test case
qc.h(qr[0])
# Create Bell pair
qc.h(qr[1])
qc.cx(qr[1], qr[2])
qc.barrier(label='bell_pair')
# Bell measurement
qc.cx(qr[0], qr[1])
qc.h(qr[0])
qc.barrier(label='before_measure')
# Measure in two steps for dynamic circuits
qc.measure(qr[0], crz)
qc.measure(qr[1], crx)
qc.barrier(label='after_measure')
# Conditional corrections (dynamic circuit)
with qc.if_test((crx, 1)):
qc.x(qr[2])
with qc.if_test((crz, 1)):
qc.z(qr[2])
qc.barrier(label='after_correction')
qc.measure(qr[2], cr_result)
return qc
# Step 2: Simulate and verify
print("=" * 70)
print("TELEPORTATION: Simulation Verification")
print("=" * 70)
psi = random_statevector(2, seed=42)
qc_sim = create_teleportation_circuit_for_hardware(psi.data)
sim = AerSimulator()
# Run with 8192 shots
result_sim = sim.run(qc_sim, shots=8192).result()
counts_sim = result_sim.get_counts()
# Analyze Bob's measurement results
# The result bit is the leftmost in Qiskit's bit ordering
bob_results = {}
for outcome, count in counts_sim.items():
# Parse the outcome string
bits = outcome.replace(' ', '')
bob_bit = bits[0] # Leftmost bit is cr_result
bob_results[bob_bit] = bob_results.get(bob_bit, 0) + count
prob_0 = bob_results.get('0', 0) / 8192
prob_1 = bob_results.get('1', 0) / 8192
expected_prob_0 = np.abs(psi.data[0])**2
expected_prob_1 = np.abs(psi.data[1])**2
print(f"State to teleport: α={psi.data[0]:.4f}, β={psi.data[1]:.4f}")
print(f"Bob's measurement: P(0)={prob_0:.4f} (expected {expected_prob_0:.4f})")
print(f" P(1)={prob_1:.4f} (expected {expected_prob_1:.4f})")
print(f"Fidelity (approximate): {1 - abs(prob_0 - expected_prob_0):.4f}")
9.10.2 Teleportation Fidelity on Noisy Hardware
The fidelity of teleportation on real hardware depends on:
- Gate errors: Each gate in the protocol introduces error
- Readout errors: Measurement outcomes can be flipped
- Decoherence: Qubits lose information during the circuit
- Crosstalk: Operations on neighboring qubits can interfere
from qiskit_aer.noise import NoiseModel
from qiskit.providers.fake_provider import FakeBrisbane
# Load a realistic noise model
real_backend = FakeBrisbane()
noise_model = NoiseModel.from_backend(real_backend)
# Run with realistic noise
print("\n" + "=" * 70)
print("TELEPORTATION WITH REALISTIC NOISE")
print("=" * 70)
noisy_sim = AerSimulator(noise_model=noise_model)
# Test teleportation of |0⟩, |+⟩, |1⟩, |−⟩
test_states = {
'|0⟩': [1, 0],
'|1⟩': [0, 1],
'|+⟩': [1/np.sqrt(2), 1/np.sqrt(2)],
'|−⟩': [1/np.sqrt(2), -1/np.sqrt(2)],
}
print(f"\n{'State':>8s} {'P(0) ideal':>10s} {'P(0) noisy':>10s} {'Fidelity':>10s}")
print("-" * 50)
for name, state_vec in test_states.items():
# Ideal simulation
qc = create_teleportation_circuit_for_hardware(state_vec)
result_ideal = sim.run(qc, shots=4096).result()
counts_ideal = result_ideal.get_counts()
result_noisy = noisy_sim.run(qc, shots=4096).result()
counts_noisy = result_noisy.get_counts()
# Extract Bob's measurement probability
prob_0_ideal = sum(c for o, c in counts_ideal.items() if o[0] == '0') / 4096
prob_0_noisy = sum(c for o, c in counts_noisy.items() if o[0] == '0') / 4096
expected = np.abs(state_vec[0])**2
fidelity = 1 - abs(prob_0_noisy - expected) / max(expected, 1 - expected)
print(f"{name:>8s} {expected:10.4f} {prob_0_noisy:10.4f} {fidelity:10.4f}")
9.10.3 Choosing the Best Qubits
The fidelity of teleportation depends critically on which qubits we use. On a real device, we should choose the three qubits with the best connectivity and lowest error rates:
from qiskit.providers.fake_provider import FakeBrisbane
backend = FakeBrisbane()
props = backend.properties()
# Find the best connected triple of qubits
# We need q0-q1 CNOT and q1-q2 CNOT
# So q0, q1, q2 should form a chain in the coupling map
# For simplicity, we'll find the best chain of 3 qubits
coupling_map = backend.configuration().coupling_map
# Find all chains of length 3
chains = []
for edge1 in coupling_map:
for edge2 in coupling_map:
if edge1[1] == edge2[0]: # chain: a -> b -> c
chains.append((edge1[0], edge1[1], edge2[1]))
# Score each chain by average gate error
best_chain = None
best_score = float('inf')
for chain in chains:
q0, q1, q2 = chain
# Get error rates
try:
err_x0 = props.gate_error('x', q0)
err_x1 = props.gate_error('x', q1)
err_x2 = props.gate_error('x', q2)
err_cx01 = props.gate_error('cx', [q0, q1])
err_cx12 = props.gate_error('cx', [q1, q2])
score = err_x0 + err_x1 + err_x2 + err_cx01 + err_cx12
if score < best_score:
best_score = score
best_chain = chain
except:
continue
print(f"Best qubit chain for teleportation: q{best_chain[0]} → q{best_chain[1]} → q{best_chain[2]}")
print(f"Total error score: {best_score:.4f}")
9.11 Advanced Topics in Teleportation
9.11.1 Gate Teleportation
Teleportation isn't just for moving quantum states — it can also be used to implement quantum gates. Gate teleportation applies a gate to a state by teleporting through a specially prepared resource state.
For example, to apply the $T$ gate to a state $|\psi\rangle$:
- Prepare the resource state $|T\rangle = T|+\rangle = \frac{1}{\sqrt{2}}(|0\rangle + e^{i\pi/4}|1\rangle)$
- Perform a Bell measurement on $|\psi\rangle$ and one half of a Bell pair
- Apply a correction that depends on the measurement outcome
- The result is $T|\psi\rangle$
This is important because $T$ gates are hard to implement fault-tolerantly. By using gate teleportation with magic states, we can avoid applying $T$ directly to the data qubit, which is more compatible with error correction.
9.11.2 Teleportation and Quantum Error Correction
Teleportation plays a central role in fault-tolerant quantum computing:
- State injection: Encode a logical qubit by teleporting it into a code block
- Gate teleportation: Apply logical gates by teleporting through encoded magic states
- Lattice surgery: Merge and split code blocks using teleportation-like operations
In the surface code, logical operations are performed by measuring stabilizers and updating the error syndrome — a process that is essentially teleportation in disguise.
9.11.3 Teleportation and the Choi-Jamiołkowski Isomorphism
The Choi-Jamiołkowski isomorphism establishes a correspondence between quantum channels and quantum states. Teleportation is a physical manifestation of this correspondence:
- The quantum channel (teleportation of a state through a channel $\mathcal{E}$) corresponds to the state $\rho_{\mathcal{E}} = (\mathcal{E} \otimes I)(|\Phi^+\rangle\langle\Phi^+|)$
- Teleportation through a channel is equivalent to applying the channel to one half of a Bell pair and then performing standard teleportation
This duality between channels and states is fundamental to quantum information theory and appears in channel estimation, channel discrimination, and quantum process tomography.
9.12 Quantum Process Tomography of Teleportation
9.12.1 What Is Process Tomography?
Quantum state tomography reconstructs a quantum state $\rho$ from measurements. Quantum process tomography reconstructs a quantum channel $\mathcal{E}$ from input-output measurements.
For teleportation, we want to verify that the teleportation channel is the identity channel (or close to it). This means preparing a set of input states, teleporting each one, and measuring the output.
9.12.2 Process Tomography Procedure
To characterize the teleportation channel, we:
- Prepare input states spanning the state space (for a single qubit: $|0\rangle$, $|1\rangle$, $|+\rangle$, $|+i\rangle$)
- Teleport each input state
- Measure the output in multiple bases (X, Y, Z)
- Reconstruct the process matrix $\chi$
The process matrix $\chi$ represents the channel as:
$$\mathcal{E}(\rho) = \sum_{i,j} \chi_{ij} P_i \rho P_j^\dagger$$
where $\{P_i\} = \{I, X, Y, Z\}$ are the Pauli matrices.
For perfect teleportation, $\chi = |II\rangle\langle II|$ (the identity channel). Any deviation from this indicates errors.
import numpy as np
from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister
from qiskit_aer import AerSimulator
from qiskit.quantum_info import Statevector, DensityMatrix
def teleportation_process_tomography(shots=8192):
"""Perform process tomography on the teleportation protocol."""
simulator = AerSimulator()
# Input states for tomography
input_states = {
'|0⟩': [1, 0],
'|1⟩': [0, 1],
'|+⟩': [1/np.sqrt(2), 1/np.sqrt(2)],
'|+i⟩': [1/np.sqrt(2), 1j/np.sqrt(2)],
}
# Measurement bases
measurement_bases = ['Z', 'X', 'Y']
results = {}
for state_name, state_vec in input_states.items():
results[state_name] = {}
for basis in measurement_bases:
qr = QuantumRegister(3, 'q')
cr = ClassicalRegister(2, 'c') # For Bell measurement results
cr_out = ClassicalRegister(1, 'out') # For output measurement
qc = QuantumCircuit(qr, cr, cr_out)
# Prepare input state on q0
qc.initialize(state_vec, qr[0])
# Create Bell pair
qc.h(qr[1])
qc.cx(qr[1], qr[2])
# Bell measurement
qc.cx(qr[0], qr[1])
qc.h(qr[0])
qc.measure(qr[0], cr[0])
qc.measure(qr[1], cr[1])
# Conditional corrections
with qc.if_test((cr[1], 1)):
qc.x(qr[2])
with qc.if_test((cr[0], 1)):
qc.z(qr[2])
# Measure output in the specified basis
if basis == 'X':
qc.h(qr[2])
elif basis == 'Y':
qc.sdg(qr[2])
qc.h(qr[2])
qc.measure(qr[2], cr_out[0])
result = simulator.run(qc, shots=shots).result()
counts = result.get_counts()
# Extract probability of |0⟩ in the output
prob_0 = 0
for outcome, count in counts.items():
# The output bit is the first bit
if outcome[0] == '0':
prob_0 += count / shots
results[state_name][basis] = prob_0
return results
# Run process tomography
results = teleportation_process_tomography()
print("Teleportation Process Tomography Results:")
print(f"{'State':>6s} {'Z-basis':>10s} {'X-basis':>10s} {'Y-basis':>10s}")
print("-" * 45)
for state_name, basis_data in results.items():
z_prob = basis_data.get('Z', 0)
x_prob = basis_data.get('X', 0)
y_prob = basis_data.get('Y', 0)
print(f"{state_name:>6s} {z_prob:10.4f} {x_prob:10.4f} {y_prob:10.4f}")
# Expected for perfect teleportation (identity channel):
print("\nExpected for perfect teleportation:")
print(f"{'|0⟩':>6s} {'1.0000':>10s} {'0.5000':>10s} {'0.5000':>10s}")
print(f"{'|1⟩':>6s} {'0.0000':>10s} {'0.5000':>10s} {'0.5000':>10s}")
print(f"{'|+⟩':>6s} {'0.5000':>10s} {'1.0000':>10s} {'0.5000':>10s}")
print(f"{'|+i⟩':>6s} {'0.5000':>10s} {'0.5000':>10s} {'1.0000':>10s}")
9.12.3 Computing Process Fidelity
The process fidelity $F_\mathcal{E}$ quantifies how close the actual channel $\mathcal{E}$ is to the target channel (identity for teleportation):
$$F_\mathcal{E} = \text{Tr}\left[\chi_{\text{ideal}}^\dagger \chi_{\text{actual}}\right]$$
For perfect teleportation, $F_\mathcal{E} = 1$. For a completely depolarizing channel, $F_\mathcal{E} = 1/d^2 = 1/4$ (for a single qubit).
def compute_process_fidelity(tomography_results):
"""Compute process fidelity from tomography results.
Uses a simplified approach based on average state fidelity.
"""
# For each input state, compute the output state fidelity
# Perfect teleportation: output = input
fidelities = []
for state_name, basis_data in tomography_results.items():
# Expected probabilities for each input state
if state_name == '|0⟩':
expected = {'Z': 1.0, 'X': 0.5, 'Y': 0.5}
elif state_name == '|1⟩':
expected = {'Z': 0.0, 'X': 0.5, 'Y': 0.5}
elif state_name == '|+⟩':
expected = {'Z': 0.5, 'X': 1.0, 'Y': 0.5}
elif state_name == '|+i⟩':
expected = {'Z': 0.5, 'X': 0.5, 'Y': 1.0}
# Compute fidelity for this input state
# F = <ψ|ρ_out|ψ> ≈ average of (2*P(correct) - 1) for each basis
state_fid = 0
for basis in ['Z', 'X', 'Y']:
p_0 = basis_data.get(basis, 0.5)
p_1 = 1 - p_0
expected_p0 = expected[basis]
# Fidelity contribution from this basis
state_fid += abs(p_0 * expected_p0 + p_1 * (1 - expected_p0))
fidelities.append(state_fid / 3)
avg_fidelity = np.mean(fidelities)
# Convert average state fidelity to process fidelity
# For a single qubit: F_process = (2*F_avg - 1 + 1/d) / (d + 1)
# Simplified: F_process ≈ F_avg for high-fidelity channels
return avg_fidelity
fidelity = compute_process_fidelity(results)
print(f"\nAverage state fidelity: {fidelity:.4f}")
print(f"Process fidelity (approximate): {fidelity:.4f}")
print(f"(Perfect teleportation would give 1.0000)")
9.13 Teleportation Networks and Distributed Quantum Computing
9.13.1 Teleportation as a Network Primitive
In a quantum network, teleportation serves multiple roles:
- State transfer: Moving qubits between nodes
- Gate teleportation: Implementing gates between remote qubits
- Entanglement distribution: Creating shared entanglement via entanglement swapping
Remote CNOT via teleportation: If Alice has qubit A and Bob has qubit B, they can implement a CNOT with A as control and B as target by:
- Alice and Bob share a Bell pair (consuming one ebit)
- Alice teleports her qubit to Bob's lab
- Bob performs a local CNOT
- Bob teleports Alice's qubit back
This requires 4 classical bits and 2 ebits, but enables distributed computation.
9.13.2 The Quantum Network Stack
A quantum internet has a layered architecture similar to the classical internet:
Layer 5: Application — QKD, distributed sensing, blind computing Layer 4: Transport — End-to-end qubit delivery (via teleportation) Layer 3: Network — Entanglement routing, path selection Layer 2: Link — Entanglement generation and purification between neighbors Layer 1: Physical — Photon generation, detection, quantum memories
Each layer builds on the services of the layer below. The link layer generates raw Bell pairs between adjacent nodes. The network layer chains these together via entanglement swapping. The transport layer uses teleportation to deliver qubits end-to-end.
9.13.3 Entanglement Purification in Detail
Entanglement purification takes $n$ noisy Bell pairs and produces $m < n$ higher-fidelity Bell pairs. The DEJMPS protocol (Deutsch et al., 1996) is one of the most efficient:
Step 1: Take two noisy Bell pairs |ψ₁⟩ and |ψ₂⟩
Step 2: Apply bilateral CNOT (CNOT on both sides)
Step 3: Measure the target pair in the computational basis
Step 4: If both measurements agree (00 or 11), keep the source pair
Otherwise, discard both pairs
Step 5: The kept pair has higher fidelity than the originals
Fidelity improvement: If the initial fidelity is $F$, after one round of purification:
$$F' = \frac{F^2 + \left(\frac{1-F}{3}\right)^2}{F^2 + 2F\frac{1-F}{3} + 2\left(\frac{1-F}{3}\right)^2}$$
For $F = 0.75$: $F' = \frac{0.5625 + 0.0069}{0.5625 + 0.125 + 0.0139} \approx 0.811$ (a significant improvement!)
For $F = 0.9$: $F' \approx 0.955$
Multiple rounds of purification can drive the fidelity arbitrarily close to 1, at the cost of consuming more and more Bell pairs.
def dejmps_purification(F):
"""Compute output fidelity after one round of DEJMPS purification."""
f = F # probability of |Φ+⟩
e = (1 - F) / 3 # probability of each Bell error (assuming Werner state)
# After bilateral CNOT and post-selection
numerator = f**2 + e**2
denominator = f**2 + 2*f*e + 2*e**2 + e**2 + f*e # simplified
# More accurate: denominator = (f+e)^2 + (f-e)^2 + e^2 + ...
# Actually, the standard formula is:
# F' = (F^2 + (1-F)^2/9) / (F^2 + 2*F*(1-F)/3 + 5*(1-F)^2/9)
F_prime = (F**2 + ((1-F)/3)**2) / (F**2 + 2*F*(1-F)/3 + 5*((1-F)/3)**2)
return F_prime
print("Entanglement Purification (DEJMPS Protocol):")
print(f"{'Input F':>10s} {'Output F':>10s} {'Improvement':>12s}")
print("-" * 35)
F_values = [0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95]
for F in F_values:
F_out = dejmps_purification(F)
print(f"{F:10.2f} {F_out:10.4f} {F_out - F:12.4f}")
# Multiple rounds
print("\nMultiple rounds of purification (starting from F=0.75):")
F = 0.75
for i in range(5):
F_new = dejmps_purification(F)
print(f" Round {i+1}: F = {F:.6f} → {F_new:.6f}")
F = F_new
9.14 Teleportation and the No-Communication Theorem
9.14.1 Why Entanglement Can't Send Information
The no-communication theorem (also called the no-signaling theorem) states that operations on one part of a bipartite system cannot influence the local statistics of measurements on the other part, if the two parts are spacelike separated.
Formal statement: If Alice and Bob share a bipartite state $\rho_{AB}$, and Alice performs a local operation $\mathcal{E}_A$ on her part, then Bob's reduced density matrix is unchanged:
$$\text{Tr}_A[\mathcal{E}_A \otimes I_B (\rho_{AB})] = \text{Tr}_A[\rho_{AB}]$$
Proof: For any CPTP map $\mathcal{E}_A$ with Kraus operators $\{K_i\}$:
$$\text{Tr}_A\left[\sum_i (K_i \otimes I) \rho_{AB} (K_i^\dagger \otimes I)\right] = \sum_i \text{Tr}_A\left[(K_i \otimes I) \rho_{AB} (K_i^\dagger \otimes I)\right]$$
Using the cyclic property of the trace:
$$= \sum_i \text{Tr}_A\left[\rho_{AB} (K_i^\dagger K_i \otimes I)\right] = \text{Tr}_A\left[\rho_{AB} \sum_i (K_i^\dagger K_i \otimes I)\right] = \text{Tr}_A[\rho_{AB}]$$
since $\sum_i K_i^\dagger K_i = I$. ✓
This means Alice cannot signal to Bob by choosing which operation to perform. The only way information can be transmitted is through classical communication, which is limited by the speed of light.
Implication for teleportation: Even though Alice's measurement "collapses" the state instantaneously, Bob cannot detect this collapse without the classical bits. Before receiving the classical bits, Bob's reduced density matrix is always $I/2$, regardless of what Alice did.
9.14.2 The EPR Argument and Bell's Theorem
The EPR argument (Einstein, Podolsky, Rosen, 1935) pointed out that quantum mechanics seems to allow "spooky action at a distance" — measuring one particle of an entangled pair instantly determines the state of the other, regardless of separation.
Bell's theorem (1964) showed that any local hidden variable theory must satisfy certain inequalities (Bell inequalities), and that quantum mechanics violates them. The CHSH inequality (Clauser, Horne, Shimony, Holt, 1969) is the most commonly tested:
$$|E(a,b) - E(a,b') + E(a',b) + E(a',b')| \leq 2$$
Quantum mechanics predicts $S = 2\sqrt{2} \approx 2.828$ for optimal angle choices.
Experimental tests have confirmed the quantum prediction with high precision: - Aspect et al. (1982): First loophole-free test - Hensen et al. (2015): First loophole-free Bell test - Shalm et al. (2015): Independent confirmation
These results rule out local hidden variable theories and confirm that entanglement is a genuine non-local resource — but one that cannot be used for superluminal signaling due to the no-communication theorem.
9.15 Teleportation and Error Correction
9.15.1 Teleportation in Fault-Tolerant Computing
In fault-tolerant quantum computing, teleportation plays a central role beyond simply moving qubits:
-
State injection: Encoding a logical qubit by teleporting it into a code block. This is how arbitrary states enter an error-correcting code.
-
Gate teleportation: Applying logical gates by teleporting through specially prepared "magic states." This is the standard method for applying non-Clifford gates (like $T$) in fault-tolerant schemes.
-
Lattice surgery: In the surface code, logical operations are performed by merging and splitting code blocks using teleportation-like measurements.
The key insight is that teleportation moves quantum information without applying physical gates directly to the data qubits. This is crucial for fault tolerance because: - The teleportation circuit can be verified before the data qubits are involved - Errors in the ancilla states can be detected without corrupting the data - The data qubits never interact directly with noisy components
9.15.2 Magic State Distillation
One of the most important applications of gate teleportation is magic state distillation. The $T$ gate (and other non-Clifford gates) cannot be implemented transversally in most error-correcting codes. Instead, we:
- Prepare noisy magic states: $|T\rangle = T|+\rangle = \frac{1}{\sqrt{2}}(|0\rangle + e^{i\pi/4}|1\rangle)$
- Distill them using magic state distillation protocols (e.g., Bravyi-Kitaev)
- Apply the $T$ gate by teleporting through the distilled magic state
The distillation protocol takes $n$ noisy magic states and produces $k < n$ higher-fidelity magic states. The most common protocol is the 15-to-1 distillation:
- Input: 15 noisy $|T\rangle$ states with fidelity $F > 0.57$
- Output: 1 purified $|T\rangle$ state with higher fidelity $F' > F$
- Overhead: 15 noisy $|T\rangle$ states per output $|T\rangle$ state
Multiple rounds of distillation can achieve arbitrarily high fidelity, at the cost of exponential resource consumption:
def magic_state_distillation_cost(target_fidelity, initial_fidelity=0.9):
"""Estimate the number of noisy magic states needed to produce
one magic state at the target fidelity using 15-to-1 distillation."""
F = initial_fidelity
rounds = 0
total_states = 1
while F < target_fidelity:
F = 1 - 2 * (1 - F) # Simplified model
total_states *= 15
rounds += 1
if rounds > 20: # Safety limit
break
return rounds, total_states, F
print("Magic State Distillation Resource Estimates:")
print(f"{'Target F':>10s} {'Rounds':>6s} {'Noisy |T⟩ states':>18s} {'Achieved F':>10s}")
print("-" * 55)
for target in [0.99, 0.999, 0.9999, 0.99999, 0.999999]:
rounds, states, achieved = magic_state_distillation_cost(target)
print(f"{target:>10.5f} {rounds:>6d} {states:>18d} {achieved:>10.6f}")
The resource cost of magic state distillation is one of the main drivers of the overhead in fault-tolerant quantum computing. For example, factoring a 2048-bit number using Shor's algorithm might require billions of distilled $T$ states, each requiring ~15 noisy magic states.
9.16 Teleportation in Different Physical Systems
9.16.1 Photonic Teleportation
Photonic teleportation uses photons as the carrier of quantum information. The Bell measurement is performed using beam splitters and polarizing beam splitters, and the entanglement source is typically a spontaneous parametric down-conversion (SPDC) crystal.
Key advantages: - Photons travel at the speed of light through optical fiber - Low decoherence (photons don't easily interact with their environment) - Compatible with existing telecom infrastructure
Key challenges: - No deterministic Bell measurement with linear optics (only 50% success probability) - High photon loss in fiber (0.2 dB/km at telecom wavelengths) - No natural photon-photon interaction (hard to create deterministic entangling gates)
9.16.2 Matter Qubit Teleportation
Matter qubits (trapped ions, superconducting qubits, NV centers) have natural interactions that make deterministic Bell measurements possible:
| Platform | Bell Measurement | Fidelity | Distance | Year |
|---|---|---|---|---|
| Trapped ions (Yb+) | Deterministic | >99% | 1 mm | 2004 |
| Superconducting qubits | Deterministic | ~90% | On-chip | 2016 |
| NV centers (diamond) | Deterministic | ~90% | 3 m | 2013 |
| Atoms (Rb) | Deterministic | ~90% | 0.5 m | 2019 |
The advantage of matter qubits is deterministic operations and long coherence times. The disadvantage is that they're harder to transmit over long distances — you typically need to convert the matter qubit to a photon, send the photon, and convert back.
9.16.3 Hybrid Approaches
The most promising architecture for a quantum internet combines matter qubits (for processing and memory) with photonic qubits (for communication):
Quantum Processor ──── Quantum Transducer ──── Optical Fiber ──── Quantum Transducer ──── Quantum Processor
(NV center/ion) (microwave→optical) (100 km) (optical→microwave) (NV center/ion)
The quantum transducer converts between microwave photons (used by superconducting qubits) and optical photons (used for long-distance communication). This is one of the hardest engineering challenges in quantum networking — current transducers have very low efficiency (<1%).
9.17 Summary: The Teleportation Protocol in Context
Let's place teleportation in the broader context of quantum information:
| Protocol | Consumes | Produces | Key Insight |
|---|---|---|---|
| Teleportation | 1 ebit + 2 cbits | 1 qubit transfer | Entanglement enables state transfer |
| Superdense coding | 1 ebit + 1 qubit | 2 cbits transfer | Entanglement doubles classical capacity |
| QKD (BB84) | 1 qubit per bit | 1 shared secret bit | No-cloning enables secure key |
| QKD (E91) | 1 ebit + classical channel | 1 shared secret bit | Bell violation certifies security |
These four protocols demonstrate that entanglement is a versatile resource that enables tasks impossible in classical information theory. They are the building blocks of the quantum internet.
The key trade-off is: - Teleportation: Uses entanglement to send quantum information - Superdense coding: Uses entanglement to boost classical capacity - QKD: Uses quantum mechanics (with or without entanglement) to guarantee security
All three consume resources (entanglement, classical bits, quantum bits) and produce value (quantum state transfer, classical information, secret keys). Understanding these trade-offs is the foundation of quantum Shannon theory.
9.18 Common Bugs and Debugging Teleportation Circuits
9.18.1 Classical Bit Ordering
One of the most common bugs in teleportation implementations is getting the classical bit ordering wrong. In Qiskit, classical bits are indexed from right to left (little-endian), but the correction logic may assume left-to-right ordering.
Bug: qc.x(qr[2]).c_if(cr[0], 1) applies $X$ when the first classical bit is 1, but the protocol says to apply $X$ when the second measurement outcome is 1.
Fix: Always double-check which classical bit corresponds to which measurement outcome. Use explicit bit indices and verify with a truth table.
9.18.2 Conditional Operations
The c_if method in Qiskit requires careful handling of classical registers:
# CORRECT: Conditional operations for teleportation
# cr[0] = measurement of q0 (Hadamard measurement)
# cr[1] = measurement of q1 (CNOT target measurement)
# Bob applies X if cr[1]=1, Z if cr[0]=1
qc.x(qr[2]).c_if(cr[1], 1) # X if q1 measurement is 1
qc.z(qr[2]).c_if(cr[0], 1) # Z if q0 measurement is 1
# WRONG: Swapping the corrections
# qc.x(qr[2]).c_if(cr[0], 1) # This applies X when q0=1, not q1=1!
# qc.z(qr[2]).c_if(cr[1], 1) # This applies Z when q1=1, not q0=1!
9.18.3 Dynamic Circuit Compatibility
Not all backends support dynamic circuits (circuits with mid-circuit measurements and conditional operations). If you're running on a simulator, use AerSimulator() with shots mode. For hardware, check that the backend supports dynamic circuits.
# Check if backend supports dynamic circuits
from qiskit_ibm_runtime import QiskitRuntimeService
service = QiskitRuntimeService()
backend = service.backend("ibm_brisbane")
print(f"Supports dynamic circuits: {backend.configuration().dynamic_circuits_enabled}")
If dynamic circuits are not supported, you can use post-selection: run the circuit without conditional corrections, then filter the results by measurement outcome.
# Post-selection approach (no dynamic circuits needed)
from qiskit import QuantumCircuit
from qiskit_aer import AerSimulator
qc = QuantumCircuit(3, 3)
# ... prepare and measure ...
# Run without corrections, then post-select
sim = AerSimulator()
result = sim.run(qc, shots=10000).result()
counts = result.get_counts()
# Post-select on measurement outcomes
for outcome, count in sorted(counts.items()):
b0 = int(outcome[2]) # qubit 0 measurement
b1 = int(outcome[1]) # qubit 1 measurement
bob_result = int(outcome[0]) # qubit 2 measurement
# Apply correction
if b1 == 1:
bob_result ^= 1 # X correction
if b0 == 1:
bob_result = bob_result # Z correction (affects phase, not computational basis)
print(f"Outcome {outcome}: Bob's qubit = |{bob_result}⟩")
9.18.4 Global Phase Bugs
When comparing the teleported state to the original state, remember that quantum states are equivalent up to global phase. Two statevectors $|\psi\rangle$ and $e^{i\phi}|\psi\rangle$ represent the same physical state.
from qiskit.quantum_info import Statevector
import numpy as np
# State fidelity accounts for global phase
psi = Statevector([1/np.sqrt(2), 1/np.sqrt(2)]) # |+⟩
psi_phase = Statevector([1/np.sqrt(2)*np.exp(1j*np.pi/3), 1/np.sqrt(2)*np.exp(1j*np.pi/3)])
# These are the same physical state (up to global phase)
print(f"Fidelity: {psi.fidelity(psi_phase):.6f}") # Should be 1.0
# But the statevectors are not equal
print(f"Equal: {np.allclose(psi.data, psi_phase.data)}") # False!
9.19 Teleportation in the Broader Context
9.19.1 Teleportation vs. Classical Communication
| Feature | Classical Communication | Quantum Teleportation |
|---|---|---|
| What is transmitted? | Bits | Quantum state (qubit) |
| Resource needed | Classical channel | Entanglement + classical channel |
| Speed | Up to speed of light | Classical bits at speed of light; entanglement distributed in advance |
| Capacity | 1 bit per bit sent | 1 qubit per 2 cbits + 1 ebit |
| Security | Can be encrypted | Inherently secure (no information leaks during transmission) |
| Error correction | Classical codes | Quantum error correction |
9.19.2 The Quantum Teleportation Channel
If we model teleportation as a quantum channel, it is a depolarizing channel with noise parameter determined by the fidelity of the Bell pair:
$$\mathcal{E}(\rho) = F\rho + \frac{1-F}{3}(X\rho X + Y\rho Y + Z\rho Z)$$
where $F$ is the fidelity of the shared Bell pair. For a perfect Bell pair ($F = 1$), the channel is the identity — perfect teleportation. For $F = 1/2$, the channel is the completely depolarizing channel, which produces the maximally mixed state regardless of input.
9.19.3 Quantum Networks and Teleportation
In a quantum network, teleportation serves as the fundamental data link protocol:
- Link layer: Create and maintain entanglement between adjacent nodes
- Network layer: Route entanglement through the network using entanglement swapping
- Transport layer: Use teleportation to deliver qubits end-to-end
- Application layer: Use the delivered qubits for QKD, distributed computing, etc.
This layered approach mirrors the OSI model of classical networking, with the key difference that the link layer must maintain quantum entanglement rather than classical connectivity.