deskmerc/ quantum

Entanglement / FEZ

Quantum Field Report

Teleporting six input states

Test state transfer along all three axes of the Bloch sphere.

IBM job ID
dbvoo0ts2omc73888ang
Submitted
19 Nov 2026 · 17:53 CST
QPU charge
3 seconds
Backend
ibm_fez
Sampling
256 shots per recorded setting/case
Provenance
Quantum Field Report, page 5.

The question

Test state transfer along all three axes of the Bloch sphere.

Circuit & method

Use physical qubits 24, 23 and 22. Alice measures the input and her Bell-pair half; Bob applies classical-bit-dependent X and Z corrections. Read the output in the preparation basis for ±Z, ±X and ±Y.

PrepareState, codeword or problem instance
Run on FezRecorded physical circuit and settings
Measure & checkCounts, decoding and classical verification

Results

Bob passed 1,457/1,536 checks (94.9%), with 239–247 correct shots out of 256 for each state. Ideal simulation passed all checks.

Measured outcomesAll-shot success; each bar runs from 0% to 100%.
+Z244/256 · 95.3%
-Z247/256 · 96.5%
+X244/256 · 95.3%
-X239/256 · 93.4%
+Y239/256 · 93.4%
-Y244/256 · 95.3%

What this supports

The six prepared states sample the three axes; this reported pass rate is not a full process-tomography estimate. Classical feedforward is part of teleportation.

Percentages are rounded for reading. The original integer counts, physical layouts, settings and available uncertainty calculations remain in the records below. Sampling intervals do not account for drift or every systematic error.

Full experiment record

Every top-level field from the primary hardware JSON is reproduced below, including the complete saved measurement distributions where present. Field names and outcome strings retain their original order and spelling.

backend
ibm_fez
layout_input_alice_bob
[
  24,
  23,
  22
]
state_order
[
  "+Z",
  "-Z",
  "+X",
  "-X",
  "+Y",
  "-Y"
]
shots_per_state
256
job_tag
fez-teleportation-24-23-22-20261119
sampler_options
{
  "environment": {
    "job_tags": [
      "fez-teleportation-24-23-22-20261119"
    ]
  },
  "twirling": {
    "enable_gates": false,
    "enable_measure": false
  },
  "dynamical_decoupling": {
    "enable": false
  }
}
versions
{
  "qiskit": "2.6.2",
  "qiskit-ibm-runtime": "0.52.1"
}
created_utc
2026-11-19T23:53:35.973091+00:00
calibration_updated
2026-11-19 14:38:27-06:00
status_at_submission
{
  "backend_name": "ibm_fez",
  "backend_version": "",
  "operational": true,
  "pending_jobs": 19,
  "status_msg": "active"
}
stage
done
compiled_circuits
{
  "+Z": "global phase: 3π/2\n          ┌─────────┐┌────┐┌─────────┐   ┌─────────┐┌────┐┌─────────┐ ░                                                                                        ┌────── ┌───┐ ───────┐ ┌────── ┌───────┐ ───────┐  ░ ┌─┐\nq_2 -> 22 ┤ Rz(π/2) ├┤ √X ├┤ Rz(π/2) ├─■─┤ Rz(π/2) ├┤ √X ├┤ Rz(π/2) ├─░────────────────────────────────────────────────────────────────────────────────────────┤ If-0  ┤ X ├  End-0 ├─┤ If-0  ┤ Rz(π) ├  End-0 ├──░─┤M├\n          ├─────────┤├────┤├─────────┤ │ └─────────┘└────┘└─────────┘ ░ ┌─────────┐┌────┐┌─────────┐   ┌─────────┐┌────┐┌─────────┐              ┌────────────┐└──╥─── └───┘ ───────┘ └──╥─── └───────┘ ───────┘  ░ └╥┘\nq_1 -> 23 ┤ Rz(π/2) ├┤ √X ├┤ Rz(π/2) ├─■──────────────────────────────░─┤ Rz(π/2) ├┤ √X ├┤ Rz(π/2) ├─■─┤ Rz(π/2) ├┤ √X ├┤ Rz(π/2) ├──────────────┤0           ├───╫──────────────────────╫────────────────────────░──╫─\n          └─────────┘└────┘└─────────┘                                ░ └─────────┘└────┘└─────────┘ │ ├─────────┤├────┤├─────────┤┌────────────┐│            │   ║                      ║                        ░  ║ \nq_0 -> 24 ────────────────────────────────────────────────────────────░──────────────────────────────■─┤ Rz(π/2) ├┤ √X ├┤ Rz(π/2) ├┤0           ├┤            ├───╫──────────────────────╫────────────────────────░──╫─\n                                                                      ░                                └─────────┘└────┘└─────────┘│  Measure_2 ││  Measure_2 │   ║                      ║                        ░  ║ \n     c_0: ═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╡0           ╞╡            ╞═══╬══════════════════════■═══════════════════════════╬═\n                                                                                                                                   └────────────┘│            │   ║                                                  ║ \n     c_1: ═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╡0           ╞═══■══════════════════════════════════════════════════╬═\n                                                                                                                                                 └────────────┘                                                      ║ \n     c_2: ═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╩═\n                                                                                                                                                                                                                       ",
  "-Z": "global phase: 3π/2\n          ┌─────────┐┌────┐┌─────────┐   ┌─────────┐┌────┐┌─────────┐ ░                                                                                        ┌────── ┌───┐ ───────┐ ┌────── ┌───────┐ ───────┐  ░ ┌─┐\nq_2 -> 22 ┤ Rz(π/2) ├┤ √X ├┤ Rz(π/2) ├─■─┤ Rz(π/2) ├┤ √X ├┤ Rz(π/2) ├─░────────────────────────────────────────────────────────────────────────────────────────┤ If-0  ┤ X ├  End-0 ├─┤ If-0  ┤ Rz(π) ├  End-0 ├──░─┤M├\n          ├─────────┤├────┤├─────────┤ │ └─────────┘└────┘└─────────┘ ░ ┌─────────┐┌────┐┌─────────┐   ┌─────────┐┌────┐┌─────────┐              ┌────────────┐└──╥─── └───┘ ───────┘ └──╥─── └───────┘ ───────┘  ░ └╥┘\nq_1 -> 23 ┤ Rz(π/2) ├┤ √X ├┤ Rz(π/2) ├─■──────────────────────────────░─┤ Rz(π/2) ├┤ √X ├┤ Rz(π/2) ├─■─┤ Rz(π/2) ├┤ √X ├┤ Rz(π/2) ├──────────────┤0           ├───╫──────────────────────╫────────────────────────░──╫─\n          └──┬───┬──┘└────┘└─────────┘                                ░ └─────────┘└────┘└─────────┘ │ ├─────────┤├────┤├─────────┤┌────────────┐│            │   ║                      ║                        ░  ║ \nq_0 -> 24 ───┤ X ├────────────────────────────────────────────────────░──────────────────────────────■─┤ Rz(π/2) ├┤ √X ├┤ Rz(π/2) ├┤0           ├┤            ├───╫──────────────────────╫────────────────────────░──╫─\n             └───┘                                                    ░                                └─────────┘└────┘└─────────┘│  Measure_2 ││  Measure_2 │   ║                      ║                        ░  ║ \n     c_0: ═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╡0           ╞╡            ╞═══╬══════════════════════■═══════════════════════════╬═\n                                                                                                                                   └────────────┘│            │   ║                                                  ║ \n     c_1: ═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╡0           ╞═══■══════════════════════════════════════════════════╬═\n                                                                                                                                                 └────────────┘                                                      ║ \n     c_2: ═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╩═\n                                                                                                                                                                                                                       ",
  "+X": "global phase: 0\n          ┌─────────┐┌────┐┌─────────┐   ┌─────────┐┌────┐┌─────────┐ ░                                                                                        ┌────── ┌───┐ ───────┐ ┌────── ┌───────┐ ───────┐  ░ ┌─────────┐┌────┐┌─────────┐┌─┐\nq_2 -> 22 ┤ Rz(π/2) ├┤ √X ├┤ Rz(π/2) ├─■─┤ Rz(π/2) ├┤ √X ├┤ Rz(π/2) ├─░────────────────────────────────────────────────────────────────────────────────────────┤ If-0  ┤ X ├  End-0 ├─┤ If-0  ┤ Rz(π) ├  End-0 ├──░─┤ Rz(π/2) ├┤ √X ├┤ Rz(π/2) ├┤M├\n          ├─────────┤├────┤├─────────┤ │ └─────────┘└────┘└─────────┘ ░ ┌─────────┐┌────┐┌─────────┐   ┌─────────┐┌────┐┌─────────┐              ┌────────────┐└──╥─── └───┘ ───────┘ └──╥─── └───────┘ ───────┘  ░ └─────────┘└────┘└─────────┘└╥┘\nq_1 -> 23 ┤ Rz(π/2) ├┤ √X ├┤ Rz(π/2) ├─■──────────────────────────────░─┤ Rz(π/2) ├┤ √X ├┤ Rz(π/2) ├─■─┤ Rz(π/2) ├┤ √X ├┤ Rz(π/2) ├──────────────┤0           ├───╫──────────────────────╫────────────────────────░──────────────────────────────╫─\n          ├─────────┤├────┤├─────────┤                                ░ └─────────┘└────┘└─────────┘ │ ├─────────┤├────┤├─────────┤┌────────────┐│            │   ║                      ║                        ░                              ║ \nq_0 -> 24 ┤ Rz(π/2) ├┤ √X ├┤ Rz(π/2) ├────────────────────────────────░──────────────────────────────■─┤ Rz(π/2) ├┤ √X ├┤ Rz(π/2) ├┤0           ├┤            ├───╫──────────────────────╫────────────────────────░──────────────────────────────╫─\n          └─────────┘└────┘└─────────┘                                ░                                └─────────┘└────┘└─────────┘│  Measure_2 ││  Measure_2 │   ║                      ║                        ░                              ║ \n     c_0: ═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╡0           ╞╡            ╞═══╬══════════════════════■═══════════════════════════════════════════════════════╬═\n                                                                                                                                   └────────────┘│            │   ║                                                                              ║ \n     c_1: ═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╡0           ╞═══■══════════════════════════════════════════════════════════════════════════════╬═\n                                                                                                                                                 └────────────┘                                                                                  ║ \n     c_2: ═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╩═\n                                                                                                                                                                                                                                                   ",
  "-X": "global phase: 0\n          ┌─────────┐   ┌────┐  ┌─────────┐           ┌─────────┐┌────┐┌─────────┐ ░                                                                                        ┌────── ┌───┐ ───────┐ ┌────── ┌───────┐ ───────┐  ░ ┌─────────┐┌────┐┌─────────┐┌─┐\nq_2 -> 22 ┤ Rz(π/2) ├───┤ √X ├──┤ Rz(π/2) ├─────■─────┤ Rz(π/2) ├┤ √X ├┤ Rz(π/2) ├─░────────────────────────────────────────────────────────────────────────────────────────┤ If-0  ┤ X ├  End-0 ├─┤ If-0  ┤ Rz(π) ├  End-0 ├──░─┤ Rz(π/2) ├┤ √X ├┤ Rz(π/2) ├┤M├\n          ├─────────┤   ├────┤  ├─────────┤     │     └─────────┘└────┘└─────────┘ ░ ┌─────────┐┌────┐┌─────────┐   ┌─────────┐┌────┐┌─────────┐              ┌────────────┐└──╥─── └───┘ ───────┘ └──╥─── └───────┘ ───────┘  ░ └─────────┘└────┘└─────────┘└╥┘\nq_1 -> 23 ┤ Rz(π/2) ├───┤ √X ├──┤ Rz(π/2) ├─────■──────────────────────────────────░─┤ Rz(π/2) ├┤ √X ├┤ Rz(π/2) ├─■─┤ Rz(π/2) ├┤ √X ├┤ Rz(π/2) ├──────────────┤0           ├───╫──────────────────────╫────────────────────────░──────────────────────────────╫─\n          └──┬───┬──┘┌──┴────┴─┐└──┬────┬─┘┌─────────┐                             ░ └─────────┘└────┘└─────────┘ │ ├─────────┤├────┤├─────────┤┌────────────┐│            │   ║                      ║                        ░                              ║ \nq_0 -> 24 ───┤ X ├───┤ Rz(π/2) ├───┤ √X ├──┤ Rz(π/2) ├─────────────────────────────░──────────────────────────────■─┤ Rz(π/2) ├┤ √X ├┤ Rz(π/2) ├┤0           ├┤            ├───╫──────────────────────╫────────────────────────░──────────────────────────────╫─\n             └───┘   └─────────┘   └────┘  └─────────┘                             ░                                └─────────┘└────┘└─────────┘│  Measure_2 ││  Measure_2 │   ║                      ║                        ░                              ║ \n     c_0: ══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╡0           ╞╡            ╞═══╬══════════════════════■═══════════════════════════════════════════════════════╬═\n                                                                                                                                                └────────────┘│            │   ║                                                                              ║ \n     c_1: ════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╡0           ╞═══■══════════════════════════════════════════════════════════════════════════════╬═\n                                                                                                                                                              └────────────┘                                                                                  ║ \n     c_2: ════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╩═\n                                                                                                                                                                                                                                                                ",
  "+Y": "global phase: 0\n          ┌─────────┐┌────┐┌─────────┐           ┌─────────┐┌────┐┌─────────┐ ░                                                                                        ┌────── ┌───┐ ───────┐ ┌────── ┌───────┐ ───────┐  ░ ┌──────────┐┌─────────┐┌────┐┌─────────┐┌─┐\nq_2 -> 22 ┤ Rz(π/2) ├┤ √X ├┤ Rz(π/2) ├─────■─────┤ Rz(π/2) ├┤ √X ├┤ Rz(π/2) ├─░────────────────────────────────────────────────────────────────────────────────────────┤ If-0  ┤ X ├  End-0 ├─┤ If-0  ┤ Rz(π) ├  End-0 ├──░─┤ Rz(-π/2) ├┤ Rz(π/2) ├┤ √X ├┤ Rz(π/2) ├┤M├\n          ├─────────┤├────┤├─────────┤     │     └─────────┘└────┘└─────────┘ ░ ┌─────────┐┌────┐┌─────────┐   ┌─────────┐┌────┐┌─────────┐              ┌────────────┐└──╥─── └───┘ ───────┘ └──╥─── └───────┘ ───────┘  ░ └──────────┘└─────────┘└────┘└─────────┘└╥┘\nq_1 -> 23 ┤ Rz(π/2) ├┤ √X ├┤ Rz(π/2) ├─────■──────────────────────────────────░─┤ Rz(π/2) ├┤ √X ├┤ Rz(π/2) ├─■─┤ Rz(π/2) ├┤ √X ├┤ Rz(π/2) ├──────────────┤0           ├───╫──────────────────────╫────────────────────────░──────────────────────────────────────────╫─\n          ├─────────┤├────┤├─────────┤┌─────────┐                             ░ └─────────┘└────┘└─────────┘ │ ├─────────┤├────┤├─────────┤┌────────────┐│            │   ║                      ║                        ░                                          ║ \nq_0 -> 24 ┤ Rz(π/2) ├┤ √X ├┤ Rz(π/2) ├┤ Rz(π/2) ├─────────────────────────────░──────────────────────────────■─┤ Rz(π/2) ├┤ √X ├┤ Rz(π/2) ├┤0           ├┤            ├───╫──────────────────────╫────────────────────────░──────────────────────────────────────────╫─\n          └─────────┘└────┘└─────────┘└─────────┘                             ░                                └─────────┘└────┘└─────────┘│  Measure_2 ││  Measure_2 │   ║                      ║                        ░                                          ║ \n     c_0: ═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╡0           ╞╡            ╞═══╬══════════════════════■═══════════════════════════════════════════════════════════════════╬═\n                                                                                                                                           └────────────┘│            │   ║                                                                                          ║ \n     c_1: ═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╡0           ╞═══■══════════════════════════════════════════════════════════════════════════════════════════╬═\n                                                                                                                                                         └────────────┘                                                                                              ║ \n     c_2: ═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╩═\n                                                                                                                                                                                                                                                                       ",
  "-Y": "global phase: 0\n          ┌─────────┐   ┌────┐  ┌─────────┐           ┌─────────┐┌────┐┌─────────┐ ░                                                                                        ┌────── ┌───┐ ───────┐ ┌────── ┌───────┐ ───────┐  ░ ┌──────────┐┌─────────┐┌────┐┌─────────┐┌─┐\nq_2 -> 22 ┤ Rz(π/2) ├───┤ √X ├──┤ Rz(π/2) ├─────■─────┤ Rz(π/2) ├┤ √X ├┤ Rz(π/2) ├─░────────────────────────────────────────────────────────────────────────────────────────┤ If-0  ┤ X ├  End-0 ├─┤ If-0  ┤ Rz(π) ├  End-0 ├──░─┤ Rz(-π/2) ├┤ Rz(π/2) ├┤ √X ├┤ Rz(π/2) ├┤M├\n          ├─────────┤   ├────┤  ├─────────┤     │     └─────────┘└────┘└─────────┘ ░ ┌─────────┐┌────┐┌─────────┐   ┌─────────┐┌────┐┌─────────┐              ┌────────────┐└──╥─── └───┘ ───────┘ └──╥─── └───────┘ ───────┘  ░ └──────────┘└─────────┘└────┘└─────────┘└╥┘\nq_1 -> 23 ┤ Rz(π/2) ├───┤ √X ├──┤ Rz(π/2) ├─────■──────────────────────────────────░─┤ Rz(π/2) ├┤ √X ├┤ Rz(π/2) ├─■─┤ Rz(π/2) ├┤ √X ├┤ Rz(π/2) ├──────────────┤0           ├───╫──────────────────────╫────────────────────────░──────────────────────────────────────────╫─\n          └──┬───┬──┘┌──┴────┴─┐└──┬────┬─┘┌─────────┐┌─────────┐                  ░ └─────────┘└────┘└─────────┘ │ ├─────────┤├────┤├─────────┤┌────────────┐│            │   ║                      ║                        ░                                          ║ \nq_0 -> 24 ───┤ X ├───┤ Rz(π/2) ├───┤ √X ├──┤ Rz(π/2) ├┤ Rz(π/2) ├──────────────────░──────────────────────────────■─┤ Rz(π/2) ├┤ √X ├┤ Rz(π/2) ├┤0           ├┤            ├───╫──────────────────────╫────────────────────────░──────────────────────────────────────────╫─\n             └───┘   └─────────┘   └────┘  └─────────┘└─────────┘                  ░                                └─────────┘└────┘└─────────┘│  Measure_2 ││  Measure_2 │   ║                      ║                        ░                                          ║ \n     c_0: ══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╡0           ╞╡            ╞═══╬══════════════════════■═══════════════════════════════════════════════════════════════════╬═\n                                                                                                                                                └────────────┘│            │   ║                                                                                          ║ \n     c_1: ════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╡0           ╞═══■══════════════════════════════════════════════════════════════════════════════════════════╬═\n                                                                                                                                                              └────────────┘                                                                                              ║ \n     c_2: ════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╩═\n                                                                                                                                                                                                                                                                            "
}
job_id
dbvoo0ts2omc73888ang
joint_counts
{
  "+Z": {
    "000": 57,
    "001": 69,
    "010": 68,
    "011": 50,
    "100": 1,
    "101": 1,
    "110": 3,
    "111": 7
  },
  "-Z": {
    "000": 4,
    "001": 0,
    "010": 2,
    "011": 3,
    "100": 51,
    "101": 64,
    "110": 64,
    "111": 68
  },
  "+X": {
    "000": 62,
    "001": 64,
    "010": 56,
    "011": 62,
    "100": 6,
    "101": 4,
    "110": 2,
    "111": 0
  },
  "-X": {
    "000": 6,
    "001": 7,
    "010": 3,
    "011": 1,
    "100": 70,
    "101": 53,
    "110": 53,
    "111": 63
  },
  "+Y": {
    "000": 57,
    "001": 55,
    "010": 75,
    "011": 52,
    "100": 5,
    "101": 3,
    "110": 7,
    "111": 2
  },
  "-Y": {
    "000": 1,
    "001": 5,
    "010": 5,
    "011": 1,
    "100": 46,
    "101": 61,
    "110": 77,
    "111": 60
  }
}
correct_by_state
{
  "+Z": 244,
  "-Z": 247,
  "+X": 244,
  "-X": 239,
  "+Y": 239,
  "-Y": 244
}
correct
1457
total
1536
bit_order
c2 c1 c0 = Bob verification, Alice X correction flag, Alice Z correction flag
metrics
{
  "caller": "qiskit",
  "qiskit_version": "qiskit_ibm_runtime-0.52.1,qiskit-2.6.2*,qiskit_aer-0.17.2*",
  "timestamps": {
    "created": "2026-11-19T23:53:39.04563Z",
    "finished": "2026-11-19T23:54:12.019841Z",
    "running": "2026-11-19T23:53:40.13082Z"
  },
  "usage": {
    "qpu_charge_time_seconds": 3,
    "value": 0.035207,
    "unit": "resource_units",
    "status": "complete",
    "details": [
      {
        "value": 0.035207,
        "unit": "resource_units",
        "metric": {
          "id": "caffe3ca-729c-5750-8777-df63bbf8bfd9",
          "value": 3
        }
      }
    ]
  },
  "circuits_execution_time_ns": 400354048
}

Simulation & checks

These are the supplied simulator records and their preserved variants. Their model, seed, settings and results appear exactly as saved. Shared simulator references on fresh-map pages describe the ideal graph protocol, rather than a new hardware-matched calibration.

field-report/outputs/Teleportation-simulator.json · full record
{
  "joint_counts": {
    "+Z": {
      "000": 67,
      "001": 67,
      "010": 68,
      "011": 54,
      "100": 0,
      "101": 0,
      "110": 0,
      "111": 0
    },
    "-Z": {
      "000": 0,
      "001": 0,
      "010": 0,
      "011": 0,
      "100": 66,
      "101": 61,
      "110": 58,
      "111": 71
    },
    "+X": {
      "000": 67,
      "001": 70,
      "010": 53,
      "011": 66,
      "100": 0,
      "101": 0,
      "110": 0,
      "111": 0
    },
    "-X": {
      "000": 0,
      "001": 0,
      "010": 0,
      "011": 0,
      "100": 55,
      "101": 71,
      "110": 70,
      "111": 60
    },
    "+Y": {
      "000": 57,
      "001": 63,
      "010": 65,
      "011": 71,
      "100": 0,
      "101": 0,
      "110": 0,
      "111": 0
    },
    "-Y": {
      "000": 0,
      "001": 0,
      "010": 0,
      "011": 0,
      "100": 71,
      "101": 57,
      "110": 63,
      "111": 65
    }
  },
  "correct_by_state": {
    "+Z": 256,
    "-Z": 256,
    "+X": 256,
    "-X": 256,
    "+Y": 256,
    "-Y": 256
  },
  "correct": 1536,
  "total": 1536,
  "shots_per_state": 256,
  "bit_order": "c2 c1 c0 = Bob verification, Alice X correction flag, Alice Z correction flag",
  "simulator": "Qiskit Aer stabilizer",
  "seed": 242322,
  "versions": {
    "qiskit": "2.6.2",
    "qiskit-aer": "0.17.2"
  }
}

Source code

Original experiment and verification programs are preserved byte for byte. These are historical listings; dependencies, authentication prompts and machine-specific input paths may need adjustment before a rerun.

field-report/outputs/fez_teleportation.py · complete source
"""Six-state teleportation: ideal dynamic simulation and one resumable Fez job."""

import getpass
import json
import logging
import sys
import time
import traceback
from datetime import datetime, timezone
from importlib.metadata import version
from pathlib import Path

from qiskit import QuantumCircuit
from qiskit.transpiler import generate_preset_pass_manager
from qiskit_aer import AerSimulator
from qiskit_ibm_runtime import QiskitRuntimeService, SamplerV2
from qiskit_ibm_runtime.circuit import MidCircuitMeasure

ROOT = Path(__file__).resolve().parent
LOCAL = ROOT / "Teleportation-simulator.json"
RESULT = ROOT / "Fez-teleportation-results.json"
TAG = "fez-teleportation-24-23-22-20261119"
STATES = ["+Z", "-Z", "+X", "-X", "+Y", "-Y"]
LAYOUT = [24, 23, 22]
SHOTS = 256
SEED = 242322


def save(path, record):
    temp = path.with_suffix(".tmp")
    temp.write_text(json.dumps(record, indent=2, default=str), encoding="utf-8")
    temp.replace(path)


def circuit(state, fast_measure=False):
    qc = QuantumCircuit(3, 3, name="teleport_" + state.replace("+", "plus").replace("-", "minus"))
    sign, axis = state
    if sign == "-":
        qc.x(0)
    if axis in ("X", "Y"):
        qc.h(0)
    if axis == "Y":
        qc.s(0)
    qc.h(1)
    qc.cx(1, 2)
    qc.barrier()
    qc.cx(0, 1)
    qc.h(0)
    for bit in (0, 1):
        if fast_measure:
            qc.append(MidCircuitMeasure(), [bit], [bit])
        else:
            qc.measure(bit, bit)
    with qc.if_test((qc.clbits[1], 1)):
        qc.x(2)
    with qc.if_test((qc.clbits[0], 1)):
        qc.z(2)
    qc.barrier()
    # Analyze the signed eigenstate in its own basis. One means minus on all axes.
    if axis == "Y":
        qc.sdg(2)
    if axis in ("X", "Y"):
        qc.h(2)
    qc.measure(2, 2)
    return qc


def score(rows):
    if len(rows) != len(STATES):
        raise ValueError("Missing circuit results")
    counts, correct = {}, {}
    for state, row in zip(STATES, rows):
        outcomes = {format(i, "03b"): 0 for i in range(8)}
        if row.keys() - outcomes.keys() or sum(row.values()) != SHOTS:
            raise ValueError("Unexpected outcomes or number of shots")
        outcomes.update(row)
        counts[state] = outcomes
        expected = "0" if state.startswith("+") else "1"
        correct[state] = sum(n for bits, n in outcomes.items() if bits[0] == expected)
    return {"joint_counts": counts, "correct_by_state": correct, "correct": sum(correct.values()),
            "total": len(STATES) * SHOTS, "shots_per_state": SHOTS,
            "bit_order": "c2 c1 c0 = Bob verification, Alice X correction flag, Alice Z correction flag"}


def simulate():
    sim = AerSimulator(method="stabilizer")
    result = sim.run([circuit(s) for s in STATES], shots=SHOTS, seed_simulator=SEED).result()
    record = score(result.get_counts())
    if record["correct"] != record["total"]:
        raise ValueError("Ideal teleportation failed")
    for row in record["joint_counts"].values():
        if len({bits[1:] for bits, n in row.items() if n}) != 4:
            raise ValueError("Simulation missed a feed-forward branch")
    save(LOCAL, dict(record, simulator="Qiskit Aer stabilizer", seed=SEED,
                     versions={p: version(p) for p in ("qiskit", "qiskit-aer")}))
    print(record["correct_by_state"])


def prepare(backend):
    fast = all(backend.target.instruction_supported("measure_2", (q,)) for q in LAYOUT[:2])
    compiler = generate_preset_pass_manager(backend=backend, initial_layout=LAYOUT,
                                             optimization_level=0, seed_transpiler=SEED)
    compiled = compiler.run([circuit(s, fast) for s in STATES], num_processes=1)
    for qc in compiled:
        backend.check_faulty(qc)
        measurements, conditionals, edges = {}, [], []
        for inst in qc.data:
            gate = inst.operation
            qubits = [qc.find_bit(q).index for q in inst.qubits]
            if gate.name != "barrier" and set(qubits) - set(LAYOUT):
                raise ValueError("Unexpected physical qubit")
            if gate.name in ("measure", "measure_2"):
                measurements[qc.find_bit(inst.clbits[0]).index] = qubits[0]
            if gate.name == "cz":
                edges.append(sorted(qubits))
            if gate.name == "if_else":
                bit, expected = gate.condition
                flag = qc.find_bit(bit).index
                if qubits != [22] or flag not in measurements or expected != 1:
                    raise ValueError("Unexpected feed-forward target or flag")
                conditionals.append(flag)
        if (measurements != dict(enumerate(LAYOUT)) or conditionals != [1, 0]
                or edges != [[22, 23], [23, 24]]):
            raise ValueError("Unexpected physical layout, gates, or measurement mapping")
    return compiled


def hardware():
    if json.loads(LOCAL.read_text())["correct"] != SHOTS * len(STATES):
        raise RuntimeError("Run the ideal simulation first")
    if not sys.stdin.isatty():
        raise RuntimeError("Use an interactive terminal for private key entry")
    print("IBM Fez teleportation | 24 -> 23 -> 22 | six inputs, 256 shots each")
    key = getpass.getpass("IBM Cloud API key (hidden): ").strip()
    if not key:
        return
    service = QiskitRuntimeService(channel="ibm_quantum_platform", token=key,
                                   plans_preference=["open"], region="us-east")
    if RESULT.exists():
        record = json.loads(RESULT.read_text())
        if record["stage"] == "done":
            return
        if "job_id" in record:
            job = service.job(record["job_id"])
        else:
            matches = service.jobs(job_tags=[TAG], backend_name="ibm_fez", limit=2)
            if len(matches) != 1:
                raise RuntimeError("Reconcile prior submission before retry")
            job = matches[0]
    else:
        backend = service.backend("ibm_fez", use_fractional_gates=False)
        status = backend.status()
        if backend.is_mock or backend.name != "ibm_fez" or not status.operational:
            raise RuntimeError("Fez unavailable")
        props = backend.properties(refresh=True)
        compiled = prepare(backend)
        options = {"environment": {"job_tags": [TAG]},
                   "twirling": {"enable_gates": False, "enable_measure": False},
                   "dynamical_decoupling": {"enable": False}}
        sampler = SamplerV2(mode=backend, options=options)
        record = {"backend": backend.name, "layout_input_alice_bob": LAYOUT, "state_order": STATES,
                  "shots_per_state": SHOTS, "job_tag": TAG, "sampler_options": options,
                  "versions": {p: version(p) for p in ("qiskit", "qiskit-ibm-runtime")},
                  "created_utc": datetime.now(timezone.utc).isoformat(),
                  "calibration_updated": props.last_update_date if props else None,
                  "status_at_submission": status.to_dict(), "stage": "submitting",
                  "compiled_circuits": {s: str(qc.draw("text", idle_wires=False, fold=-1))
                                        for s, qc in zip(STATES, compiled)}}
        with RESULT.open("x", encoding="utf-8") as stream:
            json.dump(record, stream, indent=2, default=str)
        job = sampler.run(compiled, shots=SHOTS)
    record.update(job_id=job.job_id(), stage="submitted")
    save(RESULT, record)
    results = job.result()
    record.update(score([pub.data.c.get_counts() for pub in results]), stage="measured")
    save(RESULT, record)
    for _ in range(180):
        metrics = job.metrics()
        usage = metrics.get("usage", {})
        if usage.get("status", "pending") != "pending" and usage.get("qpu_charge_time_seconds") is not None:
            break
        time.sleep(5)
    record.update(stage="done", metrics=metrics)
    save(RESULT, record)
    print(record["correct_by_state"])


if __name__ == "__main__":
    if sys.argv[1:] == ["simulate"]:
        simulate()
    elif sys.argv[1:] == ["hardware"]:
        logging.disable(logging.CRITICAL)
        try:
            hardware()
        except Exception as exc:
            trace = traceback.extract_tb(exc.__traceback__)
            save(ROOT.parent / "work" / "teleportation-error.json",
                 {"type": type(exc).__name__,
                  "frames": [[Path(f.filename).name, f.lineno, f.name] for f in trace]})
            print(f"Hardware step stopped ({type(exc).__name__}).")
        input("Press Enter to close.")
    else:
        raise SystemExit("Use simulate or hardware.")

Personal comments

Personal comments will be added here.