qrunch.quantum.error_mitigation

Module containing different error mitigation strategies.

Classes

EstimatorErrorMitigatorSubCreator

Creator for error mitigators.

class EstimatorErrorMitigatorSubCreator

Bases: Generic[T]

Creator for error mitigators.

__init__(parent: T, field_name: str) None

Initialize the sub-creator.

Parameters:
  • parent (T) – The parent object to which the error mitigator will be added.

  • field_name (str) – The name of the field in the parent object to which the error mitigator will be added.

Return type:

None

pauli_noise_cancellation(noise_model: Literal['amplitude damping', 'dephasing', 'depolarization'], single_qubit_error: float, multi_qubit_error: float, spam_error: float = 0) T

Set the error mitigator to PauliNoiseCancellationEstimatorErrorMitigator, implementing Pauli Noise Cancellation (PNC).

Pauli Noise Cancellation is a pre-processing error mitigation technique that aims to suppress the effect of Pauli noise in a quantum circuit. It does not modify the circuit that runs on the hardware, but instead transforms the observable being measured. The expectation value of this new, transformed observable on the noisy hardware approximates the true expectation value of the original observable on an ideal, noise-free device.

The core principle is to model the noise of each gate as a Pauli channel. The method then mathematically “propagates” this noise forward through the remainder of the circuit to determine its net effect at the time of measurement. The inverse of this propagated noise channel is then applied to the observable. This process is repeated for every gate in the circuit, effectively absorbing the anticipated noise effects into a new, more complex observable.

This implementation makes a key approximation for efficiency: when propagating the noise from a given gate, the subsequent portion of the circuit is compiled into a Clifford circuit. This allows the noise propagation to be simulated

efficiently using the stabilizer formalism.

This method is particularly effective for mitigating coherent Pauli errors and incoherent depolarizing noise.

Parameters:
  • noise_model (Literal['amplitude damping', 'dephasing', 'depolarization']) – The noise model to use. If ‘from_backend’, the noise model will be taken from the backend. Else, the errors should be set manually using the other keywords.

  • single_qubit_error (float) – The single qubit error rate.

  • multi_qubit_error (float) – The multi qubit error rate.

  • spam_error (float) – The spam error rate.

Return type:

T

symmetry_adapted(tolerance: float = 1e-10) T

Set the error mitigator to a symmetry-adapted error mitigator.

This error mitigator performs a symmetry-adapted pre-processing. The resulting operator is equivalent to the normal qubit-space operator within each sub Hilbert space with constant Hamming weight, i.e., constant number of electrons. However, fewer measurements are required to measure the energy.

Parameters:

tolerance (float) – Tolerance to use when removing small terms. Defaults to 1e-10.

Return type:

T

Modules

error_mitigation_protocols

Module containing interfaces needed for error mitigation.

estimator

Module containing error mitigators used in estimators.

sampler

Module containing error mitigators used in samplers.