channel

Contents

channel#

Implements classical-quantum channels.

Summary#

CQ

A classical-quantum dimension is a pair of dimensions classical and quantum.

Channel

A channel is a tensor with CQ types as dom and cod.

Functor

A channel functor is a tensor functor into classical-quantum channels.

Functions

C

Syntactic sugar for CQ(classical=dim), see CQ.

Q

Syntactic sugar for CQ(quantum=dim), see CQ.

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)))