Box

Contents

Box#

class discopy.quantum.circuit.Box(name=None, dom=None, cod=None, data=None, *args, **kwargs)[source]#

Bases: Box[complex], Circuit

A circuit box is a tensor box in a circuit diagram.

Parameters:
  • name (str) – The name of the box.

  • dom (T) – The domain of the box.

  • cod (T) – The codomain of the box.

  • data – The array inside the box.

  • is_mixed – Whether the box is mixed.

property array#

The array of a quantum box.