Skip to content

A surface code implemented with pair measurements on a cairo pentagonal tiling.

Notifications You must be signed in to change notification settings

Strilanc/cairo-surface-code

Repository files navigation

A Pair Measurement Surface Code on Pentagons

This code repository contains the source code used to generate and benchmark circuits for the paper "A Pair Measurement Surface Code on Pentagons". The circuits implement the surface code using pair measurements that follow a pentagonal tiling of the plane.

Regenerating the plots in the paper, from scratch, can be done by running these commands:

# STEP 0: SETUP ENVIRONMENT
# This step heavily depends on your OS and preferences.
# These specific instructions create a python 3.9 virtualenv assuming a debian-like linux.
sudo apt install python3.9-venv
python3 -m venv .venv
source .venv/bin/activate
# Install python dependencies into venv:
pip install -r requirements.txt

# STEP 1: MAKE CIRCUITS.
# NOTE: We ran a lot of circuit variations.
# Consider editing this script to generate fewer variations and smaller circuits.
./step1_make_circuits.sh out/circuits --no-honeycomb

# Step 2: SAMPLE CIRCUITS.
# NOTE: We actually used a different faster decoder, and more than 4 worker processes.
# Consider editing this script to take fewer shots, wait for fewer errors, etc.
./step2_circuits_to_stats.sh out/circuits out/stats.csv 4 pymatching

# STEP 3: PLOT RESULTS.
# The 'X' says to plot the X basis memory experiment results (as opposed to Z).
# The 'd' says to use per-code-distance chunking.
./step3_stats_to_plots.sh out/stats.csv out/plots X d

The circuit files generated by step 1 are attached to the paper.

The stats csv file generated by step 2 (but with rows combined by sinter combine) is also attached to the paper.

The plots generated by step 3 are included in the paper.

About

A surface code implemented with pair measurements on a cairo pentagonal tiling.

Resources

Stars

Watchers

Forks

Packages

No packages published