Slowmatch is an example python implementation of minimum weight embedded matching.
An embedded matching is a set of edges where marked nodes are adjacent to an odd number of edges and unmarked nodes are adjacent to an even number of edges. There may also be boundary nodes, which can be adjacent to an even or odd number of marked edges. The minimum weight embedded matching problem is very similar to the minimum weight perfect matching problem. The algorithms for solving them are essentially the same.
Embedded matchings are interesting because the problem they represent still makes sense on continuous spaces, and also they more directly represent solutions to the matching problem created by quantum errors in the surface code.
-
Clone the repo.
git clone [email protected]:Strilanc/slowmatch.git cd slowmatch
-
Create a virtual environment.
-
Install dependencies.
python -m pip install -r requirements.txt
-
Run the demo.
python slowmatch/demo.py # press [spacebar] to generate a new problem and match it # press [R] to replay a matching
-
[Optional] Run the demo with different options.
E.g. change
CIRCLE = True
indemo.py
toCIRCLE = False