Spider#
- class discopy.quantum.zx.Spider(n_legs_in, n_legs_out, phase=0, name=None)[source]#
Bases:
BoxAbstract spider box.
- property phase#
Phase of a spider.
- classmethod make_spiders(n_legs_in, n_legs_out, phase=0)[source]#
Construct spider using the generators of the Frobenius algebra.
Example
>>> from discopy.drawing import equation >>> orig = Z(4, 3, 0.5) >>> decomp = Z.make_spiders(4, 3, 0.5) >>> equation(orig, decomp, symbol='->', ... path='docs/_static/imgs/spider-decomp.png')