"""Clifford, transition, local mixing and Green-form gates for the 8D candidate. Classical broken-phase EFT only; no quantum-consistency claim. """ from pathlib import Path import itertools,json,hashlib import numpy as np import sympy as sy from scipy import sparse as ss ROOT=Path(__file__).resolve().parents[2];OUT=ROOT/'results/ghu_action_20261012' OUT.mkdir(parents=True,exist_ok=True) checks=[] def ck(name,ok,**details): checks.append(dict(name=name,passed=bool(ok),**details)) if not ok:raise AssertionError(name) def eq(a,b,tol=2e-12): if ss.issparse(a): d=a-b;d.eliminate_zeros();return not d.nnz or np.max(abs(d.data))