Macaulay2 » Documentation
Packages » SLPexpressions :: gatePolynomial
next | previous | forward | backward | up | index | toc

gatePolynomial -- creates an input gate for a given polynomial

Description

This methods creates a Gate from the given input polynomial $f$. The resulting Gate is a SumGate whose terms are product gates corresponding to monomials of $f$.

i1 : R = QQ[x,y]

o1 = R

o1 : PolynomialRing
i2 : f = random(3, R)

     9 3   9 2    3   2   7 3
o2 = -x  + -x y + -x*y  + -y
     2     4      4       4

o2 : R
i3 : gatePolynomial f

       9                         9                             3                             7
o3 = ((- * ([x] * [x] * [x])) + (- * (([x] * [x]) * ([y]))) + (- * (([x]) * ([y] * [y]))) + (- * ([y] * [y] * [y])))
       2                         4                             4                             4

o3 : SumGate

See also

Ways to use gatePolynomial:

  • gatePolynomial(Matrix)
  • gatePolynomial(RingElement)

For the programmer

The object gatePolynomial is a method function.


The source of this document is in SLPexpressions/doc.m2:220:0.