Bases: discopy.tensor.Tensor
A channel is a tensor with CQ types as dom and cod.
- Parameters:
array – The array of shape dom.to_dim() @ cod.to_dim()
inside the channel.
dom (C0) – The domain of the channel.
cod (C0) – The codomain of the channel.
-
ob
alias of CQ
-
dtype
alias of complex
-
to_tensor()[source]
The underlying tensor of a channel.
- Return type:
Tensor
-
classmethod measure(dim, destructive=True)[source]
Measure a quantum dimension into a classical dimension.
- Parameters:
-
- Return type:
Channel
-
classmethod encode(dim, constructive=True)[source]
Encode a classical dimension into a quantum dimension.
- Parameters:
-
- Return type:
Channel
-
classmethod double(quantum)[source]
Construct a pure quantum channel by doubling a given tensor.
- Parameters:
quantum (Tensor) – The tensor from which to make a pure quantum channel.
- Return type:
Channel
-
classmethod single(classical)[source]
Construct a pure classical channel from a given tensor.
- Parameters:
classical (Tensor) – The tensor from which to make a pure classical channel.
- Return type:
Channel
-
classmethod discard(dom)[source]
Construct the channel that traces out the quantum dimension and takes
the marginal distribution over the classical dimension.
- Parameters:
dom (CQ) – The classical-quantum dimension to discard.
- Return type:
Channel
-
ar
alias of Channel