Skip to main content

deltakit-maestro

Qoro Maestro simulator backend for Riverlane Deltakit QEC circuits.

A thin adapter over maestro.sinter. A Deltakit Circuit is converted to Stim with as_stim_circuit():

From the noisy Stim circuit Goes to
noisy stim.Circuit (or with its gate noise stripped) Maestro, which executes it
hardware noise layers (coherent, t1) or rate overrides a maestro.NoiseModel
the Pauli twirl of everything that is simulated the decoder's detector error model

The result comes back as raw measurements, detection events, or Sinter statistics.

Every run is simulated by Maestro. With the default simulation_type=None the simulation type follows the noise:

Run Maestro simulation type
'pauli' (rate overrides included) or 'none' Stabilizer, sampled on Pauli frames
any run with t1= but no coherent noise Stabilizer, shot by shot (T1 decay is not a Pauli channel)
'coherent' or 'full' MatrixProductState
any run, with simulation_type= set that simulation type

backend.config_for(noise_type, **noise).simulation_type says which one a run uses. Pauli frames sample a Clifford circuit with Pauli noise as fast as Stim does; coherent over-rotations, which no Clifford simulator can run, need the matrix product state.

Install

Needs Python 3.10 or later, within what Deltakit supports (3.10 to 3.15 across its current releases). Tested on 3.10 to 3.14.

uv venv --python 3.12 .venv
source .venv/bin/activate
uv pip install -e ".[examples]"     # examples extra adds pymatching

Verify:

python -c "from deltakit_maestro import MaestroBackend; print(MaestroBackend())"

Quick start

# Import deltakit before pymatching: the other way round, Deltakit's circuit builders fail.
from deltakit.circuit.gates import PauliBasis
from deltakit.explorer.codes import RotatedPlanarCode, css_code_memory_circuit
from deltakit.explorer.qpu import QPU, SI1000Noise
import sinter

from deltakit_maestro import MaestroBackend

code = RotatedPlanarCode(width=3, height=3)
circuit = css_code_memory_circuit(code, num_rounds=3, logical_basis=PauliBasis.Z)
noisy = QPU(circuit.qubits, noise_model=SI1000Noise(p=0.01)) \
            .compile_and_add_noise_to_circuit(circuit)

backend = MaestroBackend()   # Stabilizer for Pauli runs, MPS (χ=32) for coherent ones

# 1. Detection events straight from Maestro
sampler = backend.compile_sampler(noisy, seed=1)
dets, obs = sampler.sample_detection_events(1000)
# decode against sampler.task.detector_error_model

# 2. Sinter
stats = sinter.collect(
    num_workers=4,
    tasks=[backend.as_sinter_task(noisy, json_metadata={'p': 0.01})],
    custom_decoders=backend.sinter_decoders(decoder='pymatching'),
    max_shots=10_000,
)

# 3. Raw measurements (and detection events) in one call
result = backend.simulate(noisy, shots=1000)
result.measurements       # (1000, n_meas) uint8, Stim record order

# 4. Coherent noise, and its Pauli twirl to compare against
coherent = backend.simulate(noisy, shots=300, noise_type='coherent')
twirl = backend.simulate(backend.twirled_circuit(noisy, noise_type='coherent'), shots=100_000)

The guide covers each of these in depth: sampling and Sinter, the noise modes, the decoder's detector error model, and coherent noise with the bond dimension it needs.

Learn more

  • Documentation:
    • Guide: sampling and Sinter, how each run is simulated, the noise modes and overrides, the decoder's detector error model, coherent noise and its calibration against SI1000, the MPS bond dimension, performance, and gotchas.
    • Examples: a notebook with plots of coherent noise on the d=3 surface code, and scripts for the noise modes, a plain Stim circuit, coherent noise on a repetition code, a surface code sweep, every Deltakit code family, and the bond dimension, each shown with its output.
    • API reference.
  • Maestro docs.
  • Changelog.
  • Contributing: running the tests and building the docs.

License

GPL-3.0, like Maestro. See LICENSE.

Metadata

Release files for deltakit-maestro 0.1.1

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

Source distribution (sdist)

Source distribution for deltakit-maestro 0.1.1
File Size Uploaded Provenance Actions
deltakit_maestro-0.1.1.tar.gz 240.4 kB With provenance Details for deltakit_maestro-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for deltakit-maestro 0.1.1
File Interpreter ABI Platform Actions
deltakit_maestro-0.1.1-py3-none-any.whl Python 3 none any Details for deltakit_maestro-0.1.1-py3-none-any.whl

Total release size: 266.1 kB

Release files / deltakit_maestro-0.1.1.tar.gz

Download URL deltakit_maestro-0.1.1.tar.gz
Size 240.4 kB
Tags Source
SHA-256 checksum
How to use checksums
5e548b0d8dc2e2db8c0ea42586a5ee439c94e9599c57eed15055f092be7b0da9
BLAKE2b-256 checksum
How to use checksums
33e2d094990f8546ca693f62c20c671e4963e01331f6368f39367a225e922541
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.

Transparency log

Release files / deltakit_maestro-0.1.1-py3-none-any.whl

Download URL deltakit_maestro-0.1.1-py3-none-any.whl
Size 25.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
db8bc04a0d7487e7dc00c12be1f821c443946319281b9f8b3a47c0471972f63b
BLAKE2b-256 checksum
How to use checksums
fdaebfdcf2eda6b4d16d38dde60d624e37af2477917c9d1f4f151f68ebe59ad0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.

Transparency log

Security for deltakit-maestro 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for deltakit_maestro-0.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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