quantum.cqmap#

Implements classical-quantum maps.

CQMap implements the classical-quantum processes of Picturing Quantum Processes, Coecke and Kissinger (2018). 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 CQMap. For example, states of type Q are density matrices:

>>> from discopy.quantum import Ket, H
>>> (Ket(0) >> H).eval(mixed=True).round(1)
CQMap(dom=CQ(), cod=Q(Dim(2)), array=[0.5+0.j, 0.5+0.j, 0.5+0.j, 0.5+0.j])

discopy.quantum.cqmap.CQ([classical, quantum])

Implements the dimensions of classical-quantum systems.

discopy.quantum.cqmap.C([dim])

Implements the classical dimension of a classical-quantum system, see CQ.

discopy.quantum.cqmap.Q([dim])

Implements the quantum dimension of a classical-quantum system, see CQ.

discopy.quantum.cqmap.CQMap(dom, cod[, ...])

Implements classical-quantum maps.

discopy.quantum.cqmap.Functor([ob, ar])

Functors from Circuit into CQMap.