Algorithm

Quantum Teleportation

Problem: transfer an unknown quantum state using entanglement plus classical measurement results.

Run in Simulator

Expected output

AlicebitsBob

This sample demonstrates the structure: EPR pair, Bell measurement, and a simplified recovery step.

Core intuition

The state is not copied; the original is consumed while Bob's qubit is corrected.

Visual circuit

Prepare an EPR pair, entangle the message with Alice's qubit, then measure.

Significance

Teleportation is foundational for quantum networking and repeaters.

Limit

The current DSL has no classical conditional gate syntax, so this is an educational simplification.

Circuit DSL

# Teleportation (alice->bob)
qubits 3
# q0 = message, q1 = alice, q2 = bob
H 1
CX 1 2
CX 0 1
H 0
MEASURE 0
MEASURE 1
# Bob recovers (simplified):
CX 1 2
MEASURE 2

Challenge

What is required along with entanglement?