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: QEMProtocol

Quantum 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 when sampling="montecarlo".

  • coefficient_threshold (float | None) – Prune paths whose absolute weight falls below this value during DFS enumeration. Only used with sampling="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 a PauliTwirlStage. Default 10.

  • bind_before_mitigation (bool) – When False (default), QuEPP runs on the parametric circuit and produces symbolically-weighted paths (using Qiskit ParameterExpression arithmetic) that are later bound by the parameter-binding stage. Set to True to 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_paths placeholder 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 reduce calls 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.

Return type:

float | None

dry_expand(dag, observable=None)[source]

Analytic path: emit 1 + n_paths placeholder 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 input dag as a placeholder for every emitted slot. n_paths reflects 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_obs slot. symbols are the Qiskit Parameter objects referenced by the weight expressions; param_values are their numeric values in the same positional order.

Return type:

None

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 branches tuple 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 reduce calls in an evaluation.

Protocols can override this to inspect the collected contexts and emit summary diagnostics (e.g. signal-destruction warnings).

Return type:

None

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_obs list carries one entry per observable; each entry has its own dag_indices slicing quantum_results, its own classical_values and weights, and produces one mitigated value via the QuEPP η formula.

Return type:

list[float]