quairkit.operator.channel.base¶
The source file of the basic class for the quantum channels.
-
class quairkit.operator.channel.base.Channel(type_repr, representation=
None
, system_idx=None
, acted_system_dim=None
, check_legality=True
)¶ Basic class for quantum channels.
- Parameters:¶
- type_repr : str¶
type of a representation. should be
'choi'
,'kraus'
,'stinespring'
.- representation : Tensor | None¶
the representation of this channel. Defaults to
None
i.e. not specified.- system_idx : Iterable[Iterable[int]] | Iterable[int] | int | None¶
indices of the system on which this channel acts on. Defaults to
None
. i.e. list(range(number of acted systems)).- acted_system_dim : List[int] | int | None¶
dimension of systems that this channel acts on. Can be a list of system dimensions or an int representing the dimension of all systems. Defaults to
None
.- check_legality : bool | None¶
whether check the completeness of the representation if provided. Defaults to
True
.
- Raises:¶
ValueError – Unsupported channel representation for
type_repr
.NotImplementedError – The noisy channel can only run in density matrix mode.
TypeError – Unexpected data type for Channel representation.
Note
Assume the input dimension is the same as the output.
- property dim : int¶
Dimension of the input/output system of this channel
- property choi_repr : Tensor¶
Choi representation of a channel
- property kraus_repr : list[Tensor]¶
Kraus representation of a channel
- property stinespring_repr : Tensor¶
Stinespring representation of a channel