CrossTruncation
The Fock engine reduced to the Gaussian one, with convergence demonstrated
7/7 passed in 178ms
| Test | What it does | Result |
|---|---|---|
test_fock_channel | A number-basis beamsplitter with vacuum equals the thermal-loss map at | ✅ pass |
test_fock_converges | The 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_entropy | A thermal state's von Neumann entropy and purity in the number basis equal the symplectic ones. | ✅ pass |
test_fock_gaussianity | Relative-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_physical | At 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 | ✅ pass |
test_fock_purity | A truncated pure state's density matrix reports purity 1 at every cutoff while its moments read | ✅ pass |
test_trunc_underreports | trunc_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 |