CQ

CQ#

class discopy.quantum.channel.CQ(classical=Dim(1), quantum=Dim(1))[source]#

Bases: object

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

Parameters:
  • classical (Dim) – Classical dimension of the type.

  • quantum (Dim) – Quantum dimension of the type.

Example

>>> CQ(Dim(2), Dim(3)) @ CQ(Dim(4), Dim(5))
CQ(classical=Dim(2, 4), quantum=Dim(3, 5))
to_dim()[source]#

The underlying dimension of the system, i.e. the classical dimension tensored with the square of the quantum dimension.

Example

>>> assert CQ(Dim(2), Dim(3)).to_dim() == Dim(2, 3, 3)
Return type:

Dim

tensor(*others)[source]#

The tensor of a classical-quantum dimension with some others.

Parameters:

others – The other types with which to tensor.