Skip to content

FockWitness ​

Wigner negativity and non-Gaussianity: what each witness detects

5/5 passed in 639ms

TestWhat it doesResult
test_cat_closed_formEven and odd cats match their closed-form Wigner functions pointwise, where a classical mixture of the same two lobes scores zero negativity but 1.55 bits of relative-entropy non-Gaussianity (Genoni & Paris, PRA 82, 052341 (2010)).✅ pass
test_fock_anchorThe negativity volume of |1> is 4/sqrt(e) - 2 = 0.4261226, the vacuum scores zero, and the volume grows over |0> to |4>.✅ pass
test_gkp_lattice|0_L> peaks in x at even multiples of sqrt(pi) and |1_L> at the odd ones, both peak in p at every multiple, and a 9 dB GKP state is strongly Wigner negative.✅ pass
test_loss_killsAn odd cat's negativity volume falls monotonically under pure loss, from 0.5577 intact to 0.0108 at eta = 0.6 and zero by eta = 0.4, with the state still physical.✅ pass
test_parity_witnessThe parity equals pi W(0,0) to 1e-9, negative for an odd cat and positive for a coherent state.✅ pass