Skip to main content

Mitiq logo

build Documentation Status codecov PyPI version arXiv Downloads License Repository Unitary Foundation Discord Chat

Mitiq [mitt • tick] is a Python toolkit for implementing error mitigation techniques on quantum computers.

Current quantum computers are noisy due to interactions with the environment, imperfect gate applications, state preparation and measurement errors, etc. Error mitigation seeks to reduce these effects at the software level by compiling quantum programs in clever ways.

Want to know more?

  • Check out our documentation.
  • For code, repo, or theory questions, especially those requiring more detailed responses, submit a Discussion.
  • For casual or time sensitive questions, chat with mitiq developers on the #mitiq channel on Discord.
  • Contributions to Mitiq are eligible for compensation! More details here, and all payouts can be found on our wiki!

Quickstart

Installation

pip install mitiq

Example

Define a function which takes a circuit as input and returns an expectation value you want to compute, then use Mitiq to mitigate errors.

import cirq
from mitiq import zne, benchmarks


def execute(circuit, noise_level=0.005):
    """Returns Tr[ρ |0⟩⟨0|] where ρ is the state prepared by the circuit
    with depolarizing noise."""
    noisy_circuit = circuit.with_noise(cirq.depolarize(p=noise_level))
    return (
        cirq.DensityMatrixSimulator()
        .simulate(noisy_circuit)
        .final_density_matrix[0, 0]
        .real
    )


circuit = benchmarks.generate_rb_circuits(n_qubits=1, num_cliffords=50)[0]

true_value = execute(circuit, noise_level=0.0)      # Ideal quantum computer
noisy_value = execute(circuit)                      # Noisy quantum computer
zne_value = zne.execute_with_zne(circuit, execute)  # Noisy quantum computer + Mitiq

print(f"Error w/o  Mitiq: {abs((true_value - noisy_value) / true_value):.3f}")
print(f"Error w Mitiq:    {abs((true_value - zne_value) / true_value):.3f}")

Sample output:

Error w/o  Mitiq: 0.264
Error w Mitiq:    0.073

Calibration

Unsure which error mitigation technique or parameters to use? Try out the calibration module demonstrated below to help find the best parameters for your particular backend!

See our guides and examples for more explanation, techniques, and benchmarks.

Quick Tour

Error mitigation techniques

You can check out currently available quantum error mitigation techniques by calling

mitiq.qem_methods()
Technique Documentation Mitiq module Paper Reference(s)
Zero-noise extrapolation ZNE mitiq.zne 1611.09301
1612.02058
1805.04492
Probabilistic error cancellation PEC mitiq.pec 1612.02058
1712.09271
1905.10135
(Variable-noise) Clifford data regression CDR mitiq.cdr 2005.10189
2011.01157
Digital dynamical decoupling DDD mitiq.ddd 9803057
1807.08768
Readout-error mitigation REM mitiq.rem 1907.08518
2006.14044
Quantum Subspace Expansion QSE mitiq.qse 1903.05786
Layerwise Richardson Extrapolation LRE mitiq.lre 2402.04000

The following techniques are experimental and must be imported via from mitiq import experimental. Experimental techniques are not covered by mitiq's semantic versioning guarantees. A technique graduates to stable once it has broad test coverage, documented user guides, and has seen real-world validation on hardware or well-studied noise models. If you are using an experimental technique and would like to help it graduate, please open an issue or contribute to the discussion on GitHub.

Technique Documentation Mitiq module Paper Reference(s)
Robust Shadow Estimation RSE mitiq.experimental.shadows 2011.09636
2002.08953
Probabilistic Error Amplification PEA mitiq.experimental.pea Nature
Virtual Distillation VD mitiq.experimental.vd APS
Twirled Readout Error eXtinction TREX mitiq.experimental.trex 2012.09738
Debiasing DEB mitiq.experimental.deb 2301.07233

In addition, we also have Pauli Twirling which is a noise tailoring technique:

Noise-tailoring Technique Documentation Mitiq module Paper Reference(s)
Pauli Twirling PT mitiq.pt 1512.01098

If there is a technique you are looking for not listed here, please file a feature request.

Interface

We refer to any python quantum programming SDK you can write quantum circuits in as a frontend, and any quantum computer / simulator you can simulate circuits on as a backend.

Supported frontends

Cirq Qiskit pyQuil Braket PennyLane Qibo OpenQASM 3
Cirq logo Qiskit logo Rigetti logo AWS logo PennyLane logo Qibo logo

You can install Mitiq support for these frontends by specifying them during installation, as optional extras, along with the main package. To install Mitiq with one or more frontends, you can specify each frontend in square brackets as part of the installation command.

For example, to install Mitiq with support for Qiskit and Qibo:

pip install mitiq[qiskit,qibo]

Here is an up-to-date list of supported frontends.

Note: Currently, Cirq is a core requirement of Mitiq and is installed when you pip install mitiq.

Supported backends

You can use Mitiq with any backend you have access to that can interface with supported frontends.

Citing Mitiq

If you use Mitiq in your research, please reference the Mitiq whitepaper using the bibtex entry found in CITATION.bib.

A list of papers citing Mitiq can be found on Google Scholar / Semantic Scholar.

License

GNU GPL v.3.0.

Contributing

We welcome contributions to Mitiq including bug fixes, feature requests, etc. To get started, check out our contribution guidelines and/or documentation guidelines.

Contributions of all kinds are welcome! We accept AI-assissted contributions, and we ask contributors to be transparent about how they are using AI tooling to help reviewers best review contributions. See the contributing documentation for more details on the policy.

Contributors ✨

Thank you to all of the wonderful people that have made this project possible. Non-code contributors are also much appreciated, and are listed here. Thank you to

Metadata

Release files for mitiq 1.1.0

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

Source distribution (sdist)

Source distribution for mitiq 1.1.0
File Size Uploaded
mitiq-1.1.0.tar.gz 299.5 kB Details

Built distribution (wheel)

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

Total release size: 695.1 kB

Release files / mitiq-1.1.0.tar.gz

Download URL mitiq-1.1.0.tar.gz
Size 299.5 kB
Tags Source
SHA-256 checksum
How to use checksums
4db99d4667bd7f606e59f3715ecfccc37992ed146d1c8d373023405ff9ee38f0
BLAKE2b-256 checksum
How to use checksums
6ff0ddcec894c42fa50eca60ba1880dfc0f24c0e8d7bda2435f6ead29591e344
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 Sep 4, 2026.

Transparency log

Release files / mitiq-1.1.0-py3-none-any.whl

Download URL mitiq-1.1.0-py3-none-any.whl
Size 395.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
353807dfec1ba96c2814d2e6e3b4d2456eb9b37e07facb856f7b5a8bc0d10305
BLAKE2b-256 checksum
How to use checksums
81346a6d9255f55a5b56a649f06dccb3cd2f705af7cde1a1da78890e845751d9
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 Sep 4, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files

1.0.0

2 release files

0.48.1

2 release files

0.45.1

2 release files

0.45.0

2 release files

0.43.0

2 release files

0.42.0

2 release files

0.40.0

2 release files

0.34.0

2 release files

0.33.0

2 release files

0.32.0

2 release files

0.30.0

2 release files

0.26.0

2 release files

0.22.0

2 release files

0.21.0

2 release files

0.20.0

2 release files

0.15.0

2 release files

0.13.0

2 release files

0.12.0

2 release files

0.11.1

2 release files

0.10.0

2 release files

0.9.3

2 release files

0.9.2

2 release files

0.9.1

2 release files

0.9.0

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.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