QuEPP¶
- class QuEPP(truncation_order=2, coefficient_threshold=None, sampling='montecarlo', n_samples=200, seed=None, n_twirls=10, bind_before_mitigation=False)[source]¶
Bases:
QEMProtocolQuantum Enhanced Pauli Propagation (QuEPP) error mitigation.
Decomposes the target circuit into Clifford + non-Clifford parts via Clifford Perturbation Theory (CPT), classically simulates the low-order Pauli paths, and uses noisy quantum execution to correct the truncation bias through an empirical rescaling factor η.
- Parameters:
truncation_order (
int) – Maximum number of sine branches in the CPT expansion (K_T). Higher values reduce bias at the cost of more auxiliary circuits. Ignored whensampling="montecarlo".coefficient_threshold (
float|None) – Prune paths whose absolute weight falls below this value during DFS enumeration. Only used withsampling="exhaustive".sampling (
str) – Path selection strategy —"montecarlo"(default) or"exhaustive".n_samples (
int) – Number of Monte Carlo path samples (default 200).seed (
int|None) – RNG seed for Monte Carlo reproducibility.n_twirls (
int) – Number of Pauli twirling samples. When non-zero, the pipeline builder appends aPauliTwirlStage. Default10.bind_before_mitigation (
bool) – WhenFalse(default), QuEPP runs on the parametric circuit and produces symbolically-weighted paths (using QiskitParameterExpressionarithmetic) that are later bound by the parameter-binding stage. Set toTrueto bind parameters first and mitigate per-parameter-set.
Attributes Summary
Methods Summary
compute_eta(classical_values, ensemble_noisy)Compute the rescaling factor η from noisy/ideal ratios.
dry_expand(dag[, observable])Analytic path: emit
1 + n_pathsplaceholder DAGs, no Clifford sim.evaluate_symbolic_weights(per_obs_entry, ...)Substitute concrete parameter values into symbolic weight expressions.
expand(dag[, observable])Build path DAGs and per-observable classical context.
post_reduce(contexts)Hook called after all per-group
reducecalls in an evaluation.reduce(quantum_results, context)Combine quantum results with per-observable classical context(s) into a list of mitigated expectation values.
Attributes Documentation
- name¶
Methods Documentation
- static compute_eta(classical_values, ensemble_noisy, min_eta=0.1)[source]¶
Compute the rescaling factor η from noisy/ideal ratios.
- dry_expand(dag, observable=None)[source]¶
Analytic path: emit
1 + n_pathsplaceholder DAGs, no Clifford sim.Runs the same preprocessing + per-observable path enumeration as
expand()to get an accurate fan-out factor, then skips the per-path DAG surgery and Clifford ensemble simulation — the two dominant costs — and reuses the inputdagas a placeholder for every emitted slot.n_pathsreflects the deduplicated count across all observables.- Return type:
tuple[tuple[DAGCircuit,...],dict]
- static evaluate_symbolic_weights(per_obs_entry, symbols, param_values)[source]¶
Substitute concrete parameter values into symbolic weight expressions.
Operates on a single
per_obsslot. symbols are the QiskitParameterobjects referenced by the weight expressions; param_values are their numeric values in the same positional order.- Return type:
- expand(dag, observable=None)[source]¶
Build path DAGs and per-observable classical context.
Preprocessing and Clifford tableau construction run once; path enumeration and classical simulation run per observable. Paths sharing a
branchestuple produce the same Clifford circuit and are deduped across observables.- Return type:
tuple[tuple[DAGCircuit,...],dict]
- post_reduce(contexts)[source]¶
Hook called after all per-group
reducecalls in an evaluation.Protocols can override this to inspect the collected contexts and emit summary diagnostics (e.g. signal-destruction warnings).
- Return type:
- reduce(quantum_results, context)[source]¶
Combine quantum results with per-observable classical context(s) into a list of mitigated expectation values.
The context’s
per_obslist carries one entry per observable; each entry has its owndag_indicesslicingquantum_results, its ownclassical_valuesandweights, and produces one mitigated value via the QuEPP η formula.