Macaulay2 » Documentation
Packages » NumericalAlgebraicGeometry :: polySystem(GateSystem,PolynomialRing)
next | previous | forward | backward | up | index | toc

polySystem(GateSystem,PolynomialRing) -- classical polynomial system associated to a gate system

Synopsis

Description

Given a gate system and a polynomial ring, this function constructs a classical (represented via M2 polynomial map) polynomial system.

i1 : variables = declareVariable \ {x,y}

o1 = {x, y}

o1 : List
i2 : G = gateSystem(matrix{variables}, matrix{{x*y-1},{x^3+y^2-2},{x^2+2*y-3}})

o2 = gate system: 2 input(s) ---> 3 output(s)

o2 : GateSystem
i3 : R = CC[X,Y]

o3 = R

o3 : PolynomialRing
i4 : F = polySystem(G,R)

o4 = F

o4 : PolySystem
i5 : evaluate(F,matrix{{1,2}})

o5 = | 1 |
     | 3 |
     | 2 |

                3         1
o5 : Matrix CC    <-- CC
              53        53
i6 : evaluate(G,matrix{{1,2}})

o6 = | 1 3 2 |

              1       3
o6 : Matrix ZZ  <-- ZZ

The ring is expected to be of the form K[x_1..x_n] or K[a_1..a_m][x_1..x_n]. In the latter case, the gate system is expected to take m parameters.

i7 : variables = declareVariable \ {x,y}

o7 = {x, y}

o7 : List
i8 : params = declareVariable \ {a,b,c}

o8 = {a, b, c}

o8 : List
i9 : G = gateSystem(matrix{params}, matrix{variables}, matrix{{x*y-1},{a*x^2+b*y^2-c}})

o9 = gate system: 2 input(s) ---> 2 output(s) (with 3 parameters)

o9 : GateSystem
i10 : R = CC[A,B,C][X,Y]

o10 = R

o10 : PolynomialRing
i11 : F = polySystem(G,R)

o11 = F

o11 : PolySystem
i12 : equations F

                   2      2
o12 = {X*Y - 1, A*X  + B*Y  - C}

o12 : List

Ways to use this method: