Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Magic State Distillation via Codes over Binary Extension Fields

This repository contains the SageMath notebooks for constructing and verifying the MSD protocols in our paper. It contains (twisted) three-orthogonality checking, binarization and generalized triorthogonality testing on binary codes (e.g. binarized & gadgetized CS-to-CS protocols, CCZ-to-CCZ protocols concatenated with 8T-to-CCZ), random puncturing for qudit-CCZ protocols.

Requirements

  • SageMath (I use SageMath 10.9 kernel for running these notebooks on my MAC)
  • NumPy, SciPy, Numba, and Cython
  • A C++17 compiler for the qudit distance certifier
  • GAP with the QDistRnd package for randomized distance estimates. Change gap_root in run_qdistrnd_css to where GAP is installed.
  • Optional: tqdm for exact distance certification progress bars (install with sage -pip install tqdm)

Notebooks

The three notebooks are ordinary Jupyter notebooks with a SageMath kernel. Launch Jupyter from the repository root with:

sage -n jupyter

Repository layout

  • MSD_AG_QEC26.pptx - QEC26 talk slides.
  • src_distill/ - helpers for code construction, finite-field, distance, and transversal-gate utilities
  • notebooks/ - SageMath notebooks containing protocol constructions and searches

AI usage acknowledgement

The following distance determination procedures are assisted by Codex:

  • Call to QDistRnd.
  • Exact qudit distance verification via rank-testing. I use it when the distance upper bound QDistRnd returns does not match theory lower bound. The largest instance is puncturing $k=8$ columns from the one-point $\mathbb{F}_{16}$ Hermitian code.
  • Error coefficient counting.

I checked (and learned from) the codes Codex wrote, and also cross-checked the results with my own Python implementation of MITM checking/counting for many instances. During the cleanup stage of this project, I also let Codex refactor my MITM and random_puncture functions.

The resource estimation of our protocols, which was conducted by Adam with the help of ChatGPT and Patrick with the help of Claude, is not contained in this repository.

About

Magic state distillation protocols built from codes over binary fields.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages