GaussianSampling
Homodyne/heterodyne sampling moments and seeded reproducibility
5/5 passed in 83ms
| Test | What it does | Result |
|---|---|---|
test_heterodyne_vacuum | Heterodyne on vacuum returns (shots, 2) with per-quadrature variance 1.0, the vacuum 1/2 plus the 1/2 Husimi penalty. | ✅ pass |
test_homodyne_angle | Homodyne at angle pi/2 measures p: mean 0.0 for Coherent(1.0, 0.0). | ✅ pass |
test_homodyne_coherent | Homodyne x on Coherent(1.0, 0.0) has sample mean 1.0 and variance 1/2. | ✅ pass |
test_homodyne_squeezed | Homodyne x on Squeezed(0.5) has variance e^-1/2 = 0.184, below vacuum. | ✅ pass |
test_seeding | The same seed reproduces identical samples and a different seed does not. | ✅ pass |