boundlab.zonoq#

The quadratic zonotope domain: correlated linear plus quadratic terms.

A ZonoQ pairs a linear zonotope with a quadratic form over the same error symbols,

\[x \;=\; \sum_i L_i \varepsilon_i \;+\; \sum_{ij} Q_{ij}\, \varepsilon_i \varepsilon_j ,\]

so one matrix product of two zonotopes can be represented exactly (\(L^{(1)} \otimes L^{(2)}\) lands in \(Q\)) instead of being concretized on the spot. Concretization of \(Q\) still exploits \(\varepsilon_i^2 \in [0, 1]\) on the diagonal, and postponing it lets later linear layers reshape the quadratic mass before it is ever collapsed.

Functions

keep_zonoq_with_zono

after_each normalizer: fresh Noise becomes new Zono symbols (quadratic mass stays where the matmul handlers put it).

precise_lbub

Return the built-in sound bounds without the optional Gurobi path.

Classes

Matmul

ZonoQ × ZonoQ product: \(L_1 L_2\) exactly into the quadratic part; \(L Q\), \(Q L\) and \(Q Q\) terms box-bounded as noise (degree ≥ 3 has no representation here).

MatmulExtraZono

Matrix product for a ZonoQ with an independent Zono remainder.

QGenerator

Coefficients of \(\sum_{ij} T_{\cdot ij}\, \varepsilon_i \varepsilon_j\).

Quad

Quadratic zonotope sum_ij gen[..., i, j] * eps_i * eps_j.

ZonoQ

Correlated linear and quadratic zonotope terms.

Modules

generator

Quadratic coefficient storage for Quad.

quad

The pure-quadratic component \(\sum_{ij} Q_{ij} \varepsilon_i \varepsilon_j\).

matmul

Matrix products that keep the quadratic term symbolic.