Skip to content

yutakahirano/msc-ls

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Efficient Magic State Cultivation with Lattice Surgery

This repository contains the code used in the paper "Efficient Magic State Cultivation with Lattice Surgery" (arXiv:2510.24615).

The code used to generate the figures in the paper is available in the branch experiment-2025-sep.

The implementation is written in Python and depends on:


Directory Structure

The src/ directory contains the main scripts:

  • src/lattice_surgery_complementary_gap.py
    The main script that implements the end-to-end distillation sequence.

  • src/lattice_surgery_error_detection.py
    Supports the error-detection use case.
    Used to generate the data for Fig. 9, "Logical X and Z error probabilities introduced by the lattice surgery procedure," in the paper.

  • src/extract_lookup_table.py
    Extracts information from the lookup table generated by lattice_surgery_complementary_gap.py.
    Used to generate the data for Fig. 11, "Coverage of the lookup table," in the paper.


Version Requirements

  • src/lattice_surgery_error_detection.py requires Sinter ≤ 1.13 due to a known bug.
  • Other scripts require Stim 1.15 or later.

Typing

We add type annotations wherever possible and use mypy for type checking.

[yhirano@host msc-ls]$ mypy --ignore-missing-imports src/*.py
Success: no issues found in 17 source files

Testing

Tests are written in src/*_test.py and can be run with the -m unittest command-line option:

[yhirano@host msc-ls]$ cd src
[yhirano@host src]$ python3 -m unittest *_test.py
.............................................................
----------------------------------------------------------------------
Ran 61 tests in 3.384s

OK

Formatting

We use pycodestyle for code formatting.
It should ideally be applied automatically (for example, via a Git commit hook), but this has not yet been set up.

[yhirano@host msc-ls]$ pycodestyle src/*.py

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages