Ty#
- class discopy.quantum.circuit.Ty(*t)[source]#
Bases:
TyImplement the input and output types of
Circuit.Examples
>>> assert bit == Ty(Digit(2)) >>> assert qubit == Ty(Qudit(2)) >>> assert bit @ qubit != qubit @ bit
You can construct
nqubits by taking powers ofqubit:>>> print(bit ** 2 @ qubit ** 3) bit @ bit @ qubit @ qubit @ qubit