channel#
Implements classical-quantum channels.
Summary#
A classical-quantum dimension is a pair of dimensions |
|
A channel is a tensor with |
|
A channel functor is a tensor functor into classical-quantum channels. |
Functions
Note
Channel
implements the classical-quantum processes of
Coecke and Kissinger [CK17].
Objects are given by a quantum dimension Q
(a.k.a. double wires)
and a classical dimension C
(a.k.a. single wires).
Arrows are given by arrays of the appropriate shape, see Channel
.
For example, states of type Q
are density matrices:
Example
>>> from discopy.quantum import Ket, H
>>> (Ket(0) >> H).eval(mixed=True).round(1)
Channel([0.5+0.j, 0.5+0.j, 0.5+0.j, 0.5+0.j], dom=CQ(), cod=Q(Dim(2)))