From 8507da2dee17d7ab42e6b791f3dc7ff8b25e9531 Mon Sep 17 00:00:00 2001 From: Nao Pross Date: Sat, 8 Jun 2024 14:49:51 +0200 Subject: Temporarily disable half_newton_polytope --- sumofsquares/canon.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sumofsquares/canon.py b/sumofsquares/canon.py index bec9cf0..97a271b 100644 --- a/sumofsquares/canon.py +++ b/sumofsquares/canon.py @@ -127,10 +127,10 @@ class PutinarPSatz(Canonicalization): if d.read(state).scalar().constant() % 2 != 0: d += 1 - monomials = x.combinations(poly.arange(d + 1)).half_newton_polytope(x) - coeffs = opt_variable_from_name(rf"\gamma_{i},c", shape=monomials.shape) + monomials = x.combinations(poly.arange(d + 1)) #.half_newton_polytope(x) + coeffs = opt_variable_from_name(rf"\gamma_{i},z", shape=monomials.shape) - multiplier = poly.give_name(coeffs.T @ monomials, rf"\gamma_{i},c") + multiplier = poly.give_name(coeffs.T @ monomials, rf"\gamma_{i},z") new_constr = constr.expression - multiplier # Add other terms of the quadratic module @@ -162,7 +162,7 @@ class PutinarPSatz(Canonicalization): # TODO: better documentation # Generate monomials of up to degree d and take only monomials # that are in half of the newton polytope - monomials = x.combinations(poly.arange(d + 1)).half_newton_polytope(x) + monomials = x.combinations(poly.arange(d + 1)) # .half_newton_polytope(x) coeffs = opt_variable_from_name(rf"\gamma_{i},{j}", shape=monomials.shape) multiplier = poly.give_name(coeffs.T @ monomials, rf"\gamma_{i},{j}") -- cgit v1.2.1