TracedCategory

TracedCategory#

class discopy.abc.TracedCategory[source]#

Bases: MonoidalCategory, Generic

A traced category is a MonoidalCategory with a method trace for the partial trace of a morphism over some objects.

abstract trace(n=1, left=False)[source]#

The trace of a morphism, to be instantiated.

Parameters:
  • n (int) – The number of objects to trace over.

  • left (bool) – Whether to trace the wires on the left or right.

Return type:

TracedCategory