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 1 2 9 2 1 3 o2 = -x + -x y + -x*y + -y 2 2 4 2 o2 : R |
i3 : gatePolynomial f 9 1 9 1 o3 = ((- * ([x] * [x] * [x])) + (- * (([x] * [x]) * ([y]))) + (- * (([x]) * ([y] * [y]))) + (- * ([y] * [y] * [y]))) 2 2 4 2 o3 : SumGate |
The object gatePolynomial is a method function.