Skip to content

FockShadow ​

Cross-layer agreement with the Gaussian engine, and Hudson as a regression

5/5 passed in 1265ms

TestWhat it doesResult
test_coherent_agreesCoherent, 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_shadowThe Gaussian shadow of |1> from moments() is Thermal(1), non-negative everywhere, while |1> is negative at the origin.✅ pass
test_hudsonSeven 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_truncatedAt 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_agreesMoments 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