Skip to main content

cqlib_core/error_mitigation/
mod.rs

1// This code is part of Cqlib.
2//
3// (C) Copyright China Telecom Quantum Group 2026
4//
5// This code is licensed under the Apache License, Version 2.0. You may
6// obtain a copy of this license in the LICENSE.txt file in the root directory
7// of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
8//
9// Any modifications or derivative works of this code must retain this
10// copyright notice, and modified files need to carry a notice indicating
11// that they have been altered from the originals.
12
13use crate::circuit::Circuit;
14use crate::qis::Hamiltonian;
15
16pub mod error;
17pub mod unified;
18pub mod virtual_distillation;
19pub mod zne_mitigation;
20
21pub type Estimator<'a> = dyn Fn(&Circuit, Option<&Hamiltonian>, Option<usize>) -> (f64, f64) + 'a;
22
23pub use error::ErrorMitigationError;
24pub use unified::{
25    ErrorMitigation, MitigatedResult, MitigationMethod, ProcessArgs, RunArgs,
26    VirtualDistillationConfig, ZneConfig,
27};
28pub use virtual_distillation::VirtualDistillation;
29pub use zne_mitigation::{ExtrapolateMethod, ZNEMitigation};
30
31#[cfg(test)]
32#[path = "./error_mitigation_test.rs"]
33mod error_mitigation_test;