|
1 | | -# Stim implementation of the [[16,4,4]] Tesseract Code |
| 1 | +# Stim Implementation of the [[16,4,4]] Tesseract Code |
2 | 2 |
|
3 | | -This repository contains implementations and simulations of the Tesseract quantum error correction code [[1]](#references) using Stim [[3]](#references). |
| 3 | +[](https://doi.org/10.5281/zenodo.17137850) |
4 | 4 |
|
5 | 5 | ## Overview |
6 | | -### Motivation |
7 | | -The 16-qubit tesseract subsystem color code offers a useful comprosmise between protection against errors and overhead. It encodes 4 logical qubits with a code rate of 1/4. By reducing 2 logical qubit from the original [[16,6,4]] code, this code achieves single-shot error correction, with only 2 ancilla qubits. This makes this code practical for current trapped-ion platforms. Recent experiments on Quantinuum hardware[[1]](#references) demonstrated preparing high-fidelity encoded graph states of up to 12 logical qubits, as well as protecting encoded states through 5 rounds of error correction. This repository reproduces these results in simulation, providing modular Stim circuits, noise modelling, and verification tests to support further research on low-overhead fault tolerance. |
| 6 | +• **What it is**: A complete Stim-based [[3]](#references) simulation of the Tesseract quantum error correction code [[1]](#references) with gate-level encoding, error correction rounds, and manual decoding. |
| 7 | + |
| 8 | +• **Why it matters**: The [[16,4,4]] Tesseract subsystem color code offers practical fault tolerance for NISQ devices; encoding 4 logical qubits with single-shot error correction using only 2 ancilla qubits. This makes it viable for current trapped-ion platforms and a stepping stone to larger codes. |
| 9 | + |
| 10 | +• **What's implemented**: Full error correction pipeline including two encoding modes, configurable noise, stabilizer measurement rounds, Pauli frame tracking, and acceptance/fidelity analysis. |
| 11 | + |
| 12 | +• **Validation status**: Error correction improves fidelity as expected, but quantitative reproduction of paper results is work-in-progress. Acceptance rates show correct trend but offset (~1.0 vs ~0.85 baseline); logical error rates have correct shape but ~10× scaling difference. |
8 | 13 |
|
9 | 14 | ![Figure 1: Tesseract code structure (from [1])](docs/images/fig1_tesseract_code.png) |
10 | 15 |
|
11 | | -### Project status |
12 | | -This codebase is an active work-in-progress. |
13 | | -• All building blocks (encoding, noise, measurement, decoder) are implemented. |
14 | | -• The end-to-end error-correction success rate is **not yet at the target level**. |
15 | | -Community testing, bug-fixes, and feature PRs are highly appreciated! |
| 16 | +## Reproduce the Paper |
| 17 | + |
| 18 | +To regenerate the main results with paper parameters: |
| 19 | + |
| 20 | +```bash |
| 21 | +python tesseract_sim/plotting/plot_acceptance_rates.py \ |
| 22 | + --shots 10000 \ |
| 23 | + --apply_pauli_frame true \ |
| 24 | + --encoding-mode 9a \ |
| 25 | + --ec-rate-1q 2.9e-5 \ |
| 26 | + --ec-rate-2q 1.15e-3 \ |
| 27 | + --meas-error-rate 1.47e-3 \ |
| 28 | + --rounds 0 1 2 3 4 5 6 7 8 9 10 15 20 25 30 35 40 45 50 |
| 29 | +``` |
| 30 | + |
| 31 | +**Requirements**: Python 3.8+, Stim 1.11+. Install via `pip install -r requirements.txt`. |
| 32 | + |
| 33 | +**Known differences from paper**: |
| 34 | +- Depolarizing noise model (vs. experimental noise) |
| 35 | +- Pauli frame correction applied post-measurement (vs. pre-measurement) |
| 36 | +- No memory decoherence during idle periods |
| 37 | +- Noiseless encoding to avoid preselection |
| 38 | +- Only two logical Z measurements (due to |++0000⟩ encoding split into [[8,3,2]] codes) |
16 | 39 |
|
17 | | -**Disclaimer:** This repository is an independent, community-driven implementation. |
18 | | -It is **not** affiliated with Microsoft, Quantinuum, nor the authors of the original tesseract-code paper. |
| 40 | +**Disclaimer**: Independent implementation, not affiliated with Microsoft/Quantinuum/original authors. |
19 | 41 |
|
20 | 42 | ### Features |
21 | 43 |
|
22 | | -- Circuit implementation of the [[16,4,4]] Tesseract subsystem color code [[2]](#references) in Stim, including encoding, error correction rounds and final measurements. |
| 44 | +- Circuit implementation of the [[16,4,4]] Tesseract subsystem color code [[1]](#references) in Stim, including encoding, error correction rounds and final measurements. |
23 | 45 | - Simulation of an error correction experiment with configurable noise setting, rounds, shot and more. |
24 | 46 | - Plotting: sweeping of different parameters and obtaining acceptance rate and logical success rate. |
25 | 47 |
|
26 | 48 | ### Implementation details |
27 | 49 |
|
28 | | -In order to mimic the original paper's error correction, the different parts of the experiment are implemented in the gate level, and not using Stim's `MPP` stabilizer measurements, or detectors, for example. |
| 50 | +In order to mimic the original paper's error correction, the different parts of the experiment are implemented at the gate level. |
29 | 51 | The experiment implemented here is an error correction experiment based on Microsoft's paper[[1]](#references), and resembles the experimental setup shown in Figure 8 below. |
30 | 52 |
|
31 | 53 | ![Figure 8: Error correction experiment (from [1])](docs/images/fig8_error_correction_experiment.png) |
|
0 commit comments