qrunch.quantum.operators.kraus

Module for handling Kraus operations used for error mitigation.

Classes

KrausOperation

Class for handling Kraus operations.

class KrausOperation

Bases: object

Class for handling Kraus operations.

When given a noise model as a list of Kraus operators, one can use this class to apply the inverse of the noise model to an operator, making the operator robust towards the noise of the said noise model.

__init__(coefficient_maps: list[dict[PauliString, complex]]) None

Initialize a KrausOperation.

Parameters:
  • coefficient_maps (list[dict[PauliString, complex]]) – representation of Kraus operators in the form of dictionaries, e.g. one-qubit depolarization: [{I: sqrt(1-p)}, {X: sqrt(p/3)}, {Y: sqrt(p/3)}, {Z: sqrt(p/3)}]

  • num_qubits – Total number of qubits the operation acts on.

Return type:

None

apply_inverse_noise(observable: HermitianPauliSum) HermitianPauliSum

Compute \(\mathcal{E}^{*-1}(H)\) for the given observable.

This applies the inverse of the noise model to the observable making it robust against that noise when estimating its expectation values.

Parameters:

observable (HermitianPauliSum)

Return type:

HermitianPauliSum

average_fidelity() float

Return average fidelity.

Return type:

float

property coefficient_maps: list[dict[PauliString, complex]]

Return the coefficient_maps.

combine(other: KrausOperation) KrausOperation

Combine KrausOperation with other KrausOperation.

Parameters:

other (KrausOperation)

Return type:

KrausOperation

entanglement_fidelity() float

Return entanglement fidelity.

Return type:

float

is_diagonal() bool

Return True if the operation is diagonal.

Return type:

bool

property kraus_strings: list[PauliString]

Return the Kraus strings.

property num_qubits: int | None

Return the number of qubits, returns None if identity operator.