Skip to main content

docs - here! PyPI Python versions Typing License: Apache 2.0 SemVer SPEC 0 Issues Discussions DOI


Deltakit logo


Deltakit is a Python package providing a toolkit to create, execute, analyse and benchmark quantum error correction (QEC) experiments. You can use Deltakit to design new high-level QEC logic, and to compile and run it on real hardware and simulators.


For more detailed information, check out the Deltakit documentation.

For any usage questions or comments, visit our Q&A forum.

Component repositories

Deltakit is developed across the following standalone component repositories:

Repository Description
deltakit-circuit Circuit representations, gates, noise channels and Stim conversion utilities.
deltakit-core Shared data formats and decoding graph utilities.
deltakit-decode Decoders, decoding workflows, noise sources and decoding analysis utilities.
deltakit-explorer Tools for constructing, simulating, analysing and visualising QEC experiments.
deltakit-compile Compiler infrastructure for Deltakit.
deltakit-visualise Python visualisation and debugging tools for QEC programs compiled by deltakit-compile.
deltakit-vis Frontend rendering library used by deltakit-visualise.
deltakit-stim Stim fork supporting non-computational leakage errors and adaptive detector error models.

Feature highlights

Standard QEC experiments proceed through several fundamental stages, each of which is facilitated by the functionality provided in the deltakit package:

  • Circuit generation: brings together a representative noisy circuit for the experiment of choice and a quantum error-correcting code.
  • Simulation: generates measurement results by executing and sampling the circuit on the numerical simulator Stim.
  • Decoding & analysis: uses either a standard decoder of choice or Riverlane's proprietary ones to decode measurement samples, apply corrections and produce interpretable relevant metrics.

Installation guide

deltakit is publicly available on PyPI and can be locally installed with pip:

pip install deltakit

Quick Start - Performing a QEC memory experiment on a local machine

deltakit helps with the design and execution of complete QEC experiments. The first step is to define an encoding process from a quantum circuit and a parametrisable code chosen from a standard family. For instance, here we use the rotated surface code from the Calderbank–Shor–Steane (CSS) family. The next step is to declare a QPU instance together with a noise model and a native gate set to compile the circuit to. This produces a QPU-compliant noisy circuit that can be executed either on numerical simulators (Stim) or physical hardware to generate noisy bitstring samples. The final step is to apply the decoding process on these bitstrings and correct the circuit. In the following example, a Minimum Weight Perfect Matching-based decoder publicly available from the PyMatching library is used and the logical error probability (LEP) is generated for interpretation.

from deltakit.circuit.gates import PauliBasis
from deltakit.decode import PyMatchingDecoder
from deltakit.decode.analysis import run_decoding_on_circuit
from deltakit.explorer.analysis import calculate_lep_and_lep_stddev
from deltakit.explorer.codes import RotatedPlanarCode, css_code_memory_circuit
from deltakit.explorer.qpu import QPU, ToyNoise

# Step 1. Encoding
# Create a noisy memory circuit with the rotated planar code
d = 3  # Code distance.
rplanar = RotatedPlanarCode(width=d, height=d)
circuit = css_code_memory_circuit(rplanar, num_rounds=d, logical_basis=PauliBasis.Z)

# Step 2. Declare a noisy QPU instance
qpu = QPU(circuit.qubits, noise_model=ToyNoise(p=0.01))
noisy_circuit = qpu.compile_and_add_noise_to_circuit(circuit)

# Step 3. Perform simulation and correct the measured observable flips with a decoder
num_shots, batch_size = 100_000, 10_000
decoder, noisy_circuit = PyMatchingDecoder.construct_decoder_and_stim_circuit(noisy_circuit)
result = run_decoding_on_circuit(
    noisy_circuit, num_shots, decoder, batch_size, min_fails=100
)

# Step 4. Print relevant results
fails = result["fails"]
lep, lep_stddev = calculate_lep_and_lep_stddev(fails, num_shots)
print(f"LEP = {lep:.5g} ± {lep_stddev:.5g}")

Performing an online and remote QEC experiment

deltakit allows access to advanced simulation capabilities on the cloud platform via token authentication. To generate a personal access token, please follow the steps described on the Deltakit website. The generated token can be registered locally by executing the following code once.

from deltakit.explorer import Client

Client.set_token("<your-token>")

N.B.set_token does not need to be called again, except in case of token revocation.

An instance of the cloud API is required to execute a remote experiment:

from deltakit.explorer.codes import css_code_stability_circuit, RotatedPlanarCode
from deltakit.circuit.gates import PauliBasis
from deltakit.explorer import Client

# Instantiate a cloud client.
# A token needs to be registered first.
client = Client.get_instance()

# Generate a stability experiment with the rotated planar code.
circuit = css_code_stability_circuit(
    RotatedPlanarCode(3, 3),
    num_rounds=3,
    logical_basis=PauliBasis.X,
    client=client
)

# Display the resulting circuit
print(circuit)

Contributing

There are various ways to contribute to deltakit:

  • Submitting issues: To submit bug reports or feature requests, please open a GitHub Issue in the relevant Deltakit package repository. For example, if your query is related to deltakit-compile, please open an Issue in the deltakit-compile repository, and similarly for issues related to deltakit-visualise and other Deltakit packages. If the issue does not fall under a specific Deltakit package, you can report it in the issue tracker of this repository. This is the appropriate place to also report issues about documentation related to any Deltakit package.
  • Developing in deltakit: To learn more about how to develop within deltakit, please refer to contributing guidelines.
  • Security: For any security concern, please see our security policy.

License

This project is distributed under the Apache 2.0 License.

Citation

If you find this toolkit useful, please consider citing it:

@software{deltakit,
  author = {Prawiroatmodjo, Guen and Burton, Angela and Suau, Adrien and Nnadi, Chidi and Bracken Ziad, Abbas and Melvin, Adam and Richardson, Adam and Walayat, Adnaan and Moylett, Alex and Virbule, Alise and Safehian, AmirReza and Patterson, Andrew and Buyskikh, Anton and Ruben, Archi and Barber, Ben and Reid, Brendan and Manuel, Cai Rees and Seremet, Dan and Byfield, David and Matekole, Elisha and Gallardo, Gabriel and Geher, Gyorgy and Turner, Jack and Lal, Jatin and Camps, Joan and Majaniemi, Joonas and Yates, Joseph and Johar, Kauser and Barnes, Kenton and Caune, Laura and Zigante, Lewis and Skoric, Luka and Jastrzebski, Marcin and Ghibaudi, Marco and Turner, Mark and Haberland, Matt and Stafford, Matthew and Blunt, Nick and Gillett, Nicole and Crawford, Ophelia and McBrien, Philip and Ishtiaq, Samin and Protasov, Stanislav and Wolanski, Stasiu and Hartley, Tom},
  title        = {Deltakit},
  month        = sep,
  year         = 2025,
  publisher    = {Zenodo},
  doi          = {10.5281/zenodo.17145113},
  url          = {https://doi.org/10.5281/zenodo.17145113},
}

Metadata

Release files for deltakit 0.10.2

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 0.10.2
File Size Uploaded
deltakit-0.10.2.tar.gz 19.3 kB Details

Built distribution (wheel)

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

Total release size: 36.8 kB

Release files / deltakit-0.10.2.tar.gz

Download URL deltakit-0.10.2.tar.gz
Size 19.3 kB
Tags Source
SHA-256 checksum
How to use checksums
7e5524c8f18ed44b60b6dccf31a3ee7e2a37278eb36d6cf581c897211ef4a267
BLAKE2b-256 checksum
How to use checksums
43931acbbff6ec74845867e2f6a1c844bd16596e808ab2e153d2266f0c03d3ab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 12, 2026.

Transparency log

Release files / deltakit-0.10.2-py3-none-any.whl

Download URL deltakit-0.10.2-py3-none-any.whl
Size 17.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2543b00bdcba4d5134adfcd31ccf3cd43053a7faae21c28ba5c5c34f1bb76aae
BLAKE2b-256 checksum
How to use checksums
afbef07df14f77d38964b6ac5c1c723608b4cdadb5534d46f24b177e15dda403
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 12, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.10.2 This release

2 release files

0.10.1

2 release files

0.9.0

2 release files

0.8.0

1 release file

0.7.1

2 release files

0.7.0

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.0.0

2 release files

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