Source-linked AI summary
Mitiq: A software package for error mitigation on noisy quantum computers
Ryan LaRose, Andrea Mari, Sarah Kaiser, Peter J. Karalekas, Andre A. Alves, Piotr Czarnik, Mohamed El Mandouh, Max H. Gordon, Yousef Hindy, Aaron Robertson, Purva Thakre, Misty Wahl, Danny Samuel, Rahul Mistri, Maxime Tremblay, Nick Gardner, Nathaniel T. Stemen, Nathan Shammah, William J. Zeng
TL;DR
Near-term quantum computers need practical ways to reduce noise because fault-tolerant correction exceeds current experimental resources. Mitiq is an extensible Python toolkit that applies several mitigation methods through generic back-end interfaces, with examples showing improved results on processors and simulators. The paper also identifies method-specific performance and resource limitations.
Problem
Fault-tolerant quantum computers require physical resources beyond current experimental capabilities, motivating practical alternatives for dealing with noise on near-term devices.
Method
Mitiq is an open-source Python library that interfaces with multiple quantum programming front-ends and real or simulated back-ends while implementing zero-noise extrapolation, probabilistic error cancellation, and Clifford data regression.
Results
Mitiq’s experimental and numerical examples demonstrate improved noisy-computation results, including H2 energy surfaces closer to the noiseless curve and a PEC estimate changing from 0.0622 unmitigated to 0.0071 mitigated.
Takeaways & Limitations
Mitiq provides a unified, extensible interface for applying and comparing error mitigation techniques across quantum software frameworks and real or simulated processors.
Takeaways & Limitations
ZNE lacks general performance guarantees and can produce poor estimates when increasing noise does not yield a smooth observable curve, while PEC has exponential sampling overhead and typically requires noisy-gate tomography.
Abstract
from arXiv · showhide
We introduce Mitiq, a Python package for error mitigation on noisy quantum computers. Error mitigation techniques can reduce the impact of noise on near-term quantum computers with minimal overhead in quantum resources by relying on a mixture of quantum sampling and classical post-processing techniques. Mitiq is an extensible toolkit of different error mitigation methods, including zero-noise extrapolation, probabilistic error cancellation, and Clifford data regression. The library is designed to be compatible with generic backends and interfaces with different quantum software frameworks. We describe Mitiq using code snippets to demonstrate usage and discuss features and contribution guidelines. We present several examples demonstrating error mitigation on IBM and Rigetti superconducting quantum processors as well as on noisy simulators.
1 Introduction
Near-term quantum computers need practical noise-handling methods because fault-tolerant error correction exceeds current experimental resources. Mitiq addresses this need with an extensible, multi-framework library for implementing and benchmarking error mitigation.
- Fault-tolerant quantum computers require physical resources beyond current experimental capabilities, motivating alternative noise-handling methods.
- Existing quantum error mitigation methods include zero-noise extrapolation, probabilistic error cancellation, Clifford data regression, dynamical decoupling, randomized compiling, and subspace expansion.
- Mitiq is an open-source Python library implementing zero-noise extrapolation, probabilistic error cancellation, and Clifford data regression across multiple quantum programming front-ends and real or simulated back-ends.
- Mitiq supports Cirq, Qiskit, pyQuil, and Braket circuit types, while its modular design permits additional front-ends, back-ends, and mitigation techniques.
- The paper presents experimental and numerical examples, then details Mitiq’s mitigation modules, software information, contribution guidelines, and relationship to other error-handling techniques.
2 Getting started with Mitiq
Mitiq can be installed as a Python package and used through a generic executor interface that connects mitigation routines to supported quantum circuits and back-ends. Its workflows include zero-noise extrapolation and probabilistic error cancellation, with configurable scaling, inference, and sampling behavior.
- 2.1 Requirements and installation: Mitiq is installed through PyPI on Mac, Windows, and Linux, with Cirq, NumPy, and SciPy as core requirements and other quantum libraries as optional dependencies.
- 2.2 Main usage: Mitiq supports multiple circuit representations while using conversion functions to connect them to its internal operations and common mitigation interfaces.
- 2.2 Main usage: An executor accepts a quantum circuit and returns an observable expectation value, allowing Mitiq to treat real or simulated quantum processors as interchangeable back-ends.
- 2.2 Main usage: Users can select noise-scaling and inference techniques for ZNE; random local unitary folding and Richardson extrapolation are the defaults.
- 2.2 Main usage: Zero-noise extrapolation evaluates noise-scaled versions of an input circuit, fits a classical model to their expectation values, and returns the extrapolated zero-noise limit.
- 2.2 Main usage: Probabilistic error cancellation samples circuits from quasi-probability gate representations, executes them at the hardware’s base noise level, and combines results into an unbiased ideal-observable estimate.
3 Benchmarks with Mitiq
Mitiq demonstrates error mitigation across randomized benchmarking, molecular energy surfaces, and probabilistic error cancellation on real and simulated quantum systems. The examples show closer agreement with ideal results, while emphasizing that the randomized-benchmarking experiments are illustrative rather than rigorous method comparisons.
- Randomized benchmarking circuits: Zero-noise extrapolation was demonstrated on two-qubit randomized benchmarking circuits running on IBMQ London and Rigetti Aspen-8 processors.The experiments used 50 randomized benchmarking circuits and compared multiple extrapolation techniques after increasing noise through random local unitary folding.
- Randomized benchmarking circuits: Different inference techniques produced zero-noise estimates from noisy expectation values, with the ideal target ⟨00|ρ|00⟩ equal to 1.The plotted markers correspond to linear, quadratic, exponential, and Richardson extrapolation procedures.
- Randomized benchmarking circuits: The randomized-benchmarking experiments were intended to demonstrate applying extrapolation techniques across backends, not to rigorously compare their performance.Such a comparison would require more detailed experimental and statistical analysis.
- Potential energy surface of H2: Mitiq’s H2 simulations showed mitigated energy surfaces overlapping the true noiseless curve more closely than unmitigated surfaces.The mitigated curves used random local unitary folding with second-order polynomial inference under simulated single-qubit depolarizing noise.
- Probabilistic error cancellation example: Probabilistic error cancellation reduced the simulated expectation-value error from 0.0622 unmitigated to 0.0071.The circuit used local single-qubit depolarizing noise with p = 0.1, and the exact theoretical expectation value was zero.
4 Zero-noise extrapolation module
Mitiq’s zero-noise extrapolation module increases circuit noise at controlled scale factors, evaluates noisy expectation values, and extrapolates them to estimate the zero-noise result. It supports multiple scaling and fitting strategies, including unitary folding, parameter-noise scaling, local or global folding, and adaptive factories.
- Zero-noise extrapolation: Zero-noise extrapolation intentionally increases quantum-computation noise and extrapolates measured expectation values back to the zero-noise limit.The method uses noise scale factors λ_i to collect data, fits a curve, and estimates the noiseless expectation value.
- Zero-noise extrapolation: Mitiq implements zero-noise extrapolation through separate routines for scaling noise and fitting or extrapolating noisy expectation values.These correspond to scaling γ_i = λ_iγ_0 and fitting a curve to the resulting expectation values.
- Noise scaling: Unitary folding preserves a circuit’s ideal effect while increasing its depth by replacing gates with gate-inverse-gate sequences.Local folding applies this transformation to selected gates, whereas global folding folds the entire circuit.
- Noise scaling: Mitiq supports local, global, deterministic, random, and fidelity-based folding, with gate-selection order potentially affecting noise scaling and mitigation effectiveness.Generic scale factors fold all gates repeatedly and may fold a subset once more; fidelity-based folding accounts for unequal gate noise levels.
- Noise scaling: Parameter-noise scaling models noisy gate parameters as random variables and injects additional classical noise while preserving the parameter mean.The scaled parameter has variance λσ², and the method can be implemented through stochastic over- or under-rotations.
5 Probabilistic error cancellation module
Mitiq’s probabilistic error cancellation module represents ideal gates as quasi-probability combinations of implementable noisy operations, samples auxiliary circuits, and combines noisy results to estimate ideal expectation values. The approach can use analytical noise models or process tomography to derive the required representations.
- PEC workflow: PEC samples auxiliary circuits from quasi-probability representations, executes them on a noisy backend, and post-processes their results into an error-mitigated expectation value.Its principal additional resource is higher sampling overhead.
- Gate representations: PEC represents each ideal gate as a real weighted combination of physically implementable noisy operations.The coefficients may be negative, and the representation satisfies a trace-preserving normalization condition.
- Sampling and execution: Given gate representations for a circuit, PEC estimates ideal expectation values through Monte Carlo averages over sampled noisy circuits.Mitiq’s execute_with_pec function performs this sampling and returns an unbiased estimate of the ideal observable.
- Mitiq representation: Mitiq models implementable noisy operations as elementary gates or short gate sequences, optionally paired with completely positive trace-preserving channel matrices.OperationRepresentation stores the ideal operation together with its noisy-operation basis expansion.
- Representation construction: Quasi-probability representations can come from analytical formulas for simplified channels or numerical optimization using process tomography of implementable operations.The recommended derivation depends on how accurately a simplified hardware-noise model describes the backend.
6 Clifford data regression module
Mitiq’s CDR and vnCDR modules learn mappings from noisy to exact expectation values using classically simulable near-Clifford training circuits. CDR fits a linear model at the base noise level, while vnCDR adds measurements at multiple noise rates to learn an extrapolation model.
- CDR workflow: CDR trains a regression model on noisy quantum-computer results and exact classical results from near-Clifford circuits to mitigate an observable.The training circuits replace non-Clifford gates with Clifford gates.
- Workflow overview: The CDR workflow combines noisy and exact training results to infer the noise-free expectation value of the original observable.The workflow includes real-backend execution of auxiliary circuits and classical simulation of near-Clifford training circuits.
- CDR workflow: CDR fits noisy and exact training expectation values with the linear model y = ax + b, then applies it to the noisy observable of interest.The exact values are classically evaluated, while noisy values are obtained from a quantum computer.
- vnCDR workflow: vnCDR extends CDR by evaluating near-Clifford training circuits at several noise rates and fitting a multi-input linear extrapolation model.The noisy training values are x_i,l at rates λ_lγ_0, with λ_l ≥ 1.
- Mitiq implementation: Mitiq’s default CDR linear ansatz includes a constant term, which the paper reports has produced better mitigated results on real quantum hardware.CDR is implemented through execute_with_cdr, while vnCDR adds noise scale factors and optionally a noise-scaling method.
- Scope and implementation: The implemented CDR workflow assumes an input circuit pre-compiled into a gate set containing RZ, X, and CNOT, which is particularly suitable for IBM processors.The paper notes that this gate-set assumption may be less appropriate for other backends.
7 Additional library information
Mitiq provides multiple ways to apply error mitigation through executor modification, decorators, and composable techniques. The section also covers documentation, contributions, and the open question of whether combining techniques offers practical advantages.
- Using Mitiq: Mitiq supports executor modification through mitigate_executor, which returns an executor that applies error mitigation when called with a quantum program.The function can be imported from different modules to apply techniques such as zero-noise extrapolation or probabilistic error cancellation.
- Using Mitiq: Decorators such as zne_decorator and pec_decorator automatically apply the selected error mitigation technique when the executor is called.Multiple decorators can be stacked to combine techniques, although the practical advantage of combining them remains an open research question.
- Documentation: Mitiq provides online documentation with a User’s Guide, an API glossary, executor examples, and advanced guidance for factory objects.The API glossary is generated from formatted code comments and documents public functions and classes.
- Contributions: The project welcomes community contributions including feedback, feature requests, bug fixes, and peer-reviewed pull requests.Contributors can use GitHub issues or fork the source code and submit pull requests.
8 Discussion
The discussion emphasizes that error mitigation methods have distinct practical limitations. ZNE depends on noise behavior and circuit regime, PEC has large sampling and characterization costs, and Clifford data regression requires costly, potentially mismatched training data.
- Limitations of zero-noise extrapolation: Zero-noise extrapolation lacks general performance guarantees because extrapolation quality depends on the noise model and smoothness of measured expectation values.Measurement errors can propagate through extrapolation and significantly amplify final estimation uncertainty, increasing shot requirements.
- Limitations of zero-noise extrapolation: Zero-noise extrapolation cannot improve arbitrary circuits when the observable is nearly constant as noise increases, so applicability depends on hardware and circuit behavior.The authors identify the regime in which ZNE is effective as an ongoing research question.
- Limitations of probabilistic error cancellation: Probabilistic error cancellation is unbiased with accurate gate quasi-probability representations, but its sample count grows exponentially with circuit size and noise.PEC also requires more circuit executions than an unmitigated computation and is unsuitable in the asymptotic regime of many gates or large noise.
- Limitations of Clifford data regression: Clifford data regression is self-tuning, but training typically requires substantial quantum and classical overhead and near-Clifford circuits may respond differently to hardware noise.The technique also requires an efficient classical simulator for near-Clifford circuits.
- Related work: Experimental demonstrations have shown that zero-noise extrapolation can improve results from noisy quantum computations.The discussion places these demonstrations alongside prior work extending noise scaling and extrapolation techniques.
8.5 Differences and relations to neighbouring fields
Quantum error mitigation is related to quantum error correction, optimal control, open quantum systems, and other strategies for reducing errors, but differs in resource requirements and operating mechanisms.
- Quantum error correction: Quantum error correction creates logical qubits from multiple physical qubits and uses syndrome measurements to diagnose and correct errors below a threshold.Its drawback is the large overhead of additional physical qubits required to create logical qubits.
- Quantum optimal control: Some error mitigation methods can use post-processing, whereas quantum optimal control relies on an active feedback loop between an agent and a target system.Both fields address errors in quantum information processing but use different operating mechanisms.
- Open quantum systems: Quantum computing devices can be studied as open quantum systems that exchange energy and information with their environment.This broader framework helps situate error processes across quantum computing platforms and architectures.
- Related strategies: Other error-reduction strategies include bosonic quantum codes, autonomous error correction, and decoherence-free subspaces.These approaches tailor computational spaces or exploit environmental dynamics to support error-robust processes.
9 Conclusion
The paper introduces Mitiq as an open-source library for error mitigation on near-term quantum computers, supporting multiple software front-ends and real or simulated processors. It demonstrates mitigation experimentally and numerically, discusses three core techniques, and identifies broader benchmarking and feature expansion as future work.
- Conclusion: Mitiq is a fully open-source library for quantum error mitigation on near-term quantum computers.Its scope is aimed at practical use with current quantum computing platforms.
- Conclusion: Mitiq interfaces with Cirq, Qiskit, pyQuil, and Braket, and supports arbitrary real or simulated quantum processors available to the user.The library organizes modules around zero-noise extrapolation, probabilistic error cancellation, and Clifford data regression.
- Conclusion: Experimental and numerical examples demonstrate how error mitigation can enhance the results of noisy quantum computations.The conclusion also relates Mitiq’s techniques to other mitigation methods, quantum error correction, optimal control, and open quantum systems.
- Future work: Future work will add mitigation techniques, expand benchmarks, and improve existing modules to better understand when quantum error mitigation is beneficial.Planned improvements include alternative noise-scaling methods, inference techniques, and error-cancellation protocols.
A Executor examples
An executor accepts a quantum program and returns an expectation value as a float, providing the interface used by Mitiq's mitigation methods.
- An executor accepts a quantum program and returns an expectation value as a float.
A.1 Executors based on real hardware
Mitiq executors abstract away backend-specific execution details while returning observables from real quantum processors. Examples target IBMQ and Rigetti Aspen-8, whose execution interfaces and input assumptions differ.
- IBMQ executor: The IBMQ executor runs a two-qubit circuit and returns the probability of the ground state.It obtains the observable from counts for the ground-state bit string divided by the number of shots.
- Execution requirements: The real-hardware examples assume platform-specific access and circuit conditions, including valid accounts, reservations, or terminal measurements.IBMQ requires saved credentials, while Rigetti requires a QCS account and reservation.
- Rigetti Aspen-8 executor: The Rigetti Aspen-8 executor similarly returns the ground-state probability but requires explicit classical-memory and measurement handling.Its implementation compiles the program, runs it, and computes the all-zero outcome frequency.
- Backend abstraction: Backend-specific executor functions let Mitiq use multiple quantum processors through a common interface.The executor abstracts away details about running on a backend.
A.2 Executors based on a classical simulator
Mitiq executors can also run circuits on classical simulators, where the executor adds noise and evaluates an observable. The interface supports noisy simulation across frameworks and can adapt to different noise channels.
- Cirq simulation: A Cirq executor adds depolarizing noise, performs density-matrix simulation and sampling, and returns a PauliString expectation value.The observable is defined with cirq.PauliString and estimated from the sampled simulation.
- Noise-model flexibility: Other noise models can be substituted by changing the simulation channel, such as replacing depolarization with amplitude damping.Analogous simulator executors can be defined in Qiskit or pyQuil, although noise handling differs across libraries.
- Executor interface: Executors used with execute_with_zne or execute_with_pec must ultimately accept only the quantum program as an argument.functools.partial converts a multi-argument executor into the required single-argument form.