1
0
mirror of https://github.com/kalmarek/PropertyT.jl.git synced 2024-11-22 08:00:28 +01:00

preserve trace when diagonalizing M_orb

This commit is contained in:
Marek Kaluba 2023-03-19 20:39:43 +01:00
parent a5f5a4ea35
commit bacd170504
No known key found for this signature in database
GPG Key ID: 8BF1A3855328FC15

View File

@ -225,8 +225,14 @@ function sos_problem_primal(
u = dot(U, iv)
M_orb = invariant_constraint!(M_orb, basis(parent(elt)), cnstrs, iv)
Ms = SymbolicWedderburn.diagonalize!(Ms, M_orb, wedderburn)
SparseArrays.droptol!.(Ms, 10 * eps(T) * max(size(M_orb)...))
Ms = SymbolicWedderburn.diagonalize!(
Ms,
M_orb,
wedderburn;
trace_preserving = true,
)
# SparseArrays.droptol!.(Ms, 10 * eps(T) * max(size(M_orb)...))
# @info [nnz(m) / length(m) for m in Ms]