Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Chromobius: color code decoder

Chromobius is an implementation of a "mobius decoder", which approximates the color code decoding problem as a minimum weight matching problem. Chromobius uses PyMatching to solve the minimum weight matching problem.

See the paper "New circuits and an open source decoder for the color code" for more details on how Chromobius works.

How to use Chromobius

See the getting started notebook.

Also see the Python API reference.

Programmers who want to edit and build Chromobius can check the developer documentation.

Example Snippets

Decoding a shot with Chromobius

From Python:

import stim
import chromobius
import numpy as np

def count_mistakes(circuit: stim.Circuit, shots: int) -> int:
    # Sample the circuit.
    dets, actual_obs_flips = circuit.compile_detector_sampler().sample(
        shots=shots,
        separate_observables=True,
        bit_packed=True,
    )

    # Decode with Chromobius.
    decoder = chromobius.compile_decoder_for_dem(circuit.detector_error_model())
    predicted_obs_flips = decoder.predict_obs_flips_from_dets_bit_packed(dets)

    # Count mistakes.
    return np.count_nonzero(np.any(predicted_obs_flips != actual_obs_flips, axis=1))

From the command line:

# Sample shots of detectors and observable flips.
stim detect \
    --shots 100000 \
    --in "example_circuit.stim" \
    --out "dets.b8" \
    --out_format "b8" \
    --obs_out "obs_actual.txt" \
    --obs_out_format "01"

# Extract a detector error model used to configure Chromobius.
stim analyze_errors \
    --in "example_circuit.stim" \
    --fold_loops \
    --out "dem.dem"

# Decode the shots.
chromobius predict \
    --dem "dem.dem" \
    --in "dets.b8" \
    --in_format "b8" \
    --out "obs_predicted.txt" \
    --out_format "01"

# Count the number of shots with a prediction mistake.
paste obs_actual.txt obs_predicted.txt \
    | grep -Pv "^([01]*)\\s*\\1$" \
    | wc -l

From Python using sinter:

import sinter
import chromobius
import os

tasks: list[sinter.Task] = ...
stats: list[sinter.TaskStats] = sinter.collect(
    decoders=["chromobius"],
    custom_decoders=chromobius.sinter_decoders(),
    tasks=tasks,
    num_workers=os.cpu_count(),
    max_shots=100_000,
    max_errors=100,
)

From the command line using sinter:

sinter collect \
    --circuits "example_circuit.stim" \
    --decoders chromobius \
    --custom_decoders_module_function "chromobius:sinter_decoders" \
    --max_shots 100_000 \
    --max_errors 100
    --processes auto \
    --save_resume_filepath "stats.csv" \

Disclaimer

This is not an officially supported Google product. This project is not eligible for the Google Open Source Software Vulnerability Rewards Program.

Copyright 2025 Google LLC.

Metadata

Release files for chromobius 1.2.dev1760452970

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for chromobius 1.2.dev1760452970
File
chromobius-1.2.dev1760452970-cp313-cp313-macosx_10_15_x86_64.whl CPython 3.13 CPython 3.13 macOS 10.15+ x86-64 Details
chromobius-1.2.dev1760452970-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
chromobius-1.2.dev1760452970-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details
chromobius-1.2.dev1760452970-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ ARM64, Linux glibc 2.26+ ARM64 Details
chromobius-1.2.dev1760452970-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details
chromobius-1.2.dev1760452970-cp312-cp312-macosx_10_15_x86_64.whl CPython 3.12 CPython 3.12 macOS 10.15+ x86-64 Details
chromobius-1.2.dev1760452970-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
chromobius-1.2.dev1760452970-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details
chromobius-1.2.dev1760452970-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ ARM64, Linux glibc 2.26+ ARM64 Details
chromobius-1.2.dev1760452970-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details
chromobius-1.2.dev1760452970-cp311-cp311-macosx_10_15_x86_64.whl CPython 3.11 CPython 3.11 macOS 10.15+ x86-64 Details
chromobius-1.2.dev1760452970-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
chromobius-1.2.dev1760452970-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details
chromobius-1.2.dev1760452970-cp310-cp310-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl CPython 3.10 CPython 3.10 Linux glibc 2.28+ ARM64, Linux glibc 2.26+ ARM64 Details
chromobius-1.2.dev1760452970-cp310-cp310-macosx_11_0_arm64.whl CPython 3.10 CPython 3.10 macOS 11.0+ ARM64 Details
chromobius-1.2.dev1760452970-cp310-cp310-macosx_10_15_x86_64.whl CPython 3.10 CPython 3.10 macOS 10.15+ x86-64 Details

Total release size: 19.4 MB

Release files / chromobius-1.2.dev1760452970-cp313-cp313-macosx_10_15_x86_64.whl

Download URL chromobius-1.2.dev1760452970-cp313-cp313-macosx_10_15_x86_64.whl
Size 953.1 kB
Tags CPython 3.13 macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
262f6075f39d0f933f950a4c8cdf1f363f8b58eec43a7a52ff6de31f3ca2a097
BLAKE2b-256 checksum
How to use checksums
6a3a406796396bbc686e8f9ee5fcbee4d1d349622a418a1ea51b206f6aaf5e40
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / chromobius-1.2.dev1760452970-cp312-cp312-win_amd64.whl

Download URL chromobius-1.2.dev1760452970-cp312-cp312-win_amd64.whl
Size 2.0 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
21d6e9f5b6f593d896c9b9c23adc39e64f1f91c72d1cf7c13b28814d4bce9db1
BLAKE2b-256 checksum
How to use checksums
dd91b73c19038f121d96db18a5f91fa7c4fc29147aef5865fffe481ac27a7832
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / chromobius-1.2.dev1760452970-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL chromobius-1.2.dev1760452970-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 1.2 MB
Tags CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
c2781f79ce0ad897740534534e84a58734f575da3ea204b8ba2bb8f795915626
BLAKE2b-256 checksum
How to use checksums
46823bf91d967aa3e2217d5420d79cf7fc5b7460f67100fa76293db050fe19c7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / chromobius-1.2.dev1760452970-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl

Download URL chromobius-1.2.dev1760452970-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Size 1.1 MB
Tags CPython 3.12 Linux glibc 2.26+ ARM64 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
c64cead27fd0be487a6fd199c45f55b77329499050a6fc67965c49f4e5df5cea
BLAKE2b-256 checksum
How to use checksums
32838687806db67567c697c377746d4d1f057c6f95f597f6e1d0b1e300dec0e3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / chromobius-1.2.dev1760452970-cp312-cp312-macosx_11_0_arm64.whl

Download URL chromobius-1.2.dev1760452970-cp312-cp312-macosx_11_0_arm64.whl
Size 879.0 kB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
48295cf10c314faf55f00c285be087eec1f97029f466ed5cbdcd219ddc3e68cd
BLAKE2b-256 checksum
How to use checksums
5ba5b94a4bad557d7586f062f80c2a3ea4606af443c0dfde9efa9fc9b1b28db0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / chromobius-1.2.dev1760452970-cp312-cp312-macosx_10_15_x86_64.whl

Download URL chromobius-1.2.dev1760452970-cp312-cp312-macosx_10_15_x86_64.whl
Size 952.9 kB
Tags CPython 3.12 macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
69c66fe7fb9c289ddf85a67f46f818f1575929ebdc61c3394274bab8a775fd8c
BLAKE2b-256 checksum
How to use checksums
d0514e67b1fb473d74f1d66df3a2467d25b72b8b1e3b00631fe7aab229b95459
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / chromobius-1.2.dev1760452970-cp311-cp311-win_amd64.whl

Download URL chromobius-1.2.dev1760452970-cp311-cp311-win_amd64.whl
Size 2.0 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
786792435c4f3025f555e298d54b00a2995aae587eaaf7890b2cbc3ab9c064a5
BLAKE2b-256 checksum
How to use checksums
3c9318cca89f7bab9f3e6141e114ec2834aa3e80751751ea7c89d771615b58e3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / chromobius-1.2.dev1760452970-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL chromobius-1.2.dev1760452970-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 1.2 MB
Tags CPython 3.11 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
01dd43b9d93438d1b020ae0dfbd8d82ffd3d246b3337895bc58787c6702b24c7
BLAKE2b-256 checksum
How to use checksums
4978656aac32286b2f392b45de053811777af3532f64156664e509cd922d7efb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / chromobius-1.2.dev1760452970-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl

Download URL chromobius-1.2.dev1760452970-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Size 1.1 MB
Tags CPython 3.11 Linux glibc 2.26+ ARM64 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
a0e3963207300543e10ef6177df28d6c369c968229029ea480bc2a5093a71030
BLAKE2b-256 checksum
How to use checksums
cdebee736486ef3a19ac31a11d2ad88c4c05ddcb18bb2b00f79a950b466e0307
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / chromobius-1.2.dev1760452970-cp311-cp311-macosx_11_0_arm64.whl

Download URL chromobius-1.2.dev1760452970-cp311-cp311-macosx_11_0_arm64.whl
Size 879.3 kB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
6dddeebe4e51925e77311eb5201a70fede2fbb87033e291121119158548d0517
BLAKE2b-256 checksum
How to use checksums
9d8fb60d016b391cc13edf24e64de96f7d0ddccdf00dd47b67ff9be28303e7db
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / chromobius-1.2.dev1760452970-cp311-cp311-macosx_10_15_x86_64.whl

Download URL chromobius-1.2.dev1760452970-cp311-cp311-macosx_10_15_x86_64.whl
Size 953.3 kB
Tags CPython 3.11 macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
b91c84a6f7a462f1a8fdecfb468f8e173b3654781e9ab7fb91f0a53af331cf9c
BLAKE2b-256 checksum
How to use checksums
8d17ab73a166ddc4933d950f1ced187ddc8bc49338d57cea275793241ea40673
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / chromobius-1.2.dev1760452970-cp310-cp310-win_amd64.whl

Download URL chromobius-1.2.dev1760452970-cp310-cp310-win_amd64.whl
Size 2.0 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
dfbd96c3fd705bdcca02a95bcdf30a2aa6b8d147fda24a04fd57ee5521bdd4cd
BLAKE2b-256 checksum
How to use checksums
2b357717ebb5610f16512c6b7dfee71054010d43600ac32f69a1e71475f72828
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / chromobius-1.2.dev1760452970-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL chromobius-1.2.dev1760452970-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 1.2 MB
Tags CPython 3.10 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
2700b51a299bb775d39f6b3d7a3032d82fa4c87287978ccb2a464d35fd08a121
BLAKE2b-256 checksum
How to use checksums
df8e2ca1bfbaa57c859b919dcaaf7777b90218f9b83419ac827a66ef67154396
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / chromobius-1.2.dev1760452970-cp310-cp310-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl

Download URL chromobius-1.2.dev1760452970-cp310-cp310-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Size 1.1 MB
Tags CPython 3.10 Linux glibc 2.26+ ARM64 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
b71f958b8708fb2084340086dc007f432466df70fc023c4368d9fbce82aabf6d
BLAKE2b-256 checksum
How to use checksums
bc4ddf878964acc6e53797aef224f9ae7937fb27e40fd56f80bfbc3a7121cfcb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / chromobius-1.2.dev1760452970-cp310-cp310-macosx_11_0_arm64.whl

Download URL chromobius-1.2.dev1760452970-cp310-cp310-macosx_11_0_arm64.whl
Size 878.6 kB
Tags CPython 3.10 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
754d4008a09f7aed22af8d2ad3e1f434d163c3a863707f5cbe555f3014a5772c
BLAKE2b-256 checksum
How to use checksums
12c827c801dfa10c0fa0bd18763d5282ea1cacbf18562a8d86a44a3ef9533822
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / chromobius-1.2.dev1760452970-cp310-cp310-macosx_10_15_x86_64.whl

Download URL chromobius-1.2.dev1760452970-cp310-cp310-macosx_10_15_x86_64.whl
Size 951.9 kB
Tags CPython 3.10 macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
47a6244c5235c041de11d421c637118a33e83f0bb8e32b4ed05a8e7370e93470
BLAKE2b-256 checksum
How to use checksums
e7a1e9618d874385ef8e3879d98b76ed04fe1d0ed748f474e3698c716741ab10
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release history Release notifications | RSS feed

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page