Quickstart Guide
Get the QECSync SDK installed and run your first surface-code syndrome decode in under 15 minutes.
Prerequisites
- Python 3.10 or higher
- QECSync SDK access credentials (request via the access form)
- A calibration JSON file from your quantum hardware provider (or use the included synthetic noise generator)
Installation
Once you have received your access credentials, install QECSync from the private PyPI endpoint:
terminal
$ pip install qecsync \
--extra-index-url https://pkg.qecsync.com/simple/ \
--index-url https://pypi.org/simple/
Successfully installed qecsync-0.9.2
Verify the installation:
terminal
$ python -c "import qecsync; print(qecsync.__version__)"
0.9.2
Step 1 — Build a noise model
The noise model captures your device's per-qubit and per-gate error characteristics. You can load it from a calibration export or build a synthetic depolarizing model for testing:
quickstart.py
from qecsync import NoiseModel
# Option A: from hardware calibration JSON
noise = NoiseModel.from_ibm_json("calibration.json")
# Option B: synthetic depolarizing (for testing)
noise = NoiseModel.depolarizing(p=0.003, n_qubits=49)
Step 2 — Initialize the decoder
Create a DecoderEngine configured for code distance 5 and your noise model:
quickstart.py
from qecsync import DecoderEngine
eng = DecoderEngine(
algorithm="mwpm",
code_distance=5,
noise_model=noise
)
print(eng.weight_matrix.shape) # (49, 49)
Step 3 — Run a decode
Pass syndrome data (a 3D boolean array of shape [rounds, rows, cols]) to the decoder:
quickstart.py
import numpy as np
# Generate synthetic syndrome: 10 rounds of d=5 surface code
syndromes = np.random.randint(0, 2, size=(10, 4, 4), dtype=bool)
result = eng.decode_rounds(syndromes, rounds=10)
print(result.logical_correction) # PauliString("IIIII...")
print(result.latency_ms) # 0.64