Quantum computing

Quantum Teleportation Simulator

Choose any qubit state and teleport it: a shared Bell pair, two classical bits and four possible corrections. The simulator runs all four measurement outcomes and shows Bob's qubit matching the original every time.

Real Larzscript running in your browser454 automated checksOpen source · MITNo sign-up · your inputs never leave your device

Choose the state to teleport

State sent (Bloch vector)
—
Worst fidelity of Bob's qubit
—
Probability of each outcome
—

All four measurement outcomes

Show the Larzscript program that just ran
Run a calculation to see the exact program.

This is the real program the page sent to the Larzscript interpreter (compiled to WebAssembly) in your browser. The library it imports is the same code the automated tests check.

The protocol

Alice holds an unknown qubit in state |ψ⟩ = α|0⟩ + β|1⟩. She and Bob share one half each of a Bell pair (|00⟩ + |11⟩)/√2. Alice applies a CNOT from her unknown qubit to her half of the pair, then a Hadamard on the unknown qubit, and measures both qubits, getting two classical bits. Whatever she gets, Bob's qubit is now in one of four states related to |ψ⟩ by a Pauli operation; the two bits tell him which:

bits 00 → do nothing  ·  01 → apply X  ·  10 → apply Z  ·  11 → apply Z·X

After the correction Bob's qubit is exactly |ψ⟩.

Worked example, computed above

The state at θ = 70°, φ = 120° is the point (-0.46984631, 0.81379768, 0.34202014) on the Bloch sphere. For each of the four measurement results the simulator forces that outcome, applies Bob's correction and reads the Bloch vector of qubit 2: it is (-0.46984631, 0.81379768, 0.34202014) every time, with fidelity 1.000000000000.

What is verified

The library's test suite teleports six states — including both poles and arbitrary angles — for all four outcomes and requires a fidelity of 1 to within 10−12, and separately with a genuine random measurement.

Limits: ideal qubits and a perfect Bell pair. In experiments, teleportation fidelity is limited by imperfect entanglement, gates and detectors. Outcomes are forced one at a time here (each has probability 1/4) so that all four can be shown together.

Frequently asked questions

What is quantum teleportation?

A protocol that transfers an unknown quantum state from one qubit to another far away, using a shared entangled pair and two ordinary classical bits. The state is destroyed at the sender and appears at the receiver; nothing physical (no matter, no energy) is moved along the way.

Does teleportation allow faster-than-light communication?

No. Alice must send her two measurement bits to Bob by ordinary means, and until they arrive Bob's qubit is in a completely random-looking state — he cannot extract any information. Every one of the four possible outcomes happens with probability exactly 1/4, independent of the state being sent.

Why is the fidelity always exactly 1?

Because each of the four outcomes corresponds to a known correction (nothing, X, Z, or both) that turns Bob's qubit into a perfect copy of the original. This page checks all four outcomes for the state you choose; the fidelity printed is the overlap between Bob's corrected qubit and the input, 1.000000000000 up to 12 digits.

Does this violate the no-cloning theorem?

No. The original qubit is destroyed by Alice's measurement, so there is only ever one copy of the state. Teleportation moves a state; it cannot copy one.

What is the Bloch sphere?

A way to picture the state of one qubit as a point on a unit sphere. The polar angle θ sets how much of the state is |0⟩ versus |1⟩ and the azimuthal angle φ sets the relative phase. The page reports that point as a vector (x, y, z) before and after teleportation.

Every number on this page is computed by the open-source larzscript-cosmos library (qalgo, quantum, physmath), written in Larzscript, and checked against independent references in its test suite. How it is verified →

All physics calculators → · Science calculators hub · Chemistry calculators →