Skip to main content
KetQat

Appearance

Quantum teleportation (statevector)

Teleport a chosen or random qubit state through a Bell pair and verify unit fidelity on every measurement outcome.

Officially provided by KetQat — method by Bennett et al. (1993), Bouwmeester et al. (1997) and others. KetQat prepares, verifies and maintains this product; it does not claim to have invented the method. Read the origin statement.

What it does and who it is for

Runs the teleportation protocol of Bennett, Brassard, Crepeau, Jozsa, Peres and Wootters as an exact three-qubit statevector simulation on your machine. Alice holds the message qubit and one half of a Bell pair |Phi+>, Bob the other half. Alice applies CNOT and Hadamard and measures both qubits; Bob applies X and/or Z according to her two bits. The product projects out all four measurement outcomes analytically and reports, for each, its exact probability (1/4 regardless of the input), the correction Bob applies, the fidelity of his qubit with the input after the correction, and the fidelity he would have had without it. Shots then sample which outcome occurred, with a seed.

The input state is a point on the Bloch sphere you choose (theta, phi) or a Haar-random pure state drawn from the seed. Because every branch is computed exactly, the statement that the fidelity is 1 covers all four outcomes, not only the ones a sampler visited.

Use cases

  • Show that teleportation reproduces an arbitrary qubit state with fidelity 1 on every measurement outcome
  • See why Bob's classical-bit-conditioned corrections are necessary: without them the average fidelity is 1/2
  • Check that the two measurement bits carry no information about the state (each outcome has probability exactly 1/4)

Use it on your computer

This page never runs anything. Copy the commands into your own terminal; the product runs locally with no account and no telemetry.
  1. Install

    Installs the KetQat SDK from commit 2cedabbd814f, the exact version whose product definition this page shows. The SDK is not on PyPI yet, so pip install ketqat alone will not work.

    Terminal
    pip install "ketqat[algorithms] @ git+https://github.com/ketqat/ketqat-sdk@2cedabbd814fd199b1989c8ceb1e9efa1744c2c0#subdirectory=python"
  2. Run the example

    Save it as example.py and run python example.py. Or use the CLI: ketqat catalog run [email protected].

    Python
    import json
    from ketqat_runner import catalog
    
    record = catalog.run("[email protected]", seed=7, theta=1.0, phi=0.5, shots=1000)
    result = record.result
    print(json.dumps({
        "status": record.status,
        "min_fidelity": round(result["min_fidelity"], 9),
        "average_fidelity_without_correction": round(result["average_fidelity_without_correction"], 9),
        "outcome_probabilities": [round(branch["probability"], 9) for branch in result["branches"]],
        "total_counts": sum(result["counts"].values()),
    }))
    
    Expected output (fields the example must print)
    {
      "status": "succeeded",
      "min_fidelity": 1,
      "total_counts": 1000,
      "outcome_probabilities": [
        0.25,
        0.25,
        0.25,
        0.25
      ],
      "average_fidelity_without_correction": 0.5
    }

    Verified with

    SDK
    0.3.0
    Python
    3.12.12
    Platform
    macOS-27.0.1-arm64 Python 3.12.12 (maintainer run in a clean virtualenv, test_catalog_examples.py)
    Date
    1 Nov 2026
  3. Optional: tell us it ran

    ketqat report RUN_ID sends an opt-in usage report: product, version, succeeded/failed, time and SDK version only. It shows you the exact payload first and needs an API token from Settings. Nothing is sent unless you run it.

Inputs and outputs

Inputs

Inputs of Quantum teleportation (statevector)
NameTypeDefaultAllowed valuesDescription
thetanumbernullmaximum: 3.141592653589793; minimum: 0Polar angle of the input state cos(theta/2)|0> + exp(i phi) sin(theta/2)|1>, in [0, pi]. null together with phi means a Haar-random state drawn from the seed.
phinumbernullmaximum: 6.283185307179586; minimum: 0Azimuthal angle in [0, 2 pi]. Give both theta and phi, or neither.
shotsinteger1000maximum: 1000000; minimum: 1Number of sampled runs of the protocol; only which outcome occurred is sampled.

Outputs

Outputs of Quantum teleportation (statevector)
NameTypeDescription
branchesobject[]For each outcome m0 m1: its exact probability, Bob's correction, the fidelity with the input after correction and without it.
min_fidelitynumberSmallest fidelity over the four outcomes after correction (1 for a correct protocol).
average_fidelity_without_correctionnumberProbability-weighted fidelity if Bob applied nothing (1/2 for any pure input).
input_stateobjectThe teleported state: source, theta, phi, Bloch vector and amplitudes.
countsobjectSeeded counts of the four outcomes, with observed_frequencies beside the expected 0.25.

Sample result

Seeded random input state (theta 2.574, phi 0.319): every one of the four outcomes has probability 0.25 and fidelity 1 after Bob's correction; without the correction the fidelities are 1, 0.261, 0.711 and 0.028, averaging exactly 0.5. Seeded counts 252/246/260/242 over 1000 shots.

Generated with

Product version
1.0.0
Seed
7
Parameters
{"phi":null,"shots":1000,"theta":null}
SDK
0.3.0
Python
3.12.12
Platform
macOS-27.0.1-arm64-arm-64bit
Result data (JSON)
{
  "shots": 1000,
  "counts": {
    "10": 260,
    "11": 242,
    "00": 252,
    "01": 246
  },
  "branches": [
    {
      "outcome": "00",
      "fidelity": 1,
      "correction": "none",
      "probability": 0.25,
      "fidelity_without_correction": 1
    },
    {
      "outcome": "01",
      "fidelity": 1,
      "correction": "X",
      "probability": 0.25,
      "fidelity_without_correction": 0.260815699353
    },
    {
      "outcome": "10",
      "fidelity": 1,
      "correction": "Z",
      "probability": 0.25,
      "fidelity_without_correction": 0.710702009622
    },
    {
      "outcome": "11",
      "fidelity": 1,
      "correction": "X then Z",
      "probability": 0.25,
      "fidelity_without_correction": 0.028482291026
    }
  ],
  "protocol": "Alice: CNOT(message -> her Bell half), H(message), measure both; Bob: X if Alice's bit is 1, then Z if the message bit is 1",
  "bell_pair": "|Phi+> = (|00> + |11>)/sqrt(2)",
  "execution": "exact three-qubit statevector simulation; shots sample only which measurement outcome occurred",
  "input_state": {
    "phi": 0.319163492968,
    "theta": 2.573690971434,
    "source": "random (Haar-distributed pure state drawn from the seed)",
    "amplitudes": [
      [
        0.280150459155,
        0
      ],
      [
        0.911476614305,
        0.301207738629
      ]
    ],
    "bloch_vector": [
      0.510701184013,
      0.168766972556,
      -0.843031440471
    ]
  },
  "qubit_order": "qubit 0 message, qubit 1 Alice's half, qubit 2 Bob's half (little-endian)",
  "max_fidelity": 1,
  "min_fidelity": 1,
  "outcome_labels": "m0 m1: m0 is the message qubit's bit after the Hadamard (controls Z), m1 is Alice's half of the pair (controls X)",
  "observed_frequencies": {
    "10": 0.26,
    "11": 0.242,
    "00": 0.252,
    "01": 0.246
  },
  "expected_outcome_probability": 0.25,
  "average_fidelity_without_correction": 0.5
}

Assumptions, scope and limitations

Assumptions

  • Ideal, noiseless gates, a perfect Bell pair |Phi+> = (|00> + |11>)/sqrt 2, and projective measurements with the standard Born rule.
  • Pure single-qubit input states; mixed inputs are not accepted.
  • Qubit order is little-endian: qubit 0 is the message, qubit 1 Alice's half of the pair, qubit 2 Bob's; the outcome label m0 m1 lists the message bit (after the Hadamard, controlling Z) then Alice's half (controlling X).

Scope

  • Any pure qubit state given by Bloch angles or drawn Haar-randomly from the seed.
  • Exact probabilities and fidelities for all four outcomes, plus seeded sampling of which outcome occurred.

Limitations

  • No noise, no imperfect Bell pair and no classical-channel delay are modelled, so the unit fidelity is the ideal protocol's, not a device's.
  • Only the protocol's state transfer is simulated; the physical resources (entanglement distribution, two classical bits) are described, not costed.
  • Sampled counts are reproducible for the same seed with the same NumPy version; NumPy does not guarantee identical random streams across versions.
  • Tested on macOS and Linux only; Windows is untested.

Environment and resources

Runs
Locally, on your computer
Type
Simulation
Python
>=3.10
Operating systems
Linux, macOS
Resources
Milliseconds and a few MB for any input: the state has eight amplitudes and the sampling is one multinomial draw.
SDK extras
algorithms
Minimum SDK
0.3.0

Validation

Verified: the example was executed by CI, validation tests exist and limitations are recorded.

Versions and changelog

  1. 1.0.01 Nov 2026currentShown on this page

    • First catalog release: NumPy three-qubit statevector teleportation with exact per-outcome fidelities and seeded outcome sampling.

    Needs SDK 0.3.0 or later with extras: algorithms.

All product changelogs

Origin, license and credits

KetQat implementation of published methods

Quantum teleportation was invented by Bennett, Brassard, Crepeau, Jozsa, Peres and Wootters (1993) and first demonstrated experimentally by Bouwmeester et al. (1997). KetQat wrote this NumPy statevector implementation (teleportation.py), its exact per-branch analysis, the validation tests and this catalog entry. KetQat did not invent the method.

Upstream software

License of what you receive

Apache-2.0 — see Licensing.

Contributors

People credited for this product. KetQat publishes and maintains it; contributors are credited for their work and are not sellers.

  • dorakingx · KetQat maintainer: implementation, validation and catalog entry

How to contribute

References

  1. Charles H. Bennett, Gilles Brassard, Claude Crepeau, Richard Jozsa, Asher Peres, William K. Wootters (1993). Teleporting an unknown quantum state via dual classical and Einstein-Podolsky-Rosen channels. Physical Review Letters 70, 1895-1899.DOI 10.1103/PhysRevLett.70.1895
  2. Dik Bouwmeester, Jian-Wei Pan, Klaus Mattle, Manfred Eibl, Harald Weinfurter, Anton Zeilinger (1997). Experimental quantum teleportation. Nature 390, 575-579.DOI 10.1038/37539
  3. Michael A. Nielsen, Isaac L. Chuang (2010). Quantum Computation and Quantum Information: 10th Anniversary Edition. Cambridge University Press.DOI 10.1017/CBO9780511976667

Usage

No usage reports yet

Distinct signed-in accounts that chose to send at least one usage report (ketqat report) for this product in the last 90 days. KetQat staff, test and bot accounts are excluded. Reports are opt-in, so this is not a count of all users.

Computed 10 Nov 2026, 17:34 UTC.

Reviews

Not yet rated

Be the first to rate this product after you run it.

Mean of visible reviews. Hidden reviews and reviews by KetQat staff, test and bot accounts are excluded. Pro status gives no extra weight.

Sign in to review this product. One review per person; you can edit it later.

No reviews yet.