The first eight lectures used Deltakit from the outside: import a class, call it, read a number. This lecture looks inside, with the questions a physicist asks before changing someone else’s research code. Which package owns the thing I want to change? How do I build and test it? How do the maintainers want changes proposed? Which problems are open, in the code and in the field?

Deltakit is young and its issues get assigned and closed, so everything below is as we checked it on 2026-11-09, with a link for each claim.

Field map

The packages and what each owns

Release 0.10.0 (2026-09-02) removed Deltakit’s subpackages (CHANGELOG, PR #332). Each part is now its own repository and PyPI distribution.

Definition 9.1 (Meta-package).

A meta-package is a distribution with almost no code, which pins and installs other distributions. The deltakit module only re-exports four components (deltakit.circuit, .core, .decode, .explorer) and adds the cloud Client.

Because deltakit is a meta-package (Definition 9.1), the name you import and the repository you would change often differ. This primer pins these versions:

distributionimport asownsneeds (Deltakit)
deltakit-stim 0.2.7deltakit_stimthe C++ Stim fork: sampling, DEMs, leakage gatesnone
deltakit-circuit 0.9.2deltakit.circuitcircuits, gates, noise channels, Stim conversionstim
deltakit-core 0.9.2deltakit.coredata formats, decoding graphs, window primitivesstim
deltakit-decode 0.9.2deltakit.decodePyMatchingDecoder, the sampling-and-decoding loopcircuit, core, stim
deltakit-explorer 0.9.4deltakit.explorercodes, QPU, noise models, analysis, cloud client and decoderscircuit, core, decode, stim
deltakit-compile 0.1.0deltakit_compilethe xDSL compiler from logical programs to Stimstim
deltakit-visualise 0.4.0deltakit_visualiseviews of programs compiled by deltakit-compilecompile
Riverlane cloud service six decoder classes; needs a token pip install deltakit installs all of these client= deltakit-explorer codes, QPU noise, analysis, cloud client deltakit-visualise views of compiled programs deltakit-decode matching (PyMatching), sampling loop deltakit-compile xDSL IR, lowers to Stim deltakit-circuit circuits, noise deltakit-core decoding graphs solid arrow: depends on dashed arrow: network call deltakit-stim C++ Stim fork with leakage; every package above builds on it

The map shows two stacks. On the left runs Lecture 0’s pipeline: the explorer builds the code and the noisy memory circuit as deltakit.circuit objects; the decode package turns that circuit into a decoder, using a decoding graph from deltakit-core and PyMatching; deltakit-stim samples detection events; and deltakit.explorer.analysis turns failures into LEP, and QuOps. The compiler stack on the right meets it only in deltakit-stim, because the compiler emits Stim circuits.

Remark 9.1 (Where a class lives, and where it runs).

deltakit.decode is deltakit_decode plus six cloud classes defined in deltakit_explorer._cloud_decoders: MWPMDecoder, CCDecoder (Collision Clustering), BeliefMatchingDecoder, BPOSDecoder, ACDecoder (Ambiguity Clustering) and LCDecoder (Local Clustering). Without client=, their constructors raise NotImplementedError before any network traffic. With one, the only implemented method, decode_batch_to_logical_flip, sends the circuit text and detection events to Riverlane’s service. Everything else runs locally as long as you pass no client=.

So a fix to a cloud decoder’s wrapper is a change to deltakit-explorer, although you import the class from deltakit.decode (Remark 9.1).

Building, testing and contributing

The rules for every repository are in the meta-repository’s docs/CONTRIBUTING.md. File issues in the affected package’s repository, and cross-package or documentation issues in Deltakit/deltakit. Fork, clone, add the original as upstream, and let uv build the test environment:

git clone https://github.com/<your-handle>/deltakit-explorer.git
cd deltakit-explorer
git remote add upstream https://github.com/Deltakit/deltakit-explorer.git
uv sync --group test
uv run pytest tests/analysis

The meta-repository adds just test, just lint (typos, ruff, pydoclint, mypy, deptry) and just check. CI also tests the lowest dependency versions allowed (--resolution lowest-direct), so code needing a newer dependency must raise its lower bound. Issue and PR titles and commit messages follow Conventional Commits, except that bug reports start bug: and requests request:; PRs use fix:, feat: or perf:. A bot asks for a Contributor License Agreement on your first PR; during review, add commits instead of rebasing or force-pushing.

Picking up work. Issues labelled good first issue or help wanted are open to anyone. For the rest, explain your approach in a comment and wait to be assigned. Between volunteers, the maintainers weigh the quality of the approach and who came first. A maintainer’s rule of thumb for an issue (#325, 2026-08-19): at most three paragraphs (about 300 words), two or three images, two or three citations, and extra detail in a <details> fold.

The AI-use policy. “Use of AI tools” binds every contributor, maintainers included. Its premise: a plausible PR is now cheap to generate but no cheaper to review, and QEC experiments “may fail quietly”. AI tools are allowed if you understand every line, answer review questions yourself and keep changes small. Disclose substantial use in the PR: tool and model, what it changed, how you checked it (“Used LLMs” is not enough). Never credit a tool as an author or commit agent files such as CLAUDE.md or .claude/.

The Deltakit Community Fund

The Deltakit Community Fund is run jointly by the Unitary Foundation and Riverlane. Its page, read on 2026-11-09, says:

  • Award: up to 4k USD and mentorship from both teams, for one to two quarters (3 to 6 months).
  • Projects: an unassigned community-fund-proposal issue, or your own idea opened as a new issue; apply through the page’s form.
  • Dates: the 2027 Q1 round closes on 2 December 2026, results follow on 11 December (status issue #343), and work starts in January 2027. Later rounds open in February, May and August 2027.
  • Rules: after a rejection, wait a quarter before reapplying. People in countries under US export controls (EAR groups D:1 and D:5) or OFAC sanctions are excluded.

The page lists no judging criteria. CONTRIBUTING.md adds that an assigned fund issue’s scope is reserved while the project runs.

Open problems in the code base

Five issues in Deltakit/deltakit, all open on 2026-11-09, make good first contributions for a physicist.

#321: does the decoder know when it is unsure?

#321 (community-fund-proposal) proposes decoder calibration scoring. Matching can report a complementary gap : how much heavier the best correction in the other logical class is than the one it chose. With edge weights , the chosen class’s best error is times likelier than the other’s. Turned into a probability that shot was decoded correctly, this is a soft output, calibrated if about 70% of shots with are right. The issue proposes the Brier score ( for a correct shot) and reliability diagrams.

A maximum-likelihood decoder with the true noise model returns each logical class’s true posterior, so it is calibrated by construction. Matching keeps only the best error per class, and a wrong noise model miscalibrates any decoder, so calibration tests a decoder’s model against the noise. A maintainer deferred it in the first funding round (2026-08-14), promising priority in the next; several people want to work on it.

#325: decoding while the data arrive

#325 (no label) asks for windowed decoding. On hardware, rounds keep coming, one every 1.1 μs on Google’s Willow chip (PUBLISHED, Nature 638, 920 (2025)), and a decoder that falls behind builds an ever-growing backlog. A sliding window decodes rounds , commits the corrections in the first rounds and discards the rest, the buffer. A committed correction that crosses into the buffer leaves an artificial defect for the next window. The buffer is typically about rounds, so that an error chain starting in the commit region is seen whole. Parallel windows are decoded at once and their seams filled afterwards, with no noticeable loss of logical fidelity for the surface code (PUBLISHED, Skoric et al., Nat. Commun. 14, 7040 (2023)).

deltakit-core 0.9.2 already exports the graph surgery (induce_subhypergraph, connect_dangling_to_boundary_hypergraph, annotate_edges_with_window_ids, …), but no other Deltakit package uses it. The issue proposes a windowed decoder in deltakit-decode that wraps any decoder returning a full correction. A maintainer wrote (2026-08-14) that it is not on the current roadmap and suggested revisiting it in early 2027.

#411: a local decoder for qLDPC codes

#411 (no label, no comments) asks for Relay-BP. PyMatching cannot decode bivariate bicycle codes: in the memory circuit some error mechanisms flip up to 9 detectors, and matching needs at most 2. In Deltakit 0.10.2 the only decoders for these codes are cloud ones. Belief propagation (BP) passes messages between detectors and error mechanisms to estimate each mechanism’s marginal. On quantum codes it often fails to converge, because degenerate errors split the beliefs and short cycles feed messages back on themselves. OSD repairs BP’s output by Gaussian elimination, at cubic cost. Relay-BP runs BP legs in a relay, each with disordered “memory” strengths, some negative. Its authors report that it significantly outperforms BP+OSD+CS-10 on bivariate bicycle codes and is comparable to matching on surface codes (PREPRINT, Müller et al., arXiv 2506.01779). The issue proposes a RelayBPDecoder as an optional extra over IBM’s Apache-2.0 relay-bp package.

#415 and #416: two compiler problems

deltakit-compile represents a program as intermediate representation (IR) in xDSL dialects. In the qref dialect a gate acts on a qubit reference in place: qref.gate<#qcore.gate.h>(%q0) changes what %q0 holds. #415 (community-fund-proposal, written by a maintainer) asks for a qssa dialect in static single assignment form, where every value is defined once: a gate consumes a qubit value and returns a new one. Each qubit’s history becomes a chain of values, so gate dependencies are visible in the values themselves, and passes that reorder or cancel gates become local rewrites. In the issue’s example every qubit value is used exactly once, which mirrors no-cloning. The work is the dialect plus passes from qref to qssa and back. One applicant has posted a plan; a maintainer replied (2026-11-04) that nothing is accepted yet and others may apply until 2 December 2026.

#416 (enhancement, community-fund-proposal, no comments) asks for an importer from OpenQASM 3.0, a quantum programming language with classical control flow. QEC needs control flow: in teleportation and magic-state injection, a measurement result decides the next gate. The importer parses text into an openqasm3 dialect, which Riverlane plans to open-source before the round starts, and lowers it to deltakit-compile’s dialects (scf, arith, qstruct, qcore, qec). Out of scope: export, timing, physical qubits, switch, break, continue, end and pulse-level features.

Rough edges we hit while writing this primer

Three behaviours of Deltakit 0.10.2 (deltakit-decode 0.9.2, deltakit-explorer 0.9.4) cost us time; each is harmless once you know it.

1. The decoder’s circuit is not your circuit. PyMatchingDecoder.construct_decoder_and_stim_circuit returns a new circuit that keeps only the detectors the decoder uses. Sampling the circuit you built fails:

import textwrap
 
from deltakit.circuit.gates import PauliBasis
from deltakit.decode import PyMatchingDecoder
from deltakit.explorer.codes import RotatedPlanarCode, css_code_memory_circuit
from deltakit.explorer.qpu import QPU, SI1000Noise
 
code = RotatedPlanarCode(width=3, height=3)
circ = css_code_memory_circuit(code, num_rounds=3, logical_basis=PauliBasis.Z)
qpu = QPU(qubits=code.qubits, noise_model=SI1000Noise(p=1e-3))
noisy = qpu.compile_and_add_noise_to_circuit(circ)
dec, dec_circ = PyMatchingDecoder.construct_decoder_and_stim_circuit(noisy)
 
mine = noisy.as_stim_circuit()
print(f"detectors: {mine.num_detectors} in mine, "
      f"{dec_circ.num_detectors} in the decoder's")
dets = mine.compile_detector_sampler(seed=2026).sample(10)
try:
    dec.decode_batch_to_logical_flip(dets)
except ValueError as err:
    print(textwrap.fill(f"ValueError: {err}", width=72))
detectors: 24 in mine, 16 in the decoder's
ValueError: `shots` array should have at least 16 columns (the number of
detectors), and no more than 17 columns (the number of nodes), but
instead has 24 columns

The eight -check detectors carry no information about a observable, so the decoder drops them. The message says how many columns it wants, not why. Sample the returned circuit.

2. Two conventions for . calculate_lambda_and_lambda_stddev fits , with the logical error per round. The QuOps helpers (predict_quops_at_distance, predict_distance_for_quops, predict_quops_interval) use (_calculate_lep in analysis/_quops.py, unchanged on upstream main at b280a96). One is the reciprocal of the other. With per-round error rates we measured at SI1000, (400,000 shots per distance, rounded):

from deltakit.explorer.analysis import (
    calculate_lambda_and_lambda_stddev,
    predict_quops_at_distance,
)
 
eps = [1.1769e-3, 1.8414e-4, 3.1077e-5]    # LEP per round at d = 3, 5, 7
std = [3.1e-5, 9.6e-6, 3.3e-6]             # their standard errors
ld = calculate_lambda_and_lambda_stddev([3, 5, 7], eps, std)
eps11 = 1 / (ld.lambda0 * ld.lambda_**6)   # the fit's own model at d = 11
p_L = (1 - (1 - 2 * eps11) ** 11) / 2      # one 11-round block fails
print(f"Lambda = {ld.lambda_:.2f}, Lambda_0 = {ld.lambda0:.1f}")
print(f"QuOps(d=11) by hand:    {1 / p_L:,.0f}")
q = predict_quops_at_distance(ld.lambda0, ld.lambda_, 11)
print(f"passing ld.lambda0:     {q:,.1f}")
q = predict_quops_at_distance(1 / ld.lambda0, ld.lambda_, 11)
print(f"passing 1 / ld.lambda0: {q:,.0f}")
Lambda = 6.26, Lambda_0 = 21.7
QuOps(d=11) by hand:    119,107
passing ld.lambda0:     253.5
passing 1 / ld.lambda0: 119,107

Passing the fit straight through underestimates the QuOps about 470-fold (119,107 / 253.5). predict_quops_interval(lambda_data, d) does exactly that internally. Pass 1 / ld.lambda0.

3. Seeded results depend on the hash seed. Lecture 0’s first run gives 344 failures with PYTHONHASHSEED=0 and 340 with PYTHONHASHSEED=1, both with seed=2026 (rerun on 2026-11-09). In deltakit-explorer, codes/_css/_css_stage.py (line 144 in 0.9.4) stores the first round’s gates in a frozenset. A frozenset iterates in hash order, a gate’s hash includes its class name, and Python salts string hashes per process unless PYTHONHASHSEED is set. So the first reset layer lists the qubits in another order (R 14 4 12 … against R 4 12 11 …), Stim hands its random numbers to different qubits, and the same seed yields different shots. The runs agree statistically, not shot by shot, which breaks regression tests across processes. This primer pins PYTHONHASHSEED=0 and runs python -P, never python -I, which ignores the variable.

Open research problems

  • Real-time decoding at scale. Willow’s real-time decoder averaged 63 μs latency at distance 5 over up to a million 1.1 μs cycles (PUBLISHED, Nature 638, 920 (2025)). The Collision Clustering decoder behind CCDecoder decodes at MHz rates on an FPGA (surface codes up to 881 qubits) and a 0.06 mm², 8 mW ASIC (up to 1,057) (PUBLISHED, Nat. Electron. 8, 84 (2025)). The Local Clustering Decoder behind LCDecoder takes under 1 μs per round on an FPGA and adapts to heralded leakage (PUBLISHED, Nat. Commun. 16, 11048 (2025)). Open: the same speed for logical operations on many logical qubits (#325).
  • qLDPC decoding. Bivariate bicycle codes have a threshold of about 0.7% (the arXiv abstract says 0.8%), and the gross code is estimated to keep 12 logical qubits for nearly a million cycles on 288 physical qubits at (PUBLISHED, Nature 627, 778 (2024)). Running such codes needs a decoder both accurate and fast; Relay-BP and Ambiguity Clustering, the algorithm behind ACDecoder (PREPRINT, arXiv 2406.14527), are candidates; Deltakit has no local qLDPC decoder (#411).
  • Leakage. Leakage spreads through multi-qubit gates into correlated errors that erode exponential suppression. Removing it every cycle on Sycamore cut steady-state data-qubit leakage tenfold in a distance-3 surface code, and a distance-21 bit-flip code showed the logical benefit (PUBLISHED, Nat. Phys. 19, 1780 (2023)). Deltakit simulates leakage (SI1000Noise(pL=...)), but its leakage-aware decoder, LCD, is cloud-only.
  • Machine-learning decoders. AlphaQubit beat the algorithmic decoders it was compared with on Sycamore data at distances 3 and 5, kept its advantage in simulation up to distance 11, and stayed accurate far beyond the 25 rounds it was trained on (PUBLISHED, Nature 635, 834 (2024)). The abstract reports accuracy, not speed. A decoder that outputs a probability is what calibration (#321) scores.
  • Below threshold at larger distance. Willow’s distance-7 memory reached and 0.143% error per cycle on 101 qubits; its repetition codes, up to distance 29, were limited by correlated error events about once an hour (about cycles) (PUBLISHED, Nature 638, 920 (2025), as above). Whether holds at larger , and what sets the floor, is open. Direct sampling needs about shots to see ten failures at a logical error rate of .

In Deltakit

The block below reads versions and dependencies from the installed metadata, then tries each decoder class without a client. Nothing goes over the network.

import importlib.metadata as md
import re
 
import deltakit.decode as dd
from deltakit.circuit.gates import PauliBasis
from deltakit.explorer.codes import RotatedPlanarCode, css_code_memory_circuit
from deltakit.explorer.qpu import QPU, SI1000Noise
 
PKGS = ["deltakit", "deltakit-circuit", "deltakit-core", "deltakit-decode",
        "deltakit-explorer", "deltakit-stim", "deltakit-compile",
        "deltakit-visualise"]
 
 
def dist_name(req):
    return re.split(r"[ ;<>=~!\[(]", req)[0].lower().replace("_", "-")
 
 
for pkg in PKGS:
    reqs = [r for r in md.requires(pkg) or [] if "extra ==" not in r]
    deps = {dist_name(r) for r in reqs} & set(PKGS)
    short = sorted(d.removeprefix("deltakit-") for d in deps)
    print(f"{pkg:19s} {md.version(pkg):7s} {', '.join(short) or '-'}")
 
code = RotatedPlanarCode(width=3, height=3)
circ = css_code_memory_circuit(code, num_rounds=3, logical_basis=PauliBasis.Z)
qpu = QPU(qubits=code.qubits, noise_model=SI1000Noise(p=1e-3))
noisy = qpu.compile_and_add_noise_to_circuit(circ)
print()
for name in sorted(n for n in dir(dd) if n.endswith("Decoder")):
    cls = getattr(dd, name)
    try:
        if name == "PyMatchingDecoder":
            cls.construct_decoder_and_stim_circuit(noisy)
        else:
            cls(noisy)  # no client= given
        where = "local"
    except NotImplementedError:
        where = "cloud: needs client="
    print(f"{name:22s} {cls.__module__:33s} {where}")
deltakit            0.10.2  circuit, compile, core, decode, explorer, visualise
deltakit-circuit    0.9.2   stim
deltakit-core       0.9.2   stim
deltakit-decode     0.9.2   circuit, core, stim
deltakit-explorer   0.9.4   circuit, core, decode, stim
deltakit-stim       0.2.7   -
deltakit-compile    0.1.0   stim
deltakit-visualise  0.4.0   compile
 
ACDecoder              deltakit_explorer._cloud_decoders cloud: needs client=
BPOSDecoder            deltakit_explorer._cloud_decoders cloud: needs client=
BeliefMatchingDecoder  deltakit_explorer._cloud_decoders cloud: needs client=
CCDecoder              deltakit_explorer._cloud_decoders cloud: needs client=
LCDecoder              deltakit_explorer._cloud_decoders cloud: needs client=
MWPMDecoder            deltakit_explorer._cloud_decoders cloud: needs client=
PyMatchingDecoder      deltakit_decode._mwpm_decoder     local

The first table is the package map’s arrows. The second puts the remark in code: six of the seven decoder classes are defined in the explorer and stop at the constructor.

Try this

  • Clone deltakit-explorer and run uv run pytest tests/analysis/test_quops.py. Its fixture passes , . Which convention is that, and would any test there notice the mismatch above?
  • On paper, for #321: a decoder that reports the same confidence on every shot ( the LEP) is calibrated. Show that its Brier score is , and why a decoder with useful per-shot confidence scores lower.
  • Draft the issue you would write for one rough edge under the maintainers’ rule of thumb: three paragraphs, the version, a minimal script and its output. Search the tracker first.

Readings

  • Deltakit docs/CONTRIBUTING.md (“Picking up work”, “Use of AI tools”); the Community Fund page and status issue #343.
  • L. Skoric et al., Parallel window decoding enables scalable fault tolerant quantum computation, Nat. Commun. 14, 7040 (2023). The scheme behind #325.
  • T. Müller et al., Improved belief propagation is sufficient for real-time decoding of quantum memory, arXiv 2506.01779 (preprint). Relay-BP (#411).
  • S. Bravyi et al., High-threshold and low-overhead fault-tolerant quantum memory, Nature 627, 778 (2024). The gross code.