qilisdk.noise.protocols

Classes

AttachmentScope

Scope describing where a noise or perturbation can be attached.

HasAllowedScopes

Protocol for types that declare their allowed attachment scopes.

SupportsTimeDerivedKraus

Protocol for types that produce duration-dependent Kraus channels.

SupportsStaticKraus

Protocol for types that expose a fixed Kraus channel.

SupportsStaticLindblad

Protocol for types that expose a fixed Lindblad generator.

SupportsTimeDerivedLindblad

Protocol for types that expose a Lindblad generator derived from time.

Module Contents

class AttachmentScope[source]

Bases: str, enum.Enum

Scope describing where a noise or perturbation can be attached.

Initialize self. See help(type(self)) for accurate signature.

GLOBAL = 'global'[source]
PER_QUBIT = 'per_qubit'[source]
PER_GATE_TYPE = 'per_gate_type'[source]
PER_GATE_TYPE_PER_QUBIT = 'per_gate_type_per_qubit'[source]
class HasAllowedScopes[source]

Bases: Protocol

Protocol for types that declare their allowed attachment scopes.

classmethod allowed_scopes() frozenset[AttachmentScope][source]

Return the attachment scopes supported by the type.

Returns:

The set of scopes where the type can be attached.

class SupportsTimeDerivedKraus[source]

Bases: Protocol

Protocol for types that produce duration-dependent Kraus channels.

as_kraus_from_duration(*, duration: float) qilisdk.noise.representations.KrausChannel[source]

Return a Kraus channel derived for a specific duration.

Parameters:

duration (float) – Duration over which the noise acts.

Returns:

The Kraus channel for the given duration.

class SupportsStaticKraus[source]

Bases: Protocol

Protocol for types that expose a fixed Kraus channel.

as_kraus() qilisdk.noise.representations.KrausChannel[source]

Return the static Kraus channel for this noise.

Returns:

The Kraus channel representation.

class SupportsStaticLindblad[source]

Bases: Protocol

Protocol for types that expose a fixed Lindblad generator.

as_lindblad() qilisdk.noise.representations.LindbladGenerator[source]

Return the Lindblad generator for this noise.

Returns:

The Lindblad generator representation.

class SupportsTimeDerivedLindblad[source]

Bases: Protocol

Protocol for types that expose a Lindblad generator derived from time.

as_lindblad_from_duration(*, duration: float) qilisdk.noise.representations.LindbladGenerator[source]

Return the Lindblad generator for this noise.

Parameters:

duration (float) – Duration over which the noise acts.

Returns:

The Lindblad generator representation.