Skip to content

CrossTruncation ​

The Fock engine reduced to the Gaussian one, with convergence demonstrated

7/7 passed in 178ms

TestWhat it doesResult
test_fock_channelA number-basis beamsplitter with vacuum equals the thermal-loss map at ξ=0 to 1e-13 on displaced and thermal states.✅ pass
test_fock_convergesThe number basis reproduces the Gaussian layer's mean, covariance and Wigner function on a 31x31 window, each error falling at least 8x per cutoff doubling, a factor an hbar slip or a missing sqrt(2) fails.✅ pass
test_fock_entropyA thermal state's von Neumann entropy and purity in the number basis equal the symplectic ones.✅ pass
test_fock_gaussianityRelative-entropy non-Gaussianity and Wigner negativity vanish on every Gaussian twin at cutoff 96, converged 10x against 48, where a squeezed vacuum still reads 3e-4; negativity is bounded above only.✅ pass
test_fock_physicalAt every cutoff, including ones where the moments are 100% wrong, the number basis's second moments are bona fide and satisfy Heisenberg, and its Husimi grid stays inside [0,1/(2π)].✅ pass
test_fock_purityA truncated pure state's density matrix reports purity 1 at every cutoff while its moments read 1/(2detV) = 0.650 at cutoff 6 and 0.99996 at 48, the pessimistic reading for a pure state.✅ pass
test_trunc_underreportstrunc_error scores the lost population, not its effect on the moments: a squeezed vacuum's covariance error runs 15x to 140x above it, growing with the cutoff.✅ pass