---
name: pymatching-decoder-b9e4559c5ec1
description: Minimum-weight perfect matching decoder skill for surface code error correction
allowed-tools:
  - Bash
  - Read
  - Write
  - Edit
  - Glob
  - Grep
metadata:
  specialization: quantum-computing
  domain: science
  category: error-management
  phase: 6
graph:
  domains: [domain:quantum-computing]
  specializations: [specialization:quantum-computing]
  skillAreas: [skill-area:graph-algorithms, skill-area:mathematical-reasoning, skill-area:np-hard-heuristics]
  workflows: [workflow:experiment-design]
  roles: [role:research-engineer, role:computational-scientist]
---

# PyMatching Decoder

## Purpose

Provides expert guidance on minimum-weight perfect matching decoding for surface codes and other topological quantum error correction codes.

## Capabilities

- MWPM decoding for surface codes
- Weighted edge matching
- Detector error model processing
- Logical error rate calculation
- Integration with Stim simulations
- Custom graph construction
- Belief propagation integration
- Parallelized decoding

## Usage Guidelines

1. **Graph Construction**: Build matching graph from detector error model
2. **Weight Assignment**: Configure edge weights based on error probabilities
3. **Decoding Execution**: Run MWPM algorithm on syndrome data
4. **Error Analysis**: Calculate logical error rates from decoding results
5. **Optimization**: Tune decoder parameters for specific code structures

## Tools/Libraries

- PyMatching
- NetworkX
- Stim
- NumPy


---
Source attribution: a5c-ai
Original project: https://github.com/a5c-ai/babysitter/blob/feb68abe397acc14f32b34984975c48fedba2b33/library/specializations/domains/science/quantum-computing/skills/pymatching-decoder/SKILL.md
License: MIT
License information: https://opensource.org/license/mit
Original upstream instructions; downloaded from Mega AI Hub.

## Upstream license notice

# MIT License

Copyright (c) 2025 A5C AI

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.



# Mega AI Hub resource metadata

Creator / publisher: a5c-ai
Original project: https://github.com/a5c-ai/babysitter/blob/feb68abe397acc14f32b34984975c48fedba2b33/library/specializations/domains/science/quantum-computing/skills/pymatching-decoder/SKILL.md
Attribution basis: Source repository record

Fields of work: Data & Analytics, Development & Engineering, Education & Research
Roles: Data Scientist, ML / AI Engineer, Researcher
Specialties: Specialty not specified
Tools: Networkx, Numpy, Pymatching, Stim
Country applicability: Country not specified
Classification basis: Source catalog labels
Instruction SHA-256: 51cb7ca34a76e0a536cc062af2ad6b8405e931b273ca83b82beb900642a0daf2
