Skip to content

FuzzGauss ​

GaussianState: every returned state must satisfy V + i*Omega/2 >= 0

5/5 passed in 60ms

TestWhat it doesResult
test_gauss_boundaryThermal loss and the beamsplitter stay physical at their closed t edges, thermal loss at t = 5e-324 and at t = 1, xi = 0 and thermal(0) give I/2, and epr(0) is bona fide.✅ pass
test_gauss_exteriorOut-of-domain arguments raise: a zero-mode state, a mode index past the end, a beamsplitter on one mode twice, a transmittance one ulp outside [0, 1], a negative xi or nbar, non-finite displacements and angles, and a from_moments matrix that is odd-length, antisymmetric or not bona fide.✅ pass
test_gauss_extremesqueeze and epr at r up to 1e300 give a finite covariance or raise, cosh(2r) overflowing at r = 356 and the squeezer's map at r = 710, and thermal states over ten decades of nbar stay finite and physical.✅ pass
test_gauss_measureHomodyne and heterodyne draws are finite and counted, and condition removes the measured mode but refuses the only one, which vacuum(0) and from_moments would not re-admit.✅ pass
test_state_fuzzOver 400 random chains up to five operations deep on one to three modes, every state is finite, satisfies V + i*Omega/2 >= 0, keeps its mode count, and obeys dx^2 dp^2 >= 1/4 on every mode.✅ pass