FockShadow
Cross-layer agreement with the Gaussian engine, and Hudson as a regression
5/5 passed in 1265ms
| Test | What it does | Result |
|---|---|---|
test_coherent_agrees | Coherent, squeezed, thermal, displaced squeezed and Kraus-lossy squeezed states match the Gaussian layer's Wigner pointwise (loss against thermal-loss at xi = 0), squeezed to 1e-6 and the rest to 1e-9. | ✅ pass |
test_gaussian_shadow | The Gaussian shadow of |1> from moments() is Thermal(1), non-negative everywhere, while |1> is negative at the origin. | ✅ pass |
test_hudson | Seven Gaussian states inside their cutoff score zero negativity volume and zero non-Gaussianity to 1e-6, with no Wigner value below -1e-6. | ✅ pass |
test_hudson_truncated | At cutoff 40 the r = 1.0 squeezed vacuum fails the Hudson assertions by two orders and r = 1.5 scores 0.7 bits of non-Gaussianity; 120 levels restore both. | ✅ pass |
test_squeezed_agrees | Moments match the Gaussian layer: coherent mean (1.0, 0.5) on a bona fide I/2, squeezed variances e^-2r/2 (x) and e^2r/2 (p), thermal (nbar + 1/2) I with populations as eigenvalues and the same entropy, displacement through squeezing, unit trace after loss. | ✅ pass |