ClassicalGate

Contents

ClassicalGate#

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

Bases: SelfConjugate

Classical gates, i.e. from digits to digits.

>>> from sympy import symbols
>>> array = symbols("a b c d")
>>> f = ClassicalGate('f', bit, bit, array)
>>> f.data
(a, b, c, d)
>>> f.lambdify(*array)(1, 2, 3, 4).data
(1, 2, 3, 4)
Parameters:
  • dom (T) –

  • cod (T) –